Dataset Viewer
Auto-converted to Parquet Duplicate
task_id
string
task_name
string
canonical_solution
string
tests
string
prefix
string
suffix
string
middle
string
n_masked_tokens
int64
humanevalplus-0-0
HasCloseElements
hasCloseElements: numbers with: threshold "Check if in the given array of numbers are any two numbers closer to each other than the given threshold." "(self new hasCloseElements: #(1.0 2.0 3.0) with: 0.5) >>> false" "(self new hasCloseElements: #(1.0 2.8 3.0 4.0 5.0 2.0) with: 0.3) >>> true" | size | size := numbe...
testHasCloseElements self assert: (task hasCloseElements: { 1.0. 2.0. 3.9. 4.0. 5.0. 2.2 } with: 0.3) equals: true. self assert: (task hasCloseElements: { 1.0. 2.0. 3.9. 4.0. 5.0. 2.2 } with: 0.05) equals: false. self assert: (task hasCloseElements: { 1.0. 2.0. 5.9. 4.0. 5.0 } with: 0.95) equals: true. self assert: ...
hasCloseElements: numbers with: threshold "Check if in the given array of numbers are any two numbers closer to each other than the given threshold." "(self new hasCloseElements: #(1.0 2.0 3.0) with: 0.5) >>> false" "(self new hasCloseElements: #(1.0 2.8 3.0 4.0 5.0 2.0) with: 0.3) >>> true" | size | size := numbe...
ifTrue: [ (((numbers at: i) - (numbers at: j)) abs < threshold) ifTrue: [ ^ true ] ] ] ]. ^ false
i ~= j
3
humanevalplus-0-1
HasCloseElements
"hasCloseElements: numbers with: threshold\n\"Check if in the given array of numbers are any two num(...TRUNCATED)
"testHasCloseElements\nself assert: (task hasCloseElements: { 1.0. 2.0. 3.9. 4.0. 5.0. 2.2 } with: 0(...TRUNCATED)
"hasCloseElements: numbers with: threshold\n\"Check if in the given array of numbers are any two num(...TRUNCATED)
- (numbers at: j)) abs < threshold) ifTrue: [ ^ true ] ] ] ]. ^ false
(numbers at: i)
5
humanevalplus-0-2
HasCloseElements
"hasCloseElements: numbers with: threshold\n\"Check if in the given array of numbers are any two num(...TRUNCATED)
"testHasCloseElements\nself assert: (task hasCloseElements: { 1.0. 2.0. 3.9. 4.0. 5.0. 2.2 } with: 0(...TRUNCATED)
"hasCloseElements: numbers with: threshold\n\"Check if in the given array of numbers are any two num(...TRUNCATED)
)) abs < threshold) ifTrue: [ ^ true ] ] ] ]. ^ false
numbers at: j
3
humanevalplus-0-3
HasCloseElements
"hasCloseElements: numbers with: threshold\n\"Check if in the given array of numbers are any two num(...TRUNCATED)
"testHasCloseElements\nself assert: (task hasCloseElements: { 1.0. 2.0. 3.9. 4.0. 5.0. 2.2 } with: 0(...TRUNCATED)
"hasCloseElements: numbers with: threshold\n\"Check if in the given array of numbers are any two num(...TRUNCATED)
) - (numbers at: j)) abs < threshold) ifTrue: [ ^ true ] ] ] ]. ^ false
numbers at: i
3
humanevalplus-0-4
HasCloseElements
"hasCloseElements: numbers with: threshold\n\"Check if in the given array of numbers are any two num(...TRUNCATED)
"testHasCloseElements\nself assert: (task hasCloseElements: { 1.0. 2.0. 3.9. 4.0. 5.0. 2.2 } with: 0(...TRUNCATED)
"hasCloseElements: numbers with: threshold\n\"Check if in the given array of numbers are any two num(...TRUNCATED)
".\n\t1 to: size do: [:i |\n\t\t1 to: size do: [:j |\n\t\t\ti ~= j ifTrue: [\n\t\t\t\t(((numbers at:(...TRUNCATED)
size := numbers size
4
humanevalplus-0-5
HasCloseElements
"hasCloseElements: numbers with: threshold\n\"Check if in the given array of numbers are any two num(...TRUNCATED)
"testHasCloseElements\nself assert: (task hasCloseElements: { 1.0. 2.0. 3.9. 4.0. 5.0. 2.2 } with: 0(...TRUNCATED)
"hasCloseElements: numbers with: threshold\n\"Check if in the given array of numbers are any two num(...TRUNCATED)
) abs < threshold) ifTrue: [ ^ true ] ] ] ]. ^ false
(numbers at: j)
5
humanevalplus-0-6
HasCloseElements
"hasCloseElements: numbers with: threshold\n\"Check if in the given array of numbers are any two num(...TRUNCATED)
"testHasCloseElements\nself assert: (task hasCloseElements: { 1.0. 2.0. 3.9. 4.0. 5.0. 2.2 } with: 0(...TRUNCATED)
"hasCloseElements: numbers with: threshold\n\"Check if in the given array of numbers are any two num(...TRUNCATED)
] ] ]. ^ false
[ ^ true ]
4
humanevalplus-1-0
SeparateParenGroups
"separateParenGroups: parenString\n\"Input to this function is a string containing multiple groups o(...TRUNCATED)
"testSeparateParenGroups\nself assert: (task separateParenGroups: '(()()) ((())) () ((())()())') equ(...TRUNCATED)
"separateParenGroups: parenString\n\"Input to this function is a string containing multiple groups o(...TRUNCATED)
".\n\tcurrentDepth := 0.\n\t(parenString copyWithout: Character space) do: [ :c |\n\t\t\tc = $(\n\t\(...TRUNCATED)
(String new: parenString size) writeStream
7
humanevalplus-1-1
SeparateParenGroups
"separateParenGroups: parenString\n\"Input to this function is a string containing multiple groups o(...TRUNCATED)
"testSeparateParenGroups\nself assert: (task separateParenGroups: '(()()) ((())) () ((())()())') equ(...TRUNCATED)
"separateParenGroups: parenString\n\"Input to this function is a string containing multiple groups o(...TRUNCATED)
") writeStream.\n\tcurrentDepth := 0.\n\t(parenString copyWithout: Character space) do: [ :c |\n\t\t(...TRUNCATED)
String new: parenString size
4
humanevalplus-1-2
SeparateParenGroups
"separateParenGroups: parenString\n\"Input to this function is a string containing multiple groups o(...TRUNCATED)
"testSeparateParenGroups\nself assert: (task separateParenGroups: '(()()) ((())) () ((())()())') equ(...TRUNCATED)
"separateParenGroups: parenString\n\"Input to this function is a string containing multiple groups o(...TRUNCATED)
" do: [ :c |\n\t\t\tc = $(\n\t\t\t\tifTrue: [\n\t\t\t\t\t\tcurrentDepth := currentDepth + 1.\n\t\t\t(...TRUNCATED)
(parenString copyWithout: Character space)
6
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
11

Collection including pharo-llm/pharo-humanevalplus-fim-ast-aware