| author_allowed |
Ran ran on a synthesized input |
bltlab/mot/extraction/dump_documents.py code served (permissive licence) · get_code("ac259c52c934e834") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from typing import Dict, AbstractSet, Any
# Construct test data for author_allowed function
# Create a sample document with utag_data and authors
doc = {
'utag_data': {
'byline': 'John Smith, Jane Doe'
},
'authors': ['John Smith', 'Jane Doe', 'Reuters']
}
# Create a set of bad bylines to check against
bad_bylines = {'AFP', 'AP', 'Reuters'}
# Define ARGS mapping all parameters
ARGS = {
'doc': doc,
'bad_bylines': bad_bylines
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| average_chars |
Ran ran on a synthesized input |
bltlab/mot/qualitychecks/character_average.py code served (permissive licence) · get_code("6bd8e8b915fc59a5") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import json
import tempfile
import os
# Create a temporary JSON file with the required structure
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_data.json")
test_data = {
"site_language": "English",
"n_chars": 42
}
with open(temp_file, 'w') as f:
json.dump(test_data, f)
ARGS = {
"path": temp_file
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| clean_fields |
Ran ran on a synthesized input |
bltlab/mot/extraction/downloadsitemaps.py code served (permissive licence) · get_code("1cf40a8bef19a322") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from typing import List, Optional, Generator, Iterable, Dict
torch.manual_seed(0)
# Construct a value for the 'fields' parameter
# The function expects a List[str] and processes each by stripping whitespace
fields_value = [
" hello ",
"world",
" ",
"\ttabbed\n",
"",
"no_whitespace"
]
ARGS = {
"fields": fields_value
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| confident_multiple_languages |
Ran ran on a synthesized input |
bltlab/mot/extraction/extracttext.py code served (permissive licence) · get_code("3c6c78775c3fb35c") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
# Setup code for confident_multiple_languages function
ARGS = {
"cld3_predictions": {
"en": {
"probability": 0.95,
"proportion": 0.08
},
"fr": {
"probability": 0.92,
"proportion": 0.06
},
"de": {
"probability": 0.85,
"proportion": 0.03
}
}
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| count_chars |
Ran ran on a synthesized input |
bltlab/mot/qualitychecks/character_count.py code served (permissive licence) · get_code("0dcddfcbdeb0e1b8") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import json
import tempfile
import os
# Create a temporary JSON file with the required structure
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_data.json")
test_data = {
"site_language": "English",
"n_chars": 1024
}
with open(temp_file, 'w', encoding='utf8') as f:
json.dump(test_data, f)
ARGS = {
"path": temp_file
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| filter_confident_langs |
Ran ran on a synthesized input |
bltlab/mot/extraction/extracttext.py code served (permissive licence) · get_code("cb050e89f262217f") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
# Create sample cld3 predictions dictionary
# Structure: {lang_code: {'probability': float, 'proportion': float, ...}}
cld3_predictions = {
'en': {'probability': 0.95, 'proportion': 0.75, 'language': 'English'},
'es': {'probability': 0.88, 'proportion': 0.005, 'language': 'Spanish'},
'fr': {'probability': 0.92, 'proportion': 0.02, 'language': 'French'},
'de': {'probability': 0.85, 'proportion': 0.008, 'language': 'German'},
'it': {'probability': 0.91, 'proportion': 0.015, 'language': 'Italian'},
}
ARGS = {
'cld3_predictions': cld3_predictions,
'probability_threshold': 0.9,
'proportion_threshold': 0.01,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_publication_date_from_utag |
Ran ran on a synthesized input |
bltlab/mot/extraction/utils.py code served (permissive licence) · get_code("83d45f7a39a14210") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
from datetime import datetime
from typing import Dict, Optional
# Test case 1: Valid complete utag_data with all fields
utag_data_complete = {
'pub_year': '2016',
'pub_month': '03',
'pub_day': '15',
'pub_hour': '10',
'pub_minute': '30'
}
# Test case 2: Valid utag_data with only year, month, day
utag_data_partial = {
'pub_year': '2020',
'pub_month': '07',
'pub_day': '22'
}
# Test case 3: Valid utag_data with only year and month (should fallback)
utag_data_minimal = {
'pub_year': '2018',
'pub_month': '05'
}
# Test case 4: Empty/invalid utag_data
utag_data_empty = {}
# Use the complete valid case for ARGS
ARGS = {
'utag_data': utag_data_complete
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| gunzip |
Ran ran on a synthesized input |
bltlab/mot/extraction/downloadsitemaps.py code served (permissive licence) · get_code("8905f3eb7b69542e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import gzip
import os
import tempfile
import shutil
# Create a temporary directory for our test
temp_dir = tempfile.mkdtemp()
# Create a test file and gzip it
test_content = b"This is test content for gunzip"
original_file = os.path.join(temp_dir, "test_file.txt")
gzip_file = os.path.join(temp_dir, "test_file.txt.gz")
# Write original content and compress it
with open(original_file, 'wb') as f:
f.write(test_content)
with open(original_file, 'rb') as f_in:
with gzip.open(gzip_file, 'wb') as f_out:
shutil.copyfileobj(f_in, f_out)
# Remove the original file so we only have the .gz version
os.remove(original_file)
# Now set up the ARGS dict with the filepath to the gzip file
ARGS = {
'filepath': gzip_file
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| is_valid |
Ran ran on a synthesized input |
bltlab/mot/extraction/scraper.py code served (permissive licence) · get_code("7916cce5b903f3c4") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
ARGS = {
"text": "This is a valid paragraph of text that should pass the validation check."
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| post_process |
Ran ran on a synthesized input |
VietHoang1512/khmer-nltk/khmernltk/utils/data.py code served (permissive licence) · get_code("365063f7b2778eda") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
def post_process(text, separator):
text = text.strip(separator)
return re.sub(f'(?:{separator}| )+', separator, text)
# Setup code
text = " hello---world---test "
separator = "-"
ARGS = {
"text": text,
"separator": separator
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| predict_language |
Ran ran on a synthesized input |
bltlab/mot/extraction/extracttext.py code served (permissive licence) · get_code("0df7e49ac86de638") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from typing import Dict, Any
# Test case 1: Single language with high confidence
cld3_predictions_single = {
'eng': {
'probability': 0.95,
'proportion': 0.98
}
}
# Test case 2: Multiple languages with high confidence
cld3_predictions_multiple = {
'eng': {
'probability': 0.92,
'proportion': 0.50
},
'fra': {
'probability': 0.88,
'proportion': 0.45
}
}
# Test case 3: Empty predictions
cld3_predictions_empty = {}
# Test case 4: English prediction with non-english ISO
cld3_predictions_eng_only = {
'eng': {
'probability': 0.93,
'proportion': 0.99
}
}
# Define ARGS with all parameter values for predict_language function
ARGS = {
'iso': 'fra',
'cld3_predictions': cld3_predictions_single
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| read_voa_domains |
Ran ran on a synthesized input |
bltlab/mot/extraction/downloadsitemaps.py code served (permissive licence) · get_code("6b3a7b351209d121") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import tempfile
import os
# Create a temporary TSV file with valid VOA domain data
temp_dir = tempfile.mkdtemp()
domain_tsv_path = os.path.join(temp_dir, "domains.tsv")
# Write a sample VOA domains TSV file
with open(domain_tsv_path, 'w', encoding='utf8') as f:
f.write("Region\tISO\tLanguage\tSite Name\tNews\tRadio\tVideo\tTV\tDirect\n")
f.write("Africa\ten\tEnglish\tVOA English\thttps://www.voanews.com\thttps://www.voanews.com/radio\thttps://www.voanews.com/video\thttps://www.voanews.com/tv\thttps://www.voanews.com/direct\n")
f.write("\tpt\tPortuguese\tVOA Portuguese\thttps://www.voaportugues.com\t\t\t\t\n")
f.write("Asia\tzh\tChinese\tVOA Chinese\thttps://www.voachina.com\thttps://www.voachina.com/radio\t\t\t\n")
ARGS = {
"domain_tsv_path": domain_tsv_path
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- attr — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| stringify_mongovalues |
Ran ran on a synthesized input |
bltlab/mot/extraction/dump_documents.py code served (permissive licence) · get_code("911b9a345e873933") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
from datetime import datetime
from typing import Any
def stringify_mongovalues(v: Any):
"""
Mostly the values are fine, but at least datetime needs handled.
Also need to handle datetimes embedded in dicts, so use recursion to get them.
"""
if type(v) == datetime:
return v.isoformat()
elif type(v) == dict:
return {key: stringify_mongovalues(value) for key, value in v.items()}
else:
return v
# Test case 1: datetime object
test_datetime = datetime(2023, 5, 15, 10, 30, 45)
# Test case 2: dict with nested datetime
test_dict_with_datetime = {
"name": "test",
"timestamp": datetime(2023, 5, 15, 10, 30, 45),
"nested": {
"created": datetime(2023, 1, 1, 0, 0, 0),
"value": 42
}
}
# Test case 3: simple value (string, int, etc.)
test_simple_value = "simple_string"
# For the function parameter 'v', we'll use a complex dict with nested datetimes
ARGS = {
"v": {
"id": 12345,
"timestamp": datetime(2023, 5, 15, 10, 30, 45),
"data": {
"created_at": datetime(2023, 1, 1, 12, 0, 0),
"name": "example",
"nested_more": {
"updated": datetime(2023, 6, 20, 14, 30, 0),
"count": 100
}
},
"simple_field": "value"
}
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| doc_to_dict |
Not yet run unverified (harvested, no recorded run) |
bltlab/mot/extraction/dump_documents.py code served (permissive licence) · get_code("4adb3f5772a9e273") How it ran |