diff --git "a/data/corpora/code_docs/train_pos.jsonl" "b/data/corpora/code_docs/train_pos.jsonl"
new file mode 100644--- /dev/null
+++ "b/data/corpora/code_docs/train_pos.jsonl"
@@ -0,0 +1,700 @@
+{"id": "code_docs_train_pos_0000", "text": "Method Missing in this implementation allows you to set any of the standard fields directly as you would the \"to\", \"subject\" etc. Those fields used most often (to, subject et al) are given their own method for ease of documentation and also to avoid the hook call to method missing. This will only catch the known fields listed in: Mail::Field::KNOWN_FIELDS as per RFC 2822, any ruby string or method name could pretty much be a field name, so we don't want to just catch ANYTHING sent to a message object and interpret it as a header. This method provides all three types of header call to set, read and explicitly set with the = operator Examples: mail.comments = 'These are some comments' mail.comments #=> 'These are some comments' mail.comments 'These are other comments' mail.comments #=> 'These are other comments' mail.date = 'Tue, 1 Jul 2003 10:52:37 +0200' mail.date.to_s #=> 'Tue, 1 Jul 2003 10:52:37 +0200' mail.date 'Tue, 1 Jul 2003 10:52:37 +0200' mail.date.to_s #=> 'Tue, 1 Jul 2003 10:52:37 +0200' mail.resent_msg_id = '<1234@resent_msg_id.lindsaar.net>' mail.resent_msg_id #=> '<1234@resent_msg_id.lindsaar.net>' mail.resent_msg_id '<4567@resent_msg_id.lindsaar.net>' mail.resent_msg_id #=> '<4567@resent_msg_id.lindsaar.net>'", "label": 1, "domain": "code", "token_count": 337, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0001", "text": "Update the actual simulation values based on the toy-value pairs. Usually, one does not need to call refresh explicitly. The \"magic\" methods __call__, __setattr__, and __delattr__ invoke it automatically, when required. Instantiate a 1-dimensional |SeasonalParameter| object: >>> from hydpy.core.parametertools import SeasonalParameter >>> class Par(SeasonalParameter): ... NDIM = 1 ... TYPE = float ... TIME = None >>> par = Par(None) >>> par.simulationstep = '1d' >>> par.shape = (None,) When a |SeasonalParameter| object does not contain any toy-value pairs yet, the method |SeasonalParameter.refresh| sets all actual simulation values to zero: >>> par.values = 1. >>> par.refresh() >>> par.values[0] 0.0 When there is only one toy-value pair, its values are relevant for all actual simulation values: >>> par.toy_1 = 2. # calls refresh automatically >>> par.values[0] 2.0 Method |SeasonalParameter.refresh| performs a linear interpolation for the central time points of each simulation time step. Hence, in the following example, the original values of the toy-value pairs do not show up: >>> par.toy_12_31 = 4. >>> from hydpy import round_ >>> round_(par.values[0]) 2.00274 >>> round_(par.values[-2]) 3.99726 >>> par.values[-1] 3.0 If one wants to preserve the original values in this example, one would have to set the corresponding toy instances in the middle of some simulation step intervals: >>> del par.toy_1 >>> del par.toy_12_31 >>> par.toy_1_1_12 = 2 >>> par.toy_12_31_12 = 4. >>> par.values[0] 2.0 >>> round_(par.values[1]) 2.005479 >>> round_(par.values[-2]) 3.994521 >>> par.values[-1] 4.0", "label": 1, "domain": "code", "token_count": 430, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0002", "text": "Function path: Network.continueInterceptedRequest Domain: Network Method name: continueInterceptedRequest WARNING: This function is marked 'Experimental'! Parameters: Required arguments: 'interceptionId' (type: InterceptionId) -> No description Optional arguments: 'errorReason' (type: ErrorReason) -> If set this causes the request to fail with the given reason. Passing Aborted for requests marked with isNavigationRequest also cancels the navigation. Must not be set in response to an authChallenge. 'rawResponse' (type: string) -> If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... Must not be set in response to an authChallenge. 'url' (type: string) -> If set the request url will be modified in a way that's not observable by page. Must not be set in response to an authChallenge. 'method' (type: string) -> If set this allows the request method to be overridden. Must not be set in response to an authChallenge. 'postData' (type: string) -> If set this allows postData to be set. Must not be set in response to an authChallenge. 'headers' (type: Headers) -> If set this allows the request headers to be changed. Must not be set in response to an authChallenge. 'authChallengeResponse' (type: AuthChallengeResponse) -> Response to a requestIntercepted with an authChallenge. Must not be set otherwise. No return value. Description: Response to Network.requestIntercepted which either modifies the request to continue with any modifications, or blocks it, or completes it with the provided response bytes. If a network fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted event will be sent with the same InterceptionId.", "label": 1, "domain": "code", "token_count": 388, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0003", "text": "Prais conditional mobility measure. Parameters ---------- pmat : matrix (k, k), Markov probability transition matrix. Returns ------- pr : matrix (1, k), conditional mobility measures for each of the k classes. Notes ----- Prais' conditional mobility measure for a class is defined as: .. math:: pr_i = 1 - p_{i,i} Examples -------- >>> import numpy as np >>> import libpysal >>> from giddy.markov import Markov,prais >>> f = libpysal.io.open(libpysal.examples.get_path(\"usjoin.csv\")) >>> pci = np.array([f.by_col[str(y)] for y in range(1929,2010)]) >>> q5 = np.array([mc.Quantiles(y).yb for y in pci]).transpose() >>> m = Markov(q5) >>> m.transitions array([[729., 71., 1., 0., 0.], [ 72., 567., 80., 3., 0.], [ 0., 81., 631., 86., 2.], [ 0., 3., 86., 573., 56.], [ 0., 0., 1., 57., 741.]]) >>> m.p array([[0.91011236, 0.0886392 , 0.00124844, 0. , 0. ], [0.09972299, 0.78531856, 0.11080332, 0.00415512, 0. ], [0. , 0.10125 , 0.78875 , 0.1075 , 0.0025 ], [0. , 0.00417827, 0.11977716, 0.79805014, 0.07799443], [0. , 0. , 0.00125156, 0.07133917, 0.92740926]]) >>> prais(m.p) array([0.08988764, 0.21468144, 0.21125 , 0.20194986, 0.07259074])", "label": 1, "domain": "code", "token_count": 453, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0004", "text": "The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.
. @param url_content_type [String] The content type. @param team_name [String] Your team name. @param create_review_body [Array] Body for create reviews API @param sub_team [String] SubTeam of your team, you want to assign the created review to. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.", "label": 1, "domain": "code", "token_count": 333, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0005", "text": "Create an authentication token. Note that the parameters specified below are not validated and passed directly to the Vault server. Depending on the version of Vault in operation, some of these options may not work, and newer options may be available that are not listed here. @example Creating a token Vault.auth_token.create #=> # @example Creating a token assigned to policies with a wrap TTL Vault.auth_token.create( policies: [\"myapp\"], wrap_ttl: 500, ) @param [Hash] options @option options [String] :id The ID of the client token - this can only be specified for root tokens @option options [Array] :policies List of policies to apply to the token @option options [Fixnum, String] :wrap_ttl The number of seconds or a golang-formatted timestamp like \"5s\" or \"10m\" for the TTL on the wrapped response @option options [Hash] :meta A map of metadata that is passed to audit backends @option options [Boolean] :no_parent Create a token without a parent - see also {#create_orphan} @option options [Boolean] :no_default_policy Create a token without the default policy attached @option options [Boolean] :renewable Set whether this token is renewable or not @option options [String] :display_name Name of the token @option options [Fixnum] :num_uses Maximum number of uses for the token @return [Secret]", "label": 1, "domain": "code", "token_count": 304, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0006", "text": "Applies multiple changes to the configuration at once. If the changed settings contain localization related settings like language or calendarType, then only a single localizationChanged event will be fired. As the framework has to inform all existing components, elements, models etc. about localization changes, using applySettings can significantly reduce the overhead for multiple changes, esp. when they occur after the UI has been created already. The mSettings can contain any property xyz for which a setter method setXYZ exists in the API of this class. Similarly, values for the {@link sap.ui.core.Configuration.FormatSettings format settings} API can be provided in a nested object with name formatSettings. @example
Apply language, calendarType and several legacy format settings in one call
sap.ui.getCore().getConfiguration().applySettings({ language: 'de', calendarType: sap.ui.core.CalendarType.Gregorian, formatSettings: { legacyDateFormat: '1', legacyTimeFormat: '1', legacyNumberFormat: '1' } }); @param {object} mSettings Configuration options to apply @returns {sap.ui.core.Configuration} Returns this to allow method chaining @public @since 1.38.6", "label": 1, "domain": "code", "token_count": 311, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0007", "text": "Gets an Application-related events. The response is list of ApplicationEvent objects. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the application name is \"fabric:/myapp/app1\", the application identity would be \"myapp~app1\" in 6.0+ and \"myapp/app1\" in previous versions. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 343, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0008", "text": "Gets the value of the curveSegment property.
This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the curveSegment property.
Perform a Java Properties Value level 1 (only basic set) escape operation on a Reader input, writing results to a Writer.
Level 1 means this method will only escape the Java Properties basic escape set:
The Single Escape Characters: \t (U+0009), \n (U+000A), \f (U+000C), \r (U+000D) and \\ (U+005C).
Two ranges of non-displayable, control characters (some of which are already part of the single escape characters list): U+0000 to U+001F and U+007F to U+009F.
This method calls {@link #escapePropertiesValue(Reader, Writer, PropertiesValueEscapeLevel)} with the following preconfigured values:
@param reader the Reader reading the text to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 431, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0010", "text": "Replies if two coplanar triangles intersect. Triangles intersect even if they are connected by two of their edges.
Triangle/triangle intersection test routine, by Tomas Moller, 1997. See article \"A Fast Triangle-Triangle Intersection Test\", Journal of Graphics Tools, 2(2), 1997. @param v1x x coordinate of the first point of the first triangle. @param v1y y coordinate of the first point of the first triangle. @param v1z z coordinate of the first point of the first triangle. @param v2x x coordinate of the second point of the first triangle. @param v2y y coordinate of the second point of the first triangle. @param v2z z coordinate of the second point of the first triangle. @param v3x x coordinate of the third point of the first triangle. @param v3y y coordinate of the third point of the first triangle. @param v3z z coordinate of the third point of the first triangle. @param u1x x coordinate of the first point of the second triangle. @param u1y y coordinate of the first point of the second triangle. @param u1z z coordinate of the first point of the second triangle. @param u2x x coordinate of the second point of the second triangle. @param u2y y coordinate of the second point of the second triangle. @param u2z z coordinate of the second point of the second triangle. @param u3x x coordinate of the third point of the second triangle. @param u3y y coordinate of the third point of the second triangle. @param u3z z coordinate of the third point of the second triangle. @return true if the two triangles are intersecting.", "label": 1, "domain": "code", "token_count": 372, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0011", "text": "Gets an Application-related events. The response is list of ApplicationEvent objects. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the application name is \"fabric:/myapp/app1\", the application identity would be \"myapp~app1\" in 6.0+ and \"myapp/app1\" in previous versions. @param start_time_utc [String] The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param end_time_utc [String] The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param events_types_filter [String] This is a comma separated string specifying the types of FabricEvents that should only be included in the response. @param exclude_analysis_events [Boolean] This param disables the retrieval of AnalysisEvents if true is passed. @param skip_correlation_lookup [Boolean] This param disables the search of CorrelatedEvents information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.", "label": 1, "domain": "code", "token_count": 336, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0012", "text": "
Generates a stream by repeating the elements of the provided stream. The number of times an element is repeated is given by the repeating factor.
Example:
{@code Stream stream = Stream.of(\"a0\", \"a1\", \"a2\", \"a3\"); Stream repeatingStream = StreamsUtils.repeat(stream, 3); List collect = repeatingStream.collect(Collectors.toList()); // The collect list is [\"a0\", \"a0\", \"a0\", \"a1\", \"a1\", \"a1\", \"a2\", \"a2\", \"a2\", \"a3\", \"a3\", \"a3\"] }
If the provided stream is empty, then the returned stream is also empty.
The repeatingFactor should be greater of equals than 2. A repeating factor of 0 does not make sense. A repeating factor of 1 is in fact the identity operation. An IllegalArgumentException will be thrown if a non valid repeatingFactor is provided.
An IllegalArgumentException will be thrown if a non SIZED stream is provided. Believe me, trying to repeat an infinite stream is not a good idea.
The repeating of the provided stream should no lead to the producing of more than Long.MAX_VALUE. Weird effects will occur in that case.
A NullPointerException is thrown if the provided stream is null.
The returned stream is ORDERED.
@param stream The stream to be repeated. Will throw a NullPointerException if null. @param repeatingFactor The repeating factor, should be greater of equal than 2. @param The type of the elements of the provided stream. @return A repeating stream.", "label": 1, "domain": "code", "token_count": 420, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0013", "text": "Dalli::Client is the main class which developers will use to interact with the memcached server. Usage: Dalli::Client.new(['localhost:11211:10', 'cache-2.example.com:11211:5', '192.168.0.1:22122:5', '/var/run/memcached/socket'], :threadsafe => true, :failover => true, :expires_in => 300) servers is an Array of \"host:port:weight\" where weight allows you to distribute cache unevenly. Both weight and port are optional. If you pass in nil, Dalli will use the MEMCACHE_SERVERS environment variable or default to 'localhost:11211' if it is not present. Dalli also supports the ability to connect to Memcached on localhost through a UNIX socket. To use this functionality, use a full pathname (beginning with a slash character '/') in place of the \"host:port\" pair in the server configuration. Options: - :namespace - prepend each key with this value to provide simple namespacing. - :failover - if a server is down, look for and store values on another server in the ring. Default: true. - :threadsafe - ensure that only one thread is actively using a socket at a time. Default: true. - :expires_in - default TTL in seconds if you do not pass TTL as a parameter to an individual operation, defaults to 0 or forever - :compress - defaults to false, if true Dalli will compress values larger than 1024 bytes before sending them to memcached. - :serializer - defaults to Marshal - :compressor - defaults to zlib - :cache_nils - defaults to false, if true Dalli will not treat cached nil values as 'not found' for #fetch operations. The standard memcached instruction set Turn on quiet aka noreply support. All relevant operations within this block will be effectively pipelined as Dalli will use 'quiet' operations where possible. Currently supports the set, add, replace and delete operations.", "label": 1, "domain": "code", "token_count": 427, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0014", "text": "
Perform am URI query parameter (name or value) escape operation on a Reader input, writing results to a Writer.
The following are the only allowed chars in an URI query parameter (will not be escaped):
A-Z a-z 0-9
- . _ ~
! $ ' ( ) * , ;
: @
/ ?
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
@param reader the Reader reading the text to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @param encoding the encoding to be used for escaping. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 311, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0015", "text": "Calculates how well the fixations from a set of subjects on a set of images can be predicted with the fixations from another set of subjects on another set of images. The prediction is carried out by computing a fixation density map from fixations of predicting_subjects subjects on predicting_images images. Prediction accuracy is assessed by measures.prediction_scores. Parameters fm : fixmat instance category : int Category from which the fixations are taken. predicting_filenumbers : list List of filenumbers used for prediction, i.e. images where fixations for the prediction are taken from. predicting_subjects : list List of subjects whose fixations on images in predicting_filenumbers are used for the prediction. predicted_filenumnbers : list List of images from which the to be predicted fixations are taken. predicted_subjects : list List of subjects used for evaluation, i.e subjects whose fixations on images in predicted_filenumbers are taken for evaluation. controls : bool, optional If True (default), n_predict subjects are chosen from the fixmat. If False, 1000 fixations are randomly generated and used for testing. scale_factor : int, optional specifies the scaling of the fdm. Default is 1. Returns auc : area under the roc curve for sets of actuals and controls true_pos_rate : ndarray Rate of true positives for every given threshold value. All values appearing in actuals are taken as thresholds. Uses lower sum interpolation. false_pos_rate : ndarray See true_pos_rate but for false positives.", "label": 1, "domain": "code", "token_count": 306, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0016", "text": "To create new web hook issue **POST** against */api/hooks-web/* as an authenticated user. You should specify list of event_types or event_groups. Example of a request: .. code-block:: http POST /api/hooks-web/ HTTP/1.1 Content-Type: application/json Accept: application/json Authorization: Token c84d653b9ec92c6cbac41c706593e66f567a7fa4 Host: example.com { \"event_types\": [\"resource_start_succeeded\"], \"event_groups\": [\"users\"], \"destination_url\": \"http://example.com/\" } When hook is activated, **POST** request is issued against destination URL with the following data: .. code-block:: javascript { \"timestamp\": \"2015-07-14T12:12:56.000000\", \"message\": \"Customer ABC LLC has been updated.\", \"type\": \"customer_update_succeeded\", \"context\": { \"user_native_name\": \"Walter Lebrowski\", \"customer_contact_details\": \"\", \"user_username\": \"Walter\", \"user_uuid\": \"1c3323fc4ae44120b57ec40dea1be6e6\", \"customer_uuid\": \"4633bbbb0b3a4b91bffc0e18f853de85\", \"ip_address\": \"8.8.8.8\", \"user_full_name\": \"Walter Lebrowski\", \"customer_abbreviation\": \"ABC LLC\", \"customer_name\": \"ABC LLC\" }, \"levelname\": \"INFO\" } Note that context depends on event type.", "label": 1, "domain": "code", "token_count": 326, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0017", "text": "Gets the health of a Service Fabric node, by using the specified health policy. Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection of health events reported on the node based on the health state. Use ClusterHealthPolicy in the POST body to override the health policies used to evaluate the health. If the node that you specify by name does not exist in the health store, this returns an error. @param node_name [String] The name of the node. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. - Default - Default value. Matches any HealthState. The value is zero. - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. - Ok - Filter that matches input with HealthState value Ok. The value is 2. - Warning - Filter that matches input with HealthState value Warning. The value is 4. - Error - Filter that matches input with HealthState value Error. The value is 8. - All - Filter that matches input with any HealthState value. The value is 65535. @param cluster_health_policy [ClusterHealthPolicy] Describes the health policies used to evaluate the health of a cluster or node. If not present, the health evaluation uses the health policy from cluster manifest or the default health policy. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 486, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0018", "text": "/*public static boolean findRserve_HOME(String path) { Map env = System.getenv(); Properties prop = System.getProperties(); Rserve_HOME = path; if (Rserve_HOME == null || !(new File(Rserve_HOME).exists()) || !new File(Rserve_HOME).getName().equals(\"Rserve\")) { if (env.containsKey(Rserve_HOME_KEY)) { Rserve_HOME = env.get(Rserve_HOME_KEY); } if (Rserve_HOME == null || prop.containsKey(Rserve_HOME_KEY) || !(new File(Rserve_HOME).exists()) || !new File(Rserve_HOME).getName().equals(\"Rserve\")) { Rserve_HOME = prop.getProperty(Rserve_HOME_KEY); } if (Rserve_HOME == null || !(new File(Rserve_HOME).exists()) || !new File(Rserve_HOME).getName().equals(\"Rserve\")) { Rserve_HOME = null; String OS_NAME = prop.getProperty(\"os.name\"); String OS_ARCH = prop.getProperty(\"os.arch\"); if (OS_ARCH.equals(\"amd64\")) { OS_ARCH = \"x86_64\"; } if (OS_ARCH.endsWith(\"86\")) { OS_ARCH = \"x86\"; } if (OS_NAME.contains(\"Windows\")) { Rserve_HOME = \"lib\\\\Windows\\\\\" + OS_ARCH + \"\\\\Rserve\\\\\"; } else if (OS_NAME.equals(\"Mac OS X\")) { Rserve_HOME = \"lib/MacOSX/\" + OS_ARCH + \"/Rserve\"; } else if (OS_NAME.equals(\"Linux\")) { Rserve_HOME = \"lib/Linux/\" + OS_ARCH + \"/Rserve\"; } else { RLog.err.println(\"OS \" + OS_NAME + \"/\" + OS_ARCH + \" not supported for automated RServe finding.\"); } if (!new File(Rserve_HOME).exists()) { RLog.err.println(\"Unable to find Rserve in \" + Rserve_HOME); Rserve_HOME = null; } else { Rserve_HOME = new File(Rserve_HOME).getPath().replace(\"\\\\\", \"\\\\\\\\\"); } } } if (Rserve_HOME != null && new File(Rserve_HOME).exists()) { setRecursiveExecutable(new File(Rserve_HOME)); return true; } else { return false; } }", "label": 1, "domain": "code", "token_count": 448, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0019", "text": "Returns a new +ActiveSupport::TimeWithZone+ where one or more of the elements have been changed according to the +options+ parameter. The time options (:hour, :min, :sec, :usec, :nsec) reset cascadingly, so if only the hour is passed, then minute, sec, usec and nsec is set to 0. If the hour and minute is passed, then sec, usec and nsec is set to 0. The +options+ parameter takes a hash with any of these keys: :year, :month, :day, :hour, :min, :sec, :usec, :nsec, :offset, :zone. Pass either :usec or :nsec, not both. Similarly, pass either :zone or :offset, not both. t = Time.zone.now # => Fri, 14 Apr 2017 11:45:15 EST -05:00 t.change(year: 2020) # => Tue, 14 Apr 2020 11:45:15 EST -05:00 t.change(hour: 12) # => Fri, 14 Apr 2017 12:00:00 EST -05:00 t.change(min: 30) # => Fri, 14 Apr 2017 11:30:00 EST -05:00 t.change(offset: \"-10:00\") # => Fri, 14 Apr 2017 11:45:15 HST -10:00 t.change(zone: \"Hawaii\") # => Fri, 14 Apr 2017 11:45:15 HST -10:00", "label": 1, "domain": "code", "token_count": 422, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0020", "text": "Create a tree The tree creation API will take nested entries as well. If both a tree and a nested path modifying that tree are specified, it will overwrite the contents of that tree with the new path contents and write a new tree out. @param [Hash] params @input params [String] :base_tree The SHA1 of the tree you want to update with new data @input params [Array[Hash]] :tree Required. Objects (of path, mode, type, and sha) specifying a tree structure The tree parameter takes the following keys: @input tree [String] :path The file referenced in the tree @input tree [String] :mode The file mode; one of 100644 for file (blob), 100755 for executable (blob), 040000 for subdirectory (tree), 160000 for submodule (commit), or 120000 for a blob that specifies the path of a symlink @input tree [String] :type Either blob, tree, or commit @input tree [String] :sha The SHA1 checksum ID of the object in the tree @input tree [String] :content The content you want this file to have - GitHub will write this blob out and use the SHA for this entry. Use either this or tree.sha @example github = Github.new github.git_data.trees.create 'user-name', 'repo-name', tree: [ { path: \"file.rb\", mode: \"100644\", type: \"blob\", sha: \"44b4fc6d56897b048c772eb4087f854f46256132\" }, ... ] @api public", "label": 1, "domain": "code", "token_count": 336, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0021", "text": "Lists report records by geography. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param filter [String] | Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| timestamp | filter | ge, le | | | country | select | | | | region | select | | | | zip | select | | | | apiRegion | filter | eq | | | userId | filter | eq | | | productId | filter | eq | | | subscriptionId | filter | eq | | | apiId | filter | eq | | | operationId | filter | eq | | | callCountSuccess | select | | | | callCountBlocked | select | | | | callCountFailed | select | | | | callCountOther | select | | | | bandwidth | select, orderBy | | | | cacheHitsCount | select | | | | cacheMissCount | select | | | | apiTimeAvg | select | | | | apiTimeMin | select | | | | apiTimeMax | select | | | | serviceTimeAvg | select | | | | serviceTimeMin | select | | | | serviceTimeMax | select | | | @param top [Integer] Number of records to return. @param skip [Integer] Number of records to skip. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ReportCollection] which provide lazy access to pages of the response.", "label": 1, "domain": "code", "token_count": 378, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0022", "text": "Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxMultiplicity Defines invalid connections along with the error messages that they produce. To add or remove rules on a graph, you must add/remove instances of this class to . Example: (code) graph.multiplicities.push(new mxMultiplicity( true, 'rectangle', null, null, 0, 2, ['circle'], 'Only 2 targets allowed', 'Only circle targets allowed')); (end) Defines a rule where each rectangle must be connected to no more than 2 circles and no other types of targets are allowed. Constructor: mxMultiplicity Instantiate class mxMultiplicity in order to describe allowed connections in a graph. Not all constraints can be enforced while editing, some must be checked at validation time. The and are treated as resource keys in . Parameters: source - Boolean indicating if this rule applies to the source or target terminal. type - Type of the source or target terminal that this rule applies to. See for more information. attr - Optional attribute name to match the source or target terminal. value - Optional attribute value to match the source or target terminal. min - Minimum number of edges for this rule. Default is 1. max - Maximum number of edges for this rule. n means infinite. Default is n. validNeighbors - Array of types of the opposite terminal for which this rule applies. countError - Error to be displayed for invalid number of edges. typeError - Error to be displayed for invalid opposite terminals. validNeighborsAllowed - Optional boolean indicating if the array of opposite types should be valid or invalid.", "label": 1, "domain": "code", "token_count": 360, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0023", "text": "Constructs a placemark. @alias Placemark @constructor @augments Renderable @classdesc Represents a Placemark shape. A placemark displays an image, a label and a leader line connecting the placemark's geographic position to the ground. All three of these items are optional. By default, the leader line is not pickable. See [enableLeaderLinePicking]{@link Placemark#enableLeaderLinePicking}.
Placemarks may be drawn with either an image or as single-color square with a specified size. When the placemark attributes indicate a valid image, the placemark's image is drawn as a rectangle in the image's original dimensions, scaled by the image scale attribute. Otherwise, the placemark is drawn as a square with width and height equal to the value of the image scale attribute, in pixels, and color equal to the image color attribute.
By default, placemarks participate in decluttering with a [declutterGroupID]{@link Placemark#declutterGroup} of 2. Only placemark labels are decluttered relative to other placemark labels. The placemarks themselves are optionally scaled with eye distance to achieve decluttering of the placemark as a whole. See [eyeDistanceScaling]{@link Placemark#eyeDistanceScaling}. @param {Position} position The placemark's geographic position. @param {Boolean} eyeDistanceScaling Indicates whether the size of this placemark scales with eye distance. See [eyeDistanceScalingThreshold]{@link Placemark#eyeDistanceScalingThreshold} and [eyeDistanceScalingLabelThreshold]{@link Placemark#eyeDistanceScalingLabelThreshold}. @param {PlacemarkAttributes} attributes The attributes to associate with this placemark. May be null, in which case default attributes are associated. @throws {ArgumentError} If the specified position is null or undefined.", "label": 1, "domain": "code", "token_count": 382, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0024", "text": "Lists report records by subscription. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param filter [String] | Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| timestamp | filter | ge, le | | | displayName | select, orderBy | | | | apiRegion | filter | eq | | | userId | select, filter | eq | | | productId | select, filter | eq | | | subscriptionId | select, filter | eq | | | callCountSuccess | select, orderBy | | | | callCountBlocked | select, orderBy | | | | callCountFailed | select, orderBy | | | | callCountOther | select, orderBy | | | | callCountTotal | select, orderBy | | | | bandwidth | select, orderBy | | | | cacheHitsCount | select | | | | cacheMissCount | select | | | | apiTimeAvg | select, orderBy | | | | apiTimeMin | select | | | | apiTimeMax | select | | | | serviceTimeAvg | select | | | | serviceTimeMin | select | | | | serviceTimeMax | select | | | @param top [Integer] Number of records to return. @param skip [Integer] Number of records to skip. @param orderby [String] OData order by query option. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 381, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0025", "text": "/* Copyright (C) 2007, 2008 Apple Inc. All rights reserved. Copyright (C) 2008, 2009 Anthony Ricaud 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: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", "label": 1, "domain": "code", "token_count": 313, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0026", "text": "Lista os ambientes filtrados conforme parâmetros informados. Se os dois parâmetros têm o valor None então retorna todos os ambientes. Se o id_divisao é diferente de None então retorna os ambientes filtrados pelo valor de id_divisao. Se o id_divisao e id_ambiente_logico são diferentes de None então retorna os ambientes filtrados por id_divisao e id_ambiente_logico. :param id_divisao: Identificador da divisão de data center. :param id_ambiente_logico: Identificador do ambiente lógico. :return: Dicionário com a seguinte estrutura: :: {'ambiente': [{'id': < id_ambiente >, 'link': < link >, 'id_divisao': < id_divisao >, 'nome_divisao': < nome_divisao >, 'id_ambiente_logico': < id_ambiente_logico >, 'nome_ambiente_logico': < nome_ambiente_logico >, 'id_grupo_l3': < id_grupo_l3 >, 'nome_grupo_l3': < nome_grupo_l3 >, 'id_filter': < id_filter >, 'filter_name': < filter_name >, 'ambiente_rede': < ambiente_rede >}, ... demais ambientes ... ]} :raise DataBaseError: Falha na networkapi ao acessar o banco de dados. :raise XMLError: Falha na networkapi ao gerar o XML de resposta.", "label": 1, "domain": "code", "token_count": 321, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0027", "text": "Classify the contents of a {@link String} to one of several String representations that shows the classes. Plain text or XML input is expected and the {@link PlainTextDocumentReaderAndWriter} is used. The classifier will tokenize the text and treat each sentence as a separate document. The output can be specified to be in a choice of three formats: slashTags (e.g., Bill/PERSON Smith/PERSON died/O ./O), inlineXML (e.g., <PERSON>Bill Smith</PERSON> went to <LOCATION>Paris</LOCATION> .), or xml, for stand-off XML (e.g., <wi num=\"0\" entity=\"PERSON\">Sue</wi> <wi num=\"1\" entity=\"O\">shouted</wi> ). There is also a binary choice as to whether the spacing between tokens of the original is preserved or whether the (tagged) tokens are printed with a single space (for inlineXML or slashTags) or a single newline (for xml) between each one.
Fine points: The slashTags and xml formats show tokens as transformed by any normalization processes inside the tokenizer, while inlineXML shows the tokens exactly as they appeared in the source text. When a period counts as both part of an abbreviation and as an end of sentence marker, it is included twice in the output String for slashTags or xml, but only once for inlineXML, where it is not counted as part of the abbreviation (or any named entity it is part of). For slashTags with preserveSpacing=true, there will be two successive periods such as \"Jr..\" The tokenized (preserveSpacing=false) output will have a space or a newline after the last token. @param sentences The String to be classified. It will be tokenized and divided into documents according to (heuristically determined) sentence boundaries. @param outputFormat The format to put the output in: one of \"slashTags\", \"xml\", or \"inlineXML\" @param preserveSpacing Whether to preserve the input spacing between tokens, which may sometimes be none (true) or whether to tokenize the text and print it with one space between each token (false) @return A {@link String} with annotated with classification information.", "label": 1, "domain": "code", "token_count": 480, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0028", "text": "Cancels a user-induced fault operation. The following is a list of APIs that start fault operations that may be cancelled using CancelOperation - - StartDataLoss - StartQuorumLoss - StartPartitionRestart - StartNodeTransition If force is false, then the specified user-induced operation will be gracefully stopped and cleaned up. If force is true, the command will be aborted, and some internal state may be left behind. Specifying force as true should be used with care. Calling this API with force set to true is not allowed until this API has already been called on the same test command with force set to false first, or unless the test command already has an OperationState of OperationState.RollingBack. Clarification: OperationState.RollingBack means that the system will/is be cleaning up internal system state caused by executing the command. It will not restore data if the test command was to cause data loss. For example, if you call StartDataLoss then call this API, the system will only clean up internal state from running the command. It will not restore the target partition's data, if the command progressed far enough to cause data loss. Important note: if this API is invoked with force==true, internal state may be left behind. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param force [Boolean] Indicates whether to gracefully rollback and clean up internal system state modified by executing the user-induced operation. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 386, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0029", "text": "User list is available to all authenticated users. To get a list, issue authenticated **GET** request against */api/users/*. User list supports several filters. All filters are set in HTTP query section. Field filters are listed below. All of the filters apart from ?organization are using case insensitive partial matching. Several custom filters are supported: - ?current - filters out user making a request. Useful for getting information about a currently logged in user. - ?civil_number=XXX - filters out users with a specified civil number - ?is_active=True|False - show only active (non-active) users The user can be created either through automated process on login with SAML token, or through a REST call by a user with staff privilege. Example of a creation request is below. .. code-block:: http POST /api/users/ HTTP/1.1 Content-Type: application/json Accept: application/json Authorization: Token c84d653b9ec92c6cbac41c706593e66f567a7fa4 Host: example.com { \"username\": \"sample-user\", \"full_name\": \"full name\", \"native_name\": \"taisnimi\", \"job_title\": \"senior cleaning manager\", \"email\": \"example@example.com\", \"civil_number\": \"12121212\", \"phone_number\": \"\", \"description\": \"\", \"organization\": \"\", } NB! Username field is case-insensitive. So \"John\" and \"john\" will be treated as the same user.", "label": 1, "domain": "code", "token_count": 303, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0030", "text": "Creates and caches a new AWS DynamoDB.DocumentClient instance with the given DynamoDB.DocumentClient constructor options for either the region specified in the given options (if any and region specified) or for the current region (if not) UNLESS a previously cached DynamoDB.DocumentClient instance exists and the given options either match the options used to construct it or are undefined, empty or only region was specified, in which case no new instance will be created and the cached instance will be returned instead. If the given options do not match existing options and are not empty and not only region, then logs a warning that the previously cached DynamoDB.DocumentClient instance is being replaced and returns the new AWS DynamoDB.DocumentClient instance. Logging should be configured before calling this function (see {@linkcode logging-utils/logging#configureLogging}) Configures the given context, if it does not already have a context.dynamoDBDocClient, with the cached dynamoDBDocClient instance for either the region specified in the given default DynamoDB.DocumentClient options (if any and region specified) or for the current region (if not); otherwise with a new AWS.DynamoDB.DocumentClient instance created and cached by {@linkcode setDynamoDBDocClient} for the specified or current region using the given default DynamoDB.DocumentClient constructor options. Note that the given default DynamoDB.DocumentClient constructor options will ONLY be used if no cached DynamoDB.DocumentClient instance exists. Logging should be configured before calling this function (see {@linkcode logging-utils/logging#configureLogging}) @param {Object|DynamoDBDocClientAware} context - the context to configure @param {Object|undefined} [dynamoDBDocClientOptions] - the optional DynamoDB.DocumentClient constructor options to use if no cached DynamoDB.DocumentClient instance exists @param {string|undefined} [dynamoDBDocClientOptions.region] - an optional region to use instead of the current region @returns {DynamoDBDocClientAware} the given context configured with an AWS.DynamoDB.DocumentClient instance to use", "label": 1, "domain": "code", "token_count": 413, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0031", "text": "
Perform an XML 1.0 level 2 (markup-significant and all non-ASCII chars) escape operation on a String input.
Level 2 means this method will escape:
The five markup-significant characters: <, >, &, " and '
All non ASCII characters.
This escape will be performed by replacing those chars by the corresponding XML Character Entity References (e.g. '<') when such CER exists for the replaced character, and replacing by a hexadecimal character reference (e.g. '␰') when there there is no CER for the replaced character.
This method calls {@link #escapeXml10(String, XmlEscapeType, XmlEscapeLevel)} with the following preconfigured values:
@param text the String to be escaped. @return The escaped result String. As a memory-performance improvement, will return the exact same object as the text input argument if no escaping modifications were required (and no additional String objects will be created during processing). Will return null if input is null.", "label": 1, "domain": "code", "token_count": 426, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0032", "text": "Configure sessions Enable sessions (disabled by default). This is part of a DSL, for this reason when this method is called with an argument, it will set the corresponding instance variable. When called without, it will return the already set value, or the default. Given Class as adapter it will be used as sessions middleware. Given String as adapter it will be resolved as class name and used as sessions middleware. Given Symbol as adapter it is assumed it's name of the class under Rack::Session namespace that will be used as sessions middleware (e.g. :cookie for Rack::Session::Cookie). By default options include domain inferred from host configuration, and secure flag inferred from scheme configuration. @overload sessions(adapter, options) Sets the given value. @param adapter [Class, String, Symbol] Rack middleware for sessions management @param options [Hash] options to pass to sessions middleware @overload sessions(false) Disables sessions @overload sessions Gets the value. @return [Hanami::Config::Sessions] sessions configuration @since 0.2.0 @see Hanami::Configuration#host @see Hanami::Configuration#scheme @example Getting the value require 'hanami' module Bookshelf class Application < Hanami::Application end end Bookshelf::Application.configuration.sessions # => # @example Setting the value with symbol require 'hanami' module Bookshelf class Application < Hanami::Application configure do sessions :cookie, secret: 'abc123' end end end Bookshelf::Application.configuration.sessions # => #\"localhost\", :secure=>false}> @example Disabling previously enabled sessions require 'hanami' module Bookshelf class Application < Hanami::Application configure do sessions :cookie sessions false end end end Bookshelf::Application.configuration.sessions # => #", "label": 1, "domain": "code", "token_count": 426, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0033", "text": "Sets attributes and binds buffers (deprecated... use {@link module:twgl.setBuffersAndAttributes}) Example: const program = createProgramFromScripts( gl, [\"some-vs\", \"some-fs\"); const attribSetters = createAttributeSetters(program); const positionBuffer = gl.createBuffer(); const texcoordBuffer = gl.createBuffer(); const attribs = { a_position: {buffer: positionBuffer, numComponents: 3}, a_texcoord: {buffer: texcoordBuffer, numComponents: 2}, }; gl.useProgram(program); This will automatically bind the buffers AND set the attributes. setAttributes(attribSetters, attribs); Properties of attribs. For each attrib you can add properties: * type: the type of data in the buffer. Default = gl.FLOAT * normalize: whether or not to normalize the data. Default = false * stride: the stride. Default = 0 * offset: offset into the buffer. Default = 0 * divisor: the divisor for instances. Default = undefined For example if you had 3 value float positions, 2 value float texcoord and 4 value uint8 colors you'd setup your attribs like this const attribs = { a_position: {buffer: positionBuffer, numComponents: 3}, a_texcoord: {buffer: texcoordBuffer, numComponents: 2}, a_color: { buffer: colorBuffer, numComponents: 4, type: gl.UNSIGNED_BYTE, normalize: true, }, }; @param {Object.} setters Attribute setters as returned from createAttributeSetters @param {Object.} buffers AttribInfos mapped by attribute name. @memberOf module:twgl/programs @deprecated use {@link module:twgl.setBuffersAndAttributes}", "label": 1, "domain": "code", "token_count": 371, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0034", "text": "A final axis is translated and rotated from a \"standard axis\". So opt.position and opt.rotation is required. A standard axis is and axis from [0, 0] to [0, axisExtent[1]], for example: (0, 0) ------------> (0, 50) nameDirection or tickDirection or labelDirection is 1 means tick or label is below the standard axis, whereas is -1 means above the standard axis. labelOffset means offset between label and axis, which is useful when 'onZero', where axisLabel is in the grid and label in outside grid. Tips: like always, positive rotation represents anticlockwise, and negative rotation represents clockwise. The direction of position coordinate is the same as the direction of screen coordinate. Do not need to consider axis 'inverse', which is auto processed by axis extent. @param {module:zrender/container/Group} group @param {Object} axisModel @param {Object} opt Standard axis parameters. @param {Array.} opt.position [x, y] @param {number} opt.rotation by radian @param {number} [opt.nameDirection=1] 1 or -1 Used when nameLocation is 'middle' or 'center'. @param {number} [opt.tickDirection=1] 1 or -1 @param {number} [opt.labelDirection=1] 1 or -1 @param {number} [opt.labelOffset=0] Usefull when onZero. @param {string} [opt.axisLabelShow] default get from axisModel. @param {string} [opt.axisName] default get from axisModel. @param {number} [opt.axisNameAvailableWidth] @param {number} [opt.labelRotate] by degree, default get from axisModel. @param {number} [opt.strokeContainThreshold] Default label interval when label @param {number} [opt.nameTruncateMaxWidth]", "label": 1, "domain": "code", "token_count": 399, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0035", "text": "This API will restart some or all replicas or instances of the specified partition. This API is useful for testing failover. If used to target a stateless service partition, RestartPartitionMode must be AllReplicasOrInstances. Call the GetPartitionRestartProgress API using the same OperationId to get the progress. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the service name is \"fabric:/myapp/app1/svc1\", the service identity would be \"myapp~app1~svc1\" in 6.0+ and \"myapp/app1/svc1\" in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param restart_partition_mode [RestartPartitionMode] Describe which partitions to restart. Possible values include: 'Invalid', 'AllReplicasOrInstances', 'OnlyActiveSecondaries' @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 320, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0036", "text": "Create HDX configuration. Can only be called once (will raise an error if called more than once). Args: configuration (Optional[Configuration]): Configuration instance. Defaults to setting one up from passed arguments. remoteckan (Optional[ckanapi.RemoteCKAN]): CKAN instance. Defaults to setting one up from configuration. **kwargs: See below user_agent (str): User agent string. HDXPythonLibrary/X.X.X- is prefixed. Must be supplied if remoteckan is not. user_agent_config_yaml (str): Path to YAML user agent configuration. Ignored if user_agent supplied. Defaults to ~/.useragent.yml. user_agent_lookup (str): Lookup key for YAML. Ignored if user_agent supplied. hdx_url (str): HDX url to use. Overrides hdx_site. hdx_site (str): HDX site to use eg. prod, test. hdx_read_only (bool): Whether to access HDX in read only mode. Defaults to False. hdx_key (str): Your HDX key. Ignored if hdx_read_only = True. hdx_config_dict (dict): HDX configuration dictionary to use instead of above 3 parameters OR hdx_config_json (str): Path to JSON HDX configuration OR hdx_config_yaml (str): Path to YAML HDX configuration project_config_dict (dict): Project configuration dictionary OR project_config_json (str): Path to JSON Project configuration OR project_config_yaml (str): Path to YAML Project configuration hdx_base_config_dict (dict): HDX base configuration dictionary OR hdx_base_config_json (str): Path to JSON HDX base configuration OR hdx_base_config_yaml (str): Path to YAML HDX base configuration. Defaults to library's internal hdx_base_configuration.yml. Returns: str: HDX site url", "label": 1, "domain": "code", "token_count": 368, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0037", "text": "Build call for postConfigApacheFelixJettyBasedHttpService @param runmode (required) @param orgApacheFelixHttpsNio (optional) @param orgApacheFelixHttpsNioTypeHint (optional) @param orgApacheFelixHttpsKeystore (optional) @param orgApacheFelixHttpsKeystoreTypeHint (optional) @param orgApacheFelixHttpsKeystorePassword (optional) @param orgApacheFelixHttpsKeystorePasswordTypeHint (optional) @param orgApacheFelixHttpsKeystoreKey (optional) @param orgApacheFelixHttpsKeystoreKeyTypeHint (optional) @param orgApacheFelixHttpsKeystoreKeyPassword (optional) @param orgApacheFelixHttpsKeystoreKeyPasswordTypeHint (optional) @param orgApacheFelixHttpsTruststore (optional) @param orgApacheFelixHttpsTruststoreTypeHint (optional) @param orgApacheFelixHttpsTruststorePassword (optional) @param orgApacheFelixHttpsTruststorePasswordTypeHint (optional) @param orgApacheFelixHttpsClientcertificate (optional) @param orgApacheFelixHttpsClientcertificateTypeHint (optional) @param orgApacheFelixHttpsEnable (optional) @param orgApacheFelixHttpsEnableTypeHint (optional) @param orgOsgiServiceHttpPortSecure (optional) @param orgOsgiServiceHttpPortSecureTypeHint (optional) @param progressListener Progress listener @param progressRequestListener Progress request listener @return Call to execute @throws ApiException If fail to serialize the request body object", "label": 1, "domain": "code", "token_count": 317, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0038", "text": "/*[deutsch]
Ermittelt die aktuelle Zeit in der assoziierten Zeitzone und angegebenen Chronologie unter Berücksichtigung von Kalendervariante und Start des Kalendertages.
Das Ergebnis hängt immer dynamisch von der assoziierten Zeitzone ab. Wenn deren Daten sich ändern, dann wird diese Methode beim nächsten Aufruf ein angepasstes Ergebnis liefern.
Zu beachten: Dieses Beispiel stimmt sogar dann, wenn der aktuelle Zeitstempel 2015-07-17T18:00 ist, welcher normalerweise auf das islamische Datum AH-1436-10-01 abgebildet wird (wenn die Uhrzeit nicht betrachtet wird), denn der islamische Tag beginnt am Abend des Vortags.
@param generic type of chronology @param family calendar family to be used @param variant calendar variant @param startOfDay start of calendar day @return current general timestamp in given chronology @throws IllegalArgumentException if given variant is not supported @since 3.8/4.5", "label": 1, "domain": "code", "token_count": 346, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0039", "text": "
Perform an HTML5 level 1 (XML-style) escape operation on a String input.
Level 1 means this method will only escape the five markup-significant characters: <, >, &, " and '. It is called XML-style in order to link it with JSP's escapeXml attribute in JSTL's <c:out ... /> tags.
Note this method may not produce the same results as {@link #escapeHtml4Xml(String)} because it will escape the apostrophe as ', whereas in HTML 4 such NCR does not exist (the decimal numeric reference ' is used instead).
This method calls {@link #escapeHtml(String, HtmlEscapeType, HtmlEscapeLevel)} with the following preconfigured values:
@param text the String to be escaped. @return The escaped result String. As a memory-performance improvement, will return the exact same object as the text input argument if no escaping modifications were required (and no additional String objects will be created during processing). Will return null if input is null.", "label": 1, "domain": "code", "token_count": 438, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0040", "text": "materialize a single object, described by cld, from the first row of the ResultSet rs. There are two possible strategies: 1. The persistent class defines a public constructor with arguments matching the persistent primitive attributes of the class. In this case we build an array args of arguments from rs and call Constructor.newInstance(args) to build an object. 2. The persistent class does not provide such a constructor, but only a public default constructor. In this case we create an empty instance with Class.newInstance(). This empty instance is then filled by calling Field::set(obj,getObject(matchingColumn)) for each attribute. The second strategy needs n calls to Field::set() which are much more expensive than the filling of the args array in the first strategy. client applications should therefore define adequate constructors to benefit from performance gain of the first strategy. MBAIRD: The rowreader is told what type of object to materialize, so we have to trust it is asked for the right type. It is possible someone marked an extent in the repository, but not in java, or vice versa and this could cause problems in what is returned. we *have* to be able to materialize an object from a row that has a objConcreteClass, as we retrieve ALL rows belonging to that table. The objects using the rowReader will make sure they know what they are asking for, so we don't have to make sure a descriptor is assignable from the selectClassDescriptor. This allows us to map both inherited classes and unrelated classes to the same table.", "label": 1, "domain": "code", "token_count": 310, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0041", "text": "
Perform an HTML 4 level 2 (result is ASCII) escape operation on a Reader input, writing results to a Writer.
Level 2 means this method will escape:
The five markup-significant characters: <, >, &, " and '
All non ASCII characters.
This escape will be performed by replacing those chars by the corresponding HTML 4 Named Character References (e.g. '´') when such NCR exists for the replaced character, and replacing by a decimal character reference (e.g. 'ₙ') when there there is no NCR for the replaced character.
This method calls {@link #escapeHtml(Reader, Writer, HtmlEscapeType, HtmlEscapeLevel)} with the following preconfigured values:
@param reader the Reader reading the text to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 417, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0042", "text": "
Generate log-normally distributed floats. Use generator to generate num float results into the device memory at outputPtr. The device memory must have been previously allocated and be large enough to hold all the results. Launches are done with the stream set using ::curandSetStream(), or the null stream if no stream has been set. Results are 32-bit floating point values with log-normal distribution based on an associated normal distribution with mean mean and standard deviation stddev. Normally distributed results are generated from pseudorandom generators with a Box-Muller transform, and so require num to be even. Quasirandom generators use an inverse cumulative distribution function to preserve dimensionality. The normally distributed results are transformed into log-normal distribution. There may be slight numerical differences between results generated on the GPU with generators created with ::curandCreateGenerator() and results calculated on the CPU with generators created with ::curandCreateGeneratorHost(). These differences arise because of differences in results for transcendental functions. In addition, future versions of CURAND may use newer versions of the CUDA math library, so different versions of CURAND may give slightly different numerical values. @param generator - Generator to use @param outputPtr - Pointer to device memory to store CUDA-generated results, or Pointer to host memory to store CPU-generated results @param n - Number of floats to generate @param mean - Mean of associated normal distribution @param stddev - Standard deviation of associated normal distribution @return CURAND_STATUS_NOT_INITIALIZED if the generator was never created CURAND_STATUS_PREEXISTING_FAILURE if there was an existing error from a previous kernel launch CURAND_STATUS_LAUNCH_FAILURE if the kernel launch failed for any reason CURAND_STATUS_LENGTH_NOT_MULTIPLE if the number of output samples is not a multiple of the quasirandom dimension, or is not a multiple of two for pseudorandom generators CURAND_STATUS_SUCCESS if the results were generated successfully
", "label": 1, "domain": "code", "token_count": 387, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0043", "text": "Batch gradient descent with momentum and individual gains. Parameters ---------- objective : function or callable Should return a tuple of cost and gradient for a given parameter vector. When expensive to compute, the cost can optionally be None and can be computed every n_iter_check steps using the objective_error function. p0 : array-like, shape (n_params,) Initial parameter vector. it : int Current number of iterations (this function will be called more than once during the optimization). n_iter : int Maximum number of gradient descent iterations. n_iter_check : int Number of iterations before evaluating the global error. If the error is sufficiently low, we abort the optimization. n_iter_without_progress : int, optional (default: 300) Maximum number of iterations without progress before we abort the optimization. momentum : float, within (0.0, 1.0), optional (default: 0.8) The momentum generates a weight for previous gradients that decays exponentially. learning_rate : float, optional (default: 200.0) The learning rate for t-SNE is usually in the range [10.0, 1000.0]. If the learning rate is too high, the data may look like a 'ball' with any point approximately equidistant from its nearest neighbours. If the learning rate is too low, most points may look compressed in a dense cloud with few outliers. min_gain : float, optional (default: 0.01) Minimum individual gain for each parameter. min_grad_norm : float, optional (default: 1e-7) If the gradient norm is below this threshold, the optimization will be aborted. verbose : int, optional (default: 0) Verbosity level. args : sequence Arguments to pass to objective function. kwargs : dict Keyword arguments to pass to objective function. Returns ------- p : array, shape (n_params,) Optimum parameters. error : float Optimum. i : int Last iteration.", "label": 1, "domain": "code", "token_count": 393, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0044", "text": "@event Storage#error @param {Error} error Abstract storage for verified blockchain You can save all hashes, but that needed store a large size on 20 February 2015 mainnet have more that 344k blocks thats mean you need store minimum 80 * 344000 / 1024 / 1024 = 26.24 MB or 52.48 MB if you store data in hex but for example in localStorage you can save only 2.5 MB ... We offer store maximum 2015 blocks hashes and sha256x2 hash for every chunk it's required nearly 105.31 KB for 344k blocks (impressive, really?) if you need block hash you can: - get from storage if it belongs to last not complete unhashed chunk - get chunk from network, calculate hash and compare with saved in storage, use block hashes from chunk and save it in memory if you needed this besides you can use pre-saved chunk hashes from Storage.prototype, it's saved user traffic and accelerate blockchain initialization pre-saved data has next structure: {lastHash: string, chunkHashes: string[]} But at least you can use both options, it's your right just remember, what sometimes you can't store all data that you needed ... All methods return Promise, this is done for asynchronous storages such as: File, WebSQL Also all methods represent hashes in hex strings, not Buffer @class Storage @extends events.EventEmitter @param {Object} [opts] @param {string} [opts.networkName=livenet] @param {boolean} [opts.compactMode=false]", "label": 1, "domain": "code", "token_count": 327, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0045", "text": "A dictionary whose key is the identity string sent over TLS and whose value is a keyAndSecret specifying what publicKey this identity is associated with and what secret it needs to provide. @public @typedef {Object.} pskMap This function takes a list of public keys and the device's ECDH private key along with a beacon stream with preamble that was generated using those public keys. The function requires that the beacon values in the beacon stream MUST be in the same order as the keys listed in the publicKeysToNotify array. The code will then generate Sxy as given in http://thaliproject.org/PresenceProtocolBindings/#transferring-from-notification-beacon-to-tls and then feed that to HKDF using the the PSKIdentity value which is defined in the above as the pre-amble plus the individual beacon value for the associated public key. This means we have to parse the beacon stream to pull out the preamble along with the specific associated beacon and then combine them together into a single buffer that is then base64'd using the URL safe base64 scheme. This is then fed to HKDF as defined in the link above which produces the value that will be used as the secret. This function will then wrap up all of this into a dictionary whose key is the base64 url safe'd pre-amble + beacon value and who value is the secret along with the associated publicKey. @param {Buffer[]} publicKeysToNotify - An array of buffers holding ECDH public keys. @param {ECDH} ecdhForLocalDevice - A Crypto.ECDH object initialized with the local device's public and private keys @param {Buffer} beaconStreamWithPreAmble - A buffer stream containing the preamble and beacons @returns {pskMap|Error}", "label": 1, "domain": "code", "token_count": 367, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0046", "text": "Dumps the object's methods corresponding to the schema provided in the object's class and type-checks the values. @param [Boolean] [optional] camelize optional argument for converting hash to camelBack. @param [Boolean] [optional] include_root optional argument for having the root key of the resulting hash as instance's class name. @param [Boolean] [optional] include_namespaces optional argument for having root key as a nested hash of instance's namespaces. Animal::Cat.new.surrealize -> (animal: { cat: { weight: '3 kilos' } }) @param [String] [optional] root optional argument for using a specified root key for the hash @param [Integer] [optional] namespaces_nesting_level level of namespaces nesting. @return [String] a json-formatted string corresponding to the schema provided in the object's class. Values will be taken from the return values of appropriate methods from the object. @raise +Surrealist::UnknownSchemaError+ if no schema was provided in the object's class. @raise +Surrealist::InvalidTypeError+ if type-check failed at some point. @raise +Surrealist::UndefinedMethodError+ if a key defined in the schema does not have a corresponding method on the object. @example Define a schema and surrealize the object class User include Surrealist json_schema do { name: String, age: Integer, } end def name 'Nikita' end def age 23 end end User.new.surrealize # => \"{\\\"name\\\":\\\"Nikita\\\",\\\"age\\\":23}\" # For more examples see README", "label": 1, "domain": "code", "token_count": 329, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0047", "text": "Returns a file upload input tag wrapped in markup that allows dragging and dropping of files onto the element. @author Ian Grant @see file:README.md#Usage Usage section of the README @param [Symbol] method The attribute on the target model to attach the files to. @param [String] content The content to render inside of the drag and drop file field. @param [Hash] options A hash of options to customise the file field. @option options [Boolean] :disabled If set to true, the user will not be able to use this input. @option options [Boolean] :mutiple If set to true, *in most updated browsers* the user will be allowed to select multiple files. @option options [String] :accept If set to one or multiple mime-types, the user will be suggested a filter when choosing a file. You still need to set up model validations. @option options [Integer] :size_limit The upper limit on filesize to accept in bytes. Client-side validation only. You still need to set up model validations. @return [String] The generated file field markup. @example # Accept only PNGs or JPEGs up to 5MB in size: form.drag_and_drop_file_field :images, nil, accept: 'image/png, image/jpeg', size_limit: 5_000_000 @example # Pass custom content string: form.drag_and_drop_file_field :images, '
Drag and Drop!
', accept: 'image/png' @example # Pass a block of content instead of passing a string <%= form.drag_and_drop_file_field(:images, accept: 'image/png') do %> Drag and Drop PNG files here or click to browse <% end %>", "label": 1, "domain": "code", "token_count": 362, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0048", "text": "
Perform an HTML5 level 1 (XML-style) escape operation on a char[] input.
Level 1 means this method will only escape the five markup-significant characters: <, >, &, " and '. It is called XML-style in order to link it with JSP's escapeXml attribute in JSTL's <c:out ... /> tags.
Note this method may not produce the same results as {@link #escapeHtml4Xml(char[], int, int, java.io.Writer)} because it will escape the apostrophe as ', whereas in HTML 4 such NCR does not exist (the decimal numeric reference ' is used instead).
This method calls {@link #escapeHtml(char[], int, int, java.io.Writer, HtmlEscapeType, HtmlEscapeLevel)} with the following preconfigured values:
@param text the char[] to be escaped. @param offset the position in text at which the escape operation should start. @param len the number of characters in text that should be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs", "label": 1, "domain": "code", "token_count": 470, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0049", "text": "Fit spline curve for given x, y values Args: x: x-values y: y-values step: step size for interpolation val_min: minimum value of result val_max: maximum value of result kind: for scipy.interpolate.interp1d Specifies the kind of interpolation as a string (‘linear’, ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic’, ‘cubic’, ‘previous’, ‘next’, where ‘zero’, ‘slinear’, ‘quadratic’ and ‘cubic’ refer to a spline interpolation of zeroth, first, second or third order; ‘previous’ and ‘next’ simply return the previous or next value of the point) or as an integer specifying the order of the spline interpolator to use. Default is ‘linear’. **kwargs: additional parameters for interp1d Returns: pd.Series: fitted curve Examples: >>> x = pd.Series([1, 2, 3]) >>> y = pd.Series([np.exp(1), np.exp(2), np.exp(3)]) >>> r = spline_curve(x=x, y=y, step=.5, val_min=3, val_max=18, fill_value='extrapolate') >>> r.round(2).index.tolist() [1.0, 1.5, 2.0, 2.5, 3.0] >>> r.round(2).tolist() [3.0, 4.05, 7.39, 12.73, 18.0] >>> y_df = pd.DataFrame(dict(a=[np.exp(1), np.exp(2), np.exp(3)], b=[2, 3, 4])) >>> r_df = spline_curve(x=x, y=y_df, step=.5, val_min=3, fill_value='extrapolate') >>> r_df.round(2) a b 1.00 3.00 3.00 1.50 4.05 3.00 2.00 7.39 3.00 2.50 12.73 3.50 3.00 20.09 4.00", "label": 1, "domain": "code", "token_count": 439, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0050", "text": " Encode 'object' in canonical JSON form, as specified at http://wiki.laptop.org/go/Canonical_JSON . It's a restricted dialect of JSON in which keys are always lexically sorted, there is no whitespace, floats aren't allowed, and only quote and backslash get escaped. The result is encoded in UTF-8, and the resulting bits are passed to output_function (if provided), or joined into a string and returned. Note: This function should be called prior to computing the hash or signature of a JSON object in TUF. For example, generating a signature of a signing role object such as 'ROOT_SCHEMA' is required to ensure repeatable hashes are generated across different json module versions and platforms. Code elsewhere is free to dump JSON objects in any format they wish (e.g., utilizing indentation and single quotes around object keys). These objects are only required to be in \"canonical JSON\" format when their hashes or signatures are needed. >>> encode_canonical(\"\") '\"\"' >>> encode_canonical([1, 2, 3]) '[1,2,3]' >>> encode_canonical([]) '[]' >>> encode_canonical({\"A\": [99]}) '{\"A\":[99]}' >>> encode_canonical({\"x\" : 3, \"y\" : 2}) '{\"x\":3,\"y\":2}' object: The object to be encoded. output_function: The result will be passed as arguments to 'output_function' (e.g., output_function('result')). securesystemslib.exceptions.FormatError, if 'object' cannot be encoded or 'output_function' is not callable. The results are fed to 'output_function()' if 'output_function' is set. A string representing the 'object' encoded in canonical JSON form.", "label": 1, "domain": "code", "token_count": 374, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0051", "text": "Return the screen relative position of an element. @param {(string|Array|NodeList|HTMLCollection|Element)} element - The element. Note that it'll be passed to getElement to ensure there's only one. @return {(Object|boolean)} clientRect - Element's screen position or false if no element found. @return {number} clientRect.bottom - Y-coordinate, relative to the viewport origin, of the bottom of the rectangle box. @return {number} clientRect.height - Height of the rectangle box (This is identical to bottom minus top). @return {number} clientRect.left - X-coordinate, relative to the viewport origin, of the left of the rectangle box. @return {number} clientRect.right - X-coordinate, relative to the viewport origin, of the right of the rectangle box. @return {number} clientRect.top - Y-coordinate, relative to the viewport origin, of the top of the rectangle box. @return {number} clientRect.width - Width of the rectangle box (This is identical to right minus left). @example esnext import { setStyleProp, append, clientRect } from 'chirashi' setStyleProp([document.documentElement, document.body], { position: 'relative', margin: 0, padding: 0 }) append(document.body, '.poulp') const poulp = setStyleProp('.poulp', { display: 'block', position: 'absolute', top: 200, left: 240, width: 100, height: 100, background: 'red' }) clientRect(poulp) // returns: { bottom: 300, height: 100, left: 240, right: 0, top: 200, width: 100 } @example es5 Chirashi.setStyleProp([document.documentElement, document.body], { position: 'relative', margin: 0, padding: 0 }) Chirashi.append(document.body, '.poulp') var poulp = Chirashi.setStyleProp('.poulp', { display: 'block', position: 'absolute', top: 200, left: 240, width: 100, height: 100, background: 'red' }) Chirashi.clientRect(poulp) // returns: { bottom: 300, height: 100, left: 240, right: 0, top: 200, width: 100 }", "label": 1, "domain": "code", "token_count": 500, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0052", "text": "Sort a dictionary by key or value. The function relies on https://docs.python.org/3/library/collections.html#collections.OrderedDict . The dulicated are determined based on https://stackoverflow.com/questions/9835762/find-and-list-duplicates-in-a-list . Parameters ---------- d : dict Input dictionary by : ['key','value'], optional By what to sort the input dictionary allow_duplicates : bool, optional Flag to indicate if the duplicates are allowed. Returns ------- collections.OrderedDict Sorted dictionary. >>> sort_dict({2: 3, 1: 2, 3: 1}) OrderedDict([(1, 2), (2, 3), (3, 1)]) >>> sort_dict({2: 3, 1: 2, 3: 1}, by='value') OrderedDict([(3, 1), (1, 2), (2, 3)]) >>> sort_dict({'2': 3, '1': 2}, by='value') OrderedDict([('1', 2), ('2', 3)]) >>> sort_dict({2: 1, 1: 2, 3: 1}, by='value', allow_duplicates=False) Traceback (most recent call last): ... ValueError: There are duplicates in the values: {1} >>> sort_dict({1:1,2:3},by=True) Traceback (most recent call last): ... ValueError: by can be 'key' or 'value'.", "label": 1, "domain": "code", "token_count": 302, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0053", "text": "
Perform an XML 1.0 level 1 (only markup-significant chars) escape operation on a String input meant to be an XML attribute value, writing results to a Writer.
Level 1 means this method will only escape the five markup-significant characters which are predefined as Character Entity References in XML: <, >, &, " and '.
Besides, being an attribute value also \t, \n and \r will be escaped to avoid white-space normalization from removing line feeds (turning them into white spaces) during future parsing operations.
This method calls {@link #escapeXml10(String, Writer, XmlEscapeType, XmlEscapeLevel)} with the following preconfigured values:
@param text the String to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.5", "label": 1, "domain": "code", "token_count": 399, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0054", "text": "Examine an HSP and return information about where the query and subject match begins and ends. Return a dict with keys that allow the query to be displayed against the subject. The returned readStartInSubject and readEndInSubject indices are offsets into the subject. I.e., they indicate where in the subject the query falls. In the returned object, all indices are suitable for Python string slicing etc. We must be careful to convert from the 1-based offsets found in DIAMOND output properly. hsp['frame'] is a value from {-3, -2, -1, 1, 2, 3}. The sign indicates negative or positive sense (i.e., the direction of reading through the query to get the alignment). The frame value is the nucleotide match offset modulo 3, plus one (i.e., it tells us which of the 3 possible query reading frames was used in the match). NOTE: the returned readStartInSubject value may be negative. We consider the subject sequence to start at offset 0. So if the query string has sufficient additional nucleotides before the start of the alignment match, it may protrude to the left of the subject. Similarly, the returned readEndInSubject can be greater than the subjectEnd. @param hsp: an HSP in the form of a C{dict}, built from a DIAMOND record. All passed offsets are 1-based. @param queryLen: the length of the query sequence. @param diamondTask: The C{str} command-line matching algorithm that was run (either 'blastx' or 'blastp'). @return: A C{dict} with C{str} keys and C{int} offset values. Keys are readStart readEnd readStartInSubject readEndInSubject subjectStart subjectEnd The returned offset values are all zero-based.", "label": 1, "domain": "code", "token_count": 381, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0055", "text": "@class This object represents a decoration attached to a range of text. Annotations are added to a AnnotationModel which is attached to a TextModel.
@name orion.editor.Annotation @property {String} type The annotation type (for example, orion.annotation.error). @property {Number} start The start offset of the annotation in the text model. @property {Number} end The end offset of the annotation in the text model. @property {String} html The HTML displayed for the annotation. @property {String} title The text description for the annotation. @property {orion.editor.Style} style The style information for the annotation used in the annotations ruler and tooltips. @property {orion.editor.Style} overviewStyle The style information for the annotation used in the overview ruler. @property {orion.editor.Style} rangeStyle The style information for the annotation used in the text view to decorate a range of text. @property {orion.editor.Style} lineStyle The style information for the annotation used in the text view to decorate a line of text. Constructs a new folding annotation. @param {Number} start The start offset of the annotation in the text model. @param {Number} end The end offset of the annotation in the text model. @param {orion.editor.ProjectionTextModel} projectionModel The projection text model. @class This object represents a folding annotation. @name orion.editor.FoldingAnnotation", "label": 1, "domain": "code", "token_count": 334, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0056", "text": "
Perform a CSS String level 2 (basic set and all non-ASCII chars) escape operation on a String input, writing results to a Writer.
Level 2 means this method will escape:
The CSS String basic escape set:
The Backslash Escapes: \" (U+0022) and \' (U+0027).
Two ranges of non-displayable, control characters: U+0000 to U+001F and U+007F to U+009F.
All non ASCII characters.
This escape will be performed by using Backslash escapes whenever possible. For escaped characters that do not have an associated Backslash, default to \FF Hexadecimal Escapes.
This method calls {@link #escapeCssString(String, Writer, CssStringEscapeType, CssStringEscapeLevel)} with the following preconfigured values:
@param text the String to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 461, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0057", "text": "Sets the charset used for decoding byte sequences to character sequences when reading template files in a locale for which no explicit encoding was specified via {@link Configuration#setEncoding(Locale, String)}. Note that by default there is no locale specified for any locale, so the default encoding is always in effect.
Defaults to the default system encoding, which can change from one server to another, so you should always set this setting. If you don't know what charset your should chose, {@code \"UTF-8\"} is usually a good choice.
Note that individual templates may specify their own charset by starting with <#ftl encoding=\"...\"> You can specify a direct value. For example:
.defaultEncoding(\"UTF-8\");
You can also specify one or several property keys. For example:
The properties are not immediately evaluated. The evaluation will be done when the {@link #build()} method is called. If you provide several property keys, evaluation will be done on the first key and if the property exists (see {@link EnvironmentBuilder}), its value is used. If the first property doesn't exist in properties, then it tries with the second one and so on. @param encodings one value, or one or several property keys @return this instance for fluent chaining", "label": 1, "domain": "code", "token_count": 305, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0058", "text": "Routine to download NASA CDAWeb CDF data. This routine is intended to be used by pysat instrument modules supporting a particular NASA CDAWeb dataset. Parameters ----------- supported_tags : dict dict of dicts. Keys are supported tag names for download. Value is a dict with 'dir', 'remote_fname', 'local_fname'. Inteded to be pre-set with functools.partial then assigned to new instrument code. date_array : array_like Array of datetimes to download data for. Provided by pysat. tag : (str or NoneType) tag or None (default=None) sat_id : (str or NoneType) satellite id or None (default=None) data_path : (string or NoneType) Path to data directory. If None is specified, the value previously set in Instrument.files.data_path is used. (default=None) user : (string or NoneType) Username to be passed along to resource with relevant data. (default=None) password : (string or NoneType) User password to be passed along to resource with relevant data. (default=None) fake_daily_files_from_monthly : bool Some CDAWeb instrument data files are stored by month.This flag, when true, accomodates this reality with user feedback on a monthly time frame. Returns -------- Void : (NoneType) Downloads data to disk. Examples -------- :: # download support added to cnofs_vefi.py using code below rn = '{year:4d}/cnofs_vefi_bfield_1sec_{year:4d}{month:02d}{day:02d}_v05.cdf' ln = 'cnofs_vefi_bfield_1sec_{year:4d}{month:02d}{day:02d}_v05.cdf' dc_b_tag = {'dir':'/pub/data/cnofs/vefi/bfield_1sec', 'remote_fname':rn, 'local_fname':ln} supported_tags = {'dc_b':dc_b_tag} download = functools.partial(nasa_cdaweb_methods.download, supported_tags=supported_tags)", "label": 1, "domain": "code", "token_count": 417, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0059", "text": "Play sounds using Web Audio in the browser. The WebAudioPlugin is currently the default plugin, and will be used anywhere that it is supported. To change plugin priority, check out the Sound API {{#crossLink \"Sound/registerPlugins\"}}{{/crossLink}} method.
Known Browser and OS issues for Web Audio
Firefox 25
mp3 audio files do not load properly on all windows machines, reported here. For this reason it is recommended to pass another FireFox-supported type (i.e. ogg) as the default extension, until this bug is resolved
Webkit (Chrome and Safari)
AudioNode.disconnect does not always seem to work. This can cause the file size to grow over time if you are playing a lot of audio files.
iOS 6 limitations
Sound is initially muted and will only unmute through play being called inside a user initiated event (touch/click). Please read the mobile playback notes in the the {{#crossLink \"Sound\"}}{{/crossLink}} class for a full overview of the limitations, and how to get around them.
A bug exists that will distort un-cached audio when a video element is present in the DOM. You can avoid this bug by ensuring the audio and video audio share the same sample rate.
Definiert das Element für das Jahr einer historischen Ära.
Dieses Element ist auf alle chronologischen Typen anwendbar, die das Element {@link PlainDate#COMPONENT} registriert haben.
Beispiel: Große Teile von Frankreich haben den Osterstil als Neujahrsregel verwendet, so daß das Jahr 1564 zum Datum 1564-04-01 begann und zum Datum 1565-04-21 endete. Hier gibt es keine eindeutige Zuordnung von Datumsangaben im April. Wenn das Datum etwa auf den 10. April 1564 gesetzt werden soll, kann das eindeutig mit Hilfe einer spezifischen Jahresdefinition ausgedrückt werden (Standardkalenderjahre 1564 oder 1565 möglich).
@param yearDefinition determines how to display or interprete a historic year @return year-of-era-related element @since 3.19/4.15 @see PlainDate @see net.time4j.PlainTimestamp", "label": 1, "domain": "code", "token_count": 402, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0061", "text": "Raises ValidationException if value can't be used as a regular expression string. Returns the value argument as a regex object. If you want to check if a string matches a regular expression, call validateRegex(). * value (str): The value being validated as a regular expression string. * regex (str, regex): The regular expression to match the value against. * flags (int): Identical to the flags argument in re.compile(). Pass re.VERBOSE et al here. * blank (bool): If True, a blank string will be accepted. Defaults to False. * strip (bool, str, None): If None, whitespace is stripped from value. If a str, the characters in it are stripped from value. If False, nothing is stripped. * allowlistRegexes (Sequence, None): A sequence of regex str that will explicitly pass validation, even if they aren't numbers. * blocklistRegexes (Sequence, None): A sequence of regex str or (regex_str, response_str) tuples that, if matched, will explicitly fail validation. * excMsg (str): A custom message to use in the raised ValidationException. >>> import pysimplevalidate as pysv >>> pysv.validateRegexStr('(cat)|(dog)') re.compile('(cat)|(dog)') >>> pysv.validateRegexStr('\"(.*?)\"') re.compile('\"(.*?)\"') >>> pysv.validateRegexStr('\"(.*?\"') Traceback (most recent call last): ... pysimplevalidate.ValidationException: '\"(.*?\"' is not a valid regular expression: missing ), unterminated subpattern at position 1", "label": 1, "domain": "code", "token_count": 327, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0062", "text": "Triggers restore of the state of the partition using the specified restore partition description. Restores the state of a of the stateful persisted partition using the specified backup point. In case the partition is already being periodically backed up, then by default the backup point is looked for in the storage specified in backup policy. One can also override the same by specifying the backup storage details as part of the restore partition description in body. Once the restore is initiated, its progress can be tracked using the GetRestoreProgress operation. In case, the operation times out, specify a greater restore timeout value in the query parameter. @param partition_id The identity of the partition. @param restore_partition_description [RestorePartitionDescription] Describes the parameters to restore the partition. @param restore_timeout [Integer] Specifies the maximum amount of time to wait, in minutes, for the restore operation to complete. Post that, the operation returns back with timeout error. However, in certain corner cases it could be that the restore operation goes through even though it completes with timeout. In case of timeout error, its recommended to invoke this operation again with a greater timeout value. the default value for the same is 10 minutes. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.", "label": 1, "domain": "code", "token_count": 311, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0063", "text": "function takes the ipAddress of a specific host and issues a RESTFUL call to get the device and interface that the target host is currently connected to. Note: Although intended to return a single location, Multiple locations may be returned for a single host due to a partially discovered network or misconfigured environment. :param host_ipaddress: str value valid IPv4 IP address :param auth: requests auth object #usually auth.creds from auth pyhpeimc.auth.class :param url: base url of IMC RS interface #usually auth.url from pyhpeimc.auth.authclass :return: list of dictionaries where each element of the list represents the location of the target host :rtype: list >>> from pyhpeimc.auth import * >>> from pyhpeimc.plat.termaccess import * >>> auth = IMCAuth(\"http://\", \"10.101.0.203\", \"8080\", \"admin\", \"admin\") >>> found_device = get_real_time_locate('10.101.0.51', auth.creds, auth.url) >>> assert type(found_device) is list >>> assert 'deviceId' in found_device[0] >>> assert 'deviceId' in found_device[0] >>> assert 'deviceId' in found_device[0] >>> assert 'deviceId' in found_device[0] >>> no_device = get_real_time_locate('192.168.254.254', auth.creds, auth.url) >>> assert type(no_device) is dict >>> assert len(no_device) == 0", "label": 1, "domain": "code", "token_count": 311, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0064", "text": "Add an option. Options are parsed via OptionParser so view it for additional usage documentation. A block may optionally be passed to handle the option, otherwise the _options_ struct seen below contains the results of this option. This handles common formats such as: -h, --help options.help # => bool --[no-]feature options.feature # => bool --large-switch options.large_switch # => bool --file FILE options.file # => file passed --list WORDS options.list # => array --date [DATE] options.date # => date or nil when optional argument not set === Examples command :something do |c| c.option '--recursive', 'Do something recursively' c.option '--file FILE', 'Specify a file' c.option('--info', 'Display info') { puts \"handle with block\" } c.option '--[no-]feature', 'With or without feature' c.option '--list FILES', Array, 'List the files specified' c.when_called do |args, options| do_something_recursively if options.recursive do_something_with_file options.file if options.file end end === Help Formatters This method also parses the arguments passed in order to determine which were switches, and which were descriptions for the option which can later be used within help formatters using option[:switches] and option[:description]. === Input Parsing Since Commander utilizes OptionParser you can pre-parse and evaluate option arguments. Simply require 'optparse/time', or 'optparse/date', as these objects must respond to #parse. c.option '--time TIME', Time c.option '--date [DATE]', Date", "label": 1, "domain": "code", "token_count": 322, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0065", "text": "/* Reduction on the GPU. We basically use the technique described in section 37.2 of this article: http://http.developer.nvidia.com/GPUGems/gpugems_ch37.html The algorithm: We basically start with a texture (A) of size (N)x(N). Then we create an FBO (B) of size (N/2)x(N/2). Then we render to FBO (B), and every fragment will sample four texels from (A). And by doing so, we will have performed a reduction of 2x2 sized blocks. Next, we create an FBO (C) of size (N/4)x(N/4), and, like above, we to render (C) to while sampling from (B), and so on. We keep going until we are left with an FBO of size 1x1. And that single pixel in that FBO contains our desired result. Note that we are using a texture of type RGBA8 in the below implementation. This means that we can't really use '+' as an operator for the reduction, since it will easily overflow. This can be solved by switching to a texture of type RGBA32F. But we are not using that, because it requires an extensions that is not always available. So to maximize compability, we use RGBA8 in this demo. So if you want to use the below reduce implementation in your own code, you will probably have to switch to RGBA32F. And to simplify things, we will be making the assumption that data.length will be one the numbers 1x1, 2x2, 4x4, 8x8, 16x16,...", "label": 1, "domain": "code", "token_count": 349, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0066", "text": "Raises ValidationException if value is not an IPv4 or IPv6 address. Returns the value argument. * value (str): The value being validated as an IP address. * blank (bool): If True, a blank string will be accepted. Defaults to False. * strip (bool, str, None): If None, whitespace is stripped from value. If a str, the characters in it are stripped from value. If False, nothing is stripped. * allowlistRegexes (Sequence, None): A sequence of regex str that will explicitly pass validation, even if they aren't numbers. * blocklistRegexes (Sequence, None): A sequence of regex str or (regex_str, response_str) tuples that, if matched, will explicitly fail validation. * excMsg (str): A custom message to use in the raised ValidationException. >>> import pysimplevalidate as pysv >>> pysv.validateIP('127.0.0.1') '127.0.0.1' >>> pysv.validateIP('255.255.255.255') '255.255.255.255' >>> pysv.validateIP('256.256.256.256') Traceback (most recent call last): pysimplevalidate.ValidationException: '256.256.256.256' is not a valid IP address. >>> pysv.validateIP('1:2:3:4:5:6:7:8') '1:2:3:4:5:6:7:8' >>> pysv.validateIP('1::8') '1::8' >>> pysv.validateIP('fe80::7:8%eth0') 'fe80::7:8%eth0' >>> pysv.validateIP('::255.255.255.255') '::255.255.255.255'", "label": 1, "domain": "code", "token_count": 373, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0067", "text": "Calculates probability of gene i regulating gene j with genotype data assisted method, with the recommended combination of multiple tests. dg: numpy.ndarray(nt,ns,dtype=gtype(='u1' by default)) Genotype data. Entry dg[i,j] is genotype i's value for sample j. Each value must be among 0,1,...,na. Genotype i must be best (and significant) eQTL of gene i (in dt). dt: numpy.ndarray(nt,ns,dtype=ftype(='=f4' by default)) Gene expression data for A Entry dt[i,j] is gene i's expression level for sample j. Genotype i (in dg) must be best (and significant) eQTL of gene i. dt2:numpy.ndarray(nt2,ns,dtype=ftype(='=f4' by default)) Gene expression data for B. dt2 has the same format as dt, and can be identical with, different from, or a superset of dt. When dt2 is a superset of (or identical with) dt, dt2 must be arranged to be identical with dt at its upper submatrix, i.e. dt2[:nt,:]=dt, and set parameter nodiag = 1. name: actual C function name to call na: Number of alleles the species have. It determintes the maximum number of values each genotype can take. When unspecified, it is automatically determined as the maximum of dg. nodiag: skip diagonal regulations, i.e. regulation A->B for A=B. This should be set to True when A is a subset of B and aligned correspondingly. memlimit: The approximate memory usage limit in bytes for the library. For datasets require a larger memory, calculation will be split into smaller chunks. If the memory limit is smaller than minimum required, calculation can fail with an error message. memlimit=0 defaults to unlimited memory usage. Return: dictionary with following keys: ret:0 iff execution succeeded. p: numpy.ndarray((nt,nt2),dtype=ftype(='=f4' by default)). Probability function from for recommended combination of multiple tests. For more information on tests, see paper. ftype and gtype can be found in auto.py.", "label": 1, "domain": "code", "token_count": 462, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0068", "text": "Devuelve textos similares al ejemplo dentro de los textos entrenados. Nota: Usa la distancia de coseno del vector de features TF-IDF Args: example (str): Se espera un id de texto o un texto a partir del cual se buscaran otros textos similares. max_similars (int, optional): Cantidad de textos similares a devolver. similarity_cutoff (float, optional): Valor umbral de similaridad para definir que dos textos son similares entre si. term_diff_max_rank (int, optional): Este valor sirve para controlar el umbral con el que los terminos son considerados importantes a la hora de recuperar textos (no afecta el funcionamiento de que textos se consideran cercanos, solo la cantidad de terminos que se devuelven en best_words). filter_list (list): Lista de ids de textos en la cual buscar textos similares. term_diff_cutoff (float): Deprecado. Se quitara en el futuro. Returns: tuple (list, list, list): (text_ids, sorted_dist, best_words) text_ids (list of str): Devuelve los ids de los textos sugeridos. sorted_dist (list of float): Devuelve la distancia entre las opciones sugeridas y el ejemplo dado como entrada. best_words (list of list): Para cada sugerencia devuelve las palabras mas relevantes que se usaron para seleccionar esa sugerencia.", "label": 1, "domain": "code", "token_count": 301, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0069", "text": "Gets the list of replicas deployed on a Service Fabric node. Gets the list containing the information about replicas deployed on a Service Fabric node. The information include partition ID, replica ID, status of the replica, name of the service, name of the service type, and other information. Use PartitionId or ServiceManifestName query parameters to return information about the deployed replicas matching the specified values for those parameters. @param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the application name is \"fabric:/myapp/app1\", the application identity would be \"myapp~app1\" in 6.0+ and \"myapp/app1\" in previous versions. @param partition_id The identity of the partition. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 310, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0070", "text": "Parses a date formatted as a string according to the client's user preferences and calendar using the time zone of the client and returns the corresponding date object. It returns the date to the successCB callback with a properties object as a parameter. If there is an error parsing the date string, then the errorCB callback is invoked. The defaults are: formatLength=\"short\" and selector=\"date and time\" @param {String} dateString @param {Function} successCB @param {Function} errorCB @param {Object} options {optional} formatLength {String}: 'short', 'medium', 'long', or 'full' selector {String}: 'date', 'time', or 'date and time' @return Object.year {Number}: The four digit year Object.month {Number}: The month from (0 - 11) Object.day {Number}: The day from (1 - 31) Object.hour {Number}: The hour from (0 - 23) Object.minute {Number}: The minute from (0 - 59) Object.second {Number}: The second from (0 - 59) Object.millisecond {Number}: The milliseconds (from 0 - 999), not available on all platforms @error GlobalizationError.PARSING_ERROR Example globalization.stringToDate('4/11/2011', function (date) { alert('Month:' + date.month + '\\n' + 'Day:' + date.day + '\\n' + 'Year:' + date.year + '\\n');}, function (errorCode) {alert(errorCode);}, {selector:'date'});", "label": 1, "domain": "code", "token_count": 324, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0071", "text": "Fill rop with word data from op. The parameters specify the format of the data produced. Each word will be size bytes and order can be 1 for most significant word first or -1 for least significant first. Within each word endian can be 1 for most significant byte first, -1 for least significant first, or 0 for the native endianness of the host CPU. The most significant nails bits of each word are unused and set to zero, this can be 0 to produce full words. The number of words produced is written to *countp, or countp can be NULL to discard the count. rop must have enough space for the data, or if rop is NULL then a result array of the necessary size is allocated using the current GMP allocation function (see Custom Allocation). In either case the return value is the destination used, either rop or the allocated block. If op is non-zero then the most significant word produced will be non-zero. If op is zero then the count returned will be zero and nothing written to rop. If rop is NULL in this case, no block is allocated, just NULL is returned. The sign of op is ignored, just the absolute value is exported. An application can use mpz_sgn to get the sign and handle it as desired. (see Integer Comparisons) There are no data alignment restrictions on rop, any address is allowed. When an application is allocating space itself the required size can be determined with a calculation like the following. Since mpz_sizeinbase always returns at least 1, count here will be at least one, which avoids any portability problems with malloc(0), though if z is zero no space at all is actually needed (or written).
", "label": 1, "domain": "code", "token_count": 393, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0072", "text": "This API will restart some or all replicas or instances of the specified partition. This API is useful for testing failover. If used to target a stateless service partition, RestartPartitionMode must be AllReplicasOrInstances. Call the GetPartitionRestartProgress API using the same OperationId to get the progress. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the service name is \"fabric:/myapp/app1/svc1\", the service identity would be \"myapp~app1~svc1\" in 6.0+ and \"myapp/app1/svc1\" in previous versions. @param partition_id The identity of the partition. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param restart_partition_mode [RestartPartitionMode] Describe which partitions to restart. Possible values include: 'Invalid', 'AllReplicasOrInstances', 'OnlyActiveSecondaries' @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.", "label": 1, "domain": "code", "token_count": 305, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0073", "text": "@example Request syntax with placeholder values multipart_upload_part.upload({ body: source_file, content_length: 1, content_md5: \"ContentMD5\", sse_customer_algorithm: \"SSECustomerAlgorithm\", sse_customer_key: \"SSECustomerKey\", sse_customer_key_md5: \"SSECustomerKeyMD5\", request_payer: \"requester\", # accepts requester }) @param [Hash] options ({}) @option options [String, IO] :body Object data. @option options [Integer] :content_length Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. @option options [String] :content_md5 The base64-encoded 128-bit MD5 digest of the part data. @option options [String] :sse_customer_algorithm Specifies the algorithm to use to when encrypting the object (e.g., AES256). @option options [String] :sse_customer_key Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm header. This must be the same encryption key specified in the initiate multipart upload request. @option options [String] :sse_customer_key_md5 Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. @option options [String] :request_payer Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html @return [Types::UploadPartOutput]", "label": 1, "domain": "code", "token_count": 411, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0074", "text": "A {@link Parser} that takes as input the tokens returned by {@code tokenizer} delimited by {@code delim}, and runs {@code this} to parse the tokens. A common misunderstanding is that {@code tokenizer} has to be a parser of {@link Token}. It doesn't need to be because {@code Terminals} already takes care of wrapping your logical token objects into physical {@code Token} with correct source location information tacked on for free. Your token object can literally be anything, as long as your token level parser can recognize it later.
The following example uses {@code Terminals.tokenizer()}:
In both examples, it's important to make sure the delimiter scanner can accept empty string (either through {@link #optional} or {@link #skipMany}), unless adjacent operator characters shouldn't be parsed as separate operators. i.e. \"((\" as two left parenthesis operators.
{@code this} must be a token level parser.", "label": 1, "domain": "code", "token_count": 324, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0075", "text": "A formatter function to be used in a complex binding inside an XML template view in order to interpret OData V4 annotations. It knows about the following dynamic expressions:
\"14.5.2 Expression edm:AnnotationPath\"
\"14.5.11 Expression edm:NavigationPropertyPath\"
\"14.5.12 Expression edm:Path\"
\"14.5.13 Expression edm:PropertyPath\"
It returns a binding expression for a navigation path in an OData model, starting at an entity. Currently supports navigation properties. Term casts and annotations of navigation properties terminate the navigation path. Examples:
@param {sap.ui.core.util.XMLPreprocessor.IContext|sap.ui.model.Context} oInterface the callback interface related to the current formatter call @param {any} [vRawValue] the raw value from the meta model, e.g. {AnnotationPath : \"ToSupplier/@com.sap.vocabularies.Communication.v1.Address\"} or {AnnotationPath : \"@com.sap.vocabularies.UI.v1.FieldGroup#Dimensions\"}; embedded within an entity set or entity type;
if this function is used as formatter the value is provided by the framework
if this function is called directly, provide the parameter only if it is already calculated
if the parameter is omitted, it is calculated automatically through oInterface.getObject(\"\")
@returns {string} the resulting string value to write into the processed XML, e.g. \"{ToSupplier}\" or \"{}\" (in case no navigation is needed); returns \"\" in case the navigation path cannot be determined (this is treated as falsy in template:if statements!) @public", "label": 1, "domain": "code", "token_count": 464, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0076", "text": "
Perform am URI path segment escape operation on a Reader input using UTF-8 as encoding, writing results to a Writer.
The following are the only allowed chars in an URI path segment (will not be escaped):
A-Z a-z 0-9
- . _ ~
! $ & ' ( ) * + , ; =
: @
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
@param reader the Reader reading the text to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 302, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0077", "text": "/*[deutsch]
Formatiert die kanonische Form dieses Intervalls im angegebenen reduzierten ISO-8601-Stil.
Der Begriff "reduziert" bedeutet, daß höherwertige Elemente wie das Jahr in der Endkomponente weggelassen werden, wenn ihr Wert gleich dem Wert der Startkomponente ist. Außerdem wird in der Endkomponente der Offset für begrenzte Intervalle immer weggelassen. Beispiel:
@param dateStyle iso-compatible date style @param decimalStyle iso-compatible decimal style @param precision controls the precision of output format with constant length @param offset timezone offset @param infinityStyle controlling the format of infinite boundaries @return String @throws IllegalStateException if there is no canonical form or given infinity style prevents infinite intervals @see #toCanonical() @since 4.18", "label": 1, "domain": "code", "token_count": 338, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0078", "text": "Verifies that the two supplied values are the same value using the \"SameValue\" comparison. Note that this doesn't behave as the strict equality operator, but rather as a shim of ES6's [Object.is]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is}. Differences are that 0 and -0 aren't the same value and, finally, NaN is equal to itself. See also {@link module:lamb.is|is} for a curried version building a predicate and {@link module:lamb.areSVZ|areSVZ} and {@link module:lamb.isSVZ|isSVZ} to perform a \"SameValueZero\" comparison. @example var testObject = {}; _.areSame({}, testObject) // => false _.areSame(testObject, testObject) // => true _.areSame(\"foo\", \"foo\") // => true _.areSame(0, -0) // => false _.areSame(0 / 0, NaN) // => true @memberof module:lamb @category Logic @see {@link module:lamb.is|is} @see {@link module:lamb.areSVZ|areSVZ}, {@link module:lamb.isSVZ|isSVZ} @see [SameValue comparison]{@link https://www.ecma-international.org/ecma-262/7.0/#sec-samevalue} @see [SameValueZero comparison]{@link https://www.ecma-international.org/ecma-262/7.0/#sec-samevaluezero} @since 0.50.0 @param {*} a @param {*} b @returns {Boolean}", "label": 1, "domain": "code", "token_count": 365, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0079", "text": "Returns an implementation of {@link UserAgentStringParser} which checks at regular intervals for new versions of UAS data (also known as database). When newer data available, it automatically loads and updates it.
At initialization time the returned parser will be loaded with the UAS data of this module (the shipped one within the uadetector-resources JAR) and tries to update it. The initialization is started only when this method is called the first time.
The update of the data store runs as background task. With this feature we try to reduce the initialization time of this UserAgentStringParser, because a network connection is involved and the remote system can be not available or slow.
The static class definition {@code OnlineUpdatingParserHolder} within this factory class is not initialized until the JVM determines that {@code OnlineUpdatingParserHolder} must be executed. The static class {@code OnlineUpdatingParserHolder} is only executed when the static method {@code getOnlineUserAgentStringParser} is invoked on the class {@code UADetectorServiceFactory}, and the first time this happens the JVM will load and initialize the {@code OnlineUpdatingParserHolder} class.
If during the operation the Internet connection gets lost, then this instance continues to work properly (and under correct log level settings you will get an corresponding log messages). @param dataUrl @param versionUrl @return an user agent string parser with updating service", "label": 1, "domain": "code", "token_count": 323, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0080", "text": "Bind a parameter to the query. A parameter is denoted in the query string passed to create by $i, where i is the rank of the parameter, beginning with 1. The parameters are set consecutively by calling this method bind. The ith variable is set by the ith call to the bind method. If any of the $i are not set by a call to bind at the point execute is called, QueryParameterCountInvalidException is thrown. The parameters must be objects, and the result is an Object. Objects must be used instead of primitive types (Integer instead of int) for passing the parameters.
If the parameter is of the wrong type, QueryParameterTypeInvalidException is thrown. After executing a query, the parameter list is reset. @param parameter A value to be substituted for a query parameter. @exception org.odmg.QueryParameterCountInvalidException The number of calls to bind has exceeded the number of parameters in the query. @exception org.odmg.QueryParameterTypeInvalidException The type of the parameter does not correspond with the type of the parameter in the query.", "label": 1, "domain": "code", "token_count": 311, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0081", "text": "Helper for computing an initial position in {@link #loadInitial(LoadInitialParams, LoadInitialCallback)} when total data set size can be computed ahead of loading.
The value computed by this function will do bounds checking, page alignment, and positioning based on initial load size requested.
Example usage in a PositionalDataSource subclass:
class ItemDataSource extends PositionalDataSource<Item> { private int computeCount() { // actual count code here } private List<Item> loadRangeInternal(int startPosition, int loadCount) { // actual load code here } {@literal @}Override public void loadInitial({@literal @}NonNull LoadInitialParams params, {@literal @}NonNull LoadInitialCallback<Item> callback) { int totalCount = computeCount(); int position = computeInitialLoadPosition(params, totalCount); int loadSize = computeInitialLoadSize(params, position, totalCount); callback.onResult(loadRangeInternal(position, loadSize), position, totalCount); } {@literal @}Override public void loadRange({@literal @}NonNull LoadRangeParams params, {@literal @}NonNull LoadRangeCallback<Item> callback) { callback.onResult(loadRangeInternal(params.startPosition, params.loadSize)); } }
@param params Params passed to {@link #loadInitial(LoadInitialParams, LoadInitialCallback)}, including page size, and requested start/loadSize. @param totalCount Total size of the data set. @return Position to start loading at. @see #computeInitialLoadSize(LoadInitialParams, int, int)", "label": 1, "domain": "code", "token_count": 314, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0082", "text": "A {@link Parser} that runs {@code this} and then runs {@code op} for 0 or more times greedily. The {@link Function} objects returned from {@code op} are applied from left to right to the return value of p.
This is the preferred API to avoid {@code StackOverflowError} in left-recursive parsers. For example, to parse array types in the form of \"T[]\" or \"T[][]\", the following left recursive grammar will fail:
A not-so-obvious example, is to parse the {@code expr ? a : b} ternary operator. It too is a left recursive grammar. And un-intuitively it can also be thought as a postfix operator. Basically, we can parse \"? a : b\" as a whole into a unary operator that accepts the condition expression as input and outputs the full ternary expression:
{@link OperatorTable} also handles left recursion transparently.
{@code p.postfix(op)} is equivalent to {@code p op*} in EBNF.", "label": 1, "domain": "code", "token_count": 398, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0083", "text": "Adds a new attribute to the dictionary. @name module:back4app-entity/models/attributes.AttributeDictionary~_addAttribute @function @param {!module:back4app-entity/models/attributes.AttributeDictionary} attributeDictionary It is the attribute dictionary to which the attribute will be added. @param {!module:back4app-entity/models/attributes.Attribute} attribute This is the attribute to be added. It can be passed as a {@link module:back4app-entity/models/attributes.Attribute} instance. @param {?string} [name] This is the name of the attribute. @private @example var attributeDictionary = new AttributeDictionary(); _addAttribute( attributeDictionary, new StringAttribute('attribute'), 'attribute' ); Adds a new attribute to the dictionary. @name module:back4app-entity/models/attributes.AttributeDictionary~_addAttribute @function @param {!module:back4app-entity/models/attributes.AttributeDictionary} attributeDictionary It is the attribute dictionary to which the attribute will be added. @param {!Object} attribute This is the attribute to be added. It can be passed as an Object, as specified in {@link module:back4app-entity/models/attributes.Attribute}. @param {!string} [attribute.name] It is the name of the attribute. It is optional if it is passed as an argument in the function. @param {!string} [attribute.type='Object'] It is the type of the attribute. It is optional and if not passed it will assume 'Object' as the default value. @param {!string} [attribute.multiplicity='1'] It is the multiplicity of the attribute. It is optional and if not passed it will assume '1' as the default value. @param {?(boolean|number|string|Object|function)} [attribute.default] It is the default expression of the attribute. @param {?string} [name] This is the name of the attribute. @private @example var attributeDictionary = new AttributeDictionary(); _addAttribute(attributeDictionary, {}, 'attribute');", "label": 1, "domain": "code", "token_count": 413, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0084", "text": "
Perform am URI query parameter (name or value) escape operation on a char[] input.
The following are the only allowed chars in an URI query parameter (will not be escaped):
A-Z a-z 0-9
- . _ ~
! $ ' ( ) * , ;
: @
/ ?
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
@param text the char[] to be escaped. @param offset the position in text at which the escape operation should start. @param len the number of characters in text that should be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @param encoding the encoding to be used for escaping. @throws IOException if an input/output exception occurs", "label": 1, "domain": "code", "token_count": 332, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0085", "text": "Returns a copy of given query options where \"$expand\" and \"$select\" are replaced by the intersection with the given (navigation) property paths. @param {object} mCacheQueryOptions A map of query options as returned by {@link sap.ui.model.odata.v4.ODataModel#buildQueryOptions} @param {string[]} aPaths The \"14.5.11 Expression edm:NavigationPropertyPath\" or \"14.5.13 Expression edm:PropertyPath\" strings describing which properties need to be loaded because they may have changed due to side effects of a previous update; must not be empty @param {function} fnFetchMetadata Function which fetches metadata for a given meta path @param {string} sRootMetaPath The meta path for the cache root's type, for example \"/SalesOrderList/SO_2_BP\" or \"/Artists/foo.EditAction/@$ui5.overload/0/$ReturnType/$Type\", such that an OData simple identifier may be appended @param {object} mNavigationPropertyPaths Hash set of collection-valued navigation property meta paths (relative to the cache's root, that is without the root meta path prefix) which need to be refreshed, maps string to true; is modified @param {boolean} [sPrefix=\"\"] Optional prefix for navigation property meta paths used during recursion @returns {object} The updated query options or null if no request is needed @throws {Error} If a path string is empty or the intersection requires a $expand of a collection-valued navigation property", "label": 1, "domain": "code", "token_count": 321, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0086", "text": "Find vlans by all search parameters :param number: Filter by vlan number column :param name: Filter by vlan name column :param iexact: Filter by name will be exact? :param environment: Filter by environment ID related :param net_type: Filter by network_type ID related :param network: Filter by each octs in network :param ip_version: Get only version (0:ipv4, 1:ipv6, 2:all) :param subnet: Filter by octs will search by subnets? :param acl: Filter by vlan acl column :param pagination: Class with all data needed to paginate :return: Following dictionary: :: {'vlan': {'id': < id_vlan >, 'nome': < nome_vlan >, 'num_vlan': < num_vlan >, 'id_ambiente': < id_ambiente >, 'descricao': < descricao >, 'acl_file_name': < acl_file_name >, 'acl_valida': < acl_valida >, 'acl_file_name_v6': < acl_file_name_v6 >, 'acl_valida_v6': < acl_valida_v6 >, 'ativada': < ativada >, 'ambiente_name': < divisao_dc-ambiente_logico-grupo_l3 > 'redeipv4': [ { all networkipv4 related } ], 'redeipv6': [ { all networkipv6 related } ] }, 'total': {< total_registros >} } :raise InvalidParameterError: Some parameter was invalid. :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to generate the XML response.", "label": 1, "domain": "code", "token_count": 341, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0087", "text": "Iterates over attributes and removes it from each element of elements. @param {(string|Array|NodeList|HTMLCollection|Element)} elements - The iterable, selector or elements. @param {...string} attributes - Names of attributes to remove. @return {Array} iterable - The getElements' result for chaining. @example //esnext import { createElement, append, removeAttr } from 'chirashi' const maki = createElement('.maki') append(document.body, maki) append(maki, ['.salmon[data-fish=\"salmon\"]', '.cheese[data-cheese=\"cream\"]']) //returns:
Perform a (configurable) XML 1.1 escape operation on a char[] input meant to be an XML attribute value.
This method will perform an escape operation according to the specified {@link org.unbescape.xml.XmlEscapeType} and {@link org.unbescape.xml.XmlEscapeLevel} argument values.
Besides, being an attribute value also \t, \n and \r will be escaped to avoid white-space normalization from removing line feeds (turning them into white spaces) during future parsing operations.
All other char[]-based escapeXml11*(...) methods call this one with preconfigured type and level values.
This method is thread-safe.
@param text the char[] to be escaped. @param offset the position in text at which the escape operation should start. @param len the number of characters in text that should be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @param type the type of escape operation to be performed, see {@link org.unbescape.xml.XmlEscapeType}. @param level the escape level to be applied, see {@link org.unbescape.xml.XmlEscapeLevel}. @throws IOException if an input/output exception occurs @since 1.1.5", "label": 1, "domain": "code", "token_count": 381, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0089", "text": "Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxGraphView Extends to implement a view for a graph. This class is in charge of computing the absolute coordinates for the relative child geometries, the points for perimeters and edge styles and keeping them cached in for faster retrieval. The states are updated whenever the model or the view state (translate, scale) changes. The scale and translate are honoured in the bounds. Event: mxEvent.UNDO Fires after the root was changed in . The edit property contains the which contains the . Event: mxEvent.SCALE_AND_TRANSLATE Fires after the scale and translate have been changed in . The scale, previousScale, translate and previousTranslate properties contain the new and previous scale and translate, respectively. Event: mxEvent.SCALE Fires after the scale was changed in . The scale and previousScale properties contain the new and previous scale. Event: mxEvent.TRANSLATE Fires after the translate was changed in . The translate and previousTranslate properties contain the new and previous value for translate. Event: mxEvent.DOWN and mxEvent.UP Fire if the current root is changed by executing an . The event name depends on the location of the root in the cell hierarchy with respect to the current root. The root and previous properties contain the new and previous root, respectively. Constructor: mxGraphView Constructs a new view for the given . Parameters: graph - Reference to the enclosing .", "label": 1, "domain": "code", "token_count": 414, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0090", "text": "Gets the list containing the information about service types from the applications deployed on a node in a Service Fabric cluster. Gets the list containing the information about service types from the applications deployed on a node in a Service Fabric cluster. The response includes the name of the service type, its registration status, the code package that registered it and activation ID of the service package. @param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the application name is \"fabric:/myapp/app1\", the application identity would be \"myapp~app1\" in 6.0+ and \"myapp/app1\" in previous versions. @param service_manifest_name [String] The name of the service manifest to filter the list of deployed service type information. If specified, the response will only contain the information about service types that are defined in this service manifest. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.", "label": 1, "domain": "code", "token_count": 303, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0091", "text": "Insere um novo ambiente e retorna o seu identificador. :param id_grupo_l3: Identificador do grupo layer 3. :param id_ambiente_logico: Identificador do ambiente lógico. :param id_divisao: Identificador da divisão data center. :param id_filter: Filter identifier. :param link: Link :param acl_path: Path where the ACL will be stored :param ipv4_template: Template that will be used in Ipv6 :param ipv6_template: Template that will be used in Ipv4 :param min_num_vlan_1: Min 1 num vlan valid for this environment :param max_num_vlan_1: Max 1 num vlan valid for this environment :param min_num_vlan_2: Min 2 num vlan valid for this environment :param max_num_vlan_2: Max 2 num vlan valid for this environment :return: Dicionário com a seguinte estrutura: {'ambiente': {'id': < id >}} :raise InvalidParameterError: O identificador do grupo l3, o identificador do ambiente lógico, e/ou o identificador da divisão de data center são nulos ou inválidos. :raise GrupoL3NaoExisteError: Grupo layer 3 não cadastrado. :raise AmbienteLogicoNaoExisteError: Ambiente lógico não cadastrado. :raise DivisaoDcNaoExisteError: Divisão datacenter não cadastrada. :raise AmbienteDuplicadoError: Ambiente com o mesmo id_grupo_l3, id_ambiente_logico e id_divisao já cadastrado. :raise DataBaseError: Falha na networkapi ao acessar o banco de dados. :raise XMLError: Falha na networkapi ao ler o XML de requisição ou gerar o XML de resposta.", "label": 1, "domain": "code", "token_count": 390, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0092", "text": "Creates a new tree iteration handler @name orion.explorerNavHandler.ExplorerNavHandler @class A tree iteration handler based on an explorer. @param {Object} explorer The {@link orion.explorer.Explorer} instance. @param {Object} options The options object which provides iterate patterns and all call back functions when iteration happens. @param {String} [options.gridClickSelectionPolicy=\"none\"] Controls how clicking on a grid model item -- for example, a link or a button -- affects the selection (or how it affects the cursor, if the selectionPolicy is \"cursorOnly\"). Allowed values are:
\"none\": Clicking on a grid item will not change the selection (or cursor). This is the default.
\"active\": Clicking on a grid item will change the selection (or cursor).
@param {String} [options.selectionPolicy=null] Selection policy for this explorer. Allowed values are:
\"cursorOnly\": No selection of model items is allowed.
\"singleSelection\": Up to 1 model item can be selected.
\"readonlySelection\": Selection cannot be changed while this selection policy is set.
null: Zero or more model items can be selected. This is the default.
@param {Function} [options.postDefaultFunc] If this function provides addtional behaviors after the default behavior. Some explorers may want to do something else when the cursor is changed, etc. @param {Function} [options.preventDefaultFunc] If this function returns true then the default behavior of all key press will stop at this time. The key event is passed to preventDefaultFunc. It can implement its own behavior based on the key event.", "label": 1, "domain": "code", "token_count": 405, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0093", "text": "Tests if the axis-aligned box is intersecting a segment. @param sx1 x coordinate of the first point of the segment. @param sy1 y coordinate of the first point of the segment. @param sz1 z coordinate of the first point of the segment. @param sx2 x coordinate of the second point of the segment. @param sy2 y coordinate of the second point of the segment. @param sz2 z coordinate of the second point of the segment. @param centerx is the center point of the oriented box. @param centery is the center point of the oriented box. @param centerz is the center point of the oriented box. @param axis1x are the unit vectors of the oriented box axis. @param axis1y are the unit vectors of the oriented box axis. @param axis1z are the unit vectors of the oriented box axis. @param axis2x are the unit vectors of the oriented box axis. @param axis2y are the unit vectors of the oriented box axis. @param axis2z are the unit vectors of the oriented box axis. @param axis3x are the unit vectors of the oriented box axis. @param axis3y are the unit vectors of the oriented box axis. @param axis3z are the unit vectors of the oriented box axis. @param extentAxis1 are the sizes of the oriented box. @param extentAxis2 are the sizes of the oriented box. @param extentAxis3 are the sizes of the oriented box. @return true if the two shapes intersect each other; false otherwise.", "label": 1, "domain": "code", "token_count": 333, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0094", "text": "function takes no input as input to RESTFUL call to HP IMC :param auth: requests auth object #usually auth.creds from auth pyhpeimc.auth.class :param url: base url of IMC RS interface #usually auth.url from pyhpeimc.auth.authclass :return: list of dictionaries where each element of the list represents a single wireless controller which has been discovered in the HPE IMC WSM module :rtype: list >>> from pyhpeimc.auth import * >>> from pyhpeimc.wsm.acinfo import * >>> auth = IMCAuth(\"http://\", \"10.101.0.203\", \"8080\", \"admin\", \"admin\") >>> ac_info_all = get_ac_info_all(auth.creds, auth.url) >>> assert type(ac_info_all) is list >>> assert len(ac_info_all[0]) == 12 >>> assert 'hardwareVersion' in ac_info_all[0] >>> assert 'ipAddress' in ac_info_all[0] >>> assert 'label' in ac_info_all[0] >>> assert 'macAddress' in ac_info_all[0] >>> assert 'onlineApCount' in ac_info_all[0] >>> assert 'onlineClientCount' in ac_info_all[0] >>> assert 'pingStatus' in ac_info_all[0] >>> assert 'serialId' in ac_info_all[0] >>> assert 'softwareVersion' in ac_info_all[0] >>> assert 'status' in ac_info_all[0] >>> assert 'sysName' in ac_info_all[0] >>> assert 'type' in ac_info_all[0]", "label": 1, "domain": "code", "token_count": 337, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0095", "text": " Generate public and private ED25519 keys, both of length 32-bytes, although they are hexlified to 64 bytes. In addition, a keyid identifier generated for the returned ED25519 object. The object returned conforms to 'securesystemslib.formats.ED25519KEY_SCHEMA' and has the form: {'keytype': 'ed25519', 'scheme': 'ed25519', 'keyid': 'f30a0870d026980100c0573bd557394f8c1bbd6...', 'keyval': {'public': '9ccf3f02b17f82febf5dd3bab878b767d8408...', 'private': 'ab310eae0e229a0eceee3947b6e0205dfab3...'}} >>> ed25519_key = generate_ed25519_key() >>> securesystemslib.formats.ED25519KEY_SCHEMA.matches(ed25519_key) True >>> len(ed25519_key['keyval']['public']) 64 >>> len(ed25519_key['keyval']['private']) 64 scheme: The signature scheme used by the generated Ed25519 key. None. The ED25519 keys are generated by calling either the optimized pure Python implementation of ed25519, or the ed25519 routines provided by 'pynacl'. A dictionary containing the ED25519 keys and other identifying information. Conforms to 'securesystemslib.formats.ED25519KEY_SCHEMA'.", "label": 1, "domain": "code", "token_count": 326, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0096", "text": "Creates a new Cursor instance (INTERNAL TYPE, do not instantiate directly) @class Cursor @extends external:CoreCursor @extends external:Readable @property {string} sortValue Cursor query sort setting. @property {boolean} timeout Is Cursor able to time out. @property {ReadPreference} readPreference Get cursor ReadPreference. @fires Cursor#data @fires Cursor#end @fires Cursor#close @fires Cursor#readable @return {Cursor} a Cursor instance. @example Cursor cursor options. collection.find({}).project({a:1}) // Create a projection of field a collection.find({}).skip(1).limit(10) // Skip 1 and limit 10 collection.find({}).batchSize(5) // Set batchSize on cursor to 5 collection.find({}).filter({a:1}) // Set query on the cursor collection.find({}).comment('add a comment') // Add a comment to the query, allowing to correlate queries collection.find({}).addCursorFlag('tailable', true) // Set cursor as tailable collection.find({}).addCursorFlag('oplogReplay', true) // Set cursor as oplogReplay collection.find({}).addCursorFlag('noCursorTimeout', true) // Set cursor as noCursorTimeout collection.find({}).addCursorFlag('awaitData', true) // Set cursor as awaitData collection.find({}).addCursorFlag('partial', true) // Set cursor as partial collection.find({}).addQueryModifier('$orderby', {a:1}) // Set $orderby {a:1} collection.find({}).max(10) // Set the cursor max collection.find({}).maxTimeMS(1000) // Set the cursor maxTimeMS collection.find({}).min(100) // Set the cursor min collection.find({}).returnKey(true) // Set the cursor returnKey collection.find({}).setReadPreference(ReadPreference.PRIMARY) // Set the cursor readPreference collection.find({}).showRecordId(true) // Set the cursor showRecordId collection.find({}).sort([['a', 1]]) // Sets the sort order of the cursor query collection.find({}).hint('a_1') // Set the cursor hint All options are chainable, so one can do the following. collection.find({}).maxTimeMS(1000).maxScan(100).skip(1).toArray(..)", "label": 1, "domain": "code", "token_count": 482, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0097", "text": "Method: getFeatureInfo Get feature information from ArcIMS. Using the applied geometry, apply the options to the query (buffer, area/envelope intersection), and query the ArcIMS service. A note about accuracy: ArcIMS interprets the accuracy attribute in feature requests to be something like the 'modulus' operator on feature coordinates, applied to the database geometry of the feature. It doesn't round, so your feature coordinates may be up to (1 x accuracy) offset from the actual feature coordinates. If the accuracy of the layer is not specified, the accuracy will be computed to be approximately 1 feature coordinate per screen pixel. Parameters: geometry - {} or {} The geometry to use when making the query. This should be a closed polygon for behavior approximating a free selection. layer - {Object} The ArcIMS layer definition. This is an anonymous object that looks like: (code) { id: \"ArcXML layer ID\", // the ArcXML layer ID query: { where: \"STATE = 'PA'\", // the where clause of the query accuracy: 100 // the accuracy of the returned feature } } (end) options - {Object} Object with non-default properties to set on the layer. Supported properties are buffer, callback, scope, and any other properties applicable to the ArcXML format. Set the 'callback' and 'scope' for an object and function to recieve the parsed features from ArcIMS.", "label": 1, "domain": "code", "token_count": 303, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0098", "text": "
Perform am URI path escape operation on a Reader input, writing results to a Writer.
The following are the only allowed chars in an URI path (will not be escaped):
A-Z a-z 0-9
- . _ ~
! $ & ' ( ) * + , ; =
: @
/
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
@param reader the Reader reading the text to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @param encoding the encoding to be used for escaping. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 308, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0099", "text": "The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.
. @param team_name [String] Your team name. @param review_id [String] Id of the review. @param start_seed [Integer] Time stamp of the frame from where you want to start fetching the frames. @param no_of_records [Integer] Number of frames to fetch. @param filter [String] Get frames filtered by tags. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 348, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0100", "text": "Resolve a Service Fabric partition. Resolve a Service Fabric service partition to get the endpoints of the service replicas. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the service name is \"fabric:/myapp/app1/svc1\", the service identity would be \"myapp~app1~svc1\" in 6.0+ and \"myapp/app1/svc1\" in previous versions. @param partition_key_type [Integer] Key type for the partition. This parameter is required if the partition scheme for the service is Int64Range or Named. The possible values are following. - None (1) - Indicates that the PartitionKeyValue parameter is not specified. This is valid for the partitions with partitioning scheme as Singleton. This is the default value. The value is 1. - Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64 partition key. This is valid for the partitions with partitioning scheme as Int64Range. The value is 2. - Named (3) - Indicates that the PartitionKeyValue parameter is a name of the partition. This is valid for the partitions with partitioning scheme as Named. The value is 3. @param partition_key_value [String] Partition key. This is required if the partition scheme for the service is Int64Range or Named. @param previous_rsp_version [String] The value in the Version field of the response that was received previously. This is required if the user knows that the result that was got previously is stale. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ResolvedServicePartition] operation results.", "label": 1, "domain": "code", "token_count": 431, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0101", "text": "Translates an error message in its default scope (activemodel.errors.messages). Error messages are first looked up in activemodel.errors.models.MODEL.attributes.ATTRIBUTE.MESSAGE, if it's not there, it's looked up in activemodel.errors.models.MODEL.MESSAGE and if that is not there also, it returns the translation of the default message (e.g. activemodel.errors.messages.MESSAGE). The translated model name, translated attribute name and the value are available for interpolation. When using inheritance in your models, it will check all the inherited models too, but only if the model itself hasn't been found. Say you have class Admin < User; end and you wanted the translation for the :blank error message for the title attribute, it looks for these translations: * activemodel.errors.models.admin.attributes.title.blank * activemodel.errors.models.admin.blank * activemodel.errors.models.user.attributes.title.blank * activemodel.errors.models.user.blank * any default you provided through the +options+ hash (in the activemodel.errors scope) * activemodel.errors.messages.blank * errors.attributes.title.blank * errors.messages.blank", "label": 1, "domain": "code", "token_count": 300, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0102", "text": "
Perform am URI path escape operation on a char[] input.
The following are the only allowed chars in an URI path (will not be escaped):
A-Z a-z 0-9
- . _ ~
! $ & ' ( ) * + , ; =
: @
/
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
@param text the char[] to be escaped. @param offset the position in text at which the escape operation should start. @param len the number of characters in text that should be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @param encoding the encoding to be used for escaping. @throws IOException if an input/output exception occurs", "label": 1, "domain": "code", "token_count": 329, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0103", "text": "Execute operations atomically (in a single database call) for everything that would happen inside the block. This method supports nesting further calls to atomically, which will behave according to the options described below. An option join_context can be given which, when true, will merge the operations declared by the given block with the atomically block wrapping the current invocation for the same document, if one exists. If this block or any other block sharing the same context raises before persisting, then all the operations of that context will not be persisted, and will also be reset in memory. When join_context is false, the given block of operations will be persisted independently of other contexts. Failures in other contexts will not affect this one, so long as this block was able to run and persist changes. The default value of join_context is set by the global configuration option join_contexts, whose own default is false. @example Execute the operations atomically. document.atomically do document.set(name: \"Tool\").inc(likes: 10) end @example Execute some inner operations atomically, but independently from the outer operations. document.atomically do document.inc likes: 10 document.atomically join_context: false do # The following is persisted to the database independently. document.unset :origin end document.atomically join_context: true do # The following is persisted along with the other outer operations. document.inc member_count: 3 end document.set name: \"Tool\" end @param [ true, false ] join_context Join the context (i.e. merge declared atomic operations) of the atomically block wrapping this one for the same document, if one exists. @return [ true, false ] If the operation succeeded. @since 4.0.0", "label": 1, "domain": "code", "token_count": 352, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0104", "text": "Parses the combined arrays from the defaultPrepareFields array and the prepareFields array (or function returning an array). The default prepared fields are: [ { name: 'view', value: 'viewState' }, 'model' ] Prepared fields can be defined in a couple of ways: preparedFields = [ 'model', { name: 'app', value: someGlobalCell }, 'a value that does not exist on the view', { name: 'view', value: 'viewState' }, { name: 'patientId', value: '_patientId' }, { name: 'calculatedValue', value: function() { return 'calculated: ' + this.viewProperty }, 'objectWithoutToJSON' ] Will result in the following context (where this === this view and it assumes all the properties on the view that are referenced are defined): { model: this.model.toJSON(), app: someGlobalCell.toJSON(), view: this.viewState.toJSON(), patientId: this._patientId, calculatedValue: 'calculated: ' + this.viewProperty, objectWithoutToJSON: this.objectWithoutToJSON } Note: alternatively, you can define your prepareFields as an object that will be mapped to an array of { name: key, value: value } Things to be careful of: * If the view already has a field named 'someGlobalCell' then the property on the view will be used instead of the global value. * if the prepared field item is not a string or object containing 'name' and 'value' properties, then an exception will be thrown. * 'model' and 'view' are reserved field names and cannot be reused. @method __getPrepareFieldsContext @return {Object} context composed of { modelName: model.toJSON() } for every model identified. @private", "label": 1, "domain": "code", "token_count": 367, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0105", "text": "/* Load the description of a sensor. In practice, it doesn't really contain anything useful. http://www.bom.gov.au/waterdata/services?service=SOS&version=2.0&request=DescribeSensor&procedureDescriptionFormat=http%3A%2F%2Fwww.opengis.net%2FsensorML%2F1.0.1&procedure=http%3A%2F%2Fbom.gov.au%2Fwaterdata%2Fservices%2Ftstypes%2FPat1_C_B_1 function loadDescription(item) { return querySos(item, { request: 'DescribeSensor', procedure: item.procedure, procedureDescriptionFormat: 'http://www.opengis.net/sensorML/1.0.1' }).then(function(sensorml) { //var description = sensormljson.description.SensorDescription.data.SensorML.member; console.log('Sensor description: ', sensorml); }); } /* Want to get more information about a location? new urijs('http://www.bom.gov.au/waterdata/services').setQuery({service:'SOS',version:'2.0',request:'GetFeatureOfInterest',featureOfInterest:'http://bom.gov.au/waterdata/services/stations/401229'}); http://www.bom.gov.au/waterdata/services?service=SOS&version=2.0&request=GetFeatureOfInterest&featureOfInterest=http%3A%2F%2Fbom.gov.au%2Fwaterdata%2Fservices%2Fstations%2F401229 Point location buried in featureMember -> MonitoringPoint -> shape -> Point Warning: some IDs don't have locations (ie http://bom.gov.au/waterdata/services/stations/system)", "label": 1, "domain": "code", "token_count": 370, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0106", "text": "
Perform an XML 1.1 level 1 (only markup-significant chars) escape operation on a String input.
Level 1 means this method will only escape the five markup-significant characters which are predefined as Character Entity References in XML: <, >, &, " and '.
This method calls {@link #escapeXml11(String, XmlEscapeType, XmlEscapeLevel)} with the following preconfigured values:
@param text the String to be escaped. @return The escaped result String. As a memory-performance improvement, will return the exact same object as the text input argument if no escaping modifications were required (and no additional String objects will be created during processing). Will return null if input is null.", "label": 1, "domain": "code", "token_count": 332, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0107", "text": "
Generates a stream by taking one element of the provided streams at a time, and putting them in a substream.
An IllegalArgumentException is thrown if there is only one stream provided in the varargs. In that case, the traversing would be a mapping with Stream::of.
An IllegalArgumentException is also thrown if one of the provided streams is not ORDERED.
The characteristics of the returned stream is the bitwise AND of all the characteristics of the provided streams. In most of the cases, all these streams will share the same characteristics, so in this case it will be the same as well. The returned stream is thus ORDERED.
A NullPointerException is thrown if one of the provided streams is null.
@param streams The streams to be traversed. Will throw a NullPointerException if null. @param The type of the elements of the provided stream. @return A traversing stream of streams.", "label": 1, "domain": "code", "token_count": 473, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0108", "text": "Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive. (If fromIndex and toIndex are equal, the returned list is empty.) The returned list is backed by this list, so non-structural changes in the returned list are reflected in this list, and vice-versa. The returned list supports all of the optional list operations supported by this list. This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). Any operation that expects a list can be used as a range operation by passing a subList view instead of a whole list. For example, the following idiom removes a range of elements from a list:
{@code list.subList(from, to).clear(); }
Similar idioms may be constructed for indexOf and lastIndexOf, and all of the algorithms in the Collections class can be applied to a subList. The semantics of the list returned by this method become undefined if the backing list (i.e., this list) is structurally modified in any way other than via the returned list. (Structural modifications are those that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.) @param fromIndex low endpoint (inclusive) of the subList @param toIndex high endpoint (exclusive) of the subList @return a view of the specified range within this list @throws IndexOutOfBoundsException for an illegal endpoint index value (fromIndex < 0 || toIndex > size || fromIndex > toIndex)", "label": 1, "domain": "code", "token_count": 382, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0109", "text": "Gets the container logs for container deployed on a Service Fabric node. Gets the container logs for container deployed on a Service Fabric node for the given code package. @param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the application name is \"fabric:/myapp/app1\", the application identity would be \"myapp~app1\" in 6.0+ and \"myapp/app1\" in previous versions. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param code_package_name [String] The name of code package specified in service manifest registered as part of an application type in a Service Fabric cluster. @param tail [String] Number of lines to show from the end of the logs. Default is 100. 'all' to show the complete logs. @param previous [Boolean] Specifies whether to get container logs from exited/dead containers of the code package instance. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 336, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0110", "text": "Cria um novo direito de um grupo de usuário em um grupo de equipamento e retorna o seu identificador. :param id_grupo_usuario: Identificador do grupo de usuário. :param id_grupo_equipamento: Identificador do grupo de equipamento. :param leitura: Indicação de permissão de leitura ('0' ou '1'). :param escrita: Indicação de permissão de escrita ('0' ou '1'). :param alterar_config: Indicação de permissão de alterar_config ('0' ou '1'). :param exclusao: Indicação de permissão de exclusão ('0' ou '1'). :return: Dicionário com a seguinte estrutura: {'direito_grupo_equipamento': {'id': < id>}} :raise InvalidParameterError: Pelo menos um dos parâmetros é nulo ou inválido. :raise GrupoEquipamentoNaoExisteError: Grupo de Equipamento não cadastrado. :raise GrupoUsuarioNaoExisteError: Grupo de Usuário não cadastrado. :raise ValorIndicacaoDireitoInvalidoError: Valor de leitura, escrita, alterar_config e/ou exclusão inválido. :raise DireitoGrupoEquipamentoDuplicadoError: Já existe direitos cadastrados para o grupo de usuário e grupo de equipamento informados. :raise DataBaseError: Falha na networkapi ao acessar o banco de dados. :raise XMLError: Falha na networkapi ao ler o XML de requisição ou gerar o XML de resposta.", "label": 1, "domain": "code", "token_count": 333, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0111", "text": "Sends a health report on the Service Fabric cluster. Sends a health report on a Service Fabric cluster. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway node, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetClusterHealth and check that the report appears in the HealthEvents section. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 442, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0112", "text": "Initializes a Request object. @param [Hash] options the options for the request. @option options [String, Symbol] :method (:get) The HTTP method to use. @option options [Class] :expected_response (Net::HTTPSuccess) The class of response that the request should obtain when run. @option options [String, Symbol] :response_format (:json) The expected format of the response body. If passed, the response body will be parsed according to the format before being returned. @option options [String] :host The host component of the request URI. @option options [String] :path The path component of the request URI. @option options [Hash] :params ({}) The params to use as the query component of the request URI, for instance the Hash +{a: 1, b: 2}+ corresponds to the query parameters \"a=1&b=2\". @option options [Hash] :camelize_params (true) whether to transform each key of params into a camel-case symbol before sending the request. @option options [Hash] :request_format (:json) The format of the request body. If a request body is passed, it will be parsed according to this format before sending it in the request. @option options [#size] :body The body component of the request. @option options [Hash] :headers ({}) The headers component of the request. @option options [#access_token, #refreshed_access_token?] :auth The authentication object. If set, must respond to +access_token+ and return the OAuth token to make an authenticated request, and must respond to +refreshed_access_token?+ and return whether the access token can be refreshed if expired. Sends the request and returns the response. If the request fails once for a temporary server error or an expired token, tries the request again before eventually raising an error. @return [Net::HTTPResponse] if the request succeeds and matches the expectations, the response with the body appropriately parsed. @raise [Yt::RequestError] if the request fails or the response does not match the expectations.", "label": 1, "domain": "code", "token_count": 435, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0113", "text": "
Perform am URI fragment identifier escape operation on a char[] input.
The following are the only allowed chars in an URI fragment identifier (will not be escaped):
A-Z a-z 0-9
- . _ ~
! $ & ' ( ) * + , ; =
: @
/ ?
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
@param text the char[] to be escaped. @param offset the position in text at which the escape operation should start. @param len the number of characters in text that should be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @param encoding the encoding to be used for escaping. @throws IOException if an input/output exception occurs", "label": 1, "domain": "code", "token_count": 332, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0114", "text": "Function takes devip ( ipv4 address ), ifIndex and pvid (vlanid) of specific device and 802.1q VLAN tag and issues a RESTFUL call to remove the specified VLAN from the target device. :param ifindex: str value of ifIndex for a specific interface on the device :param auth: requests auth object #usually auth.creds from auth pyhpeimc.auth.class :param url: base url of IMC RS interface #usually auth.url from pyhpeimc.auth.authclass :param devid: str requires devid of the target device :param devip: str of ipv4 address of the target device :return: int of 204 if successful or 409 if not succesful :rtype: int >>> from pyhpeimc.auth import * >>> from pyhpeimc.plat.vlanm import * >>> auth = IMCAuth(\"http://\", \"10.101.0.203\", \"8080\", \"admin\", \"admin\") >>> delete_hybrid_interface('9', auth.creds, auth.url, devip='10.101.0.221') 409 >>> add_hybrid = add_hybrid_interface('9', '1', '10', '1', auth.creds, auth.url, devip='10.101.0.221') >>> delete_hybrid = delete_hybrid_interface('9', auth.creds, auth.url, devip='10.101.0.221') >>> assert type(delete_hybrid) is int >>> assert delete_hybrid == 204", "label": 1, "domain": "code", "token_count": 321, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0115", "text": "List your issues List all issues across all the authenticated user’s visible repositories including owned repositories, member repositories, and organization repositories. @example github = Github.new oauth_token: '...' github.issues.list List all issues across owned and member repositories for the authenticated user. @example github = Github.new oauth_token: '...' github.issues.list :user List all issues for a given organization for the authenticated user. @example github = Github.new oauth_token: '...' github.issues.list org: 'org-name' List issues for a repository @example github = Github.new github.issues.list user: 'user-name', repo: 'repo-name' @param [Hash] params @option params [String] :filter * assigned Issues assigned to you (default) * created Issues created by you * mentioned Issues mentioning you * subscribed Issues you've subscribed to updates for * all All issues the user can see @option params [String] :milestone * Integer Milestone number * none for Issues with no Milestone. * * for Issues with any Milestone @option params [String] :state open, closed, default: open @option params [String] :labels String list of comma separated Label names. Example: bug,ui,@high @option params [String] :assignee * String User login * none for Issues with no assigned User. * * for Issues with any assigned User. @option params [String] :creator String User login @option params [String] :mentioned String User login @option params [String] :sort created, updated, comments, default: created @option params [String] :direction asc, desc, default: desc @option params [String] :since Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ @example github = Github.new oauth_token: '...' github.issues.list since: '2011-04-12T12:12:12Z', filter: 'created', state: 'open', labels: \"bug,ui,bla\", sort: 'comments', direction: 'asc' @api public", "label": 1, "domain": "code", "token_count": 445, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0116", "text": "Lists the usage details based on enrollmentAccountId for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. @param enrollment_account_id [String] EnrollmentAccount ID @param billing_period_name [String] Billing Period Name. @param expand [String] May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. @param filter [String] May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). @param skiptoken [String] Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. @param top [Integer] May be used to limit the number of results to the most recent N usageDetails. @param query_options [QueryOptions] Additional parameters for the operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [UsageDetailsListResult] which provide lazy access to pages of the response.", "label": 1, "domain": "code", "token_count": 335, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0117", "text": "
Generates a stream composed of the N greatest values of the provided stream, compared using the provided comparator. If there are no duplicates in the provided stream, then the returned stream will have N values, assuming that the input stream has more than N values.
All the duplicates are copied in the returned stream, so in this case the number of elements in the returned stream may be greater than N. In this case, the number of different values is not guaranteed, and may be lesser than N.
Since this operator extract maxes according to the provided comparator, the result is sorted from the greatest element to the smallest, thus in the decreasing order, according to the provided comparator.
The provided implementation uses and insertion buffer of size N to keep the N maxes, as well as a hash map to keep the duplicates. This implementation becomes less and less efficient as N grows.
A NullPointerException will be thrown if the provided stream or the comparator is null.
An IllegalArgumentException is thrown if N is lesser than 1.
@param stream the processed stream @param numberOfMaxes the number of different max values that should be returned. Note that the total number of values returned may be larger if there are duplicates in the stream @param comparator the comparator used to compare the elements of the stream @param the type of the provided stream @return the filtered stream", "label": 1, "domain": "code", "token_count": 312, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0118", "text": "A full implementation of Dave Green's \"cubehelix\" for Matplotlib. Based on the FORTRAN 77 code provided in D.A. Green, 2011, BASI, 39, 289. http://adsabs.harvard.edu/abs/2011arXiv1108.5083G User can adjust all parameters of the cubehelix algorithm. This enables much greater flexibility in choosing color maps, while always ensuring the color map scales in intensity from black to white. A few simple examples: Default color map settings produce the standard \"cubehelix\". Create color map in only blues by setting rot=0 and start=0. Create reverse (white to black) backwards through the rainbow once by setting rot=1 and reverse=True. Parameters ---------- start : scalar, optional Sets the starting position in the color space. 0=blue, 1=red, 2=green. Defaults to 0.5. rot : scalar, optional The number of rotations through the rainbow. Can be positive or negative, indicating direction of rainbow. Negative values correspond to Blue->Red direction. Defaults to -1.5 gamma : scalar, optional The gamma correction for intensity. Defaults to 1.0 reverse : boolean, optional Set to True to reverse the color map. Will go from black to white. Good for density plots where shade~density. Defaults to False nlev : scalar, optional Defines the number of discrete levels to render colors at. Defaults to 256. sat : scalar, optional The saturation intensity factor. Defaults to 1.2 NOTE: this was formerly known as \"hue\" parameter minSat : scalar, optional Sets the minimum-level saturation. Defaults to 1.2 maxSat : scalar, optional Sets the maximum-level saturation. Defaults to 1.2 startHue : scalar, optional Sets the starting color, ranging from [0, 360], as in D3 version by @mbostock NOTE: overrides values in start parameter endHue : scalar, optional Sets the ending color, ranging from [0, 360], as in D3 version by @mbostock NOTE: overrides values in rot parameter minLight : scalar, optional Sets the minimum lightness value. Defaults to 0. maxLight : scalar, optional Sets the maximum lightness value. Defaults to 1. Returns ------- data : ndarray, shape (N, 3) Control points.", "label": 1, "domain": "code", "token_count": 495, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0119", "text": "Create a hook @see https://developer.github.com/v3/orgs/hooks/#create-a-hook @param [Hash] params @input params [String] :name Required. The name of the service that is being called. @input params [Hash] :config Required. Key/value pairs to provide settings for this hook. These settings vary between the services and are defined in the github-services repository. Booleans are stored internally as \"1\" for true, and \"0\" for false. Any JSON true/false values will be converted automatically. @input params [Array] :events Determines what events the hook is triggered for. Default: [\"push\"] @input params [Boolean] :active Determines whether the hook is actually triggered on pushes. To create a webhook, the following fields are required by the config: @input config [String] :url A required string defining the URL to which the payloads will be delivered. @input config [String] :content_type An optional string defining the media type used to serialize the payloads. Supported values include json and form. The default is form. @input config [String] :secret An optional string that’s passed with the HTTP requests as an X-Hub-Signature header. The value of this header is computed as the HMAC hex digest of the body, using the secret as the key. @input config [String] :insecure_ssl An optional string that determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include \"0\" (verification is performed) and \"1\" (verification is not performed). The default is \"0\".or instance, if the library doesn't get updated to permit a given parameter the api call won't work, however if we skip permission all together, the endpoint should always work provided the actual resource path doesn't change. I'm in the process of completely removing the permit functionality. @example github = Github.new github.orgs.hooks.create 'org-name', name: \"web\", active: true, config: { url: \"http://something.com/webhook\" } } @api public", "label": 1, "domain": "code", "token_count": 427, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0120", "text": "Type2 corresponds to 32x32 images of left facing triangles (<). 1) Dump one line of 32 pixels at the time. - The illustration below tells if a pixel is transparent or regular. - Only regular and zero (transparent) pixels are explicitly stored in the frame content. All other pixels of the illustration are implicitly transparent. Below is an illustration of the 32x32 image, where a space represents an implicit transparent pixel, a '0' represents an explicit transparent pixel and an 'x' represents an explicit regular pixel. Note: The output image will be \"upside-down\" compared to the illustration. +--------------------------------+ | | | 00xx| | xxxx| | 00xxxxxx| | xxxxxxxx| | 00xxxxxxxxxx| | xxxxxxxxxxxx| | 00xxxxxxxxxxxxxx| | xxxxxxxxxxxxxxxx| | 00xxxxxxxxxxxxxxxxxx| | xxxxxxxxxxxxxxxxxxxx| | 00xxxxxxxxxxxxxxxxxxxxxx| | xxxxxxxxxxxxxxxxxxxxxxxx| | 00xxxxxxxxxxxxxxxxxxxxxxxxxx| | xxxxxxxxxxxxxxxxxxxxxxxxxxxx| |00xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |00xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| | xxxxxxxxxxxxxxxxxxxxxxxxxxxx| | 00xxxxxxxxxxxxxxxxxxxxxxxxxx| | xxxxxxxxxxxxxxxxxxxxxxxx| | 00xxxxxxxxxxxxxxxxxxxxxx| | xxxxxxxxxxxxxxxxxxxx| | 00xxxxxxxxxxxxxxxxxx| | xxxxxxxxxxxxxxxx| | 00xxxxxxxxxxxxxx| | xxxxxxxxxxxx| | 00xxxxxxxxxx| | xxxxxxxx| | 00xxxxxx| | xxxx| | 00xx| +--------------------------------+", "label": 1, "domain": "code", "token_count": 329, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0121", "text": "Lists a collection of the operations for the specified API. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param api_id [String] API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @param filter [String] | Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | @param top [Integer] Number of records to return. @param skip [Integer] Number of records to skip. @param tags [String] Include tags in the response. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.", "label": 1, "domain": "code", "token_count": 333, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0122", "text": "Sends a successful response. Parameters that can be used depends on the event handled as described in the following table:
getUserItemData: success([{allowedBufferSize: <allowed buffer size>, allowedMaxItemFreq: <allowed max item frequency>}, allowedModes: {raw: <raw allowed for user>, merge: <merge allowed for user>, distinct: <distinct allowed for user>, command: <command allowed for user>}}, ...])
getSchema: success([<field 1>, <field 2>, ...])
getItems: success([<item 1>, <item 2>, ...])
notifyUser: success(<allowed max bandwidth>, <wants table notifications>)
notifyUserAuth: success(<allowed max bandwidth>, <wants table notifications>)
notifyUserMessage: success()
notifyNewSession: success()
notifySessionClose: success()
notifyNewTables: success()
notifyTablesClose: success()
notifyMpnDeviceAccess: success()
notifyMpnSubscriptionActivation: success()
notifyMpnDeviceTokenChange: success()
", "label": 1, "domain": "code", "token_count": 411, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0123", "text": "List all existing large person groups’ largePersonGroupId, name, userData and recognitionModel. * Large person groups are stored in alphabetical order of largePersonGroupId. * \"start\" parameter (string, optional) is a user-provided largePersonGroupId value that returned entries have larger ids by string comparison. \"start\" set to empty to indicate return from the first item. * \"top\" parameter (int, optional) specifies the number of entries to return. A maximal of 1000 entries can be returned in one call. To fetch more, you can specify \"start\" with the last returned entry’s Id of the current call. For example, total 5 large person groups: \"group1\", ..., \"group5\". \"start=&top=\" will return all 5 groups. \"start=&top=2\" will return \"group1\", \"group2\". \"start=group2&top=3\" will return \"group3\", \"group4\", \"group5\". @param start [String] List large person groups from the least largePersonGroupId greater than the \"start\". @param top [Integer] The number of large person groups to list. @param return_recognition_model [Boolean] A value indicating whether the operation should return 'recognitionModel' in response. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.", "label": 1, "domain": "code", "token_count": 310, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0124", "text": "Removes a service replica running on a node. This API simulates a Service Fabric replica failure by removing a replica from a Service Fabric cluster. The removal closes the replica, transitions the replica to the role None, and then removes all of the state information of the replica from the cluster. This API tests the replica state removal path, and simulates the report fault permanent path through client APIs. Warning - There are no safety checks performed when this API is used. Incorrect use of this API can lead to data loss for stateful services.In addition, the forceRemove flag impacts all other replicas hosted in the same process. @param node_name [String] The name of the node. @param partition_id The identity of the partition. @param replica_id [String] The identifier of the replica. @param force_remove [Boolean] Remove a Service Fabric application or service forcefully without going through the graceful shutdown sequence. This parameter can be used to forcefully delete an application or service for which delete is timing out due to issues in the service code that prevents graceful close of replicas. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 302, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0125", "text": "Creates a signature of a text crypto.sign text, options Must have the appropiate key to be able to decrypt, of course. Returns a {GPGME::Data} object which can then be read. @param text The object that will be signed. Must be something that can be converted to {GPGME::Data}. @param [Hash] options Optional parameters. * +:signer+ sign identifier to sign the text with. Will use the first key it finds if none specified. * +:output+ if specified, it will write the output into it. It will be converted to a {GPGME::Data} object, so it could be a file for example. * +:mode+ Desired type of signature. Options are: - +GPGME::SIG_MODE_NORMAL+ for a normal signature. The default one if not specified. - +GPGME::SIG_MODE_DETACH+ for a detached signature - +GPGME::SIG_MODE_CLEAR+ for a cleartext signature * Any other option accepted by {GPGME::Ctx.new} @return [GPGME::Data] a {GPGME::Data} that can be read. @example normal sign crypto.sign \"Hi there\" @example outputing to a file file = File.open(\"text.sign\", \"w+\") crypto.sign \"Hi there\", :options => file @example doing a detached signature crypto.sign \"Hi there\", :mode => GPGME::SIG_MODE_DETACH @example specifying the signer crypto.sign \"Hi there\", :signer => \"mrsimo@example.com\" @raise [GPGME::Error::UnusableSecretKey] TODO don't know when", "label": 1, "domain": "code", "token_count": 346, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0126", "text": "/* @protected @returns /* currently not needed isThemeBackgroundImageModified: function() { var Parameters = sap.ui.requireSync(\"sap/ui/core/theming/Parameters\"); var sBgImgUrl = Parameters.get('sapUiGlobalBackgroundImage'); // the global background image from the theme if (sBgImgUrl && sBgImgUrl !== \"''\") { var sBgImgUrlDefault = Parameters.get('sapUiGlobalBackgroundImageDefault'); if (sBgImgUrl !== sBgImgUrlDefault) { return true; } } return false; }, Renders an HTML tag into the given RenderManager which carries the background image which is either configured and given or coming from the current theme. Should be called right after the opening root tag has been completed, so this is the first child element inside the control. @param {sap.ui.core.RenderManager} rm The RenderManager @param {sap.ui.core.Control} oControl Control within which the tag will be rendered; its ID will be used to generate the element ID @param {string|string[]} vCssClass A CSS class or an array of CSS classes to add to the element @param {sap.ui.core.URI} [sBgImgUrl] The image of a configured background image; if this is not given, the theme background will be used and also the other settings are ignored. @param {boolean} [bRepeat] Whether the background image should be repeated/tiled (or stretched) @param {float} [fOpacity] The background image opacity, if any @protected", "label": 1, "domain": "code", "token_count": 311, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0127", "text": "Gets the list of backups available for the specified backed up entity at the specified backup location. Gets the list of backups available for the specified backed up entity (Application, Service or Partition) at the specified backup location (FileShare or Azure Blob Storage). @param get_backup_by_storage_query_description [GetBackupByStorageQueryDescription] Describes the filters and backup storage details to be used for enumerating backups. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 358, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0128", "text": "Clear inline style properties from elements. @param {(string|Array|NodeList|HTMLCollection|HTMLElement)} elements - The iterable, selector or elements. @param {...string} props - The style properties to clear. @return {Array} iterable - The getElements' result for chaining. @example //esnext import { createElement, setStyle, clearStyle } from 'chirashi' const maki = createElement('a.cheese.maki') setStyleProp(maki, { position: 'absolute', top: 10, width: 200, height: 200, background: 'red' }) // returns: [] clearStyle(maki, 'width', 'height', 'background') // returns: [] @example //es5 var maki = Chirashi.createElement('a.cheese.maki') Chirashi.setStyleProp(maki, { position: 'absolute', top: 10, width: 200, height: 200, background: 'red' }) // returns: [] Chirashi.clearStyle(maki, 'width', 'height', 'background') // returns: []", "label": 1, "domain": "code", "token_count": 359, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0129", "text": "Lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. @param billing_period_name [String] Billing Period Name. @param expand [String] May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. @param filter [String] May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). @param skiptoken [String] Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. @param top [Integer] May be used to limit the number of results to the most recent N usageDetails. @param query_options [QueryOptions] Additional parameters for the operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [UsageDetailsListResult] which provide lazy access to pages of the response.", "label": 1, "domain": "code", "token_count": 320, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0130", "text": "/*[deutsch]
Erzeugt eine neue Zeitspanne als Vereinigung dieser und der angegebenen Zeitspanne, wobei Beträge zu gleichen Zeiteinheiten addiert werden.
Das Listenergebnis dieser Methode kann in der Zeitarithmetik wie folgt genutzt werden:
Zu beachten: Dieses Beispiel funktioniert sogar, wenn beide Dauer-Objekte wegen gemischter Vorzeichen nicht zusammengeführt werden können. Stattdessen werden dann diese Dauer und die angegebene Zeitspanne Schritt für Schritt innerhalb der Schleife zum Zeitstempel aufaddiert. Anders als in {@code plus(TimeSpan)} versucht Time4J hier nicht, im Fall gemischter Vorzeichen mit Hilfe einer Normalisierung ein eindeutiges Vorzeichen herzustellen.
@param timespan other time span this duration is to be merged with @return unmodifiable list with one new merged duration or two unmerged durations in case of mixed signs @throws IllegalArgumentException if different units of same length exist @throws ArithmeticException in case of long overflow @see #plus(TimeSpan)", "label": 1, "domain": "code", "token_count": 396, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0131", "text": "
Perform an XML 1.1 level 2 (markup-significant and all non-ASCII chars) escape operation on a String input.
Level 2 means this method will escape:
The five markup-significant characters: <, >, &, " and '
All non ASCII characters.
This escape will be performed by replacing those chars by the corresponding XML Character Entity References (e.g. '<') when such CER exists for the replaced character, and replacing by a hexadecimal character reference (e.g. '␰') when there there is no CER for the replaced character.
This method calls {@link #escapeXml11(String, XmlEscapeType, XmlEscapeLevel)} with the following preconfigured values:
@param text the String to be escaped. @return The escaped result String. As a memory-performance improvement, will return the exact same object as the text input argument if no escaping modifications were required (and no additional String objects will be created during processing). Will return null if input is null.", "label": 1, "domain": "code", "token_count": 426, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0132", "text": "function takes no input and issues a RESTFUL call to get a list of custom views from HPE IMC. Optional Name input will return only the specified view. :param auth: requests auth object #usually auth.creds from auth pyhpeimc.auth.class :param url: base url of IMC RS interface #usually auth.url from pyhpeimc.auth.authclass :param name: string containg the name of the desired custom view :param upperview: str contraining the name of the desired parent custom view :return: str of creation results ( \"view \" + name + \"created successfully\" :rtype: str >>> from pyhpeimc.auth import * >>> from pyhpeimc.plat.groups import * >>> auth = IMCAuth(\"http://\", \"10.101.0.203\", \"8080\", \"admin\", \"admin\") #Create L1 custom view >>> create_custom_views(auth.creds, auth.url, name='L1 View') 'View L1 View created successfully' >>> view_1 =get_custom_views( auth.creds, auth.url, name = 'L1 View') >>> assert type(view_1) is list >>> assert view_1[0]['name'] == 'L1 View' #Create Nested custome view >>> create_custom_views(auth.creds, auth.url, name='L2 View', upperview='L1 View') 'View L2 View created successfully' >>> view_2 = get_custom_views( auth.creds, auth.url, name = 'L2 View') >>> assert type(view_2) is list >>> assert view_2[0]['name'] == 'L2 View'", "label": 1, "domain": "code", "token_count": 346, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0133", "text": "Returns the next time that this cron line is supposed to 'fire' This is raw, 3 secs to iterate over 1 year on my macbook :( brutal. (Well, I was wrong, takes 0.001 sec on 1.8.7 and 1.9.1) This method accepts an optional Time parameter. It's the starting point for the 'search'. By default, it's Time.now Note that the time instance returned will be in the same time zone that the given start point Time (thus a result in the local time zone will be passed if no start time is specified (search start time set to Time.now)) Rufus::Scheduler::CronLine.new('30 7 * * *').next_time( Time.mktime(2008, 10, 24, 7, 29)) #=> Fri Oct 24 07:30:00 -0500 2008 Rufus::Scheduler::CronLine.new('30 7 * * *').next_time( Time.utc(2008, 10, 24, 7, 29)) #=> Fri Oct 24 07:30:00 UTC 2008 Rufus::Scheduler::CronLine.new('30 7 * * *').next_time( Time.utc(2008, 10, 24, 7, 29)).localtime #=> Fri Oct 24 02:30:00 -0500 2008 (Thanks to K Liu for the note and the examples)", "label": 1, "domain": "code", "token_count": 311, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0134", "text": "Calculates the information based similarity of two time series x and y. Parameters ---------- x list a time series y list a time series n integer word order Returns ---------- IBS float Information based similarity Notes ---------- Information based similarity is a measure of dissimilarity between two time series. Let the sequences be x and y. Each sequence is first replaced by its first ordered difference(Encoder). Calculating the Heaviside of the resulting sequences, we get two binary sequences, SymbolicSeq. Using PyEEG function, embed_seq, with lag of 1 and dimension of n, we build an embedding matrix from the latter sequence. Each row of this embedding matrix is called a word. Information based similarity measures the distance between two sequence by comparing the rank of words in the sequences; more explicitly, the distance, D, is calculated using the formula: \"1/2^(n-1) * sum( abs(Rank(0)(k)-R(1)(k)) * F(k) )\" where Rank(0)(k) and Rank(1)(k) are the rank of the k-th word in each of the input sequences. F(k) is a modified \"shannon\" weighing function that increases the weight of each word in the calculations when they are more frequent in the sequences. It is advisable to calculate IBS for numerical sequences using 8-tupple words. References ---------- Yang AC, Hseu SS, Yien HW, Goldberger AL, Peng CK: Linguistic analysis of the human heartbeat using frequency and rank order statistics. Phys Rev Lett 2003, 90: 108103 Examples ---------- >>> import pyeeg >>> from numpy.random import randn >>> x = randn(100) >>> y = randn(100) >>> pyeeg.information_based_similarity(x,y,8) 0.64512947848249214", "label": 1, "domain": "code", "token_count": 380, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0135", "text": "Creates XY quad Buffers The default with no parameters will return a 2x2 quad with values from -1 to +1. If you want a unit quad with that goes from 0 to 1 you'd call it with twgl.primitives.createXYQuadBufferInfo(gl, 1, 0.5, 0.5); If you want a unit quad centered above 0,0 you'd call it with twgl.primitives.createXYQuadBufferInfo(gl, 1, 0, 0.5); @param {WebGLRenderingContext} gl The WebGLRenderingContext. @param {number} [size] the size across the quad. Defaults to 2 which means vertices will go from -1 to +1 @param {number} [xOffset] the amount to offset the quad in X @param {number} [yOffset] the amount to offset the quad in Y @return {module:twgl.BufferInfo} the created XY Quad buffers @memberOf module:twgl/primitives @function createXYQuadBuffers Creates XY quad vertices The default with no parameters will return a 2x2 quad with values from -1 to +1. If you want a unit quad with that goes from 0 to 1 you'd call it with twgl.primitives.createXYQuadVertices(1, 0.5, 0.5); If you want a unit quad centered above 0,0 you'd call it with twgl.primitives.createXYQuadVertices(1, 0, 0.5); @param {number} [size] the size across the quad. Defaults to 2 which means vertices will go from -1 to +1 @param {number} [xOffset] the amount to offset the quad in X @param {number} [yOffset] the amount to offset the quad in Y @return {Object.} the created XY Quad vertices @memberOf module:twgl/primitives", "label": 1, "domain": "code", "token_count": 403, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0136", "text": "This method creates an X509v3 certificate based on an an existing certificate. It attempts to create as faithful a copy of the existing certificate as possible by duplicating all certificate extensions. If you are testing an application that makes use of additional certificate extensions (e.g. logotype, S/MIME capabilities) this method will preserve those fields. You may optionally include a set of OIDs not to copy from the original certificate. The most common reason to do this would be to remove fields that would cause inconsistency, such as Authority Info Access or Issuer Alternative Name where these are not defined for the MITM authority certificate. OIDs 2.5.29.14 : Subject Key Identifier and 2.5.29.35 : Authority Key Identifier, are never copied, but generated directly based on the input keys and certificates. You may also optionally include maps of custom extensions which will be added to or replace extensions with the same OID on the original certificate for the the MITM certificate. FUTURE WORK: JDK 1.5 is very strict in parsing extensions. In particular, known extensions that include URIs must parse to valid URIs (including URL encoding all non-valid URI characters) or the extension will be rejected and not available to copy to the MITM certificate. Will need to directly extract these as ASN.1 fields and re-insert (hopefully BouncyCastle will handle them) @param originalCert The original certificate to duplicate. @param newPubKey The new public key for the MITM certificate. @param caCert The certificate of the signing authority fot the MITM certificate. @param caPrivateKey The private key of the signing authority. @param extensionOidsNotToCopy An optional list of certificate extension OIDs not to copy to the MITM certificate. @return The new MITM certificate. @throws CertificateParsingException @throws SignatureException @throws InvalidKeyException @throws CertificateExpiredException @throws CertificateNotYetValidException @throws CertificateException @throws NoSuchAlgorithmException @throws NoSuchProviderException", "label": 1, "domain": "code", "token_count": 406, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0137", "text": "/*[deutsch]
Addiert den angegebenen Betrag der entsprechenden Zeiteinheit zu dieser Bezugszeit und liefert das Additionsergebnis zurück.
Ähnlich wie {@link #plus(TimeSpan)}, aber mit dem Unterschied, daß die Zeitspanne in nur einer Zeiteinheit angegeben wird. Beispiel in Pseudo-Code:
[2011-05-31].plus(1, <MONTHS>) = [2011-06-30]
[2011-05-31].plus(4, <DAYS>) = [2011-06-04]
[2011-06-04].plus(-4, <DAYS>) = [2011-05-31]
[2010-04-29].plus(397, <DAYS>) = [2011-05-31]
[2010-04-29].plus(13, <MONTHS>) = [2011-05-29]
[2010-04-29].plus(-2, <MONTHS>) = [2010-02-28]
[2010-04-29].plus(1, <YEARS>) = [2011-04-29]
@param amount amount to be added (maybe negative) @param unit time unit @return result of addition as changed copy, this instance remains unaffected @throws RuleNotFoundException if given time unit is not registered and does also not implement {@link BasicUnit} to yield a suitable unit rule for the underlying time axis @throws ArithmeticException in case of numerical overflow @see #plus(TimeSpan)", "label": 1, "domain": "code", "token_count": 401, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0138", "text": "Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. @param resource_group_name [String] The name of the Azure resource group that contains the Data Lake Analytics account. @param account_name [String] The name of the Data Lake Analytics account for which to list Data Lake Store accounts. @param filter [String] OData filter. Optional. @param top [Integer] The number of items to return. Optional. @param skip [Integer] The number of items to skip over before returning elements. Optional. @param expand [String] OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. @param select [String] OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. @param orderby [String] OrderBy clause. One or more comma-separated expressions with an optional \"asc\" (the default) or \"desc\" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. @param count [Boolean] The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. @param search [String] A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. @param format [String] The desired return format. Return the response in particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.", "label": 1, "domain": "code", "token_count": 414, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0139", "text": "/* jshint ignore:start Initialize preview domain @constructor Twilio.Preview @property {Twilio.Preview.BulkExports} bulk_exports - bulk_exports version @property {Twilio.Preview.DeployedDevices} deployed_devices - deployed_devices version @property {Twilio.Preview.HostedNumbers} hosted_numbers - hosted_numbers version @property {Twilio.Preview.Marketplace} marketplace - marketplace version @property {Twilio.Preview.AccSecurity} acc_security - acc_security version @property {Twilio.Preview.Sync} sync - sync version @property {Twilio.Preview.Understand} understand - understand version @property {Twilio.Preview.Wireless} wireless - wireless version @property {Twilio.Preview.BulkExports.ExportList} exports - exports resource @property {Twilio.Preview.BulkExports.ExportConfigurationList} exportConfiguration - exportConfiguration resource @property {Twilio.Preview.DeployedDevices.FleetList} fleets - fleets resource @property {Twilio.Preview.HostedNumbers.AuthorizationDocumentList} authorizationDocuments - authorizationDocuments resource @property {Twilio.Preview.HostedNumbers.HostedNumberOrderList} hostedNumberOrders - hostedNumberOrders resource @property {Twilio.Preview.Marketplace.InstalledAddOnList} installedAddOns - installedAddOns resource @property {Twilio.Preview.Marketplace.AvailableAddOnList} availableAddOns - availableAddOns resource @property {Twilio.Preview.Sync.ServiceList} services - services resource @property {Twilio.Preview.Understand.AssistantList} assistants - assistants resource @property {Twilio.Preview.Wireless.CommandList} commands - commands resource @property {Twilio.Preview.Wireless.RatePlanList} ratePlans - ratePlans resource @property {Twilio.Preview.Wireless.SimList} sims - sims resource @param {Twilio} twilio - The twilio client /* jshint ignore:end", "label": 1, "domain": "code", "token_count": 399, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0140", "text": "Registers a configuration backed by the Configuration Admin. When this method is called, a {@link Proxy} object is created based on the {@code type} provided to the method. The configuration is automatically registered as a {@link org.osgi.service.cm.ManagedService} and {@link org.osgi.service.metatype.MetaTypeProvider}. The configuration can also be created with a Defaults object. In order to create a Defaults object, implement the Interface provided by {@code type} and supplying an instance of that class to {@code defaults}. {@code defaults} may be null. * Example: SomeInterface properties = ManagedPropertiesFactory.register(SomeInterface.class, new SomeInterfaceImpl(), context); @param The return type ofs the configuration. @param The return type of the default. @param type The type of configuration to create. The type of interface must be be annotated by {@link dk.netdesign.common.osgi.config.annotation.Property}, and each parameter must be annotated by {@link dk.netdesign.common.osgi.config.annotation.PropertyDefinition} @param defaults The defaults object to create. When a configuration item is not found in the Configuration Admin, the defaults method is called. @return A proxy representing a Configuration Admin configuration. @throws InvalidTypeException If a method/configuration item mapping uses an invalid type. @throws TypeFilterException If a method/configuration item mapping uses an invalid TypeMapper. @throws DoubleIDException If a method/configuration item mapping uses an ID that is already defined. @throws InvalidMethodException If a method/configuration violates any restriction not defined in the other exceptions.", "label": 1, "domain": "code", "token_count": 315, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0141", "text": "Expands a text markup by resolving embedded parameters and references to other text markups, with the help of a companion open object.
A reference pointing to another markup in the resources is marked up as {@code {PREFIX@MARKUP(ARGS):MEMBER:ALTERN(ARGS)@SUFFIX}}, where
{@code PREFIX} and {@code SUFFIX} are optional pieces of text to be placed before and after the markup insertion.
{@code MARKUP} is a required element, which gives the name of the markup to be expanded recursively.
{@code MEMBER} gives the name of the data member within the companion object to be used as the companion object for the recursive expansion of the markup. If this name is \"-\", the current companion object is reused instead. If omitted, the value of {@code MARKUP} is used as this name.
{@code ALTERN} is an optional element, which gives the name of an alternative markup in the case the data member has no value.
{@code (ARGS)} is an optional list of positional arguments to be passed to the markup, which refers to such arguments using positional argument parameters {@code {1}}, {@code {2}}, etc.
@param resources a collection of named text resources @param name the name of the text markup to be expanded @param object an object providing values to the parameters, which will be wrapped if not an open object already @throws IllegalArgumentException if any reference to a text markup cannot be resolved @throws NullPointerException if any reference to a data member cannot be resolved and the data member is required in the subsequence markup expansion @return the fully expanded text", "label": 1, "domain": "code", "token_count": 355, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0142", "text": "Creates a new file explorer. @name orion.explorer.FileExplorer @class A user interface component that displays a table-oriented file explorer @extends orion.explorer.Explorer @param {Object} options.treeRoot an Object representing the root of the tree. @param {orion.selection.Selection} options.selection the selection service used to track selections. @param {orion.fileClient.FileClient} options.fileClient the file service used to retrieve file information @param {String|Element} options.parentId the id of the parent DOM element, or the parent DOM element itself. @param {Function} options.rendererFactory a factory that creates a renderer @param {Boolean} options.excludeFiles specifies that files should not be shown. Optional. @param {Boolean} options.excludeFolders specifies that folders should not be shown. Optional. @param {Object} [options.navHandlerFactory] Optional factory to use for creating the explorer's nav handler. Must provide a function createNavHandler(explorer, explorerNavDict, options). @param {orion.serviceregistry.ServiceRegistry} options.serviceRegistry the service registry to use for retrieving other Orion services. Optional. If not specified, then some features of the explorer will not be enabled, such as status reporting, honoring preference settings, etc. @param {Boolean} [options.setFocus=true] Whether the explorer should steal keyboard focus when rendered. The default is to steal focus. Root model item of the tree. @name orion.explorer.FileExplorer#treeRoot @field @type Object Dispatches events describing model changes. @name orion.explorer.FileExplorer#modelEventDispatcher @type orion.EventTarget Handles model changes. @name orion.explorer.FileExplorer#modelHandler @type orion.explorer.FileExplorer.ModelHandler", "label": 1, "domain": "code", "token_count": 364, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0143", "text": "Lists a collection of operations associated with tags. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param api_id [String] API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @param filter [String] | Field | Supported operators | Supported functions | |-------------|------------------------|---------------------------------------------| | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | @param top [Integer] Number of records to return. @param skip [Integer] Number of records to skip. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 324, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0144", "text": "Builds the mesh information into a {@link com.flowpowered.caustic.api.data.VertexData} which can then be uploaded and rendered. The {@code sizes} parameter is used to control which information to use and generate. The component represents the number of float components per vertex for the attribute. The position are added if the x component of {@code sizes} is non zero and list isn't null. The normals are added if the y component of {@code sizes} is non zero and the list isn't null. If the list is null but the component is non zero, they are generated based on the position information if it's available (the list is not null) and then added. If the y component is zero, they are ignored. See {@link #generateNormals(gnu.trove.list.TFloatList, gnu.trove.list.TIntList, gnu.trove.list.TFloatList)}. The texture coordinates are added if the z component of {@code sizes} is non zero and list isn't null. Tangents are generated from all the previous information if it's available (lists are not null) and the w component of {@code sizes} is non zero. See {@link #generateTangents(gnu.trove.list.TFloatList, gnu.trove.list.TFloatList, gnu.trove.list.TFloatList, gnu.trove.list.TIntList, gnu.trove.list.TFloatList)}. Indices are always added and are required. @param sizes Each component represents the number of float components per vertex for the attribute, with x for positions, y for normals, z for texture coords, and w for tangents @param positions The list of position data @param normals The list of normal data @param textureCoords The list of texture coordinate data @param indices The list of indices @return The vertex data", "label": 1, "domain": "code", "token_count": 388, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0145", "text": "Get extra metadata tagged with a registry keyword. For example: ", "label": 1, "domain": "code", "token_count": 382, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0146", "text": "Creates a new FileService object. If no connection string or storageaccount and storageaccesskey are provided, the AZURE_STORAGE_CONNECTION_STRING or AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY environment variables will be used. @class The FileService class is used to perform operations on the Microsoft Azure File Service. The File Service provides storage for binary large objects, and provides functions for working with data stored in files. For more information on the File Service, as well as task focused information on using it in a Node.js application, see [How to Use the File Service from Node.js](http://azure.microsoft.com/en-us/documentation/articles/storage-nodejs-how-to-use-file-storage/). The following defaults can be set on the file service. defaultTimeoutIntervalInMs The default timeout interval, in milliseconds, to use for request made via the file service. defaultEnableReuseSocket The default boolean value to enable socket reuse when uploading local files or streams. If the Node.js version is lower than 0.10.x, socket reuse will always be turned off. defaultClientRequestTimeoutInMs The default timeout of client requests, in milliseconds, to use for the request made via the file service. defaultMaximumExecutionTimeInMs The default maximum execution time across all potential retries, for requests made via the file service. defaultLocationMode The default location mode for requests made via the file service. parallelOperationThreadCount The number of parallel operations that may be performed when uploading a file. useNagleAlgorithm Determines whether the Nagle algorithm is used for requests made via the file service; true to use the Nagle algorithm; otherwise, false. The default value is false. enableGlobalHttpAgent Determines whether global HTTP(s) agent is enabled; true to use Global HTTP(s) agent; otherwise, false to use http(s).Agent({keepAlive:true}). @constructor @extends {StorageServiceClient} @param {string} [storageAccountOrConnectionString] The storage account or the connection string. @param {string} [storageAccessKey] The storage access key. @param {string|object} [host] The host address. To define primary only, pass a string. Otherwise 'host.primaryHost' defines the primary host and 'host.secondaryHost' defines the secondary host. @param {string} [sasToken] The Shared Access Signature token. @param {string} [endpointSuffix] The endpoint suffix.", "label": 1, "domain": "code", "token_count": 487, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0147", "text": "Entry point for running the NetworkMonitor.
An IP host or port identifier has to be supplied, specifying the endpoint for the KNX network access. To show the usage message of this tool on the console, supply the command line option -help (or -h). Command line options are treated case sensitive. Available options for network monitoring:
-help -h show help message
-version show tool/library version and exit
-verbose -v enable verbose status output
-localhostid local IP/host name
-localportnumber local UDP port (default system assigned)
-port -pnumber UDP port on host (default 3671)
-nat -n enable Network Address Translation
-serial -s use FT1.2 serial communication
-medium -mid KNX medium [tp0|tp1|p110|p132|rf] (defaults to tp1)
Perform am URI fragment identifier escape operation on a char[] input using UTF-8 as encoding.
The following are the only allowed chars in an URI fragment identifier (will not be escaped):
A-Z a-z 0-9
- . _ ~
! $ & ' ( ) * + , ; =
: @
/ ?
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
@param text the char[] to be escaped. @param offset the position in text at which the escape operation should start. @param len the number of characters in text that should be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs", "label": 1, "domain": "code", "token_count": 334, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0149", "text": "function takes input of ipaddress to RESTFUL call to HP IMC :param ipaddress: The current IP address of the Access Point at time of query. :param auth: requests auth object #usually auth.creds from auth pyhpeimc.auth.class :param url: base url of IMC RS interface #usually auth.url from pyhpeimc.auth.authclass :return: Dictionary object with the details of the target access point :rtype: dict >>> from pyhpeimc.auth import * >>> from pyhpeimc.wsm.apinfo import * >>> auth = IMCAuth(\"http://\", \"10.101.0.203\", \"8080\", \"admin\", \"admin\") >>> ap_info = get_ap_info('10.101.0.170',auth.creds, auth.url) >>> assert type(ap_info) is dict >>> assert len(ap_info) == 20 >>> assert 'acDevId' in ap_info >>> assert 'acIpAddress' in ap_info >>> assert 'acLabel' in ap_info >>> assert 'apAlias' in ap_info >>> assert 'connectType' in ap_info >>> assert 'hardwareVersion' in ap_info >>> assert 'ipAddress' in ap_info >>> assert 'isFit' in ap_info >>> assert 'label' in ap_info >>> assert 'location' in ap_info >>> assert 'locationList' in ap_info >>> assert 'macAddress' in ap_info >>> assert 'onlineClientCount' in ap_info >>> assert 'serialId' in ap_info >>> assert 'softwareVersion' in ap_info >>> assert 'ssids' in ap_info >>> assert 'status' in ap_info >>> assert 'sysName' in ap_info >>> assert 'type' in ap_info", "label": 1, "domain": "code", "token_count": 355, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0150", "text": "@class A KeyBinding is an interface used to define keyboard shortcuts. @name orion.KeyBinding @property {Function} match The function to match events. @property {Function} equals The funtion to compare to key bindings. @see orion.KeyStroke @see orion.KeySequence Constructs a new key stroke with the given key code, modifiers and event type. @param {String|Number} keyCode the key code. @param {Boolean} mod1 the primary modifier (usually Command on Mac and Control on other platforms). @param {Boolean} mod2 the secondary modifier (usually Shift). @param {Boolean} mod3 the third modifier (usually Alt). @param {Boolean} mod4 the fourth modifier (usually Control on the Mac). @param {String} type the type of event that the keybinding matches; either \"keydown\" or \"keypress\". @class A KeyStroke represents of a key code and modifier state that can be triggered by the user using the keyboard. @name orion.KeyStroke @property {String|Number} keyCode The key code. @property {Boolean} mod1 The primary modifier (usually Command on Mac and Control on other platforms). @property {Boolean} mod2 The secondary modifier (usually Shift). @property {Boolean} mod3 The third modifier (usually Alt). @property {Boolean} mod4 The fourth modifier (usually Control on the Mac). @property {String} [type=keydown] The type of event that the keybinding matches; either \"keydown\" or \"keypress\" @see orion.editor.TextView#setKeyBinding", "label": 1, "domain": "code", "token_count": 322, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0151", "text": "Applies a session keep alive entry to the state machine.
Keep alive entries are applied to the internal state machine to reset the timeout for a specific session. If the session indicated by the KeepAliveEntry is still held in memory, we mark the session as trusted, indicating that the client has committed a keep alive within the required timeout. Additionally, we check all other sessions for expiration based on the timestamp provided by this KeepAliveEntry. Note that sessions are never completely expired via this method. Leaders must explicitly commit an UnregisterEntry to expire a session.
When a KeepAliveEntry is committed to the internal state machine, two specific fields provided in the entry are used to update server-side session state. The {@code commandSequence} indicates the highest command for which the session has received a successful response in the proper sequence. By applying the {@code commandSequence} to the server session, we clear command output held in memory up to that point. The {@code eventVersion} indicates the index up to which the client has received event messages in sequence for the session. Applying the {@code eventVersion} to the server-side session results in events up to that index being removed from memory as they were acknowledged by the client. It's essential that both of these fields be applied via entries committed to the Raft log to ensure they're applied on all servers in sequential order.
Keep alive entries are retained in the log until the next time the client sends a keep alive entry or until the client's session is expired. This ensures for sessions that have long timeouts, keep alive entries cannot be cleaned from the log before they're replicated to some servers.", "label": 1, "domain": "code", "token_count": 337, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0152", "text": "Replies one position factor for the intersection point between two lines.
Let line equations for L1 and L2: L1: P1 + factor1 * (P2-P1) L2: P3 + factor2 * (P4-P3) If lines are intersecting, then P1 + factor1 * (P2-P1) = P3 + factor2 * (P4-P3)
This function computes and replies factor1. @param x1 is the first point of the first line. @param y1 is the first point of the first line. @param z1 is the first point of the first line. @param x2 is the second point of the first line. @param y2 is the second point of the first line. @param z2 is the second point of the first line. @param x3 is the first point of the second line. @param y3 is the first point of the second line. @param z3 is the first point of the second line. @param x4 is the second point of the second line. @param y4 is the second point of the second line. @param z4 is the second point of the second line. @return factor1 or {@link Double#NaN} if no intersection.", "label": 1, "domain": "code", "token_count": 301, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0153", "text": "This regex is used to validate the structure of the challenge header. Match whole structure: ^\\s*Bearer\\s+([^,\\s=\"]+?)=\"([^\"]*?)\"\\s*(,\\s*([^,\\s=\"]+?)=\"([^\"]*?)\"\\s*)*$ ^ Start at the beginning of the string. \\s*Bearer\\s+ Match 'Bearer' surrounded by one or more amount of whitespace. ([^,\\s=\"]+?) This cpatures the key which is composed of any characters except comma, whitespace or a quotes. = Match the = sign. \"([^\"]*?)\" Captures the value can be any number of non quote characters. At this point only the first key value pair as been captured. \\s* There can be any amount of white space after the first key value pair. ( Start a capture group to retrieve the rest of the key value pairs that are separated by commas. \\s* There can be any amount of whitespace before the comma. , There must be a comma. \\s* There can be any amount of whitespace after the comma. (([^,\\s=\"]+?) This will capture the key that comes after the comma. It's made of a series of any character excpet comma, whitespace or quotes. = Match the equal sign between the key and value. \" Match the opening quote of the value. ([^\"]*?) This will capture the value which can be any number of non quote characters. \" Match the values closing quote. \\s* There can be any amount of whitespace before the next comma. )* Close the capture group for key value pairs. There can be any number of these. $ The rest of the string can be whitespace but nothing else up to the end of the string. In other some other languages the regex above would be all that was needed. However, in JavaScript the RegExp object does not return all of the captures in one go. So the regex above needs to be broken up so that captures can be retrieved iteratively.", "label": 1, "domain": "code", "token_count": 409, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0154", "text": "Accepts a custom Rack environment to render templates in. It will be merged with the default Rack environment defined by +ActionController::Renderer::DEFAULTS+. Render templates with any options from ActionController::Base#render_to_string. The primary options are: * :partial - See ActionView::PartialRenderer for details. * :file - Renders an explicit template file. Add :locals to pass in, if so desired. It shouldn’t be used directly with unsanitized user input due to lack of validation. * :inline - Renders an ERB template string. * :plain - Renders provided text and sets the content type as text/plain. * :html - Renders the provided HTML safe string, otherwise performs HTML escape on the string first. Sets the content type as text/html. * :json - Renders the provided hash or object in JSON. You don't need to call .to_json on the object you want to render. * :body - Renders provided text and sets content type of text/plain. If no options hash is passed or if :update is specified, the default is to render a partial and use the second parameter as the locals hash.", "label": 1, "domain": "code", "token_count": 308, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0155", "text": "Gets the information about the specific service belonging to the Service Fabric application. Returns the information about the specified service belonging to the specified Service Fabric application. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the application name is \"fabric:/myapp/app1\", the application identity would be \"myapp~app1\" in 6.0+ and \"myapp/app1\" in previous versions. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the service name is \"fabric:/myapp/app1/svc1\", the service identity would be \"myapp~app1~svc1\" in 6.0+ and \"myapp/app1/svc1\" in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 311, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0156", "text": "/* Carry out division operations. /* Arg1 is operation code: D=divide, I=integer divide, R=remainder Arg2 is the rhs. Arg3 is the context. Arg4 is explicit scale iff code='D' or 'I' (-1 if none). Underlying algorithm (complications for Remainder function and scaled division are omitted for clarity): Test for x/0 and then 0/x Exp =Exp1 - Exp2 Exp =Exp +len(var1) -len(var2) Sign=Sign1 * Sign2 Pad accumulator (Var1) to double-length with 0's (pad1) Pad Var2 to same length as Var1 B2B=1st two digits of var2, +1 to allow for roundup have=0 Do until (have=digits+1 OR residue=0) if exp<0 then if integer divide/residue then leave this_digit=0 Do forever compare numbers if <0 then leave inner_loop if =0 then (- quick exit without subtract -) do this_digit=this_digit+1; output this_digit leave outer_loop; end Compare lengths of numbers (mantissae): If same then CA=first_digit_of_Var1 else CA=first_two_digits_of_Var1 mult=ca*10/b2b -- Good and safe guess at divisor if mult=0 then mult=1 this_digit=this_digit+mult subtract end inner_loop if have\\=0 | this_digit\\=0 then do output this_digit have=have+1; end var2=var2/10 exp=exp-1 end outer_loop exp=exp+1 -- set the proper exponent if have=0 then generate answer=0 Return to FINISHED Result defined by MATHV1 For extended commentary, see DMSRCN. --private com.ibm.icu.math.BigDecimal dodivide(char code,com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set,int scale){", "label": 1, "domain": "code", "token_count": 405, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0157", "text": ">>> import pprint >>> input_line1 = 'Apr 24 00:00:02 node haproxy[12298]: 1.1.1.1:48660 [24/Apr/2019:00:00:02.358] pre-staging~ pre-staging_doc/pre-staging_active 261/0/2/8/271 200 2406 - - ---- 4/4/0/1/0 0/0 {AAAAAA:AAAAA_AAAAA:AAAAA_AAAAA_AAAAA:300A||| user@mail.net:sdasdasdasdsdasAHDivsjd=|user@mail.net|2018} \"GET /doc/api/get?call=apple HTTP/1.1\"' >>> output_line1 = haproxy(input_line1) >>> pprint.pprint(output_line1) {'data': {'Tc': 2.0, 'Tq': 261.0, 'Tr': 8.0, 'Tw': 0.0, '_api': '/doc/api/get?call=apple', '_headers': ['AAAAAA:AAAAA_AAAAA:AAAAA_AAAAA_AAAAA:300A||| user@mail.net:sdasdasdasdsdasAHDivsjd=|user@mail.net|2018'], 'actconn': 4, 'backend': 'pre-staging_doc/pre-staging_active', 'backend_queue': 0, 'beconn': 1, 'bytes_read': 2406.0, 'client_port': '48660', 'client_server': '1.1.1.1', 'feconn': 4, 'front_end': 'pre-staging~', 'haproxy_server': 'node', 'method': 'GET', 'resp_time': 271.0, 'retries': 0, 'srv_conn': 0, 'srv_queue': 0, 'status': '200', 'timestamp': '2019-04-24T00:00:02.358000'}, 'event': 'haproxy_event', 'timestamp': '2019-04-24T00:00:02.358000', 'type': 'metric'}", "label": 1, "domain": "code", "token_count": 459, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0158", "text": "roll the year of the given calendar field. @method rollYear @param {Number} amount the signed amount to add to field. roll the month of the given calendar field. @param {Number} amount the signed amount to add to field. @method rollMonth roll the day of month of the given calendar field. @method rollDayOfMonth @param {Number} amount the signed amount to add to field. roll the hour of day of the given calendar field. @method rollHourOfDay @param {Number} amount the signed amount to add to field. roll the minute of the given calendar field. @method rollMinute @param {Number} amount the signed amount to add to field. roll the second of the given calendar field. @method rollSecond @param {Number} amount the signed amount to add to field. roll the millisecond of the given calendar field. @method rollMilliSecond @param {Number} amount the signed amount to add to field. roll the week of year of the given calendar field. @method rollWeekOfYear @param {Number} amount the signed amount to add to field. roll the week of month of the given calendar field. @method rollWeekOfMonth @param {Number} amount the signed amount to add to field. roll the day of year of the given calendar field. @method rollDayOfYear @param {Number} amount the signed amount to add to field. roll the day of week of the given calendar field. @method rollDayOfWeek @param {Number} amount the signed amount to add to field. remove other priority fields when call getFixedDate precondition: other fields are all set or computed @protected", "label": 1, "domain": "code", "token_count": 338, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0159", "text": "This operation extracts a rich set of visual features based on the image content. Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong. @param url [String] Publicly reachable URL of an image. @param visual_features [Array] A string indicating what visual feature types to return. Multiple values should be comma-separated. Valid visual feature types include: Categories - categorizes image content according to a taxonomy defined in documentation. Tags - tags the image with a detailed list of words related to the image content. Description - describes the image content with a complete English sentence. Faces - detects if faces are present. If present, generate coordinates, gender and age. ImageType - detects if image is clipart or a line drawing. Color - determines the accent color, dominant color, and whether an image is black&white. Adult - detects if the image is pornographic in nature (depicts nudity or a sex act). Sexually suggestive content is also detected. Objects - detects various objects within an image, including the approximate location. The Objects argument is only available in English. Brands - detects various brands within an image, including the approximate location. The Brands argument is only available in English. @param details [Array] A string indicating which domain-specific details to return. Multiple values should be comma-separated. Valid visual feature types include: Celebrities - identifies celebrities if detected in the image, Landmarks - identifies notable landmarks in the image. @param language [Enum] The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh' @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ImageAnalysis] operation results.", "label": 1, "domain": "code", "token_count": 476, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0160", "text": "Follows the dynamic \"14.5.12 Expression edm:Path\" (or variant thereof) contained within the given raw value, starting the absolute path identified by the given interface, and returns the resulting absolute path as well as some other aspects about the path. @param {sap.ui.core.util.XMLPreprocessor.IContext|sap.ui.model.Context} oInterface the callback interface related to the current formatter call; the path must be within a complex or entity type! @param {object} oRawValue the raw value from the meta model, e.g. {AnnotationPath : \"ToSupplier/@com.sap.vocabularies.Communication.v1.Address\"} or {AnnotationPath : \"@com.sap.vocabularies.UI.v1.FieldGroup#Dimensions\"}; embedded within an entity set or entity type @returns {object} - {object} [associationSetEnd=undefined] association set end corresponding to the last navigation property - {boolean} [navigationAfterMultiple=false] if the navigation path has an association end with multiplicity \"*\" which is not the last one - {boolean} [isMultiple=false] whether the navigation path ends with an association end with multiplicity \"*\" - {string[]} [navigationProperties=[]] all navigation property names - {string} [resolvedPath=undefined] the resulting absolute path @see sap.ui.model.odata.AnnotationHelper.getNavigationPath @see sap.ui.model.odata.AnnotationHelper.gotoEntitySet @see sap.ui.model.odata.AnnotationHelper.isMultiple @see sap.ui.model.odata.AnnotationHelper.resolvePath", "label": 1, "domain": "code", "token_count": 318, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0161", "text": "creates an API for an HTMLCanvasElement where all drawables are treated as self-contained Objects that can add/remove themselves from the DisplayList, rather than having a single function aggregating all drawing instructions @constructor @param {number|{ width: number, height: number, animate: boolean, smoothing: boolean, stretchToFit: boolean, fps: number, onUpdate: Function, debug: boolean }} width when numerical (legacy 4 argument constructor), the desired width of the Canvas, when Object it should contain required properties width and height, with others optional (see description on the default values for animate and framerate below) \"smoothing\" specifies whether or not to use smoothing (default, better for photos) or not (better for pixel art) \"stretchToFit\" specifies whether or not to stretch the canvas to fit the window dimensions (defaults to false) note that the width is taken as the dominant factor, the height scales relative to the window ratio \"onUpdate\" callback method to execute when the canvas is about to render. This can be used to synchronize a game's model from a single spot (instead of having each sprite's update()-method fire) \"debug\" specifies whether or not all sprites should render their bounding box for debugging purposes When object, no further arguments will be processed by this constructor @param {number=} height desired height of the Canvas @param {boolean=} animate specifies whether we will animate the Canvas (redraw it constantly on each animationFrame), this defaults to false to preserve resources (and will only (re)draw when adding/removing sprites from the display list) set this to true when creating animated content / games @param {number=} framerate (defaults to 60), only useful when animate is true", "label": 1, "domain": "code", "token_count": 349, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0162", "text": "Sends a health report on the Service Fabric cluster. Sends a health report on a Service Fabric cluster. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway node, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, run GetClusterHealth and check that the report appears in the HealthEvents section. @param health_information [HealthInformation] Describes the health information for the health report. This information needs to be present in all of the health reports sent to the health manager. @param immediate [Boolean] A flag which indicates whether the report should be sent immediately. A health report is sent to a Service Fabric gateway Application, which forwards to the health store. If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. This is useful for critical reports that should be sent as soon as possible. Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval configuration. This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. By default, reports are not sent immediately. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.", "label": 1, "domain": "code", "token_count": 427, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0163", "text": "Returns true if the URI objects are equal. This method normalizes both URIs before doing the comparison, and allows comparison against Strings. @param [Object] uri The URI to compare. @return [TrueClass, FalseClass] true if the URIs are equivalent, false otherwise. Returns true if the URI objects are equal. This method normalizes both URIs before doing the comparison. @param [Object] uri The URI to compare. @return [TrueClass, FalseClass] true if the URIs are equivalent, false otherwise. Returns true if the URI objects are equal. This method does NOT normalize either URI before doing the comparison. @param [Object] uri The URI to compare. @return [TrueClass, FalseClass] true if the URIs are equivalent, false otherwise. A hash value that will make a URI equivalent to its normalized form. @return [Integer] A hash of the URI. Clones the URI object. @return [Addressable::URI] The cloned URI. Omits components from a URI. @param [Symbol] *components The components to be omitted. @return [Addressable::URI] The URI with components omitted. @example uri = Addressable::URI.parse(\"http://example.com/path?query\") #=> # uri.omit(:scheme, :authority) #=> #", "label": 1, "domain": "code", "token_count": 358, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0164", "text": "Creates and caches a new AWS Kinesis instance with the given Kinesis constructor options for either the region specified in the given options (if any and region specified) or for the current region (if not) UNLESS a previously cached Kinesis instance exists and the given options either match the options used to construct it or are undefined, empty or only region was specified, in which case no new instance will be created and the cached instance will be returned instead. If the given options do not match existing options and are not empty and not only region, then logs a warning that the previously cached Kinesis instance is being replaced and returns the new AWS Kinesis instance. Logging should be configured before calling this function (see {@linkcode logging-utils/logging#configureLogging}) Configures the given context, if it does not already have a context.kinesis, with the cached kinesis instance for either the region specified in the given default kinesis options (if any and region specified) or for the current region (if not); otherwise with a new AWS.Kinesis instance created and cached by {@linkcode setKinesis} for the specified or current region using the given default Kinesis constructor options. Note that the given default Kinesis constructor options will ONLY be used if no cached Kinesis instance exists. Logging should be configured before calling this function (see {@linkcode logging-utils/logging#configureLogging}) @param {Object|KinesisAware} context - the context to configure @param {Object|undefined} [kinesisOptions] - the optional Kinesis constructor options to use if no cached Kinesis instance exists @param {string|undefined} [kinesisOptions.region] - an optional region to use instead of the current region @returns {KinesisAware} the given context configured with an AWS.Kinesis instance", "label": 1, "domain": "code", "token_count": 362, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0165", "text": "Negotiate a new SSH2 session as a server. This is the first step after creating a new L{Transport} and setting up your server host key(s). A separate thread is created for protocol negotiation. If an event is passed in, this method returns immediately. When negotiation is done (successful or not), the given C{Event} will be triggered. On failure, L{is_active} will return C{False}. (Since 1.4) If C{event} is C{None}, this method will not return until negotation is done. On success, the method returns normally. Otherwise an SSHException is raised. After a successful negotiation, the client will need to authenticate. Override the methods L{get_allowed_auths }, L{check_auth_none }, L{check_auth_password }, and L{check_auth_publickey } in the given C{server} object to control the authentication process. After a successful authentication, the client should request to open a channel. Override L{check_channel_request } in the given C{server} object to allow channels to be opened. @note: After calling this method (or L{start_client} or L{connect}), you should no longer directly read from or write to the original socket object. @param event: an event to trigger when negotiation is complete. @type event: threading.Event @param server: an object used to perform authentication and create L{Channel}s. @type server: L{server.ServerInterface} @raise SSHException: if negotiation fails (and no C{event} was passed in)", "label": 1, "domain": "code", "token_count": 357, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0166", "text": "Model for the contents of a single file and its current modification state. See DocumentManager documentation for important usage notes. Document dispatches these events: __change__ -- When the text of the editor changes (including due to undo/redo). Passes ({Document}, {ChangeList}), where ChangeList is an array of change record objects. Each change record looks like: { from: start of change, expressed as {line: , ch: }, to: end of change, expressed as {line: , ch: }, text: array of lines of text to replace existing text } The line and ch offsets are both 0-based. The ch offset in \"from\" is inclusive, but the ch offset in \"to\" is exclusive. For example, an insertion of new content (without replacing existing content) is expressed by a range where from and to are the same. If \"from\" and \"to\" are undefined, then this is a replacement of the entire text content. IMPORTANT: If you listen for the \"change\" event, you MUST also addRef() the document (and releaseRef() it whenever you stop listening). You should also listen to the \"deleted\" event. __deleted__ -- When the file for this document has been deleted. All views onto the document should be closed. The document will no longer be editable or dispatch \"change\" events. __languageChanged__ -- When the value of getLanguage() has changed. 2nd argument is the old value, 3rd argument is the new value. @constructor @param {!File} file Need not lie within the project. @param {!Date} initialTimestamp File's timestamp when we read it off disk. @param {!string} rawText Text content of the file.", "label": 1, "domain": "code", "token_count": 370, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0167", "text": " Generate an RSA key pair. The public portion of the generated RSA key is saved to <'filepath'>.pub, whereas the private key portion is saved to <'filepath'>. If no password is given, the user is prompted for one. If the 'password' is an empty string, the private key is saved unencrypted to <'filepath'>. If the filepath is not given, the KEYID is used as the filename and the keypair saved to the current working directory. The best available form of encryption, for a given key's backend, is used with pyca/cryptography. According to their documentation, \"it is a curated encryption choice and the algorithm may change over time.\" filepath: The public and private key files are saved to .pub and , respectively. If the filepath is not given, the public and private keys are saved to the current working directory as .pub and . KEYID is the generated key's KEYID. bits: The number of bits of the generated RSA key. password: The password to encrypt 'filepath'. If None, the user is prompted for a password. If an empty string is given, the private key is written to disk unencrypted. securesystemslib.exceptions.FormatError, if the arguments are improperly formatted. Writes key files to '' and '.pub'. The 'filepath' of the written key.", "label": 1, "domain": "code", "token_count": 304, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0168", "text": "Constructs a matrix. @alias Matrix @constructor @classdesc Represents a 4 x 4 double precision matrix stored in a Float64Array in row-major order. @param {Number} m11 matrix element at row 1, column 1. @param {Number} m12 matrix element at row 1, column 2. @param {Number} m13 matrix element at row 1, column 3. @param {Number} m14 matrix element at row 1, column 4. @param {Number} m21 matrix element at row 2, column 1. @param {Number} m22 matrix element at row 2, column 2. @param {Number} m23 matrix element at row 2, column 3. @param {Number} m24 matrix element at row 2, column 4. @param {Number} m31 matrix element at row 3, column 1. @param {Number} m32 matrix element at row 3, column 2. @param {Number} m33 matrix element at row 3, column 3. @param {Number} m34 matrix element at row 3, column 4. @param {Number} m41 matrix element at row 4, column 1. @param {Number} m42 matrix element at row 4, column 2. @param {Number} m43 matrix element at row 4, column 3. @param {Number} m44 matrix element at row 4, column 4.", "label": 1, "domain": "code", "token_count": 322, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0169", "text": "Writes the LIGO Light Weight document tree rooted at xmldoc to the given file object. Internally, the .write() method of the xmldoc object is invoked and any additional keyword arguments are passed to that method. The file object need not be seekable. The output data is gzip compressed on the fly if gz is True. The return value is a string containing the hex digits of the MD5 digest of the output bytestream. This function traps the signals in the trap_signals iterable during the write process (the default is signal.SIGTERM and signal.SIGTSTP), and it does this by temporarily installing its own signal handlers in place of the current handlers. This is done to prevent Condor eviction during the write process. When the file write is concluded the original signal handlers are restored. Then, if signals were trapped during the write process, the signals are then resent to the current process in the order in which they were received. The signal.signal() system call cannot be invoked from threads, and trap_signals must be set to None or an empty sequence if this function is used from a thread. Example: >>> import sys >>> from pycbc_glue.ligolw import ligolw >>> xmldoc = load_filename(\"demo.xml\", contenthandler = ligolw.LIGOLWContentHandler) >>> digest = write_fileobj(xmldoc, sys.stdout) # doctest: +NORMALIZE_WHITESPACE
\"mass\",0.5,\"velocity\",34
>>> digest '37044d979a79409b3d782da126636f53'", "label": 1, "domain": "code", "token_count": 435, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0170", "text": "Replies if the triangle intersects the oriented box. @param tx1 x coordinate of the first point of the triangle. @param ty1 y coordinate of the first point of the triangle. @param tz1 z coordinate of the first point of the triangle. @param tx2 x coordinate of the second point of the triangle. @param ty2 y coordinate of the second point of the triangle. @param tz2 z coordinate of the second point of the triangle. @param tx3 x coordinate of the third point of the triangle. @param ty3 y coordinate of the third point of the triangle. @param tz3 z coordinate of the third point of the triangle. @param cx x coordinate of the center of the oriented box. @param cy y coordinate of the center of the oriented box. @param cz z coordinate of the center of the oriented box. @param ax1 x coordinate of the first axis of the oriented box. @param ay1 y coordinate of the first axis of the oriented box. @param az1 z coordinate of the first axis of the oriented box. @param ax2 x coordinate of the second axis of the oriented box. @param ay2 y coordinate of the second axis of the oriented box. @param az2 z coordinate of the second axis of the oriented box. @param ax3 x coordinate of the third axis of the oriented box. @param ay3 y coordinate of the third axis of the oriented box. @param az3 z coordinate of the third axis of the oriented box. @param ae1 the extent of the first axis. @param ae2 the extent of the second axis. @param ae3 the extent of the third axis. @return true if the triangle and oriented box are intersecting.", "label": 1, "domain": "code", "token_count": 361, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0171", "text": "Attempts to create a record with the given attributes in a table that has a unique constraint on one or several of its columns. If a row already exists with one or several of these unique constraints, the exception such an insertion would normally raise is caught, and the existing record with those attributes is found using #find_by!. This is similar to #find_or_create_by, but avoids the problem of stale reads between the SELECT and the INSERT, as that method needs to first query the table, then attempt to insert a row if none is found. There are several drawbacks to #create_or_find_by, though: * The underlying table must have the relevant columns defined with unique constraints. * A unique constraint violation may be triggered by only one, or at least less than all, of the given attributes. This means that the subsequent #find_by! may fail to find a matching record, which will then raise an ActiveRecord::RecordNotFound exception, rather than a record with the given attributes. * While we avoid the race condition between SELECT -> INSERT from #find_or_create_by, we actually have another race condition between INSERT -> SELECT, which can be triggered if a DELETE between those two statements is run by another client. But for most applications, that's a significantly less likely condition to hit. * It relies on exception handling to handle control flow, which may be marginally slower. * The primary key may auto-increment on each create, even if it fails. This can accelerate the problem of running out of integers, if the underlying table is still stuck on a primary key of type int (note: All Rails apps since 5.1+ have defaulted to bigint, which is not liable to this problem). This method will return a record if all given attributes are covered by unique constraints (unless the INSERT -> DELETE -> SELECT race condition is triggered), but if creation was attempted and failed due to validation errors it won't be persisted, you get what #create returns in such situation.", "label": 1, "domain": "code", "token_count": 405, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0172", "text": "Returns information about the requested domain. @param {Function} query @param {string|GetInfo} options The domain name, or options to get info about a domain. @param {string} options.domain The domain to get info about. @example // Obtain information for the testt.cc domain: await nc.domains.getInfo({ domain: 'testt.cc' }) await nc.domains.getInfo('testt.cc') // Result: { Status: 'Ok', ID: 30072635, DomainName: 'testt.cc', OwnerName: 'artdeco', IsOwner: true, IsPremium: false, DomainDetails: { CreatedDate: '06/06/2018', ExpiredDate: '06/06/2019', NumYears: 0 }, Whoisguard: { Enabled: 'True', ID: 23996873, ExpiredDate: '06/05/2019', EmailDetails: { WhoisGuardEmail: 'ff474db8ad3b4c3b95a2b0f3b3a73acc.protect[at]whoisguard.com', ForwardedTo: 'example[at]adc.sh', LastAutoEmailChangeDate: '', AutoEmailChangeFrequencyDays: 0 } }, PremiumDnsSubscription: { UseAutoRenew: false, SubscriptionId: -1, CreatedDate: 0001-01-01T00:00:00.000Z, ExpirationDate: 0001-01-01T00:00:00.000Z, IsActive: false }, DnsDetails: { ProviderType: 'CUSTOM', IsUsingOurDNS: false, HostCount: 2, EmailType: 'FWD', DynamicDNSStatus: false, IsFailover: false, Nameserver: [ 'ns-1013.awsdns-62.net', 'ns-1311.awsdns-35.org', 'ns-1616.awsdns-10.co.uk', 'ns-355.awsdns-44.com' ] }, Modificationrights: { All: true } }", "label": 1, "domain": "code", "token_count": 429, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0173", "text": "General analysis function that groups data by subject/list number and performs analysis. Parameters ---------- egg : Egg data object The data to be analyzed subjgroup : list of strings or ints String/int variables indicating how to group over subjects. Must be the length of the number of subjects subjname : string Name of the subject grouping variable listgroup : list of strings or ints String/int variables indicating how to group over list. Must be the length of the number of lists listname : string Name of the list grouping variable analysis : string This is the analysis you want to run. Can be accuracy, spc, pfr, temporal or fingerprint position : int Optional argument for pnr analysis. Defines encoding position of item to run pnr. Default is 0, and it is zero indexed permute : bool Optional argument for fingerprint/temporal cluster analyses. Determines whether to correct clustering scores by shuffling recall order for each list to create a distribution of clustering scores (for each feature). The \"corrected\" clustering score is the proportion of clustering scores in that random distribution that were lower than the clustering score for the observed recall sequence. Default is False. n_perms : int Optional argument for fingerprint/temporal cluster analyses. Number of permutations to run for \"corrected\" clustering scores. Default is 1000 ( per recall list). parallel : bool Option to use multiprocessing (this can help speed up the permutations tests in the clustering calculations) match : str (exact, best or smooth) Matching approach to compute recall matrix. If exact, the presented and recalled items must be identical (default). If best, the recalled item that is most similar to the presented items will be selected. If smooth, a weighted average of all presented items will be used, where the weights are derived from the similarity between the recalled item and each presented item. distance : str The distance function used to compare presented and recalled items. Applies only to 'best' and 'smooth' matching approaches. Can be any distance function supported by numpy.spatial.distance.cdist. Returns ---------- result : quail.FriedEgg Class instance containing the analysis results", "label": 1, "domain": "code", "token_count": 421, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0174", "text": "Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxCell Cells are the elements of the graph model. They represent the state of the groups, vertices and edges in a graph. Custom attributes: For custom attributes we recommend using an XML node as the value of a cell. The following code can be used to create a cell with an XML node as the value: (code) var doc = mxUtils.createXmlDocument(); var node = doc.createElement('MyNode') node.setAttribute('label', 'MyLabel'); node.setAttribute('attribute1', 'value1'); graph.insertVertex(graph.getDefaultParent(), null, node, 40, 40, 80, 30); (end) For the label to work, and should be overridden as follows: (code) graph.convertValueToString = function(cell) { if (mxUtils.isNode(cell.value)) { return cell.getAttribute('label', '') } }; var cellLabelChanged = graph.cellLabelChanged; graph.cellLabelChanged = function(cell, newValue, autoSize) { if (mxUtils.isNode(cell.value)) { // Clones the value for correct undo/redo var elt = cell.value.cloneNode(true); elt.setAttribute('label', newValue); newValue = elt; } cellLabelChanged.apply(this, arguments); }; (end) Callback: onInit Called from within the constructor. Constructor: mxCell Constructs a new cell to be used in a graph model. This method invokes upon completion. Parameters: value - Optional object that represents the cell value. geometry - Optional that specifies the geometry. style - Optional formatted string that defines the style.", "label": 1, "domain": "code", "token_count": 366, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0175", "text": "Subdivide the face (interpolate pos, norm, uv) - pos is linear interpolation, then projected to sphere (converge polyhedron to sphere) - norm is linear interpolation of vertex corner normal (to be checked if better to re-calc from face vertex, or if approximation is OK ??? ) - uv is linear interpolation Topology is as below for sub-divide by 2 vertex shown as v0,v1,v2 interp index is i1 to progress in range [v0,v1[ interp index is i2 to progress in range [v0,v2[ face index as (i1,i2) for /\\ : (i1,i2),(i1+1,i2),(i1,i2+1) and (i1,i2)' for \\/ : (i1+1,i2),(i1+1,i2+1),(i1,i2+1) i2 v2 ^ ^ / / \\ / / \\ / / \\ / / (0,1) \\ / #---------\\ / / \\ (0,0)'/ \\ / / \\ / \\ / / \\ / \\ / / (0,0) \\ / (1,0) \\ / #---------#---------\\ v0 v1 --------------------> i1 interp of (i1,i2): along i2 : x0=lerp(v0,v2, i2/S) <---> x1=lerp(v1,v2, i2/S) along i1 : lerp(x0,x1, i1/(S-i2)) centroid of triangle is needed to get help normal computation (c1,c2) are used for centroid location", "label": 1, "domain": "code", "token_count": 342, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0176", "text": "Replies if two lines are colinear.
The given two lines are described respectivaly by two points, i.e. {@code (x1,y1,z1)} and {@code (x2,y2,z2)} for the first line, and {@code (x3,y3,z3)} and {@code (x4,y4,z4)} for the second line.
If you are interested to test if the two lines are parallel, see {@link #isParallelLines(double, double, double, double, double, double, double, double, double, double, double, double)}. @param x1 is the X coordinate of the first point of the first line. @param y1 is the Y coordinate of the first point of the first line. @param z1 is the Z coordinate of the first point of the first line. @param x2 is the X coordinate of the second point of the first line. @param y2 is the Y coordinate of the second point of the first line. @param z2 is the Z coordinate of the second point of the first line. @param x3 is the X coordinate of the first point of the second line. @param y3 is the Y coordinate of the first point of the second line. @param z3 is the Z coordinate of the first point of the second line. @param x4 is the X coordinate of the second point of the second line. @param y4 is the Y coordinate of the second point of the second line. @param z4 is the Z coordinate of the second point of the second line. @return true if the two given lines are collinear. @see #isParallelLines(double, double, double, double, double, double, double, double, double, double, double, double) @see Point3f#isCollinearPoints(double, double, double, double, double, double, double, double, double, double)", "label": 1, "domain": "code", "token_count": 409, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0177", "text": "
Generates a stream by regrouping the elements of the provided stream and putting them in a substream. The number of elements regrouped is the groupingFactor.
Example:
{@code Stream stream = Stream.of(\"a0\", \"a1\", \"a2\", \"a3\"); Stream> groupingStream = StreamsUtils.group(stream, 2); List> collect = groupingStream.map(st -> st.collect(Collectors.toList())).collect(Collectors.toList()); // The collect list is [[\"a0\", \"a1\"][\"a2\", \"a3\"]] }
If the provided stream is empty, then the returned stream contains an empty stream.
The groupingFactor should be greater of equals than 2. A grouping factor of 0 does not make sense. A grouping factor of 1 is in fact a mapping with a Stream::of. An IllegalArgumentException will be thrown if a non valid groupingFactor is provided.
An IllegalArgumentException will also be thrown if the provided stream is not ORDERED
The returned stream has the same characteristics as the provided stream, and is thus ORDERED.
All the returned substreams are guaranteed to produce groupingFactor elements. So there might be elements from the provided stream that will not be consumed in the grouped stream.
@param stream The stream to be grouped. Will throw a NullPointerException if null. @param groupingFactor The grouping factor, should be greater of equal than 2. @param The type of the elements of the provided stream. @return A grouped stream of streams.", "label": 1, "domain": "code", "token_count": 407, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0178", "text": "API to insert a list of file into DBS in DBS. Up to 10 files can be inserted in one request. :param qInserts: True means that inserts will be queued instead of done immediately. INSERT QUEUE Manager will perform the inserts, within few minutes. :type qInserts: bool :param filesList: List of dictionaries containing following information :type filesList: list of dicts :key logical_file_name: File to be inserted (str) (Required) :key is_file_valid: (optional, default = 1): (bool) :key block: required: /a/b/c#d (str) :key dataset: required: /a/b/c (str) :key file_type: (optional, default = EDM) one of the predefined types, (str) :key check_sum: (optional, default = '-1') (str) :key event_count: (optional, default = -1) (int) :key file_size: (optional, default = -1.) (float) :key adler32: (optional, default = '') (str) :key md5: (optional, default = '') (str) :key auto_cross_section: (optional, default = -1.) (float) :key file_lumi_list: (optional, default = []) [{'run_num': 123, 'lumi_section_num': 12},{}....] :key file_parent_list: (optional, default = []) [{'file_parent_lfn': 'mylfn'},{}....] :key file_assoc_list: (optional, default = []) [{'file_parent_lfn': 'mylfn'},{}....] :key file_output_config_list: (optional, default = []) [{'app_name':..., 'release_version':..., 'pset_hash':...., output_module_label':...},{}.....]", "label": 1, "domain": "code", "token_count": 381, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0179", "text": "Produce a list of files corresponding to format_str located at data_path. This routine is invoked by pysat and is not intended for direct use by the end user. Multiple data levels may be supported via the 'tag' and 'sat_id' input strings. Parameters ---------- tag : string ('') tag name used to identify particular data set to be loaded. This input is nominally provided by pysat itself. sat_id : string ('') Satellite ID used to identify particular data set to be loaded. This input is nominally provided by pysat itself. data_path : string Full path to directory containing files to be loaded. This is provided by pysat. The user may specify their own data path at Instrument instantiation and it will appear here. format_str : string (None) String template used to parse the datasets filenames. If a user supplies a template string at Instrument instantiation then it will appear here, otherwise defaults to None. Returns ------- pandas.Series Series of filename strings, including the path, indexed by datetime. Examples -------- :: If a filename is SPORT_L2_IVM_2019-01-01_v01r0000.NC then the template is 'SPORT_L2_IVM_{year:04d}-{month:02d}-{day:02d}_v{version:02d}r{revision:04d}.NC' Note ---- The returned Series should not have any duplicate datetimes. If there are multiple versions of a file the most recent version should be kept and the rest discarded. This routine uses the pysat.Files.from_os constructor, thus the returned files are up to pysat specifications. Normally the format_str for each supported tag and sat_id is defined within this routine. However, as this is a generic routine, those definitions can't be made here. This method could be used in an instrument specific module where the list_files routine in the new package defines the format_str based upon inputs, then calls this routine passing both data_path and format_str. Alternately, the list_files routine in nasa_cdaweb_methods may also be used and has more built in functionality. Supported tages and format strings may be defined within the new instrument module and passed as arguments to nasa_cdaweb_methods.list_files . For an example on using this routine, see pysat/instrument/cnofs_ivm.py or cnofs_vefi, cnofs_plp, omni_hro, timed_see, etc.", "label": 1, "domain": "code", "token_count": 494, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0180", "text": "Namespace provided by the mongodb-core and node.js @external Duplex Create a new GridStore instance Modes - **\"r\"** - read only. This is the default mode. - **\"w\"** - write in truncate mode. Existing data will be overwritten. @class @param {Db} db A database instance to interact with. @param {object} [id] optional unique id for this file @param {string} [filename] optional filename for this file, no unique constrain on the field @param {string} mode set the mode for this file. @param {object} [options] Optional settings. @param {(number|string)} [options.w] The write concern. @param {number} [options.wtimeout] The write concern timeout. @param {boolean} [options.j=false] Specify a journal write concern. @param {boolean} [options.fsync=false] Specify a file sync write concern. @param {string} [options.root] Root collection to use. Defaults to **{GridStore.DEFAULT_ROOT_COLLECTION}**. @param {string} [options.content_type] MIME type of the file. Defaults to **{GridStore.DEFAULT_CONTENT_TYPE}**. @param {number} [options.chunk_size=261120] Size for the chunk. Defaults to **{Chunk.DEFAULT_CHUNK_SIZE}**. @param {object} [options.metadata] Arbitrary data the user wants to store. @param {object} [options.promiseLibrary] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible @param {(ReadPreference|string)} [options.readPreference] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). @property {number} chunkSize Get the gridstore chunk size. @property {number} md5 The md5 checksum for this file. @property {number} chunkNumber The current chunk number the gridstore has materialized into memory @return {GridStore} a GridStore instance. @deprecated Use GridFSBucket API instead", "label": 1, "domain": "code", "token_count": 435, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0181", "text": "Multiple names may be provided. These will often be distinguished by being assigned by different authorities, as indicated by the value of the codeSpace attribute. In an instance document there will usually only be one name per authority.Gets the value of the name property.
This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the name property.
For example, to add a new item, do as follows:
getName().add(newItem);
Objects of the following type(s) are allowed in the list {@link JAXBElement }{@code <}{@link CodeType }{@code >} {@link JAXBElement }{@code <}{@link CodeType }{@code >} {@link JAXBElement }{@code <}{@link CodeType }{@code >} {@link JAXBElement }{@code <}{@link CodeType }{@code >} {@link JAXBElement }{@code <}{@link CodeType }{@code >} {@link JAXBElement }{@code <}{@link CodeType }{@code >} {@link JAXBElement }{@code <}{@link CodeType }{@code >} {@link JAXBElement }{@code <}{@link CodeType }{@code >} {@link JAXBElement }{@code <}{@link CodeType }{@code >} {@link JAXBElement }{@code <}{@link CodeType }{@code >}", "label": 1, "domain": "code", "token_count": 319, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0182", "text": "init Connect to the JSS MySQL database. @param args[Hash] the keyed arguments for connection. @option args :server[String] Required, the hostname of the JSS API server @option args :port[Integer] the port number to connect with, defaults to the default Mysql TCP port @option args :socket[String,Pathname] when the server is 'localhost', the path to the connection socket. @option args :db_name[String] the name of the database to use, defaults to 'jamfsoftware' @option args :user[String] Required, the mysql user to connect as @option args :pw[String,Symbol] Required, the password for that user, or :prompt, or :stdin If :prompt, the user is promted on the commandline to enter the password for the :user. If :stdin#, the password is read from a line of std in represented by the digit at #, so :stdin3 reads the passwd from the third line of standard input. defaults to line 2, if no digit is supplied. see {JSS.stdin} @option args :connect_timeout[Integer] the number of seconds to wait for an initial response, defaults to 120 @option args :read_timeout[Integer] the number of seconds before read-request times out, defaults to 120 @option args :write_timeout[Integer] the number of seconds before write-request times out, defaults to 120 @option args :timeout[Integer] used for any of the timeouts that aren't explicitly set. @return [true] the connection was successfully made.", "label": 1, "domain": "code", "token_count": 324, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0183", "text": "Reset all the column widths so that each column is *just* wide enough to accommodate its header text as well as the formatted content of each its cells for the entire collection, together with a single character of padding on either side of the column, without any wrapping. Note that calling this method will cause the entire source Enumerable to be traversed and all the column extractors and formatters to be applied in order to calculate the required widths. Note also that this method causes column widths to be fixed as appropriate to the formatted cell contents given the state of the source Enumerable at the point it is called. If the source Enumerable changes between that point, and the point when the Table is printed, then columns will *not* be resized yet again on printing. @param [nil, Numeric] max_table_width (:auto) With no args, or if passed :auto, stops the total table width (including padding and borders) from expanding beyond the bounds of the terminal screen. If passed nil, the table width will not be capped. Width is deducted from columns if required to achieve this, with one character progressively deducted from the width of the widest column until the target is reached. When the table is printed, wrapping or truncation will then occur in these columns as required (depending on how they were configured). Note that regardless of the value passed to max_table_width, the table will always be left wide enough to accommodate at least 1 character's width of content, 1 character of left padding and 1 character of right padding in each column, together with border characters (1 on each side of the table and 1 between adjacent columns). I.e. there is a certain width below width the Table will refuse to shrink itself. @return [Table] the Table itself", "label": 1, "domain": "code", "token_count": 365, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0184", "text": "Starts or stops a cluster node. Starts or stops a cluster node. A cluster node is a process, not the OS instance itself. To start a node, pass in \"Start\" for the NodeTransitionType parameter. To stop a node, pass in \"Stop\" for the NodeTransitionType parameter. This API starts the operation - when the API returns the node may not have finished transitioning yet. Call GetNodeTransitionProgress with the same OperationId to get the progress of the operation. @param node_name [String] The name of the node. @param operation_id A GUID that identifies a call of this API. This is passed into the corresponding GetProgress API @param node_transition_type [NodeTransitionType] Indicates the type of transition to perform. NodeTransitionType.Start will start a stopped node. NodeTransitionType.Stop will stop a node that is up. Possible values include: 'Invalid', 'Start', 'Stop' @param node_instance_id [String] The node instance ID of the target node. This can be determined through GetNodeInfo API. @param stop_duration_in_seconds [Integer] The duration, in seconds, to keep the node stopped. The minimum value is 600, the maximum is 14400. After this time expires, the node will automatically come back up. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.", "label": 1, "domain": "code", "token_count": 335, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0185", "text": "Mersenne Twister from https://gist.github.com/banksean/300494 /* A C-program for MT19937, with initialization improved 2002/1/26. Coded by Takuji Nishimura and Makoto Matsumoto. Before using, initialize the state by using init_genrand(seed) or init_by_array(init_key, key_length). Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Any feedback is very welcome. http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)", "label": 1, "domain": "code", "token_count": 404, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0186", "text": "Add a url to the handle record's \"10320/LOC\" entry. If no 10320/LOC entry exists, a new one is created (using the default \"chooseby\" attribute, if configured). If the URL is already present, it is not added again, but the attributes (e.g. weight) are updated/added. If the existing 10320/LOC entry is mal-formed, an exception will be thrown (xml.etree.ElementTree.ParseError) Note: In the unlikely case that several \"10320/LOC\" entries exist, an exception is raised. :param url: The URL to be added. :param list_of_entries: A list of the existing entries (to find and adapt the correct one). :param weight: Optional. The weight to be set (integer between 0 and 1). If None, no weight attribute is set. If the value is outside the accepted range, it is set to 1. :param http_role: Optional. The http_role to be set. This accepts any string. Currently, Handle System can process 'conneg'. In future, it may be able to process 'no_conneg' and 'browser'. :param handle: Optional. Only for the exception message. :param all others: Optional. All other key-value pairs will be set to the element. Any value is accepted and transformed to string. :raise: GenericHandleError: If several 10320/LOC exist (unlikely).", "label": 1, "domain": "code", "token_count": 301, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0187", "text": "Inserts a new VLAN. :param nome: Name of Vlan. String with a maximum of 50 characters. :param id_tipo_rede: Identifier of the Network Type. Integer value and greater than zero. :param id_ambiente: Identifier of the Environment. Integer value and greater than zero. :param descricao: Description of Vlan. String with a maximum of 200 characters. :param id_ambiente_vip: Identifier of the Environment Vip. Integer value and greater than zero. :return: Following dictionary: :: {'vlan': {'id': < id_vlan >, 'nome': < nome_vlan >, 'num_vlan': < num_vlan >, 'id_tipo_rede': < id_tipo_rede >, 'id_ambiente': < id_ambiente >, 'rede_oct1': < rede_oct1 >, 'rede_oct2': < rede_oct2 >, 'rede_oct3': < rede_oct3 >, 'rede_oct4': < rede_oct4 >, 'bloco': < bloco >, 'mascara_oct1': < mascara_oct1 >, 'mascara_oct2': < mascara_oct2 >, 'mascara_oct3': < mascara_oct3 >, 'mascara_oct4': < mascara_oct4 >, 'broadcast': < broadcast >, 'descricao': < descricao >, 'acl_file_name': < acl_file_name >, 'acl_valida': < acl_valida >, 'ativada': < ativada >}} :raise VlanError: VLAN name already exists, VLAN name already exists, DC division of the environment invalid or does not exist VLAN number available. :raise VlanNaoExisteError: VLAN not found. :raise TipoRedeNaoExisteError: Network Type not registered. :raise AmbienteNaoExisteError: Environment not registered. :raise EnvironmentVipNotFoundError: Environment VIP not registered. :raise InvalidParameterError: Name of Vlan and/or the identifier of the Environment is null or invalid. :raise IPNaoDisponivelError: There is no network address is available to create the VLAN. :raise ConfigEnvironmentInvalidError: Invalid Environment Configuration or not registered :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to generate the XML response.", "label": 1, "domain": "code", "token_count": 486, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0188", "text": "
Perform an XML 1.1 level 1 (only markup-significant chars) escape operation on a Reader input meant to be an XML attribute value, writing results to a Writer.
Level 1 means this method will only escape the five markup-significant characters which are predefined as Character Entity References in XML: <, >, &, " and '.
Besides, being an attribute value also \t, \n and \r will be escaped to avoid white-space normalization from removing line feeds (turning them into white spaces) during future parsing operations.
This method calls {@link #escapeXml11(Reader, Writer, XmlEscapeType, XmlEscapeLevel)} with the following preconfigured values:
@param reader the Reader reading the text to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.5", "label": 1, "domain": "code", "token_count": 403, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0189", "text": "Invokes a method if a certain time has passed since the last call, regardless of how many times it was called. @param {Function} fn The method to debounce. @param {Object} [mOptions] The options that influence when the debounced method will be invoked. @param {int} [mOptions.wait=0] The amount of milliseconds since the last call to wait before actually invoking the method. Has no effect, if mOptions.requestAnimationFrame is set to true. @param {int | null} [mOptions.maxWait=null] The maximum amount of milliseconds to wait for an invocation. Has no effect, if mOptions.requestAnimationFrame is set to true. @param {boolean} [mOptions.leading=false] Whether the method should be invoked on the first call. @param {boolean} [mOptions.asyncLeading=false] Whether the leading invocation should be asynchronous. @param {boolean} [mOptions.trailing=true] Whether the method should be invoked after a certain time has passed. If mOptions.leading is set to true, the method needs to be called more than once for an invocation at the end of the waiting time. @param {boolean} [mOptions.requestAnimationFrame=false] Whether requestAnimationFrame should be used to debounce the method. If set to true, mOptions.wait and mOptions.maxWait have no effect. @returns {Function} Returns the debounced method.", "label": 1, "domain": "code", "token_count": 331, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0190", "text": "@constructor Effect parameters are as follow: { chromatic_aberration: number; // from 0 to x (1 for realism) edge_blur: number; // from 0 to x (1 for realism) distortion: number; // from 0 to x (1 for realism) grain_amount: number; // from 0 to 1 grain_texture: BABYLON.Texture; // texture to use for grain effect; if unset, use random B&W noise dof_focus_distance: number; // depth-of-field: focus distance; unset to disable (disabled by default) dof_aperture: number; // depth-of-field: focus blur bias (default: 1) dof_darken: number; // depth-of-field: darken that which is out of focus (from 0 to 1, disabled by default) dof_pentagon: boolean; // depth-of-field: makes a pentagon-like \"bokeh\" effect dof_gain: number; // depth-of-field: highlights gain; unset to disable (disabled by default) dof_threshold: number; // depth-of-field: highlights threshold (default: 1) blur_noise: boolean; // add a little bit of noise to the blur (default: true) } Note: if an effect parameter is unset, effect is disabled @param {string} name - The rendering pipeline name @param {object} parameters - An object containing all parameters (see above) @param {BABYLON.Scene} scene - The scene linked to this pipeline @param {number} ratio - The size of the postprocesses (0.5 means that your postprocess will have a width = canvas.width 0.5 and a height = canvas.height 0.5) @param {BABYLON.Camera[]} cameras - The array of cameras that the rendering pipeline will be attached to", "label": 1, "domain": "code", "token_count": 369, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0191", "text": "
Perform an XML 1.1 level 1 (only markup-significant chars) escape operation on a char[] input meant to be an XML attribute value.
Level 1 means this method will only escape the five markup-significant characters which are predefined as Character Entity References in XML: <, >, &, " and '.
Besides, being an attribute value also \t, \n and \r will be escaped to avoid white-space normalization from removing line feeds (turning them into white spaces) during future parsing operations.
This method calls {@link #escapeXml10(char[], int, int, java.io.Writer, XmlEscapeType, XmlEscapeLevel)} with the following preconfigured values:
@param text the char[] to be escaped. @param offset the position in text at which the escape operation should start. @param len the number of characters in text that should be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.5", "label": 1, "domain": "code", "token_count": 437, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0192", "text": "Expands a URI template into a full URI. @param [Hash] mapping The mapping that corresponds to the pattern. @param [#validate, #transform] processor An optional processor object may be supplied. @param [Boolean] normalize_values Optional flag to enable/disable unicode normalization. Default: true The object should respond to either the validate or transform messages or both. Both the validate and transform methods should take two parameters: name and value. The validate method should return true or false; true if the value of the variable is valid, false otherwise. An InvalidTemplateValueError exception will be raised if the value is invalid. The transform method should return the transformed variable value as a String. If a transform method is used, the value will not be percent encoded automatically. Unicode normalization will be performed both before and after sending the value to the transform method. @return [Addressable::URI] The expanded URI template. @example class ExampleProcessor def self.validate(name, value) return !!(value =~ /^[\\w ]+$/) if name == \"query\" return true end def self.transform(name, value) return value.gsub(/ /, \"+\") if name == \"query\" return value end end Addressable::Template.new( \"http://example.com/search/{query}/\" ).expand( {\"query\" => \"an example search query\"}, ExampleProcessor ).to_str #=> \"http://example.com/search/an+example+search+query/\" Addressable::Template.new( \"http://example.com/search/{query}/\" ).expand( {\"query\" => \"an example search query\"} ).to_str #=> \"http://example.com/search/an%20example%20search%20query/\" Addressable::Template.new( \"http://example.com/search/{query}/\" ).expand( {\"query\" => \"bogus!\"}, ExampleProcessor ).to_str #=> Addressable::Template::InvalidTemplateValueError", "label": 1, "domain": "code", "token_count": 467, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0193", "text": "Run the Aegean source finder. Parameters ---------- filename : str or HDUList Image filename or HDUList. hdu_index : int The index of the FITS HDU (extension). outfile : str file for printing catalog (NOT a table, just a text file of my own design) rms : float Use this rms for the entire image (will also assume that background is 0) max_summits : int Fit up to this many components to each island (extras are included but not fit) innerclip, outerclip : float The seed (inner) and flood (outer) clipping level (sigmas). cores : int Number of CPU cores to use. None means all cores. rmsin, bkgin : str or HDUList Filename or HDUList for the noise and background images. If either are None, then it will be calculated internally. beam : (major, minor, pa) Floats representing the synthesised beam (degrees). Replaces whatever is given in the FITS header. If the FITS header has no BMAJ/BMIN then this is required. doislandflux : bool If True then each island will also be characterized. nopositive, nonegative : bool Whether to return positive or negative sources. Default nopositive=False, nonegative=True. mask : str The filename of a region file created by MIMAS. Islands outside of this region will be ignored. lat : float The latitude of the telescope (declination of zenith). imgpsf : str or HDUList Filename or HDUList for a psf image. blank : bool Cause the output image to be blanked where islands are found. docov : bool If True then include covariance matrix in the fitting process. (default=True) cube_index : int For image cubes, cube_index determines which slice is used. Returns ------- sources : list List of sources found.", "label": 1, "domain": "code", "token_count": 386, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0194", "text": "Returns an implementation of {@link UserAgentStringParser} which checks at regular intervals for new versions of UAS data (also known as database). When newer data available, it automatically loads and updates it. Additionally the loaded data are stored in a cache file.
At initialization time the returned parser will be loaded with the UAS data of the cache file. If the cache file doesn't exist or is empty the data of this module will be loaded. The initialization is started only when this method is called the first time.
The update of the data store runs as background task. With this feature we try to reduce the initialization time of this UserAgentStringParser, because a network connection is involved and the remote system can be not available or slow.
The static class definition {@code CachingAndUpdatingParserHolder} within this factory class is not initialized until the JVM determines that {@code CachingAndUpdatingParserHolder} must be executed. The static class {@code CachingAndUpdatingParserHolder} is only executed when the static method {@code getOnlineUserAgentStringParser} is invoked on the class {@code UADetectorServiceFactory}, and the first time this happens the JVM will load and initialize the {@code CachingAndUpdatingParserHolder} class.
If during the operation the Internet connection gets lost, then this instance continues to work properly (and under correct log level settings you will get an corresponding log messages). @param dataUrl @param versionUrl @return an user agent string parser with updating service", "label": 1, "domain": "code", "token_count": 337, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0195", "text": "Function: addHandler Add a stanza handler for the connection. This function adds a stanza handler to the connection. The handler callback will be called for any stanza that matches the parameters. Note that if multiple parameters are supplied, they must all match for the handler to be invoked. The handler will receive the stanza that triggered it as its argument. *The handler should return true if it is to be invoked again; returning false will remove the handler after it returns.* As a convenience, the ns parameters applies to the top level element and also any of its immediate children. This is primarily to make matching /iq/query elements easy. The options argument contains handler matching flags that affect how matches are determined. Currently the only flag is matchBare (a boolean). When matchBare is true, the from parameter and the from attribute on the stanza will be matched as bare JIDs instead of full JIDs. To use this, pass {matchBare: true} as the value of options. The default value for matchBare is false. The return value should be saved if you wish to remove the handler with deleteHandler(). Parameters: (Function) handler - The user callback. (String) ns - The namespace to match. (String) name - The stanza name to match. (String) type - The stanza type attribute to match. (String) id - The stanza id attribute to match. (String) from - The stanza from attribute to match. (String) options - The handler options Returns: A reference to the handler that can be used to remove it.", "label": 1, "domain": "code", "token_count": 317, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0196", "text": "Gets a nested property value from an object using the given path. The path is a string with property names separated by dots by default, but it can be customised with the optional third parameter. You can use integers in the path, even negative ones, to refer to array-like object indexes, but the priority will be given to existing object keys: the last example explains this particular case. @example var user = { name: \"John\", surname: \"Doe\", login: { \"user.name\": \"jdoe\", password: \"abc123\" }, scores: [ {id: 1, value: 10}, {id: 2, value: 20}, {id: 3, value: 30} ] }; _.getPathIn(user, \"name\") // => \"John\" _.getPathIn(user, \"login.password\") // => \"abc123\"; _.getPathIn(user, \"login/user.name\", \"/\") // => \"jdoe\" _.getPathIn(user, \"name.foo\") // => undefined _.getPathIn(user, \"name.foo.bar\") // => undefined @example
Priority will be given to existing object keys over indexes:
_.getPathIn(user, \"scores.-1\") // => {id: 3, value: 30} // let's do something funny user.scores[\"-1\"] = \"foo bar\"; _.getPathIn(user, \"scores.-1\") // => \"foo bar\"; @memberof module:lamb @category Object @see {@link module:lamb.getPath|getPath} @see {@link module:lamb.getIn|getIn}, {@link module:lamb.getKey|getKey} @since 0.19.0 @param {Object|ArrayLike} obj @param {String} path @param {String} [separator=\".\"] @returns {*}", "label": 1, "domain": "code", "token_count": 446, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0197", "text": "Position nodes using ForceAtlas2 force-directed algorithm Parameters ---------- graph: NetworkX graph A position will be assigned to every node in G. pos_list : dict or None optional (default=None) Initial positions for nodes as a dictionary with node as keys and values as a coordinate list or tuple. If None, then use random initial positions. node_masses : dict or None optional (default=None) Predefined masses for nodes with node as keys and masses as values. If None, then use degree of nodes. iterations : int optional (default=50) Number of iterations outbound_attraction_distribution : boolean Distributes attraction along outbound edges. Hubs attract less and thus are pushed to the borders. This mode is meant to grant authorities (nodes with a high indegree) a more central position than hubs (nodes with a high outdegree). This is useful for social networks and web networks, where authorities are sometimes considered more important than hubs lin_log_mode: boolean Switch ForceAtlas model from lin-lin to lin-log (tribute to Andreas Noack). Makes clusters more tight prevent_overlapping: boolean With this mode enabled, the repulsion is modified so that the nodes do not overlap. The goal is to produce a more readable and aesthetically pleasing image. edge_weight_influence: float How much influence you give to the edges weight. 0 is “no influence” and 1 is “normal”. jitter_tolerance: float How much swinging you allow. Above 1 discouraged. Lower gives less speed and more precision barnes_hut_optimize: boolean Barnes Hut optimization: n² complexity to n.ln(n) ; allows larger graphs. barnes_hut_theta: float Theta of the Barnes Hut optimization scaling_ratio: float How much repulsion you want. More makes a more sparse graph. strong_gravity_mode: boolean The “Strong gravity” option sets a force that attracts the nodes that are distant from the center more ( is this distance). This force has the drawback of being so strong that it is sometimes stronger than the other forces. It may result in a biased placement of the nodes. However, its advantage is to force a very compact layout, which may be useful for certain purposes. multithread: boolean gravity: float Attracts nodes to the center. Prevents islands from drifting away. Returns ------- pos : dict A dictionary of positions keyed by node", "label": 1, "domain": "code", "token_count": 476, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0198", "text": "Compute Pi_V conditioned on J. This function returns the Pi array from the model factors of the V genomic contributions, P(V, J)*P(delV|V). This corresponds to V(J)_{x_1}. For clarity in parsing the algorithm implementation, we include which instance attributes are used in the method as 'parameters.' Parameters ---------- CDR3_seq : str CDR3 sequence composed of 'amino acids' (single character symbols each corresponding to a collection of codons as given by codons_dict). V_usage_mask : list Indices of the V alleles to be considered in the Pgen computation J_usage_mask : list Indices of the J alleles to be considered in the Pgen computation self.cutV_genomic_CDR3_segs : list of strings List of all the V genomic nucleotide sequences trimmed to begin at the conserved C residue and with the maximum number of palindromic insertions appended. self.PVdelV_nt_pos_vec : list of ndarrays For each V allele, format P(delV|V) into the correct form for a Pi array or V(J)_{x_1}. This is only done for the first and last position in each codon. self.PVdelV_2nd_nt_pos_per_aa_vec : list of dicts For each V allele, and each 'amino acid', format P(V)*P(delV|V) for positions in the middle of a codon into the correct form for a Pi array or V(J)_{x_1} given the 'amino acid'. self.PVJ : ndarray Joint probability distribution of V and J, P(V, J). Returns ------- Pi_V_given_J : list List of (4, 3L) ndarrays corresponding to V(J)_{x_1}. max_V_align: int Maximum alignment of the CDR3_seq to any genomic V allele allowed by V_usage_mask.", "label": 1, "domain": "code", "token_count": 388, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0199", "text": "Check if the user has permission to perform a given action on an object. can? :destroy, @project You can also pass the class instead of an instance (if you don't have one handy). can? :create, Project Nested resources can be passed through a hash, this way conditions which are dependent upon the association will work when using a class. can? :create, @category => Project You can also pass multiple objects to check. You only need to pass a hash following the pattern { :any => [many subjects] }. The behaviour is check if there is a permission on any of the given objects. can? :create, {:any => [Project, Rule]} Any additional arguments will be passed into the \"can\" block definition. This can be used to pass more information about the user's request for example. can? :create, Project, request.remote_ip can :create, Project do |project, remote_ip| # ... end Not only can you use the can? method in the controller and view (see ControllerAdditions), but you can also call it directly on an ability instance. ability.can? :destroy, @project This makes testing a user's abilities very easy. def test \"user can only destroy projects which he owns\" user = User.new ability = Ability.new(user) assert ability.can?(:destroy, Project.new(:user => user)) assert ability.cannot?(:destroy, Project.new) end Also see the RSpec Matchers to aid in testing.", "label": 1, "domain": "code", "token_count": 300, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0200", "text": "Creates a new resolver object for a registry. @param registry [Registry] only set this if customizing the registry object Performs a lookup on a given path in the registry. Resolution will occur in a similar way to standard Ruby identifier resolution, doing lexical lookup, as well as (optionally) through the inheritance chain. A proxy object can be returned if the lookup fails for future resolution. The proxy will be type hinted with the +type+ used in the original lookup. @option opts namespace [CodeObjects::Base, :root, nil] (nil) the namespace object to start searching from. If root or nil is provided, {Registry.root} is assumed. @option opts inheritance [Boolean] (false) whether to perform lookups through the inheritance chain (includes mixins) @option opts proxy_fallback [Boolean] (false) when true, a proxy is returned if no match is found @option opts type [Symbol] (nil) an optional type hint for the resolver to consider when performing a lookup. If a type is provided and the resolved object's type does not match the hint, the object is discarded. @return [CodeObjects::Base, CodeObjects::Proxy, nil] the first object that matches the path lookup. If proxy_fallback is provided, a proxy object will be returned in the event of no match, otherwise nil will be returned. @example A lookup from root resolver.lookup_by_path(\"A::B::C\") @example A lookup from the A::B namespace resolver.lookup_by_path(\"C\", namespace: P(\"A::B\")) @example A lookup on a method through the inheritance tree resolver.lookup_by_math(\"A::B#foo\", inheritance: true)", "label": 1, "domain": "code", "token_count": 346, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0201", "text": "Compute Pi_J. This function returns the Pi array from the model factors of the J genomic contributions, P(delJ|J). This corresponds to J(D)^{x_4}. For clarity in parsing the algorithm implementation, we include which instance attributes are used in the method as 'parameters.' Parameters ---------- CDR3_seq : str CDR3 sequence composed of 'amino acids' (single character symbols each corresponding to a collection of codons as given by codons_dict). J_usage_mask : list Indices of the J alleles to be considered in the Pgen computation self.cutJ_genomic_CDR3_segs : list of strings List of all the J genomic nucleotide sequences trimmed to begin at the conserved 3' residue (F/W) and with the maximum number of palindromic insertions appended. self.PJdelJ_nt_pos_vec : list of ndarrays For each J allele, format P(delJ|J) into the correct form for a Pi array or J^{x_2}. This is only done for the first and last position in each codon. self.PJdelJ_2nd_nt_pos_per_aa_vec : list of dicts For each J allele, and each 'amino acid', format P(delJ|J) for positions in the middle of a codon into the correct form for a Pi array or J^{x_2} given the 'amino acid'. Returns ------- Pi_J : ndarray (4, 3L) array corresponding to J^{x_4}. r_J_usage_mask: list Reduced J_usage mask. J genes/alleles with no contribution (bad alignment) are removed from the mask. This is done to speed up the computation on the V side (which must be done conditioned on the J).", "label": 1, "domain": "code", "token_count": 362, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0202", "text": "Edit an issue = Inputs :title - Required string :content - Optional string :responsible - Optional string - Login for the user that this issue should be assigned to. :milestone - Optional number - Milestone to associate this issue with :version - Optional number - Version to associate this issue with :component - Optional number - Component to associate this issue with :priority - Optional string - The priority of this issue * trivial * minor * major * critical * blocker:status - Optional string - The status of this issue * new * open * resolved * on hold * invalid * duplicate * wontfix:kind - Optional string - The kind of issue * bug * enhancement * proposal * task = Examples bitbucket = BitBucket.new :user => 'user-name', :repo => 'repo-name' bitbucket.issues.create \"title\" => \"Found a bug\", \"content\" => \"I'm having a problem with this.\", \"responsible\" => \"octocat\", \"milestone\" => 1, \"priority\" => \"blocker\"", "label": 1, "domain": "code", "token_count": 357, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0203", "text": "Get interface ip details. Returns a dict of dicts Example Output: { u'FastEthernet8': { 'ipv4': { u'10.66.43.169': { 'prefix_length': 22}}}, u'Loopback555': { 'ipv4': { u'192.168.1.1': { 'prefix_length': 24}}, 'ipv6': { u'1::1': { 'prefix_length': 64}, u'2001:DB8:1::1': { 'prefix_length': 64}, u'2::': { 'prefix_length': 64}, u'FE80::3': { 'prefix_length': 10}}}, u'Tunnel0': { 'ipv4': { u'10.63.100.9': { 'prefix_length': 24}}}, u'Tunnel1': { 'ipv4': { u'10.63.101.9': { 'prefix_length': 24}}}, u'Vlan100': { 'ipv4': { u'10.40.0.1': { 'prefix_length': 24}, u'10.41.0.1': { 'prefix_length': 24}, u'10.65.0.1': { 'prefix_length': 24}}}, u'Vlan200': { 'ipv4': { u'10.63.176.57': { 'prefix_length': 29}}}}", "label": 1, "domain": "code", "token_count": 301, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0204", "text": "Get users. (asynchronously) Get [CfgPerson](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgPerson) objects based on the specified filters. @param aioId A unique ID generated on the client (browser) when sending an API request that returns an asynchronous response. (required) @param limit Limit the number of users the Provisioning API should return. (optional) @param offset The number of matches the Provisioning API should skip in the returned users. (optional) @param order The sort order. (optional) @param sortBy A comma-separated list of fields to sort on. Possible values are firstName, lastName, and userName. (optional) @param filterName The name of a filter to use on the results. (optional) @param filterParameters A part of the users first or last name, if you use the FirstNameOrLastNameMatches filter. (optional) @param roles Return only return users who have these Workspace Web Edition roles. The roles can be specified in a comma-separated list. Possible values are ROLE_AGENT and ROLE_ADMIN,ROLE_SUPERVISOR. (optional) @param skills Return only users who have these skills. The skills can be specified in a comma-separated list. (optional) @param userEnabled Return only enabled or disabled users. (optional) @param userValid Return only valid or invalid users. (optional) @param callback The callback to be executed when the API call finishes @return The request call @throws ApiException If fail to process the API call, e.g. serializing the request body object", "label": 1, "domain": "code", "token_count": 322, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0205", "text": "Configures the given context with the given stage handling settings, but only if stage handling is not already configured on the given context OR if forceConfiguration is true. The stage handling settings determine how {@linkcode resolveStage}, {@linkcode toStageQualifiedStreamName}, {@linkcode extractStageFromQualifiedStreamName}, {@linkcode toStageQualifiedResourceName}, {@linkcode extractStageFromQualifiedStreamName} and other internal functions will behave when invoked. @param {Object|StandardContext|StageHandling|Logger} context - the context onto which to configure stage handling settings @param {StageHandlingSettings} [context.stageHandling] - previously configured stage handling settings on the context (if any) @param {StageHandlingSettings} settings - the new stage handling settings to use @param {Object|StandardSettings|undefined} [otherSettings] - optional other configuration settings to use @param {LoggingSettings|undefined} [otherSettings.logging] - optional logging settings to use to configure logging @param {LoggingSettings|undefined} [otherSettings.loggingSettings] - LEGACY optional logging settings to use to configure logging (NB: otherSettings.loggingSettings will be ignored if otherSettings.logging is defined) @param {Object|StandardOptions|undefined} [otherOptions] - optional other configuration options to use if no corresponding other settings are provided @param {LoggingOptions|undefined} [otherOptions.logging] - optional logging options to use to configure logging @param {LoggingOptions|undefined} [otherOptions.loggingOptions] - LEGACY optional logging options to use to configure logging (NB: otherOptions.loggingOptions will be ignored if otherOptions.logging is defined) @param {boolean|undefined} [forceConfiguration] - whether or not to force configuration of the given settings, which will override any previously configured stage handling settings on the given context @return {StageHandling|StandardContext} the context object configured with stage handling settings and logging functionality", "label": 1, "domain": "code", "token_count": 389, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0206", "text": "
Perform an HTML 4 level 2 (result is ASCII) escape operation on a String input.
Level 2 means this method will escape:
The five markup-significant characters: <, >, &, " and '
All non ASCII characters.
This escape will be performed by replacing those chars by the corresponding HTML 4 Named Character References (e.g. '´') when such NCR exists for the replaced character, and replacing by a decimal character reference (e.g. 'ₙ') when there there is no NCR for the replaced character.
This method calls {@link #escapeHtml(String, HtmlEscapeType, HtmlEscapeLevel)} with the following preconfigured values:
@param text the String to be escaped. @return The escaped result String. As a memory-performance improvement, will return the exact same object as the text input argument if no escaping modifications were required (and no additional String objects will be created during processing). Will return null if input is null.", "label": 1, "domain": "code", "token_count": 419, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0207", "text": "Gets the health of a Service Fabric cluster using health chunks. Gets the health of a Service Fabric cluster using health chunks. The health evaluation is done based on the input cluster health chunk query description. The query description allows users to specify health policies for evaluating the cluster and its children. Users can specify very flexible filters to select which cluster entities to return. The selection can be done based on the entities health state and based on the hierarchy. The query can return multi-level children of the entities based on the specified filters. For example, it can return one application with a specified name, and for this application, return only services that are in Error or Warning, and all partitions and replicas for one of these services. @param cluster_health_chunk_query_description [ClusterHealthChunkQueryDescription] Describes the cluster and application health policies used to evaluate the cluster health and the filters to select which cluster entities to be returned. If the cluster health policy is present, it is used to evaluate the cluster events and the cluster nodes. If not present, the health evaluation uses the cluster health policy defined in the cluster manifest or the default cluster health policy. By default, each application is evaluated using its specific application health policy, defined in the application manifest, or the default health policy, if no policy is defined in manifest. If the application health policy map is specified, and it has an entry for an application, the specified application health policy is used to evaluate the application health. Users can specify very flexible filters to select which cluster entities to include in response. The selection can be done based on the entities health state and based on the hierarchy. The query can return multi-level children of the entities based on the specified filters. For example, it can return one application with a specified name, and for this application, return only services that are in Error or Warning, and all partitions and replicas for one of these services. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ClusterHealthChunk] operation results.", "label": 1, "domain": "code", "token_count": 462, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0208", "text": "Does de novo, abundance based chimera checking with usearch61 abundance_fp: input consensus fasta file with abundance information for each cluster. uchime_denovo_fp: output uchime file for chimera results. minlen: minimum sequence length for usearch input fasta seqs. output_dir: output directory removed_usearch_logs: suppresses creation of log file. uchime_denovo_log_fp: output filepath for log file. usearch61_minh: Minimum score (h) to be classified as chimera. Increasing this value tends to the number of false positives (and also sensitivity). usearch61_xn: Weight of \"no\" vote. Increasing this value tends to the number of false positives (and also sensitivity). usearch61_dn: Pseudo-count prior for \"no\" votes. (n). Increasing this value tends to the number of false positives (and also sensitivity). usearch61_mindiffs: Minimum number of diffs in a segment. Increasing this value tends to reduce the number of false positives while reducing sensitivity to very low-divergence chimeras. usearch61_mindiv: Minimum divergence, i.e. 100% - identity between the query and closest reference database sequence. Expressed as a percentage, so the default is 0.8%, which allows chimeras that are up to 99.2% similar to a reference sequence. usearch61_abundance_skew: abundance skew for de novo chimera comparisons. HALTEXEC: halt execution and returns command used for app controller.", "label": 1, "domain": "code", "token_count": 312, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0209", "text": " Generate public and private RSA keys, with modulus length 'bits'. In addition, a keyid identifier for the RSA key is generated. The object returned conforms to 'securesystemslib.formats.RSAKEY_SCHEMA' and has the form: {'keytype': 'rsa', 'scheme': 'rsassa-pss-sha256', 'keyid': keyid, 'keyval': {'public': '-----BEGIN RSA PUBLIC KEY----- ...', 'private': '-----BEGIN RSA PRIVATE KEY----- ...'}} The public and private keys are strings in PEM format. Although the PyCA cryptography library and/or its crypto backend might set a minimum key size, generate() enforces a minimum key size of 2048 bits. If 'bits' is unspecified, a 3072-bit RSA key is generated, which is the key size recommended by securesystemslib. These key size restrictions are only enforced for keys generated within securesystemslib. RSA keys with sizes lower than what we recommended may still be imported (e.g., with import_rsakey_from_pem(). >>> rsa_key = generate_rsa_key(bits=2048) >>> securesystemslib.formats.RSAKEY_SCHEMA.matches(rsa_key) True >>> public = rsa_key['keyval']['public'] >>> private = rsa_key['keyval']['private'] >>> securesystemslib.formats.PEMRSA_SCHEMA.matches(public) True >>> securesystemslib.formats.PEMRSA_SCHEMA.matches(private) True bits: The key size, or key length, of the RSA key. 'bits' must be 2048, or greater, and a multiple of 256. scheme: The signature scheme used by the key. It must be one of ['rsassa-pss-sha256']. securesystemslib.exceptions.FormatError, if 'bits' is improperly or invalid (i.e., not an integer and not at least 2048). ValueError, if an exception occurs after calling the RSA key generation routine. The 'ValueError' exception is raised by the key generation function of the cryptography library called. None. A dictionary containing the RSA keys and other identifying information. Conforms to 'securesystemslib.formats.RSAKEY_SCHEMA'.", "label": 1, "domain": "code", "token_count": 464, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0210", "text": "Bind events listener on each element of elements. @param {(string|Array|NodeList|HTMLCollection|EventTarget)} elements - The iterable, selector or elements. @param {Object.} input - An object in which keys are events to bind seperated with coma and/or spaces and values are eventCallbacks or EventObjects. @return {offCallback} off - The unbinding function. @example //esnext import { createElement, append, on, trigger } from 'chirashi' const maki = createElement('a.cheese.maki') const sushi = createElement('a.wasabi.sushi') append(document.body, [maki, sushi]) const off = on('.cheese, .wasabi', { click(e, target) { console.log('clicked', target) }, 'mouseenter mousemove': { handler: (e, target) => { console.log('mouse in', target) }, passive: true } }) trigger(maki, 'click') //simulate user's click // LOGS: \"clicked\" trigger(sushi, 'click') //simulate user's click // LOGS: \"clicked\" off(maki, 'click') //remove click event listener on maki off() //remove all listeners from all elements @example //es5 var off = Chirashi.bind('.cheese, .wasabi', { 'click': function (e, target) { console.log('clicked', target) }, 'mouseenter mousemove': { handler: (e, target) => { console.log('mouse in', target) }, passive: true } }) var maki = Chirashi.createElement('a.cheese.maki') var sushi = Chirashi.createElement('a.wasabi.sushi') Chirashi.append(document.body, [maki, sushi]) Chirashi.trigger(maki, 'click') //simulate user's click // LOGS: \"clicked\" Chirashi.trigger(sushi, 'click') //simulate user's click // LOGS: \"clicked\" off(maki, 'click') //remove click event listener on maki off() //remove all listeners from all elements", "label": 1, "domain": "code", "token_count": 485, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0211", "text": "Sends an exception to Honeybadger. Does not report ignored exceptions by default. @example # With an exception: begin fail 'oops' rescue => exception Honeybadger.notify(exception, context: { my_data: 'value' }) # => '-1dfb92ae-9b01-42e9-9c13-31205b70744a' end # Custom notification: Honeybadger.notify('Something went wrong.', { error_class: 'MyClass', context: {my_data: 'value'} }) # => '06220c5a-b471-41e5-baeb-de247da45a56' @param [Exception, Hash, Object] exception_or_opts An Exception object, or a Hash of options which is used to build the notice. All other types of objects will be converted to a String and used as the :error_message. @param [Hash] opts The options Hash when the first argument is an Exception. @option opts [String] :error_message The error message. @option opts [String] :error_class ('Notice') The class name of the error. @option opts [Array] :backtrace The backtrace of the error (optional). @option opts [String] :fingerprint The grouping fingerprint of the exception (optional). @option opts [Boolean] :force (false) Always report the exception when true, even when ignored (optional). @option opts [String] :tags The comma-separated list of tags (optional). @option opts [Hash] :context The context to associate with the exception (optional). @option opts [String] :controller The controller name (such as a Rails controller) (optional). @option opts [String] :action The action name (such as a Rails controller action) (optional). @option opts [Hash] :parameters The HTTP request paramaters (optional). @option opts [Hash] :session The HTTP request session (optional). @option opts [String] :url The HTTP request URL (optional). @option opts [Exception] :cause The cause for this error (optional). @return [String] UUID reference to the notice within Honeybadger. @return [false] when ignored.", "label": 1, "domain": "code", "token_count": 452, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0212", "text": "This is the sigma instances constructor. One instance of sigma represent one graph. It is possible to represent this grapĥ with several renderers at the same time. By default, the default renderer (WebGL + Canvas polyfill) will be used as the only renderer, with the container specified in the configuration. @param {?*} conf The configuration of the instance. There are a lot of different recognized forms to instantiate sigma, check example files, documentation in this file and unit tests to know more. @return {sigma} The fresh new sigma instance. Instanciating sigma: ******************** If no parameter is given to the constructor, the instance will be created without any renderer or camera. It will just instantiate the graph, and other modules will have to be instantiated through the public methods, like \"addRenderer\" etc: > s0 = new sigma(); > s0.addRenderer({ > type: 'canvas', > container: 'my-container-id' > }); In most of the cases, sigma will simply be used with the default renderer. Then, since the only required parameter is the DOM container, there are some simpler way to call the constructor. The four following calls do the exact same things: > s1 = new sigma('my-container-id'); > s2 = new sigma(document.getElementById('my-container-id')); > s3 = new sigma({ > container: document.getElementById('my-container-id') > }); > s4 = new sigma({ > renderers: [{ > container: document.getElementById('my-container-id') > }] > }); Recognized parameters: ********************** Here is the exhaustive list of every accepted parameters, when calling the constructor with to top level configuration object (fourth case in the previous examples): {?string} id The id of the instance. It will be generated automatically if not specified. {?array} renderers An array containing objects describing renderers. {?object} graph An object containing an array of nodes and an array of edges, to avoid having to add them by hand later. {?object} settings An object containing instance specific settings that will override the default ones defined in the object sigma.settings.", "label": 1, "domain": "code", "token_count": 430, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0213", "text": "Constructs a path. @alias Path @constructor @augments AbstractShape @classdesc Represents a line, curve or curtain between specified positions. The path is drawn between input positions to achieve a specified path type, which can be one of the following:
If the latter, the path positions' altitudes are ignored.
Paths have separate attributes for normal display and highlighted display. They use the interior and outline attributes of {@link ShapeAttributes} but do not use the image attributes.
A path displays as a curtain if its [extrude]{@link Path#extrude} property is true. A curtain extends from the line formed by the path positions to the ground.
This shape uses a {@link SurfacePolyline} when drawing on 2D globes and this shape's [useSurfaceShapeFor2D]{@link AbstractShape#useSurfaceShapeFor2D} is true. @param {Position[]} positions An array containing the path positions. @param {ShapeAttributes} attributes The attributes to associate with this path. May be null, in which case default attributes are associated. @throws {ArgumentError} If the specified positions array is null or undefined.", "label": 1, "domain": "code", "token_count": 440, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0214", "text": "Answers true if a sub-pattern matches the subpart of the given name, false otherwise. char[] pattern matching, accepting wild-cards '*' and '?'. Can match only subset of name/pattern. end positions are non-inclusive. The subpattern is defined by the patternStart and pattternEnd positions. When not case sensitive, the pattern is assumed to already be lowercased, the name will be lowercased character per character as comparing.
@param pattern the given pattern @param patternStart the given pattern start @param patternEnd the given pattern end @param name the given name @param nameStart the given name start @param nameEnd the given name end @param isCaseSensitive flag to know if the matching should be case sensitive @return true if a sub-pattern matches the subpart of the given name, false otherwise", "label": 1, "domain": "code", "token_count": 319, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0215", "text": "Creates a set of tunnel connections based upon the pathAndTunnels. Each entry of pathAndTunnels must be of the form (in EBNF):
path and tunnels = path and tunnel, {new line, path and tunnel} path and tunnel = path, \"|\", tunnel new line = \"\\n\" path = path part, {\"->\", path part} path part = {user, \"@\"}, hostname tunnel = {local part}, \":\", destination hostname, \":\", destination port local part = {local alias, \":\"}, local port local alias = hostname local port = port destination hostname = hostname destination port = port user = ? user name ? hostname = ? hostname ? port = ? port ?
Says open an ssh connection as user jimhenson to host admin.muppets.com. Then, through that connection, open a connection as user animal to host drteethandtheelectricmahem.muppets.com. Then map local port 8080 on the interface with alias drteeth through the two-hop tunnel to port 80 on drteeth.muppets.com.
@param pathAndSpecList A list of path and spec entries @throws JSchException For connection failures", "label": 1, "domain": "code", "token_count": 387, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0216", "text": "Prepare the actual |anntools.SeasonalANN| object for calculations. Dispite all automated refreshings explained in the general documentation on class |anntools.SeasonalANN|, it is still possible to destroy the inner consistency of a |anntools.SeasonalANN| instance, as it stores its |anntools.ANN| objects by reference. This is shown by the following example: >>> from hydpy import SeasonalANN, ann >>> seasonalann = SeasonalANN(None) >>> seasonalann.simulationstep = '1d' >>> jan = ann(nmb_inputs=1, nmb_neurons=(1,), nmb_outputs=1, ... weights_input=0.0, weights_output=0.0, ... intercepts_hidden=0.0, intercepts_output=1.0) >>> seasonalann(_1_1_12=jan) >>> jan.nmb_inputs, jan.nmb_outputs = 2, 3 >>> jan.nmb_inputs, jan.nmb_outputs (2, 3) >>> seasonalann.nmb_inputs, seasonalann.nmb_outputs (1, 1) Due to the C level implementation of the mathematical core of both |anntools.ANN| and |anntools.SeasonalANN| in module |annutils|, such an inconsistency might result in a program crash without any informative error message. Whenever you are afraid some inconsistency might have crept in, and you want to repair it, call method |anntools.SeasonalANN.refresh| explicitly: >>> seasonalann.refresh() >>> jan.nmb_inputs, jan.nmb_outputs (2, 3) >>> seasonalann.nmb_inputs, seasonalann.nmb_outputs (2, 3)", "label": 1, "domain": "code", "token_count": 347, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0217", "text": "
Generates a stream by regrouping the elements of the provided stream and putting them in a substream. This grouping operation scans the elements of the stream using the open predicate. If this predicate is true, then it begins to add the elements of the stream in a substream. It will continue to add them until an element that matches the close predicate is met.
The basic group operation includes the opening and the closing elements in the substreams. You can also provide two booleans if you need to customize this behavior.
If the provided stream is empty, then the returned stream contains an empty stream.
An IllegalArgumentException will also be thrown if the provided stream is not ORDERED
The returned stream has the same characteristics as the provided stream, and is thus ORDERED.
A {@code {@link NullPointerException}} is thrown if the stream to be grouped or one of the predicate is null.
@param stream The stream to be grouped. Will throw a NullPointerException if null. @param open The predicate used to check for an opening element. @param close The predicate used to check for an closing element. @param The type of the elements of the provided stream. @return A grouped stream of streams.", "label": 1, "domain": "code", "token_count": 441, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0218", "text": "Compute Pgen for CDR3 'amino acid' sequence CDR3_seq from VDJ model. Conditioned on the already formatted V genes/alleles indicated in V_usage_mask and the J genes/alleles in J_usage_mask. (Examples are TCRB sequences/model) Parameters ---------- CDR3_seq : str CDR3 sequence composed of 'amino acids' (single character symbols each corresponding to a collection of codons as given by codons_dict). V_usage_mask : list Indices of the V alleles to be considered in the Pgen computation J_usage_mask : list Indices of the J alleles to be considered in the Pgen computation Returns ------- pgen : float The generation probability (Pgen) of the sequence Examples -------- >>> compute_CDR3_pgen('CAWSVAPDRGGYTF', ppp, [42], [1]) 1.203646865765782e-10 >>> compute_CDR3_pgen(nt2codon_rep('TGTGCCTGGAGTGTAGCTCCGGACAGGGGTGGCTACACCTTC'), ppp, [42], [1]) 2.3986503758867323e-12 >>> compute_CDR3_pgen('\\xbb\\x96\\xab\\xb8\\x8e\\xb6\\xa5\\x92\\xa8\\xba\\x9a\\x93\\x94\\x9f', ppp, [42], [1]) 2.3986503758867323e-12", "label": 1, "domain": "code", "token_count": 305, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0219", "text": "Get networkipv6 :param id_network: Identifier of the Network. Integer value and greater than zero. :return: Following dictionary: :: {'network': {'id': < id_networkIpv6 >, 'network_type': < id_tipo_rede >, 'ambiente_vip': < id_ambiente_viṕ >, 'vlan': 'block1': < rede_oct1 >, 'block2': < rede_oct2 >, 'block3': < rede_oct3 >, 'block4': < rede_oct4 >, 'block5': < rede_oct4 >, 'block6': < rede_oct4 >, 'block7': < rede_oct4 >, 'block8': < rede_oct4 >, 'blocK': < bloco >, 'mask1': < mascara_oct1 >, 'mask2': < mascara_oct2 >, 'mask3': < mascara_oct3 >, 'mask4': < mascara_oct4 >, 'mask5': < mascara_oct4 >, 'mask6': < mascara_oct4 >, 'mask7': < mascara_oct4 >, 'mask8': < mascara_oct4 >, 'active': < ativada >, }} :raise NetworkIPv6NotFoundError: NetworkIPV6 not found. :raise InvalidValueError: Invalid ID for NetworkIpv6 :raise NetworkIPv6Error: Error in NetworkIpv6 :raise XMLError: Networkapi failed to generate the XML response.", "label": 1, "domain": "code", "token_count": 307, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0220", "text": "@!group Associations @example Request syntax with placeholder values events = db_cluster.events({ start_time: Time.now, end_time: Time.now, duration: 1, event_categories: [\"String\"], filters: [ { name: \"String\", # required values: [\"String\"], # required }, ], }) @param [Hash] options ({}) @option options [Time,DateTime,Date,Integer,String] :start_time The beginning of the time interval to retrieve events for, specified in ISO 8601 format. For more information about ISO 8601, go to the [ISO8601 Wikipedia page.][1] Example: 2009-07-08T18:00Z [1]: http://en.wikipedia.org/wiki/ISO_8601 @option options [Time,DateTime,Date,Integer,String] :end_time The end of the time interval for which to retrieve events, specified in ISO 8601 format. For more information about ISO 8601, go to the [ISO8601 Wikipedia page.][1] Example: 2009-07-08T18:00Z [1]: http://en.wikipedia.org/wiki/ISO_8601 @option options [Integer] :duration The number of minutes to retrieve events for. Default: 60 @option options [Array] :event_categories A list of event categories that trigger notifications for a event notification subscription. @option options [Array] :filters This parameter is not currently supported. @return [Event::Collection]", "label": 1, "domain": "code", "token_count": 309, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0221", "text": "Determine the water level based on an artificial neural network describing the relationship between water level and water stage. Required control parameter: |WaterVolume2WaterLevel| Required state sequence: |WaterVolume| Calculated aide sequence: |WaterLevel| Example: Prepare a dam model: >>> from hydpy.models.dam import * >>> parameterstep() Prepare a very simple relationship based on one single neuron: >>> watervolume2waterlevel( ... nmb_inputs=1, nmb_neurons=(1,), nmb_outputs=1, ... weights_input=0.5, weights_output=1.0, ... intercepts_hidden=0.0, intercepts_output=-0.5) At least in the water volume range used in the following examples, the shape of the relationship looks acceptable: >>> from hydpy import UnitTest >>> test = UnitTest( ... model, model.calc_waterlevel_v1, ... last_example=10, ... parseqs=(states.watervolume, aides.waterlevel)) >>> test.nexts.watervolume = range(10) >>> test() | ex. | watervolume | waterlevel | ---------------------------------- | 1 | 0.0 | 0.0 | | 2 | 1.0 | 0.122459 | | 3 | 2.0 | 0.231059 | | 4 | 3.0 | 0.317574 | | 5 | 4.0 | 0.380797 | | 6 | 5.0 | 0.424142 | | 7 | 6.0 | 0.452574 | | 8 | 7.0 | 0.470688 | | 9 | 8.0 | 0.482014 | | 10 | 9.0 | 0.489013 | For more realistic approximations of measured relationships between water level and volume, larger neural networks are required.", "label": 1, "domain": "code", "token_count": 403, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0222", "text": "
Perform an HTML 4 level 1 (XML-style) escape operation on a String input.
Level 1 means this method will only escape the five markup-significant characters: <, >, &, " and '. It is called XML-style in order to link it with JSP's escapeXml attribute in JSTL's <c:out ... /> tags.
Note this method may not produce the same results as {@link #escapeHtml5Xml(String)} because it will escape the apostrophe as ', whereas in HTML5 there is a specific NCR for such character (').
This method calls {@link #escapeHtml(String, HtmlEscapeType, HtmlEscapeLevel)} with the following preconfigured values:
@param text the String to be escaped. @return The escaped result String. As a memory-performance improvement, will return the exact same object as the text input argument if no escaping modifications were required (and no additional String objects will be created during processing). Will return null if input is null.", "label": 1, "domain": "code", "token_count": 432, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0223", "text": "Runs a simple checksum on a file and returns the result as a int64. The algorithm can be one of the following constants: CHECKSUM_BYTE - Treats the file as a set of unsigned bytes CHECKSUM_SHORT_LE - Treats the file as a set of unsigned little-endian shorts CHECKSUM_SHORT_BE - Treats the file as a set of unsigned big-endian shorts CHECKSUM_INT_LE - Treats the file as a set of unsigned little-endian ints CHECKSUM_INT_BE - Treats the file as a set of unsigned big-endian ints CHECKSUM_INT64_LE - Treats the file as a set of unsigned little-endian int64s CHECKSUM_INT64_BE - Treats the file as a set of unsigned big-endian int64s CHECKSUM_SUM8 - Same as CHECKSUM_BYTE except result output as 8-bits CHECKSUM_SUM16 - Same as CHECKSUM_BYTE except result output as 16-bits CHECKSUM_SUM32 - Same as CHECKSUM_BYTE except result output as 32-bits CHECKSUM_SUM64 - Same as CHECKSUM_BYTE CHECKSUM_CRC16 CHECKSUM_CRCCCITT CHECKSUM_CRC32 CHECKSUM_ADLER32 If start and size are zero, the algorithm is run on the whole file. If they are not zero then the algorithm is run on size bytes starting at address start. See the ChecksumAlgBytes and ChecksumAlgStr functions to run more complex algorithms. crcPolynomial and crcInitValue can be used to set a custom polynomial and initial value for the CRC functions. A value of -1 for these parameters uses the default values as described in the Check Sum/Hash Algorithms topic. A negative number is returned on error.", "label": 1, "domain": "code", "token_count": 343, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0224", "text": "Parse the given inputs to in-memory maps to allow for summarisation. @param input The {@link Reader} containing the inputs to be summarised. @param inputMapper The {@link ObjectMapper} to use to parse the file into memory @param emptyCounts A {@link JDefaultDict} to be populated with empty counts for each field @param nonEmptyCounts A {@link JDefaultDict} to be populated with non-empty counts for each field @param possibleIntegerFields A {@link JDefaultDict} to be populated with false if a non-integer value is detected in a field @param possibleDoubleFields A {@link JDefaultDict} to be populated with false if a non-double value is detected in a field @param valueCounts A {@link JDefaultDict} to be populated with false if a non-integer value is detected in a field @param rowCount An {@link AtomicInteger} used to track the total number of rows processed. @param defaultValues A Map that is either empty, signifying there are no default values known, or exactly the same length as each row in the CSV file being parsed. If the values for a field are empty/missing, and a non-null, non-empty value appears in this list, it will be substituted in when calculating the statistics. @param basePath The path to go to before checking the field paths (only supports a single point of entry at this point in time). Set to \"/\" to start at the top of the document. If the basePath points to an array, each of the array elements are matched separately with the fieldRelativePaths. If it points to an object, the object is directly matched to obtain a single result row. Otherwise an exception is thrown. @param fieldRelativePaths The relative paths underneath the basePath to select field values from. @return The list of headers that were either overridden or found in the file @throws IOException If there is an error reading from the file @throws CSVStreamException If there is a problem processing the JSON content", "label": 1, "domain": "code", "token_count": 402, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0225", "text": "once every 5 minutes Construct a new Indexed Database store, which extends MemoryStore. This store functions like a MemoryStore except it periodically persists the contents of the store to an IndexedDB backend. All data is still kept in-memory but can be loaded from disk by calling startup(). This can make startup times quicker as a complete sync from the server is not required. This does not reduce memory usage as all the data is eagerly fetched when startup() is called.
let opts = { localStorage: window.localStorage }; let store = new IndexedDBStore(); await store.startup(); // load from indexed db let client = sdk.createClient({ store: store, }); client.startClient(); client.on(\"sync\", function(state, prevState, data) { if (state === \"PREPARED\") { console.log(\"Started up, now with go faster stripes!\"); } });
@constructor @extends MemoryStore @param {Object} opts Options object. @param {Object} opts.indexedDB The Indexed DB interface e.g. window.indexedDB @param {string=} opts.dbName Optional database name. The same name must be used to open the same database. @param {string=} opts.workerScript Optional URL to a script to invoke a web worker with to run IndexedDB queries on the web worker. The IndexedDbStoreWorker class is provided for this purpose and requires the application to provide a trivial wrapper script around it. @param {Object=} opts.workerApi The webWorker API object. If omitted, the global Worker object will be used if it exists. @prop {IndexedDBStoreBackend} backend The backend instance. Call through to this API if you need to perform specific indexeddb actions like deleting the database.", "label": 1, "domain": "code", "token_count": 365, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0226", "text": "Dichotomy search of subString in the suffix array. As soon as a suffix which starts with subString is found, it uses the LCPs in order to find the other matching suffixes. The outputs consists in a list of tuple (pos, feature0, feature1, ...) where feature0, feature1, ... are the features attached to the suffix at position pos. Features are listed in the same order as requested in the input list of features [featureName0, featureName1, ...] >>> SA=SuffixArray('mississippi', UNIT_BYTE) >>> SA.find(\"ssi\") array('i', [5, 2]) >>> SA.find(\"mi\") array('i', [0]) >>> SA=SuffixArray('miss A and miss B', UNIT_WORD) >>> SA.find(\"miss\") array('i', [0, 3]) >>> SA=SuffixArray('mississippi', UNIT_BYTE) >>> SA.find(\"iss\", ['LCP']) [(4, 1), (1, 4)] >>> SA=SuffixArray('mississippi', UNIT_BYTE) >>> SA.find(\"A\") array('i') >>> SA=SuffixArray('mississippi', UNIT_BYTE) >>> SA.find(\"pp\") array('i', [8]) >>> SA=SuffixArray('mississippi', UNIT_BYTE) >>> SA.find(\"ppp\") array('i') >>> SA=SuffixArray('mississippi', UNIT_BYTE) >>> SA.find(\"im\") array('i')", "label": 1, "domain": "code", "token_count": 302, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0227", "text": "
Perform an XML 1.1 level 2 (markup-significant and all non-ASCII chars) escape operation on a Reader input, writing results to a Writer.
Level 2 means this method will escape:
The five markup-significant characters: <, >, &, " and '
All non ASCII characters.
This escape will be performed by replacing those chars by the corresponding XML Character Entity References (e.g. '<') when such CER exists for the replaced character, and replacing by a hexadecimal character reference (e.g. '␰') when there there is no CER for the replaced character.
This method calls {@link #escapeXml11(Reader, Writer, XmlEscapeType, XmlEscapeLevel)} with the following preconfigured values:
@param reader the Reader reading the text to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 424, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0228", "text": "Will inject a new view into an injection site by using the new view's transitionIn method. If the parent view previously had another view at this injections site, this previous view will be removed with that view's transitionOut. If this method is used within a render, the current views' injection sites will be cached so they can be transitioned out even though they are detached in the process of re-rendering. If no previous view is given and none can be found, the new view is transitioned in regardless. If the previous view is the same as the new view, it is injected normally without transitioning in. The previous view must has used an injection site with the standard \"inject=\" attribute to be found. @method transitionNewViewIntoSite @private @param injectionSiteName {String} The name of the injection site in the template. This is the value corresponding to the attribute \"inject\". @param newView {View} The instantiated view object to be transitioned into the injection site @param [options] {Object} optional options object. This options object will be passed on to the transitionIn and transitionOut methods as well. @param [options.previousView] {View} the view that should be transitioned out. If none is provided, it will look to see if a view already is at this injection site and uses that by default. @param [options.addBefore=false] {Boolean} if true, the new view's element will be added before the previous view's element. Defaults to after. @param [options.shared=false] {Boolean} if set to true, the view will be treated as a shared view and not disposed during parent view disposing. @return {Promise} resolved when all transitions are complete. No payload is provided upon resolution. When the transitionIn and transitionOut methods are invoked on the new and previous views, the options parameter will be passed on to them. Other fields will be added to the options parameter to allow better handling of the transitions. These include: { newView: the new view previousView: the previous view (can be undefined) parentView: the parent view transitioning in or out the tracked view }", "label": 1, "domain": "code", "token_count": 443, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0229", "text": "
Perform am URI fragment identifier escape operation on a String input.
The following are the only allowed chars in an URI fragment identifier (will not be escaped):
A-Z a-z 0-9
- . _ ~
! $ & ' ( ) * + , ; =
: @
/ ?
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
@param text the String to be escaped. @param encoding the encoding to be used for escaping. @return The escaped result String. As a memory-performance improvement, will return the exact same object as the text input argument if no escaping modifications were required (and no additional String objects will be created during processing). Will return null if input is null.", "label": 1, "domain": "code", "token_count": 316, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0230", "text": "@exports TextIconOverlay as BMapLib.TextIconOverlay TextIconOverlay @class 此类表示地图上的一个覆盖物,该覆盖物由文字和图标组成,从Overlay继承。文字通常是数字(0-9)或字母(A-Z ),而文字与图标之间有一定的映射关系。 该覆盖物适用于以下类似的场景:需要在地图上添加一系列覆盖物,这些覆盖物之间用不同的图标和文字来区分,文字可能表示了该覆盖物的某一属性值,根据该文字和一定的映射关系,自动匹配相应颜色和大小的图标。 @constructor @param {Point} position 表示一个经纬度坐标位置。 @param {String} text 表示该覆盖物显示的文字信息。 @param {Json Object} options 可选参数,可选项包括: \"styles\":{Array} 一组图标风格。单个图表风格包括以下几个属性: url {String} 图片的url地址。(必选) size {Size} 图片的大小。(必选) anchor {Size} 图标定位在地图上的位置相对于图标左上角的偏移值,默认偏移值为图标的中心位置。(可选) offset {Size} 图片相对于可视区域的偏移值,此功能的作用等同于CSS中的background-position属性。(可选) textSize {Number} 文字的大小。(可选,默认10) textColor {String} 文字的颜色。(可选,默认black) ", "label": 1, "domain": "code", "token_count": 374, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0231", "text": "Function takes input of dictionary operator with the following keys operator = { \"fullName\" : \"\" , \"sessionTimeout\" : \"\", \"password\" : \"\", \"operatorGroupId\" : \"\", \"name\" : \"\", \"desc\" : \"\", \"defaultAcl\" : \"\", \"authType\" : \"\"} converts to json and issues a HTTP POST request to the HPE IMC Restful API :param auth: requests auth object #usually auth.creds from auth pyhpeimc.auth.class :param url: base url of IMC RS interface #usually auth.url from pyhpeimc.auth.authclass :param operator: dictionary with the required operator key-value pairs as defined above. :param headers: json formated string. default values set in module :return: :rtype: >>> import json >>> from pyhpeimc.auth import * >>> from pyhpeimc.plat.operator import * >>> auth = IMCAuth(\"http://\", \"10.101.0.203\", \"8080\", \"admin\", \"admin\") >>> operator = '''{ \"fullName\" : \"test administrator\", \"sessionTimeout\" : \"30\",\"password\" : \"password\",\"operatorGroupId\" : \"1\",\"name\" : \"testadmin\",\"desc\" : \"test admin account\",\"defaultAcl\" : \"\",\"authType\" : \"0\"}''' >>> operator = json.loads(operator) >>> delete_if_exists = delete_plat_operator('testadmin', auth.creds, auth.url) >>> new_operator = create_operator(operator, auth.creds, auth.url) >>> assert type(new_operator) is int >>> assert new_operator == 201 >>> fail_operator_create = create_operator(operator, auth.creds, auth.url) >>> assert type(fail_operator_create) is int >>> assert fail_operator_create == 409", "label": 1, "domain": "code", "token_count": 368, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0232", "text": "Replies the intersection factor of the given segment when it is intersecting the triangle.
If the segment and the triangle are not intersecting, this function replies {@link Double#NaN}. If the segment and the triangle are intersecting, this function replies the factor of the line's equation that permits to retreive the intersection point from the segment definition. This function implements the Badouel algorithm: D. Badouel, An efficient ray-polygon intersection, in: Graphics Gems, Academic Press, 1990. The algorithm of Jimenez et al. is faster than the algorithm of Badouel et al. @param tx1 x coordinate of the first point of the triangle. @param ty1 y coordinate of the first point of the triangle. @param tz1 z coordinate of the first point of the triangle. @param tx2 x coordinate of the second point of the triangle. @param ty2 y coordinate of the second point of the triangle. @param tz2 z coordinate of the second point of the triangle. @param tx3 x coordinate of the third point of the triangle. @param ty3 y coordinate of the third point of the triangle. @param tz3 z coordinate of the third point of the triangle. @param sx1 x coordinate of the first point of the segment. @param sy1 y coordinate of the first point of the segment. @param sz1 z coordinate of the first axis of the oriented box. @param sx2 x coordinate of the second point of the segment. @param sy2 y coordinate of the second point of the segment. @param sz2 z coordinate of the second axis of the oriented box. @return the factor that permits to compute the intersection point, {@link Double#NaN} when no intersection, {@link Double#POSITIVE_INFINITY} when an infinite number of intersection points. @see #getTriangleSegmentIntersectionFactorWithJimenezAlgorithm(double, double, double, double, double, double, double, double, double, double, double, double, double, double, double)", "label": 1, "domain": "code", "token_count": 424, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0233", "text": "Sorts the specified range of the receiver into ascending order, according to the natural ordering of its elements. All elements in this range must implement the Comparable interface. Furthermore, all elements in this range must be mutually comparable (that is, e1.compareTo(e2) must not throw a ClassCastException for any elements e1 and e2 in the array).
This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort.
The sorting algorithm is a modified mergesort (in which the merge is omitted if the highest element in the low sublist is less than the lowest element in the high sublist). This algorithm offers guaranteed n*log(n) performance, and can approach linear performance on nearly sorted lists.
You should never call this method unless you are sure that this particular sorting algorithm is the right one for your data set. It is generally better to call sort() or sortFromTo(...) instead, because those methods automatically choose the best sorting algorithm. @param from the index of the first element (inclusive) to be sorted. @param to the index of the last element (inclusive) to be sorted. @exception IndexOutOfBoundsException index is out of range (size()>0 && (from<0 || from>to || to>=size())).", "label": 1, "domain": "code", "token_count": 332, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0234", "text": "Return torrent files from a bucket. @option params [String, IO] :response_target Where to write response data, file path, or IO object. @option params [required, String] :bucket @option params [required, String] :key @option params [String] :request_payer Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html @return [Types::GetObjectTorrentOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods: * {Types::GetObjectTorrentOutput#body #body} => IO * {Types::GetObjectTorrentOutput#request_charged #request_charged} => String @example Example: To retrieve torrent files for an object # The following example retrieves torrent files of an object. resp = client.get_object_torrent({ bucket: \"examplebucket\", key: \"HappyFace.jpg\", }) resp.to_h outputs the following: { } @example Request syntax with placeholder values resp = client.get_object_torrent({ bucket: \"BucketName\", # required key: \"ObjectKey\", # required request_payer: \"requester\", # accepts requester }) @example Response structure resp.body #=> IO resp.request_charged #=> String, one of \"requester\" @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent AWS API Documentation @overload get_object_torrent(params = {}) @param [Hash] params ({})", "label": 1, "domain": "code", "token_count": 344, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0235", "text": "Raises ValidationException if value does not match the regular expression in regex. Returns the value argument. This is similar to calling inputStr() and using the allowlistRegexes keyword argument, however, validateRegex() allows you to pass regex flags such as re.IGNORECASE or re.VERBOSE. You can also pass a regex object directly. If you want to check if a string is a regular expression string, call validateRegexStr(). * value (str): The value being validated as a regular expression string. * regex (str, regex): The regular expression to match the value against. * flags (int): Identical to the flags argument in re.compile(). Pass re.VERBOSE et al here. * blank (bool): If True, a blank string will be accepted. Defaults to False. * strip (bool, str, None): If None, whitespace is stripped from value. If a str, the characters in it are stripped from value. If False, nothing is stripped. * allowlistRegexes (Sequence, None): A sequence of regex str that will explicitly pass validation, even if they aren't numbers. * blocklistRegexes (Sequence, None): A sequence of regex str or (regex_str, response_str) tuples that, if matched, will explicitly fail validation. * excMsg (str): A custom message to use in the raised ValidationException. >>> pysv.validateRegex('cat bat rat', r'(cat)|(dog)|(moose)', re.IGNORECASE) 'cat' >>> pysv.validateRegex('He said \"Hello\".', r'\"(.*?)\"', re.IGNORECASE) '\"Hello\"'", "label": 1, "domain": "code", "token_count": 328, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0236", "text": "Avoid cyclic dependency. Will be filled by TableUtils Opens the context menu of a column or a data cell. If a column header cell or an element inside a column header cell is passed as the parameter oElement, the context menu of this column will be opened. If a data cell or an element inside a data cell is passed, then the context menu of this data cell will be opened. The context menu will not be opened, if the configuration of the table does not allow it, or one of the event handlers attached to the events ColumnSelect or CellContextmenu calls preventDefault(). On mobile devices, when trying to open a column context menu, a column header cell menu is created instead with buttons to actually open the column context menu or to resize the column. If this function is called when this cell menu already exists, then it is closed and the column context menu is opened. @param {sap.ui.table.Table} oTable Instance of the table. @param {jQuery | HTMLElement} oElement The header or data cell, or an element inside, for which to open the context menu. @param {boolean} [bHoverFirstMenuItem] If true, the first item in the opened menu will be hovered. @param {boolean} [bFireEvent=true] If true, an event will be fired. Fires the ColumnSelect event when a column context menu should be opened. Fires the CellContextmenu event when a data cell context menu should be opened. @param {jQuery.Event} oEvent Event object. @see openColumnContextMenu @see closeColumnContextMenu @see openDataCellContextMenu @see closeDataCellContextMenu @see applyColumnHeaderCellMenu @see removeColumnHeaderCellMenu", "label": 1, "domain": "code", "token_count": 380, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0237", "text": "Gets the list of replicas deployed on a Service Fabric node. Gets the list containing the information about replicas deployed on a Service Fabric node. The information include partition ID, replica ID, status of the replica, name of the service, name of the service type, and other information. Use PartitionId or ServiceManifestName query parameters to return information about the deployed replicas matching the specified values for those parameters. @param node_name [String] The name of the node. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the application name is \"fabric:/myapp/app1\", the application identity would be \"myapp~app1\" in 6.0+ and \"myapp/app1\" in previous versions. @param partition_id The identity of the partition. @param service_manifest_name [String] The name of a service manifest registered as part of an application type in a Service Fabric cluster. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.", "label": 1, "domain": "code", "token_count": 303, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0238", "text": "
Perform an XML 1.1 level 1 (only markup-significant chars) escape operation on a Reader input, writing results to a Writer.
Level 1 means this method will only escape the five markup-significant characters which are predefined as Character Entity References in XML: <, >, &, " and '.
This method calls {@link #escapeXml11(Reader, Writer, XmlEscapeType, XmlEscapeLevel)} with the following preconfigured values:
@param reader the Reader reading the text to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 330, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0239", "text": "Takes a Velocity \"UI pack effect\" definition and registers it with a unique key, returning that key (to later pass as a value for the \"animation\" property). Takes an optional suffix, which can be \"In\" or \"Out\" to modify UI Pack's behavior. Unlike what you get from passing a style hash to VelocityComponent's \"animation\" property, Velocity \"UI pack effects\" can have chained animation calls and specify a \"defaultDuration\", and also can take advantage of \"stagger\" and \"reverse\" options on the VelocityComponent. You will need to manually register the UI Pack with the global Velocity in your application with: require('velocity'); require('velocity-animate/velocity.ui'); See: http://julian.com/research/velocity/#uiPack Typical usage: var Animations = { down: VelocityHelpers.registerEffect({ defaultDuration: 1100, calls: [ [{ transformOriginX: [ '50%', '50%' ], transformOriginY: [ 0, 0 ], rotateX: [0, 'spring'], }, 1, { delay: 100, easing: 'ease-in', }] ], }), up: VelocityHelpers.registerEffect({ defaultDuration: 200, calls: [ [{ transformOriginX: [ '50%', '50%' ], transformOriginY: [ 0, 0 ], rotateX: 160, }] ], }), }; ... ... ", "label": 1, "domain": "code", "token_count": 308, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0240", "text": "API to list number of files, event counts and number of lumis in a given block or dataset. If the optional run_num, output are: * The number of files which have data (lumis) for that run number; * The total number of events in those files; * The total number of lumis for that run_number. Note that in general this is different from the total number of lumis in those files, since lumis are filtered by the run_number they belong to, while events are only counted as total per file in the data before run 3. Howvere, when sumOverLumi=1, events will count by lumi when run_num is given while event_count/lumi is filled. If sumOverLumi=1, but event_count/lumi is not filled for any of the lumis in the block or dataset, then the API will return NULL for num_event. * The total num blocks that have the run_num; Either block_name or dataset name is required. No wild-cards are allowed :param block_name: Block name :type block_name: str :param dataset: Dataset name :type dataset: str :param run_num: Run number (Optional). Possible format are: run_num, 'run_min-run_max' or ['run_min-run_max', run1, run2, ...]. run_num=1 is for MC data and caused almost full table scan. So run_num=1 will cause an input error. :type run_num: int, str, list :param validFileOnly: default = 0. when = 1, only dataset_access_type = valid or production and is_file_valid=1 counted. :type validFileOnly: int :param sumOverLumi: default = 0. when = 1 count event_num by event_count/lumi. :type sumOverLumi: int :returns: List of dictionaries containing the following keys (num_files, num_lumi, num_block, num_event, file_size) :rtype: list of dicts", "label": 1, "domain": "code", "token_count": 414, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0241", "text": "function takest devid and ifindex of specific device and interface and issues a RESTFUL call to \"undo shut\" the specified interface on the target device. :param devid: int or str value of the target device :param devip: ipv4 address of the target devices :param ifindex: int or str value of the target interface :param auth: requests auth object #usually auth.creds from auth pyhpeimc.auth.class :param url: base url of IMC RS interface #usually auth.url from pyhpeimc.auth.authclass :return: HTTP status code 204 with no values. :rype: int >>> from pyhpeimc.auth import * >>> from pyhpeimc.plat.device import * >>> auth = IMCAuth(\"http://\", \"10.101.0.203\", \"8080\", \"admin\", \"admin\") >>> int_down_response = set_interface_down( '9', auth.creds, auth.url, devid = '10') 204 >>> int_up_response = set_inteface_up( '9', auth.creds, auth.url, devid = '10') >>> int_down_response = set_interface_down( '9', auth.creds, auth.url, devid = '10') 204 >>> int_up_response = set_inteface_up('9', auth.creds, auth.url, devip = '10.101.0.221') >>> assert type(int_up_response) is int >>> assert int_up_response is 204", "label": 1, "domain": "code", "token_count": 313, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0242", "text": "Reconstructs a directed acyclic graph according to prior information of edge significance. This function first ranks all edges and introduce the most significant one by one, avoiding those that would create a loop. Optional constraints on the maximum total number of edges, the number of incoming or outgoing edges for every gene can be specified. dp: numpy.ndarray(nt,nt,dtype=ftype(='f4' by default)) Prior information of edge significance levels. Entry dp[i,j] is significance of edge i to j. A larger values indicates the edge's presence is more probable. One option to obtain the prior information is to use pairwise inference methods in findr. dt2:numpy.ndarray(nt2,ns,dtype=ftype(='=f4' by default)) Gene expression data for B. dt2 has the same format as dt, and can be identical with, different from, or a superset of dt. When dt2 is a superset of (or identical with) dt, dt2 must be arranged to be identical with dt at its upper submatrix, i.e. dt2[:nt,:]=dt, and set parameter nodiag = 1. namax: Constraint on the maximum total number of edges in the reconstructed network. nimax: Constraint on the maximum number of incoming edges for each node in the reconstructed network. nomax: Constraint on the maximum number of outgoing edges for each node in the reconstructed network. Return: dictionary with following keys: ret:0 iff execution succeeded. net: numpy.ndarray((nt,nt),dtype=bool). The reconstructed direct acyclic graph or network net[i,j]=True if an edge from i to j exists in the reconstructed network, and False otherwise. ftype and gtype can be found in auto.py. Example: see findr.examples.geuvadis7", "label": 1, "domain": "code", "token_count": 368, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0243", "text": "Berechnet die Pruefziffer des uebergebenen Wertes (ohne Pruefziffer). Ohne Pruefziffer heisst dabei, dass anstelle der Pruefziffer die uebergebene IBAN eine \"00\" enthalten kann.
Die Pruefziffer selbst wird dabei nach dem Verfahren umgesetzt, das in Wikipedia beschrieben ist:
Setze die beiden Pruefziffern auf 00 (die IBAN beginnt dann z. B. mit DE00 für Deutschland).
Stelle die vier ersten Stellen an das Ende der IBAN.
Ersetze alle Buchstaben durch Zahlen, wobei A = 10, B = 11, …, Z = 35.
Berechne den ganzzahligen Rest, der bei Division durch 97 bleibt.
Subtrahiere den Rest von 98, das Ergebnis sind die beiden Pruefziffern. Falls das Ergebnis einstellig ist, wird es mit einer fuehrenden Null ergaenzt.
@param wert z.B. \"DE00 2105 0170 0012 3456 78\" @return z.B. \"68\"", "label": 1, "domain": "code", "token_count": 301, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0244", "text": "Raises ValidationException if value is not a day of the month, from 1 to 28, 29, 30, or 31 depending on the month and year. Returns value. * value (str): The value being validated as existing as a numbered day in the given year and month. * year (int): The given year. * month (int): The given month. 1 is January, 2 is February, and so on. * blank (bool): If True, a blank string will be accepted. Defaults to False. * strip (bool, str, None): If None, whitespace is stripped from value. If a str, the characters in it are stripped from value. If False, nothing is stripped. * allowlistRegexes (Sequence, None): A sequence of regex str that will explicitly pass validation, even if they aren't numbers. * blocklistRegexes (Sequence, None): A sequence of regex str or (regex_str, response_str) tuples that, if matched, will explicitly fail validation. * excMsg (str): A custom message to use in the raised ValidationException. >>> import pysimplevalidate as pysv >>> pysv.validateDayOfMonth('31', 2019, 10) 31 >>> pysv.validateDayOfMonth('32', 2019, 10) Traceback (most recent call last): ... pysimplevalidate.ValidationException: '32' is not a day in the month of October 2019 >>> pysv.validateDayOfMonth('29', 2004, 2) 29 >>> pysv.validateDayOfMonth('29', 2005, 2) Traceback (most recent call last): ... pysimplevalidate.ValidationException: '29' is not a day in the month of February 2005", "label": 1, "domain": "code", "token_count": 365, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0245", "text": " Construct a key dictionary (e.g., securesystemslib.formats.RSAKEY_SCHEMA) according to the keytype of 'key_metadata'. The dict returned by this function has the exact format as the dict returned by one of the key generations functions, like generate_ed25519_key(). The dict returned has the form: {'keytype': keytype, 'scheme': scheme, 'keyid': 'f30a0870d026980100c0573bd557394f8c1bbd6...', 'keyval': {'public': '...', 'private': '...'}} For example, RSA key dictionaries in RSAKEY_SCHEMA format should be used by modules storing a collection of keys, such as with keydb.py. RSA keys as stored in metadata files use a different format, so this function should be called if an RSA key is extracted from one of these metadata files and need converting. The key generation functions create an entirely new key and return it in the format appropriate for 'keydb.py'. >>> ed25519_key = generate_ed25519_key() >>> key_val = ed25519_key['keyval'] >>> keytype = ed25519_key['keytype'] >>> scheme = ed25519_key['scheme'] >>> ed25519_metadata = \\ format_keyval_to_metadata(keytype, scheme, key_val, private=True) >>> ed25519_key_2, junk = format_metadata_to_key(ed25519_metadata) >>> securesystemslib.formats.ED25519KEY_SCHEMA.matches(ed25519_key_2) True >>> ed25519_key == ed25519_key_2 True key_metadata: The key dictionary as stored in Metadata files, conforming to 'securesystemslib.formats.KEY_SCHEMA'. It has the form: {'keytype': '...', 'scheme': scheme, 'keyval': {'public': '...', 'private': '...'}} securesystemslib.exceptions.FormatError, if 'key_metadata' does not conform to 'securesystemslib.formats.KEY_SCHEMA'. None. In the case of an RSA key, a dictionary conformant to 'securesystemslib.formats.RSAKEY_SCHEMA'.", "label": 1, "domain": "code", "token_count": 454, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0246", "text": "Computer sample entropy (SampEn) of series X, specified by M and R. SampEn is very close to ApEn. Suppose given time series is X = [x(1), x(2), ... , x(N)]. We first build embedding matrix Em, of dimension (N-M+1)-by-M, such that the i-th row of Em is x(i),x(i+1), ... , x(i+M-1). Hence, the embedding lag and dimension are 1 and M-1 respectively. Such a matrix can be built by calling pyeeg function as Em = embed_seq(X, 1, M). Then we build matrix Emp, whose only difference with Em is that the length of each embedding sequence is M + 1 Denote the i-th and j-th row of Em as Em[i] and Em[j]. Their k-th elements are Em[i][k] and Em[j][k] respectively. The distance between Em[i] and Em[j] is defined as 1) the maximum difference of their corresponding scalar components, thus, max(Em[i]-Em[j]), or 2) Euclidean distance. We say two 1-D vectors Em[i] and Em[j] *match* in *tolerance* R, if the distance between them is no greater than R, thus, max(Em[i]-Em[j]) <= R. Mostly, the value of R is defined as 20% - 30% of standard deviation of X. Pick Em[i] as a template, for all j such that 0 < j < N - M , we can check whether Em[j] matches with Em[i]. Denote the number of Em[j], which is in the range of Em[i], as k[i], which is the i-th element of the vector k. We repeat the same process on Emp and obtained Cmp[i], 0 < i < N - M. The SampEn is defined as log(sum(Cm)/sum(Cmp)) References ---------- Costa M, Goldberger AL, Peng C-K, Multiscale entropy analysis of biological signals, Physical Review E, 71:021906, 2005 See also -------- ap_entropy: approximate entropy of a time series", "label": 1, "domain": "code", "token_count": 457, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0247", "text": "
Perform a (configurable) XML 1.1 escape operation on a String input meant to be an XML attribute value.
This method will perform an escape operation according to the specified {@link org.unbescape.xml.XmlEscapeType} and {@link org.unbescape.xml.XmlEscapeLevel} argument values.
Besides, being an attribute value also \t, \n and \r will be escaped to avoid white-space normalization from removing line feeds (turning them into white spaces) during future parsing operations.
All other String-based escapeXml11*(...) methods call this one with preconfigured type and level values.
This method is thread-safe.
@param text the String to be escaped. @param type the type of escape operation to be performed, see {@link org.unbescape.xml.XmlEscapeType}. @param level the escape level to be applied, see {@link org.unbescape.xml.XmlEscapeLevel}. @return The escaped result String. As a memory-performance improvement, will return the exact same object as the text input argument if no escaping modifications were required (and no additional String objects will be created during processing). Will return null if input is null. @since 1.1.5", "label": 1, "domain": "code", "token_count": 364, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0248", "text": "Make the given filename absolute from the given root if it is not already absolute.
{@code filename}
{@code current}
Result
null
null
null
null
/myroot
null
/path/to/file
null
/path/to/file
path/to/file
null
path/to/file
/path/to/file
/myroot
/path/to/file
path/to/file
/myroot
/myroot/path/to/file
@param filename is the name to make absolute. @param current is the current directory which permits to make absolute. @return an absolute filename.", "label": 1, "domain": "code", "token_count": 343, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0249", "text": "
Creates a FFT plan configuration of dimension rank, with sizes specified in the array n. cufftResult cufftPlanMany(cufftHandle *plan, int rank, int *n, int *inembed, int istride, int idist, int *onembed, int ostride, int odist, cufftType type, int batch ); The batch input parameter tells CUFFT how many transforms to configure in parallel. With this function, batched plans of any dimension may be created. Input parameters inembed, istride, and idist and output parameters onembed, ostride, and odist will allow setup of noncontiguous input data in a future version. Note that for CUFFT 3.0, these parameters are ignored and the layout of batched data must be side-by-side and not interleaved. Input ---- plan Pointer to a cufftHandle object rank Dimensionality of the transform (1, 2, or 3) n An array of size rank, describing the size of each dimension inembed Unused: pass NULL istride Unused: pass 1 idist Unused: pass 0 onembed Unused: pass NULL ostride Unused: pass 1 odist Unused: pass 0 type Transform data type (e.g., CUFFT_C2C, as per other CUFFT calls) batch Batch size for this transform Output ---- plan Contains a CUFFT plan handle Return Values ---- CUFFT_SETUP_FAILED CUFFT library failed to initialize. CUFFT_INVALID_SIZE Parameter is not a supported size. CUFFT_INVALID_TYPE The type parameter is not supported
", "label": 1, "domain": "code", "token_count": 333, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0250", "text": "Calls this instance's request_client's post method with the specified component endpoint Args: - endpoint_name (str) - The endpoint to call like \"property/value\". - identifier_input - One or more identifiers to request data for. An identifier can be in one of these forms: - A list of property identifier dicts: - A property identifier dict can contain the following keys: (address, zipcode, unit, city, state, slug, meta). One of 'address' or 'slug' is required. Ex: [{\"address\": \"82 County Line Rd\", \"zipcode\": \"72173\", \"meta\": \"some ID\"}] A slug is a URL-safe string that identifies a property. These are obtained from HouseCanary. Ex: [{\"slug\": \"123-Example-St-San-Francisco-CA-94105\"}] - A list of dicts representing a block: - A block identifier dict can contain the following keys: (block_id, num_bins, property_type, meta). 'block_id' is required. Ex: [{\"block_id\": \"060750615003005\", \"meta\": \"some ID\"}] - A list of dicts representing a zipcode: Ex: [{\"zipcode\": \"90274\", \"meta\": \"some ID\"}] - A list of dicts representing an MSA: Ex: [{\"msa\": \"41860\", \"meta\": \"some ID\"}] The \"meta\" field is always optional. Returns: A Response object, or the output of a custom OutputGenerator if one was specified in the constructor.", "label": 1, "domain": "code", "token_count": 315, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0251", "text": "Gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. @param resource_group_name [String] The name of the Azure resource group that contains the Data Lake Analytics account. @param account_name [String] The name of the Data Lake Analytics account for which to list Data Lake Store accounts. @param filter [String] OData filter. Optional. @param top [Integer] The number of items to return. Optional. @param skip [Integer] The number of items to skip over before returning elements. Optional. @param expand [String] OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. @param select [String] OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. @param orderby [String] OrderBy clause. One or more comma-separated expressions with an optional \"asc\" (the default) or \"desc\" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. @param count [Boolean] The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. @param search [String] A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. @param format [String] The desired return format. Return the response in particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 416, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0252", "text": "
Perform a CSS String level 1 (only basic set) escape operation on a String input.
Level 1 means this method will only escape the CSS String basic escape set:
The Backslash Escapes: \" (U+0022) and \' (U+0027).
Two ranges of non-displayable, control characters: U+0000 to U+001F and U+007F to U+009F.
This escape will be performed by using Backslash escapes whenever possible. For escaped characters that do not have an associated Backslash, default to \FF Hexadecimal Escapes.
This method calls {@link #escapeCssString(String, CssStringEscapeType, CssStringEscapeLevel)} with the following preconfigured values:
@param text the String to be escaped. @return The escaped result String. As a memory-performance improvement, will return the exact same object as the text input argument if no escaping modifications were required (and no additional String objects will be created during processing). Will return null if input is null.", "label": 1, "domain": "code", "token_count": 438, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0253", "text": "Gets the health of a Service Fabric node. Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection of health events reported on the node based on the health state. If the node that you specify by name does not exist in the health store, this returns an error. @param node_name [String] The name of the node. @param events_health_state_filter [Integer] Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. - Default - Default value. Matches any HealthState. The value is zero. - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. - Ok - Filter that matches input with HealthState value Ok. The value is 2. - Warning - Filter that matches input with HealthState value Warning. The value is 4. - Error - Filter that matches input with HealthState value Error. The value is 8. - All - Filter that matches input with any HealthState value. The value is 65535. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 414, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0254", "text": "Creates a new JobRecord with its associated Barriers and Slots. Also creates new {@link HandleSlotFilledTask} for any inputs to the Job that are immediately specified. Registers all newly created objects with the provided {@code UpdateSpec} for later saving.
This method is called when starting a new Pipeline, in which case it is used to create the root job, and it is called from within the run() method of a generator job in order to create a child job. @param updateSpec The {@code UpdateSpec} with which to register all newly created objects. All objects will be added to the {@link UpdateSpec#getNonTransactionalGroup() non-transaction group} of the {@code UpdateSpec}. @param settings Array of {@code JobSetting} to apply to the newly created JobRecord. @param generatorJob The generator job or {@code null} if we are creating the root job. @param graphGUID The GUID of the child graph to which the new Job belongs or {@code null} if we are creating the root job. @param jobInstance The user-supplied instance of {@code Job} that implements the Job that the newly created JobRecord represents. @param params The arguments to be passed to the run() method of the newly created Job. Each argument may be an actual value or it may be an object of type {@link Value} representing either an {@link ImmediateValue} or a {@link com.google.appengine.tools.pipeline.FutureValue FutureValue}. For each element of the array, if the Object is not of type {@link Value} then it is interpreted as an {@link ImmediateValue} with the given Object as its value. @return The newly constructed JobRecord.", "label": 1, "domain": "code", "token_count": 345, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0255", "text": "Create a tag object Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then create the refs/tags/[tag] reference. If you want to create a lightweight tag, you simply have to create the reference - this call would be unnecessary. @param [Hash] params @input params [String] :tag The tag @input params [String] :message The tag message @input params [String] :object The SHA of the git object this is tagging @input params [String] :type The type of the object we're tagging. Normally this is a commit but it can also be a tree or a blob @input params [Hash] :tagger A hash with information about the individual creating the tag. The tagger hash contains the following keys: @input tagger [String] :name The name of the author of the tag @input tagger [String] :email The email of the author of the tag @input tagger [String] :date When this object was tagged. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. @xample github = Github.new github.git_data.tags.create 'user-name', 'repo-name', tag: \"v0.0.1\", message: \"initial version\\n\", type: \"commit\", object: \"c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\", tagger: { name: \"Scott Chacon\", email: \"schacon@gmail.com\", date: \"2011-06-17T14:53:3\" } @api public", "label": 1, "domain": "code", "token_count": 366, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0256", "text": "This is the function that loads plugins. It is returned for use by the framework calling code. Parameters: * _plugin_ : (Object or Function or String); plugin definition * if Object: provide a partial or complete definition with same properties as return value * if Function: assumed to be plugin _init_ function; plugin name taken from function name, if defined * if String: base for _require_ search; assumes module defines an _init_ function * _options_ : (Object, ...); plugin options, if not an object, constructs an object of form {value$:options} * _callback_ : (Function); callback function, possibly to be called by framework after init function completes Returns: A plugin description object is returned, with properties: * _name_ : String; the plugin name, either supplied by calling code, or derived from definition * _init_ : Function; the plugin init function, the resolution of which is the point of this module! * _options_ : Object; plugin options, if supplied * _search_ : Array[{type,name}]; list of require search paths; applied to each module up the parent chain until something is found * _found_ : Object{type,name}; search entry that found something * _requirepath_ : String; the argument to require that found something * _modulepath_ : String; the Node.js API module.id whose require found something * _tag_ : String; the tag value of the plugin name (format: name$tag), if any, allows loading of same plugin multiple times * _err_ : Error; plugin load error, if any", "label": 1, "domain": "code", "token_count": 330, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0257", "text": "Send email via AWS SES. :returns string: message id *** Composes an email message based on input data, and then immediately queues the message for sending. :type to: list of strings or string :param to: The To: field(s) of the message. :type subject: string :param subject: The subject of the message: A short summary of the content, which will appear in the recipient's inbox. :type body: string :param body: The message body. :sender: email address of the sender. String or typle(name, email) :reply_to: email to reply to **kwargs: :type cc_addresses: list of strings or string :param cc_addresses: The CC: field(s) of the message. :type bcc_addresses: list of strings or string :param bcc_addresses: The BCC: field(s) of the message. :type format: string :param format: The format of the message's body, must be either \"text\" or \"html\". :type return_path: string :param return_path: The email address to which bounce notifications are to be forwarded. If the message cannot be delivered to the recipient, then an error message will be returned from the recipient's ISP; this message will then be forwarded to the email address specified by the ReturnPath parameter. :type text_body: string :param text_body: The text body to send with this email. :type html_body: string :param html_body: The html body to send with this email.", "label": 1, "domain": "code", "token_count": 310, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0258", "text": "ListSettlements Provides summary information for all deposits and withdrawals initiated by Square to a linked bank account during a date range. Date ranges cannot exceed one year in length. *Note**: the ListSettlements endpoint does not provide entry information. @param location_id The ID of the location to list settlements for. If you specify me, this endpoint returns payments aggregated from all of the business's locations. @param [Hash] opts the optional parameters @option opts [String] :order TThe order in which payments are listed in the response. @option opts [String] :begin_time The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. @option opts [String] :end_time The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200. @option opts [String] :status Provide this parameter to retrieve only settlements with a particular status (SENT or FAILED). @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint. @return [Array]", "label": 1, "domain": "code", "token_count": 316, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0259", "text": "
Perform a Java Properties Value level 1 (only basic set) escape operation on a String input, writing results to a Writer.
Level 1 means this method will only escape the Java Properties basic escape set:
The Single Escape Characters: \t (U+0009), \n (U+000A), \f (U+000C), \r (U+000D) and \\ (U+005C).
Two ranges of non-displayable, control characters (some of which are already part of the single escape characters list): U+0000 to U+001F and U+007F to U+009F.
This method calls {@link #escapePropertiesValue(String, Writer, PropertiesValueEscapeLevel)} with the following preconfigured values:
@param text the String to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 427, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0260", "text": "/* Method: removeEdge Removes one or more from the visualization. It can also perform several animations like fading sequentially, fading concurrently, iterating or replotting. Parameters: vertex - (array) An array having two strings which are the ids of the nodes connected by this edge (i.e ['id1', 'id2']). Can also be a two dimensional array holding many edges (i.e [['id1', 'id2'], ['id3', 'id4'], ...]). opt - (object) Animation options. It's an object with optional properties described below type - (string) Default's *nothing*. Type of the animation. Can be \"nothing\", \"replot\", \"fade:seq\", \"fade:con\" or \"iter\". duration - Described in . fps - Described in . transition - Described in . hideLabels - (boolean) Default's *true*. Hide labels during the animation. Example: (start code js) var viz = new $jit.Viz(options); viz.op.removeEdge(['nodeId', 'otherId'], { type: 'fade:seq', duration: 1000, hideLabels: false, transition: $jit.Trans.Quart.easeOut }); or also viz.op.removeEdge([['someId', 'otherId'], ['id3', 'id4']], { type: 'fade:con', duration: 1500 }); (end code)", "label": 1, "domain": "code", "token_count": 304, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0261", "text": "
Generates a stream composed of the N greatest different values of the provided stream, compared using the provided comparator. If there are no duplicates in the provided stream, then the returned stream will have N values, assuming that the input stream has more than N values.
All the duplicates are removed in the returned stream, so in this case the number of elements in the returned stream may be lesser than N. In this case, the total number of values is not guaranteed, and may be lesser than N.
Since this operator extract maxes according to the provided comparator, the result is sorted from the greatest element to the smallest, thus in the decreasing order, according to the provided comparator.
The provided implementation uses and insertion buffer of size N to keep the N maxes. This implementation becomes less and less efficient as N grows.
A NullPointerException will be thrown if the provided stream or the comparator is null.
An IllegalArgumentException is thrown if N is lesser than 1.
@param stream the processed stream @param numberOfMaxes the number of different max values that should be returned. Note that the total number of values returned may be larger if there are duplicates in the stream @param comparator the comparator used to compare the elements of the stream @param the type of the provided stream @return the filtered stream", "label": 1, "domain": "code", "token_count": 302, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0262", "text": "Creates a new proxy credential from the specified certificate chain and a private key. A set of X.509 extensions can be optionally included in the new proxy certificate. This function automatically creates a \"RSA\"-based key pair. @see #createProxyCertificate(X509Certificate, PrivateKey, PublicKey, int, int, X509ExtensionSet, String) createProxyCertificate @param certs the certificate chain for the new proxy credential. The top-most certificate cert[0] will be designated as the issuing certificate. @param privateKey the private key of the issuing certificate. The new proxy certificate will be signed with that private key. @param bits the strength of the key pair for the new proxy certificate. @param lifetime lifetime of the new certificate in seconds. If 0 (or less then) the new certificate will have the same lifetime as the issuing certificate. @param certType the type of proxy credential to create @param extSet a set of X.509 extensions to be included in the new proxy certificate. Can be null. If delegation mode is {@link org.globus.gsi.GSIConstants.CertificateType#GSI_3_RESTRICTED_PROXY GSIConstants.CertificateType.GSI_3_RESTRICTED_PROXY} or {@link org.globus.gsi.GSIConstants.CertificateType#GSI_4_RESTRICTED_PROXY GSIConstants.CertificateType.GSI_4_RESTRICTED_PROXY} then {@link org.globus.gsi.proxy.ext.ProxyCertInfoExtension ProxyCertInfoExtension} must be present in the extension set. @param cnValue the value of the CN component of the subject of the new proxy credential. If null, the defaults will be used depending on the proxy certificate type created. @return GlobusCredential the new proxy credential. @exception GeneralSecurityException if a security error occurs.", "label": 1, "domain": "code", "token_count": 379, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0263", "text": "Lists the usage details by departmentId for a scope by current billing period. Usage details are available via this API only for May 1, 2014 or later. @param department_id [String] Department ID @param expand [String] May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. @param filter [String] May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName, properties/instanceId or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). @param skiptoken [String] Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. @param top [Integer] May be used to limit the number of results to the most recent N usageDetails. @param query_options [QueryOptions] Additional parameters for the operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [UsageDetailsListResult] which provide lazy access to pages of the response.", "label": 1, "domain": "code", "token_count": 323, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0264", "text": "Starting at pos, method steps along magnetic unit vector direction towards the supplied field line trace. Determines the distance of closest approach to field line. Routine is used when calculting the mapping of electric fields along magnetic field lines. Voltage remains constant along the field but the distance between field lines does not.This routine may be used to form the last leg when trying to trace out a closed field line loop. Routine will create a high resolution field line trace (.01 km step size) near the location of closest approach to better determine where the intersection occurs. Parameters ---------- pos : array-like X, Y, and Z ECEF locations to start from field_line : array-like (:,3) X, Y, and Z ECEF locations of field line trace, produced by the field_line_trace method. sign : int if 1, move along positive unit vector. Negwtive direction for -1. time : datetime or float Date to perform tracing on (year + day/365 + hours/24. + etc.) Accounts for leap year if datetime provided. direction : string ('meridional', 'zonal', or 'aligned') Which unit vector direction to move slong when trying to intersect with supplied field line trace. See step_along_mag_unit_vector method for more. step_size_goal : float step size goal that method will try to match when stepping towards field line. Returns ------- (float, array, float) Total distance taken along vector direction; the position after taking the step [x, y, z] in ECEF; distance of closest approach from input pos towards the input field line trace.", "label": 1, "domain": "code", "token_count": 323, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0265", "text": "Defines which abilities are allowed using two arguments. The first one is the action you're setting the permission for, the second one is the class of object you're setting it on. can :update, Article You can pass an array for either of these parameters to match any one. Here the user has the ability to update or destroy both articles and comments. can [:update, :destroy], [Article, Comment] You can pass :all to match any object and :manage to match any action. Here are some examples. can :manage, :all can :update, :all can :manage, Project You can pass a hash of conditions as the third argument. Here the user can only see active projects which he owns. can :read, Project, :active => true, :user_id => user.id See ActiveRecordAdditions#accessible_by for how to use this in database queries. These conditions are also used for initial attributes when building a record in ControllerAdditions#load_resource. If the conditions hash does not give you enough control over defining abilities, you can use a block along with any Ruby code you want. can :update, Project do |project| project.groups.include?(user.group) end If the block returns true then the user has that :update ability for that project, otherwise he will be denied access. The downside to using a block is that it cannot be used to generate conditions for database queries. You can pass custom objects into this \"can\" method, this is usually done with a symbol and is useful if a class isn't available to define permissions on. can :read, :stats can? :read, :stats # => true IMPORTANT: Neither a hash of conditions nor a block will be used when checking permission on a class. can :update, Project, :priority => 3 can? :update, Project # => true If you pass no arguments to +can+, the action, class, and object will be passed to the block and the block will always be executed. This allows you to override the full behavior if the permissions are defined in an external source such as the database. can do |action, object_class, object| # check the database and return true/false end", "label": 1, "domain": "code", "token_count": 446, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0266", "text": "Get a winston logger for a given topic name. If the requested logger does not yet exist a new instance will be created internally. @param {Object} topicName - The name of the topic, topic or category the returned logger is assigned to. The topicName will be added automatically to the log output, if the configuration does not include the \"label\" property as part of the applicable winston transport configuration. @returns {Object} The winston logger for the given topic name @example // Initialize logging in the main program file using the server configuration. // You only need to call this once! Modules loaded subsequently, can simply // obtain a logger using getLogger(). var config = require(\"./config.json\"); var logging = require(\"./logger-winston\"); logging.init(serverConfig); // Now you can obtain a logger for the topic \"MyApp\", for example, and start logging. // The log output will be augmented with a label for the given topic name, automatically. // By default, the output will look like a follows: // info: [MyApp] Hello world! var logger = logging.getLogger(\"MyApp\"); logger.info(\"Hello world!\"); // You can set up a \"default\" configuration which applies for all // logger instances unless you provide specific configuration for // some topics. // In the given example the the \"default\" applies to topic \"MyApp\" while // a specific configuration has been set for topic \"Server\". var logger2 = logging.getLogger(\"Server\"); logger2.info(\"Starting Server\"); @example
Example Configuration config.json
{ \"logging\": { \"default\": { \"console\": { \"level\": \"debug\", \"colorize\": true, \"timestamp\": true } }, \"Server\": { \"console\": { \"level\": \"debug\", \"colorize\": false, \"timestamp\": false } } } } @see https://github.com/flatiron/winston#working-with-multiple-loggers-in-winston", "label": 1, "domain": "code", "token_count": 398, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0267", "text": "Returns the cldr code and the number value by checking each pattern and finding the best match. 1. iterate over each unit pattern, e.g. \"{0}m\", \"{0}km\" 1a. convert it to a reg exp pattern, e.g. \"^(.+)m$\" 1b. match it with the input \"12km\" and store the value \"12k\" and the unit value \"m\" 1c. do this for each pattern and update the best result if a better match is found A better match means most of the unit value matched and the number match is shorter. E.g. input: 12km matches for the pattern \"^(.+)m$\" and the resulting value is \"12k\" while the pattern \"^(.+)km$\" results in \"12\". Since pattern \"^(.+)km$\" returns a shorter result it is considered the better match. Note: the cldr data is not distinct in its patterns. E.g. \"100 c\" could be in \"en_gb\" either 100 units of \"volume-cup\" or \"duration-century\" both having the same pattern \"{0} c\" Therefore best matches will be returned in an array. @param {object} mUnitPatterns the unit patterns @param {string} sValue The value e.g. \"12 km\" @return {object} An object containing the unit codes (key: [cldrCode]) and the number value (key: numberValue). Values are undefined or an empty array if not found. E.g. { numberValue: 12, cldrCode: [length-kilometer] }", "label": 1, "domain": "code", "token_count": 356, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0268", "text": "Detects params from url and apply as scopes to your classes. == Options * :type - Checks the type of the parameter sent. If set to :boolean it just calls the named scope, without any argument. By default, it does not allow hashes or arrays to be given, except if type :hash or :array are set. * :only - In which actions the scope is applied. By default is :all. * :except - In which actions the scope is not applied. By default is :none. * :as - The key in the params hash expected to find the scope. Defaults to the scope name. * :using - If type is a hash, you can provide :using to convert the hash to a named scope call with several arguments. * :if - Specifies a method, proc or string to call to determine if the scope should apply * :unless - Specifies a method, proc or string to call to determine if the scope should NOT apply. * :default - Default value for the scope. Whenever supplied the scope is always called. * :allow_blank - Blank values are not sent to scopes by default. Set to true to overwrite. == Block usage has_scope also accepts a block. The controller, current scope and value are yielded to the block so the user can apply the scope on its own. This is useful in case we need to manipulate the given value: has_scope :category do |controller, scope, value| value != \"all\" ? scope.by_category(value) : scope end has_scope :not_voted_by_me, :type => :boolean do |controller, scope| scope.not_voted_by(controller.current_user.id) end", "label": 1, "domain": "code", "token_count": 384, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0269", "text": "Function takes input of four strings Start Ip, endIp, name, and description to add new Ip Scope to terminal access in the HPE IMC base platform :param name: str Name of the owner of this IP scope ex. 'admin' :param description: str description of the Ip scope :param auth: requests auth object #usually auth.creds from auth pyhpeimc.auth.class :param url: base url of IMC RS interface #usually auth.url from pyhpeimc.auth.authclass :param startip: str Start of IP address scope ex. '10.101.0.1' :param endip: str End of IP address scope ex. '10.101.0.254' :param network_address: ipv4 network address + subnet bits of target scope :return: 200 if successfull :rtype: >>> from pyhpeimc.auth import * >>> from pyhpeimc.plat.termaccess import * >>> auth = IMCAuth(\"http://\", \"10.101.0.203\", \"8080\", \"admin\", \"admin\") >>> delete_ip_scope('10.50.0.0/24', auth.creds, auth.url) >>> new_scope = add_ip_scope('10.50.0.1', '10.50.0.254', 'cyoung', 'test group', auth.creds, auth.url) >>> assert type(new_scope) is int >>> assert new_scope == 200 >>> existing_scope = add_ip_scope('10.50.0.1', '10.50.0.254', 'cyoung', 'test group', auth.creds, auth.url) >>> assert type(existing_scope) is int >>> assert existing_scope == 409", "label": 1, "domain": "code", "token_count": 364, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0270", "text": "Raises ValidationException if value is not a time formatted in one of the formats formats. Returns a datetime.date object of value. * value (str): The value being validated as a time. * blank (bool): If True, a blank string for value will be accepted. * strip (bool, str, None): If None, whitespace is stripped from value. If a str, the characters in it are stripped from value. If False, nothing is stripped. * allowlistRegexes (Sequence, None): A sequence of regex str that will explicitly pass validation, even if they aren't numbers. * blocklistRegexes (Sequence, None): A sequence of regex str or (regex_str, response_str) tuples that, if matched, will explicitly fail validation. * formats: A tuple of strings that can be passed to time.strftime, dictating the possible formats for a valid date. * excMsg (str): A custom message to use in the raised ValidationException. >>> import pysimplevalidate as pysv >>> pysv.validateDate('2/29/2004') datetime.date(2004, 2, 29) >>> pysv.validateDate('2/29/2005') Traceback (most recent call last): ... pysimplevalidate.ValidationException: '2/29/2005' is not a valid date. >>> pysv.validateDate('September 2019', formats=['%B %Y']) datetime.date(2019, 9, 1)", "label": 1, "domain": "code", "token_count": 302, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0271", "text": "Calculates the reliable z-index in the current window considering the global BusyIndicator dialog. Algorithm: 1) When popups are already open on the screen: the highest z-index of validated popups is compared with the lowest z-index of invalidated popups. The invalidated popups also include any BusyIndicator that might be open. 2) If the invalidated popups have the higher value then the next z-index is first decremented by 10, which gives the last popup z-index and then 1 is added to it. 3) After incrementing 1 in Step 2), the resultant z-index value is compared against an array of assigned z-index values by the ZIndexManager. Step 3) is repeated as long as it stays under a max value and a unique value is calculated. The max value is the next possible popup z-index - 3 (hardcoded by variable Z_INDICES_RESERVED). Example: when BusyIndicator has a z-index 100, then available indexes are: 91, 92, 93, 94, 95, 96, 97. Indexes 98 & 99 are used by BusyIndicator internally, therefore we can't rely on them. The reason we start from the index 91 is that in sap.ui.core.Popup.getNextZIndex() there is a hardcoded step with a value 10 which means there are only 10 reliable indexes between the opened BusyIndicator and the previous absolutely positioned element on the screen; 4) If no popups are open or if validated popups have a higher z-index, then simply the next possible z-index is returned by calling sap.ui.core.Popup.getNextZIndex(). @returns {int} the next available z-index value @public", "label": 1, "domain": "code", "token_count": 352, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0272", "text": "Muscle align list of sequences. seqs: a list of sequences as strings or objects, you must set add_seq_names=True or sequences in a multiline string, as read() from a fasta file or sequences in a list of lines, as readlines() from a fasta file or a fasta seq filename. == for eg, testcode for guessing #guess_input_handler should correctly identify input gih = guess_input_handler self.assertEqual(gih('abc.txt'), '_input_as_string') self.assertEqual(gih('>ab\\nTCAG'), '_input_as_multiline_string') self.assertEqual(gih(['ACC','TGA'], True), '_input_as_seqs') self.assertEqual(gih(['>a','ACC','>b','TGA']), '_input_as_lines') == docstring for blast_seqs, apply to muscle_seqs == seqs: either file name or list of sequence objects or list of strings or single multiline string containing sequences. WARNING: DECISION RULES FOR INPUT HANDLING HAVE CHANGED. Decision rules for data are as follows. If it's s list, treat as lines, unless add_seq_names is true (in which case treat as list of seqs). If it's a string, test whether it has newlines. If it doesn't have newlines, assume it's a filename. If it does have newlines, it can't be a filename, so assume it's a multiline string containing sequences. If you want to skip the detection and force a specific type of input handler, use input_handler='your_favorite_handler'. add_seq_names: boolean. if True, sequence names are inserted in the list of sequences. if False, it assumes seqs is a list of lines of some proper format that the program can handle Addl docs coming soon", "label": 1, "domain": "code", "token_count": 355, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0273", "text": "Return a Pandas Series of every file for chosen satellite data. This routine is intended to be used by pysat instrument modules supporting a particular NASA CDAWeb dataset. Parameters ----------- tag : (string or NoneType) Denotes type of file to load. Accepted types are . (default=None) sat_id : (string or NoneType) Specifies the satellite ID for a constellation. Not used. (default=None) data_path : (string or NoneType) Path to data directory. If None is specified, the value previously set in Instrument.files.data_path is used. (default=None) format_str : (string or NoneType) User specified file format. If None is specified, the default formats associated with the supplied tags are used. (default=None) supported_tags : (dict or NoneType) keys are tags supported by list_files routine. Values are the default format_str values for key. (default=None) fake_daily_files_from_monthly : bool Some CDAWeb instrument data files are stored by month, interfering with pysat's functionality of loading by day. This flag, when true, appends daily dates to monthly files internally. These dates are used by load routine in this module to provide data by day. Returns -------- pysat.Files.from_os : (pysat._files.Files) A class containing the verified available files Examples -------- :: fname = 'cnofs_vefi_bfield_1sec_{year:04d}{month:02d}{day:02d}_v05.cdf' supported_tags = {'dc_b':fname} list_files = functools.partial(nasa_cdaweb_methods.list_files, supported_tags=supported_tags) ivm_fname = 'cnofs_cindi_ivm_500ms_{year:4d}{month:02d}{day:02d}_v01.cdf' supported_tags = {'':ivm_fname} list_files = functools.partial(cdw.list_files, supported_tags=supported_tags)", "label": 1, "domain": "code", "token_count": 398, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0274", "text": "
Perform an XML 1.0 level 2 (markup-significant and all non-ASCII chars) escape operation on a String input meant to be an XML attribute value, writing results to a Writer.
Level 2 means this method will escape:
The five markup-significant characters: <, >, &, " and '
All non ASCII characters.
This escape will be performed by replacing those chars by the corresponding XML Character Entity References (e.g. '<') when such CER exists for the replaced character, and replacing by a hexadecimal character reference (e.g. '␰') when there there is no CER for the replaced character.
Besides, being an attribute value also \t, \n and \r will be escaped to avoid white-space normalization from removing line feeds (turning them into white spaces) during future parsing operations.
This method calls {@link #escapeXml10(String, Writer, XmlEscapeType, XmlEscapeLevel)} with the following preconfigured values:
@param text the String to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.5", "label": 1, "domain": "code", "token_count": 493, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0275", "text": "Open a GEOS-Chem BPCH file output as an xarray Dataset. Parameters ---------- filename : string Path to the output file to read in. {tracerinfo,diaginfo}_file : string, optional Path to the metadata \"info\" .dat files which are used to decipher the metadata corresponding to each variable in the output dataset. If not provided, will look for them in the current directory or fall back on a generic set. fields : list, optional List of a subset of variable names to return. This can substantially improve read performance. Note that the field here is just the tracer name - not the category, e.g. 'O3' instead of 'IJ-AVG-$_O3'. categories : list, optional List a subset of variable categories to look through. This can substantially improve read performance. endian : {'=', '>', '<'}, optional Endianness of file on disk. By default, \"big endian\" (\">\") is assumed. decode_cf : bool Enforce CF conventions for variable names, units, and other metadata default_dtype : numpy.dtype, optional Default datatype for variables encoded in file on disk (single-precision float by default). memmap : bool Flag indicating that data should be memory-mapped from disk instead of eagerly loaded into memory dask : bool Flag indicating that data reading should be deferred (delayed) to construct a task-graph for later execution return_store : bool Also return the underlying DataStore to the user Returns ------- ds : xarray.Dataset Dataset containing the requested fields (or the entire file), with data contained in proxy containers for access later. store : xarray.AbstractDataStore Underlying DataStore which handles the loading and processing of bpch files on disk", "label": 1, "domain": "code", "token_count": 345, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0276", "text": "Determines the interfaces implemented by the classes from the lowest type to the highestType which are extended the given interfaceType.
Insteed of {@link Class#getInterfaces()}, this function is exploring the super classes. This function does not explore super-interfaces of implemented interfaces.
interface IA {} interface IB extends IA {} interface IC {} interface ID extends IB, IC {} class CA implements IC {} class CB extends CA {} class CC extends CB implements IB {}
This function replies for:
getAllDirectInterfaces(IA,null,null)={}
getAllDirectInterfaces(IB,null,null)={IA}
getAllDirectInterfaces(IC,null,null)={}
getAllDirectInterfaces(ID,null,null)={IB,IC}
getAllDirectInterfaces(CA,null,null)={IC}
getAllDirectInterfaces(CB,null,null)={IC}
getAllDirectInterfaces(CC,null,null)={IB,IC}
@param is the highest type to explore in type hierarchy. @param indicates the type of the replied interfaces. @param lowestType is the lowest type to explore in type hierarchy. @param highestType is the highest type to explore in type hierarchy. @param interfaceType indicates the type of the replied interfaces. @return the implemented interfaces. @since 5.0", "label": 1, "domain": "code", "token_count": 358, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0277", "text": "Creates a collection of check boxes for each item in the collection, associated with a clickable label. Use value_method and text_method to convert items in the collection for use as text/value in check boxes. You can give a symbol or a proc to both value_method and text_method, that will be evaluated for each item in the collection. == Examples form_for @user do |f| f.collection_check_boxes :options, [[true, 'Yes'] ,[false, 'No']], :first, :last end It is also possible to give a block that should generate the check box + label. To wrap the check box with the label, for instance: form_for @user do |f| f.collection_check_boxes( :options, [[true, 'Yes'] ,[false, 'No']], :first, :last ) do |b| b.label { b.check_box + b.text } end end == Options Collection check box accepts some extra options: * checked => the value or values that should be checked initially. Accepts a single item or an array of items. It overrides existing associations. * disabled => the value or values that should be disabled. Accepts a single item or an array of items. * collection_wrapper_tag => the tag to wrap the entire collection. * collection_wrapper_class => the CSS class to use for collection_wrapper_tag. This option is ignored if the :collection_wrapper_tag option is blank. * item_wrapper_tag => the tag to wrap each item in the collection. * item_wrapper_class => the CSS class to use for item_wrapper_tag * a block => to generate the label + check box or any other component.", "label": 1, "domain": "code", "token_count": 446, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0278", "text": "Create a Albers Equal-Area Conic Projection based Spatial Reference. The params passed in construction should include the following properties: -wkid: well-known id -semi_major: ellipsoidal semi-major axis in meter -unit: meters per unit -inverse_flattening: inverse of flattening of the ellipsoid where 1/f = a/(a - b) -standard_parallel_1: phi1, latitude of the first standard parallel -standard_parallel_2: phi2, latitude of the second standard parallel -latitude_of_origin: phi0, latitude of the false origin -central_meridian: lamda0, longitude of the false origin (with respect to the prime meridian) -false_easting: FE, false easting, the Eastings value assigned to the natural origin -false_northing: FN, false northing, the Northings value assigned to the natural origin e.g. var albers = new Albers({wkid:9999, semi_major: 6378206.4,inverse_flattening: 294.9786982, standard_parallel_1: 29.5, standard_parallel_2: 45.5, central_meridian: -96.0, latitude_of_origin: 23,false_easting: 0, 'false_northing': 0, unit: 1 }); @name Albers @class This class (Albers) represents a Spatial Reference System based on Albers Projection. @extends SpatialReference @constructor @param {Object} params", "label": 1, "domain": "code", "token_count": 389, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0279", "text": "
Perform am URI query parameter (name or value) escape operation on a char[] input using UTF-8 as encoding.
The following are the only allowed chars in an URI query parameter (will not be escaped):
A-Z a-z 0-9
- . _ ~
! $ ' ( ) * , ;
: @
/ ?
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
@param text the char[] to be escaped. @param offset the position in text at which the escape operation should start. @param len the number of characters in text that should be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs", "label": 1, "domain": "code", "token_count": 334, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0280", "text": "
Perform an XML 1.0 level 1 (only markup-significant chars) escape operation on a Reader input, writing results to a Writer.
Level 1 means this method will only escape the five markup-significant characters which are predefined as Character Entity References in XML: <, >, &, " and '.
This method calls {@link #escapeXml10(Reader, Writer, XmlEscapeType, XmlEscapeLevel)} with the following preconfigured values:
@param reader the Reader reading the text to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 330, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0281", "text": "
Perform a (configurable) XML 1.1 escape operation on a Reader input meant to be an XML attribute value, writing results to a Writer.
This method will perform an escape operation according to the specified {@link org.unbescape.xml.XmlEscapeType} and {@link org.unbescape.xml.XmlEscapeLevel} argument values.
Besides, being an attribute value also \t, \n and \r will be escaped to avoid white-space normalization from removing line feeds (turning them into white spaces) during future parsing operations.
All other Reader/Writer-based escapeXml11*(...) methods call this one with preconfigured type and level values.
This method is thread-safe.
@param reader the Reader reading the text to be escaped. @param type the type of escape operation to be performed, see {@link org.unbescape.xml.XmlEscapeType}. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @param level the escape level to be applied, see {@link org.unbescape.xml.XmlEscapeLevel}. @throws IOException if an input/output exception occurs @since 1.1.5", "label": 1, "domain": "code", "token_count": 357, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0282", "text": "Create Export Request Export normalized messages. The following input combinations are supported:<br/><table><tr><th>Combination</th><th>Parameters</th><th>Description</th></tr><tr><td>Get by users</td><td>uids</td><td>Search by a list of User IDs. For each user in the list, the current authenticated user must have read access over the specified user.</td></tr><tr><td>Get by devices</td><td>sdids</td><td>Search by Source Device IDs.</td></tr><tr><td>Get by device types</td><td>uids,sdtids</td><td>Search by list of Source Device Type IDs for the given list of users.</td></tr><tr><td>Get by trial</td><td>trialId</td><td>Search by Trial ID.</td></tr><tr><td>Get by combination of parameters</td><td>uids,sdids,sdtids</td><td>Search by list of Source Device IDs. Each Device ID must belong to a Source Device Type ID and a User ID.</td></tr><tr><td>Common</td><td>startDate,endDate,order,format,url,csvHeaders</td><td>Parameters that can be used with the above combinations.</td></tr></table> @param exportRequestInfo ExportRequest object that is passed in the body (required) @return ExportRequestResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body", "label": 1, "domain": "code", "token_count": 490, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0283", "text": "Registers and configures sender through a dedicated builder. For example:
If your custom builder is annotated by one or several of:
{@link RequiredClass}
{@link RequiredProperty}
{@link RequiredClasses}
{@link RequiredProperties}
Then if condition evaluation returns true, your built implementation will be used. If you provide several annotations, your built implementation will be used only if all conditions are met (and operator).
If your custom builder implements {@link ActivableAtRuntime}, and the provided condition evaluation returns true, then your built implementation will be used. See {@link MessageConditions} to build your condition.
If neither annotations nor implementation of {@link ActivableAtRuntime} is used, then your built implementation will be always used. All other implementations (even standard ones) will never be used.
In order to be able to keep chaining, you builder instance may provide a constructor with one argument with the type of the parent builder ({@link SmsBuilder}). If you don't care about chaining, just provide a default constructor.
Your builder may return {@code null} when calling {@link Builder#build()}. In this case it means that your implementation can't be used due to current environment. Your implementation is then not registered.
@param builderClass the builder class to instantiate @param the type of the builder @return the builder to configure the implementation", "label": 1, "domain": "code", "token_count": 341, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0284", "text": "Create a string array from a string separated by delim.
The split command needs to deal with the following accurately:
Suppose that you are a programmer working with a database.
Lets say we output files from the database in this format:
||stl|north|10 Moon St.|Culver City|CA||||red
Now, lets say we want to delete the second column and make sure what was the third column is now all caps.
So, out split, needs to deal with that: @param src a String value @param delim the delimiter to split by. @param trim a boolean value @return a string array of the split fields. Return an empty array if this string is null.", "label": 1, "domain": "code", "token_count": 408, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0285", "text": "
Perform am URI path escape operation on a char[] input using UTF-8 as encoding.
The following are the only allowed chars in an URI path (will not be escaped):
A-Z a-z 0-9
- . _ ~
! $ & ' ( ) * + , ; =
: @
/
All other chars will be escaped by converting them to the sequence of bytes that represents them in the UTF-8 and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
@param text the char[] to be escaped. @param offset the position in text at which the escape operation should start. @param len the number of characters in text that should be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs", "label": 1, "domain": "code", "token_count": 331, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0286", "text": "Enables periodic backup of stateful partitions under this Service Fabric service. Enables periodic backup of stateful partitions which are part of this Service Fabric service. Each partition is backed up individually as per the specified backup policy description. In case the application, which the service is part of, is already enabled for backup then this operation would override the policy being used to take the periodic backup for this service and its partitions (unless explicitly overridden at the partition level). Note only C# based Reliable Actor and Reliable Stateful services are currently supported for periodic backup. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the service name is \"fabric:/myapp/app1/svc1\", the service identity would be \"myapp~app1~svc1\" in 6.0+ and \"myapp/app1/svc1\" in previous versions. @param enable_backup_description [EnableBackupDescription] Specifies the parameters for enabling backup. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 315, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0287", "text": "Returns an Error instance from a jQuery XHR wrapper. @param {object} jqXHR A jQuery XHR wrapper as received by a failure handler @param {function} jqXHR.getResponseHeader Used to access the HTTP response header \"Content-Type\" @param {string} jqXHR.responseText HTTP response body, sometimes in JSON format (\"Content-Type\" : \"application/json\") according to OData \"19 Error Response\" specification, sometimes plain text (\"Content-Type\" : \"text/plain\"); other formats are ignored @param {number} jqXHR.status HTTP status code @param {string} jqXHR.statusText HTTP status text @param {string} sMessage The message for the Error instance; code and status text of the HTTP error are appended @param {string} [sRequestUrl] The request URL @param {string} [sResourcePath] The path by which this resource has originally been requested @returns {Error} An Error instance with the following properties:
error: The \"error\" value from the OData V4 error response JSON object (if available)
isConcurrentModification: true In case of a concurrent modification detected via ETags (i.e. HTTP status code 412)
message: Error message
requestUrl: The request URL
resourcePath: The path by which this resource has originally been requested
status: HTTP status code
statusText: (optional) HTTP status text
@see \"19 Error Response\"", "label": 1, "domain": "code", "token_count": 396, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0288", "text": "Set the target of the page so that common infrastructure (breadcrumbs, related menu, etc.) can be added for the page. @name orion.globalCommands#setPageTarget @function @param {Object} options The target options object. @param {String} options.task the name of the user task that the page represents. @param {Object} options.target the metadata describing the page resource target. Optional. @param {String} options.name the name of the resource that is showing on the page. Optional. If a target parameter is supplied, the target metadata name will be used if a name is not specified in the options. @param {String} options.title the title to be used for the page. Optional. If not specified, a title will be constructed using the task and/or name. @param {Function} options.makeAlternate a function that can supply alternate metadata for the related pages menu if the target does not validate against a contribution. Optional. Optional. If not specified, and if a target is specified, the breadcrumb link will refer to the Navigator. @param {orion.serviceregistry.ServiceRegistry} options.serviceRegistry the registry to use for obtaining any unspecified services. Optional. If not specified, then any banner elements requiring Orion services will not be provided. @param {orion.commandregistry.CommandRegistry} options.commandService the commandService used for accessing related page commands. Optional. If not specified, a related page menu will not be shown. @param {orion.searchClient.Searcher} options.searchService the searchService used for scoping the searchbox. Optional. If not specified, the searchbox will not be scoped. @param {orion.fileClient.FileClient} options.fileService the fileService used for retrieving additional metadata and managing the breadcrumb for multiple file services. If not specified, there may be reduced support for multiple file implementations.", "label": 1, "domain": "code", "token_count": 379, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0289", "text": "Installs a powerup (e.g. plugin) on an item or store. Powerups will be returned in an iterator when queried for using the 'powerupsFor' method. Normally they will be returned in order of installation [this may change in future versions, so please don't depend on it]. Higher priorities are returned first. If you have something that should run before \"normal\" powerups, pass POWERUP_BEFORE; if you have something that should run after, pass POWERUP_AFTER. We suggest not depending too heavily on order of execution of your powerups, but if finer-grained control is necessary you may pass any integer. Normal (unspecified) priority is zero. Powerups will only be installed once on a given item. If you install a powerup for a given interface with priority 1, then again with priority 30, the powerup will be adjusted to priority 30 but future calls to powerupFor will still only return that powerup once. If no interface or priority are specified, and the class of the powerup has a \"powerupInterfaces\" attribute (containing either a sequence of interfaces, or a sequence of (interface, priority) tuples), this object will be powered up with the powerup object on those interfaces. If no interface or priority are specified and the powerup has a \"__getPowerupInterfaces__\" method, it will be called with an iterable of (interface, priority) tuples, collected from the \"powerupInterfaces\" attribute described above. The iterable of (interface, priority) tuples it returns will then be installed. @param powerup: an Item that implements C{interface} (if specified) @param interface: a zope interface, or None @param priority: An int; preferably either POWERUP_BEFORE, POWERUP_AFTER, or unspecified. @raise TypeError: raises if interface is IPowerupIndirector You may not install a powerup for IPowerupIndirector because that would be nonsensical.", "label": 1, "domain": "code", "token_count": 404, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0290", "text": "APIProperty: events {} Events instance for listeners and triggering control specific events. Register a listener for a particular event with the following syntax: (code) control.events.register(type, obj, listener); (end) Supported event types (in addition to those from ): beforefeatureselected - Triggered when is true before a feature is selected. The event object has a feature property with the feature about to select featureselected - Triggered when is true and a feature is selected. The event object has a feature property with the selected feature beforefeaturesselected - Triggered when is true before a set of features is selected. The event object is an array of feature properties with the features about to be selected. Return false after receiving this event to discontinue processing of all featureselected events and the featuresselected event. featuresselected - Triggered when is true and a set of features is selected. The event object is an array of feature properties of the selected features featureunselected - Triggered when is true and a feature is unselected. The event object has a feature property with the unselected feature clickout - Triggered when when is true and no feature was selected. hoverfeature - Triggered when is true and the mouse has stopped over a feature outfeature - Triggered when is true and the mouse moves moved away from a hover-selected feature Constructor: OpenLayers.Control.GetFeature Create a new control for fetching remote features. Parameters: options - {Object} A configuration object which at least has to contain a property (if not, it has to be set before a request is made)", "label": 1, "domain": "code", "token_count": 353, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0291", "text": "Constructs a geographic mesh. @alias GeographicMesh @constructor @augments AbstractMesh @classdesc Represents a 3D geographic mesh.
Altitudes within the mesh's positions are interpreted according to the mesh's altitude mode, which can be one of the following:
If the latter, the mesh positions' altitudes are ignored. (If the mesh should be draped onto the terrain, you might want to use {@link SurfacePolygon} instead.)
Meshes have separate attributes for normal display and highlighted display. They use the interior and outline attributes of {@link ShapeAttributes}. If those attributes identify an image, that image is applied to the mesh. Texture coordinates for the image may be specified, but if not specified the full image is stretched over the full mesh. If texture coordinates are specified, there must be one texture coordinate for each vertex in the mesh. @param {Position[][]} positions A two-dimensional array containing the mesh vertices. Each entry of the array specifies the vertices of one row of the mesh. The arrays for all rows must have the same length. There must be at least two rows, and each row must have at least two vertices. There must be no more than 65536 positions. @param {ShapeAttributes} attributes The attributes to associate with this mesh. May be null, in which case default attributes are associated. @throws {ArgumentError} If the specified positions array is null or undefined, the number of rows or the number of vertices per row is less than 2, the array lengths are inconsistent, or too many positions are specified (limit is 65536).", "label": 1, "domain": "code", "token_count": 401, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0292", "text": "Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxCellOverlay Extends to implement a graph overlay, represented by an icon and a tooltip. Overlays can handle and fire events and are added to the graph using , and removed using , or to remove all overlays. The function returns the array of overlays for a given cell in a graph. If multiple overlays exist for the same cell, then should be overridden in at least one of the overlays. Overlays appear on top of all cells in a special layer. If this is not desirable, then the image must be rendered as part of the shape or label of the cell instead. Example: The following adds a new overlays for a given vertex and selects the cell if the overlay is clicked. (code) var overlay = new mxCellOverlay(img, html); graph.addCellOverlay(vertex, overlay); overlay.addListener(mxEvent.CLICK, function(sender, evt) { var cell = evt.getProperty('cell'); graph.setSelectionCell(cell); }); (end) For cell overlays to be printed use . Event: mxEvent.CLICK Fires when the user clicks on the overlay. The event property contains the corresponding mouse event and the cell property contains the cell. For touch devices this is fired if the element receives a touchend event. Constructor: mxCellOverlay Constructs a new overlay using the given image and tooltip. Parameters: image - that represents the icon to be displayed. tooltip - Optional string that specifies the tooltip. align - Optional horizontal alignment for the overlay. Possible values are , and (default). verticalAlign - Vertical alignment for the overlay. Possible values are , and (default).", "label": 1, "domain": "code", "token_count": 430, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0293", "text": "Raises ValidationException if value is not a string. This function is identical to the built-in input() function, but also offers the PySimpleValidate features of not allowing blank values by default, automatically stripping whitespace, and having allowlist/blocklist regular expressions. Returns value, so it can be used inline in an expression: print('Hello, ' + validateStr(your_name)) * value (str): The value being validated as a string. * blank (bool): If True, a blank string will be accepted. Defaults to False. Defaults to False. * strip (bool, str, None): If None, whitespace is stripped from value. If a str, the characters in it are stripped from value. If False, nothing is stripped. * allowlistRegexes (Sequence, None): A sequence of regex str that will explicitly pass validation, even if they aren't numbers. * blocklistRegexes (Sequence, None): A sequence of regex str or (regex_str, response_str) tuples that, if matched, will explicitly fail validation. * excMsg (str): A custom message to use in the raised ValidationException. >>> import pysimplevalidate as pysv >>> pysv.validateStr('hello') 'hello' >>> pysv.validateStr('') Traceback (most recent call last): ... pysimplevalidate.ValidationException: Blank values are not allowed. >>> pysv.validateStr('', blank=True) '' >>> pysv.validateStr(' hello ') 'hello' >>> pysv.validateStr('hello', blocklistRegexes=['hello']) Traceback (most recent call last): ... pysimplevalidate.ValidationException: This response is invalid. >>> pysv.validateStr('hello', blocklistRegexes=[('hello', 'Hello is not allowed')]) Traceback (most recent call last): ... pysimplevalidate.ValidationException: Hello is not allowed >>> pysv.validateStr('hello', allowlistRegexes=['hello'], blocklistRegexes=['llo']) 'hello'", "label": 1, "domain": "code", "token_count": 400, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0294", "text": "Function takes input of dictionary operator with the following keys operator = { \"fullName\" : \"\" , \"sessionTimeout\" : \"\", \"password\" : \"\", \"operatorGroupId\" : \"\", \"name\" : \"\", \"desc\" : \"\", \"defaultAcl\" : \"\", \"authType\" : \"\"} converts to json and issues a HTTP POST request to the HPE IMC Restful API :param auth: requests auth object #usually auth.creds from auth pyhpeimc.auth.class :param url: base url of IMC RS interface #usually auth.url from pyhpeimc.auth.authclass :param operator: dictionary with the required operator key-value pairs as defined above. :return: :rtype: >>> from pyhpeimc.auth import * >>> from pyhpeimc.plat.operator import * >>> auth = IMCAuth(\"http://\", \"10.101.0.203\", \"8080\", \"admin\", \"admin\") >>> operator = { \"fullName\" : \"test administrator\", \"sessionTimeout\" : \"30\", \"password\" : \"password\", \"operatorGroupId\" : \"1\", \"name\" : \"testadmin\", \"desc\" : \"test admin account\", \"defaultAcl\" : \"\", \"authType\" : \"0\"} >>> delete_if_exists = delete_plat_operator('testadmin', auth.creds, auth.url) >>> new_operator = create_operator(operator, auth.creds, auth.url) >>> assert type(new_operator) is int >>> assert new_operator == 201 >>> fail_operator_create = create_operator(operator, auth.creds, auth.url) >>> assert type(fail_operator_create) is int >>> assert fail_operator_create == 409", "label": 1, "domain": "code", "token_count": 347, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0295", "text": "Function: makeDraggable Configures the given DOM element to act as a drag source for the specified graph. Returns a a new . If is enabled then the x and y arguments must be used in funct to match the preview location. Example: (code) var funct = function(graph, evt, cell, x, y) { if (graph.canImportCell(cell)) { var parent = graph.getDefaultParent(); var vertex = null; graph.getModel().beginUpdate(); try { vertex = graph.insertVertex(parent, null, 'Hello', x, y, 80, 30); } finally { graph.getModel().endUpdate(); } graph.setSelectionCell(vertex); } } var img = document.createElement('img'); img.setAttribute('src', 'editors/images/rectangle.gif'); img.style.position = 'absolute'; img.style.left = '0px'; img.style.top = '0px'; img.style.width = '16px'; img.style.height = '16px'; var dragImage = img.cloneNode(true); dragImage.style.width = '32px'; dragImage.style.height = '32px'; mxUtils.makeDraggable(img, graph, funct, dragImage); document.body.appendChild(img); (end) Parameters: element - DOM element to make draggable. graphF - that acts as the drop target or a function that takes a mouse event and returns the current . funct - Function to execute on a successful drop. dragElement - Optional DOM node to be used for the drag preview. dx - Optional horizontal offset between the cursor and the drag preview. dy - Optional vertical offset between the cursor and the drag preview. autoscroll - Optional boolean that specifies if autoscroll should be used. Default is mxGraph.autoscroll. scalePreview - Optional boolean that specifies if the preview element should be scaled according to the graph scale. If this is true, then the offsets will also be scaled. Default is false. highlightDropTargets - Optional boolean that specifies if dropTargets should be highlighted. Default is true. getDropTarget - Optional function to return the drop target for a given location (x, y). Default is mxGraph.getCellAt.", "label": 1, "domain": "code", "token_count": 452, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0296", "text": "Constructor for a new _Requestor instance for the given service URL and default headers. @param {string} sServiceUrl URL of the service document to request the CSRF token from; also used to resolve relative resource paths (see {@link #request}) @param {object} [mHeaders={}] Map of default headers; may be overridden with request-specific headers; certain predefined OData V4 headers are added by default, but may be overridden @param {object} [mQueryParams={}] A map of query parameters as described in {@link sap.ui.model.odata.v4.lib._Helper.buildQuery}; used only to request the CSRF token @param {object} oModelInterface A interface allowing to call back to the owning model @param {function} oModelInterface.fetchEntityContainer A promise which is resolved with the $metadata \"JSON\" object as soon as the entity container is fully available, or rejected with an error. @param {function} oModelInterface.fetchMetadata A function that returns a SyncPromise which resolves with the metadata instance for a given meta path @param {function} oModelInterface.getGroupProperty A function called with parameters sGroupId and sPropertyName returning the property value in question. Only 'submit' is supported for sPropertyName. Supported property values are: 'API', 'Auto' and 'Direct'. @param {function} oModelInterface.reportBoundMessages A function for reporting bound messages; see {@link #reportBoundMessages} for the signature of this function @param {function} oModelInterface.reportUnboundMessages A function called with parameters sResourcePath and sMessages reporting unbound OData messages to the {@link sap.ui.core.message.MessageManager}. @param {function (string)} [oModelInterface.onCreateGroup] A callback function that is called with the group name as parameter when the first request is added to a group @private", "label": 1, "domain": "code", "token_count": 409, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0297", "text": "Add new networkipv6 :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_tipo_rede: Identifier of the NetworkType. Integer value and greater than zero. :param num_hosts: Number of hosts expected. Integer value and greater than zero. :param id_ambiente_vip: Identifier of the Environment Vip. Integer value and greater than zero. :return: Following dictionary: :: {'vlan': {'id': < id_vlan >, 'nome': < nome_vlan >, 'num_vlan': < num_vlan >, 'id_tipo_rede': < id_tipo_rede >, 'id_ambiente': < id_ambiente >, 'rede_oct1': < rede_oct1 >, 'rede_oct2': < rede_oct2 >, 'rede_oct3': < rede_oct3 >, 'rede_oct4': < rede_oct4 >, 'rede_oct5': < rede_oct4 >, 'rede_oct6': < rede_oct4 >, 'rede_oct7': < rede_oct4 >, 'rede_oct8': < rede_oct4 >, 'bloco': < bloco >, 'mascara_oct1': < mascara_oct1 >, 'mascara_oct2': < mascara_oct2 >, 'mascara_oct3': < mascara_oct3 >, 'mascara_oct4': < mascara_oct4 >, 'mascara_oct5': < mascara_oct4 >, 'mascara_oct6': < mascara_oct4 >, 'mascara_oct7': < mascara_oct4 >, 'mascara_oct8': < mascara_oct4 >, 'broadcast': < broadcast >, 'descricao': < descricao >, 'acl_file_name': < acl_file_name >, 'acl_valida': < acl_valida >, 'ativada': < ativada >}} :raise TipoRedeNaoExisteError: NetworkType not found. :raise InvalidParameterError: Invalid ID for Vlan or NetworkType. :raise EnvironmentVipNotFoundError: Environment VIP not registered. :raise IPNaoDisponivelError: Network address unavailable to create a NetworkIPv6. :raise ConfigEnvironmentInvalidError: Invalid Environment Configuration or not registered :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to generate the XML response.", "label": 1, "domain": "code", "token_count": 494, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0298", "text": "List all existing large person groups’ largePersonGroupId, name, userData and recognitionModel. * Large person groups are stored in alphabetical order of largePersonGroupId. * \"start\" parameter (string, optional) is a user-provided largePersonGroupId value that returned entries have larger ids by string comparison. \"start\" set to empty to indicate return from the first item. * \"top\" parameter (int, optional) specifies the number of entries to return. A maximal of 1000 entries can be returned in one call. To fetch more, you can specify \"start\" with the last returned entry’s Id of the current call. For example, total 5 large person groups: \"group1\", ..., \"group5\". \"start=&top=\" will return all 5 groups. \"start=&top=2\" will return \"group1\", \"group2\". \"start=group2&top=3\" will return \"group3\", \"group4\", \"group5\". @param start [String] List large person groups from the least largePersonGroupId greater than the \"start\". @param top [Integer] The number of large person groups to list. @param return_recognition_model [Boolean] A value indicating whether the operation should return 'recognitionModel' in response. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 317, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0299", "text": "/* Method: computeIncremental Performs the Force Directed algorithm incrementally. Description: ForceDirected algorithms can perform many computations and lead to JavaScript taking too much time to complete. This method splits the algorithm into smaller parts allowing the user to track the evolution of the algorithm and avoiding browser messages such as \"This script is taking too long to complete\". Parameters: opt - (object) The object properties are described below iter - (number) Default's *20*. Split the algorithm into pieces of _iter_ iterations. For example, if the _iterations_ configuration property of your class is 100, then you could set _iter_ to 20 to split the main algorithm into 5 smaller pieces. property - (string) Default's *end*. Whether to update starting, current or ending node positions. Possible values are 'end', 'start', 'current'. You can also set an array of these properties. If you'd like to keep the current node positions but to perform these computations for final animation positions then you can just choose 'end'. onStep - (function) A callback function called when each \"small part\" of the algorithm completed. This function gets as first formal parameter a percentage value. onComplete - A callback function called when the algorithm completed. Example: In this example I calculate the end positions and then animate the graph to those positions (start code js) var fd = new $jit.ForceDirected(...); fd.computeIncremental({ iter: 20, property: 'end', onStep: function(perc) { Log.write(\"loading \" + perc + \"%\"); }, onComplete: function() { Log.write(\"done\"); fd.animate(); } }); (end code) In this example I calculate all positions and (re)plot the graph (start code js) var fd = new ForceDirected(...); fd.computeIncremental({ iter: 20, property: ['end', 'start', 'current'], onStep: function(perc) { Log.write(\"loading \" + perc + \"%\"); }, onComplete: function() { Log.write(\"done\"); fd.plot(); } }); (end code)", "label": 1, "domain": "code", "token_count": 430, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0300", "text": "A factory method for creating {@link BooleanConstraint}s from an arbitrary propositional logic formula (wff). Allowed connectives are ^ (and), v (or), ~ (not), -> (implies), <-> (iff)}. Atoms in the formula should be named \"xN\" where x is in [a-z] and N is in {1..scope.length}. The signature of the formula must contain all and only the variables in the scope. The conversion to CNF is provided by the propositional logic CNFTransformer class of the aima-java library (see aima-java.googlecode.com). Note: the given wff must be composed of binary clauses (i.e., all parantheses must be made explicit). For example, the following wff (x1 ^ x2) ^ (x2 v ~x3 ^ x4) ^ (~x1 v x3) ^ (x2 v ~x3 ^ ~x4) must be input as ((((x1 ^ x2) ^ (x2 v (~x3 ^ x4))) ^ (~x1 v x3)) ^ (x2 v (~x3 ^ ~x4))) or as (((x1 ^ x2) ^ (x2 v (~x3 ^ x4))) ^ ((~x1 v x3) ^ (x2 v (~x3 ^ ~x4)))) @param scope The {@link BooleanVariable}s referred to in the formula. @param wff An arbitrary propositional logic formula. @return One or more {@link BooleanConstraint}s representing the given formula in CNF.", "label": 1, "domain": "code", "token_count": 430, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0301", "text": "
Perform am URI query parameter (name or value) escape operation on a String input, writing results to a Writer.
The following are the only allowed chars in an URI query parameter (will not be escaped):
A-Z a-z 0-9
- . _ ~
! $ ' ( ) * , ;
: @
/ ?
All other chars will be escaped by converting them to the sequence of bytes that represents them in the specified encoding and then representing each byte in %HH syntax, being HH the hexadecimal representation of the byte.
This method is thread-safe.
@param text the String to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @param encoding the encoding to be used for escaping. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 308, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0302", "text": "Compares two software version numbers (e.g. \"1.7.1\" or \"1.2b\"). This function was born in http://stackoverflow.com/a/6832721. @param {string} v1 The first version to be compared. @param {string} v2 The second version to be compared. @param {object} [options] Optional flags that affect comparison behavior:
lexicographical: true compares each part of the version strings lexicographically instead of naturally; this allows suffixes such as \"b\" or \"dev\" but will cause \"1.10\" to be considered smaller than \"1.2\".
zeroExtend: true changes the result if one version string has less parts than the other. In this case the shorter string will be padded with \"zero\" parts instead of being considered smaller.
@returns {number|NaN}
0 if the versions are equal
a negative integer iff v1 < v2
a positive integer iff v1 > v2
NaN if either version string is in the wrong format
@copyright by Jon Papaioannou ([\"john\", \"papaioannou\"].join(\".\") + \"@gmail.com\") @license This function is in the public domain. Do what you want with it, no strings attached.", "label": 1, "domain": "code", "token_count": 316, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0303", "text": "rubocop: enable PredicateName Slugify a filename or title. string - the filename or title to slugify mode - how string is slugified cased - whether to replace all uppercase letters with their lowercase counterparts When mode is \"none\", return the given string. When mode is \"raw\", return the given string, with every sequence of spaces characters replaced with a hyphen. When mode is \"default\" or nil, non-alphabetic characters are replaced with a hyphen too. When mode is \"pretty\", some non-alphabetic characters (._~!$&'()+,;=@) are not replaced with hyphen. When mode is \"ascii\", some everything else except ASCII characters a-z (lowercase), A-Z (uppercase) and 0-9 (numbers) are not replaced with hyphen. When mode is \"latin\", the input string is first preprocessed so that any letters with accents are replaced with the plain letter. Afterwards, it follows the \"default\" mode of operation. If cased is true, all uppercase letters in the result string are replaced with their lowercase counterparts. Examples: slugify(\"The _config.yml file\") # => \"the-config-yml-file\" slugify(\"The _config.yml file\", \"pretty\") # => \"the-_config.yml-file\" slugify(\"The _config.yml file\", \"pretty\", true) # => \"The-_config.yml file\" slugify(\"The _config.yml file\", \"ascii\") # => \"the-config-yml-file\" slugify(\"The _config.yml file\", \"latin\") # => \"the-config-yml-file\" Returns the slugified string.", "label": 1, "domain": "code", "token_count": 337, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0304", "text": "Gets the Service Fabric application backup configuration information. Gets the Service Fabric backup configuration information for the application and the services and partitions under this application. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the application name is \"fabric:/myapp/app1\", the application identity would be \"myapp~app1\" in 6.0+ and \"myapp/app1\" in previous versions. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [PagedBackupConfigurationInfoList] operation results.", "label": 1, "domain": "code", "token_count": 395, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0305", "text": "Helper for computing an initial load size in {@link #loadInitial(LoadInitialParams, LoadInitialCallback)} when total data set size can be computed ahead of loading.
This function takes the requested load size, and bounds checks it against the value returned by {@link #computeInitialLoadPosition(LoadInitialParams, int)}.
Example usage in a PositionalDataSource subclass:
class ItemDataSource extends PositionalDataSource<Item> { private int computeCount() { // actual count code here } private List<Item> loadRangeInternal(int startPosition, int loadCount) { // actual load code here } {@literal @}Override public void loadInitial({@literal @}NonNull LoadInitialParams params, {@literal @}NonNull LoadInitialCallback<Item> callback) { int totalCount = computeCount(); int position = computeInitialLoadPosition(params, totalCount); int loadSize = computeInitialLoadSize(params, position, totalCount); callback.onResult(loadRangeInternal(position, loadSize), position, totalCount); } {@literal @}Override public void loadRange({@literal @}NonNull LoadRangeParams params, {@literal @}NonNull LoadRangeCallback<Item> callback) { callback.onResult(loadRangeInternal(params.startPosition, params.loadSize)); } }
@param params Params passed to {@link #loadInitial(LoadInitialParams, LoadInitialCallback)}, including page size, and requested start/loadSize. @param initialLoadPosition Value returned by {@link #computeInitialLoadPosition(LoadInitialParams, int)} @param totalCount Total size of the data set. @return Number of items to load. @see #computeInitialLoadPosition(LoadInitialParams, int)", "label": 1, "domain": "code", "token_count": 343, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0306", "text": "Apply the filter to values extracted from an entity. Think of self.match_keys and self.match_values as representing a table with one row. For example: match_keys = ('name', 'age', 'rank') match_values = ('Joe', 24, 5) (Except that in reality, the values are represented by tuples produced by datastore_types.PropertyValueToKeyValue().) represents this table: | name | age | rank | +---------+-------+--------+ | 'Joe' | 24 | 5 | Think of key_value_map as a table with the same structure but (potentially) many rows. This represents a repeated structured property of a single entity. For example: {'name': ['Joe', 'Jane', 'Dick'], 'age': [24, 21, 23], 'rank': [5, 1, 2]} represents this table: | name | age | rank | +---------+-------+--------+ | 'Joe' | 24 | 5 | | 'Jane' | 21 | 1 | | 'Dick' | 23 | 2 | We must determine wheter at least one row of the second table exactly matches the first table. We need this class because the datastore, when asked to find an entity with name 'Joe', age 24 and rank 5, will include entities that have 'Joe' somewhere in the name column, 24 somewhere in the age column, and 5 somewhere in the rank column, but not all aligned on a single row. Such an entity should not be considered a match.", "label": 1, "domain": "code", "token_count": 322, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0307", "text": "Gets the Service Fabric service backup configuration information. Gets the Service Fabric backup configuration information for the service and the partitions under this service. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the service name is \"fabric:/myapp/app1/svc1\", the service identity would be \"myapp~app1~svc1\" in 6.0+ and \"myapp/app1/svc1\" in previous versions. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [PagedBackupConfigurationInfoList] operation results.", "label": 1, "domain": "code", "token_count": 402, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0308", "text": "Compares this BigDecimal to another.
Implements numeric comparison, (as defined in the decimal documentation, see {@link BigDecimal class header}), and returns a result of type int.
The result will be:
-1
if the current object is less than the first parameter
0
if the current object is equal to the first parameter
1
if the current object is greater than the first parameter.
A {@link #compareTo(Object)} method is also provided. @param rhs The BigDecimal for the right hand side of the comparison. @param set The MathContext arithmetic settings. @return An int whose value is -1, 0, or 1 as this is numerically less than, equal to, or greater than rhs. @see #compareTo(Object) @stable ICU 2.0 public int compareTo(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){", "label": 1, "domain": "code", "token_count": 300, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0309", "text": "A formatter function to be used in a complex binding inside an XML template view in order to interpret OData V4 annotations. It knows about the following dynamic expressions:
\"14.5.2 Expression edm:AnnotationPath\"
\"14.5.11 Expression edm:NavigationPropertyPath\"
\"14.5.12 Expression edm:Path\"
\"14.5.13 Expression edm:PropertyPath\"
It returns the information whether the navigation path ends with an association end with multiplicity \"*\". It throws an error if the navigation path has an association end with multiplicity \"*\" which is not the last one. Currently supports navigation properties. Term casts and annotations of navigation properties terminate the navigation path. Examples:
@param {sap.ui.core.util.XMLPreprocessor.IContext|sap.ui.model.Context} oInterface the callback interface related to the current formatter call @param {any} [vRawValue] the raw value from the meta model, e.g. {AnnotationPath : \"ToSupplier/@com.sap.vocabularies.Communication.v1.Address\"} or {AnnotationPath : \"@com.sap.vocabularies.UI.v1.FieldGroup#Dimensions\"}; embedded within an entity set or entity type;
if this function is used as formatter the value is provided by the framework
if this function is called directly, provide the parameter only if it is already calculated
if the parameter is omitted, it is calculated automatically through oInterface.getObject(\"\")
@returns {string} \"true\" if the navigation path ends with an association end with multiplicity \"*\", \"\" in case the navigation path cannot be determined, \"false\" otherwise (the latter are both treated as falsy in template:if statements!) @throws {Error} if the navigation path has an association end with multiplicity \"*\" which is not the last one @public", "label": 1, "domain": "code", "token_count": 475, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0310", "text": "Creates a ProgramInfo from 2 sources. A ProgramInfo contains programInfo = { program: WebGLProgram, uniformSetters: object of setters as returned from createUniformSetters, attribSetters: object of setters as returned from createAttribSetters, } NOTE: There are 4 signatures for this function twgl.createProgramInfo(gl, [vs, fs], options); twgl.createProgramInfo(gl, [vs, fs], opt_errFunc); twgl.createProgramInfo(gl, [vs, fs], opt_attribs, opt_errFunc); twgl.createProgramInfo(gl, [vs, fs], opt_attribs, opt_locations, opt_errFunc); @param {WebGLRenderingContext} gl The WebGLRenderingContext to use. @param {string[]} shaderSources Array of sources for the shaders or ids. The first is assumed to be the vertex shader, the second the fragment shader. @param {module:twgl.ProgramOptions|string[]|module:twgl.ErrorCallback} [opt_attribs] Options for the program or an array of attribs names or an error callback. Locations will be assigned by index if not passed in @param {number[]} [opt_locations|module:twgl.ErrorCallback] The locations for the. A parallel array to opt_attribs letting you assign locations or an error callback. @param {module:twgl.ErrorCallback} [opt_errorCallback] callback for errors. By default it just prints an error to the console on error. If you want something else pass an callback. It's passed an error message. @return {module:twgl.ProgramInfo?} The created ProgramInfo or null if it failed to link or compile @memberOf module:twgl/programs", "label": 1, "domain": "code", "token_count": 349, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0311", "text": "Bivariate, Correlated Errors and intrinsic Scatter (BCES) translated from the FORTRAN code by Christina Bird and Matthew Bershady (Akritas & Bershady, 1996) Linear regression in the presence of heteroscedastic errors on both variables and intrinsic scatter Parameters ---------- x1 : array of floats Independent variable, or observable x2 : array of floats Dependent variable x1err : array of floats (optional) Uncertainties on the independent variable x2err : array of floats (optional) Uncertainties on the dependent variable cerr : array of floats (optional) Covariances of the uncertainties in the dependent and independent variables logify : bool (default True) Whether to take the log of the measurements in order to estimate the best-fit power law instead of linear relation model : {'yx', 'xy', 'bi', 'orth'} BCES model with which to calculate regression. See Notes below for details. bootstrap : False or int (default 5000) get the errors from bootstrap resampling instead of the analytical prescription? if bootstrap is an int, it is the number of bootstrap resamplings verbose : str (default 'normal') Verbose level. Options are {'quiet', 'normal', 'debug'} full_output : bool (default True) If True, return also the covariance between the normalization and slope of the regression. Returns ------- a : tuple of length 2 Best-fit normalization and its uncertainty (a, da) b : tuple of length 2 Best-fit slope and its uncertainty (b, db) Optional outputs ---------------- cov_ab : 2x2 array of floats covariance between a and b. Returned if full_output is set to True. Notes ----- If verbose is normal or debug, the results from all the BCES models will be printed (still, only the one selected in *model* will be returned). the *model* parameter: -'yx' stands for BCES(Y|X) -'xy' stands for BCES(X|Y) -'bi' stands for BCES Bisector -'orth' stands for BCES Orthogonal", "label": 1, "domain": "code", "token_count": 428, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0312", "text": "Uploads a file chunk to the image store relative path. Uploads a file chunk to the image store with the specified upload session ID and image store relative path. This API allows user to resume the file upload operation. user doesn't have to restart the file upload from scratch whenever there is a network interruption. Use this option if the file size is large. To perform a resumable file upload, user need to break the file into multiple chunks and upload these chunks to the image store one-by-one. Chunks don't have to be uploaded in order. If the file represented by the image store relative path already exists, it will be overwritten when the upload session commits. @param content_path [String] Relative path to file or folder in the image store from its root. @param session_id A GUID generated by the user for a file uploading. It identifies an image store upload session which keeps track of all file chunks until it is committed. @param content_range [String] When uploading file chunks to the image store, the Content-Range header field need to be configured and sent with a request. The format should looks like \"bytes {First-Byte-Position}-{Last-Byte-Position}/{File-Length}\". For example, Content-Range:bytes 300-5000/20000 indicates that user is sending bytes 300 through 5,000 and the total file length is 20,000 bytes. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 374, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0313", "text": "/* Match str against the query using the QuickOpen algorithm provided by the functions above. The general idea is to prefer matches of \"special\" characters and, optionally, matches that occur in the \"last segment\" (generally, the filename). stringMatch will try to provide the best match and produces a \"matchGoodness\" score to allow for relative ranking. The result object returned includes \"stringRanges\" which can be used to highlight the matched portions of the string, in addition to the \"matchGoodness\" mentioned above. If DEBUG_SCORES is true, scoreDebug is set on the result to provide insight into the score. The matching is done in a case-insensitive manner. @param {string} str The string to search @param {string} query The query string to find in string @param {{preferPrefixMatches:?boolean, segmentedSearch:?boolean}} options to control search behavior. preferPrefixMatches puts an exact case-insensitive prefix match ahead of all other matches, even short-circuiting the match logic. This option implies segmentedSearch=false. When segmentedSearch is true, the string is broken into segments by \"/\" characters and the last segment is searched first and matches there are scored higher. @param {?Object} special (optional) the specials data from findSpecialCharacters, if already known This is generally just used by StringMatcher for optimization. @return {{ranges:Array.<{text:string, matched:boolean, includesLastSegment:boolean}>, matchGoodness:int, scoreDebug: Object}} matched ranges and score", "label": 1, "domain": "code", "token_count": 308, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0314", "text": "Returns a context interface for the indicated part in case of the root formatter of a composite binding. The new interface provides access to the original settings, but only to the model and path of the indicated part:
Note that at least one argument must be present. @param {number} [iPart] index of part in case of the root formatter of a composite binding @param {string} [sPath] a path, interpreted relative to this.getPath(iPart) @returns {sap.ui.core.util.XMLPreprocessor.IContext} the context interface related to the indicated part @throws {Error} In case an index is given but the current interface does not belong to the root formatter of a composite binding, or in case the given index is invalid (e.g. missing or out of range), or in case a path is missing because no index is given, or in case a path is given but the model cannot not create a binding context synchronously @public @since 1.31.0", "label": 1, "domain": "code", "token_count": 375, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0315", "text": "API to list a block in DBS. At least one of the parameters block_name, dataset, data_tier_name or logical_file_name are required. If data_tier_name is provided, min_cdate and max_cdate have to be specified and the difference in time have to be less than 31 days. :param block_name: name of the block :type block_name: str :param dataset: dataset :type dataset: str :param data_tier_name: data tier :type data_tier_name: str :param logical_file_name: Logical File Name :type logical_file_name: str :param origin_site_name: Origin Site Name (Optional) :type origin_site_name: str :param run_num: run numbers (Optional). Possible format: run_num, \"run_min-run_max\", or [\"run_min-run_max\", run1, run2, ...] :type run_num: int, list of runs or list of run ranges :param min_cdate: Lower limit for the creation date (unixtime) (Optional) :type min_cdate: int, str :param max_cdate: Upper limit for the creation date (unixtime) (Optional) :type max_cdate: int, str :param min_ldate: Lower limit for the last modification date (unixtime) (Optional) :type min_ldate: int, str :param max_ldate: Upper limit for the last modification date (unixtime) (Optional) :type max_ldate: int, str :param cdate: creation date (unixtime) (Optional) :type cdate: int, str :param ldate: last modification date (unixtime) (Optional) :type ldate: int, str :param detail: Get detailed information of a block (Optional) :type detail: bool :returns: List of dictionaries containing following keys (block_name). If option detail is used the dictionaries contain the following keys (block_id, create_by, creation_date, open_for_writing, last_modified_by, dataset, block_name, file_count, origin_site_name, last_modification_date, dataset_id and block_size) :rtype: list of dicts", "label": 1, "domain": "code", "token_count": 442, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0316", "text": "druidG.g:145:1: queryStmnt returns [QueryMeta qMeta] : SELECT ( ( WS selectItems[qMeta] ( ( WS )? ',' ( WS )? selectItems[qMeta] )* ) | ( WS '*' ) )? WS FROM ( ( WS id= ID ) | ( WS LPARAN (fromQuery= queryStmnt ) RPARAN ) ) ( WS WHERE WS whereClause[qMeta] ( ( WS BREAK WS BY WS gran= granularityClause )? ( WS GROUP WS BY WS (id= ID ( ( WS )? ',' ( WS )? id= ID )* ) ( WS HAVING WS h= havingClause )? )? ( WS ORDER WS BY WS (id= ID ) ( WS dir= ( ASC | DESC ) )? )? ( WS LIMIT WS (l= LONG ) )? ( WS THEN WS p= postAggItem )? ) ( WS WHICH WS CONTAINS ( WS )? LPARAN ( WS )? (s1= SINGLE_QUOTE_STRING ( ( WS )? ',' ( WS )? s2= SINGLE_QUOTE_STRING )* ) ( WS )? RPARAN WS SORT ( WS )? LPARAN ( WS )? (s= SINGLE_QUOTE_STRING ) ( WS )? RPARAN )? ( WS HINT ( WS )? LPARAN ( WS )? s= SINGLE_QUOTE_STRING ( WS )? RPARAN )? )? ;", "label": 1, "domain": "code", "token_count": 303, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0317", "text": "Converts a Slate Raw text node to an MDAST text node. Slate text nodes without marks often simply have a \"text\" property with the value. In this case the conversion to MDAST is simple. If a Slate text node does not have a \"text\" property, it will instead have a \"leaves\" property containing an array of objects, each with an array of marks, such as \"bold\" or \"italic\", along with a \"text\" property. MDAST instead expresses such marks in a nested structure, with individual nodes for each mark type nested until the deepest mark node, which will contain the text node. To convert a Slate text node's marks to MDAST, we treat each \"leaf\" as a separate text node, convert the text node itself to an MDAST text node, and then recursively wrap the text node for each mark, collecting the results of each leaf in a single array of child nodes. For example, this Slate text node: { object: 'text', leaves: [ { text: 'test', marks: ['bold', 'italic'] }, { text: 'test two' } ] } ...would be converted to this MDAST nested structure: [ { type: 'strong', children: [{ type: 'emphasis', children: [{ type: 'text', value: 'test' }] }] }, { type: 'text', value: 'test two' } ] This example also demonstrates how a single Slate node may need to be replaced with multiple MDAST nodes, so the resulting array must be flattened.", "label": 1, "domain": "code", "token_count": 315, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0318", "text": "Creates and registers a new QuickOpenPlugin @param { name: string, languageIds: !Array., done: ?function(), search: function(string, !StringMatch.StringMatcher):(!Array.|$.Promise), match: function(string):boolean, itemFocus: ?function(?SearchResult|string, string, boolean), itemSelect: function(?SearchResult|string, string), resultsFormatter: ?function(SearchResult|string, string):string, matcherOptions: ?Object, label: ?string } pluginDef Parameter Documentation: name - plug-in name, **must be unique** languageIds - language Ids array. Example: [\"javascript\", \"css\", \"html\"]. To allow any language, pass []. Required. done - called when quick open is complete. Plug-in should clear its internal state. Optional. search - takes a query string and a StringMatcher (the use of which is optional but can speed up your searches) and returns an array of strings or result objects that match the query; or a Promise that resolves to such an array. Required. match - takes a query string and returns true if this plug-in wants to provide results for this query. Required. itemFocus - performs an action when a result has been highlighted (via arrow keys, or by becoming top of the list). Passed the highlighted search result item (as returned by search()), the current query string, and a flag that is true if the item was highlighted explicitly (arrow keys), not implicitly (at top of list after last search()). Optional. itemSelect - performs an action when a result is chosen. Passed the highlighted search result item (as returned by search()), and the current query string. Required. resultsFormatter - takes a query string and an item string and returns a
item to insert into the displayed search results. Optional. matcherOptions - options to pass along to the StringMatcher (see StringMatch.StringMatcher for available options). Optional. label - if provided, the label to show before the query field. Optional. If itemFocus() makes changes to the current document or cursor/scroll position and then the user cancels Quick Open (via Esc), those changes are automatically reverted.", "label": 1, "domain": "code", "token_count": 444, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0319", "text": "Query the departures from a station @param {string} fromStationId Id of the station of departure @param {string} toStationId Id of a station on the route of the train (optional) @param {string} fromTime HH:mm:ss Includes trains leaving how long AFTER the current time? (default: -00:30:00) - If the value is negative, includes trains leaving before the current time @param {string} toTime HH:mm:ss Excludes trains leaving how long AFTER the current time? (default: 03:00:00) @return {array} Array of departure objects containing the following keys: - train {string}: Train id - track {string}: Track nunber at departing station - cancelled {boolean}: Departure cancelled? - delayed {boolean}: Departure delayed? - deviation {string[]}: Deiations, for example: \"Bus Replacement\" - date {string}: Date of departure (DD/MM/YYYY) - time {string}: Time of departure (HH:mm:ss) - estimatedDate {string}: Estimated date of departure (DD/MM/YYYY) - estimatedTime {string}: Estimated time of departure (HH:mm:ss) - plannedEstimatedDate {string}: Planned delayed departure date (DD/MM/YYYY) - plannedEstimatedTime {string}: Planned delayed departure time (HH:mm:ss) - scheduledDepartureDate {string}: The train's announced departure date (DD/MM/YYYY) - scheduledDepartureTime {string}: The train's announced departure time (HH:mm:ss) - destination {string}: Name of the final destination station - via {string[]}: Name of the stations where the train stops", "label": 1, "domain": "code", "token_count": 334, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0320", "text": "Add a job to a queue. ADDJOB queue_name job [REPLICATE ] [DELAY ] [RETRY ] [TTL ] [MAXLEN ] [ASYNC] :param queue_name: is the name of the queue, any string, basically. :param job: is a string representing the job. :param timeout: is the command timeout in milliseconds. :param replicate: count is the number of nodes the job should be replicated to. :param delay: sec is the number of seconds that should elapse before the job is queued by any server. :param retry: sec period after which, if no ACK is received, the job is put again into the queue for delivery. If RETRY is 0, the job has an at-most-once delivery semantics. :param ttl: sec is the max job life in seconds. After this time, the job is deleted even if it was not successfully delivered. :param maxlen: count specifies that if there are already count messages queued for the specified queue name, the message is refused and an error reported to the client. :param asynchronous: asks the server to let the command return ASAP and replicate the job to other nodes in the background. The job gets queued ASAP, while normally the job is put into the queue only when the client gets a positive reply. Changing the name of this argument as async is reserved keyword in python 3.7 :returns: job_id", "label": 1, "domain": "code", "token_count": 304, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0321", "text": "分块上传 初始化分块上传 @param {Object} params 参数对象,必须 @param {String} params.Bucket Bucket名称,必须 @param {String} params.Region 地域名称,必须 @param {String} params.Key object名称,必须 @param {String} params.UploadId object名称,必须 @param {String} params.CacheControl RFC 2616 中定义的缓存策略,将作为 Object 元数据保存,非必须 @param {String} params.ContentDisposition RFC 2616 中定义的文件名称,将作为 Object 元数据保存 ,非必须 @param {String} params.ContentEncoding RFC 2616 中定义的编码格式,将作为 Object 元数据保存,非必须 @param {String} params.ContentType RFC 2616 中定义的内容类型(MIME),将作为 Object 元数据保存,非必须 @param {String} params.Expires RFC 2616 中定义的过期时间,将作为 Object 元数据保存,非必须 @param {String} params.ACL 允许用户自定义文件权限,非必须 @param {String} params.GrantRead 赋予被授权者读的权限 ,非必须 @param {String} params.GrantWrite 赋予被授权者写的权限 ,非必须 @param {String} params.GrantFullControl 赋予被授权者读写权限 ,非必须 @param {String} params.StorageClass 设置Object的存储级别,枚举值:Standard,Standard_IA,Archive,非必须 @param {String} params.ServerSideEncryption 支持按照指定的加密算法进行服务端数据加密,格式 x-cos-server-side-encryption: \"AES256\",非必须 @param {Function} callback 回调函数,必须 @return {Object} err 请求失败的错误,如果请求成功,则为空。https://cloud.tencent.com/document/product/436/7730 @return {Object} data 返回的数据", "label": 1, "domain": "code", "token_count": 405, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0322", "text": "Implementation of the look-aside cache pattern. This caching data access operation first attempts to locate an entry in the {@link Cache} with the given {@link KEY key}, returning the {@link VALUE value} of the entry if present. If an entry with the given {@link KEY key} is not present in the {@link Cache} then the supplied {@link Supplier cacheable operation} is invoked to compute or load a {@link VALUE value} and put into the {@link Cache} as an entry mapped by the given {@link KEY key}; this operation completes by returning the {@link VALUE result} of the {@link Supplier cacheable operation}. @param {@link Class type} of the return {@link VALUE value}. @param key {@link KEY key} used to identify the {@link Cache} entry containing the {@link VALUE} to lookup. @param cacheableOperation {@link Supplier} used to compute or load a {@link VALUE value} for given {@link KEY key} if the cacheable data access operation initially results in a cache miss. @return the cached {@link VALUE value} for the given {@link KEY key} in the {@link Cache} if present, or returns the {@link VALUE value} supplied by invoking the {@link Supplier cacheable operation}. @throws IllegalArgumentException if either the {@link KEY key} or the {@link Supplier} are {@literal null}. @see java.util.function.Supplier @see #getCache() @see #getLock()", "label": 1, "domain": "code", "token_count": 300, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0323", "text": "Gets the list of compose deployments created in the Service Fabric cluster. Gets the status about the compose deployments that were created or in the process of being created in the Service Fabric cluster. The response includes the name, status and other details about the compose deployments. If the list of deployments do not fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 361, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0324", "text": "Applies the support for custom style classes on the prototype of a sap.ui.core.Element. All controls (subclasses of sap.ui.core.Control) provide the support custom style classes. The control API provides functions to the application which allow it to add, remove or change style classes for the control. In general, this option is not available for elements because elements do not necessarily have a representation in the DOM. This function can be used by a control developer to explicitly enrich the API of his/her element implementation with the API functions for the custom style class support. It must be called on the prototype of the element. Usage Example:
Furthermore, the function oRenderManager.writeClasses(oElement); ({@link sap.ui.core.RenderManager#writeClasses}) must be called within the renderer of the control to which the element belongs, when writing the root tag of the element. This ensures the classes are written to the HTML. This function adds the following functions to the elements prototype:
In addition the clone function of the element is extended to ensure that the custom style classes are also available on the cloned element. Note: This function can only be used within control development. An application cannot add style class support on existing elements by calling this function. @public @alias sap.ui.core.CustomStyleClassSupport @function", "label": 1, "domain": "code", "token_count": 468, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0325", "text": "Gets the health of a Service Fabric cluster using health chunks. Gets the health of a Service Fabric cluster using health chunks. The health evaluation is done based on the input cluster health chunk query description. The query description allows users to specify health policies for evaluating the cluster and its children. Users can specify very flexible filters to select which cluster entities to return. The selection can be done based on the entities health state and based on the hierarchy. The query can return multi-level children of the entities based on the specified filters. For example, it can return one application with a specified name, and for this application, return only services that are in Error or Warning, and all partitions and replicas for one of these services. @param cluster_health_chunk_query_description [ClusterHealthChunkQueryDescription] Describes the cluster and application health policies used to evaluate the cluster health and the filters to select which cluster entities to be returned. If the cluster health policy is present, it is used to evaluate the cluster events and the cluster nodes. If not present, the health evaluation uses the cluster health policy defined in the cluster manifest or the default cluster health policy. By default, each application is evaluated using its specific application health policy, defined in the application manifest, or the default health policy, if no policy is defined in manifest. If the application health policy map is specified, and it has an entry for an application, the specified application health policy is used to evaluate the application health. Users can specify very flexible filters to select which cluster entities to include in response. The selection can be done based on the entities health state and based on the hierarchy. The query can return multi-level children of the entities based on the specified filters. For example, it can return one application with a specified name, and for this application, return only services that are in Error or Warning, and all partitions and replicas for one of these services. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 467, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0326", "text": "
Generate log-normally distributed doubles. Use generator to generate num double results into the device memory at outputPtr. The device memory must have been previously allocated and be large enough to hold all the results. Launches are done with the stream set using ::curandSetStream(), or the null stream if no stream has been set. Results are 64-bit floating point values with log-normal distribution based on an associated normal distribution with mean mean and standard deviation stddev. Normally distributed results are generated from pseudorandom generators with a Box-Muller transform, and so require num to be even. Quasirandom generators use an inverse cumulative distribution function to preserve dimensionality. The normally distributed results are transformed into log-normal distribution. There may be slight numerical differences between results generated on the GPU with generators created with ::curandCreateGenerator() and results calculated on the CPU with generators created with ::curandCreateGeneratorHost(). These differences arise because of differences in results for transcendental functions. In addition, future versions of CURAND may use newer versions of the CUDA math library, so different versions of CURAND may give slightly different numerical values. @param generator - Generator to use @param outputPtr - Pointer to device memory to store CUDA-generated results, or Pointer to host memory to store CPU-generated results @param n - Number of doubles to generate @param mean - Mean of normal distribution @param stddev - Standard deviation of normal distribution @return CURAND_STATUS_NOT_INITIALIZED if the generator was never created CURAND_STATUS_PREEXISTING_FAILURE if there was an existing error from a previous kernel launch CURAND_STATUS_LAUNCH_FAILURE if the kernel launch failed for any reason CURAND_STATUS_LENGTH_NOT_MULTIPLE if the number of output samples is not a multiple of the quasirandom dimension, or is not a multiple of two for pseudorandom generators CURAND_STATUS_DOUBLE_PRECISION_REQUIRED if the GPU does not support double precision CURAND_STATUS_SUCCESS if the results were generated successfully
", "label": 1, "domain": "code", "token_count": 400, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0327", "text": "A complete |Selection| object of all \"supplying\" and \"routing\" elements and required nodes. >>> from hydpy import RiverBasinNumbers2Selection >>> rbns2s = RiverBasinNumbers2Selection( ... (111, 113, 1129, 11269, 1125, 11261, ... 11262, 1123, 1124, 1122, 1121)) >>> rbns2s.selection Selection(\"complete\", nodes=(\"node_1123\", \"node_1125\", \"node_11269\", \"node_1129\", \"node_113\", \"node_outlet\"), elements=(\"land_111\", \"land_1121\", \"land_1122\", \"land_1123\", \"land_1124\", \"land_1125\", \"land_11261\", \"land_11262\", \"land_11269\", \"land_1129\", \"land_113\", \"stream_1123\", \"stream_1125\", \"stream_11269\", \"stream_1129\", \"stream_113\")) Besides the possible modifications on the names of the different nodes and elements, the name of the selection can be set differently: >>> rbns2s.selection_name = 'sel' >>> from hydpy import pub >>> with pub.options.ellipsis(1): ... print(repr(rbns2s.selection)) Selection(\"sel\", nodes=(\"node_1123\", ...,\"node_outlet\"), elements=(\"land_111\", ...,\"stream_113\"))", "label": 1, "domain": "code", "token_count": 319, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0328", "text": "set parameters according to specification these parameters are accepted: :param pulp_secret: str, resource name of pulp secret :param koji_target: str, koji tag with packages used to build the image :param kojiroot: str, URL from which koji packages are fetched :param kojihub: str, URL of the koji hub :param koji_certs_secret: str, resource name of secret that holds the koji certificates :param koji_task_id: int, Koji Task that created this build config :param flatpak: if we should build a Flatpak OCI Image :param filesystem_koji_task_id: int, Koji Task that created the base filesystem :param pulp_registry: str, name of pulp registry in dockpulp.conf :param sources_command: str, command used to fetch dist-git sources :param architecture: str, architecture we are building for :param vendor: str, vendor name :param build_host: str, host the build will run on or None for auto :param authoritative_registry: str, the docker registry authoritative for this image :param distribution_scope: str, distribution scope for this image (private, authoritative-source-only, restricted, public) :param use_auth: bool, use auth from atomic-reactor? :param platform_node_selector: dict, a nodeselector for a specific platform :param platform_descriptors: dict, platforms and their archiectures and enable_v1 settings :param scratch_build_node_selector: dict, a nodeselector for scratch builds :param explicit_build_node_selector: dict, a nodeselector for explicit builds :param auto_build_node_selector: dict, a nodeselector for auto builds :param isolated_build_node_selector: dict, a nodeselector for isolated builds :param is_auto: bool, indicates if build is auto build :param parent_images_digests: dict, mapping image names with tags to platform specific digests, example: {'registry.fedorahosted.org/fedora:29': { x86_64': 'registry.fedorahosted.org/fedora@sha256:....'} }", "label": 1, "domain": "code", "token_count": 421, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0329", "text": "FIXME: 'POST a new repository' is a deprecated feature of the API Create a new repository for the authenticated user. = Parameters :name - Required string :description - Optional string :website - Optional string :is_private - Optional boolean - true to create a private repository, false to create a public one. :has_issues - Optional boolean - true to enable issues for this repository, false to disable them :has_wiki - Optional boolean - true to enable the wiki for this repository, false to disable it. Default is true:owner Optional string - The team in which this repository will be created = Examples bitbucket = BitBucket.new bitbucket.repos.create \"name\" => 'repo-name' \"description\": \"This is your first repo\", \"website\": \"https://bitbucket.com\", \"is_private\": false, \"has_issues\": true, \"has_wiki\": true Create a new repository in this team. The authenticated user must be a member of this team Examples: bitbucket = BitBucket.new :oauth_token => '...', :oauth_secret => '...' bitbucket.repos.create :name => 'repo-name', :owner => 'team-name'", "label": 1, "domain": "code", "token_count": 306, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0330", "text": "/*[deutsch]
Interpretiert den angegebenen Text als Intervall mit Hilfe des angegebenen Intervallmusters.
Beginnend mit der Version v4.18 ist es auch möglich, eine Oder-Logik im Muster zu verwenden. Beispiel:
String multiPattern = "{0} - {1}|since {0}|until {1}"; ChronoParser<PlainDate> parser = ChronoFormatter.ofDatePattern("MMMM d / uuuu", PatternType.CLDR, Locale.US); DateInterval between = DateInterval.parse("July 20 / 2015 - December 31 / 2015", parser, multiPattern); System.out.println(between); // [2015-07-20/2015-12-31] DateInterval since = DateInterval.parse("since July 20 / 2015", parser, multiPattern); System.out.println(since); // [2015-07-20/+∞) DateInterval until = DateInterval.parse("until December 31 / 2015", parser, multiPattern); System.out.println(until); // (-∞/2015-12-31]
@param text text to be parsed @param parser format object for parsing start and end components @param intervalPattern interval pattern containing placeholders {0} and {1} (for start and end) @return parsed interval @throws IndexOutOfBoundsException if given text is empty @throws ParseException if the text is not parseable @since 3.9/4.6", "label": 1, "domain": "code", "token_count": 357, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0331", "text": "Lists a collection of the members of the group, specified by its identifier. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param group_id [String] Group identifier. Must be unique in the current API Management service instance. @param filter [String] | Field | Supported operators | Supported functions | |------------------|------------------------|-----------------------------------| | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | | state | eq | N/A | | registrationDate | ge, le, eq, ne, gt, lt | N/A | | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | @param top [Integer] Number of records to return. @param skip [Integer] Number of records to skip. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 312, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0332", "text": "Move a build's artifacts to a new repository optionally moving or copying the build's dependencies to the target repository and setting properties on promoted artifacts. @example promote the build to 'omnibus-stable-local' build.promote('omnibus-stable-local') @example promote a build attaching some new properites build.promote('omnibus-stable-local' properties: { 'promoted_by' => 'hipchat:schisamo@chef.io' } ) @param [String] target_repo repository to move or copy the build's artifacts and/or dependencies @param [Hash] options the list of options to pass @option options [String] :status (default: 'promoted') new build status (any string) @option options [String] :comment (default: '') an optional comment describing the reason for promotion @option options [String] :user (default: +Artifactory.username+) the user that invoked promotion @option options [Boolean] :dry_run (default: +false+) pretend to do the promotion @option options [Boolean] :copy (default: +false+) whether to copy instead of move @option options [Boolean] :dependencies (default: +false+) whether to move/copy the build's dependencies @option options [Array] :scopes (default: []) an array of dependency scopes to include when \"dependencies\" is true @option options [Hash>] :properties (default: []) a list of properties to attach to the build's artifacts @option options [Boolean] :fail_fast (default: +true+) fail and abort the operation upon receiving an error @return [Hash] the parsed JSON response from the server", "label": 1, "domain": "code", "token_count": 343, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0333", "text": "Strongly hint runtimes to intern the provided string. When do I need to use this function? For the most part, never. Pre-mature optimization is bad, and often the runtime does exactly what you need it to, and more often the trade-off isn't worth it. Why? Runtimes store strings in at least 2 different representations: Ropes and Symbols (interned strings). The Rope provides a memory efficient data-structure for strings created from concatenation or some other string manipulation like splitting. Unfortunately checking equality of different ropes can be quite costly as runtimes must resort to clever string comparison algorithims. These algorithims typically cost in proportion to the length of the string. Luckily, this is where the Symbols (interned strings) shine. As Symbols are unique by their string content, equality checks can be done by pointer comparision. How do I know if my string is a rope or symbol? Typically (warning general sweeping statement, but truthy in runtimes at present) static strings created as part of the JS source are interned. Strings often used for comparisions can be interned at runtime if some criteria are met. One of these criteria can be the size of the entire rope. For example, in chrome 38 a rope longer then 12 characters will not intern, nor will segments of that rope. Some numbers: http://jsperf.com/eval-vs-keys/8 Known Trick™ @private @return {String} interned version of the provided string", "label": 1, "domain": "code", "token_count": 304, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0334", "text": "Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. @param filter [String] OData filter. Optional. @param top [Integer] The number of items to return. Optional. @param skip [Integer] The number of items to skip over before returning elements. Optional. @param expand [String] OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. @param select [String] OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. @param orderby [String] OrderBy clause. One or more comma-separated expressions with an optional \"asc\" (the default) or \"desc\" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. @param count [Boolean] The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. @param search [String] A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. @param format [String] The desired return format. Return the response in particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 368, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0335", "text": "Checks if the database operations associated with two object envelopes that are related via an 1:1 (or n:1) reference needs to be performed in a particular order and if so builds and returns a corresponding directed edge weighted with CONCRETE_EDGE_WEIGHT. The following cases are considered (* means object needs update, + means object needs insert, - means object needs to be deleted):
(1)* -(1:1)-> (2)*
no edge
(1)* -(1:1)-> (2)+
(2)->(1) edge
(1)* -(1:1)-> (2)-
no edge (cannot occur)
(1)+ -(1:1)-> (2)*
no edge
(1)+ -(1:1)-> (2)+
(2)->(1) edge
(1)+ -(1:1)-> (2)-
no edge (cannot occur)
(1)- -(1:1)-> (2)*
no edge
(1)- -(1:1)-> (2)+
no edge
(1)- -(1:1)-> (2)-
(1)->(2) edge
@param vertex1 object envelope vertex of the object holding the reference @param vertex2 object envelope vertex of the referenced object @return an Edge object or null if the two database operations can be performed in any order", "label": 1, "domain": "code", "token_count": 424, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0336", "text": "Get Skills. Get Skills from Configuration Server with the specified filters. @param limit The number of objects the Provisioning API should return. (optional) @param offset The number of matches the Provisioning API should skip in the returned objects. (optional) @param searchTerm The term that you want to search for in the object keys. The Provisioning API searches for the this term in the value of the key you specify in 'search_key'. (optional) @param searchKey The key you want the Provisioning API to use when searching for the term you specified in 'search_term'. You can find valid key names in the Platform SDK documentation for [CfgDN](https://docs.genesys.com/Documentation/PSDK/9.0.x/ConfigLayerRef/CfgDN) and [CfgAgentGroup](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgAgentGroup). (optional) @param matchMethod The method the Provisioning API should use to match the 'search_term'. Possible values are includes, startsWith, endsWith, and isEqual. (optional, default to includes) @param sortKey A key in [CfgDN](https://docs.genesys.com/Documentation/PSDK/9.0.x/ConfigLayerRef/CfgDN), [CfgSkill](https://docs.genesys.com/Documentation/PSDK/9.0.x/ConfigLayerRef/CfgSkill) or [CfgAgentGroup](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgAgentGroup) to sort the search results. (optional) @param sortAscending Specifies whether to sort the search results in ascending or descending order. (optional, default to true) @param sortMethod Specifies the sort method. Possible values are caseSensitive, caseInsensitive or numeric. (optional, default to caseSensitive) @param inUse Specifies whether to return only skills actually assigned to agents. (optional, default to false) @return Results object which includes list of Skills and the total count. @throws ProvisioningApiException if the call is unsuccessful.", "label": 1, "domain": "code", "token_count": 444, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0337", "text": "
Perform an HTML 4 level 2 (result is ASCII) escape operation on a char[] input.
Level 2 means this method will escape:
The five markup-significant characters: <, >, &, " and '
All non ASCII characters.
This escape will be performed by replacing those chars by the corresponding HTML 4 Named Character References (e.g. '´') when such NCR exists for the replaced character, and replacing by a decimal character reference (e.g. 'ₙ') when there there is no NCR for the replaced character.
This method calls {@link #escapeHtml(char[], int, int, java.io.Writer, HtmlEscapeType, HtmlEscapeLevel)} with the following preconfigured values:
@param text the char[] to be escaped. @param offset the position in text at which the escape operation should start. @param len the number of characters in text that should be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs", "label": 1, "domain": "code", "token_count": 443, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0338", "text": ">>> idbf = InfluxDBForwarder('no_host', '8086', 'deadpool', ... 'chimichanga', 'logs', 'collection') >>> log = {u'data': {u'_': {u'file': u'log.py', ... u'fn': u'start', ... u'ln': 8, ... u'name': u'__main__'}, ... u'a': 1, ... u'b': 2, ... u'__ignore_this': 'some_string', ... u'msg': u'this is a dummy log'}, ... u'error': False, ... u'error_tb': u'', ... u'event': u'some_log', ... u'file': u'/var/log/sample.log', ... u'formatter': u'logagg.formatters.basescript', ... u'host': u'deepcompute', ... u'id': u'20180409T095924_aec36d313bdc11e89da654e1ad04f45e', ... u'level': u'info', ... u'raw': u'{...}', ... u'timestamp': u'2018-04-09T09:59:24.733945Z', ... u'type': u'metric'} >>> tags, fields = idbf._tag_and_field_maker(log) >>> from pprint import pprint >>> pprint(tags) {u'data.msg': u'this is a dummy log', u'error_tb': u'', u'file': u'/var/log/sample.log', u'formatter': u'logagg.formatters.basescript', u'host': u'deepcompute', u'level': u'info'} >>> pprint(fields) {u'data._': \"{u'ln': 8, u'fn': u'start', u'file': u'log.py', u'name': u'__main__'}\", u'data.a': 1, u'data.b': 2}", "label": 1, "domain": "code", "token_count": 417, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0339", "text": "Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
In the foregoing description, the notation sgn(expression) designates the mathematical signum function, which is defined to return one of -1, 0, or 1 according to whether the value of expression is negative, zero or positive.
The implementor must ensure that sgn(compare(x, y)) == -sgn(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)
The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.
Finally, the implementor must ensure that compare(x, y)== 0 implies that sgn(compare(x, z))== sgn(compare(y, z)) for all z.
It is generally the case, but not strictly required that (compare(x, y)== 0) == (x.equals(y)). Generally speaking, any comparator that violates this condition should clearly indicate this fact. The recommended language is \"Note: this comparator imposes orderings that are inconsistent with equals.\" @param arg0 the first object to be compared. @param arg1 the second object to be compared. @return a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. @throws ClassCastException if the arguments' types prevent them from being compared by this comparator.", "label": 1, "domain": "code", "token_count": 466, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0340", "text": "Replies if the specified box intersects the specified sphere. @param sphereCenterx x coordinate of the sphere center. @param sphereCentery y coordinate of the sphere center. @param sphereCenterz z coordinate of the sphere center. @param sphereRadius is the radius of the sphere. @param boxCenterx x coordinate of the center point of the oriented box. @param boxCentery y coordinate of the center point of the oriented box. @param boxCenterz z coordinate of the center point of the oriented box. @param boxAxis1x x coordinate of the first axis of the oriented box axis. @param boxAxis1y y coordinate of the first axis of the oriented box axis. @param boxAxis1z z coordinate of the first axis of the oriented box axis. @param boxAxis2x x coordinate of the second axis of the oriented box axis. @param boxAxis2y y coordinate of the second axis of the oriented box axis. @param boxAxis2z z coordinate of the second axis of the oriented box axis. @param boxAxis3x x coordinate of the third axis of the oriented box axis. @param boxAxis3y y coordinate of the third axis of the oriented box axis. @param boxAxis3z z coordinate of the third axis of the oriented box axis. @param boxExtentAxis1 extent of the first axis of the oriented box. @param boxExtentAxis2 extent of the second axis of the oriented box. @param boxExtentAxis3 extent of the third axis of the oriented box. @return true if intersecting, otherwise false", "label": 1, "domain": "code", "token_count": 335, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0341", "text": "Creates sphere buffers. The created sphere has position, normal, and texcoord data @param {WebGLRenderingContext} gl The WebGLRenderingContext. @param {number} radius radius of the sphere. @param {number} subdivisionsAxis number of steps around the sphere. @param {number} subdivisionsHeight number of vertically on the sphere. @param {number} [opt_startLatitudeInRadians] where to start the top of the sphere. Default = 0. @param {number} [opt_endLatitudeInRadians] Where to end the bottom of the sphere. Default = Math.PI. @param {number} [opt_startLongitudeInRadians] where to start wrapping the sphere. Default = 0. @param {number} [opt_endLongitudeInRadians] where to end wrapping the sphere. Default = 2 * Math.PI. @return {Object.} The created sphere buffers. @memberOf module:twgl/primitives @function createSphereBuffers Creates sphere vertices. The created sphere has position, normal, and texcoord data @param {number} radius radius of the sphere. @param {number} subdivisionsAxis number of steps around the sphere. @param {number} subdivisionsHeight number of vertically on the sphere. @param {number} [opt_startLatitudeInRadians] where to start the top of the sphere. Default = 0. @param {number} [opt_endLatitudeInRadians] Where to end the bottom of the sphere. Default = Math.PI. @param {number} [opt_startLongitudeInRadians] where to start wrapping the sphere. Default = 0. @param {number} [opt_endLongitudeInRadians] where to end wrapping the sphere. Default = 2 * Math.PI. @return {Object.} The created sphere vertices. @memberOf module:twgl/primitives", "label": 1, "domain": "code", "token_count": 379, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0342", "text": "@example Request syntax with placeholder values group = iam.create_group({ path: \"pathType\", group_name: \"groupNameType\", # required }) @param [Hash] options ({}) @option options [String] :path The path to the group. For more information about paths, see [IAM Identifiers][1] in the *IAM User Guide*. This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its [regex pattern][2]) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\\\\u0021) through the DEL character (\\\\u007F), including most punctuation characters, digits, and upper and lowercased letters. [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html [2]: http://wikipedia.org/wiki/regex @option options [required, String] :group_name The name of the group to create. Do not include the path in this value. This parameter allows (through its [regex pattern][1]) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: \\_+=,.@-. The group name must be unique within the account. Group names are not distinguished by case. For example, you cannot create groups named both \"ADMINS\" and \"admins\". [1]: http://wikipedia.org/wiki/regex @return [Group]", "label": 1, "domain": "code", "token_count": 322, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0343", "text": "Create a JSON in resources directory with given name, so for using it you've to reference it as: $(pwd)/target/test-classes/fileName @param fileName name of the JSON file to be created @param baseData path to file containing the schema to be used @param type element to read from file (element should contain a json) @param modifications DataTable containing the modifications to be done to the base schema element
- Syntax will be: {@code | | | | } for DELETE/ADD/UPDATE/APPEND/PREPEND where: key path: path to the key to be modified type of modification: DELETE/ADD/UPDATE/APPEND/PREPEND new value: new value to be used
- Or: {@code | | | | | } for REPLACE where: key path: path to the key to be modified type of modification: REPLACE new value: new value to be used json value type: type of the json property (array|object|number|boolean|null|n/a (for string))
For example:
(1) If the element read is {\"key1\": \"value1\", \"key2\": {\"key3\": \"value3\"}} and we want to modify the value in \"key3\" with \"new value3\" the modification will be: | key2.key3 | UPDATE | \"new value3\" | being the result of the modification: {\"key1\": \"value1\", \"key2\": {\"key3\": \"new value3\"}}
(2) If the element read is {\"key1\": \"value1\", \"key2\": {\"key3\": \"value3\"}} and we want to replace the value in \"key2\" with {\"key4\": \"value4\"} the modification will be: | key2 | REPLACE | {\"key4\": \"value4\"} | object | being the result of the modification: {\"key1\": \"value1\", \"key2\": {\"key4\": \"value4\"}} @throws Exception", "label": 1, "domain": "code", "token_count": 452, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0344", "text": "Query a route. route(locations): points can be - a sequence of locations - a Shapely LineString route(origin, destination, waypoints=None) - origin and destination are a single destination - waypoints are the points to be inserted between the origin and destination If waypoints is specified, destination must also be specified Each location can be: - string (will be geocoded by the routing provider. Not all providers accept this as input) - (longitude, latitude) sequence (tuple, list, numpy array, etc.) - Shapely Point with x as longitude, y as latitude Additional parameters --------------------- raw : bool, default False Return the raw json dict response from the service Returns ------- list of Route objects If raw is True, returns the json dict instead of converting to Route objects Examples -------- mq = directions.Mapquest(key) routes = mq.route('1 magazine st. cambridge, ma', 'south station boston, ma') routes = mq.route('1 magazine st. cambridge, ma', 'south station boston, ma', waypoints=['700 commonwealth ave. boston, ma']) # Uses each point in the line as a waypoint. There is a limit to the # number of waypoints for each service. Consult the docs. line = LineString(...) routes = mq.route(line) # Feel free to mix different location types routes = mq.route(line.coords[0], 'south station boston, ma', waypoints=[(-71.103972, 42.349324)])", "label": 1, "domain": "code", "token_count": 301, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0345", "text": "/*[deutsch]
Legt einen Lieferanten für einen Standard-Ersatzwert des angegebenen Elements fest, wenn die Interpretation sonst nicht funktioniert.
Beispiel:
ChronoFormatter<PlainTimestamp> fmt = ChronoFormatter.ofTimestampPattern("HH:mm", PatternType.CLDR, Locale.ROOT) .withDefaultSupplier(PlainDate.COMPONENT, () -> SystemClock.inLocalView().today()); PlainTimestamp tsp = fmt.parse(\"14:45\"); System.out.println(tsp); // 2012-05-21T14:45 (example for parsed time on today)
Standard-Ersatzwerte werden von Time4J herangezogen, wenn entweder der Formatierer das fragliche Element nicht enthält oder wenn es keine konsumierbaren Zeichen für das angegebene Element gibt. Die letzte Situation erfordert manchmal die Verwendung des sektionalen Attributs {@code PROTECTED_CHARACTERS}, um eine Situation zu simulieren, in der der Formatierer quasi am Ende eines Texts angekommen ist.
@param generic element value type @param element chronological element to be updated @param supplier supplier for replacement value or {@code null} if the default value shall be deregistered @return changed copy with new replacement value @throws IllegalArgumentException if given element is not supported by the underlying chronology @see Attributes#PROTECTED_CHARACTERS @since 4.14", "label": 1, "domain": "code", "token_count": 338, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0346", "text": "If FormModel has a \"url\" property defined, it will invoke a save on the form model, and after successfully saving, will perform a push. If no \"url\" property is defined then the following behavior is used: Pushes the form model values to the object models it is tracking and invokes save on each one. Returns a promise. NOTE: if no url is specified and no models are being tracked, it will instead trigger a 'save-fail' event and reject the returned promise with a payload that mimics a server response: {none: { success: false, response: [{ responseJSON: { generalReasons: [{messageKey: 'no.models.were.bound.to.form'}] }}] }} @param [options] {Object} @param [options.rollback=true] {Boolean} if true, when any object model fails to save, it will revert the object model attributes to the state they were before calling save. NOTE: if there are updates that happen to object models within the timing of this save method, the updates could be lost. @param [options.force=true] {Boolean} if false, the form model will check to see if an update has been made to any object models it is tracking since it's last pull. If any stale data is found, save with throw an exception with attributes: {name: 'Stale data', staleModels: [Array of model cid's]} @return when using a \"url\", a promise is returned for the save on this form model. If not using a \"url\", a promise that will either resolve when all the models have successfully saved in which case the context returned is an array of the responses (order determined by first the array of models and then the array of models used by the computed values, normalized), or if any of the saves fail, the promise will be rejected with an array of responses. Note: the size of the failure array will always be one - the first model that failed. This is a side-effect of $.when @method save", "label": 1, "domain": "code", "token_count": 413, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0347", "text": "The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.
. @param url_content_type [String] The content type. @param team_name [String] Your team name. @param create_review_body [Array] Body for create reviews API @param sub_team [String] SubTeam of your team, you want to assign the created review to. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 340, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0348", "text": "Adds +message+ to the error messages and used validator type to +details+ on +attribute+. More than one error can be added to the same +attribute+. If no +message+ is supplied, :invalid is assumed. person.errors.add(:name) # => [\"is invalid\"] person.errors.add(:name, :not_implemented, message: \"must be implemented\") # => [\"is invalid\", \"must be implemented\"] person.errors.messages # => {:name=>[\"is invalid\", \"must be implemented\"]} person.errors.details # => {:name=>[{error: :not_implemented}, {error: :invalid}]} If +message+ is a symbol, it will be translated using the appropriate scope (see +generate_message+). If +message+ is a proc, it will be called, allowing for things like Time.now to be used within an error. If the :strict option is set to +true+, it will raise ActiveModel::StrictValidationFailed instead of adding the error. :strict option can also be set to any other exception. person.errors.add(:name, :invalid, strict: true) # => ActiveModel::StrictValidationFailed: Name is invalid person.errors.add(:name, :invalid, strict: NameIsInvalid) # => NameIsInvalid: Name is invalid person.errors.messages # => {} +attribute+ should be set to :base if the error is not directly associated with a single attribute. person.errors.add(:base, :name_or_email_blank, message: \"either name or email must be present\") person.errors.messages # => {:base=>[\"either name or email must be present\"]} person.errors.details # => {:base=>[{error: :name_or_email_blank}]}", "label": 1, "domain": "code", "token_count": 374, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0349", "text": "Returns a cached view or component, for a given name. If it does not exist yet, it will create the view or component with the provided options. If you provide a \"id\" in the \"oOptions\", it will be prefixed with the id of the component. @param {object} oOptions see {@link sap.ui.core.mvc.View.create} or {@link sap.ui.core.Component.create} for the documentation. @param {string} oOptions.name If you do not use setView please see {@link sap.ui.core.mvc.View.create} or {@link sap.ui.core.Component.create} for the documentation. This is used as a key in the cache of the view or component instance. If you want to retrieve a view or a component that has been given an alternative name in {@link #set}, you need to provide the same name here and you can skip all the other options. @param {string} [oOptions.id] The id you pass into the options will be prefixed with the id of the component you pass into the constructor. So you can retrieve the view later by calling the {@link sap.ui.core.UIComponent#byId} function of the UIComponent. @param {string} sType whether the object is a \"View\" or \"Component\". Views and components are stored separately in the cache. This means that a view and a component instance could be stored under the same name. @return {Promise} A promise that is resolved when the view or component is loaded. The view or component instance will be passed to the resolve function. @private", "label": 1, "domain": "code", "token_count": 318, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0350", "text": "Forms closed loop integration along mag field, satrting at input points and goes through footpoint. At footpoint, steps along vector direction in both positive and negative directions, then traces back to opposite footpoint. Back at input location, steps toward those new field lines (edge_length) along vector direction until hitting distance of minimum approach. Loops don't always close. Returns total edge distance that goes through input location, along with the distances of closest approach. Note ---- vector direction refers to the magnetic unit vector direction Parameters ---------- glats : list-like of floats (degrees) Geodetic (WGS84) latitude glons : list-like of floats (degrees) Geodetic (WGS84) longitude alts : list-like of floats (km) Geodetic (WGS84) altitude, height above surface dates : list-like of datetimes Date and time for determination of scalars direction : string 'north' or 'south' for tracing through northern or southern footpoint locations vector_direction : string 'meridional' or 'zonal' unit vector directions step_size : float (km) Step size (km) used for field line integration max_steps : int Number of steps taken for field line integration edge_length : float (km) Half of total edge length (step) taken at footpoint location. edge_length step in both positive and negative directions. edge_steps : int Number of steps taken from footpoint towards new field line in a given direction (positive/negative) along unit vector Returns ------- np.array, np.array, np.array A closed loop field line path through input location and footpoint in northern/southern hemisphere and back is taken. The return edge length through input location is provided. The distances of closest approach for the positive step along vector direction, and the negative step are returned.", "label": 1, "domain": "code", "token_count": 368, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0351", "text": "Configure Redwood (from scratch) based on a Properties file. Currently recognized properties are:
log.toStderr = {true,false}: Print to stderr rather than stdout
log.file = [filename]: Dump the output of the log to the given filename
log.collapse = {exact,approximate,none}: Collapse repeated records (based on either exact or approximate equality)
log.neatExit = {true,false}: Clean up logs on exception or regular system exit
log.{console,file}.colorChannels = {true,false}: If true, randomly assign colors to different channels
log.{console,file}.{track,[channel]}]Color = {NONE,BLACK,RED,GREEN,YELLOW,BLUE,MAGENTA,CYAN,WHITE}: Color for printing tracks (e.g. log.file.trackColor = BLUE)
log.captureStreams = {true,false}: Capture stdout and stderr and route them through Redwood
log.captureStdout = {true,false}: Capture stdout and route it through Redwood
log.captureStderr = {true,false}: Capture stdout and route it through Redwood
log.hideChannels = [channels]: Hide these channels (comma-separated list)
log.showOnlyChannels = [channels]: Show only these channels (comma-separated list)
@param props The properties to use in configuration @return A new Redwood Configuration based on the passed properties, ignoring any existing custom configuration", "label": 1, "domain": "code", "token_count": 384, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0352", "text": "Renders the template and returns an HttpRequest object containing its content. This method returns a django.http.Http404 exception if the template is not found. If the template raises a django_mako_plus.RedirectException, the browser is redirected to the given page, and a new request from the browser restarts the entire DMP routing process. If the template raises a django_mako_plus.InternalRedirectException, the entire DMP routing process is restarted internally (the browser doesn't see the redirect). @request The request context from Django. If this is None, any TEMPLATE_CONTEXT_PROCESSORS defined in your settings file will be ignored but the template will otherwise render fine. @template The template file path to render. This is relative to the app_path/controller_TEMPLATES_DIR/ directory. For example, to render app_path/templates/page1, set template=\"page1.html\", assuming you have set up the variables as described in the documentation above. @context A dictionary of name=value variables to send to the template page. This can be a real dictionary or a Django Context object. @def_name Limits output to a specific top-level Mako <%block> or <%def> section within the template. For example, def_name=\"foo\" will call <%block name=\"foo\">%block> or <%def name=\"foo()\"> within the template. @content_type The MIME type of the response. Defaults to settings.DEFAULT_CONTENT_TYPE (usually 'text/html'). @status The HTTP response status code. Defaults to 200 (OK). @charset The charset to encode the processed template string (the output) with. Defaults to settings.DEFAULT_CHARSET (usually 'utf-8'). The method triggers two signals: 1. dmp_signal_pre_render_template: you can (optionally) return a new Mako Template object from a receiver to replace the normal template object that is used for the render operation. 2. dmp_signal_post_render_template: you can (optionally) return a string to replace the string from the normal template object render.", "label": 1, "domain": "code", "token_count": 412, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0353", "text": "Lists the usage details by enrollmentAccountId for a scope by current billing period. Usage details are available via this API only for May 1, 2014 or later. @param enrollment_account_id [String] EnrollmentAccount ID @param expand [String] May be used to expand the properties/additionalProperties or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. @param filter [String] May be used to filter usageDetails by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName, properties/instanceId or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). @param skiptoken [String] Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. @param top [Integer] May be used to limit the number of results to the most recent N usageDetails. @param query_options [QueryOptions] Additional parameters for the operation @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.", "label": 1, "domain": "code", "token_count": 318, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0354", "text": "Gets the information about all services belonging to the application specified by the application id. Returns the information about all services belonging to the application specified by the application id. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the application name is \"fabric:/myapp/app1\", the application identity would be \"myapp~app1\" in 6.0+ and \"myapp/app1\" in previous versions. @param service_type_name [String] The service type name used to filter the services to query for. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 329, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0355", "text": "Detect spillover locations for diffusion in LISA Markov. Parameters ---------- quadrant : int which quadrant in the scatterplot should form the core of a cluster. neighbors_on : binary If false, then only the 1st order neighbors of a core location are included in the cluster. If true, neighbors of cluster core 1st order neighbors are included in the cluster. Returns ------- results : dictionary two keys - values pairs: 'components' - array (n, t) values are integer ids (starting at 1) indicating which component/cluster observation i in period t belonged to. 'spillover' - array (n, t-1) binary values indicating if the location was a spill-over location that became a new member of a previously existing cluster. Examples -------- >>> import libpysal >>> from giddy.markov import LISA_Markov >>> f = libpysal.io.open(libpysal.examples.get_path(\"usjoin.csv\")) >>> years = list(range(1929, 2010)) >>> pci = np.array([f.by_col[str(y)] for y in years]).transpose() >>> w = libpysal.io.open(libpysal.examples.get_path(\"states48.gal\")).read() >>> np.random.seed(10) >>> lm_random = LISA_Markov(pci, w, permutations=99) >>> r = lm_random.spillover() >>> (r['components'][:, 12] > 0).sum() 17 >>> (r['components'][:, 13]>0).sum() 23 >>> (r['spill_over'][:,12]>0).sum() 6 Including neighbors of core neighbors >>> rn = lm_random.spillover(neighbors_on=True) >>> (rn['components'][:, 12] > 0).sum() 26 >>> (rn[\"components\"][:, 13] > 0).sum() 34 >>> (rn[\"spill_over\"][:, 12] > 0).sum() 8", "label": 1, "domain": "code", "token_count": 411, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0356", "text": "Sets attributes and binds buffers (deprecated... use {@link module:webgl-utils.setBuffersAndAttributes}) Example: var program = createProgramFromScripts( gl, [\"some-vs\", \"some-fs\"); var attribSetters = createAttributeSetters(program); var positionBuffer = gl.createBuffer(); var texcoordBuffer = gl.createBuffer(); var attribs = { a_position: {buffer: positionBuffer, numComponents: 3}, a_texcoord: {buffer: texcoordBuffer, numComponents: 2}, }; gl.useProgram(program); This will automatically bind the buffers AND set the attributes. setAttributes(attribSetters, attribs); Properties of attribs. For each attrib you can add properties: * type: the type of data in the buffer. Default = gl.FLOAT * normalize: whether or not to normalize the data. Default = false * stride: the stride. Default = 0 * offset: offset into the buffer. Default = 0 For example if you had 3 value float positions, 2 value float texcoord and 4 value uint8 colors you'd setup your attribs like this var attribs = { a_position: {buffer: positionBuffer, numComponents: 3}, a_texcoord: {buffer: texcoordBuffer, numComponents: 2}, a_color: { buffer: colorBuffer, numComponents: 4, type: gl.UNSIGNED_BYTE, normalize: true, }, }; @param {Object.|model:webgl-utils.ProgramInfo} setters Attribute setters as returned from createAttributeSetters or a ProgramInfo as returned {@link module:webgl-utils.createProgramInfo} @param {Object.} attribs AttribInfos mapped by attribute name. @memberOf module:webgl-utils @deprecated use {@link module:webgl-utils.setBuffersAndAttributes}", "label": 1, "domain": "code", "token_count": 388, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0357", "text": "Lists report records by API Operations. @param resource_group_name [String] The name of the resource group. @param service_name [String] The name of the API Management service. @param filter [String] | Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| timestamp | filter | ge, le | | | displayName | select, orderBy | | | | apiRegion | filter | eq | | | userId | filter | eq | | | productId | filter | eq | | | subscriptionId | filter | eq | | | apiId | filter | eq | | | operationId | select, filter | eq | | | callCountSuccess | select, orderBy | | | | callCountBlocked | select, orderBy | | | | callCountFailed | select, orderBy | | | | callCountOther | select, orderBy | | | | callCountTotal | select, orderBy | | | | bandwidth | select, orderBy | | | | cacheHitsCount | select | | | | cacheMissCount | select | | | | apiTimeAvg | select, orderBy | | | | apiTimeMin | select | | | | apiTimeMax | select | | | | serviceTimeAvg | select | | | | serviceTimeMin | select | | | | serviceTimeMax | select | | | @param top [Integer] Number of records to return. @param skip [Integer] Number of records to skip. @param orderby [String] OData order by query option. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 400, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0358", "text": "
Perform an XML 1.0 level 1 (only markup-significant chars) escape operation on a String input meant to be an XML attribute value.
Level 1 means this method will only escape the five markup-significant characters which are predefined as Character Entity References in XML: <, >, &, " and '.
Besides, being an attribute value also \t, \n and \r will be escaped to avoid white-space normalization from removing line feeds (turning them into white spaces) during future parsing operations.
This method calls {@link #escapeXml10(String, XmlEscapeType, XmlEscapeLevel)} with the following preconfigured values:
@param text the String to be escaped. @return The escaped result String. As a memory-performance improvement, will return the exact same object as the text input argument if no escaping modifications were required (and no additional String objects will be created during processing). Will return null if input is null. @since 1.1.5", "label": 1, "domain": "code", "token_count": 413, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0359", "text": "
Perform an HTML5 level 1 (XML-style) escape operation on a Reader input, writing results to a Writer.
Level 1 means this method will only escape the five markup-significant characters: <, >, &, " and '. It is called XML-style in order to link it with JSP's escapeXml attribute in JSTL's <c:out ... /> tags.
Note this method may not produce the same results as {@link #escapeHtml4Xml(Reader, Writer)} because it will escape the apostrophe as ', whereas in HTML 4 such NCR does not exist (the decimal numeric reference ' is used instead).
This method calls {@link #escapeHtml(Reader, Writer, HtmlEscapeType, HtmlEscapeLevel)} with the following preconfigured values:
@param reader the Reader reading the text to be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs @since 1.1.2", "label": 1, "domain": "code", "token_count": 439, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0360", "text": "A |Elements| collection of all \"supplying\" basins. (All river basins are assumed to supply something to the downstream basin.) >>> from hydpy import RiverBasinNumbers2Selection >>> rbns2s = RiverBasinNumbers2Selection( ... (111, 113, 1129, 11269, 1125, 11261, ... 11262, 1123, 1124, 1122, 1121)) The following elements are properly connected to the required outlet nodes already: >>> for element in rbns2s.supplier_elements: ... print(repr(element)) Element(\"land_111\", outlets=\"node_113\") Element(\"land_1121\", outlets=\"node_1123\") Element(\"land_1122\", outlets=\"node_1123\") Element(\"land_1123\", outlets=\"node_1125\") Element(\"land_1124\", outlets=\"node_1125\") Element(\"land_1125\", outlets=\"node_1129\") Element(\"land_11261\", outlets=\"node_11269\") Element(\"land_11262\", outlets=\"node_11269\") Element(\"land_11269\", outlets=\"node_1129\") Element(\"land_1129\", outlets=\"node_113\") Element(\"land_113\", outlets=\"node_outlet\") It is both possible to change the prefix names of the elements and nodes, as long as it results in a valid variable name (e.g. does not start with a number): >>> rbns2s.supplier_prefix = 'a_' >>> rbns2s.node_prefix = 'b_' >>> rbns2s.supplier_elements Elements(\"a_111\", \"a_1121\", \"a_1122\", \"a_1123\", \"a_1124\", \"a_1125\", \"a_11261\", \"a_11262\", \"a_11269\", \"a_1129\", \"a_113\")", "label": 1, "domain": "code", "token_count": 410, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0361", "text": "Replaces special characters in a string so that it may be used as part of a 'pretty' URL. parameterize(\"Donald E. Knuth\") # => \"donald-e-knuth\" parameterize(\"^très|Jolie-- \") # => \"tres-jolie\" To use a custom separator, override the +separator+ argument. parameterize(\"Donald E. Knuth\", separator: '_') # => \"donald_e_knuth\" parameterize(\"^très|Jolie__ \", separator: '_') # => \"tres_jolie\" To preserve the case of the characters in a string, use the +preserve_case+ argument. parameterize(\"Donald E. Knuth\", preserve_case: true) # => \"Donald-E-Knuth\" parameterize(\"^très|Jolie-- \", preserve_case: true) # => \"tres-Jolie\" It preserves dashes and underscores unless they are used as separators: parameterize(\"^très|Jolie__ \") # => \"tres-jolie__\" parameterize(\"^très|Jolie-- \", separator: \"_\") # => \"tres_jolie--\" parameterize(\"^très_Jolie-- \", separator: \".\") # => \"tres_jolie--\" If the optional parameter +locale+ is specified, the word will be parameterized as a word of that language. By default, this parameter is set to nil and it will use the configured I18n.locale.", "label": 1, "domain": "code", "token_count": 305, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0362", "text": "/* tslint:enable:max-line-length Creates an output Observable which sequentially emits all values from every given input Observable after the current Observable. Concatenates multiple Observables together by sequentially emitting their values, one Observable after the other. Joins this Observable with multiple other Observables by subscribing to them one at a time, starting with the source, and merging their results into the output Observable. Will wait for each Observable to complete before moving on to the next. @example
Concatenate a timer counting from 0 to 3 with a synchronous sequence from 1 to 10
var timer = Rx.Observable.interval(1000).take(4); var sequence = Rx.Observable.range(1, 10); var result = timer.concat(sequence); result.subscribe(x => console.log(x)); // results in: // 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 -immediate-> 1 ... 10 @example
Concatenate 3 Observables
var timer1 = Rx.Observable.interval(1000).take(10); var timer2 = Rx.Observable.interval(2000).take(6); var timer3 = Rx.Observable.interval(500).take(10); var result = timer1.concat(timer2, timer3); result.subscribe(x => console.log(x)); // results in the following: // (Prints to console sequentially) // -1000ms-> 0 -1000ms-> 1 -1000ms-> ... 9 // -2000ms-> 0 -2000ms-> 1 -2000ms-> ... 5 // -500ms-> 0 -500ms-> 1 -500ms-> ... 9 @see {@link concatAll} @see {@link concatMap} @see {@link concatMapTo} @param {ObservableInput} other An input Observable to concatenate after the source Observable. More than one input Observables may be given as argument. @param {Scheduler} [scheduler=null] An optional IScheduler to schedule each Observable subscription on. @return {Observable} All values of each passed Observable merged into a single Observable, in order, in serial fashion. @method concat @owner Observable", "label": 1, "domain": "code", "token_count": 484, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0363", "text": "Method for initialization @param {Object} options the configuration options for the instance @param {Object} options.target - the target iframe or iframe configuration @param {String} [options.target.url] - the url to load @param {Object} [options.target.container] - the container in which the iframe should be created (if not supplied, document.body will be used) @param {String} [options.target.style] - the CSS style to apply @param {String} [options.target.style.width] width of iframe @param {String} [options.target.style.height] height of iframe ..... @param {Boolean} [options.target.bust = true] - optional flag to indicate usage of cache buster when loading the iframe (default to true) @param {Function} [options.target.callback] - a callback to invoke after the iframe had been loaded, @param {Object} [options.target.context] - optional context for the callback @param {Function|Object} [options.onready] - optional data for usage when iframe had been loaded { @param {Function} [options.onready.callback] - a callback to invoke after the iframe had been loaded @param {Object} [options.onready.context] - optional context for the callback @param {Boolean} [options.removeDispose] - optional flag for removal of the iframe on dispose @param {Function} [options.serialize = JSON.stringify] - optional serialization method for post message @param {Function} [options.deserialize = JSON.parse] - optional deserialization method for post message @param {String} [options.targetOrigin] optional targetOrigin to be used when posting the message (must be supplied in case of external iframe) @param {Number} [options.maxConcurrency = 100] - optional maximum concurrency that can be managed by the component before dropping @param {Number} [options.handshakeInterval = 5000] - optional handshake interval for retries @param {Number} [options.handshakeAttempts = 3] - optional number of retries handshake attempts @param {String} [options.hostParam] - optional parameter of the host parameter name (default is lpHost) @param {Function} onmessage - the handler for incoming messages", "label": 1, "domain": "code", "token_count": 446, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0364", "text": "
Perform an XML 1.0 level 2 (markup-significant and all non-ASCII chars) escape operation on a char[] input.
Level 2 means this method will escape:
The five markup-significant characters: <, >, &, " and '
All non ASCII characters.
This escape will be performed by replacing those chars by the corresponding XML Character Entity References (e.g. '<') when such CER exists for the replaced character, and replacing by a hexadecimal character reference (e.g. '␰') when there there is no CER for the replaced character.
This method calls {@link #escapeXml10(char[], int, int, java.io.Writer, XmlEscapeType, XmlEscapeLevel)} with the following preconfigured values:
@param text the char[] to be escaped. @param offset the position in text at which the escape operation should start. @param len the number of characters in text that should be escaped. @param writer the java.io.Writer to which the escaped result will be written. Nothing will be written at all to this writer if input is null. @throws IOException if an input/output exception occurs", "label": 1, "domain": "code", "token_count": 450, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0365", "text": "Gets the list of backup entities that are associated with this policy. Returns a list of Service Fabric application, service or partition which are associated with this backup policy. @param backup_policy_name [String] The name of the backup policy. @param continuation_token [String] The continuation token parameter is used to obtain next set of results. A continuation token with a non empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results then the continuation token does not contain a value. The value of this parameter should not be URL encoded. @param max_results [Integer] The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. If this parameter is zero or not specified, the paged queries includes as many results as possible that fit in the return message. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [MsRestAzure::AzureOperationResponse] HTTP response information.", "label": 1, "domain": "code", "token_count": 323, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0366", "text": "Write the header of the DBF file on the main stream.
----------------------------------------------------------- DBF Header (32 bytes) ----------------------------------------------------------- Bytes Size Content ----------------------------------------------------------- 0 1 byte DBF Format id 0x03: FoxBase+, FoxPro, dBASEIII+ dBASEIV, no memo 0x83: FoxBase+, dBASEIII+ with memo 0xF5: FoxPro with memo 0x8B: dBASEIV with memo 0x8E: dBASEIV with SQL table 1-3 3 bytes Date of last update: YMD 4-7 4 bytes Number of records in the table 8-9 2 bytes Number of bytes in the header 10-11 2 bytes Number of bytes in the record 12-13 2 bytes Reserved 14 1 byte Incomplete transaction 0x00: Ignored / Transaction End 0x01: Transaction started 15 1 byte Encryption flag 0x00: Not encrypted 0x01: Encrypted 16-19 4 bytes Free record thread (reserved for LAN only) 20-27 8 bytes Reserved for multi-user dBASE (dBASE III+) 28 1 byte MDX flag (dBASE IV) 0x00: index upon demand 0x01: production index exists 29 1 byte Language driver ID See {@link DBaseCodePage} for details. 30-31 2 bytes Reserved ----------------------------------------------------------
@param recordCount is the count of record which will be written. @param language is the language of the file. @throws IOException in case of errors.", "label": 1, "domain": "code", "token_count": 349, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0367", "text": "Gets the information about the specific service belonging to the Service Fabric application. Returns the information about the specified service belonging to the specified Service Fabric application. @param application_id [String] The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the application name is \"fabric:/myapp/app1\", the application identity would be \"myapp~app1\" in 6.0+ and \"myapp/app1\" in previous versions. @param service_id [String] The identity of the service. This is typically the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the \"~\" character. For example, if the service name is \"fabric:/myapp/app1/svc1\", the service identity would be \"myapp~app1~svc1\" in 6.0+ and \"myapp/app1/svc1\" in previous versions. @param timeout [Integer] The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [ServiceInfo] operation results.", "label": 1, "domain": "code", "token_count": 305, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0368", "text": " Return a dictionary conformant to 'securesystemslib.formats.KEY_SCHEMA'. If 'private' is True, include the private key. The dictionary returned has the form: {'keytype': keytype, 'scheme' : scheme, 'keyval': {'public': '...', 'private': '...'}} or if 'private' is False: {'keytype': keytype, 'scheme': scheme, 'keyval': {'public': '...', 'private': ''}} >>> ed25519_key = generate_ed25519_key() >>> key_val = ed25519_key['keyval'] >>> keytype = ed25519_key['keytype'] >>> scheme = ed25519_key['scheme'] >>> ed25519_metadata = \\ format_keyval_to_metadata(keytype, scheme, key_val, private=True) >>> securesystemslib.formats.KEY_SCHEMA.matches(ed25519_metadata) True key_type: The 'rsa' or 'ed25519' strings. scheme: The signature scheme used by the key. key_value: A dictionary containing a private and public keys. 'key_value' is of the form: {'public': '...', 'private': '...'}}, conformant to 'securesystemslib.formats.KEYVAL_SCHEMA'. private: Indicates if the private key should be included in the dictionary returned. securesystemslib.exceptions.FormatError, if 'key_value' does not conform to 'securesystemslib.formats.KEYVAL_SCHEMA', or if the private key is not present in 'key_value' if requested by the caller via 'private'. None. A 'securesystemslib.formats.KEY_SCHEMA' dictionary.", "label": 1, "domain": "code", "token_count": 350, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0369", "text": "Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. @param resource_group_name [String] The name of the Azure resource group that contains the Data Lake Analytics account. @param account_name [String] The name of the Data Lake Analytics account for which to list Azure Storage accounts. @param filter [String] The OData filter. Optional. @param top [Integer] The number of items to return. Optional. @param skip [Integer] The number of items to skip over before returning elements. Optional. @param expand [String] OData expansion. Expand related resources in line with the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category entry. Optional. @param select [String] OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. @param orderby [String] OrderBy clause. One or more comma-separated expressions with an optional \"asc\" (the default) or \"desc\" depending on the order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. @param count [Boolean] The Boolean value of true or false to request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. Optional. @param search [String] A free form search. A free-text search expression to match for whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. @param format [String] The desired return format. Return the response in particular formatxii without access to request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.", "label": 1, "domain": "code", "token_count": 416, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0370", "text": "Get a Ipv4 or Ipv6 by IP :param ip: IPv4 or Ipv6. 'xxx.xxx.xxx.xxx or xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx' :return: Dictionary with the following structure: :: {'ips': [{'oct4': < oct4 >, 'oct2': < oct2 >, 'oct3': < oct3 >, 'oct1': < oct1 >, 'version': < version >, 'networkipv4': < networkipv4 >, 'id': < id >, 'descricao': < descricao >}, ... ] }. or {'ips': [ {'block1': < block1 >, 'block2': < block2 >, 'block3': < block3 >, 'block4': < block4 >, 'block5': < block5 >, 'block6': < block6 >, 'block7': < block7 >, 'block8': < block8 >, 'version': < version >, 'networkipv6': < networkipv6 >, 'id': < id >, 'descricao': < descricao >}, ... ] }. :raise IpNaoExisteError: Ipv4 or Ipv6 not found. :raise UserNotAuthorizedError: User dont have permission to perform operation. :raise InvalidParameterError: Ip string is none or invalid. :raise XMLError: Networkapi failed to generate the XML response. :raise DataBaseError: Networkapi failed to access the database.", "label": 1, "domain": "code", "token_count": 315, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0371", "text": "Get agent groups. Get agent groups from Configuration Server with the specified filters. @param groupType the agent group type. (optional) @param limit The number of objects the Provisioning API should return. (optional) @param offset The number of matches the Provisioning API should skip in the returned objects. (optional) @param searchTerm The term that you want to search for in the object keys. The Provisioning API searches for the this term in the value of the key you specify in 'search_key'. (optional) @param searchKey The key you want the Provisioning API to use when searching for the term you specified in 'search_term'. You can find valid key names in the Platform SDK documentation for [CfgDN](https://docs.genesys.com/Documentation/PSDK/9.0.x/ConfigLayerRef/CfgDN) and [CfgAgentGroup](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgAgentGroup). (optional) @param matchMethod The method the Provisioning API should use to match the 'search_term'. Possible values are includes, startsWith, endsWith, and isEqual. (optional, default to includes) @param sortKey A key in [CfgDN](https://docs.genesys.com/Documentation/PSDK/9.0.x/ConfigLayerRef/CfgDN), [CfgSkill](https://docs.genesys.com/Documentation/PSDK/9.0.x/ConfigLayerRef/CfgSkill) or [CfgAgentGroup](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgAgentGroup) to sort the search results. (optional) @param sortAscending Specifies whether to sort the search results in ascending or descending order. (optional, default to true) @param sortMethod Specifies the sort method. Possible values are caseSensitive, caseInsensitive or numeric. (optional, default to caseSensitive) @return Results object which includes list of AgentGroups and the total count. @throws ProvisioningApiException if the call is unsuccessful.", "label": 1, "domain": "code", "token_count": 437, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0372", "text": "Search for Spots within a give SW|NE bounds with query @return [Array] @param [Hash] bounds @param [String] api_key the provided api key @param [Hash] options @option bounds [String, Array] :start_point An array that contains the lat/lng pair for the first point in the bounds (rectangle) @option bounds [:start_point][String, Integer] :lat The starting point coordinates latitude value @option bounds [:start_point][String, Integer] :lng The starting point coordinates longitude value @option bounds [String, Array] :end_point An array that contains the lat/lng pair for the end point in the bounds (rectangle) @option bounds [:end_point][String, Integer] :lat The end point coordinates latitude value @option bounds [:end_point][String, Integer] :lng The end point coordinates longitude value @option options [String,Array] :query Restricts the results to Spots matching term(s) in the specified query @option options [String] :language The language code, indicating in which language the results should be returned, if possible. @option options [String,Array] :exclude ([]) A String or an Array of types to exclude from results @option options [Hash] :retry_options ({}) A Hash containing parameters for search retries @option options [Object] :retry_options[:status] ([]) @option options [Integer] :retry_options[:max] (0) the maximum retries @option options [Integer] :retry_options[:delay] (5) the delay between each retry in seconds @option options [Boolean] :detail A boolean to return spots with full detail information(its complete address, phone number, user rating, reviews, etc) Note) This makes an extra call for each spot for more information. @see https://developers.google.com/maps/documentation/places/supported_types List of supported types", "label": 1, "domain": "code", "token_count": 395, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0373", "text": "A |Elements| collection of all \"routing\" basins. (Only river basins with a upstream basin are assumed to route something to the downstream basin.) >>> from hydpy import RiverBasinNumbers2Selection >>> rbns2s = RiverBasinNumbers2Selection( ... (111, 113, 1129, 11269, 1125, 11261, ... 11262, 1123, 1124, 1122, 1121)) The following elements are properly connected to the required inlet and outlet nodes already: >>> for element in rbns2s.router_elements: ... print(repr(element)) Element(\"stream_1123\", inlets=\"node_1123\", outlets=\"node_1125\") Element(\"stream_1125\", inlets=\"node_1125\", outlets=\"node_1129\") Element(\"stream_11269\", inlets=\"node_11269\", outlets=\"node_1129\") Element(\"stream_1129\", inlets=\"node_1129\", outlets=\"node_113\") Element(\"stream_113\", inlets=\"node_113\", outlets=\"node_outlet\") It is both possible to change the prefix names of the elements and nodes, as long as it results in a valid variable name (e.g. does not start with a number): >>> rbns2s.router_prefix = 'c_' >>> rbns2s.node_prefix = 'd_' >>> rbns2s.router_elements Elements(\"c_1123\", \"c_1125\", \"c_11269\", \"c_1129\", \"c_113\")", "label": 1, "domain": "code", "token_count": 334, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0374", "text": "목록 조회 args CorpNum : 팝빌회원 사업자번호 MgtKeyType : 세금계산서유형, SELL-매출, BUY-매입, TRUSTEE-위수탁 DType : 일자유형, R-등록일시, W-작성일자, I-발행일시 중 택 1 SDate : 시작일자, 표시형식(yyyyMMdd) EDate : 종료일자, 표시형식(yyyyMMdd) State : 상태코드, 2,3번째 자리에 와일드카드(*) 사용가능 Type : 문서형태 배열, N-일반세금계산서, M-수정세금계산서 TaxType : 과세형태 배열, T-과세, N-면세, Z-영세 LateOnly : 지연발행, 공백-전체조회, 0-정상발행조회, 1-지연발행 조회 TaxRegIdYN : 종사업장번호 유무, 공백-전체조회, 0-종사업장번호 없음 1-종사업장번호 있음 TaxRegIDType : 종사업장번호 사업자유형, S-공급자, B-공급받는자, T-수탁자 TaxRegID : 종사업장번호, 콤마(,)로 구분하여 구성 ex)'0001,1234' Page : 페이지번호 PerPage : 페이지당 목록개수 Order : 정렬방향, D-내림차순, A-오름차순 UserID : 팝빌 회원아이디 QString : 거래처 정보, 거래처 상호 또는 사업자등록번호 기재, 미기재시 전체조회 InterOPYN : 연동문서 여부, 공백-전체조회, 0-일반문서 조회, 1-연동문서 조회 IssueType : 발행형태 배열, N-정발행, R-역발행, T-위수탁 return 조회목록 Object raise PopbillException", "label": 1, "domain": "code", "token_count": 438, "matched_pair_id": null, "split": "train"}
+{"id": "code_docs_train_pos_0375", "text": "[sourceFormat] + \"original\": This format is only used in series.data, where itemStyle can be specified in data item. + \"arrayRows\": [ ['product', 'score', 'amount'], ['Matcha Latte', 89.3, 95.8], ['Milk Tea', 92.1, 89.4], ['Cheese Cocoa', 94.4, 91.2], ['Walnut Brownie', 85.4, 76.9] ] + \"objectRows\": [ {product: 'Matcha Latte', score: 89.3, amount: 95.8}, {product: 'Milk Tea', score: 92.1, amount: 89.4}, {product: 'Cheese Cocoa', score: 94.4, amount: 91.2}, {product: 'Walnut Brownie', score: 85.4, amount: 76.9} ] + \"keyedColumns\": { 'product': ['Matcha Latte', 'Milk Tea', 'Cheese Cocoa', 'Walnut Brownie'], 'count': [823, 235, 1042, 988], 'score': [95.8, 81.4, 91.2, 76.9] } + \"typedArray\" + \"unknown\" @constructor @param {Object} fields @param {string} fields.sourceFormat @param {Array|Object} fields.fromDataset @param {Array|Object} [fields.data] @param {string} [seriesLayoutBy='column'] @param {Array.