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
indexOf
@Override public int indexOf(Advisor advisor) { Assert.notNull(advisor, "Advisor must not be null"); return this.advisors.indexOf(advisor); }
Remove a proxied interface. <p>Does nothing if the given interface isn't proxied. @param ifc the interface to remove from the proxy @return {@code true} if the interface was removed; {@code false} if the interface was not found and hence could not be removed
java
spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java
348
[ "advisor" ]
true
1
7.04
spring-projects/spring-framework
59,386
javadoc
false
tryUpdatingPreferredReadReplica
public synchronized boolean tryUpdatingPreferredReadReplica(TopicPartition tp, int preferredReadReplicaId, LongSupplier timeMs) { final TopicPartitionState state = assignedStateOrNull(tp); ...
Tries to set the preferred read replica with a lease timeout. After this time, the replica will no longer be valid and {@link #preferredReadReplica(TopicPartition, long)} will return an empty result. If the preferred replica of the partition could not be updated (e.g. because the partition is not assigned) this method ...
java
clients/src/main/java/org/apache/kafka/clients/consumer/internals/SubscriptionState.java
733
[ "tp", "preferredReadReplicaId", "timeMs" ]
true
2
7.92
apache/kafka
31,560
javadoc
false
baseHasIn
function baseHasIn(object, key) { return object != null && key in Object(object); }
The base implementation of `_.hasIn` without support for deep paths. @private @param {Object} [object] The object to query. @param {Array|string} key The key to check. @returns {boolean} Returns `true` if `key` exists, else `false`.
javascript
lodash.js
3,147
[ "object", "key" ]
false
2
6
lodash/lodash
61,490
jsdoc
false
default_dtypes
def default_dtypes(self, *, device=None): """ The default data types used for new PyTorch arrays. Parameters ---------- device : Device, optional The device to get the default data types for. Unused for PyTorch, as all devices use the same default dtypes....
The default data types used for new PyTorch arrays. Parameters ---------- device : Device, optional The device to get the default data types for. Unused for PyTorch, as all devices use the same default dtypes. Returns ------- dtypes : dict A dictionary describing the default data types used for new PyTorc...
python
sklearn/externals/array_api_compat/torch/_info.py
126
[ "self", "device" ]
false
2
7.2
scikit-learn/scikit-learn
64,340
numpy
false
getKeyParameters
public CacheInvocationParameter[] getKeyParameters(@Nullable Object... values) { List<CacheInvocationParameter> result = new ArrayList<>(); for (CacheParameterDetail keyParameterDetail : this.keyParameterDetails) { int parameterPosition = keyParameterDetail.getParameterPosition(); if (parameterPosition >= val...
Return the {@link CacheInvocationParameter} for the parameters that are to be used to compute the key. <p>Per the spec, if some method parameters are annotated with {@link javax.cache.annotation.CacheKey}, only those parameters should be part of the key. If none are annotated, all parameters except the parameter annota...
java
spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractJCacheKeyOperation.java
79
[]
true
2
7.44
spring-projects/spring-framework
59,386
javadoc
false
get_params
def get_params(self, deep=True): """Get parameters of this kernel. Parameters ---------- deep : bool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns ------- params...
Get parameters of this kernel. Parameters ---------- deep : bool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns ------- params : dict Parameter names mapped to their values.
python
sklearn/gaussian_process/kernels.py
178
[ "self", "deep" ]
false
7
6.08
scikit-learn/scikit-learn
64,340
numpy
false
put
public JSONArray put(boolean value) { this.values.add(value); return this; }
Appends {@code value} to the end of this array. @param value the value @return this array.
java
cli/spring-boot-cli/src/json-shade/java/org/springframework/boot/cli/json/JSONArray.java
133
[ "value" ]
JSONArray
true
1
6.96
spring-projects/spring-boot
79,428
javadoc
false
getOrder
public int getOrder(String beanName, Object beanInstance) { OrderComparator comparator = (getDependencyComparator() instanceof OrderComparator orderComparator ? orderComparator : OrderComparator.INSTANCE); return comparator.getOrder(beanInstance, new FactoryAwareOrderSourceProvider(Collections.singletonMap(...
Public method to determine the applicable order value for a given bean. @param beanName the name of the bean @param beanInstance the bean instance to check @return the corresponding order value (default is {@link Ordered#LOWEST_PRECEDENCE}) @since 7.0 @see #getOrder(String)
java
spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java
2,375
[ "beanName", "beanInstance" ]
true
2
7.44
spring-projects/spring-framework
59,386
javadoc
false
humanReadable
public boolean humanReadable() { return this.humanReadable; }
@return the value of the "human readable" flag. When the value is equal to true, some types of values are written in a format easier to read for a human.
java
libs/x-content/src/main/java/org/elasticsearch/xcontent/XContentBuilder.java
323
[]
true
1
6.96
elastic/elasticsearch
75,680
javadoc
false
matches
public static boolean matches(MethodMatcher mm, Method method, Class<?> targetClass, boolean hasIntroductions) { Assert.notNull(mm, "MethodMatcher must not be null"); return (mm instanceof IntroductionAwareMethodMatcher iamm ? iamm.matches(method, targetClass, hasIntroductions) : mm.matches(method, targetCl...
Apply the given MethodMatcher to the given Method, supporting an {@link org.springframework.aop.IntroductionAwareMethodMatcher} (if applicable). @param mm the MethodMatcher to apply (may be an IntroductionAwareMethodMatcher) @param method the candidate method @param targetClass the target class @param hasIntroductions ...
java
spring-aop/src/main/java/org/springframework/aop/support/MethodMatchers.java
109
[ "mm", "method", "targetClass", "hasIntroductions" ]
true
2
7.44
spring-projects/spring-framework
59,386
javadoc
false
_nan_mask
def _nan_mask(a, out=None): """ Parameters ---------- a : array-like Input array with at least 1 dimension. out : ndarray, optional Alternate output array in which to place the result. The default is ``None``; if provided, it must have the same shape as the expected ...
Parameters ---------- a : array-like Input array with at least 1 dimension. out : ndarray, optional Alternate output array in which to place the result. The default is ``None``; if provided, it must have the same shape as the expected output and will prevent the allocation of a new array. Returns ----...
python
numpy/lib/_nanfunctions_impl.py
43
[ "a", "out" ]
false
2
6.24
numpy/numpy
31,054
numpy
false
meanBy
function meanBy(array, iteratee) { return baseMean(array, getIteratee(iteratee, 2)); }
This method is like `_.mean` except that it accepts `iteratee` which is invoked for each element in `array` to generate the value to be averaged. The iteratee is invoked with one argument: (value). @static @memberOf _ @since 4.7.0 @category Math @param {Array} array The array to iterate over. @param {Function} [iterate...
javascript
lodash.js
16,491
[ "array", "iteratee" ]
false
1
6.24
lodash/lodash
61,490
jsdoc
false
toString
@Override public String toString() { ToStringCreator creator = new ToStringCreator(this); creator.append("type", this.type); creator.append("value", (this.value != null) ? "provided" : "none"); creator.append("annotations", this.annotations); creator.append("bindMethod", this.bindMethod); return creator.to...
Returns the {@link BindMethod method} to be used to bind this bindable, or {@code null} if no specific binding method is required. @return the bind method or {@code null} @since 3.0.8
java
core/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/Bindable.java
164
[]
String
true
2
8.08
spring-projects/spring-boot
79,428
javadoc
false
check_for_bucket
def check_for_bucket(self, bucket_name: str | None = None) -> bool: """ Check if bucket_name exists. .. seealso:: - :external+boto3:py:meth:`S3.Client.head_bucket` :param bucket_name: the name of the bucket :return: True if it exists and False if not. """ ...
Check if bucket_name exists. .. seealso:: - :external+boto3:py:meth:`S3.Client.head_bucket` :param bucket_name: the name of the bucket :return: True if it exists and False if not.
python
providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py
296
[ "self", "bucket_name" ]
bool
true
3
7.76
apache/airflow
43,597
sphinx
false
create_multiarch_bundle
def create_multiarch_bundle(code_objects: dict, output_bundle_path: str) -> bool: """ Bundle multiple architecture code objects into a single multi-arch bundle. Uses clang-offload-bundler to create a fat binary that HIP runtime can load. The runtime automatically selects the correct architecture at loa...
Bundle multiple architecture code objects into a single multi-arch bundle. Uses clang-offload-bundler to create a fat binary that HIP runtime can load. The runtime automatically selects the correct architecture at load time. Args: code_objects: Dict mapping architecture to code object path output_bundle_path:...
python
torch/_inductor/rocm_multiarch_utils.py
147
[ "code_objects", "output_bundle_path" ]
bool
true
7
7.6
pytorch/pytorch
96,034
google
false
load_file
def load_file( self, filename: Path | str, key: str, bucket_name: str | None = None, replace: bool = False, encrypt: bool = False, gzip: bool = False, acl_policy: str | None = None, ) -> None: """ Load a local file to S3. .. se...
Load a local file to S3. .. seealso:: - :external+boto3:py:meth:`S3.Client.upload_file` :param filename: path to the file to load. :param key: S3 key that will point to the file :param bucket_name: Name of the bucket in which to store the file :param replace: A flag to decide whether or not to overwrite the key ...
python
providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py
1,172
[ "self", "filename", "key", "bucket_name", "replace", "encrypt", "gzip", "acl_policy" ]
None
true
7
6.8
apache/airflow
43,597
sphinx
false
get_variable
def get_variable(self, key: str, team_name: str | None = None) -> str | None: """ Get Airflow Variable. :param key: Variable Key :param team_name: Team name associated to the task trying to access the variable (if any) :return: Variable Value """ if self.variable...
Get Airflow Variable. :param key: Variable Key :param team_name: Team name associated to the task trying to access the variable (if any) :return: Variable Value
python
providers/amazon/src/airflow/providers/amazon/aws/secrets/secrets_manager.py
228
[ "self", "key", "team_name" ]
str | None
true
2
7.92
apache/airflow
43,597
sphinx
false
toString
@Override public String toString() { try { return this.file.getCanonicalPath(); } catch (IOException ex) { throw new IllegalStateException(ex); } }
Create a new {@link ProcessBuilder} that will run with the Java executable. @param arguments the command arguments @return a {@link ProcessBuilder}
java
loader/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JavaExecutable.java
61
[]
String
true
2
7.44
spring-projects/spring-boot
79,428
javadoc
false
create
public static <T extends @Nullable Object> BloomFilter<T> create( Funnel<? super T> funnel, int expectedInsertions, double fpp) { return create(funnel, (long) expectedInsertions, fpp); }
Creates a {@link BloomFilter} with the expected number of insertions and expected false positive probability. <p>Note that overflowing a {@code BloomFilter} with significantly more elements than specified, will result in its saturation, and a sharp deterioration of its false positive probability. <p>The constructed {@c...
java
android/guava/src/com/google/common/hash/BloomFilter.java
396
[ "funnel", "expectedInsertions", "fpp" ]
true
1
6.48
google/guava
51,352
javadoc
false
equals
@Override public boolean equals(@Nullable Object other) { return (this == other || (other instanceof AnnotationClassFilter otherCf && this.annotationType.equals(otherCf.annotationType) && this.checkInherited == otherCf.checkInherited)); }
Create a new AnnotationClassFilter for the given annotation type. @param annotationType the annotation type to look for @param checkInherited whether to also check the superclasses and interfaces as well as meta-annotations for the annotation type (i.e. whether to use {@link AnnotatedElementUtils#hasAnnotation} semanti...
java
spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationClassFilter.java
70
[ "other" ]
true
4
6.24
spring-projects/spring-framework
59,386
javadoc
false
countNumberOfUnboundAnnotationArguments
private int countNumberOfUnboundAnnotationArguments() { int count = 0; for (int i = 0; i < this.argumentTypes.length; i++) { if (isUnbound(i) && isSubtypeOf(Annotation.class, i)) { count++; } } return count; }
Return {@code true} if the given argument type is a subclass of the given supertype.
java
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java
699
[]
true
4
7.04
spring-projects/spring-framework
59,386
javadoc
false
iterator
public static Iterator<?> iterator(final Object calendar, final int rangeStyle) { Objects.requireNonNull(calendar, "calendar"); if (calendar instanceof Date) { return iterator((Date) calendar, rangeStyle); } if (calendar instanceof Calendar) { return iterator((Cal...
Constructs an {@link Iterator} over each day in a date range defined by a focus date and range style. <p>For instance, passing Thursday, July 4, 2002 and a {@code RANGE_MONTH_SUNDAY} will return an {@link Iterator} that starts with Sunday, June 30, 2002 and ends with Saturday, August 3, 2002, returning a Calendar insta...
java
src/main/java/org/apache/commons/lang3/time/DateUtils.java
1,087
[ "calendar", "rangeStyle" ]
true
3
8.08
apache/commons-lang
2,896
javadoc
false
setNameFormat
@CanIgnoreReturnValue public ThreadFactoryBuilder setNameFormat(String nameFormat) { String unused = format(nameFormat, 0); // fail fast if the format is bad or null this.nameFormat = nameFormat; return this; }
Sets the naming format to use when naming threads ({@link Thread#setName}) which are created with this ThreadFactory. <p><b>Java 21+ users:</b> use {@link Thread.Builder#name(String, long)} instead. Note that {@link #setNameFormat} accepts a thread name <i>format string</i> (e.g., {@code threadFactoryBuilder.setNameFor...
java
android/guava/src/com/google/common/util/concurrent/ThreadFactoryBuilder.java
88
[ "nameFormat" ]
ThreadFactoryBuilder
true
1
6.4
google/guava
51,352
javadoc
false
when
default ValueExtractor<T> when(Predicate<? super @Nullable T> predicate) { return (instance) -> test(extract(instance), predicate); }
Only extract when the given predicate matches. @param predicate the predicate to test @return a new {@link ValueExtractor}
java
core/spring-boot/src/main/java/org/springframework/boot/json/JsonWriter.java
712
[ "predicate" ]
true
1
6.48
spring-projects/spring-boot
79,428
javadoc
false
_fill_limit_area_1d
def _fill_limit_area_1d( mask: npt.NDArray[np.bool_], limit_area: Literal["outside", "inside"] ) -> None: """Prepare 1d mask for ffill/bfill with limit_area. Caller is responsible for checking at least one value of mask is False. When called, mask will no longer faithfully represent when the corres...
Prepare 1d mask for ffill/bfill with limit_area. Caller is responsible for checking at least one value of mask is False. When called, mask will no longer faithfully represent when the corresponding are NA or not. Parameters ---------- mask : np.ndarray[bool, ndim=1] Mask representing NA values when filling. limit...
python
pandas/core/missing.py
966
[ "mask", "limit_area" ]
None
true
3
6.72
pandas-dev/pandas
47,362
numpy
false
parseList
List<Object> parseList(@Nullable String json) throws JsonParseException;
Parse the specified JSON string into a List. @param json the JSON to parse @return the parsed JSON as a list @throws JsonParseException if the JSON cannot be parsed
java
core/spring-boot/src/main/java/org/springframework/boot/json/JsonParser.java
50
[ "json" ]
true
1
6.32
spring-projects/spring-boot
79,428
javadoc
false
listConsumerGroups
@Deprecated(since = "4.1", forRemoval = true) ListConsumerGroupsResult listConsumerGroups(ListConsumerGroupsOptions options);
List the consumer groups available in the cluster. @deprecated Since 4.1. Use {@link Admin#listGroups(ListGroupsOptions)} instead. @param options The options to use when listing the consumer groups. @return The ListConsumerGroupsResult.
java
clients/src/main/java/org/apache/kafka/clients/admin/Admin.java
887
[ "options" ]
ListConsumerGroupsResult
true
1
6
apache/kafka
31,560
javadoc
false
printStackTrace
@Override public void printStackTrace(PrintWriter pw) { if (ObjectUtils.isEmpty(this.messageExceptions)) { super.printStackTrace(pw); } else { pw.println(super.toString() + "; message exception details (" + this.messageExceptions.length + ") are:"); for (int i = 0; i < this.messageExceptions.length...
Return an array with thrown message exceptions. <p>Note that a general mail server connection failure will not result in failed messages being returned here: A message will only be contained here if actually sending it was attempted but failed. @return the array of thrown message exceptions, or an empty array if no fai...
java
spring-context-support/src/main/java/org/springframework/mail/MailSendException.java
182
[ "pw" ]
void
true
3
6.88
spring-projects/spring-framework
59,386
javadoc
false
getLibFileFromReference
function getLibFileFromReference(ref: FileReference) { const libFileName = getLibFileNameFromLibReference(ref); const actualFileName = libFileName && resolvedLibReferences?.get(libFileName)?.actual; return actualFileName !== undefined ? getSourceFile(actualFileName) : undefined; }
@returns The line index marked as preceding the diagnostic, or -1 if none was.
typescript
src/compiler/program.ts
3,416
[ "ref" ]
false
3
6.24
microsoft/TypeScript
107,154
jsdoc
false
topicNameValues
public Map<String, KafkaFuture<Void>> topicNameValues() { return nameFutures; }
Use when {@link Admin#deleteTopics(TopicCollection, DeleteTopicsOptions)} used a TopicNameCollection @return a map from topic names to futures which can be used to check the status of individual deletions if the deleteTopics request used topic names. Otherwise return null.
java
clients/src/main/java/org/apache/kafka/clients/admin/DeleteTopicsResult.java
65
[]
true
1
6
apache/kafka
31,560
javadoc
false
max
public abstract double max(double q, double compression, double n);
Computes the maximum relative size a cluster can have at quantile q. Note that exactly where within the range spanned by a cluster that q should be isn't clear. That means that this function usually has to be taken at multiple points and the smallest value used. <p> Note that this is the relative size of a cluster. To ...
java
libs/tdigest/src/main/java/org/elasticsearch/tdigest/ScaleFunction.java
543
[ "q", "compression", "n" ]
true
1
6.64
elastic/elasticsearch
75,680
javadoc
false
nop
@SuppressWarnings("unchecked") static <T, E extends Throwable> FailableToBooleanFunction<T, E> nop() { return NOP; }
Gets the NOP singleton. @param <T> the type of the argument to the function @param <E> The kind of thrown exception or error. @return The NOP singleton.
java
src/main/java/org/apache/commons/lang3/function/FailableToBooleanFunction.java
41
[]
true
1
6.96
apache/commons-lang
2,896
javadoc
false
getAllLoggers
private Map<String, LoggerConfig> getAllLoggers() { Map<String, LoggerConfig> loggers = new LinkedHashMap<>(); for (Logger logger : getLoggerContext().getLoggers()) { addLogger(loggers, logger.getName()); } getLoggerContext().getConfiguration().getLoggers().keySet().forEach((name) -> addLogger(loggers, 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
404
[]
true
1
6.08
spring-projects/spring-boot
79,428
javadoc
false
_replace_coerce
def _replace_coerce( self, to_replace, value, mask: npt.NDArray[np.bool_], inplace: bool = True, regex: bool = False, ) -> list[Block]: """ Replace value corresponding to the given boolean array with another value. Parameters -...
Replace value corresponding to the given boolean array with another value. Parameters ---------- to_replace : object or pattern Scalar to replace or regular expression to match. value : object Replacement object. mask : np.ndarray[bool] True indicate corresponding element is ignored. inplace : bool, defaul...
python
pandas/core/internals/blocks.py
882
[ "self", "to_replace", "value", "mask", "inplace", "regex" ]
list[Block]
true
9
6.32
pandas-dev/pandas
47,362
numpy
false
_generate_kernel_call_helper
def _generate_kernel_call_helper( self, kernel_name: str, call_args, *, device=None, triton=True, arg_types=None, raw_keys=None, raw_args=None, triton_meta=None, graph_name="", original_fxnode_name=None, ): """ ...
Generates kernel call code. triton: Defines whether the GPU backend uses Triton for codegen. Otherwise it uses the CUDA language for codegen. Only valid when cuda == True.
python
torch/_inductor/codegen/cpp_wrapper_cpu.py
135
[ "self", "kernel_name", "call_args", "device", "triton", "arg_types", "raw_keys", "raw_args", "triton_meta", "graph_name", "original_fxnode_name" ]
true
7
6.88
pytorch/pytorch
96,034
unknown
false
left
public static String left(final String str, final int len) { if (str == null) { return null; } if (len < 0) { return EMPTY; } if (str.length() <= len) { return str; } return str.substring(0, len); }
Gets the leftmost {@code len} characters of a String. <p> If {@code len} characters are not available, or the String is {@code null}, the String will be returned without an exception. An empty String is returned if len is negative. </p> <pre> StringUtils.left(null, *) = null StringUtils.left(*, -ve) = "" StringU...
java
src/main/java/org/apache/commons/lang3/StringUtils.java
5,058
[ "str", "len" ]
String
true
4
8.08
apache/commons-lang
2,896
javadoc
false
getNodesForSpan
function getNodesForSpan(file: SourceFile, span: TextSpan): Node[] | undefined { // Span is the whole file if (textSpanContainsTextRange(span, file)) { return undefined; } const endToken = findTokenOnLeftOfPosition(file, textSpanEnd(span)) || file; const enclo...
Gets nodes that overlap the given span to be partially checked. @returns an array of nodes that overlap the span and are source element nodes (c.f. {@link isSourceElement}), or undefined if a partial check would be the same as a whole file check.
typescript
src/services/services.ts
2,128
[ "file", "span" ]
true
5
7.04
microsoft/TypeScript
107,154
jsdoc
false
toBeStarted
private boolean toBeStarted(String beanName, Lifecycle bean) { Set<String> stoppedBeans = this.stoppedBeans; return (stoppedBeans != null ? stoppedBeans.contains(beanName) : (!(bean instanceof SmartLifecycle smartLifecycle) || smartLifecycle.isAutoStartup())); }
Start the specified bean as part of the given set of Lifecycle beans, making sure that any beans that it depends on are started first. @param lifecycleBeans a Map with bean name as key and Lifecycle instance as value @param beanName the name of the bean to start
java
spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java
430
[ "beanName", "bean" ]
true
3
6.72
spring-projects/spring-framework
59,386
javadoc
false
_acquire_lock_with_timeout
def _acquire_lock_with_timeout( lock: Lock, timeout: float | None = None, ) -> Generator[None, None, None]: """Context manager that safely acquires a threading.Lock with timeout and automatically releases it. This function provides a safe way to acquire a lock with timeout support, ensuring the loc...
Context manager that safely acquires a threading.Lock with timeout and automatically releases it. This function provides a safe way to acquire a lock with timeout support, ensuring the lock is always released even if an exception occurs during execution. Args: lock: The threading.Lock object to acquire timeou...
python
torch/_inductor/runtime/caching/locks.py
48
[ "lock", "timeout" ]
Generator[None, None, None]
true
1
7.12
pytorch/pytorch
96,034
google
false
get_printoptions
def get_printoptions(): """ Return the current print options. Returns ------- print_opts : dict Dictionary of current print options with keys - precision : int - threshold : int - edgeitems : int - linewidth : int - suppress : bool - nanstr :...
Return the current print options. Returns ------- print_opts : dict Dictionary of current print options with keys - precision : int - threshold : int - edgeitems : int - linewidth : int - suppress : bool - nanstr : str - infstr : str - sign : str - formatter : dict of callables...
python
numpy/_core/arrayprint.py
336
[]
false
1
6.32
numpy/numpy
31,054
unknown
false
getDeclarationDiagnosticsForFileNoCache
function getDeclarationDiagnosticsForFileNoCache(sourceFile: SourceFile, cancellationToken: CancellationToken | undefined): readonly DiagnosticWithLocation[] { return runWithCancellationToken(() => { const resolver = getTypeChecker().getEmitResolver(sourceFile, cancellationToken); // ...
@returns The line index marked as preceding the diagnostic, or -1 if none was.
typescript
src/compiler/program.ts
3,250
[ "sourceFile", "cancellationToken" ]
true
2
7.2
microsoft/TypeScript
107,154
jsdoc
false
newCopyOnWriteArraySet
@J2ktIncompatible @GwtIncompatible // CopyOnWriteArraySet public static <E extends @Nullable Object> CopyOnWriteArraySet<E> newCopyOnWriteArraySet( Iterable<? extends E> elements) { // We copy elements to an ArrayList first, rather than incurring the // quadratic cost of adding them to the COWAS direc...
Creates a {@code CopyOnWriteArraySet} instance containing the given elements. @param elements the elements that the set should contain, in order @return a new {@code CopyOnWriteArraySet} containing those elements @since 12.0
java
android/guava/src/com/google/common/collect/Sets.java
479
[ "elements" ]
true
2
7.44
google/guava
51,352
javadoc
false
getObjectName
@Override public ObjectName getObjectName(Object managedBean, @Nullable String beanKey) throws MalformedObjectNameException { ObjectName name = super.getObjectName(managedBean, beanKey); if (this.ensureUniqueRuntimeObjectNames) { return JmxUtils.appendIdentityToObjectName(name, managedBean); } if (parentCon...
Set if unique runtime object names should be ensured. @param ensureUniqueRuntimeObjectNames {@code true} if unique names should be ensured.
java
core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jmx/ParentAwareNamingStrategy.java
68
[ "managedBean", "beanKey" ]
ObjectName
true
3
6.24
spring-projects/spring-boot
79,428
javadoc
false
cleanUpJavaDoc
private String cleanUpJavaDoc(String javadoc) { StringBuilder result = new StringBuilder(javadoc.length()); char lastChar = '.'; for (int i = 0; i < javadoc.length(); i++) { char ch = javadoc.charAt(i); boolean repeatedSpace = ch == ' ' && lastChar == ' '; if (ch != '\r' && ch != '\n' && !repeatedSpace) ...
Return the {@link PrimitiveType} of the specified type or {@code null} if the type does not represent a valid wrapper type. @param typeMirror a type @return the primitive type or {@code null} if the type is not a wrapper type
java
configuration-metadata/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/TypeUtils.java
270
[ "javadoc" ]
String
true
6
7.92
spring-projects/spring-boot
79,428
javadoc
false
_unbox
def _unbox(self, other) -> np.int64 | np.datetime64 | np.timedelta64 | np.ndarray: """ Unbox either a scalar with _unbox_scalar or an instance of our own type. """ if lib.is_scalar(other): other = self._unbox_scalar(other) else: # same type as self ...
Unbox either a scalar with _unbox_scalar or an instance of our own type.
python
pandas/core/arrays/datetimelike.py
738
[ "self", "other" ]
np.int64 | np.datetime64 | np.timedelta64 | np.ndarray
true
3
6
pandas-dev/pandas
47,362
unknown
false
add
protected void add(final String str) { if (str == null) { return; } final int len = str.length(); int pos = 0; while (pos < len) { final int remainder = len - pos; if (remainder >= 4 && str.charAt(pos) == '^' && str.charAt(pos + 2) == '-') { ...
Add a set definition string to the {@link CharSet}. @param str set definition string
java
src/main/java/org/apache/commons/lang3/CharSet.java
184
[ "str" ]
void
true
10
6.88
apache/commons-lang
2,896
javadoc
false
polynomial_kernel
def polynomial_kernel(X, Y=None, degree=3, gamma=None, coef0=1): """ Compute the polynomial kernel between X and Y. .. code-block:: text K(X, Y) = (gamma <X, Y> + coef0) ^ degree Read more in the :ref:`User Guide <polynomial_kernel>`. Parameters ---------- X : {array-like, sparse...
Compute the polynomial kernel between X and Y. .. code-block:: text K(X, Y) = (gamma <X, Y> + coef0) ^ degree Read more in the :ref:`User Guide <polynomial_kernel>`. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples_X, n_features) A feature array. Y : {array-like, sparse matrix} of ...
python
sklearn/metrics/pairwise.py
1,444
[ "X", "Y", "degree", "gamma", "coef0" ]
false
2
7.52
scikit-learn/scikit-learn
64,340
numpy
false
roots
def roots(p): """ Return the roots of a polynomial with coefficients given in p. .. note:: This forms part of the old polynomial API. Since version 1.4, the new polynomial API defined in `numpy.polynomial` is preferred. A summary of the differences can be found in the :doc:`tran...
Return the roots of a polynomial with coefficients given in p. .. note:: This forms part of the old polynomial API. Since version 1.4, the new polynomial API defined in `numpy.polynomial` is preferred. A summary of the differences can be found in the :doc:`transition guide </reference/routines.polynomials>...
python
numpy/lib/_polynomial_impl.py
171
[ "p" ]
false
6
7.6
numpy/numpy
31,054
numpy
false
removeAllOccurrences
public static int[] removeAllOccurrences(final int[] array, final int element) { return (int[]) removeAt(array, indexesOf(array, element)); }
Removes the occurrences of the specified element from the specified int array. <p> All subsequent elements are shifted to the left (subtracts one from their indices). If the array doesn't contain such an element, no elements are removed from the array. {@code null} will be returned if the input array is {@code null}. <...
java
src/main/java/org/apache/commons/lang3/ArrayUtils.java
5,521
[ "array", "element" ]
true
1
6.96
apache/commons-lang
2,896
javadoc
false
erroneousCompletionException
private UnsupportedOperationException erroneousCompletionException() { return new UnsupportedOperationException("User code should not complete futures returned from Kafka clients"); }
Completes this future exceptionally. For internal use by the Kafka clients, not by user code. @param throwable the exception. @return {@code true} if this invocation caused this CompletableFuture to transition to a completed state, else {@code false}
java
clients/src/main/java/org/apache/kafka/common/internals/KafkaCompletableFuture.java
92
[]
UnsupportedOperationException
true
1
6.64
apache/kafka
31,560
javadoc
false
enqueueCopyImage
inline cl_int enqueueCopyImage( const Image& src, const Image& dst, const size_t<3>& src_origin, const size_t<3>& dst_origin, const size_t<3>& region, const VECTOR_CLASS<Event>* events = NULL, Event* event = NULL) { cl_int error; CommandQueue queue = CommandQueue::getDefault(&error);...
Blocking copy operation between iterators and a buffer.
cpp
3rdparty/include/opencl/1.2/CL/cl.hpp
6,456
[]
true
2
6.4
opencv/opencv
85,374
doxygen
false
param_parse
def param_parse(d, params): """Recursively parse array dimensions. Parses the declaration of an array variable or parameter `dimension` keyword, and is called recursively if the dimension for this array is a previously defined parameter (found in `params`). Parameters ---------- d : st...
Recursively parse array dimensions. Parses the declaration of an array variable or parameter `dimension` keyword, and is called recursively if the dimension for this array is a previously defined parameter (found in `params`). Parameters ---------- d : str Fortran expression describing the dimension of an array. ...
python
numpy/f2py/crackfortran.py
3,026
[ "d", "params" ]
false
6
7.44
numpy/numpy
31,054
numpy
false
getNanoTime
public long getNanoTime() { switch (runningState) { case STOPPED: case SUSPENDED: return stopTimeNanos - startTimeNanos; case UNSTARTED: return 0; case RUNNING: return System.nanoTime() - startTimeNanos; default: break; ...
Gets the <em>elapsed</em> time in nanoseconds. <p> This is either the time between the start and the moment this method is called, or the amount of time between start and stop. </p> @return the <em>elapsed</em> time in nanoseconds. @see System#nanoTime() @since 3.0
java
src/main/java/org/apache/commons/lang3/time/StopWatch.java
395
[]
true
1
6.88
apache/commons-lang
2,896
javadoc
false
removeAllOccurences
@Deprecated public static boolean[] removeAllOccurences(final boolean[] array, final boolean element) { return (boolean[]) removeAt(array, indexesOf(array, element)); }
Removes the occurrences of the specified element from the specified boolean array. <p> All subsequent elements are shifted to the left (subtracts one from their indices). If the array doesn't contain such an element, no elements are removed from the array. {@code null} will be returned if the input array is {@code null...
java
src/main/java/org/apache/commons/lang3/ArrayUtils.java
5,265
[ "array", "element" ]
true
1
6.64
apache/commons-lang
2,896
javadoc
false
all
public KafkaFuture<Void> all() { final KafkaFutureImpl<Void> result = new KafkaFutureImpl<>(); this.future.whenComplete((topicResults, throwable) -> { if (throwable != null) { result.completeExceptionally(throwable); } else { for (String topic : t...
Return a future which succeeds only if all the deletions succeed. If not, the first topic error shall be returned.
java
clients/src/main/java/org/apache/kafka/clients/admin/DeleteShareGroupOffsetsResult.java
43
[]
true
3
7.04
apache/kafka
31,560
javadoc
false
maybeSetMetadataError
private void maybeSetMetadataError(Cluster cluster) { clearRecoverableErrors(); checkInvalidTopics(cluster); checkUnauthorizedTopics(cluster); }
Updates the partition-leadership info in the metadata. Update is done by merging existing metadata with the input leader information and nodes. This is called whenever partition-leadership updates are returned in a response from broker(ex - ProduceResponse & FetchResponse). Note that the updates via Metadata RPC are ha...
java
clients/src/main/java/org/apache/kafka/clients/Metadata.java
463
[ "cluster" ]
void
true
1
6.56
apache/kafka
31,560
javadoc
false
asof
def asof(self, label): """ Return the label from the index, or, if not present, the previous one. Assuming that the index is sorted, return the passed index label if it is in the index, or return the previous index label if the passed one is not in the index. Parameters...
Return the label from the index, or, if not present, the previous one. Assuming that the index is sorted, return the passed index label if it is in the index, or return the previous index label if the passed one is not in the index. Parameters ---------- label : object The label up to which the method returns the...
python
pandas/core/indexes/base.py
5,640
[ "self", "label" ]
false
6
7.76
pandas-dev/pandas
47,362
numpy
false
toString
public static String toString(final Type type) { Objects.requireNonNull(type, "type"); if (type instanceof Class<?>) { return classToString((Class<?>) type); } if (type instanceof ParameterizedType) { return parameterizedTypeToString((ParameterizedType) type); ...
Formats a given type as a Java-esque String. @param type the type to create a String representation for, not {@code null}. @return String. @throws NullPointerException if {@code type} is {@code null}. @since 3.2
java
src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
1,537
[ "type" ]
String
true
6
7.92
apache/commons-lang
2,896
javadoc
false
splitWorker
private static String[] splitWorker(final String str, final char separatorChar, final boolean preserveAllTokens) { // Performance tuned for 2.0 (JDK1.4) if (str == null) { return null; } final int len = str.length(); if (len == 0) { return ArrayUtils.EMPTY...
Performs the logic for the {@code split} and {@code splitPreserveAllTokens} methods that do not return a maximum array length. @param str the String to parse, may be {@code null}. @param separatorChar the separate character. @param preserveAllTokens if {@code true}, adjacent separators are treated as ...
java
src/main/java/org/apache/commons/lang3/StringUtils.java
7,562
[ "str", "separatorChar", "preserveAllTokens" ]
true
10
8.08
apache/commons-lang
2,896
javadoc
false
allByBrokerId
public KafkaFuture<Map<Integer, Collection<TransactionListing>>> allByBrokerId() { KafkaFutureImpl<Map<Integer, Collection<TransactionListing>>> allFuture = new KafkaFutureImpl<>(); Map<Integer, Collection<TransactionListing>> allListingsMap = new HashMap<>(); future.whenComplete((map, topLevel...
Get all transaction listings in a map which is keyed by the ID of respective broker that is currently managing them. If any of the underlying requests fail, then the future returned from this method will also fail with the first encountered error. @return A future containing a map from the broker ID to the transactions...
java
clients/src/main/java/org/apache/kafka/clients/admin/ListTransactionsResult.java
92
[]
true
5
7.92
apache/kafka
31,560
javadoc
false
ediff1d
def ediff1d(arr, to_end=None, to_begin=None): """ Compute the differences between consecutive elements of an array. This function is the equivalent of `numpy.ediff1d` that takes masked values into account, see `numpy.ediff1d` for details. See Also -------- numpy.ediff1d : Equivalent functi...
Compute the differences between consecutive elements of an array. This function is the equivalent of `numpy.ediff1d` that takes masked values into account, see `numpy.ediff1d` for details. See Also -------- numpy.ediff1d : Equivalent function for ndarrays. Examples -------- >>> import numpy as np >>> arr = np.ma.arr...
python
numpy/ma/extras.py
1,229
[ "arr", "to_end", "to_begin" ]
false
4
6.16
numpy/numpy
31,054
unknown
false
__call__
def __call__(self, X, Y=None, eval_gradient=False): """Return the kernel k(X, Y) and optionally its gradient. Parameters ---------- X : ndarray of shape (n_samples_X, n_features) Left argument of the returned kernel k(X, Y) Y : ndarray of shape (n_samples_Y, n_featu...
Return the kernel k(X, Y) and optionally its gradient. Parameters ---------- X : ndarray of shape (n_samples_X, n_features) Left argument of the returned kernel k(X, Y) Y : ndarray of shape (n_samples_Y, n_features), default=None Right argument of the returned kernel k(X, Y). If None, k(X, X) if evaluated...
python
sklearn/gaussian_process/kernels.py
2,321
[ "self", "X", "Y", "eval_gradient" ]
false
6
6
scikit-learn/scikit-learn
64,340
numpy
false
password
@Nullable String password();
The password used when {@link KeyStore#setKeyEntry(String, java.security.Key, char[], java.security.cert.Certificate[]) setting key entries} in the {@link KeyStore}. @return the password
java
core/spring-boot/src/main/java/org/springframework/boot/ssl/pem/PemSslStore.java
59
[]
String
true
1
6
spring-projects/spring-boot
79,428
javadoc
false
forString
@CanIgnoreReturnValue // TODO(b/219820829): consider removing public static InetAddress forString(String ipString) { Scope scope = new Scope(); byte[] addr = ipStringToBytes(ipString, scope); // The argument was malformed, i.e. not an IP string literal. if (addr == null) { throw formatIllegalAr...
Returns the {@link InetAddress} having the given string representation. <p>This deliberately avoids all nameservice lookups (e.g. no DNS). <p>This method accepts non-ASCII digits, for example {@code "192.168.0.1"} (those are fullwidth characters). That is consistent with {@link InetAddress}, but not with various RFCs. ...
java
android/guava/src/com/google/common/net/InetAddresses.java
156
[ "ipString" ]
InetAddress
true
2
7.76
google/guava
51,352
javadoc
false
to_pickle
def to_pickle( obj: Any, filepath_or_buffer: FilePath | WriteBuffer[bytes], compression: CompressionOptions = "infer", protocol: int = pickle.HIGHEST_PROTOCOL, storage_options: StorageOptions | None = None, ) -> None: """ Pickle (serialize) object to file. Parameters ---------- ...
Pickle (serialize) object to file. Parameters ---------- obj : any object Any python object. filepath_or_buffer : str, path object, or file-like object String, path object (implementing ``os.PathLike[str]``), or file-like object implementing a binary ``write()`` function. Also accepts URL. URL has to b...
python
pandas/io/pickle.py
42
[ "obj", "filepath_or_buffer", "compression", "protocol", "storage_options" ]
None
true
2
8.4
pandas-dev/pandas
47,362
numpy
false
setupNetworkInspection
function setupNetworkInspection() { if (internalBinding('config').hasInspector && getOptionValue('--experimental-network-inspection')) { const { enable, disable, } = require('internal/inspector_network_tracking'); internalBinding('inspector').setupNetworkTracking(enable, disable); } }
Patch the process object with legacy properties and normalizations. Replace `process.argv[0]` with `process.execPath`, preserving the original `argv[0]` value as `process.argv0`. Replace `process.argv[1]` with the resolved absolute file path of the entry point, if found. @param {boolean} expandArgv1 - Whether to replac...
javascript
lib/internal/process/pre_execution.js
505
[]
false
3
6.8
nodejs/node
114,839
jsdoc
false
nunique
def nunique(self, axis: Axis = 0, dropna: bool = True) -> Series: """ Count number of distinct elements in specified axis. Return Series with number of distinct elements. Can ignore NaN values. Parameters ---------- axis : {0 or 'index', 1 or 'columns'}, default...
Count number of distinct elements in specified axis. Return Series with number of distinct elements. Can ignore NaN values. Parameters ---------- axis : {0 or 'index', 1 or 'columns'}, default 0 The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise. dropna : bool, default True Don't i...
python
pandas/core/frame.py
14,055
[ "self", "axis", "dropna" ]
Series
true
1
7.28
pandas-dev/pandas
47,362
numpy
false
_from_inferred_categories
def _from_inferred_categories( cls, inferred_categories, inferred_codes, dtype, true_values=None ) -> Self: """ Construct a Categorical from inferred values. For inferred categories (`dtype` is None) the categories are sorted. For explicit `dtype`, the `inferred_categories` ...
Construct a Categorical from inferred values. For inferred categories (`dtype` is None) the categories are sorted. For explicit `dtype`, the `inferred_categories` are cast to the appropriate type. Parameters ---------- inferred_categories : Index inferred_codes : Index dtype : CategoricalDtype or 'category' true_valu...
python
pandas/core/arrays/categorical.py
643
[ "cls", "inferred_categories", "inferred_codes", "dtype", "true_values" ]
Self
true
11
6.32
pandas-dev/pandas
47,362
numpy
false
getErrorReport
@Nullable String getErrorReport() { Map<String, List<PropertyMigration>> content = getContent(LegacyProperties::getUnsupported); if (content.isEmpty()) { return null; } StringBuilder report = new StringBuilder(); report.append(String .format("%nThe use of configuration keys that are no longer supported ...
Return a report for all the properties that are no longer supported. If no such properties were found, return {@code null}. @return a report with the configurations keys that are no longer supported
java
core/spring-boot-properties-migrator/src/main/java/org/springframework/boot/context/properties/migrator/PropertiesMigrationReport.java
65
[]
String
true
2
8.24
spring-projects/spring-boot
79,428
javadoc
false
generateCodeForConstructor
private CodeBlock generateCodeForConstructor(RegisteredBean registeredBean, Constructor<?> constructor) { ConstructorDescriptor descriptor = new ConstructorDescriptor( registeredBean.getBeanName(), constructor, registeredBean.getBeanClass()); Class<?> publicType = descriptor.publicType(); if (KOTLIN_REFLECT_...
Generate the instance supplier code. @param registeredBean the bean to handle @param instantiationDescriptor the executable to use to create the bean @return the generated code @since 6.1.7
java
spring-beans/src/main/java/org/springframework/beans/factory/aot/InstanceSupplierCodeGenerator.java
161
[ "registeredBean", "constructor" ]
CodeBlock
true
6
7.44
spring-projects/spring-framework
59,386
javadoc
false
compile
public static FilterPath[] compile(Set<String> filters) { if (filters == null || filters.isEmpty()) { return null; } FilterPathBuilder builder = new FilterPathBuilder(); for (String filter : filters) { if (filter != null) { filter = filter.trim();...
check if the name matches filter nodes if the name equals the filter node name, the node will add to nextFilters. if the filter node is a final node, it means the name matches the pattern, and return true if the name don't equal a final node, then return false, continue to check the inner filter node if current node is...
java
libs/x-content/src/main/java/org/elasticsearch/xcontent/support/filtering/FilterPath.java
208
[ "filters" ]
true
5
7.76
elastic/elasticsearch
75,680
javadoc
false
apply
public final void apply() { apply(null); }
Returns the {@link Console} to use. @return the {@link Console} to use @since 3.5.0
java
core/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperties.java
107
[]
void
true
1
6.8
spring-projects/spring-boot
79,428
javadoc
false
_raise_if_missing
def _raise_if_missing(self, key, indexer, axis_name: str_t) -> None: """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targete...
Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 in...
python
pandas/core/indexes/base.py
6,231
[ "self", "key", "indexer", "axis_name" ]
None
true
4
6.88
pandas-dev/pandas
47,362
numpy
false
toString
@Override public String toString() { if (toString == null) { toString = getNumerator() + "/" + getDenominator(); } return toString; }
Gets the fraction as a {@link String}. <p> The format used is '<em>numerator</em>/<em>denominator</em>' always. </p> @return a {@link String} form of the fraction
java
src/main/java/org/apache/commons/lang3/math/Fraction.java
916
[]
String
true
2
7.76
apache/commons-lang
2,896
javadoc
false
concat
public static ByteSource concat(Iterable<? extends ByteSource> sources) { return new ConcatenatedByteSource(sources); }
Concatenates multiple {@link ByteSource} instances into a single source. Streams returned from the source will contain the concatenated data from the streams of the underlying sources. <p>Only one underlying stream will be open at a time. Closing the concatenated stream will close the open underlying stream. @param sou...
java
android/guava/src/com/google/common/io/ByteSource.java
374
[ "sources" ]
ByteSource
true
1
6.64
google/guava
51,352
javadoc
false
ledoit_wolf_shrinkage
def ledoit_wolf_shrinkage(X, assume_centered=False, block_size=1000): """Estimate the shrunk Ledoit-Wolf covariance matrix. Read more in the :ref:`User Guide <shrunk_covariance>`. Parameters ---------- X : array-like of shape (n_samples, n_features) Data from which to compute the Ledoit-Wo...
Estimate the shrunk Ledoit-Wolf covariance matrix. Read more in the :ref:`User Guide <shrunk_covariance>`. Parameters ---------- X : array-like of shape (n_samples, n_features) Data from which to compute the Ledoit-Wolf shrunk covariance shrinkage. assume_centered : bool, default=False If True, data will not...
python
sklearn/covariance/_shrunk_covariance.py
297
[ "X", "assume_centered", "block_size" ]
false
10
7.12
scikit-learn/scikit-learn
64,340
numpy
false
errorCounts
@Override public Map<Errors, Integer> errorCounts() { return Collections.singletonMap(Errors.forCode(data.errorCode()), 1); }
The number of each type of error in the response, including {@link Errors#NONE} and top-level errors as well as more specifically scoped errors (such as topic or partition-level errors). @return A count of errors.
java
clients/src/main/java/org/apache/kafka/common/requests/AllocateProducerIdsResponse.java
48
[]
true
1
6.8
apache/kafka
31,560
javadoc
false
skipFully
public static void skipFully(Reader reader, long n) throws IOException { checkNotNull(reader); while (n > 0) { long amt = reader.skip(n); if (amt == 0) { throw new EOFException(); } n -= amt; } }
Discards {@code n} characters of data from the reader. This method will block until the full amount has been skipped. Does not close the reader. @param reader the reader to read from @param n the number of characters to skip @throws EOFException if this stream reaches the end before skipping all the characters @throws ...
java
android/guava/src/com/google/common/io/CharStreams.java
271
[ "reader", "n" ]
void
true
3
7.04
google/guava
51,352
javadoc
false
copyTo
void copyTo(DataBlock dataBlock, long pos, ZipEntry zipEntry) throws IOException { int fileNameLength = Short.toUnsignedInt(fileNameLength()); int extraLength = Short.toUnsignedInt(extraFieldLength()); int commentLength = Short.toUnsignedInt(fileCommentLength()); zipEntry.setMethod(Short.toUnsignedInt(compressi...
Copy values from this block to the given {@link ZipEntry}. @param dataBlock the source data block @param pos the position of this {@link ZipCentralDirectoryFileHeaderRecord} @param zipEntry the destination zip entry @throws IOException on I/O error
java
loader/spring-boot-loader/src/main/java/org/springframework/boot/loader/zip/ZipCentralDirectoryFileHeaderRecord.java
85
[ "dataBlock", "pos", "zipEntry" ]
void
true
3
6.24
spring-projects/spring-boot
79,428
javadoc
false
compile
def compile(pattern: str, base_dir: Path, definition_file: Path) -> _IgnoreRule | None: """Build an ignore rule from the supplied glob pattern and log a useful warning if it is invalid.""" relative_to: Path | None = None if pattern.strip() == "/": # "/" doesn't match anything in giti...
Build an ignore rule from the supplied glob pattern and log a useful warning if it is invalid.
python
airflow-core/src/airflow/utils/file.py
90
[ "pattern", "base_dir", "definition_file" ]
_IgnoreRule | None
true
4
6
apache/airflow
43,597
unknown
false
getMatchOutcome
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { if (context.getEnvironment().containsProperty(this.property)) { return ConditionOutcome.match(startConditionMessage().foundExactly("property " + this.property)); } return getResourceOutcome(context, m...
Create a new condition. @param name the name of the component @param property the configuration property @param resourceLocations default location(s) where the configuration file can be found if the configuration key is not specified @since 2.0.0
java
core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ResourceCondition.java
60
[ "context", "metadata" ]
ConditionOutcome
true
2
6.56
spring-projects/spring-boot
79,428
javadoc
false
duration
public long duration() { return duration; }
@return the number of {@link #timeUnit()} units this value contains
java
libs/core/src/main/java/org/elasticsearch/core/TimeValue.java
110
[]
true
1
6
elastic/elasticsearch
75,680
javadoc
false
awaitPendingRequests
public boolean awaitPendingRequests(Node node, Timer timer) { while (hasPendingRequests(node) && timer.notExpired()) { poll(timer); } return !hasPendingRequests(node); }
Block until all pending requests from the given node have finished. @param node The node to await requests from @param timer Timer bounding how long this method can block @return true If all requests finished, false if the timeout expired first
java
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkClient.java
353
[ "node", "timer" ]
true
3
8.24
apache/kafka
31,560
javadoc
false
containsEntryImpl
static <K extends @Nullable Object, V extends @Nullable Object> boolean containsEntryImpl( Collection<Entry<K, V>> c, @Nullable Object o) { if (!(o instanceof Entry)) { return false; } return c.contains(unmodifiableEntry((Entry<?, ?>) o)); }
Implements {@code Collection.contains} safely for forwarding collections of map entries. If {@code o} is an instance of {@code Entry}, it is wrapped using {@link #unmodifiableEntry} to protect against a possible nefarious equals method. <p>Note that {@code c} is the backing (delegate) collection, rather than the forwar...
java
android/guava/src/com/google/common/collect/Maps.java
3,644
[ "c", "o" ]
true
2
7.92
google/guava
51,352
javadoc
false
determineBrokerUrl
String determineBrokerUrl() { if (this.brokerUrl != null) { return this.brokerUrl; } if (this.embedded.isEnabled()) { return DEFAULT_EMBEDDED_BROKER_URL; } return DEFAULT_NETWORK_BROKER_URL; }
Time to wait on message sends for a response. Set it to 0 to wait forever.
java
module/spring-boot-activemq/src/main/java/org/springframework/boot/activemq/autoconfigure/ActiveMQProperties.java
144
[]
String
true
3
6.72
spring-projects/spring-boot
79,428
javadoc
false
canShortcutWithSource
boolean canShortcutWithSource(ElementType requiredType) { return canShortcutWithSource(requiredType, requiredType); }
Returns if the element source can be used as a shortcut for an operation such as {@code equals} or {@code toString}. @param requiredType the required type @return {@code true} if all elements match at least one of the types
java
core/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java
951
[ "requiredType" ]
true
1
6.64
spring-projects/spring-boot
79,428
javadoc
false
run
def run( command: str, command_args: tuple, backend: str, builder: str, docker_host: str | None, force_build: bool, forward_credentials: bool, github_repository: str, mysql_version: str, platform: str | None, postgres_version: str, project_name: str, python: str, ...
Run a command in the Breeze environment without entering the interactive shell. This is useful for automated testing, CI workflows, and one-off command execution. The command will be executed in a fresh container that is automatically cleaned up. Each run uses a unique project name to avoid conflicts with other instan...
python
dev/breeze/src/airflow_breeze/commands/developer_commands.py
1,072
[ "command", "command_args", "backend", "builder", "docker_host", "force_build", "forward_credentials", "github_repository", "mysql_version", "platform", "postgres_version", "project_name", "python", "skip_image_upgrade_check", "tty", "use_uv", "uv_http_timeout" ]
true
4
6.72
apache/airflow
43,597
unknown
false
uncaughtExceptionHandler
public Builder uncaughtExceptionHandler( final Thread.UncaughtExceptionHandler exceptionHandler) { this.exceptionHandler = Objects.requireNonNull(exceptionHandler, "handler"); return this; }
Sets the uncaught exception handler for the threads created by the new {@link BasicThreadFactory}. @param exceptionHandler the {@link UncaughtExceptionHandler} (must not be <strong>null</strong>) @return a reference to this {@link Builder} @throws NullPointerException if the exception handler is <strong>null</strong>
java
src/main/java/org/apache/commons/lang3/concurrent/BasicThreadFactory.java
215
[ "exceptionHandler" ]
Builder
true
1
6.08
apache/commons-lang
2,896
javadoc
false
render_log_filename
def render_log_filename(ti: TaskInstance, try_number, filename_template) -> str: """ Given task instance, try_number, filename_template, return the rendered log filename. :param ti: task instance :param try_number: try_number of the task :param filename_template: filename template, which can be jin...
Given task instance, try_number, filename_template, return the rendered log filename. :param ti: task instance :param try_number: try_number of the task :param filename_template: filename template, which can be jinja template or python string template
python
airflow-core/src/airflow/utils/helpers.py
173
[ "ti", "try_number", "filename_template" ]
str
true
2
6.24
apache/airflow
43,597
sphinx
false
watch
void watch(Set<Path> paths, Runnable action) { Assert.notNull(paths, "'paths' must not be null"); Assert.notNull(action, "'action' must not be null"); if (paths.isEmpty()) { return; } synchronized (this.lock) { try { if (this.thread == null) { this.thread = new WatcherThread(); this.thread...
Watch the given files or directories for changes. @param paths the files or directories to watch @param action the action to take when changes are detected
java
core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ssl/FileWatcher.java
78
[ "paths", "action" ]
void
true
4
7.04
spring-projects/spring-boot
79,428
javadoc
false
parseTypeParameters
function parseTypeParameters(): NodeArray<TypeParameterDeclaration> | undefined { if (token() === SyntaxKind.LessThanToken) { return parseBracketedList(ParsingContext.TypeParameters, parseTypeParameter, SyntaxKind.LessThanToken, SyntaxKind.GreaterThanToken); } }
Reports a diagnostic error for the current token being an invalid name. @param blankDiagnostic Diagnostic to report for the case of the name being blank (matched tokenIfBlankName). @param nameDiagnostic Diagnostic to report for all other cases. @param tokenIfBlankName Current token if the name was invalid for being...
typescript
src/compiler/parser.ts
3,987
[]
true
2
6.72
microsoft/TypeScript
107,154
jsdoc
false
generateSetBeanDefinitionPropertiesCode
CodeBlock generateSetBeanDefinitionPropertiesCode( GenerationContext generationContext, BeanRegistrationCode beanRegistrationCode, RootBeanDefinition beanDefinition, Predicate<String> attributeFilter);
Generate the code that sets the properties of the bean definition. @param generationContext the generation context @param beanRegistrationCode the bean registration code @param attributeFilter any attribute filtering that should be applied @return the generated code
java
spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanRegistrationCodeFragments.java
91
[ "generationContext", "beanRegistrationCode", "beanDefinition", "attributeFilter" ]
CodeBlock
true
1
6
spring-projects/spring-framework
59,386
javadoc
false
getStringOrNull
protected @Nullable String getStringOrNull(ResourceBundle bundle, String key) { if (bundle.containsKey(key)) { try { return bundle.getString(key); } catch (MissingResourceException ex) { // Assume key not found for some other reason // -> do NOT throw the exception to allow for checking parent me...
Efficiently retrieve the String value for the specified key, or return {@code null} if not found. <p>As of 4.2, the default implementation checks {@code containsKey} before it attempts to call {@code getString} (which would require catching {@code MissingResourceException} for key not found). <p>Can be overridden in su...
java
spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java
353
[ "bundle", "key" ]
String
true
3
7.76
spring-projects/spring-framework
59,386
javadoc
false
appendArgumentTypes
private static void appendArgumentTypes(MethodInvocation methodInvocation, Matcher matcher, StringBuilder output) { Class<?>[] argumentTypes = methodInvocation.getMethod().getParameterTypes(); String[] argumentTypeShortNames = new String[argumentTypes.length]; for (int i = 0; i < argumentTypeShortNames.length; i+...
Adds a comma-separated list of the short {@code Class} names of the method argument types to the output. For example, if a method has signature {@code put(java.lang.String, java.lang.Object)} then the value returned will be {@code String, Object}. @param methodInvocation the {@code MethodInvocation} being logged. Argum...
java
spring-aop/src/main/java/org/springframework/aop/interceptor/CustomizableTraceInterceptor.java
377
[ "methodInvocation", "matcher", "output" ]
void
true
2
6.4
spring-projects/spring-framework
59,386
javadoc
false
parseFunctionOrConstructorTypeToError
function parseFunctionOrConstructorTypeToError( isInUnionType: boolean, ): TypeNode | undefined { // the function type and constructor type shorthand notation // are not allowed directly in unions and intersections, but we'll // try to parse them gracefully and issue a helpful m...
Reports a diagnostic error for the current token being an invalid name. @param blankDiagnostic Diagnostic to report for the case of the name being blank (matched tokenIfBlankName). @param nameDiagnostic Diagnostic to report for all other cases. @param tokenIfBlankName Current token if the name was invalid for being...
typescript
src/compiler/parser.ts
4,794
[ "isInUnionType" ]
true
6
6.88
microsoft/TypeScript
107,154
jsdoc
false
keySet
@Override public Set<K> keySet() { return (keySetView == null) ? keySetView = createKeySet() : keySetView; }
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
670
[]
true
2
6.32
google/guava
51,352
javadoc
false
_nanaverage
def _nanaverage(a, weights=None): """Compute the weighted average, ignoring NaNs. Parameters ---------- a : ndarray Array containing data to be averaged. weights : array-like, default=None An array of weights associated with the values in a. Each value in a contributes to th...
Compute the weighted average, ignoring NaNs. Parameters ---------- a : ndarray Array containing data to be averaged. weights : array-like, default=None An array of weights associated with the values in a. Each value in a contributes to the average according to its associated weight. The weights array c...
python
sklearn/utils/extmath.py
1,333
[ "a", "weights" ]
false
4
6.24
scikit-learn/scikit-learn
64,340
numpy
false
describeReplicaLogDirs
default DescribeReplicaLogDirsResult describeReplicaLogDirs(Collection<TopicPartitionReplica> replicas) { return describeReplicaLogDirs(replicas, new DescribeReplicaLogDirsOptions()); }
Query the replica log directory information for the specified replicas. <p> This is a convenience method for {@link #describeReplicaLogDirs(Collection, DescribeReplicaLogDirsOptions)} with default options. See the overload for more details. <p> This operation is supported by brokers with version 1.0.0 or higher. @param...
java
clients/src/main/java/org/apache/kafka/clients/admin/Admin.java
607
[ "replicas" ]
DescribeReplicaLogDirsResult
true
1
6.32
apache/kafka
31,560
javadoc
false
holidays
def holidays( self, start=None, end=None, return_name: bool = False ) -> DatetimeIndex | Series: """ Returns a curve with holidays between start_date and end_date Parameters ---------- start : starting date, datetime-like, optional end : ending date, datetime...
Returns a curve with holidays between start_date and end_date Parameters ---------- start : starting date, datetime-like, optional end : ending date, datetime-like, optional return_name : bool, optional If True, return a series that has dates and holiday names. False will only return a DatetimeIndex of dates. ...
python
pandas/tseries/holiday.py
496
[ "self", "start", "end", "return_name" ]
DatetimeIndex | Series
true
11
6.72
pandas-dev/pandas
47,362
numpy
false
readFloat
@CanIgnoreReturnValue // to skip some bytes @Override public float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); }
Reads a {@code float} as specified by {@link DataInputStream#readFloat()}, except using little-endian byte order. @return the next four bytes of the input stream, interpreted as a {@code float} in little-endian byte order @throws IOException if an I/O error occurs
java
android/guava/src/com/google/common/io/LittleEndianDataInputStream.java
156
[]
true
1
6.56
google/guava
51,352
javadoc
false