function_name
stringlengths
1
57
function_code
stringlengths
20
4.99k
documentation
stringlengths
50
2k
language
stringclasses
5 values
file_path
stringlengths
8
166
line_number
int32
4
16.7k
parameters
listlengths
0
20
return_type
stringlengths
0
131
has_type_hints
bool
2 classes
complexity
int32
1
51
quality_score
float32
6
9.68
repo_name
stringclasses
34 values
repo_stars
int32
2.9k
242k
docstring_style
stringclasses
7 values
is_async
bool
2 classes
variable_labels
def variable_labels(self) -> dict[str, str]: """ Return a dict associating each variable name with corresponding label. This method retrieves variable labels from a Stata file. Variable labels are mappings between variable names and their corresponding descriptive labels in a St...
Return a dict associating each variable name with corresponding label. This method retrieves variable labels from a Stata file. Variable labels are mappings between variable names and their corresponding descriptive labels in a Stata dataset. Returns ------- dict A python dictionary. See Also -------- read_stata...
python
pandas/io/stata.py
2,004
[ "self" ]
dict[str, str]
true
1
6.8
pandas-dev/pandas
47,362
unknown
false
auc
def auc(x, y): """Compute Area Under the Curve (AUC) using the trapezoidal rule. This is a general function, given points on a curve. For computing the area under the ROC-curve, see :func:`roc_auc_score`. For an alternative way to summarize a precision-recall curve, see :func:`average_precision_s...
Compute Area Under the Curve (AUC) using the trapezoidal rule. This is a general function, given points on a curve. For computing the area under the ROC-curve, see :func:`roc_auc_score`. For an alternative way to summarize a precision-recall curve, see :func:`average_precision_score`. Parameters ---------- x : arra...
python
sklearn/metrics/_ranking.py
47
[ "x", "y" ]
false
6
7.12
scikit-learn/scikit-learn
64,340
numpy
false
fillna
def fillna( self, value: object | ArrayLike, limit: int | None = None, copy: bool = True, ) -> Self: """ Fill NA/NaN values using the specified method. Parameters ---------- value : scalar, array-like If a scalar value is passed it...
Fill NA/NaN values using the specified method. Parameters ---------- value : scalar, array-like If a scalar value is passed it is used to fill all missing values. Alternatively, an array-like "value" can be given. It's expected that the array-like have the same length as 'self'. limit : int, default None ...
python
pandas/core/arrays/base.py
1,232
[ "self", "value", "limit", "copy" ]
Self
true
10
8.4
pandas-dev/pandas
47,362
numpy
false
createResponse
private ProjectGenerationResponse createResponse(ClassicHttpResponse httpResponse, HttpEntity httpEntity) throws IOException { ProjectGenerationResponse response = new ProjectGenerationResponse( ContentType.create(httpEntity.getContentType())); response.setContent(FileCopyUtils.copyToByteArray(httpEntity.get...
Loads the service capabilities of the service at the specified URL. If the service supports generating a textual representation of the capabilities, it is returned, otherwise {@link InitializrServiceMetadata} is returned. @param serviceUrl to url of the initializer service @return the service capabilities (as a String)...
java
cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java
152
[ "httpResponse", "httpEntity" ]
ProjectGenerationResponse
true
2
7.28
spring-projects/spring-boot
79,428
javadoc
false
averageLoadPenalty
public double averageLoadPenalty() { long totalLoadCount = saturatedAdd(loadSuccessCount, loadExceptionCount); return (totalLoadCount == 0) ? 0.0 : (double) totalLoadTime / totalLoadCount; }
Returns the average time spent loading new values. This is defined as {@code totalLoadTime / (loadSuccessCount + loadExceptionCount)}. <p><b>Note:</b> the values of the metrics are undefined in case of overflow (though it is guaranteed not to throw an exception). If you require specific handling, we recommend implement...
java
android/guava/src/com/google/common/cache/CacheStats.java
225
[]
true
2
6.64
google/guava
51,352
javadoc
false
countriesByLanguage
public static List<Locale> countriesByLanguage(final String languageCode) { if (languageCode == null) { return Collections.emptyList(); } return cCountriesByLanguage.computeIfAbsent(languageCode, lc -> Collections .unmodifiableList(availableLocaleList(locale -> langua...
Obtains the list of countries supported for a given language. <p> This method takes a language code and searches to find the countries available for that language. Variant locales are removed. </p> @param languageCode the 2 letter language code, null returns empty. @return an unmodifiable List of Locale objects, not nu...
java
src/main/java/org/apache/commons/lang3/LocaleUtils.java
135
[ "languageCode" ]
true
4
8.08
apache/commons-lang
2,896
javadoc
false
wrapIfNecessary
public static List<MessageSourceResolvable> wrapIfNecessary(List<? extends MessageSourceResolvable> errors) { if (CollectionUtils.isEmpty(errors)) { return Collections.emptyList(); } List<MessageSourceResolvable> result = new ArrayList<>(errors.size()); for (MessageSourceResolvable error : errors) { resul...
Wrap the given errors, if necessary, such that they are suitable for serialization to JSON. {@link MessageSourceResolvable} implementations that are known to be suitable are not wrapped. @param errors the errors to wrap @return a new Error list @since 3.5.4
java
core/spring-boot/src/main/java/org/springframework/boot/web/error/Error.java
106
[ "errors" ]
true
3
7.92
spring-projects/spring-boot
79,428
javadoc
false
getAccessibleMethod
public static Method getAccessibleMethod(final Class<?> cls, final Method method) { if (!MemberUtils.isPublic(method)) { return null; } // If the declaring class is public, we are done if (ClassUtils.isPublic(cls)) { return method; } final String m...
Gets an accessible method (that is, one that can be invoked via reflection) that implements the specified Method. If no such method can be found, return {@code null}. @param cls The implementing class, may be null. @param method The method that we wish to call, may be null. @return The accessible method or null. @since...
java
src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
110
[ "cls", "method" ]
Method
true
4
8.4
apache/commons-lang
2,896
javadoc
false
convertStreamOutput
function convertStreamOutput(output: NotebookCellOutput): JupyterOutput { const outputs: string[] = []; output.items .filter((opit) => opit.mime === CellOutputMimeTypes.stderr || opit.mime === CellOutputMimeTypes.stdout) .map((opit) => textDecoder.decode(opit.data)) .forEach(value => { // Ensure each line is...
Splits the source of a cell into an array of strings, each representing a line. Also normalizes line endings to use LF (`\n`) instead of CRLF (`\r\n`). Same is done in deserializer as well.
typescript
extensions/ipynb/src/serializers.ts
308
[ "output" ]
true
9
6
microsoft/vscode
179,840
jsdoc
false
maybe_convert_usecols
def maybe_convert_usecols( usecols: str | list[int] | list[str] | usecols_func | None, ) -> None | list[int] | list[str] | usecols_func: """ Convert `usecols` into a compatible format for parsing in `parsers.py`. Parameters ---------- usecols : object The use-columns object to potential...
Convert `usecols` into a compatible format for parsing in `parsers.py`. Parameters ---------- usecols : object The use-columns object to potentially convert. Returns ------- converted : object The compatible format of `usecols`.
python
pandas/io/excel/_util.py
179
[ "usecols" ]
None | list[int] | list[str] | usecols_func
true
4
6.24
pandas-dev/pandas
47,362
numpy
false
addLogger
private void addLogger(Map<String, LoggerConfig> loggers, String name) { Configuration configuration = getLoggerContext().getConfiguration(); while (name != null) { loggers.computeIfAbsent(name, configuration::getLoggerConfig); name = getSubName(name); } }
Return the configuration location. The result may be: <ul> <li>{@code null}: if DefaultConfiguration is used (no explicit config loaded)</li> <li>A file path: if provided explicitly by the user</li> <li>A URI: if loaded from the classpath default or a custom location</li> </ul> @param configuration the source configura...
java
core/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java
413
[ "loggers", "name" ]
void
true
2
7.28
spring-projects/spring-boot
79,428
javadoc
false
safeGet
function safeGet(object, key) { if (key === 'constructor' && typeof object[key] === 'function') { return; } if (key == '__proto__') { return; } return object[key]; }
Gets the value at `key`, unless `key` is "__proto__" or "constructor". @private @param {Object} object The object to query. @param {string} key The key of the property to get. @returns {*} Returns the property value.
javascript
lodash.js
6,712
[ "object", "key" ]
false
4
6.24
lodash/lodash
61,490
jsdoc
false
resolveNonPatternEmptyDirectories
private Set<StandardConfigDataResource> resolveNonPatternEmptyDirectories(StandardConfigDataReference reference) { String directory = reference.getDirectory(); Assert.state(directory != null, "'directory' must not be null"); Resource resource = this.resourceLoader.getResource(directory); return (resource instan...
Create a new {@link StandardConfigDataLocationResolver} instance. @param logFactory the factory for loggers to use @param binder a binder backed by the initial {@link Environment} @param resourceLoader a {@link ResourceLoader} used to load resources
java
core/spring-boot/src/main/java/org/springframework/boot/context/config/StandardConfigDataLocationResolver.java
288
[ "reference" ]
true
3
6.08
spring-projects/spring-boot
79,428
javadoc
false
processCodePathToExit
function processCodePathToExit(analyzer, node) { const codePath = analyzer.codePath; const state = CodePath.getState(codePath); let dontForward = false; switch (node.type) { case 'ChainExpression': state.popChainContext(); break; case 'IfStatement': case 'ConditionalExpression': ...
Updates the code path due to the type of a given node in leaving. @param {CodePathAnalyzer} analyzer The instance. @param {ASTNode} node The current AST node. @returns {void}
javascript
packages/eslint-plugin-react-hooks/src/code-path-analysis/code-path-analyzer.js
528
[ "analyzer", "node" ]
false
10
6.16
facebook/react
241,750
jsdoc
false
sem
def sem( self, axis: Axis | None = 0, skipna: bool = True, ddof: int = 1, numeric_only: bool = False, **kwargs, ) -> Series | Any: """ Return unbiased standard error of the mean over requested axis. Normalized by N-1 by default. This can be ch...
Return unbiased standard error of the mean over requested axis. Normalized by N-1 by default. This can be changed using the ddof argument Parameters ---------- axis : {index (0), columns (1)} For `Series` this parameter is unused and defaults to 0. .. warning:: The behavior of DataFrame.sem with ``a...
python
pandas/core/frame.py
13,428
[ "self", "axis", "skipna", "ddof", "numeric_only" ]
Series | Any
true
2
8.24
pandas-dev/pandas
47,362
numpy
false
abspath
def abspath(self, path): """ Return absolute path of file in the DataSource directory. If `path` is an URL, then `abspath` will return either the location the file exists locally or the location it would exist when opened using the `open` method. Parameters ----...
Return absolute path of file in the DataSource directory. If `path` is an URL, then `abspath` will return either the location the file exists locally or the location it would exist when opened using the `open` method. Parameters ---------- path : str or pathlib.Path Can be a local file or a remote URL. Returns -...
python
numpy/lib/_datasource.py
371
[ "self", "path" ]
false
2
6.08
numpy/numpy
31,054
numpy
false
finishEventHandler
function finishEventHandler() { // Here we wait until all updates have propagated, which is important // when using controlled components within layers: // https://github.com/facebook/react/issues/1698 // Then we restore state of any controlled component. const controlledComponentsHavePendingUpdates = needsSt...
Copyright (c) Meta Platforms, Inc. and affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
javascript
packages/react-dom-bindings/src/events/ReactDOMUpdateBatching.js
27
[]
false
2
6.4
facebook/react
241,750
jsdoc
false
cellSet
Set<Cell<R, C, V>> cellSet();
Returns a set of all row key / column key / value triplets. Changes to the returned set will update the underlying table, and vice versa. The cell set does not support the {@code add} or {@code addAll} methods. @return set of table cells consisting of row key / column key / value triplets
java
android/guava/src/com/google/common/collect/Table.java
208
[]
true
1
6.64
google/guava
51,352
javadoc
false
_format_duplicate_message
def _format_duplicate_message(self) -> DataFrame: """ Construct the DataFrame for a DuplicateLabelError. This returns a DataFrame indicating the labels and positions of duplicates in an index. This should only be called when it's already known that duplicates are present. ...
Construct the DataFrame for a DuplicateLabelError. This returns a DataFrame indicating the labels and positions of duplicates in an index. This should only be called when it's already known that duplicates are present. Examples -------- >>> idx = pd.Index(["a", "b", "a"]) >>> idx._format_duplicate_message() posit...
python
pandas/core/indexes/base.py
725
[ "self" ]
DataFrame
true
3
7.28
pandas-dev/pandas
47,362
unknown
false
createServerData
function createServerData() { let done = false; let promise = null; return { read() { if (done) { return; } if (promise) { throw promise; } promise = new Promise(resolve => { setTimeout(() => { done = true; promise = null; res...
Copyright (c) Meta Platforms, Inc. and affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
javascript
fixtures/ssr2/server/render.js
75
[]
false
3
6.24
facebook/react
241,750
jsdoc
false
asin
public static double asin(double value) { boolean negateResult; if (value < 0.0) { value = -value; negateResult = true; } else { negateResult = false; } if (value <= ASIN_MAX_VALUE_FOR_TABS) { int index = (int) (value * ASIN_INDEXER...
@param value Value in [-1,1]. @return Value arcsine, in radians, in [-PI/2,PI/2].
java
libs/h3/src/main/java/org/elasticsearch/h3/FastMath.java
447
[ "value" ]
true
10
8.4
elastic/elasticsearch
75,680
javadoc
false
capitalize
def capitalize(a): """ Return a copy of ``a`` with only the first character of each element capitalized. Calls :meth:`str.capitalize` element-wise. For byte strings, this method is locale-dependent. Parameters ---------- a : array-like, with ``StringDType``, ``bytes_``, or ``str_`` dt...
Return a copy of ``a`` with only the first character of each element capitalized. Calls :meth:`str.capitalize` element-wise. For byte strings, this method is locale-dependent. Parameters ---------- a : array-like, with ``StringDType``, ``bytes_``, or ``str_`` dtype Input array of strings to capitalize. Returns ...
python
numpy/_core/strings.py
1,203
[ "a" ]
false
1
6
numpy/numpy
31,054
numpy
false
subarray
public static double[] subarray(final double[] array, int startIndexInclusive, int endIndexExclusive) { if (array == null) { return null; } startIndexInclusive = max0(startIndexInclusive); endIndexExclusive = Math.min(endIndexExclusive, array.length); final int newSiz...
Produces a new {@code double} array containing the elements between the start and end indices. <p> The start index is inclusive, the end index exclusive. Null array input produces null output. </p> @param array the input array. @param startIndexInclusive the starting index. Undervalue (&lt;0) is promoted ...
java
src/main/java/org/apache/commons/lang3/ArrayUtils.java
7,843
[ "array", "startIndexInclusive", "endIndexExclusive" ]
true
3
7.6
apache/commons-lang
2,896
javadoc
false
getJSONObject
public JSONObject getJSONObject(String name) throws JSONException { Object object = get(name); if (object instanceof JSONObject) { return (JSONObject) object; } else { throw JSON.typeMismatch(name, object, "JSONObject"); } }
Returns the value mapped by {@code name} if it exists and is a {@code JSONObject}. @param name the name of the property @return the value @throws JSONException if the mapping doesn't exist or is not a {@code JSONObject}.
java
cli/spring-boot-cli/src/json-shade/java/org/springframework/boot/cli/json/JSONObject.java
625
[ "name" ]
JSONObject
true
2
7.92
spring-projects/spring-boot
79,428
javadoc
false
keySetIterator
Iterator<K> keySetIterator() { Map<K, V> delegate = delegateOrNull(); if (delegate != null) { return delegate.keySet().iterator(); } return new Itr<K>() { @Override @ParametricNullness K getOutput(int entry) { return key(entry); } }; }
Updates the index an iterator is pointing to after a call to remove: returns the index of the entry that should be looked at after a removal on indexRemoved, with indexBeforeRemove as the index that *was* the next entry that would be looked at.
java
android/guava/src/com/google/common/collect/CompactHashMap.java
710
[]
true
2
6.4
google/guava
51,352
javadoc
false
intersection
public static Pointcut intersection(Pointcut pc1, Pointcut pc2) { return new ComposablePointcut(pc1).intersection(pc2); }
Match all methods that <b>both</b> the given pointcuts match. @param pc1 the first Pointcut @param pc2 the second Pointcut @return a distinct Pointcut that matches all methods that both of the given Pointcuts match
java
spring-aop/src/main/java/org/springframework/aop/support/Pointcuts.java
63
[ "pc1", "pc2" ]
Pointcut
true
1
6.96
spring-projects/spring-framework
59,386
javadoc
false
jsonLenient
public static Object jsonLenient(Object fieldValue) { return JsonProcessor.apply(fieldValue, false, false); }
Uses {@link JsonProcessor} to convert a JSON string to a structured JSON object. This method is a more lenient version of {@link #json(Object)}. For example if given fieldValue "123 foo", this method will return 123 rather than throwing an IllegalArgumentException. @param fieldValue JSON string @return structured JSON ...
java
modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/Processors.java
74
[ "fieldValue" ]
Object
true
1
6.64
elastic/elasticsearch
75,680
javadoc
false
randomNumeric
@Deprecated public static String randomNumeric(final int count) { return secure().nextNumeric(count); }
Creates a random string whose length is the number of characters specified. <p> Characters will be chosen from the set of numeric characters. </p> @param count the length of random string to create. @return the random string. @throws IllegalArgumentException if {@code count} &lt; 0. @deprecated Use {@link #nextNumeric(...
java
src/main/java/org/apache/commons/lang3/RandomStringUtils.java
568
[ "count" ]
String
true
1
6.48
apache/commons-lang
2,896
javadoc
false
toArray
@Override @J2ktIncompatible // Incompatible return type change. Use inherited (unoptimized) implementation public Object[] toArray() { Object[] copyTo = new Object[size]; arraycopy(queue, 0, copyTo, 0, size); return copyTo; }
Returns an iterator over the elements contained in this collection, <i>in no particular order</i>. <p>The iterator is <i>fail-fast</i>: If the MinMaxPriorityQueue is modified at any time after the iterator is created, in any way except through the iterator's own remove method, the iterator will generally throw a {@link...
java
android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java
912
[]
true
1
6.24
google/guava
51,352
javadoc
false
elementsOf
@Contract("_, false, _ -> !null") private static @Nullable Elements elementsOf(@Nullable CharSequence name, boolean returnNullIfInvalid, int parserCapacity) { if (name == null) { Assert.isTrue(returnNullIfInvalid, "'name' must not be null"); return null; } if (name.isEmpty()) { return Elements.EMPTY;...
Return a {@link ConfigurationPropertyName} for the specified string. @param name the source name @param returnNullIfInvalid if null should be returned if the name is not valid @return a {@link ConfigurationPropertyName} instance @throws InvalidConfigurationPropertyNameException if the name is not valid and {@code retur...
java
core/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java
673
[ "name", "returnNullIfInvalid", "parserCapacity" ]
Elements
true
9
7.28
spring-projects/spring-boot
79,428
javadoc
false
_check_is_size
def _check_is_size(i, message=None, *, max=None): """Checks that a given integer is a valid size (i.e., is non-negative). You should use this over ``_check(i >= 0)`` because it can prevent ``GuardOnDataDependentSymNode`` exceptions by opting yourself into alternate semantics for ``guard_size_oblivious``...
Checks that a given integer is a valid size (i.e., is non-negative). You should use this over ``_check(i >= 0)`` because it can prevent ``GuardOnDataDependentSymNode`` exceptions by opting yourself into alternate semantics for ``guard_size_oblivious`` tests that treat values 0 and 1 equivalently to all other values. W...
python
torch/__init__.py
1,748
[ "i", "message", "max" ]
false
2
6.08
pytorch/pytorch
96,034
unknown
false
completeLastSent
public NetworkClient.InFlightRequest completeLastSent(String node) { NetworkClient.InFlightRequest inFlightRequest = requestQueue(node).pollFirst(); inFlightRequestCount.decrementAndGet(); return inFlightRequest; }
Complete the last request that was sent to a particular node. @param node The node the request was sent to @return The request
java
clients/src/main/java/org/apache/kafka/clients/InFlightRequests.java
84
[ "node" ]
true
1
6.88
apache/kafka
31,560
javadoc
false
sort
public static <T> T[] sort(final T[] array, final Comparator<? super T> comparator) { if (array != null) { Arrays.sort(array, comparator); } return array; }
Sorts the given array into ascending order and returns it. @param <T> the array type. @param array the array to sort (may be null). @param comparator the comparator to determine the order of the array. A {@code null} value uses the elements' {@link Comparable natural ordering}. @return the given array. @see Arra...
java
src/main/java/org/apache/commons/lang3/ArraySorter.java
153
[ "array", "comparator" ]
true
2
7.92
apache/commons-lang
2,896
javadoc
false
charactersOf
public static List<Character> charactersOf(CharSequence sequence) { return new CharSequenceAsList(checkNotNull(sequence)); }
Returns a view of the specified {@code CharSequence} as a {@code List<Character>}, viewing {@code sequence} as a sequence of Unicode code units. The view does not support any modification operations, but reflects any changes to the underlying character sequence. @param sequence the character sequence to view as a {@cod...
java
android/guava/src/com/google/common/collect/Lists.java
746
[ "sequence" ]
true
1
6.64
google/guava
51,352
javadoc
false
applyWriteLocked
public <T> T applyWriteLocked(final FailableFunction<O, T, ?> function) { return lockApplyUnlock(writeLockSupplier, function); }
Provides write (exclusive) access to The object to protect for the purpose of computing a result object. More precisely, what the method will do (in the given order): <ol> <li>Obtain a read (shared) lock on The object to protect. The current thread may block, until such a lock is granted.</li> <li>Invokes the given {@l...
java
src/main/java/org/apache/commons/lang3/concurrent/locks/LockingVisitors.java
397
[ "function" ]
T
true
1
6.64
apache/commons-lang
2,896
javadoc
false
createConverter
function createConverter(name, func) { var realName = mapping.aliasToReal[name] || name, methodName = mapping.remap[realName] || realName, oldOptions = options; return function(options) { var newUtil = isLib ? pristine : helpers, newFunc = isLib ? pristine[methodName] : func, ...
Create a converter function for `func` of `name`. @param {string} name The name of the function to convert. @param {Function} func The function to convert. @returns {Function} Returns the new converter function.
javascript
fp/_baseConvert.js
388
[ "name", "func" ]
false
5
6.24
lodash/lodash
61,490
jsdoc
false
previousPage
public void previousPage() { if (!isFirstPage()) { this.page--; } }
Switch to previous page. Will stay on first page if already on first page.
java
spring-beans/src/main/java/org/springframework/beans/support/PagedListHolder.java
238
[]
void
true
2
6.72
spring-projects/spring-framework
59,386
javadoc
false
print_default_config
def print_default_config(output_format: str) -> None: """Print a default configuration template in JSON or YAML format. Args: output_format: Either "json" or "yaml" """ if output_format == "json": print(json.dumps(default_config, indent=2)) else: # yaml for key, value in de...
Print a default configuration template in JSON or YAML format. Args: output_format: Either "json" or "yaml"
python
benchmarks/transformer/config_utils.py
138
[ "output_format" ]
None
true
9
6.56
pytorch/pytorch
96,034
google
false
isIncluded
private boolean isIncluded(EndpointId endpointId) { if (this.include.isEmpty()) { return this.defaultIncludes.matches(endpointId); } return this.include.matches(endpointId); }
Return {@code true} if the filter matches. @param endpointId the endpoint ID to check @return {@code true} if the filter matches @since 2.6.0
java
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/expose/IncludeExcludeEndpointFilter.java
129
[ "endpointId" ]
true
2
7.92
spring-projects/spring-boot
79,428
javadoc
false
sizeOf
public static int sizeOf(short version, Iterator<Map.Entry<TopicIdPartition, FetchResponseData.PartitionData>> partIterator) { // Since the throttleTimeMs and metadata field sizes are constant and fixed, we can // use arbitrary values here withou...
Convenience method to find the size of a response. @param version The version of the response to use. @param partIterator The partition iterator. @return The response size in bytes.
java
clients/src/main/java/org/apache/kafka/common/requests/FetchResponse.java
164
[ "version", "partIterator" ]
true
1
7.04
apache/kafka
31,560
javadoc
false
l1_min_c
def l1_min_c(X, y, *, loss="squared_hinge", fit_intercept=True, intercept_scaling=1.0): """Return the lowest bound for `C`. The lower bound for `C` is computed such that for `C` in `(l1_min_C, infinity)` the model is guaranteed not to be empty. This applies to l1 penalized classifiers, such as :class:`...
Return the lowest bound for `C`. The lower bound for `C` is computed such that for `C` in `(l1_min_C, infinity)` the model is guaranteed not to be empty. This applies to l1 penalized classifiers, such as :class:`sklearn.svm.LinearSVC` with penalty='l1' and :class:`sklearn.linear_model.LogisticRegression` with `l1_rati...
python
sklearn/svm/_bounds.py
26
[ "X", "y", "loss", "fit_intercept", "intercept_scaling" ]
false
5
7.28
scikit-learn/scikit-learn
64,340
numpy
false
is_due
def is_due(self, last_run_at: datetime) -> tuple[bool, datetime]: """Return tuple of ``(is_due, next_time_to_run)``. If :setting:`beat_cron_starting_deadline` has been specified, the scheduler will make sure that the `last_run_at` time is within the deadline. This prevents tasks that c...
Return tuple of ``(is_due, next_time_to_run)``. If :setting:`beat_cron_starting_deadline` has been specified, the scheduler will make sure that the `last_run_at` time is within the deadline. This prevents tasks that could have been run according to the crontab, but didn't, from running again unexpectedly. Note: ...
python
celery/schedules.py
641
[ "self", "last_run_at" ]
tuple[bool, datetime]
true
7
6.56
celery/celery
27,741
unknown
false
isAllUpperCase
public static boolean isAllUpperCase(final CharSequence cs) { if (isEmpty(cs)) { return false; } final int sz = cs.length(); for (int i = 0; i < sz; i++) { if (!Character.isUpperCase(cs.charAt(i))) { return false; } } re...
Tests if the CharSequence contains only uppercase characters. <p>{@code null} will return {@code false}. An empty String (length()=0) will return {@code false}.</p> <pre> StringUtils.isAllUpperCase(null) = false StringUtils.isAllUpperCase("") = false StringUtils.isAllUpperCase(" ") = false StringUtils.isAllUpp...
java
src/main/java/org/apache/commons/lang3/StringUtils.java
3,230
[ "cs" ]
true
4
7.6
apache/commons-lang
2,896
javadoc
false
unmodifiableSortedSetMultimap
public static <K extends @Nullable Object, V extends @Nullable Object> SortedSetMultimap<K, V> unmodifiableSortedSetMultimap(SortedSetMultimap<K, V> delegate) { if (delegate instanceof UnmodifiableSortedSetMultimap) { return delegate; } return new UnmodifiableSortedSetMultimap<>(delegate); }
Returns an unmodifiable view of the specified {@code SortedSetMultimap}. Query operations on the returned multimap "read through" to the specified multimap, and attempts to modify the returned multimap, either directly or through the multimap's views, result in an {@code UnsupportedOperationException}. <p>The returned ...
java
android/guava/src/com/google/common/collect/Multimaps.java
967
[ "delegate" ]
true
2
7.44
google/guava
51,352
javadoc
false
shouldGenerateId
protected boolean shouldGenerateId() { return false; }
Should an ID be generated instead of read from the passed in {@link Element}? <p>Disabled by default; subclasses can override this to enable ID generation. Note that this flag is about <i>always</i> generating an ID; the parser won't even check for an "id" attribute in this case. @return whether the parser should alway...
java
spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractBeanDefinitionParser.java
162
[]
true
1
6.96
spring-projects/spring-framework
59,386
javadoc
false
readResolve
Object readResolve() { return isEmpty() ? EMPTY : this; }
Returns an immutable array containing the same values as {@code this} array. This is logically a no-op, and in some circumstances {@code this} itself is returned. However, if this instance is a {@link #subArray} view of a larger array, this method will copy only the appropriate range of values, resulting in an equivale...
java
android/guava/src/com/google/common/primitives/ImmutableDoubleArray.java
654
[]
Object
true
2
6.64
google/guava
51,352
javadoc
false
linspace
def linspace(self, n=100, domain=None): """Return x, y values at equally spaced points in domain. Returns the x, y values at `n` linearly spaced points across the domain. Here y is the value of the polynomial at the points x. By default the domain is the same as that of the series inst...
Return x, y values at equally spaced points in domain. Returns the x, y values at `n` linearly spaced points across the domain. Here y is the value of the polynomial at the points x. By default the domain is the same as that of the series instance. This method is intended mostly as a plotting aid. Parameters -------...
python
numpy/polynomial/_polybase.py
915
[ "self", "n", "domain" ]
false
2
6.08
numpy/numpy
31,054
numpy
false
createCloudinaryUrl
function createCloudinaryUrl(path: string, config: ImageLoaderConfig) { // Cloudinary image URLformat: // https://cloudinary.com/documentation/image_transformations#transformation_url_structure // Example of a Cloudinary image URL: // https://res.cloudinary.com/mysite/image/upload/c_scale,f_auto,q_auto,w_600/ma...
Function that generates an ImageLoader for Cloudinary and turns it into an Angular provider. @param path Base URL of your Cloudinary images This URL should match one of the following formats: https://res.cloudinary.com/mysite https://mysite.cloudinary.com https://subdomain.mysite.com @returns Set of providers to config...
typescript
packages/common/src/directives/ng_optimized_image/image_loaders/cloudinary_loader.ts
51
[ "path", "config" ]
false
4
6.8
angular/angular
99,544
jsdoc
false
setForceMergeCompletedTimestamp
private void setForceMergeCompletedTimestamp(ProjectId projectId, String targetIndex, ActionListener<Void> listener) { forceMergeClusterStateUpdateTaskQueue.submitTask( Strings.format("Adding force merge complete marker to cluster state for [%s]", targetIndex), new UpdateForceMergeComple...
This method sends requests to delete any indices in the datastream that exceed its retention policy. It returns the set of indices it has sent delete requests for. @param project The project metadata from which to get index metadata @param dataStream The data stream @param i...
java
modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleService.java
1,376
[ "projectId", "targetIndex", "listener" ]
void
true
1
6.56
elastic/elasticsearch
75,680
javadoc
false
get_s3_bucket_key
def get_s3_bucket_key( bucket: str | None, key: str, bucket_param_name: str, key_param_name: str ) -> tuple[str, str]: """ Get the S3 bucket name and key. From either: - bucket name and key. Return the info as it is after checking `key` is a relative path. - key. Mus...
Get the S3 bucket name and key. From either: - bucket name and key. Return the info as it is after checking `key` is a relative path. - key. Must be a full s3:// url. :param bucket: The S3 bucket name :param key: The S3 key :param bucket_param_name: The parameter name containing the bucket name :param key_param_name:...
python
providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py
268
[ "bucket", "key", "bucket_param_name", "key_param_name" ]
tuple[str, str]
true
4
8.24
apache/airflow
43,597
sphinx
false
getAllSuperclassesAndInterfaces
private static List<Class<?>> getAllSuperclassesAndInterfaces(final Class<?> cls) { if (cls == null) { return null; } final List<Class<?>> allSuperClassesAndInterfaces = new ArrayList<>(); final List<Class<?>> allSuperclasses = ClassUtils.getAllSuperclasses(cls); int ...
Gets a combination of {@link ClassUtils#getAllSuperclasses(Class)} and {@link ClassUtils#getAllInterfaces(Class)}, one from superclasses, one from interfaces, and so on in a breadth first way. @param cls the class to look up, may be {@code null}. @return the combined {@link List} of superclasses and interfaces in order...
java
src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
223
[ "cls" ]
true
7
7.92
apache/commons-lang
2,896
javadoc
false
asSet
static @Nullable Set<String> asSet(String @Nullable [] array) { return (array != null) ? Collections.unmodifiableSet(new LinkedHashSet<>(Arrays.asList(array))) : null; }
Helper method that provides a null-safe way to convert a {@code String[]} to a {@link Collection} for client libraries to use. @param array the array to convert @return a collection or {@code null}
java
core/spring-boot/src/main/java/org/springframework/boot/ssl/SslOptions.java
115
[ "array" ]
true
2
8.16
spring-projects/spring-boot
79,428
javadoc
false
isAssignableFrom
public static void isAssignableFrom(final Class<?> superType, final Class<?> type, final String message, final Object... values) { // TODO when breaking BC, consider returning type if (!superType.isAssignableFrom(type)) { throw new IllegalArgumentException(getMessage(message, values)); ...
Validates that the argument can be converted to the specified class, if not throws an exception. <p>This method is useful when validating if there will be no casting errors.</p> <pre>Validate.isAssignableFrom(SuperClass.class, object.getClass());</pre> <p>The message of the exception is &quot;The validated object canno...
java
src/main/java/org/apache/commons/lang3/Validate.java
424
[ "superType", "type", "message" ]
void
true
2
6.56
apache/commons-lang
2,896
javadoc
false
remove
void remove(JarFile jarFile) { synchronized (this) { URL removedUrl = this.jarFileToJarFileUrl.remove(jarFile); if (removedUrl != null) { this.jarFileUrlToJarFile.remove(new JarFileUrlKey(removedUrl)); } } }
Remove the given jar and any related URL file from the cache. @param jarFile the jar file to remove
java
loader/spring-boot-loader/src/main/java/org/springframework/boot/loader/net/protocol/jar/UrlJarFiles.java
199
[ "jarFile" ]
void
true
2
6.56
spring-projects/spring-boot
79,428
javadoc
false
adaptArgumentsIfNecessary
static @Nullable Object[] adaptArgumentsIfNecessary(Method method, @Nullable Object[] arguments) { if (ObjectUtils.isEmpty(arguments)) { return new Object[0]; } if (method.isVarArgs() && (method.getParameterCount() == arguments.length)) { Class<?>[] paramTypes = method.getParameterTypes(); int varargInde...
Adapt the given arguments to the target signature in the given method, if necessary: in particular, if a given vararg argument array does not match the array type of the declared vararg parameter in the method. @param method the target method @param arguments the given arguments @return a cloned argument array, or the ...
java
spring-aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java
256
[ "method", "arguments" ]
true
7
8.08
spring-projects/spring-framework
59,386
javadoc
false
translate
public abstract int translate(CharSequence input, int index, Writer out) throws IOException;
Translate a set of code points, represented by an int index into a CharSequence, into another set of code points. The number of code points consumed must be returned, and the only IOExceptions thrown must be from interacting with the Writer so that the top level API may reliably ignore StringWriter IOExceptions. @param...
java
src/main/java/org/apache/commons/lang3/text/translate/CharSequenceTranslator.java
93
[ "input", "index", "out" ]
true
1
6.48
apache/commons-lang
2,896
javadoc
false
min
def min(self, axis=None, out=None, fill_value=None, keepdims=np._NoValue): """ Return the minimum along a given axis. Parameters ---------- axis : None or int or tuple of ints, optional Axis along which to operate. By default, ``axis`` is None and the fl...
Return the minimum along a given axis. Parameters ---------- axis : None or int or tuple of ints, optional Axis along which to operate. By default, ``axis`` is None and the flattened input is used. If this is a tuple of ints, the minimum is selected over multiple axes, instead of a single axis or all ...
python
numpy/ma/core.py
5,859
[ "self", "axis", "out", "fill_value", "keepdims" ]
false
11
7.76
numpy/numpy
31,054
numpy
false
getTags
public static Map<String, String> getTags(String... keyValue) { if ((keyValue.length % 2) != 0) throw new IllegalArgumentException("keyValue needs to be specified in pairs"); Map<String, String> tags = new LinkedHashMap<>(keyValue.length / 2); for (int i = 0; i < keyValue.length; i ...
Create a set of tags using the supplied key and value pairs. The order of the tags will be kept. @param keyValue the key and value pairs for the tags; must be an even number @return the map of tags that can be supplied to the {@link Metrics} methods; never null
java
clients/src/main/java/org/apache/kafka/common/metrics/internals/MetricsUtils.java
57
[]
true
3
7.76
apache/kafka
31,560
javadoc
false
reportFailure
private void reportFailure(Collection<SpringBootExceptionReporter> exceptionReporters, Throwable failure) { try { for (SpringBootExceptionReporter reporter : exceptionReporters) { if (reporter.reportException(failure)) { registerLoggedException(failure); return; } } } catch (Throwable ex) ...
Called after the context has been refreshed. @param context the application context @param args the application arguments
java
core/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java
842
[ "exceptionReporters", "failure" ]
void
true
5
6.72
spring-projects/spring-boot
79,428
javadoc
false
future
abstract CompletableFuture<?> future();
@return Future that will complete with the request response or failure.
java
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java
908
[]
true
1
6.8
apache/kafka
31,560
javadoc
false
createKeyStore
private static @Nullable KeyStore createKeyStore(String name, @Nullable PemSslStore pemSslStore) { if (pemSslStore == null) { return null; } try { List<X509Certificate> certificates = pemSslStore.certificates(); Assert.state(!ObjectUtils.isEmpty(certificates), "Certificates must not be empty"); String...
Create a new {@link PemSslStoreBundle} instance. @param pemKeyStore the PEM key store @param pemTrustStore the PEM trust store @since 3.2.0
java
core/spring-boot/src/main/java/org/springframework/boot/ssl/pem/PemSslStoreBundle.java
89
[ "name", "pemSslStore" ]
KeyStore
true
4
6.4
spring-projects/spring-boot
79,428
javadoc
false
nth
function nth(array, n) { return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; }
Gets the element at index `n` of `array`. If `n` is negative, the nth element from the end is returned. @static @memberOf _ @since 4.11.0 @category Array @param {Array} array The array to query. @param {number} [n=0] The index of the element to return. @returns {*} Returns the nth element of `array`. @example var array...
javascript
lodash.js
7,774
[ "array", "n" ]
false
3
7.6
lodash/lodash
61,490
jsdoc
false
readBytes
@CanIgnoreReturnValue // some processors won't return a useful result @ParametricNullness @J2ktIncompatible public static <T extends @Nullable Object> T readBytes( InputStream input, ByteProcessor<T> processor) throws IOException { checkNotNull(input); checkNotNull(processor); byte[] buf = crea...
Process the bytes of the given input stream using the given processor. @param input the input stream to process @param processor the object to which to pass the bytes of the stream @return the result of the byte processor @throws IOException if an I/O error occurs @since 14.0
java
android/guava/src/com/google/common/io/ByteStreams.java
895
[ "input", "processor" ]
T
true
2
8.08
google/guava
51,352
javadoc
false
getAll
private static Map<String, ConfigurationPropertiesBean> getAll(ConfigurableApplicationContext applicationContext) { Map<String, ConfigurationPropertiesBean> propertiesBeans = new LinkedHashMap<>(); ConfigurableListableBeanFactory beanFactory = applicationContext.getBeanFactory(); Iterator<String> beanNames = bean...
Return all {@link ConfigurationProperties @ConfigurationProperties} beans contained in the given application context. Both directly annotated beans, as well as beans that have {@link ConfigurationProperties @ConfigurationProperties} annotated factory methods are included. @param applicationContext the source applicatio...
java
core/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBean.java
152
[ "applicationContext" ]
true
5
7.44
spring-projects/spring-boot
79,428
javadoc
false
equals
@Override public boolean equals(@Nullable Object obj) { if (obj instanceof LocationInfo) { LocationInfo that = (LocationInfo) obj; return home.equals(that.home) && classloader.equals(that.classloader); } return false; }
Recursively scan the given directory, adding resources for each file encountered. Symlinks which have already been traversed in the current tree path will be skipped to eliminate cycles; otherwise symlinks are traversed. @param directory the root of the directory to scan @param packagePrefix resource path prefix inside...
java
android/guava/src/com/google/common/reflect/ClassPath.java
550
[ "obj" ]
true
3
6.4
google/guava
51,352
javadoc
false
serializeUnionOrIntersectionConstituents
function serializeUnionOrIntersectionConstituents(types: readonly TypeNode[], isIntersection: boolean): SerializedTypeNode { // Note when updating logic here also update `getEntityNameForDecoratorMetadata` in checker.ts so that aliases can be marked as referenced let serializedType: SerializedTypeNode...
Serializes a type node for use with decorator type metadata. Types are serialized in the following fashion: - Void types point to "undefined" (e.g. "void 0") - Function and Constructor types point to the global "Function" constructor. - Interface types with a call or construct signature types point to the global ...
typescript
src/compiler/transformers/typeSerializer.ts
402
[ "types", "isIntersection" ]
true
15
6.88
microsoft/TypeScript
107,154
jsdoc
false
clear
@Override public void clear() { for (int i = 0; i < size; i++) { queue[i] = null; } size = 0; }
Returns an iterator over the elements contained in this collection, <i>in no particular order</i>. <p>The iterator is <i>fail-fast</i>: If the MinMaxPriorityQueue is modified at any time after the iterator is created, in any way except through the iterator's own remove method, the iterator will generally throw a {@link...
java
android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java
904
[]
void
true
2
7.44
google/guava
51,352
javadoc
false
byteToHex
public static String byteToHex(final byte src, final int srcPos, final String dstInit, final int dstPos, final int nHexs) { if (0 == nHexs) { return dstInit; } if ((nHexs - 1) * 4 + srcPos >= Byte.SIZE) { throw new IllegalArgumentException("(nHexs - 1) * 4 + srcPos >= 8")...
Converts a byte into an array of char using the default (little-endian, LSB0) byte and bit ordering. @param src the byte to convert. @param srcPos the position in {@code src}, in bits, from where to start the conversion. @param dstInit the initial value for the result String. @param dstPos the position in {@code ...
java
src/main/java/org/apache/commons/lang3/Conversion.java
524
[ "src", "srcPos", "dstInit", "dstPos", "nHexs" ]
String
true
5
8.08
apache/commons-lang
2,896
javadoc
false
download_file_from_github
def download_file_from_github( reference: str, path: str, output_file: Path, github_token: str | None = None, timeout: int = 60 ) -> bool: """ Downloads a file from the GitHub repository of Apache Airflow using the GitHub API. In case of any error different from 404, it will exit the process with error...
Downloads a file from the GitHub repository of Apache Airflow using the GitHub API. In case of any error different from 404, it will exit the process with error code 1. :param reference: tag to download from :param path: path of the file relative to the repository root :param output_file: Path where the file should b...
python
dev/breeze/src/airflow_breeze/utils/github.py
85
[ "reference", "path", "output_file", "github_token", "timeout" ]
bool
true
6
7.76
apache/airflow
43,597
sphinx
false
clear_orphaned_import_errors
def clear_orphaned_import_errors( self, bundle_name: str, observed_filelocs: set[str], session: Session = NEW_SESSION ): """ Clear import errors for files that no longer exist. :param session: session for ORM operations """ self.log.debug("Removing old import errors"...
Clear import errors for files that no longer exist. :param session: session for ORM operations
python
airflow-core/src/airflow/dag_processing/manager.py
666
[ "self", "bundle_name", "observed_filelocs", "session" ]
true
3
7.04
apache/airflow
43,597
sphinx
false
refresh_from_task
def refresh_from_task(self, task: Operator, pool_override: str | None = None) -> None: """ Copy common attributes from the given task. :param task: The task object to copy from :param pool_override: Use the pool_override instead of task's pool """ self.task = task ...
Copy common attributes from the given task. :param task: The task object to copy from :param pool_override: Use the pool_override instead of task's pool
python
airflow-core/src/airflow/models/taskinstance.py
727
[ "self", "task", "pool_override" ]
None
true
3
7.2
apache/airflow
43,597
sphinx
false
hexRingPosToH3
public static String hexRingPosToH3(String h3Address, int ringPos) { return h3ToString(hexRingPosToH3(stringToH3(h3Address), ringPos)); }
Returns the neighbor index at the given position. @param h3Address Origin index @param ringPos position of the neighbour index @return the actual neighbour at the given position
java
libs/h3/src/main/java/org/elasticsearch/h3/H3.java
416
[ "h3Address", "ringPos" ]
String
true
1
6.32
elastic/elasticsearch
75,680
javadoc
false
topicIdValues
public Map<Uuid, KafkaFuture<Void>> topicIdValues() { return topicIdFutures; }
Use when {@link Admin#deleteTopics(TopicCollection, DeleteTopicsOptions)} used a TopicIdCollection @return a map from topic IDs to futures which can be used to check the status of individual deletions if the deleteTopics request used topic IDs. Otherwise return null.
java
clients/src/main/java/org/apache/kafka/clients/admin/DeleteTopicsResult.java
56
[]
true
1
6
apache/kafka
31,560
javadoc
false
getAspectClassLoader
@Override public @Nullable ClassLoader getAspectClassLoader() { return (this.beanFactory instanceof ConfigurableBeanFactory cbf ? cbf.getBeanClassLoader() : ClassUtils.getDefaultClassLoader()); }
Create a BeanFactoryAspectInstanceFactory, providing a type that AspectJ should introspect to create AJType metadata. Use if the BeanFactory may consider the type to be a subclass (as when using CGLIB), and the information should relate to a superclass. @param beanFactory the BeanFactory to obtain instance(s) from @par...
java
spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/BeanFactoryAspectInstanceFactory.java
95
[]
ClassLoader
true
2
6.4
spring-projects/spring-framework
59,386
javadoc
false
visitParenthesizedExpression
function visitParenthesizedExpression(node: ParenthesizedExpression): Expression { const innerExpression = skipOuterExpressions(node.expression, ~(OuterExpressionKinds.Assertions | OuterExpressionKinds.ExpressionsWithTypeArguments)); if (isAssertionExpression(innerExpression) || isSatisfiesExpression(...
Determines whether to emit an accessor declaration. We should not emit the declaration if it does not have a body and is abstract. @param node The declaration node.
typescript
src/compiler/transformers/ts.ts
1,687
[ "node" ]
true
3
6.88
microsoft/TypeScript
107,154
jsdoc
false
getAllDecoratorsOfMethod
function getAllDecoratorsOfMethod(method: MethodDeclaration | AccessorDeclaration, useLegacyDecorators: boolean): AllDecorators | undefined { if (!method.body) { return undefined; } const decorators = getDecorators(method); const parameters = useLegacyDecorators ? getDecoratorsOfParameter...
Gets an AllDecorators object containing the decorators for the method and its parameters. @param method The class method member.
typescript
src/compiler/transformers/utilities.ts
762
[ "method", "useLegacyDecorators" ]
true
5
6.56
microsoft/TypeScript
107,154
jsdoc
false
dot
def dot(self, other: AnyArrayLike | DataFrame) -> Series | np.ndarray: """ Compute the dot product between the Series and the columns of other. This method computes the dot product between the Series and another one, or the Series and each columns of a DataFrame, or the Series and ...
Compute the dot product between the Series and the columns of other. This method computes the dot product between the Series and another one, or the Series and each columns of a DataFrame, or the Series and each columns of an array. It can also be called using `self @ other`. Parameters ---------- other : Series, Da...
python
pandas/core/series.py
2,953
[ "self", "other" ]
Series | np.ndarray
true
10
8.4
pandas-dev/pandas
47,362
numpy
false
splitPath
function splitPath(path: string[]): [parentPath: string[], fieldName: string] { const selectionPath = [...path] const fieldName = selectionPath.pop() if (!fieldName) { throw new Error('unexpected empty path') } return [selectionPath, fieldName] }
Given the validation error and arguments rendering tree, applies corresponding formatting to an error tree and adds all relevant messages. @param error @param args
typescript
packages/client/src/runtime/core/errorRendering/applyValidationError.ts
625
[ "path" ]
true
2
6.72
prisma/prisma
44,834
jsdoc
false
toString
@Override public String toString() { // "[]:12345" requires 8 extra bytes. StringBuilder builder = new StringBuilder(host.length() + 8); if (host.indexOf(':') >= 0) { builder.append('[').append(host).append(']'); } else { builder.append(host); } if (hasPort()) { builder.appen...
Rebuild the host:port string, including brackets if necessary.
java
android/guava/src/com/google/common/net/HostAndPort.java
295
[]
String
true
3
6.56
google/guava
51,352
javadoc
false
scanJsDocToken
function scanJsDocToken(): JSDocSyntaxKind { fullStartPos = tokenStart = pos; tokenFlags = TokenFlags.None; if (pos >= end) { return token = SyntaxKind.EndOfFileToken; } const ch = codePointUnchecked(pos); pos += charSize(ch); switch (ch) { ...
Unconditionally back up and scan a template expression portion.
typescript
src/compiler/scanner.ts
3,841
[]
true
15
6.48
microsoft/TypeScript
107,154
jsdoc
false
getAsText
@Override public String getAsText() { if (Boolean.TRUE.equals(getValue())) { return (this.trueString != null ? this.trueString : VALUE_TRUE); } else if (Boolean.FALSE.equals(getValue())) { return (this.falseString != null ? this.falseString : VALUE_FALSE); } else { return ""; } }
Create a new CustomBooleanEditor instance, with configurable String values for true and false. <p>The "allowEmpty" parameter states if an empty String should be allowed for parsing, i.e. get interpreted as null value. Else, an IllegalArgumentException gets thrown in that case. @param trueString the String value that re...
java
spring-beans/src/main/java/org/springframework/beans/propertyeditors/CustomBooleanEditor.java
157
[]
String
true
5
6.4
spring-projects/spring-framework
59,386
javadoc
false
is_numeric_dtype
def is_numeric_dtype(arr_or_dtype) -> bool: """ Check whether the provided array or dtype is of a numeric dtype. Parameters ---------- arr_or_dtype : array-like or dtype The array or dtype to check. Returns ------- boolean Whether or not the array or dtype is of a numer...
Check whether the provided array or dtype is of a numeric dtype. Parameters ---------- arr_or_dtype : array-like or dtype The array or dtype to check. Returns ------- boolean Whether or not the array or dtype is of a numeric dtype. See Also -------- api.types.is_integer_dtype: Check whether the provided arra...
python
pandas/core/dtypes/common.py
1,246
[ "arr_or_dtype" ]
bool
true
3
7.84
pandas-dev/pandas
47,362
numpy
false
_build_provider_distributions
def _build_provider_distributions( provider_id: str, package_version_suffix: str, distribution_format: str, skip_tag_check: bool, skip_deleting_generated_files: bool, ) -> bool: """ Builds provider distribution. :param provider_id: id of the provider package :param package_version_s...
Builds provider distribution. :param provider_id: id of the provider package :param package_version_suffix: suffix to append to the package version :param distribution_format: format of the distribution to build (wheel or sdist) :param skip_tag_check: whether to skip tag check :param skip_deleting_generated_files: whe...
python
dev/breeze/src/airflow_breeze/commands/release_management_commands.py
1,021
[ "provider_id", "package_version_suffix", "distribution_format", "skip_tag_check", "skip_deleting_generated_files" ]
bool
true
3
7.6
apache/airflow
43,597
sphinx
false
symlink
function symlink(target, path, type, callback) { if (callback === undefined) { callback = makeCallback(type); type = undefined; } else { validateOneOf(type, 'type', ['dir', 'file', 'junction', null, undefined]); } if (permission.isEnabled()) { // The permission model's security guarantees fall ...
Creates the link called `path` pointing to `target`. @param {string | Buffer | URL} target @param {string | Buffer | URL} path @param {string | null} [type] @param {(err?: Error) => any} callback @returns {void}
javascript
lib/fs.js
1,758
[ "target", "path", "type", "callback" ]
false
15
6.16
nodejs/node
114,839
jsdoc
false
destroy
@Override public void destroy() { }
Return the description for the given request. By default this method will return a description based on the request {@code servletPath} and {@code pathInfo}. @param request the source request @return the description
java
core/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/ErrorPageFilter.java
293
[]
void
true
1
6.64
spring-projects/spring-boot
79,428
javadoc
false
nunique_ints
def nunique_ints(values: ArrayLike) -> int: """ Return the number of unique values for integer array-likes. Significantly faster than pandas.unique for long enough sequences. No checks are done to ensure input is integral. Parameters ---------- values : 1d array-like Returns -----...
Return the number of unique values for integer array-likes. Significantly faster than pandas.unique for long enough sequences. No checks are done to ensure input is integral. Parameters ---------- values : 1d array-like Returns ------- int : The number of unique values in ``values``
python
pandas/core/algorithms.py
440
[ "values" ]
int
true
2
7.2
pandas-dev/pandas
47,362
numpy
false
determineTargetClass
public static @Nullable Class<?> determineTargetClass( ConfigurableListableBeanFactory beanFactory, @Nullable String beanName) { if (beanName == null) { return null; } if (beanFactory.containsBeanDefinition(beanName)) { BeanDefinition bd = beanFactory.getMergedBeanDefinition(beanName); Class<?> targe...
Determine the original target class for the specified bean, if possible, otherwise falling back to a regular {@code getType} lookup. @param beanFactory the containing ConfigurableListableBeanFactory @param beanName the name of the bean @return the original target class as stored in the bean definition, if any @since 4....
java
spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AutoProxyUtils.java
160
[ "beanFactory", "beanName" ]
true
4
7.44
spring-projects/spring-framework
59,386
javadoc
false
moveResourceAttributes
private static void moveResourceAttributes(Map<String, Object> attributes, Map<String, Object> resourceAttributes) { Set<String> ecsResourceFields = EcsOTelResourceAttributes.LATEST; Iterator<Map.Entry<String, Object>> attributeIterator = attributes.entrySet().iterator(); while (attributeIterato...
Renames specific ECS keys in the given document to their OpenTelemetry-compatible counterparts using logic compatible with the {@link org.elasticsearch.ingest.IngestPipelineFieldAccessPattern#FLEXIBLE} access pattern and based on the {@code RENAME_KEYS} map. <p>This method performs the following operations: <ul> <li>...
java
modules/ingest-otel/src/main/java/org/elasticsearch/ingest/otel/NormalizeForStreamProcessor.java
389
[ "attributes", "resourceAttributes" ]
void
true
3
6.4
elastic/elasticsearch
75,680
javadoc
false
substringBefore
public static String substringBefore(final String str, final int find) { if (isEmpty(str)) { return str; } final int pos = str.indexOf(find); if (pos == INDEX_NOT_FOUND) { return str; } return str.substring(0, pos); }
Gets the substring before the first occurrence of a separator. The separator is not returned. <p> A {@code null} string input will return {@code null}. An empty ("") string input will return the empty string. </p> <p> If nothing is found, the string input is returned. </p> <pre> StringUtils.substringBefore(null, *) ...
java
src/main/java/org/apache/commons/lang3/StringUtils.java
8,363
[ "str", "find" ]
String
true
3
7.76
apache/commons-lang
2,896
javadoc
false
collectPropertiesToMerge
protected List<PropertiesHolder> collectPropertiesToMerge(Locale locale) { String[] basenames = StringUtils.toStringArray(getBasenameSet()); List<PropertiesHolder> holders = new ArrayList<>(basenames.length); for (int i = basenames.length - 1; i >= 0; i--) { List<String> filenames = calculateAllFilenames(basen...
Determine the properties to merge based on the specified basenames. @param locale the locale @return the list of properties holders @since 6.1.4 @see #getBasenameSet() @see #calculateAllFilenames @see #mergeProperties
java
spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java
277
[ "locale" ]
true
4
7.6
spring-projects/spring-framework
59,386
javadoc
false
_validate_skipfooter_arg
def _validate_skipfooter_arg(skipfooter: int) -> int: """ Validate the 'skipfooter' parameter. Checks whether 'skipfooter' is a non-negative integer. Raises a ValueError if that is not the case. Parameters ---------- skipfooter : non-negative integer The number of rows to skip at t...
Validate the 'skipfooter' parameter. Checks whether 'skipfooter' is a non-negative integer. Raises a ValueError if that is not the case. Parameters ---------- skipfooter : non-negative integer The number of rows to skip at the end of the file. Returns ------- validated_skipfooter : non-negative integer The o...
python
pandas/io/parsers/python_parser.py
1,529
[ "skipfooter" ]
int
true
3
6.72
pandas-dev/pandas
47,362
numpy
false
inclusiveBetween
public static <T> void inclusiveBetween(final T start, final T end, final Comparable<T> value, final String message, final Object... values) { // TODO when breaking BC, consider returning value if (value.compareTo(start) < 0 || value.compareTo(end) > 0) { throw new IllegalArgumentException(g...
Validate that the specified argument object fall between the two inclusive values specified; otherwise, throws an exception with the specified message. <pre>Validate.inclusiveBetween(0, 2, 1, "Not in boundaries");</pre> @param <T> the type of the argument object. @param start the inclusive start value, not null. @para...
java
src/main/java/org/apache/commons/lang3/Validate.java
377
[ "start", "end", "value", "message" ]
void
true
3
6.56
apache/commons-lang
2,896
javadoc
false
handleResponse
ApiResult<K, V> handleResponse(Node broker, Set<K> keys, AbstractResponse response);
Callback that is invoked when a request returns successfully. The handler should parse the response, check for errors, and return a result which indicates which keys (if any) have either been completed or failed with an unrecoverable error. It is also possible that the response indicates an incorrect target brokerId (e...
java
clients/src/main/java/org/apache/kafka/clients/admin/internals/AdminApiHandler.java
72
[ "broker", "keys", "response" ]
true
1
6.32
apache/kafka
31,560
javadoc
false
convertToDashedElement
private CharSequence convertToDashedElement(CharSequence element) { return convertElement(element, true, ElementsParser::isValidChar); }
Return an element in the name in the given form. @param elementIndex the element index @param form the form to return @return the last element
java
core/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java
180
[ "element" ]
CharSequence
true
1
6.64
spring-projects/spring-boot
79,428
javadoc
false
enterIfInterruptibly
@SuppressWarnings("GoodTime") // should accept a java.time.Duration public boolean enterIfInterruptibly(Guard guard, long time, TimeUnit unit) throws InterruptedException { if (guard.monitor != this) { throw new IllegalMonitorStateException(); } ReentrantLock lock = this.lock; if (!lock.tr...
Enters this monitor if the guard is satisfied. Blocks at most the given time acquiring the lock, but does not wait for the guard to be satisfied, and may be interrupted. @return whether the monitor was entered, which guarantees that the guard is now satisfied
java
android/guava/src/com/google/common/util/concurrent/Monitor.java
777
[ "guard", "time", "unit" ]
true
4
7.04
google/guava
51,352
javadoc
false
deleteShareGroups
default DeleteShareGroupsResult deleteShareGroups(Collection<String> groupIds) { return deleteShareGroups(groupIds, new DeleteShareGroupsOptions()); }
Delete share groups from the cluster with the default options. @param groupIds Collection of share group ids which are to be deleted. @return The DeleteShareGroupsResult.
java
clients/src/main/java/org/apache/kafka/clients/admin/Admin.java
2,033
[ "groupIds" ]
DeleteShareGroupsResult
true
1
6.8
apache/kafka
31,560
javadoc
false
write
@Override public long write(ByteBuffer[] srcs, int offset, int length) throws IOException { if ((offset < 0) || (length < 0) || (offset > srcs.length - length)) throw new IndexOutOfBoundsException(); int totalWritten = 0; int i = offset; while (i < offset + length) { ...
Writes a sequence of bytes to this channel from the subsequence of the given buffers. @param srcs The buffers from which bytes are to be retrieved @param offset The offset within the buffer array of the first buffer from which bytes are to be retrieved; must be non-negative and no larger than srcs.length. @param length...
java
clients/src/main/java/org/apache/kafka/common/network/SslTransportLayer.java
753
[ "srcs", "offset", "length" ]
true
10
8.4
apache/kafka
31,560
javadoc
false
rbf_kernel
def rbf_kernel(X, Y=None, gamma=None): """Compute the rbf (gaussian) kernel between X and Y. .. code-block:: text K(x, y) = exp(-gamma ||x-y||^2) for each pair of rows x in X and y in Y. Read more in the :ref:`User Guide <rbf_kernel>`. Parameters ---------- X : {array-like, spar...
Compute the rbf (gaussian) kernel between X and Y. .. code-block:: text K(x, y) = exp(-gamma ||x-y||^2) for each pair of rows x in X and y in Y. Read more in the :ref:`User Guide <rbf_kernel>`. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples_X, n_features) A feature array. Y : {a...
python
sklearn/metrics/pairwise.py
1,571
[ "X", "Y", "gamma" ]
false
2
7.84
scikit-learn/scikit-learn
64,340
numpy
false
load_dotenv
def load_dotenv( path: str | os.PathLike[str] | None = None, load_defaults: bool = True ) -> bool: """Load "dotenv" files to set environment variables. A given path takes precedence over ``.env``, which takes precedence over ``.flaskenv``. After loading and combining these files, values are only set if ...
Load "dotenv" files to set environment variables. A given path takes precedence over ``.env``, which takes precedence over ``.flaskenv``. After loading and combining these files, values are only set if the key is not already set in ``os.environ``. This is a no-op if `python-dotenv`_ is not installed. .. _python-doten...
python
src/flask/cli.py
698
[ "path", "load_defaults" ]
bool
true
12
8.08
pallets/flask
70,946
sphinx
false
tryDrainReferenceQueues
void tryDrainReferenceQueues() { if (tryLock()) { try { maybeDrainReferenceQueues(); } finally { unlock(); } } }
Cleanup collected entries when the lock is available.
java
android/guava/src/com/google/common/collect/MapMakerInternalMap.java
1,362
[]
void
true
2
6.88
google/guava
51,352
javadoc
false