content stringlengths 263 5.24M | pred_label stringclasses 1
value | pred_score_pos float64 0.6 1 |
|---|---|---|
"""
select_words(s::String, n::Int)::Vector{<:AbstractString}
Given a string `s` and a natural number `n`, you have been tasked to implement a
function that returns a list of all words from string `s` that contain exactly
`n` consonants, in order these words appear in the string `s`. If the string `s`
is empty the... | __label__POS | 0.999436 |
"""
total_match(xs::Vector{String}, ys::Vector{String})::Vector{String}
Write a function that accepts two lists of strings and returns the list that has
total number of chars in the all strings of the list less than the other list.
If the two lists have the same number of chars, return the first list.
# Examples... | __label__POS | 0.997986 |
"""
separate_paren_groups(paren_string::String)::Vector{String}
Input to this function is a string containing multiple groups of nested
parentheses. Your goal is to separate those group into separate strings and
return the list of those. Separate groups are balanced (each open brace is
properly closed) and not nes... | __label__POS | 0.996951 |
"""
move_one_ball(xs::Vector{Int})::Bool
We have an array `xs` of N integers xs[1], xs[2], ..., xs[N].The numbers in the
array will be randomly ordered. Your task is to determine if it is possible to
get an array sorted in non-decreasing order by performing the following
operation on the given array: You are allow... | __label__POS | 0.989969 |
"""
eat(number::Int, need::Int, remaining::Int)::Vector{Int}
You're a hungry rabbit, and you already have eaten a certain number of carrots,
but now you need to eat more carrots to complete the day's meals. you should
return an array of [ total number of eaten carrots after your meals, the number
of carrots left a... | __label__POS | 0.993075 |
"""
by_length(xs::Vector{Int})::Vector{String}
Given an array of integers, sort the integers that are between 1 and 9
inclusive, reverse the resulting array, and then replace each digit by its
corresponding name from "One", "Two", "Three", "Four", "Five", "Six", "Seven",
"Eight", "Nine".
If the array is empty, re... | __label__POS | 0.998205 |
"""
get_closest_vowel(word::String)::String
You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you
didn't find any vowel met the above condition.
... | __label__POS | 0.894762 |
"""
sorted_list_sum(xs::Vector{String})::Vector{String}
Write a function that accepts a list of strings as a parameter, deletes the
strings that have odd lengths from it, and returns the resulted list with a
sorted order,
The list is always a list of strings and never an array of numbers, and it may
contain dupli... | __label__POS | 0.997399 |
"""
exchange(lst1::Vector{Int}, lst2::Vector{Int})::String
In this problem, you will implement a function that takes two lists of numbers,
and determines whether it is possible to perform an exchange of elements between
them to make lst1 a list of only even numbers. There is no limit on the number
of exchanged ele... | __label__POS | 0.967774 |
"""
hex_key(num::String)::Int
You have been tasked to write a function that receives a hexadecimal number as a
string and counts the number of hexadecimal digits that are primes (prime
number, or a prime, is a natural number greater than 1 that is not a product of
two smaller natural numbers). Hexadecimal digits a... | __label__POS | 0.991071 |
"""
do_algebra(operator::Vector{String}, operand::Vector{Int})
Given two lists operator, and operand. The first list has basic algebra
operations, and the second list is a list of integers. Use the two given lists
to build the algebric expression and return the evaluation of this expression.
The basic algebra ope... | __label__POS | 0.750178 |
"""
histogram(s::String)::Dict{String, Int}
Given a string representing a space separated lowercase letters, return a
dictionary of the letter with the most repetition and containing the
corresponding count. If several letters have the same occurrence, return all of
them.
# Examples
```jldoctest
julia> histogram... | __label__POS | 0.745582 |
"""
odd_count(xs::Vector{String})::Vector{String}
Given a list of strings, where each string consists of only digits, return a
list. Each element `i` of the output should be "the number of odd elements in
the string i of the input." where all the i"s should be replaced by the number
of odd digits in the i"th strin... | __label__POS | 0.99593 |
"""
match_parens(lst::Vector{String})::String
You are given a list of two strings, both strings consist of open parentheses
"(" or close parentheses ")" only. Your job is to check if it is possible to
concatenate the two strings in some order, that the resulting string will be
good. A string S is considered to be ... | __label__POS | 0.998965 |
package com.termux.app;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.PixelFormat;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.StateListDrawable;
public class ButtonBg extends StateListDrawable
{
public ButtonBg(int color, int st... | __label__POS | 0.980436 |
"""
file_name_check(file_name::String)::String
Create a function which takes a string representing a file's name, and returns
'Yes' if the the file's name is valid, and returns 'No' otherwise. A file's name
is considered to be valid if and only if all the following conditions are met:
- There should not be more tha... | __label__POS | 0.836114 |
"""
min_path(grid::Vector{Vector{Int}}, k::Int)::Vector{Int}
Given a grid with `N` rows and `N` columns (`N >= 2`) and a positive integer
`k`, each cell of the grid contains a value. Every integer in the range `[1, N * N]` inclusive appears exactly once on the cells of the grid.
You have to find the minimum path ... | __label__POS | 0.999549 |
"""
fruit_distribution(s::String, n::Int)::Int
In this task, you will be given a string that represents a number of apples and
oranges that are distributed in a basket of fruit this basket contains apples,
oranges, and mango fruits. Given the string that represents the total number of
the oranges and apples and an... | __label__POS | 0.874441 |
package com.termux.app;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.widget.TextView;
import android.widget.Toast;
import java.io.File;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.List;
public class ... | __label__POS | 0.858902 |
"""
will_it_fly(q::Vector{Int}, w::Int)::Bool
Write a function that returns `true` if the object `q` will fly, and `false`
otherwise. The object `q` will fly if it's balanced (it is a palindromic list)
and the sum of its elements is less than or equal the maximum possible weight
`w`.
# Examples
```jldoctest
juli... | __label__POS | 1.000001 |
"""
correct_bracketing(brackets::String)::Bool
Brackets is a string of "(" and ")". Return `true` if every opening bracket has
a corresponding closing bracket.
# Examples
```jldoctest
julia> correct_bracketing("(")
false
julia> correct_bracketing("()")
true
julia> correct_bracketing("(()())")
true
julia> corr... | __label__POS | 0.999968 |
"""
max_fill(grid::Vector{Vector{Int}}, capacity::Int)::Int
You are given a rectangular grid of wells. Each row represents a single well,
and each 1 in a row represents a single unit of water. Each well has a
corresponding bucket that can be used to extract water from it, and all buckets
have the same capacity. Yo... | __label__POS | 0.999427 |
"""
pluck(xs::Vector{Int})::Vector{Int}
Given an array representing a branch of a tree that has non-negative integer
nodes your task is to pluck one of the nodes and return it. The plucked node
should be the node with the smallest even value. If multiple nodes with the same
smallest even value are found return the... | __label__POS | 0.996749 |
package com.termux.app;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Shader;
import android.graphics.SweepGradient;
... | __label__POS | 0.604199 |
package com.termux.terminal;
/**
* Native methods for creating and managing pseudoterminal subprocesses. C code is in jni/termux.c.
*/
final class JNI {
static {
System.loadLibrary("termux");
}
/**
* Create a subprocess. Differs from {@link ProcessBuilder} in that a pseudoterminal is used ... | __label__POS | 0.811947 |
"""
encrypt(s::String)
Create a function `encrypt` that takes a string as an argument and returns a
string encrypted with the alphabet being rotated. The alphabet should be rotated
in a manner such that the letters shift down by two multiplied to two places.
# Example
```jldoctest
julia> encrypt("hi")
"lm"
juli... | __label__POS | 0.987442 |
"""
words_in_sentence(sentence::String)::String
You are given a string representing a sentence, the sentence contains some words
separated by a space, and you have to return a string that contains the words
from the original sentence, whose lengths are prime numbers, the order of the
words in the new string should... | __label__POS | 0.985995 |
"""
get_odd_collatz(n::Int)::Vector{BigInt}
Given a positive integer `n`, return a sorted list that has the odd numbers in
collatz sequence.
The Collatz conjecture is a conjecture in mathematics that concerns a sequence
defined as follows: start with any positive integer n. Then each term is
obtained from the pre... | __label__POS | 0.999731 |
"""
valid_date(date::String)::Bool
You have to write a function which validates a given date string and returns
`true` if the date is valid otherwise `false` The date is valid if all of the
following rules are satisfied:
1. The date string is not empty.
2. The number of days is not less than 1 or higher than 31... | __label__POS | 0.979894 |
"""
car_race_collision(n::Int)::Int
Imagine a road that's a perfectly straight infinitely long line. `n` cars are
driving left to right; simultaneously, a different set of n cars are driving
right to left. The two sets of cars start out being very far from each other.
All cars move in the same speed. Two cars are ... | __label__POS | 0.96954 |
"""
bf(planet1::String, planet2::String)::NTuple
There are eight planets in our solar system: the closerst to the Sun is Mercury,
the next one is Venus, then Earth, Mars, Jupiter, Saturn, Uranus, Neptune. Write
a function that takes two planet names as strings `planet1` and `planet2`. The
function should return a ... | __label__POS | 0.860047 |
"""
correct_angle_bracketing(brackets::String)::Bool
Brackets is a string of "<" and ">". Return true if every opening bracket has a
corresponding closing bracket.
# Examples
```jldoctest
julia> correct_angle_bracketing("<")
false
julia> correct_angle_bracketing("<>")
true
julia> correct_angle_bracketing("<<><... | __label__POS | 0.999947 |
"""
is_nested(s::String)::Bool
Create a function that takes a string as input which contains only square
brackets. The function should return `true` if and only if there is a valid
subsequence of brackets where at least one bracket in the subsequence is nested.
# Examples
```jldoctest
julia> is_nested("[[]]")
tr... | __label__POS | 1.000007 |
"""
smallest_change(xs::Vector{Int})::Int
Given an array arr of integers, find the minimum number of elements that need to
be changed to make the array palindromic. A palindromic array is an array that
is read the same backwards and forwards. In one change, you can change one
element to any other element.
# Examp... | __label__POS | 0.999936 |
"""
encode_swap(message::String)::String
Write a function that takes a message, and encodes in such a way that it swaps
case of all letters, replaces all vowels in the message with the letter that
appears 2 places after that vowel in the english alphabet. Assume only
letters.
# Examples
```jldoctest
julia> encod... | __label__POS | 0.997981 |
"""
skjkasdkd(xs::Vector{Int})::Int
You are given a list of integers. You need to find the largest prime value and
return the sum of its digits.
# Examples
```jldoctest
julia> skjkasdkd([0, 3, 2, 1, 3, 5, 7, 4, 5, 5, 5, 2, 181, 32, 4, 32, 3, 2, 32, 324, 4, 3])
10
julia> skjkasdkd([1, 0, 1, 8, 2, 4597, 2, 1, 3, ... | __label__POS | 0.998547 |
package com.termux.terminal;
/** A circular byte buffer allowing one producer and one consumer thread. */
final class ByteQueue {
private final byte[] mBuffer;
private int mHead;
private int mStoredBytes;
private boolean mOpen = true;
public ByteQueue(int size) {
mBuffer = new byte[size];... | __label__POS | 0.955848 |
"""
select_words(s::String, n::Int)::Vector{<:AbstractString}
Given a string `s` and a natural number `n`, you have been tasked to implement a
function that returns a list of all words from string `s` that contain exactly
`n` consonants, in order these words appear in the string `s`. If the string `s`
is empty the... | __label__POS | 0.999644 |
"""
total_match(xs::Vector{String}, ys::Vector{String})::Vector{String}
Write a function that accepts two lists of strings and returns the list that has
total number of chars in the all strings of the list less than the other list.
If the two lists have the same number of chars, return the first list.
# Examples... | __label__POS | 0.999641 |
"""
separate_paren_groups(paren_string::String)::Vector{String}
Input to this function is a string containing multiple groups of nested
parentheses. Your goal is to separate those group into separate strings and
return the list of those. Separate groups are balanced (each open brace is
properly closed) and not nes... | __label__POS | 0.999817 |
"""
move_one_ball(xs::Vector{Int})::Bool
We have an array `xs` of N integers xs[1], xs[2], ..., xs[N].The numbers in the
array will be randomly ordered. Your task is to determine if it is possible to
get an array sorted in non-decreasing order by performing the following
operation on the given array: You are allow... | __label__POS | 0.993797 |
"""
eat(number::Int, need::Int, remaining::Int)::Vector{Int}
You're a hungry rabbit, and you already have eaten a certain number of carrots,
but now you need to eat more carrots to complete the day's meals. you should
return an array of [ total number of eaten carrots after your meals, the number
of carrots left a... | __label__POS | 0.997113 |
"""
Evaluates polynomial with coefficients `xs` at point `x`. Return `xs[1] + xs[2]
- x + xs[3] * x^2 + .... xs[n] * x^n`.
"""
poly(xs::Vector, x::Float64) = sum(coeff * (x^(i - 1)) for (i, coeff) in enumerate(xs))
"""
find_zero(xs::Vector{Int})
`xs` are coefficients of a polynomial. `find_zero` find `x` such... | __label__POS | 0.821421 |
"""
by_length(xs::Vector{Int})::Vector{String}
Given an array of integers, sort the integers that are between 1 and 9
inclusive, reverse the resulting array, and then replace each digit by its
corresponding name from "One", "Two", "Three", "Four", "Five", "Six", "Seven",
"Eight", "Nine".
If the array is empty, re... | __label__POS | 0.998122 |
"""
get_closest_vowel(word::String)::String
You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you
didn't find any vowel met the above condition.
... | __label__POS | 0.99766 |
"""
sorted_list_sum(xs::Vector{String})::Vector{String}
Write a function that accepts a list of strings as a parameter, deletes the
strings that have odd lengths from it, and returns the resulted list with a
sorted order,
The list is always a list of strings and never an array of numbers, and it may
contain dupli... | __label__POS | 0.997736 |
package com.termux.app.activities;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.termux.R;
import com.termux.app.fragments.settings.TermuxPreferencesFragment;
import com.termux.shared.activity.media.AppCompatActivityUtils;
public class SettingsActivity extends AppCompatActiv... | __label__POS | 0.997266 |
package com.termux.app.fragments.settings;
import android.content.Context;
import android.os.Bundle;
import androidx.annotation.Keep;
import androidx.preference.PreferenceDataStore;
import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.PreferenceManager;
import com.termux.R;
import com.term... | __label__POS | 0.914975 |
"""
exchange(lst1::Vector{Int}, lst2::Vector{Int})::String
In this problem, you will implement a function that takes two lists of numbers,
and determines whether it is possible to perform an exchange of elements between
them to make lst1 a list of only even numbers. There is no limit on the number
of exchanged ele... | __label__POS | 0.977483 |
"""
hex_key(num::String)::Int
You have been tasked to write a function that receives a hexadecimal number as a
string and counts the number of hexadecimal digits that are primes (prime
number, or a prime, is a natural number greater than 1 that is not a product of
two smaller natural numbers). Hexadecimal digits a... | __label__POS | 0.993867 |
"""
do_algebra(operator::Vector{String}, operand::Vector{Int})
Given two lists operator, and operand. The first list has basic algebra
operations, and the second list is a list of integers. Use the two given lists
to build the algebric expression and return the evaluation of this expression.
The basic algebra ope... | __label__POS | 0.702116 |
package com.termux.app.fragments.settings.termux;
import android.content.Context;
import android.os.Bundle;
import androidx.annotation.Keep;
import androidx.annotation.Nullable;
import androidx.preference.PreferenceDataStore;
import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.PreferenceMa... | __label__POS | 0.705542 |
"""
compare_one(a::Union{Integer, AbstractFloat, AbstractString}, b::Union{Integer, AbstractFloat, AbstractString})::Union{Integer, AbstractFloat, AbstractString, Nothing}
Create a function that takes integers, floats, or strings representing real
numbers, and returns the larger variable in its given variable type... | __label__POS | 0.936362 |
package com.termux.app.fragments.settings.termux;
import android.content.Context;
import android.os.Bundle;
import androidx.annotation.Keep;
import androidx.preference.PreferenceDataStore;
import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.PreferenceManager;
import com.termux.R;
import c... | __label__POS | 0.87508 |
"""
find_max(words::Vector{String})::String
Write a function that accepts a list of strings. The list contains different
words. Return the word with maximum number of unique characters. If multiple
strings have maximum number of unique characters, return the one which comes
first in lexicographical order.
# Examp... | __label__POS | 0.99995 |
"""
get_row(xs::Vector{Vector{Int}}, x::Int)::Vector{Tuple{Int, Int}}
You are given a 2 dimensional data, as a nested lists, which is similar to
matrix, however, unlike matrices, each row may contain a different number of
columns. Given `xs`, and integer `x`, find integers `x` in the list `xs`, and
return list of ... | __label__POS | 0.994798 |
"""
histogram(s::String)::Dict{String, Int}
Given a string representing a space separated lowercase letters, return a
dictionary of the letter with the most repetition and containing the
corresponding count. If several letters have the same occurrence, return all of
them.
# Examples
```jldoctest
julia> histogram... | __label__POS | 0.956426 |
"""
match_parens(lst::Vector{String})::String
You are given a list of two strings, both strings consist of open parentheses
"(" or close parentheses ")" only. Your job is to check if it is possible to
concatenate the two strings in some order, that the resulting string will be
good. A string S is considered to be ... | __label__POS | 0.999409 |
"""
file_name_check(file_name::String)::String
Create a function which takes a string representing a file's name, and returns
'Yes' if the the file's name is valid, and returns 'No' otherwise. A file's name
is considered to be valid if and only if all the following conditions are met:
- There should not be more tha... | __label__POS | 0.952369 |
"""
even_odd_palindrome(n::Int)::Tuple{Int, Int}
Given a positive integer n, return a tuple that has the number of even and odd
integer palindromes that fall within the range(1, n), inclusive.
!!! note
1. 1 <= n <= 10^3
2. returned tuple has the number of even and odd integer palindromes respectively.
... | __label__POS | 0.99982 |
"""
parse_nested_parens(paren_string::String)::Vector{Int}
Input to this function is a string represented multiple groups for nested
parentheses separated by spaces. For each of the group, output the deepest level
of nesting of parentheses. E.g. `(()())` has maximum two levels of nesting while
`((()))` has three.
... | __label__POS | 1.000004 |
"""
intersection(interval1::Vector{Int}, interval2::Vector{Int})::String
You are given two intervals, where each interval is a pair of integers. For
example, interval = (start, end) = (1, 2). The given intervals are closed which
means that the interval (start, end) includes both start and end. For each given
inter... | __label__POS | 0.999941 |
"""
min_path(grid::Vector{Vector{Int}}, k::Int)::Vector{Int}
Given a grid with `N` rows and `N` columns (`N >= 2`) and a positive integer
`k`, each cell of the grid contains a value. Every integer in the range `[1, N * N]` inclusive appears exactly once on the cells of the grid.
You have to find the minimum path ... | __label__POS | 0.997056 |
"""
fruit_distribution(s::String, n::Int)::Int
In this task, you will be given a string that represents a number of apples and
oranges that are distributed in a basket of fruit this basket contains apples,
oranges, and mango fruits. Given the string that represents the total number of
the oranges and apples and an... | __label__POS | 0.814542 |
"""
search(numbers::Vector)::Int
You are given a non-empty list of positive integers. Return the greatest integer
that is greater than zero, and has a frequency greater than or equal to the
value of the integer itself. The frequency of an integer is the number of times
it appears in the list. If no such a value ex... | __label__POS | 0.998626 |
"""
int_to_mini_roman(number::Int)::String
Given a positive integer, obtain its roman numeral equivalent as a string, and
return it in lowercase.
Restrictions: 1 <= num <= 1000
# Examples
```jldoctest
julia> int_to_mini_roman(19)
"xix"
julia> int_to_mini_roman(152)
"clii"
julia> int_to_mini_roman(426)
"cdxxvi... | __label__POS | 0.999213 |
"""
find_closest_elements(numbers::Vector{Float64})::Tuple{Float64, Float64}
From a supplied list of numbers (of length at least two) select and return two
that are the closest to each other and return them in order (smaller number,
larger number).
# Examples
```jldoctest
julia> find_closest_elements([1.0, 2.0, ... | __label__POS | 0.999025 |
"""
will_it_fly(q::Vector{Int}, w::Int)::Bool
Write a function that returns `true` if the object `q` will fly, and `false`
otherwise. The object `q` will fly if it's balanced (it is a palindromic list)
and the sum of its elements is less than or equal the maximum possible weight
`w`.
# Examples
```jldoctest
juli... | __label__POS | 0.999737 |
package com.termux.shared.shell;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.termux.shared.file.FileUtils;
import com.termux.terminal.TerminalBuffer;
import com.termux.terminal.TerminalEmulator;
import com.termux.terminal.TerminalSession;
import java.lang.reflect.Field;
import... | __label__POS | 0.806781 |
"""
max_fill(grid::Vector{Vector{Int}}, capacity::Int)::Int
You are given a rectangular grid of wells. Each row represents a single well,
and each 1 in a row represents a single unit of water. Each well has a
corresponding bucket that can be used to extract water from it, and all buckets
have the same capacity. Yo... | __label__POS | 0.998224 |
"""
pluck(xs::Vector{Int})::Vector{Int}
Given an array representing a branch of a tree that has non-negative integer
nodes your task is to pluck one of the nodes and return it. The plucked node
should be the node with the smallest even value. If multiple nodes with the same
smallest even value are found return the... | __label__POS | 0.988468 |
"""
triples_sum_to_zero(l::Vector{Int})::Bool
Takes a list of integers as an input. It returns `true` if there are three
distinct elements in the list that sum to zero, and `false` otherwise.
# Examples
```jldoctest
julia> triples_sum_to_zero([1, 3, 5, 0])
false
julia> triples_sum_to_zero([1, 3, -2, 1])
true
j... | __label__POS | 0.998277 |
"""
tri(n::Int)::Vector{Int}
Everyone knows Fibonacci sequence, it was studied deeply by mathematicians in
the last couple centuries. However, what people don't know is Tribonacci
sequence. Tribonacci sequence is defined by the recurrence:
tri(1) = 1
tri(n) = 1 + n / 2, if n is even.
tri(n) = tri(n - 1) + tri(... | __label__POS | 0.937226 |
"""
words_in_sentence(sentence::String)::String
You are given a string representing a sentence, the sentence contains some words
separated by a space, and you have to return a string that contains the words
from the original sentence, whose lengths are prime numbers, the order of the
words in the new string should... | __label__POS | 0.993225 |
"""
get_odd_collatz(n::Int)::Vector{BigInt}
Given a positive integer `n`, return a sorted list that has the odd numbers in
collatz sequence.
The Collatz conjecture is a conjecture in mathematics that concerns a sequence
defined as follows: start with any positive integer n. Then each term is
obtained from the pre... | __label__POS | 0.997418 |
"""
valid_date(date::String)::Bool
You have to write a function which validates a given date string and returns
`true` if the date is valid otherwise `false` The date is valid if all of the
following rules are satisfied:
1. The date string is not empty.
2. The number of days is not less than 1 or higher than 31... | __label__POS | 0.607381 |
"""
bf(planet1::String, planet2::String)::NTuple
There are eight planets in our solar system: the closerst to the Sun is Mercury,
the next one is Venus, then Earth, Mars, Jupiter, Saturn, Uranus, Neptune. Write
a function that takes two planet names as strings `planet1` and `planet2`. The
function should return a ... | __label__POS | 0.981664 |
package com.termux.shared.file;
import com.termux.shared.errors.Errno;
import java.util.HashMap;
import java.util.Map;
/** The {@link Class} that defines FileUtils error messages and codes. */
public class FileUtilsErrno extends Errno {
public static final String TYPE = "FileUtils Error";
/* Errors for nu... | __label__POS | 0.610004 |
"""
is_nested(s::String)::Bool
Create a function that takes a string as input which contains only square
brackets. The function should return `true` if and only if there is a valid
subsequence of brackets where at least one bracket in the subsequence is nested.
# Examples
```jldoctest
julia> is_nested("[[]]")
tr... | __label__POS | 0.924396 |
package com.termux.shared.markdown;
import com.google.common.base.Strings;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class MarkdownUtils {
public static final String backtick = "`";
public static final Pattern backticksPattern = Pattern.compile("(" + backtick + "+)");
/**
... | __label__POS | 0.963146 |
package com.termux.shared.data;
import androidx.annotation.Nullable;
public class DataUtils {
/** Max safe limit of data size to prevent TransactionTooLargeException when transferring data
* inside or to other apps via transactions. */
public static final int TRANSACTION_SIZE_LIMIT_IN_BYTES = 100 * 1024... | __label__POS | 0.644723 |
"""
add_even_eles_at_odd_inds(xs::Vector{Int})::Int
Given a non-empty list of integers `xs`. add the even elements that are at odd
indices..
# Examples:
```jldoctest
julia> add_even_eles_at_odd_inds([4, 2, 6, 7])
10
```
"""
function add_even_eles_at_odd_inds(xs::Vector{Int})::Int
sum = 0
for i in 2:2:l... | __label__POS | 0.999813 |
"""
encode_swap(message::String)::String
Write a function that takes a message, and encodes in such a way that it swaps
case of all letters, replaces all vowels in the message with the letter that
appears 2 places after that vowel in the english alphabet. Assume only
letters.
# Examples
```jldoctest
julia> encod... | __label__POS | 0.975002 |
"""
skjkasdkd(xs::Vector{Int})::Int
You are given a list of integers. You need to find the largest prime value and
return the sum of its digits.
# Examples
```jldoctest
julia> skjkasdkd([0, 3, 2, 1, 3, 5, 7, 4, 5, 5, 5, 2, 181, 32, 4, 32, 3, 2, 32, 324, 4, 3])
10
julia> skjkasdkd([1, 0, 1, 8, 2, 4597, 2, 1, 3, ... | __label__POS | 0.996597 |
"""
select_words(s::String, n::Int)::Vector{<:AbstractString}
Given a string `s` and a natural number `n`, you have been tasked to implement a
function that returns a list of all words from string `s` that contain exactly
`n` consonants, in order these words appear in the string `s`. If the string `s`
is empty the... | __label__POS | 0.993731 |
package com.termux.shared.errors;
import android.app.Activity;
import androidx.annotation.NonNull;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
/** The {@link Class} that defines error messages and codes. */
public class Errno {
private static final Ha... | __label__POS | 0.9372 |
package com.termux.shared.errors;
/** The {@link Class} that defines function error messages and codes. */
public class FunctionErrno extends Errno {
public static final String TYPE = "Function Error";
/* Errors for null or empty parameters (100-150) */
public static final Errno ERRNO_NULL_OR_EMPTY_PARA... | __label__POS | 0.70261 |
"""
next_smallest(xs::Vector{Int})::Union{Nothing,Int}
You are given a list of integers. Write a function `next_smallest(xs)` that
returns the 2nd smallest element of the list. Return `nothing` if there is no
such element.
# Examples
```jldoctest
julia> next_smallest([1, 2, 3, 4, 5])
2
julia> next_smallest([5, ... | __label__POS | 0.999634 |
package com.termux.shared.android;
import android.annotation.SuppressLint;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.termux.shared.reflection.ReflectionUtils;
import java.lang.reflect.Method;
public class SELinuxUtils {
public static final String ANDROID_OS_SELINUX_CL... | __label__POS | 0.821113 |
"""
total_match(xs::Vector{String}, ys::Vector{String})::Vector{String}
Write a function that accepts two lists of strings and returns the list that has
total number of chars in the all strings of the list less than the other list.
If the two lists have the same number of chars, return the first list.
# Examples... | __label__POS | 0.998882 |
"""
top_k(xs::Vector{Int}, k::Int)::Vector{Int}
Given an array `xs` of integers and a positive integer `k`, return a sorted list
of length `k` with the maximum `k` numbers in `xs` in the descending order.
!!! note
1. The length of the array will be in the range of [1, 1000].
2. The elements in the arra... | __label__POS | 0.999418 |
"""
separate_paren_groups(paren_string::String)::Vector{String}
Input to this function is a string containing multiple groups of nested
parentheses. Your goal is to separate those group into separate strings and
return the list of those. Separate groups are balanced (each open brace is
properly closed) and not nes... | __label__POS | 0.863126 |
"""
count_up_to(n::Int)::Vector{Int}
Implement a function that takes an non-negative integer and returns an array of
the first n integers that are prime numbers and less than n.
# Example
```jldoctest
julia> count_up_to(5)
2-element Vector{Int64}:
2
3
julia> count_up_to(11)
4-element Vector{Int64}:
2
3
5
... | __label__POS | 0.998169 |
"""
move_one_ball(xs::Vector{Int})::Bool
We have an array `xs` of N integers xs[1], xs[2], ..., xs[N].The numbers in the
array will be randomly ordered. Your task is to determine if it is possible to
get an array sorted in non-decreasing order by performing the following
operation on the given array: You are allow... | __label__POS | 0.992388 |
package com.termux.shared.termux.interact;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.text.Selection;
import android.util.TypedValue;
import android.view.KeyEvent;
import android.view.ViewGroup.LayoutParams;
import android.widget.EditText;
import... | __label__POS | 0.639972 |
"""
eat(number::Int, need::Int, remaining::Int)::Vector{Int}
You're a hungry rabbit, and you already have eaten a certain number of carrots,
but now you need to eat more carrots to complete the day's meals. you should
return an array of [ total number of eaten carrots after your meals, the number
of carrots left a... | __label__POS | 0.996331 |
"""
words_string(s::String)::Vector{String}
You will be given a string of words separated by commas or spaces. Your task is
to split the string into words and return an array of the words. Results
shouldn't contain empty string.
# Example
```jldoctest
julia> words_string("Hi, my name is John")
5-element Vector{S... | __label__POS | 0.882915 |
"""
by_length(xs::Vector{Int})::Vector{String}
Given an array of integers, sort the integers that are between 1 and 9
inclusive, reverse the resulting array, and then replace each digit by its
corresponding name from "One", "Two", "Three", "Four", "Five", "Six", "Seven",
"Eight", "Nine".
If the array is empty, re... | __label__POS | 0.995856 |
"""
unique_digits(xs::Vector{Int})::Vector{Int}
Given a list of positive integers `xs`. Return a sorted list of all
elements that hasn't any even digit.
!!! note
Returned list should be sorted in increasing order.
# Examples
```jldoctest
julia> unique_digits([15, 33, 1422, 1])
3-element Vector{Int64}:
1
... | __label__POS | 0.902584 |
package com.termux.shared.termux.terminal;
import android.view.KeyEvent;
import android.view.MotionEvent;
import com.termux.terminal.TerminalSession;
import com.termux.view.TerminalViewClient;
public class TermuxTerminalViewClientBase implements TerminalViewClient {
public TermuxTerminalViewClientBase() {
}... | __label__POS | 0.999944 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.