repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_executors.py
test_asyncio_progressbar_semaphore_executor
assert
numeric_literal
26
import pytest import asyncio import logging from maigret.executors import ( AsyncioSimpleExecutor, AsyncioProgressbarExecutor, AsyncioProgressbarSemaphoreExecutor, AsyncioProgressbarQueueExecutor, ) logger = logging.getLogger(__name__) async def func(n): await asyncio.sleep(0.1 * (n % 3)) retu...
0.4
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_executors.py
test_asyncio_progressbar_queue_executor
assert
numeric_literal
24
import pytest import asyncio import logging from maigret.executors import ( AsyncioSimpleExecutor, AsyncioProgressbarExecutor, AsyncioProgressbarSemaphoreExecutor, AsyncioProgressbarQueueExecutor, ) logger = logging.getLogger(__name__) async def func(n): await asyncio.sleep(0.1 * (n % 3)) retu...
0.5
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_executors.py
test_asyncio_progressbar_queue_executor
assert
numeric_literal
25
import pytest import asyncio import logging from maigret.executors import ( AsyncioSimpleExecutor, AsyncioProgressbarExecutor, AsyncioProgressbarSemaphoreExecutor, AsyncioProgressbarQueueExecutor, ) logger = logging.getLogger(__name__) async def func(n): await asyncio.sleep(0.1 * (n % 3)) retu...
0.6
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_executors.py
test_simple_asyncio_executor
assert
collection
22
import pytest import asyncio import logging from maigret.executors import ( AsyncioSimpleExecutor, AsyncioProgressbarExecutor, AsyncioProgressbarSemaphoreExecutor, AsyncioProgressbarQueueExecutor, ) logger = logging.getLogger(__name__) async def func(n): await asyncio.sleep(0.1 * (n % 3)) retu...
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_maigret.py
test_self_check_db_positive_disable
assert
bool_literal
45
import asyncio import copy import pytest from mock import Mock from maigret.maigret import self_check, maigret from maigret.maigret import ( extract_ids_from_page, extract_ids_from_results, ) from maigret.sites import MaigretSite from maigret.result import QueryResult, QueryStatus RESULTS_EXAMPLE = { 'Re...
True
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_maigret.py
test_maigret_results
assert
none_literal
77
import asyncio import copy import pytest from mock import Mock from maigret.maigret import self_check, maigret from maigret.maigret import ( extract_ids_from_page, extract_ids_from_results, ) from maigret.sites import MaigretSite from maigret.result import QueryResult, QueryStatus RESULTS_EXAMPLE = { 'Re...
None
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_maigret.py
test_self_check_db_positive_disable
assert
bool_literal
38
import asyncio import copy import pytest from mock import Mock from maigret.maigret import self_check, maigret from maigret.maigret import ( extract_ids_from_page, extract_ids_from_results, ) from maigret.sites import MaigretSite from maigret.result import QueryResult, QueryStatus RESULTS_EXAMPLE = { 'Re...
False
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_maigret.py
test_maigret_results
assert
variable
81
import asyncio import copy import pytest from mock import Mock from maigret.maigret import self_check, maigret from maigret.maigret import ( extract_ids_from_page, extract_ids_from_results, ) from maigret.sites import MaigretSite from maigret.result import QueryResult, QueryStatus RESULTS_EXAMPLE = { 'Re...
RESULTS_EXAMPLE
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_maigret.py
test_extract_ids_from_url
assert
collection
39
import asyncio import copy import pytest from mock import Mock from maigret.maigret import self_check, maigret from maigret.maigret import ( extract_ids_from_page, extract_ids_from_results, ) from maigret.sites import MaigretSite from maigret.result import QueryResult, QueryStatus RESULTS_EXAMPLE = { 'Re...
{'123': 'vk_id'}
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_maigret.py
test_maigret_results
assert
complex_expr
68
import asyncio import copy import pytest from mock import Mock from maigret.maigret import self_check, maigret from maigret.maigret import ( extract_ids_from_page, extract_ids_from_results, ) from maigret.sites import MaigretSite from maigret.result import QueryResult, QueryStatus RESULTS_EXAMPLE = { 'Re...
QueryStatus.ILLEGAL
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_maigret.py
test_maigret_results
assert
complex_expr
72
import asyncio import copy import pytest from mock import Mock from maigret.maigret import self_check, maigret from maigret.maigret import ( extract_ids_from_page, extract_ids_from_results, ) from maigret.sites import MaigretSite from maigret.result import QueryResult, QueryStatus RESULTS_EXAMPLE = { 'Re...
QueryStatus.CLAIMED
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_maigret.py
test_extract_ids_from_url
assert
collection
43
import asyncio import copy import pytest from mock import Mock from maigret.maigret import self_check, maigret from maigret.maigret import ( extract_ids_from_page, extract_ids_from_results, ) from maigret.sites import MaigretSite from maigret.result import QueryResult, QueryStatus RESULTS_EXAMPLE = { 'Re...
{'dipres8904': 'username'}
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_maigret.py
test_extract_ids_from_url
assert
collection
46
import asyncio import copy import pytest from mock import Mock from maigret.maigret import self_check, maigret from maigret.maigret import ( extract_ids_from_page, extract_ids_from_results, ) from maigret.sites import MaigretSite from maigret.result import QueryResult, QueryStatus RESULTS_EXAMPLE = { 'Re...
{'adbced123': 'yandex_public_id'}
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_maigret.py
test_extract_ids_from_url
assert
collection
36
import asyncio import copy import pytest from mock import Mock from maigret.maigret import self_check, maigret from maigret.maigret import ( extract_ids_from_page, extract_ids_from_results, ) from maigret.sites import MaigretSite from maigret.result import QueryResult, QueryStatus RESULTS_EXAMPLE = { 'Re...
{ 'test': 'username' }
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_maigret.py
test_extract_ids_from_url
assert
collection
40
import asyncio import copy import pytest from mock import Mock from maigret.maigret import self_check, maigret from maigret.maigret import ( extract_ids_from_page, extract_ids_from_results, ) from maigret.sites import MaigretSite from maigret.result import QueryResult, QueryStatus RESULTS_EXAMPLE = { 'Re...
{ 'ida123': 'username' }
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_maigret.py
test_maigret_results
assert
collection
51
import asyncio import copy import pytest from mock import Mock from maigret.maigret import self_check, maigret from maigret.maigret import ( extract_ids_from_page, extract_ids_from_results, ) from maigret.sites import MaigretSite from maigret.result import QueryResult, QueryStatus RESULTS_EXAMPLE = { 'Re...
{ 'tags': ['news', 'social', 'us'], 'checkType': 'status_code', 'presenseStrs': ['totalKarma'], 'disabled': True, 'alexaRank': 17, 'url': 'https://www.reddit.com/user/{username}', 'urlMain': 'https://www.reddit.com/', 'usernameClaimed': 'blue', 'usernameUnclaimed': 'noonewouldeverusethis7', }
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_notify.py
test_notify_available
assert
string_literal
9
from maigret.errors import CheckError from maigret.notify import QueryNotifyPrint from maigret.result import QueryStatus, QueryResult def test_notify_available(): n = QueryNotifyPrint(color=False) assert
"[-] TEST_SITE: Not found!"
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_notify.py
test_notify_unknown
assert
string_literal
16
from maigret.errors import CheckError from maigret.notify import QueryNotifyPrint from maigret.result import QueryStatus, QueryResult def test_notify_unknown(): n = QueryNotifyPrint(color=False) result = QueryResult( username="test", status=QueryStatus.UNKNOWN, site_name="TEST_SITE", ...
"[?] TEST_SITE: Type error: Reason"
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_notify.py
test_notify_claimed
assert
string_literal
9
from maigret.errors import CheckError from maigret.notify import QueryNotifyPrint from maigret.result import QueryStatus, QueryResult def test_notify_claimed(): n = QueryNotifyPrint(color=False) assert
"[+] TEST_SITE: http://example.com/test"
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_notify.py
test_notify_illegal
assert
string_literal
9
from maigret.errors import CheckError from maigret.notify import QueryNotifyPrint from maigret.result import QueryStatus, QueryResult def test_notify_illegal(): n = QueryNotifyPrint(color=False) assert
"[-] TEST_SITE: Illegal Username Format For This Site!"
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_report.py
test_generate_json_simple_report
assert
numeric_literal
272
import copy import json import os import pytest from io import StringIO import xmind from jinja2 import Template from maigret.report import ( generate_csv_report, generate_txt_report, save_xmind_report, save_html_report, save_pdf_report, generate_report_template, generate_report_context, ...
1
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_report.py
test_generate_json_ndjson_report
assert
numeric_literal
272
import copy import json import os import pytest from io import StringIO import xmind from jinja2 import Template from maigret.report import ( generate_csv_report, generate_txt_report, save_xmind_report, save_html_report, save_pdf_report, generate_report_template, generate_report_context, ...
2
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_report.py
test_generate_json_simple_report_broken
assert
collection
273
import copy import json import os import pytest from io import StringIO import xmind from jinja2 import Template from maigret.report import ( generate_csv_report, generate_txt_report, save_xmind_report, save_html_report, save_pdf_report, generate_report_template, generate_report_context, ...
[]
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_report.py
test_generate_report_template
assert
none_literal
272
import copy import json import os import pytest from io import StringIO import xmind from jinja2 import Template from maigret.report import ( generate_csv_report, generate_txt_report, save_xmind_report, save_html_report, save_pdf_report, generate_report_template, generate_report_context, ...
None
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_report.py
test_save_xmind_report
assert
string_literal
272
import copy import json import os import pytest from io import StringIO import xmind from jinja2 import Template from maigret.report import ( generate_csv_report, generate_txt_report, save_xmind_report, save_html_report, save_pdf_report, generate_report_template, generate_report_context, ...
'test'
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_report.py
test_generate_json_ndjson_report
assert
string_literal
273
import copy import json import os import pytest from io import StringIO import xmind from jinja2 import Template from maigret.report import ( generate_csv_report, generate_txt_report, save_xmind_report, save_html_report, save_pdf_report, generate_report_template, generate_report_context, ...
'GitHub'
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_report.py
test_save_xmind_report
assert
string_literal
275
import copy import json import os import pytest from io import StringIO import xmind from jinja2 import Template from maigret.report import ( generate_csv_report, generate_txt_report, save_xmind_report, save_html_report, save_pdf_report, generate_report_template, generate_report_context, ...
'test_tag'
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_report.py
test_save_xmind_report
assert
string_literal
274
import copy import json import os import pytest from io import StringIO import xmind from jinja2 import Template from maigret.report import ( generate_csv_report, generate_txt_report, save_xmind_report, save_html_report, save_pdf_report, generate_report_template, generate_report_context, ...
'Undefined'
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_report.py
test_html_report
assert
variable
270
import copy import json import os import pytest from io import StringIO import xmind from jinja2 import Template from maigret.report import ( generate_csv_report, generate_txt_report, save_xmind_report, save_html_report, save_pdf_report, generate_report_template, generate_report_context, ...
report_text
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_sites.py
test_load_valid_db
assert
numeric_literal
34
from maigret.sites import MaigretDatabase, MaigretSite EXAMPLE_DB = { 'engines': { "XenForo": { "presenseStrs": ["XenForo"], "site": { "absenceStrs": [ "The specified member cannot be found. Please enter a member's entire name.", ]...
1
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_sites.py
test_saving_site_error
assert
numeric_literal
39
from maigret.sites import MaigretDatabase, MaigretSite EXAMPLE_DB = { 'engines': { "XenForo": { "presenseStrs": ["XenForo"], "site": { "absenceStrs": [ "The specified member cannot be found. Please enter a member's entire name.", ]...
2
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_sites.py
test_load_empty_db_from_str
assert
collection
34
from maigret.sites import MaigretDatabase, MaigretSite EXAMPLE_DB = { 'engines': { "XenForo": { "presenseStrs": ["XenForo"], "site": { "absenceStrs": [ "The specified member cannot be found. Please enter a member's entire name.", ]...
[]
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_sites.py
test_ranked_sites_dict
assert
collection
42
from maigret.sites import MaigretDatabase, MaigretSite EXAMPLE_DB = { 'engines': { "XenForo": { "presenseStrs": ["XenForo"], "site": { "absenceStrs": [ "The specified member cannot be found. Please enter a member's entire name.", ]...
['2']
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_sites.py
test_ranked_sites_dict
assert
collection
46
from maigret.sites import MaigretDatabase, MaigretSite EXAMPLE_DB = { 'engines': { "XenForo": { "presenseStrs": ["XenForo"], "site": { "absenceStrs": [ "The specified member cannot be found. Please enter a member's entire name.", ]...
['3']
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_sites.py
test_site_url_detector
assert
string_literal
38
from maigret.sites import MaigretDatabase, MaigretSite EXAMPLE_DB = { 'engines': { "XenForo": { "presenseStrs": ["XenForo"], "site": { "absenceStrs": [ "The specified member cannot be found. Please enter a member's entire name.", ]...
'test'
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_sites.py
test_load_valid_db
assert
string_literal
37
from maigret.sites import MaigretDatabase, MaigretSite EXAMPLE_DB = { 'engines': { "XenForo": { "presenseStrs": ["XenForo"], "site": { "absenceStrs": [ "The specified member cannot be found. Please enter a member's entire name.", ]...
'Amperka'
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_sites.py
test_load_valid_db
assert
string_literal
38
from maigret.sites import MaigretDatabase, MaigretSite EXAMPLE_DB = { 'engines': { "XenForo": { "presenseStrs": ["XenForo"], "site": { "absenceStrs": [ "The specified member cannot be found. Please enter a member's entire name.", ]...
'XenForo'
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_utils.py
test_get_match_ratio
assert
numeric_literal
17
import itertools import re from maigret.utils import ( CaseConverter, is_country_tag, enrich_link_str, URLMatcher, get_dict_ascii_tree, get_match_ratio, ) def test_get_match_ratio(): fun = get_match_ratio(["test", "maigret", "username"]) assert fun("test") ==
1
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_utils.py
test_url_extract_main_part_negative
assert
string_literal
16
import itertools import re from maigret.utils import ( CaseConverter, is_country_tag, enrich_link_str, URLMatcher, get_dict_ascii_tree, get_match_ratio, ) def test_url_extract_main_part_negative(): url_main_part = 'None' assert URLMatcher.extract_main_part(url_main_part) ==
''
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_utils.py
test_is_country_tag
assert
bool_literal
15
import itertools import re from maigret.utils import ( CaseConverter, is_country_tag, enrich_link_str, URLMatcher, get_dict_ascii_tree, get_match_ratio, ) def test_is_country_tag(): assert is_country_tag('ru') is
True
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_utils.py
test_is_country_tag
assert
bool_literal
18
import itertools import re from maigret.utils import ( CaseConverter, is_country_tag, enrich_link_str, URLMatcher, get_dict_ascii_tree, get_match_ratio, ) def test_is_country_tag(): assert is_country_tag('ru') is True assert is_country_tag('FR') is True assert is_country_tag('a1'...
False
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_utils.py
test_enrich_link_str
assert
string_literal
15
import itertools import re from maigret.utils import ( CaseConverter, is_country_tag, enrich_link_str, URLMatcher, get_dict_ascii_tree, get_match_ratio, ) def test_enrich_link_str(): assert enrich_link_str('test') ==
'test'
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_utils.py
test_case_convert_camel_with_digits_to_snake
assert
string_literal
18
import itertools import re from maigret.utils import ( CaseConverter, is_country_tag, enrich_link_str, URLMatcher, get_dict_ascii_tree, get_match_ratio, ) def test_case_convert_camel_with_digits_to_snake(): a = 'ignore403' b = CaseConverter.camel_to_snake(a) assert b ==
'ignore403'
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_utils.py
test_url_extract_main_part
assert
variable
29
import itertools import re from maigret.utils import ( CaseConverter, is_country_tag, enrich_link_str, URLMatcher, get_dict_ascii_tree, get_match_ratio, ) def test_url_extract_main_part(): url_main_part = 'flickr.com/photos/alexaimephotography' parts = [ ['http://', 'https://'...
url_main_part
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_utils.py
test_case_convert_snake_to_camel
assert
string_literal
18
import itertools import re from maigret.utils import ( CaseConverter, is_country_tag, enrich_link_str, URLMatcher, get_dict_ascii_tree, get_match_ratio, ) def test_case_convert_snake_to_camel(): a = 'camel_cased_string' b = CaseConverter.snake_to_camel(a) assert b ==
'camelCasedString'
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_utils.py
test_case_convert_camel_to_snake
assert
string_literal
18
import itertools import re from maigret.utils import ( CaseConverter, is_country_tag, enrich_link_str, URLMatcher, get_dict_ascii_tree, get_match_ratio, ) def test_case_convert_camel_to_snake(): a = 'SnakeCasedString' b = CaseConverter.camel_to_snake(a) assert b ==
'snake_cased_string'
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_utils.py
test_case_convert_snake_to_title
assert
string_literal
18
import itertools import re from maigret.utils import ( CaseConverter, is_country_tag, enrich_link_str, URLMatcher, get_dict_ascii_tree, get_match_ratio, ) def test_case_convert_snake_to_title(): a = 'camel_cased_string' b = CaseConverter.snake_to_title(a) assert b ==
'Camel cased string'
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_utils.py
test_url_make_profile_url_regexp
assert
func_call
28
import itertools import re from maigret.utils import ( CaseConverter, is_country_tag, enrich_link_str, URLMatcher, get_dict_ascii_tree, get_match_ratio, ) def test_url_make_profile_url_regexp(): url_main_part = 'flickr.com/photos/{username}' parts = [ ['http://', 'https://'], ...
r'^https?://(www.|m.)?flickr\.com/photos/(.+?)$'
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
soxoj/maigret
13c20afe5bd7b88ff19772b303013592392099ee
48
train
train
tests/test_utils.py
test_enrich_link_str
assert
string_literal
16
import itertools import re from maigret.utils import ( CaseConverter, is_country_tag, enrich_link_str, URLMatcher, get_dict_ascii_tree, get_match_ratio, ) def test_enrich_link_str(): assert enrich_link_str('test') == 'test' assert
'<a class="auto-link" href="www.flickr.com/photos/alexaimephotography/">www.flickr.com/photos/alexaimephotography/</a>'
13c20afe5bd7b88ff19772b303013592392099ee
48
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/api_chat_test.py
check_num_choices_matches_n
assert
variable
34
import base64 from pathlib import Path from typing import Self from openai import AsyncOpenAI from openai.types.chat import ( ChatCompletion, ChatCompletionAudioParam, ChatCompletionChunk, ) from openai.types.chat.completion_create_params import ( CompletionCreateParamsNonStreaming, CompletionCreat...
i
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/api_chat_test.py
check_all_chat_completion_ids_are_the_same
assert
numeric_literal
33
import base64 from pathlib import Path from typing import Self from openai import AsyncOpenAI from openai.types.chat import ( ChatCompletion, ChatCompletionAudioParam, ChatCompletionChunk, ) from openai.types.chat.completion_create_params import ( CompletionCreateParamsNonStreaming, CompletionCreat...
1
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/api_chat_test.py
correct_attributes_based_on_modality
assert
none_literal
40
import base64 from pathlib import Path from typing import Self from openai import AsyncOpenAI from openai.types.chat import ( ChatCompletion, ChatCompletionAudioParam, ChatCompletionChunk, ) from openai.types.chat.completion_create_params import ( CompletionCreateParamsNonStreaming, CompletionCreat...
None
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/api_chat_test.py
check_num_choices_matches_n
assert
string_literal
35
import base64 from pathlib import Path from typing import Self from openai import AsyncOpenAI from openai.types.chat import ( ChatCompletion, ChatCompletionAudioParam, ChatCompletionChunk, ) from openai.types.chat.completion_create_params import ( CompletionCreateParamsNonStreaming, CompletionCreat...
"stop"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/api_chat_test.py
check_num_choices_matches_n
assert
func_call
32
import base64 from pathlib import Path from typing import Self from openai import AsyncOpenAI from openai.types.chat import ( ChatCompletion, ChatCompletionAudioParam, ChatCompletionChunk, ) from openai.types.chat.completion_create_params import ( CompletionCreateParamsNonStreaming, CompletionCreat...
self.body.get("n", 1)
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/api_model_test.py
test_model_exists
assert
variable
15
import openai from openai import AsyncOpenAI import pytest MODEL_ID_THAT_EXISTS = "Systran/faster-whisper-tiny.en" MODEL_ID_THAT_DOES_NOT_EXIST = "i-do-not-exist" MIN_EXPECTED_NUMBER_OF_MODELS = 70 # At the time of the test creation there are 89 models @pytest.mark.parametrize("pull_model_without_cleanup", [MODEL_ID...
MODEL_ID_THAT_EXISTS
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/api_model_test.py
test_model_does_not_exist
pytest.raises
complex_expr
12
import openai from openai import AsyncOpenAI import pytest MODEL_ID_THAT_EXISTS = "Systran/faster-whisper-tiny.en" MODEL_ID_THAT_DOES_NOT_EXIST = "i-do-not-exist" MIN_EXPECTED_NUMBER_OF_MODELS = 70 # At the time of the test creation there are 89 models @pytest.mark.asyncio async def test_model_does_not_exist(openai_...
openai.NotFoundError)
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/api_timestamp_granularities_test.py
test_api_verbose_json_response_format_and_timestamp_granularities_combinations
assert
none_literal
29
from pathlib import Path from openai import AsyncOpenAI import pytest from speaches.api_types import TIMESTAMP_GRANULARITIES_COMBINATIONS, TimestampGranularities TRANSCRIPTION_MODEL_ID = "Systran/faster-whisper-tiny.en" @pytest.mark.parametrize("pull_model_without_cleanup", [TRANSCRIPTION_MODEL_ID], indirect=True) ...
None
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/conftest.py
dynamic_openai_client
assert
collection
88
from collections.abc import AsyncGenerator, Generator from contextlib import AbstractAsyncContextManager, asynccontextmanager import logging import os from typing import Literal, Protocol from fastapi.testclient import TestClient import httpx from httpx import ASGITransport, AsyncClient from openai import AsyncOpenAI ...
["speaches", "openai"]
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/model_manager_test.py
test_model_unloaded_after_ttl
assert
numeric_literal
20
import asyncio import anyio import pytest from speaches.config import Config from tests.conftest import AclientFactory MODEL_ID = "Systran/faster-whisper-tiny.en" @pytest.mark.parametrize("pull_model_without_cleanup", [MODEL_ID], indirect=True) @pytest.mark.usefixtures("pull_model_without_cleanup") @pytest.mark.asy...
0
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/model_manager_test.py
test_model_unloaded_after_ttl
assert
numeric_literal
23
import asyncio import anyio import pytest from speaches.config import Config from tests.conftest import AclientFactory MODEL_ID = "Systran/faster-whisper-tiny.en" @pytest.mark.parametrize("pull_model_without_cleanup", [MODEL_ID], indirect=True) @pytest.mark.usefixtures("pull_model_without_cleanup") @pytest.mark.asy...
1
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/model_manager_test.py
test_model_cant_be_unloaded_when_used
assert
numeric_literal
29
import asyncio import anyio import pytest from speaches.config import Config from tests.conftest import AclientFactory MODEL_ID = "Systran/faster-whisper-tiny.en" @pytest.mark.parametrize("pull_model_without_cleanup", [MODEL_ID], indirect=True) @pytest.mark.usefixtures("pull_model_without_cleanup") @pytest.mark.asy...
409
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/model_manager_test.py
test_model_cant_be_loaded_twice
assert
numeric_literal
20
import asyncio import anyio import pytest from speaches.config import Config from tests.conftest import AclientFactory MODEL_ID = "Systran/faster-whisper-tiny.en" @pytest.mark.parametrize("pull_model_without_cleanup", [MODEL_ID], indirect=True) @pytest.mark.usefixtures("pull_model_without_cleanup") @pytest.mark.asy...
201
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/openai_timestamp_granularities_test.py
test_openai_verbose_json_response_format_and_timestamp_granularities_combinations
assert
none_literal
27
from pathlib import Path from openai import AsyncOpenAI, BadRequestError import pytest from speaches.api_types import TIMESTAMP_GRANULARITIES_COMBINATIONS, TimestampGranularities @pytest.mark.asyncio @pytest.mark.requires_openai @pytest.mark.parametrize("timestamp_granularities", TIMESTAMP_GRANULARITIES_COMBINATIONS...
None
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/openai_timestamp_granularities_test.py
test_openai_json_response_format_and_timestamp_granularities_combinations
pytest.raises
variable
18
from pathlib import Path from openai import AsyncOpenAI, BadRequestError import pytest from speaches.api_types import TIMESTAMP_GRANULARITIES_COMBINATIONS, TimestampGranularities @pytest.mark.asyncio @pytest.mark.requires_openai @pytest.mark.parametrize("timestamp_granularities", TIMESTAMP_GRANULARITIES_COMBINATIONS...
BadRequestError)
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/realtime_api_test.py
test_conversation_mode_default
assert
none_literal
23
from unittest.mock import MagicMock from fastapi.testclient import TestClient from pydantic import SecretStr import pytest from pytest_mock import MockerFixture from speaches.config import Config, WhisperConfig from speaches.realtime.utils import verify_websocket_api_key from speaches.main import create_app from spea...
None
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/realtime_api_test.py
test_transcription_mode_with_language
assert
string_literal
24
from unittest.mock import MagicMock from fastapi.testclient import TestClient from pydantic import SecretStr import pytest from pytest_mock import MockerFixture from speaches.config import Config, WhisperConfig from speaches.realtime.utils import verify_websocket_api_key from speaches.main import create_app from spea...
"ru"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/realtime_api_test.py
test_websocket_parameter_parsing
assert
string_literal
38
from unittest.mock import MagicMock from fastapi.testclient import TestClient from pydantic import SecretStr import pytest from pytest_mock import MockerFixture from speaches.config import Config, WhisperConfig from speaches.realtime.utils import verify_websocket_api_key from speaches.main import create_app from spea...
"en"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/realtime_api_test.py
test_default_models_configuration
assert
string_literal
23
from unittest.mock import MagicMock from fastapi.testclient import TestClient from pydantic import SecretStr import pytest from pytest_mock import MockerFixture from speaches.config import Config, WhisperConfig from speaches.realtime.utils import verify_websocket_api_key from speaches.main import create_app from spea...
"af_heart"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/realtime_api_test.py
test_conversation_mode_with_custom_transcription
assert
string_literal
25
from unittest.mock import MagicMock from fastapi.testclient import TestClient from pydantic import SecretStr import pytest from pytest_mock import MockerFixture from speaches.config import Config, WhisperConfig from speaches.realtime.utils import verify_websocket_api_key from speaches.main import create_app from spea...
"whisper-1"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/realtime_api_test.py
test_session_configuration_logging
assert
complex_expr
24
from unittest.mock import MagicMock from fastapi.testclient import TestClient from pydantic import SecretStr import pytest from pytest_mock import MockerFixture from speaches.config import Config, WhisperConfig from speaches.realtime.utils import verify_websocket_api_key from speaches.main import create_app from spea...
caplog.text
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/realtime_api_test.py
test_websocket_parameter_parsing
assert
string_literal
24
from unittest.mock import MagicMock from fastapi.testclient import TestClient from pydantic import SecretStr import pytest from pytest_mock import MockerFixture from speaches.config import Config, WhisperConfig from speaches.realtime.utils import verify_websocket_api_key from speaches.main import create_app from spea...
"test-model"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/realtime_api_test.py
test_websocket_parameter_parsing
assert
string_literal
37
from unittest.mock import MagicMock from fastapi.testclient import TestClient from pydantic import SecretStr import pytest from pytest_mock import MockerFixture from speaches.config import Config, WhisperConfig from speaches.realtime.utils import verify_websocket_api_key from speaches.main import create_app from spea...
"custom-model"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/realtime_api_test.py
test_session_structure_compatibility
assert
complex_expr
31
from unittest.mock import MagicMock from fastapi.testclient import TestClient from pydantic import SecretStr import pytest from pytest_mock import MockerFixture from speaches.config import Config, WhisperConfig from speaches.realtime.utils import verify_websocket_api_key from speaches.main import create_app from spea...
session.modalities
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/realtime_api_test.py
test_websocket_auth_invalid_key
pytest.raises
variable
33
from unittest.mock import MagicMock from fastapi.testclient import TestClient from pydantic import SecretStr import pytest from pytest_mock import MockerFixture from speaches.config import Config, WhisperConfig from speaches.realtime.utils import verify_websocket_api_key from speaches.main import create_app from spea...
WebSocketException)
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/realtime_api_test.py
test_transcription_mode_with_explicit_models
assert
string_literal
25
from unittest.mock import MagicMock from fastapi.testclient import TestClient from pydantic import SecretStr import pytest from pytest_mock import MockerFixture from speaches.config import Config, WhisperConfig from speaches.realtime.utils import verify_websocket_api_key from speaches.main import create_app from spea...
"custom-whisper-model"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/realtime_api_test.py
test_conversation_mode_default
assert
string_literal
20
from unittest.mock import MagicMock from fastapi.testclient import TestClient from pydantic import SecretStr import pytest from pytest_mock import MockerFixture from speaches.config import Config, WhisperConfig from speaches.realtime.utils import verify_websocket_api_key from speaches.main import create_app from spea...
"gpt-4o-realtime-preview"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/speech_test.py
test_speech_valid_resample
assert
variable
31
import io from openai import AsyncOpenAI, UnprocessableEntityError import pytest import soundfile as sf from speaches.routers.speech import ( DEFAULT_RESPONSE_FORMAT, SUPPORTED_RESPONSE_FORMATS, ResponseFormat, ) SPEECH_MODEL_ID = "speaches-ai/Kokoro-82M-v1.0-ONNX" VOICE_ID = "af_heart" DEFAULT_INPUT = "...
sample_rate
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/speech_test.py
test_create_speech_with_varying_speed
assert
variable
33
import io from openai import AsyncOpenAI, UnprocessableEntityError import pytest import soundfile as sf from speaches.routers.speech import ( DEFAULT_RESPONSE_FORMAT, SUPPORTED_RESPONSE_FORMATS, ResponseFormat, ) SPEECH_MODEL_ID = "speaches-ai/Kokoro-82M-v1.0-ONNX" VOICE_ID = "af_heart" DEFAULT_INPUT = "...
previous_size
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/speech_test.py
test_create_speech_with_unsupported_speed
pytest.raises
variable
23
import io from openai import AsyncOpenAI, UnprocessableEntityError import pytest import soundfile as sf from speaches.routers.speech import ( DEFAULT_RESPONSE_FORMAT, SUPPORTED_RESPONSE_FORMATS, ResponseFormat, ) SPEECH_MODEL_ID = "speaches-ai/Kokoro-82M-v1.0-ONNX" VOICE_ID = "af_heart" DEFAULT_INPUT = "...
UnprocessableEntityError)
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/sse_test.py
test_streaming_transcription_text
assert
numeric_literal
42
import json from pathlib import Path import anyio from httpx import AsyncClient from httpx_sse import aconnect_sse import pytest import srt import webvtt import webvtt.vtt from speaches.api_types import ( CreateTranscriptionResponseJson, CreateTranscriptionResponseVerboseJson, ) MODEL_ID = "Systran/faster-wh...
1
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/sse_test.py
test_transcription_vtt
assert
numeric_literal
38
import json from pathlib import Path import anyio from httpx import AsyncClient from httpx_sse import aconnect_sse import pytest import srt import webvtt import webvtt.vtt from speaches.api_types import ( CreateTranscriptionResponseJson, CreateTranscriptionResponseVerboseJson, ) MODEL_ID = "Systran/faster-wh...
200
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/sse_test.py
test_transcription_srt
pytest.raises
complex_expr
44
import json from pathlib import Path import anyio from httpx import AsyncClient from httpx_sse import aconnect_sse import pytest import srt import webvtt import webvtt.vtt from speaches.api_types import ( CreateTranscriptionResponseJson, CreateTranscriptionResponseVerboseJson, ) MODEL_ID = "Systran/faster-wh...
srt.SRTParseError)
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/sse_test.py
test_transcription_vtt
assert
string_literal
39
import json from pathlib import Path import anyio from httpx import AsyncClient from httpx_sse import aconnect_sse import pytest import srt import webvtt import webvtt.vtt from speaches.api_types import ( CreateTranscriptionResponseJson, CreateTranscriptionResponseVerboseJson, ) MODEL_ID = "Systran/faster-wh...
"text/vtt; charset=utf-8"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/sse_test.py
test_transcription_vtt
pytest.raises
complex_expr
43
import json from pathlib import Path import anyio from httpx import AsyncClient from httpx_sse import aconnect_sse import pytest import srt import webvtt import webvtt.vtt from speaches.api_types import ( CreateTranscriptionResponseJson, CreateTranscriptionResponseVerboseJson, ) MODEL_ID = "Systran/faster-wh...
webvtt.vtt.MalformedFileError)
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/sse_test.py
test_transcription_srt
assert
complex_expr
39
import json from pathlib import Path import anyio from httpx import AsyncClient from httpx_sse import aconnect_sse import pytest import srt import webvtt import webvtt.vtt from speaches.api_types import ( CreateTranscriptionResponseJson, CreateTranscriptionResponseVerboseJson, ) MODEL_ID = "Systran/faster-wh...
response.headers["content-type"]
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/text_utils_test.py
test_eof_text_chunker
assert
numeric_literal
35
import asyncio import pytest from speaches.text_utils import ( EOFTextChunker, srt_format_timestamp, strip_markdown_emphasis, vtt_format_timestamp, ) @pytest.mark.asyncio async def test_eof_text_chunker() -> None: # Test that the chunker only yields when closed chunker = EOFTextChunker() ...
0
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/text_utils_test.py
test_eof_text_chunker
assert
numeric_literal
45
import asyncio import pytest from speaches.text_utils import ( EOFTextChunker, srt_format_timestamp, strip_markdown_emphasis, vtt_format_timestamp, ) @pytest.mark.asyncio async def test_eof_text_chunker() -> None: # Test that the chunker only yields when closed chunker = EOFTextChunker() ...
1
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/text_utils_test.py
test_eof_text_chunker_closed_error
pytest.raises
variable
19
import asyncio import pytest from speaches.text_utils import ( EOFTextChunker, srt_format_timestamp, strip_markdown_emphasis, vtt_format_timestamp, ) @pytest.mark.asyncio async def test_eof_text_chunker_closed_error() -> None: # Test that adding tokens to a closed chunker raises an error chun...
RuntimeError)
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/text_utils_test.py
test_srt_format_timestamp
assert
string_literal
14
import asyncio import pytest from speaches.text_utils import ( EOFTextChunker, srt_format_timestamp, strip_markdown_emphasis, vtt_format_timestamp, ) def test_srt_format_timestamp() -> None: assert srt_format_timestamp(0.0) ==
"00:00:00,000"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/text_utils_test.py
test_srt_format_timestamp
assert
string_literal
15
import asyncio import pytest from speaches.text_utils import ( EOFTextChunker, srt_format_timestamp, strip_markdown_emphasis, vtt_format_timestamp, ) def test_srt_format_timestamp() -> None: assert srt_format_timestamp(0.0) == "00:00:00,000" assert srt_format_timestamp(1.0) ==
"00:00:01,000"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/text_utils_test.py
test_srt_format_timestamp
assert
string_literal
16
import asyncio import pytest from speaches.text_utils import ( EOFTextChunker, srt_format_timestamp, strip_markdown_emphasis, vtt_format_timestamp, ) def test_srt_format_timestamp() -> None: assert srt_format_timestamp(0.0) == "00:00:00,000" assert srt_format_timestamp(1.0) == "00:00:01,000" ...
"00:00:01,234"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/text_utils_test.py
test_srt_format_timestamp
assert
string_literal
17
import asyncio import pytest from speaches.text_utils import ( EOFTextChunker, srt_format_timestamp, strip_markdown_emphasis, vtt_format_timestamp, ) def test_srt_format_timestamp() -> None: assert srt_format_timestamp(0.0) == "00:00:00,000" assert srt_format_timestamp(1.0) == "00:00:01,000" ...
"00:01:00,000"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/text_utils_test.py
test_srt_format_timestamp
assert
string_literal
18
import asyncio import pytest from speaches.text_utils import ( EOFTextChunker, srt_format_timestamp, strip_markdown_emphasis, vtt_format_timestamp, ) def test_srt_format_timestamp() -> None: assert srt_format_timestamp(0.0) == "00:00:00,000" assert srt_format_timestamp(1.0) == "00:00:01,000" ...
"00:01:01,000"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/text_utils_test.py
test_vtt_format_timestamp
assert
string_literal
14
import asyncio import pytest from speaches.text_utils import ( EOFTextChunker, srt_format_timestamp, strip_markdown_emphasis, vtt_format_timestamp, ) def test_vtt_format_timestamp() -> None: assert vtt_format_timestamp(0.0) ==
"00:00:00.000"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/text_utils_test.py
test_vtt_format_timestamp
assert
string_literal
15
import asyncio import pytest from speaches.text_utils import ( EOFTextChunker, srt_format_timestamp, strip_markdown_emphasis, vtt_format_timestamp, ) def test_vtt_format_timestamp() -> None: assert vtt_format_timestamp(0.0) == "00:00:00.000" assert vtt_format_timestamp(1.0) ==
"00:00:01.000"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/text_utils_test.py
test_vtt_format_timestamp
assert
string_literal
16
import asyncio import pytest from speaches.text_utils import ( EOFTextChunker, srt_format_timestamp, strip_markdown_emphasis, vtt_format_timestamp, ) def test_vtt_format_timestamp() -> None: assert vtt_format_timestamp(0.0) == "00:00:00.000" assert vtt_format_timestamp(1.0) == "00:00:01.000" ...
"00:00:01.234"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/text_utils_test.py
test_vtt_format_timestamp
assert
string_literal
17
import asyncio import pytest from speaches.text_utils import ( EOFTextChunker, srt_format_timestamp, strip_markdown_emphasis, vtt_format_timestamp, ) def test_vtt_format_timestamp() -> None: assert vtt_format_timestamp(0.0) == "00:00:00.000" assert vtt_format_timestamp(1.0) == "00:00:01.000" ...
"00:01:00.000"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/text_utils_test.py
test_vtt_format_timestamp
assert
string_literal
18
import asyncio import pytest from speaches.text_utils import ( EOFTextChunker, srt_format_timestamp, strip_markdown_emphasis, vtt_format_timestamp, ) def test_vtt_format_timestamp() -> None: assert vtt_format_timestamp(0.0) == "00:00:00.000" assert vtt_format_timestamp(1.0) == "00:00:01.000" ...
"00:01:01.000"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/text_utils_test.py
test_eof_text_chunker
assert
string_literal
46
import asyncio import pytest from speaches.text_utils import ( EOFTextChunker, srt_format_timestamp, strip_markdown_emphasis, vtt_format_timestamp, ) @pytest.mark.asyncio async def test_eof_text_chunker() -> None: # Test that the chunker only yields when closed chunker = EOFTextChunker() ...
"Hello world!"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor
speaches-ai/speaches
62cc77d10e463447eedb70beab6ea50680b58762
53
train
train
tests/text_utils_test.py
test_strip_markdown_emphasis
assert
string_literal
17
import asyncio import pytest from speaches.text_utils import ( EOFTextChunker, srt_format_timestamp, strip_markdown_emphasis, vtt_format_timestamp, ) def test_strip_markdown_emphasis() -> None: assert strip_markdown_emphasis("Hello my name is **Jon**") == "Hello my name is Jon" assert strip_m...
"This is italic"
62cc77d10e463447eedb70beab6ea50680b58762
53
v2_extractor_at_anchor