language string | code-snippit string | instruction string | flaws list | flaw_count int64 |
|---|---|---|---|---|
python | hass: HomeAssistant,
entity_registry: er.EntityRegistry,
zone_device: ZoneDevice,
) -> None:
"""Service validation rejects values outside the allowed range."""
configure_zone_device(
zone_device,
zones=[["Living", "1", 22]],
target_temperature=22,
)
await _async_setup_dai... | Review this code and list any quality issues. | [] | 0 |
python | image = open(input, "rb").read()
endpoint = "https://.cognitiveservices.azure.com/"
subscription_key = ""
headers = {
"Content-Type": "application/octet-stream",
"Ocp-Apim-Subscription-Key": subscription_key
}
response = req... | Review this code and list any quality issues. | [] | 0 |
python | self.assertEqual(s.getvalue(), expected)
def test_defaults_handle_spaces_at_start_of_subject(self):
source = " Уведомление"
expected = b"Subject: =?utf-8?b?0KPQstC10LTQvtC80LvQtdC90LjQtQ==?=\n\n"
msg = EmailMessage()
msg['Subject'] = source
s = io.BytesIO()
g = Byte... | Review this code and list any quality issues. | [
{
"issue": "The full URL link is redundant. I suggest using `# gh-144156: a brief description.`",
"severity": "minor",
"line": 26
}
] | 1 |
python | if self.target != value.target:
return False
return True
class DataNode(GraphNode):
value: Any
typ: type
__slots__ = tuple(__annotations__)
def __init__(self, key: Any, value: Any):
if key is None:
key = (type(value).__name__, next(_anom_count))
self.ke... | Review this code and list any quality issues. | [
{
"issue": "This is an interesting change that will affect scheduling behavior. Likely not in a meaningful way but it's not entirely obvious.\r\n\r\nThese kind of tasks were previously not considered as root-ish but now will be. The interesting part about these is that they will allocate memory not when they ar... | 1 |
python | key_mapped_source.add(source_map[key1])
key_mapped_target.add(target_map[key2])
source_map.pop(key1, None)
target_map.pop(key2, None)
if len(key_mapped_source) > 0:
anims.append(
FadeTransformPieces(key_mapped_source, key_mapped_target,... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n FadeIn(fade_target_copy, target_position=fade_target, **kwargs),\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | return []
# Tool specification (for /tools command)
tool = ToolSpec(
name="lessons",
desc="Lesson system for structured guidance",
instructions="""
The lesson system provides structured guidance through context-aware lessons.
Lessons are automatically included based on:
- Keywords from recent messages (i... | Review this code and list any quality issues. | [
{
"issue": "This seems/reads like documentation-like instructions, not agent instructions for how the lesson system works, how it will help the agent, and how the agent can improve itself be leveraging it.",
"severity": "minor",
"line": 26
}
] | 1 |
python | import logging
from pathlib import Path
from typing import Tuple
import click
from google.cloud import storage
from tqdm import tqdm
from dolma.util import prepare_cli_environment
log = logging.getLogger(__name__)
@click.command()
@click.argument(
"wandb_run_path",
type=str,
)
@click.argument(
"files_o... | Review this code and list any quality issues. | [
{
"issue": "Maybe a help description here that at least says what \"wandb_run_path\" is. That wasn't obvious to me.",
"severity": "minor",
"line": 14
}
] | 1 |
python | def test_py_script_src_attribute(self):
self.writefile("foo.py", "print('hello from foo')")
self.pyscript_run(
"""
<py-script src="foo.py"></py-script>
"""
)
assert self.console.log.lines[0] == self.PY_COMPLETE
assert self.console.log.lines[-1]... | Review this code and list any quality issues. | [
{
"issue": "Probably late but this error message and the one below it are extremely similar.\r\nI guess we can make the error message common and then remove the `if/else` check here.",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'id': 'the-audio-long-read',
'title': 'The Audio Long Read | News | The Guardian',
'description': 'md5:5462994a27527309562b25b6defc4ef3'
},
'playlist_mincount': 1008
}]
def _fetch_page(self, url, playlist_id, page):
page += 1
webpage = self._download_webp... | Review this code and list any quality issues. | [
{
"issue": "Might be nice to extract a title without the \" | The Guardian\" junk at the end. Also use `clean_html` just in case\r\n```suggestion\r\n title = clean_html(get_element_by_class(\r\n 'index-page-header__title', webpage)) or self._generic_title(url, webpage)\r\n description =... | 1 |
python | logger.warning(errors_msg)
self._add_terminate_errors(
ids,
request_id,
details=errors_msg,
)
return
try:
self._submit_scale_request(scale_request)
except Exception as e:
logger.exception(f"Error... | Review this code and list any quality issues. | [
{
"issue": "Can we have a dedicated try/except block for _initialize_scale_request?",
"severity": "minor",
"line": 26
}
] | 1 |
python | model_names = [ state_manager.get_item('background_remover_model') ]
model_source_set = get_model_options().get('sources')
return inference_manager.get_inference_pool(__name__, model_names, model_source_set)
def clear_inference_pool() -> None:
model_names = [ state_manager.get_item('background_remover_model') ]
... | Review this code and list any quality issues. | [
{
"issue": "it is always underscore for model names",
"severity": "minor",
"line": 26
}
] | 1 |
python | or False if the executable is not present """
out = _get_exe_version_output(exe, args)
return detect_exe_version(out, version_re, unrecognized) if out else False
class LazyList(collections.abc.Sequence):
''' Lazy immutable list from an iterable
Note that slices of a LazyList are lists and not LazyList... | Review this code and list any quality issues. | [] | 0 |
python | def test_pipeline_compute_before_bts(self):
# for storing and keeping track of calls to BTS and TestFactor.compute
history = []
counter = [0]
class TestFactor(CustomFactor, SingleInputMixin):
inputs = [TestingDataSet.float_col]
def compute(self, today, assets,... | Review this code and list any quality issues. | [
{
"issue": "I would just call `pipeline_output` here. Storing the result on `context.results` makes me think that that's somehow relevant to the behavior under test here.",
"severity": "minor",
"line": 26
}
] | 1 |
python | import asyncio
from dataclasses import dataclass
import datetime
import logging
from pyyardian import AsyncYardianClient, NetworkException, NotAuthorizedException
from pyyardian.typing import OperationInfo
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassis... | Review this code and list any quality issues. | [
{
"issue": "can we type the inner list a bit more specific?",
"severity": "minor",
"line": 26
}
] | 1 |
python | assert_frame_equal(reloaded_df, dummy_dataframe)
def test_config_missing_type(self, correct_config):
"""Check the error if type attribute is missing for some dataset(s)
in the config"""
del correct_config["catalog"]["boats"]["type"]
pattern = (
"A... | Review this code and list any quality issues. | [] | 0 |
python | 'description': 'md5:35074f6190cef52b05dd133bb2ef460e',
'upload_date': '20220525',
'timestamp': 1653460637,
'release_date': '20220525',
'thumbnail': 'https://images.noiceid.cc/catalog/content-1653460337625',
'title': 'Eps 1: Dijodohin Sama Anak Pak RT',
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n for url in variadic(media_url):\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | def setup_network(self):
"""Set up nodes normally, but save a copy of their arguments before starting them."""
self.add_nodes(self.num_nodes, self.extra_args)
node_argv = self.get_binaries().node_argv()
self.node_options = [node.args[len(node_argv):] for node in self.nodes]
asser... | Review this code and list any quality issues. | [] | 0 |
python | def export(
self,
metrics_data: MetricsData,
timeout_millis: float = 10_000,
**kwargs,
) -> MetricExportResult:
self.f.write(metrics_data.to_json())
self.f.write('\n')
self.f.flush()
return MetricExportResult.SUCCESS
def shutdown(self, timeout_mil... | Review this code and list any quality issues. | [] | 0 |
python | def get_description(self):
return _resolve_value(self.description, None)
def get_item_height(self, font: rl.Font, max_width: int) -> float:
if not self.is_visible:
return 0
current_description = self.get_description()
if self.description_visible and current_description:
if (
not ... | Review this code and list any quality issues. | [
{
"issue": "Can we move some of these custom properties into Widget? I want to be able to add any arbitrary Widget into a list view in the future (with or without actions), to allow more flexible design\r\n\r\nThink https://doc.qt.io/qt-6/qvboxlayout.html",
"severity": "minor",
"line": 26
}
] | 1 |
python | #########################
# Doc Auto Generation #
#########################
TMPL_APIDOC = "apidoc.tmpl"
#########################
# Class Auto Generation #
#########################
TMPL_MODULE = "module.tmpl"
UPPER_WORDS = {
"aws": ("aws", "api", "ebs", "ec2", "efs", "emr", "rds", "ml", "mq", "nat", "vpc", "... | Review this code and list any quality issues. | [
{
"issue": "`generic` key is duplicated, remove it plz.",
"severity": "major",
"line": 26
}
] | 1 |
python | time elapsed since the last snapshot. The delay in the snapshot reflects the time deviation due to event loop
overhead - it's calculated by subtracting the expected interval between snapshots from the actual time elapsed
since the last snapshot. If there's no previous snapshot, the delay is considered z... | Review this code and list any quality issues. | [
{
"issue": "And this does not seem to be correct.",
"severity": "minor",
"line": 26
}
] | 1 |
python | elif any(self.match_model_tensor_name(new_name, t, bid, suffix="") for t in [
gguf.MODEL_TENSOR.SSM_A,
gguf.MODEL_TENSOR.SSM_D,
]):
# unsqueeze A to use similar shape semantics as Mamba-1
# (D is also unsqueezed, but for more straightforward broadcast internally)
... | Review this code and list any quality issues. | [
{
"issue": "Remove this method, only for BPE.",
"severity": "major",
"line": 26
}
] | 1 |
python | self.assertIn("test_stop on master", stdout)
self.assertIn("test_stop on worker", stdout_worker)
self.assertIn("test_start on worker", stdout_worker)
self.assertEqual(0, proc.returncode)
self.assertEqual(0, proc_worker.returncode)
def test_distributed_tags(self):
... | Review this code and list any quality issues. | [
{
"issue": "Do we really need this `print` here?",
"severity": "minor",
"line": 26
}
] | 1 |
python | def test_list_sum_and_dtypes() -> None:
# ensure the dtypes of sum align with normal sum
for dt_in, dt_out in [
(pl.Int8, pl.Int64),
(pl.Int16, pl.Int64),
(pl.Int32, pl.Int32),
(pl.Int64, pl.Int64),
(pl.Int128, pl.Int128),
(pl.UInt8, pl.Int64),
(pl.UInt16,... | Review this code and list any quality issues. | [
{
"issue": "We shouldn't remove the check on the exact values here\r\n\r\nCould we refactor this test case to use `assert_series/frame_equal` instead? That will check both the values and dtype correctness",
"severity": "major",
"line": 26
}
] | 1 |
python | yield obj[key]
def apply_path(start_obj, path):
objs = (start_obj,)
has_branched = False
for key in variadic(path):
if is_user_input and key == ':':
key = ...
if not casesense and isinstance(key, str):
key = key.casefold()
... | Review this code and list any quality issues. | [
{
"issue": "this should check for `get_all` too",
"severity": "minor",
"line": 26
}
] | 1 |
python | if event.user_id is not None:
event.user_id = anonymizer.anonymize("user", event.user_id)
case "ranking":
event: ExportMessageEventRanking = event
if event.user_id is not None:
... | Review this code and list any quality issues. | [] | 0 |
python | return self.async_show_form(
step_id="user",
data_schema=CONFIG_SCHEMA,
errors=errors,
)
async def async_step_reconfigure(
self, user_input: dict[str, Any] | None = None
) -> ConfigFlowResult:
"""Handle reconfiguration of the integration."""
e... | Review this code and list any quality issues. | [
{
"issue": "I think a common validation method might be nice, to avoid code duplication across user, reauth & reconfigure",
"severity": "critical",
"line": 26
}
] | 1 |
python | class InstagramIE(InstagramBaseIE):
_VALID_URL = r'(?P<url>https?://(?:www\.)?instagram\.com(?:/[^/]+)?/(?:p|tv|reel)/(?P<id>[^/?#&]+))'
_EMBED_REGEX = [r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?instagram\.com/p/[^/]+/embed.*?)\1']
_TESTS = [{
'url': 'https://instagram.com/p/aye83Djau... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'General metadata extraction failed',\r\n 'Main webpage is locked behind the login page',\r\n```",
"severity": "critical",
"line": 26
}
] | 1 |
python | return messages
@override
def get_mm_inputs(
self,
images: list["ImageInput"],
videos: list["VideoInput"],
audios: list["AudioInput"],
imglens: list[int],
vidlens: list[int],
audlens: list[int],
batch_ids: list[list[int]],
processor: Optio... | Review this code and list any quality issues. | [
{
"issue": "Why is this method overridden?",
"severity": "minor",
"line": 26
}
] | 1 |
python | # Non-regression test for:
# https://github.com/scikit-learn/scikit-learn/issues/27081
rng = np.random.RandomState(0)
X_train = rng.rand(3000, 10)
bkm = BisectingKMeans(n_clusters=10, algorithm=algorithm).fit(X_train)
# predict on scaled data to trigger pathologic case
# where the inner mask le... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n Regression test for issue #33146\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'title': 'lamsinka89',
'description': 'RedGifs user lamsinka89, ordered by recent',
},
'playlist_mincount': 391,
},
{
'url': 'https://www.redgifs.com/users/lamsinka89?page=3',
'info_dict': {
'id': 'lamsinka89?page=3',
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'note': 'https://github.com/yt-dlp/yt-dlp/issues/7382',\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | PF_IS_BATCH_TIMEOUT_SYSTEM_SET,
)
from promptflow.tracing._integrations._openai_injector import inject_openai_api, recover_openai_api
from ..._user_agent import USER_AGENT
from .._utils import set_event_loop_policy
from .code_client import CodeClient
from .proxy_client import ProxyClient
class BatchRunContext:
d... | Review this code and list any quality issues. | [
{
"issue": "I don't see the need for another environment variable here. Why not use a class member variable of boolean type instead?",
"severity": "minor",
"line": 26
}
] | 1 |
python | import datetime
import prisma.fields
import prisma.models
import pytest
import backend.server.v2.library.model as library_model
@pytest.mark.asyncio
async def test_agent_preset_from_db():
# Create mock DB agent
db_agent = prisma.models.AgentPreset(
id="test-agent-123",
createdAt=datetime.dat... | Review this code and list any quality issues. | [] | 0 |
python | norm = mcolors.BoundaryNorm(bins, cmap.N)
# === Main Plot ===
fig, ax = plt.subplots(layout="constrained")
im = ax.imshow(Z, cmap=cmap,
origin='lower', extent=[-3, 3, -3, 3],
norm=norm)
# === Inset Histogram – Positioning adjusted ===
cax = ax.inset_axes([1.18, 0.02, 0.25, 0.95]) # left... | Review this code and list any quality issues. | [
{
"issue": "Maybe leave out to simplify code and resulting plot. It's not uncommon that colorbars are used without an explicit label if the imaged value is clear from context.",
"severity": "major",
"line": 26
}
] | 1 |
python | Path(path / "b/.definitely_exclude/a.pie"),
Path(path / "b/.definitely_exclude/a.py"),
Path(path / "b/.definitely_exclude/a.pyi"),
Path(path / ".gitignore"),
Path(path / "pyproject.toml"),
]
# Setting exclude explicitly to an empty string to block .gitigno... | Review this code and list any quality issues. | [
{
"issue": "Added a test case where the target folder was different to the root.",
"severity": "minor",
"line": 26
}
] | 1 |
python | async def farm_block(self, puzzle_hash: bytes32 = bytes32(b"0" * 32)) -> tuple[list[Coin], list[Coin]]:
# Fees get calculated
fees = uint64(0)
for item in self.mempool_manager.mempool.all_items():
fees = uint64(fees + item.fee)
# Rewards get created
next_block_height... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n additions = []\r\n removals = []\r\n```\r\n\r\nIt looks like you could just call this `additions` and have it be assigned if there is a block.",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'NL', 'NO', 'PF', 'PL', 'PM', 'PT', 'RE', 'RO',
'SE', 'SI', 'SK', 'SM', 'VA', 'WF', 'YT',
),
}
def _real_extract(self, url):
mobj = self._match_valid_url(url)
video_id = mobj.group('id')
lang = mobj.group('lang') or mobj.group('lang_2')
langauge_code = self._... | Review this code and list any quality issues. | [
{
"issue": "The var name isnt clear imo. potential duplicate what? `potential_duplicate_formats` works. Or maybe `secondary_formats`?",
"severity": "major",
"line": 26
}
] | 1 |
python | def test_weighted_percentile_equal():
"""Check `weighted_percentile` with unit weights and all 0 values in `array`."""
y = np.zeros(102, dtype=np.float64)
sw = np.ones(102, dtype=np.float64)
score = _weighted_percentile(y, sw, 50)
assert approx(score) == 0
# XXX: is this really what we want? Shoul... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n Check that leading zero-weight observations are ignored when `percentile_rank=0`.\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'url': 'https://app.idagio.com/albums/brahms-ein-deutsches-requiem-3B403DF6-62D7-4A42-807B-47173F3E0192',
'info_dict': {
'id': '2862ad4e-4a61-45ad-9ce4-7fcf0c2626fe',
'display_id': 'brahms-ein-deutsches-requiem-3B403DF6-62D7-4A42-807B-47173F3E0192',
'title': 'Brahms: Ein deut... | Review this code and list any quality issues. | [
{
"issue": "this is duplicated in each of the playlist extractors\r\n\r\nhave you considered a baseclass? and each subclass could just define a `_extract_playlist_metadata` method",
"severity": "major",
"line": 26
}
] | 1 |
python | def wait_and_get_object(
self, obj_id: str, timeout: Optional[float] = None
) -> List["torch.Tensor"]:
"""Atomically waits for the GPU object to be present in the GPU object
store, then gets it. If the object is not present after the optional
timeout, raise a TimeoutError.
A... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n \"\"\"\n Get another object ID of the GPU object that duplicates the given GPU object.\n Returns the object id if there is a duplicate, None if there is no duplicate.\n \"\"\"\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | # Verify both nodes are on a different chain
block0_best_hash, block1_best_hash = wallet0.getbestblockhash(), wallet1.getbestblockhash()
assert(block0_best_hash != block1_best_hash)
# Stop both nodes and replace node0 chain entirely for the node1 chain
self.stop_nodes()
for path... | Review this code and list any quality issues. | [
{
"issue": "nit: I haven't seen the format I'm proposing here but just to make it more clear if it makes sense...\r\n```suggestion\r\n self.log.info(\r\n \"Test that on a duplicate block disconnection event after unclean shutdown:\\n\"\r\n \" - wallet transactions are un-abandone... | 1 |
python | backend,
sig_paths,
should_save_workspace=should_save_workspace,
disable_progress=args.quiet or args.debug,
sample_path=sample_path,
)
except UnsupportedFormatError as e:
if input_format == FORMAT_CAPE:
log_unsupported_cape_report_error(str... | Review this code and list any quality issues. | [
{
"issue": "please create a type for the return value, or use `typing.TypedDict` to specify the expected keys in this dict.",
"severity": "minor",
"line": 26
}
] | 1 |
python | The prompt or prompts to guide the image generation. If not defined, one has to pass `prompt_embeds`
instead.
negative_prompt (`str` or `List[str]`, *optional*):
The prompt or prompts not to guide the image generation. If not defined, one has to pass
`negative... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n character here. Refer to the Diffusers [examples](https://github.com/huggingface/diffusers/pull/11582) and original [user guide](https://github.com/ali-vilab/VACE/blob/0897c6d055d7d9ea9e191dce763006664d9780f8/UserGuide.md) for a full list of supported tasks and use c... | 1 |
python | }]
def _real_extract(self, url):
video_id = self._match_id(url)
base_id, ac_idx = self._search_regex(r'(?P<id>aa[_\d]+)(?:\?ac=(?P<ac_idx>\d+))?', video_id,
'ac_idx_parse', group=['id', 'ac_idx']) or (None, None)
if base_id is not None:
... | Review this code and list any quality issues. | [
{
"issue": "```py\r\n season_number = season_id and next((...))\r\n```\r\nsame below",
"severity": "minor",
"line": 26
}
] | 1 |
python | """🤝 Human-in-the-Loop: Adding User Confirmation to Tool Calls
This example shows how to implement human-in-the-loop functionality with MCP Servers in your Agno tools.
It shows how to:
- Handle user confirmation during tool execution
- Gracefully cancel operations based on user choice
Some practical applications:
- ... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n\"\"\"Human-in-the-Loop: Adding User Confirmation to Tool Calls\r\n```",
"severity": "minor",
"line": 1
}
] | 1 |
python | self, pat, case, flags, na, regex=True
)
def _str_fullmatch(
self,
pat: str,
case: bool = True,
flags: int = 0,
na: Scalar | lib.NoDefault = lib.no_default,
):
if (not pat.endswith("$") or pat.endswith("\\$")) and not pat.startswith("^"):
pat ... | Review this code and list any quality issues. | [
{
"issue": "@rhshadrach I changed this and added a `self._has_regex_lookaround(pat)` to ArrowStringArray._str_fullmatch, to ensure the method here certainly uses the mixin version of `_str_match`, and not the ArrowStringArray, which would otherwise call the validation methods a second time (which can fail after... | 1 |
python | file_writer_class = (
_make_scene_file_writer_class(frames_tester)
if not last_frame
else DummySceneFileWriter
)
testRenderer = _make_test_renderer_class(renderer_class)
def real_test():
with frames_tester.testing():
sceneTested = _make_test_scene_class(
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n path = PATH_CONTROL_DATA / module_name\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | import shutil
import subprocess
from pathlib import Path
def patch_crawlee_version_in_pyproject_toml_based_project(project_path: Path, wheel_path: Path) -> None:
"""Ensure that the test is using current version of the crawlee from the source and not from Pypi."""
# Copy prepared .whl file
shutil.copy(whee... | Review this code and list any quality issues. | [] | 0 |
python | self.cursor.execute(
QUERY,
(app_id, n_memories),
)
results = self.cursor.fetchall()
memories = []
for result in results:
app_id, id, question, answer, timestamp, metadata = result
metadata = self._deserialize_json(metadata=metadata)
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n def count(self, app_id: str):\r\n```\r\n\r\nShould we just do this?",
"severity": "minor",
"line": 26
}
] | 1 |
python | """
def __init__(
self, color=RED, close_new_points=True, anchors_span_full_range=False, **kwargs
):
Arc.__init__(
self,
start_angle=0,
angle=TAU,
color=color,
close_new_points=close_new_points,
anchors_span_full_range=anch... | Review this code and list any quality issues. | [
{
"issue": "This isn't actually the distance between the mobjects, but a scaling factor. I think however that a buffer distance would make more sense. You might want to create an Issue for that.",
"severity": "minor",
"line": 26
}
] | 1 |
python | self.assertAlmostEqual(self._get_converted_pytorch_model(model2)(torch.randn(1, 3, 3, 3)).abs().sum().item(), 0)
def test_valuechoice_getitem_functional_expression(self):
@model_wrapper
class Net(nn.Module):
def __init__(self):
super().__init__()
self.dro... | Review this code and list any quality issues. | [] | 0 |
python | # We've shown that user_1 can't interact with the dataset from user_2
# Now have user_2 give proper permission to user_1 to read QUANTUM dataset
# Note: supported permission types are "read", "write", "delete" and "share"
print(
"\nOperation started as user_2 to give read permission to user_1 for th... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n # which user_1 currently does not have\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'id': 'c64916eb-10fb-46a9-9a19-8c4b7ed064e7',
'ext': 'mp4',
'title': 'PAULINHO LOKO NA LOCO!',
'description': 'live on na loco',
'uploader_id': '2MDO7Z1DPM',
'channel': 'paulinholokobr',
'channel_follower_count': int,
'comment_count': i... | Review this code and list any quality issues. | [
{
"issue": "Is `Mozilla` deliberately omitted from the beginning of the UA?\r\n```suggestion\r\n _CLIENT_ID = 'TlwKp1zmF6eKFpcisn3FyR18WkhcPkZtzwPVEEC3'\r\n _CLIENT_SECRET = 'Kp7tYlUN7LXvtcSpwYvIitgYcLparbtsQSe5AdyyCdiEJBP53Vt9J8eB4AsLdChIpcO2BM19RA3HsGtqDJFjWmwoonvMSG3ZQmnS8x1YIM8yl82xMXZGbE3NKiqmgBVU'\r... | 1 |
python | from .common import InfoExtractor
from .kaltura import KalturaIE
from ..utils import (
ExtractorError,
traverse_obj,
)
class AZMedienIE(InfoExtractor):
IE_DESC = 'AZ Medien videos'
_VALID_URL = r'''(?x)
https?://
(?:www\.|tv\.)?
(?:
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n [^/?#]+/\r\n```",
"severity": "minor",
"line": 20
}
] | 1 |
python | if "version" not in config_kwargs and hasattr(self, "VERSION") and self.VERSION:
config_kwargs["version"] = self.VERSION
builder_config = self.BUILDER_CONFIG_CLASS(**config_kwargs)
# otherwise use the config_kwargs to overwrite the attributes
else:
builder_config... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n if config_id is None:\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | dataset_kwargs = copy.deepcopy(dataset_kwargs) if dataset_kwargs is not None else {}
if processor_name:
dataset_kwargs["processor_name"] = processor_name
dataset = dataset_class(
dataset_name=dataset_name,
dataset_path=dataset_path,
split=dataset_split,
subset=dataset_su... | Review this code and list any quality issues. | [
{
"issue": "Food for thought here: should you add a check for an empty input? I think `_split_message_list_on_user([])` should return `[]` not `[ [] ]`",
"severity": "minor",
"line": 26
}
] | 1 |
python | inference_config: Parameters for inference.
remote_params: Parameters for running inference against a remote API.
Returns:
List[Conversation]: Inference output.
"""
# Limit number of HTTP connections to the number of workers.
connector = aiohttp.TCPConnector(limi... | Review this code and list any quality issues. | [] | 0 |
python | @pytest.mark.parametrize(
("image_name", "is_valid"),
[
("registry.com:8080/myapp:tag", True),
("registry.com:8080/myapp@sha256:be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912", True),
("registry.com:8080/myapp:tag2@sha256:be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309c... | Review this code and list any quality issues. | [
{
"issue": "Someone might still referenced saved local images (don't pull, distributed in advance, for networks with lots of restrictions)\r\n\r\nSo some ideas for that scenario:\r\n\r\n - localhost/foo\r\n - 28d67b2807af\r\n - foo\r\n\r\nI think these should pass as the image name.\r\n\r\nI would like to see s... | 1 |
python | from cognee.modules.data.models import Dataset
from cognee.modules.data.models import Data
from cognee.modules.pipelines.models import PipelineRunStatus
from cognee.modules.pipelines.operations.get_pipeline_status import get_pipeline_status
from cognee.modules.pipelines.methods import get_pipeline_run_by_dataset
from c... | Review this code and list any quality issues. | [
{
"issue": "Maybe Optional[Union[PipelineRunStarted, PipelineRunCompleted]]",
"severity": "minor",
"line": 18
}
] | 1 |
python | import functools
import inspect
import os
import warnings
from collections import Counter
from asgiref.sync import iscoroutinefunction, markcoroutinefunction, sync_to_async
import django
django_file_prefixes = (os.path.dirname(django.__file__),)
class RemovedInDjango61Warning(DeprecationWarning):
pass
class ... | Review this code and list any quality issues. | [
{
"issue": "What do you think about the proposal to use `importlib.resources` in ticket-30950?",
"severity": "minor",
"line": 11
}
] | 1 |
python | >>> import numpy as np
>>> from scipy.special import lqn
>>> import matplotlib.pyplot as plt
>>> xs = np.linspace(-2, 2, 200)
>>> n_max = 3
>>> Qn, dQn = lqn(n_max, xs)
Plot the Legendre functions of the second kind :math:`Q_n(x)`.
>>> fig, ax = plt.subplots()
>>> for n in range(n_max... | Review this code and list any quality issues. | [
{
"issue": "This can be made a little more compact\r\n```suggestion\r\n >>> fig, ax = plt.subplots()\r\n >>> ax.plot(xs, dQn[n], \"-\")\r\n >>> ax.set_xlabel(r\"$x$\")\r\n >>> ax.set_ylabel(r\"$Q_n'(x)$\")\r\n >>> ax.legend([fr\"$n={n}$\" for n in range(n_max + 1)])\r\n >>> plt.show()\r\n```",... | 1 |
python | case "mistral":
try:
from llama_index.llms.openai_like import OpenAILike # type: ignore
except ImportError as e:
raise ImportError(
"OpenAILike dependencies not found, install with `poetry install --extras llms-openai-like`... | Review this code and list any quality issues. | [
{
"issue": "This is unnecessary since you are using OpenAILike. Are there any specific `mistralai` implementation?",
"severity": "minor",
"line": 26
}
] | 1 |
python | def get_dummy_inputs(self, device, seed=0):
if str(device).startswith("mps"):
generator = torch.manual_seed(seed)
else:
generator = torch.Generator(device=device).manual_seed(seed)
return {
"prompt": "",
"negative_prompt": "",
"generato... | Review this code and list any quality issues. | [] | 0 |
python | yield
finally:
signal.pthread_sigmask(signal.SIG_UNBLOCK, [signal.SIGINT])
else:
old = signal.signal(signal.SIGINT, signal.SIG_IGN)
try:
yield
finally:
signal.signal(signal.SIGINT, old)
def _dump_stack_traces_impl() -> None:
"""Implementation... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n dir = os.getenv(\"LK_DUMP_DIR\") or tempfile.gettempdir()\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | import platform
if platform.system() == "Windows":
pathToHosts=r"C:\Windows\System32\drivers\etc\hosts"
elif platform.system() == "Linux":
pathToHosts=r"~/etc/hosts"
websites=["https://www.sislovesme.com/","https://motherless.com/","https://xhamster.com/","https://www.xnxx.com/","https://www.xvideos.c... | Review this code and list any quality issues. | [
{
"issue": "same changes here it should be `/etc/hosts`",
"severity": "minor",
"line": 6
}
] | 1 |
python | return out
@dataclass
class CustomDatasetDataCollator(DataCollator):
input_id_field: str = "input_ids"
attention_mask_field: Optional[str] = None
attention_bias_field: Optional[str] = None
label_mask_field: Optional[str] = None
index_field: Optional[str] = None
instance_mask_field: Optional[st... | Review this code and list any quality issues. | [
{
"issue": "Why all these `item.__getitem__` calls? Why not just `item[]`?",
"severity": "minor",
"line": 26
}
] | 1 |
python | sql_template_processor = self._sql_template_processor_factory(
database=query_model.database, query=query_model
)
rendered_query = sql_template_processor.process_template(
query_model.sql.strip().strip(";"),
**execution_context.template_params,
... | Review this code and list any quality issues. | [
{
"issue": "The regex approach is flaky, it can't handle nested comments (supported by some dialects) and might produce invalid SQL:\n\n```python\n>>> sql = \"SELECT '--debug' AS flag\"\n>>> re.sub(r\"--[^\\n\\r]*\", \"\", sql)\n\"SELECT '\"\n```\n\nSince you have a reference to the database it's better to use ... | 1 |
python | tqdm.pandas()
def count_markdown_elements(markdown_text):
# Initialize counters
headers = 0
lists = 0
bold = 0
# Count headers (# to ######)
headers += len(re.findall(r"^#{1,6}\s", markdown_text, re.MULTILINE))
# Count unordered list items
lists += len(re.findall(r"^\s*[-*+]\s", mark... | Review this code and list any quality issues. | [
{
"issue": "probably `remove_pattern` is a better name for this function?",
"severity": "minor",
"line": 26
}
] | 1 |
python | if isinstance(self.dtype, DatetimeTZDtype):
# operate on naive timestamps, then convert back to aware
self = cast("DatetimeArray", self)
naive = self.tz_localize(None)
result = naive._round(freq, mode, ambiguous, nonexistent)
return result.tz_localize(
... | Review this code and list any quality issues. | [
{
"issue": "Can you remove `_round_doc`, `_round_example`, `_floor_example`, and `_ceil_example`?",
"severity": "minor",
"line": 26
}
] | 1 |
python | from colossalai.kernel.kernel_loader import InferenceOpsLoader
from colossalai.utils import get_current_device
inference_ops = InferenceOpsLoader().load()
DTYPES = [torch.half, torch.bfloat16, torch.float]
NUM_TOKENS = [42] # Arbitrary values for testing
NUM_LAYERS = [1] # Arbitrary values for testing
NUM_HEADS = [... | Review this code and list any quality issues. | [] | 0 |
python | # Convert both text and mention to lowercase for case-insensitive matching
text_lower = text.lower()
mention_lower = mention.lower()
pattern = re.escape(mention_lower)
# Match mention that is not part of a larger word
return bool(re.search(rf'(?:^|[^\w@]){pattern}(?![\w-])', text_lower))
def gith... | Review this code and list any quality issues. | [
{
"issue": "🟡 **Suggestion**: Add documentation mapping GitHub webhook event types to the checks performed. This will make maintenance easier.\n\nConsider adding to the docstring:\n\n```\nSupported GitHub webhook events:\n- pull_request (action: closed) - for data collection\n- issues (action: labeled) - when ... | 1 |
python | def f(n):
return list(range(n))
id1, id2, id3 = f._remote(args=[3], num_returns=3)
assert ray.get([id1, id2, id3]) == [0, 1, 2]
@ray.remote
class Actor:
def __init__(self, x, y=0):
self.x = x
self.y = y
def method(self, a, b=0):
return self.x, self.y, a, b
a = Actor._remote(
... | Review this code and list any quality issues. | [] | 0 |
python | 'age_limit': 18,
}
}, {
'url': 'https://91porn.com/view_video.php?viewkey=726186267387ffe1e5e6',
'md5': 'b0067d158495566fe3d20bafd89e36d1',
'info_dict': {
'id': '726186267387ffe1e5e6',
'title': '见过卖老婆的,那你见过卖亲闺女的吗?',
'description': '疫情当下,如何约炮?\n--19... | Review this code and list any quality issues. | [
{
"issue": "Why not use regex to extract out the number?",
"severity": "major",
"line": 26
}
] | 1 |
python | self.check_mempool_result(
result_expected=[{'txid': tx.rehash(), 'allowed': True, 'vsize': tx.get_vsize(), 'fees': {'base': fee_expected}}],
rawtxs=[tx.serialize().hex()],
maxfeerate=0,
)
node.sendrawtransaction(hexstring=raw_tx_final, maxfeerate=0)
self.memp... | Review this code and list any quality issues. | [
{
"issue": "nit: would just drop this line (+newline entirely), already covered in `self.log.info('A transaction that replaces a mempool transaction')`",
"severity": "minor",
"line": 26
}
] | 1 |
python | vhost_encoded = quote(vhost, safe='')
queue_encoded = quote(queue_name, safe='')
api_url = (
f"{get_management_api_url()}/queues/{vhost_encoded}/{queue_encoded}/"
"bindings"
)
response = requests.get(api_url, auth=HTTPBasicAuth(user, password))
response.raise_for_status()
return ... | Review this code and list any quality issues. | [] | 0 |
python | self.assertEqual(config, {"do_lower_case": False, "model_max_length": 512})
# This model does not have a tokenizer_config so we get back an empty dict.
config = get_tokenizer_config(SMALL_MODEL_IDENTIFIER)
self.assertDictEqual(config, {})
# A tokenizer saved with `save_pretrained` alwa... | Review this code and list any quality issues. | [] | 0 |
python | 'uploader_id': ('upData', 'mid', {str_or_none}),
'like_count': ('videoData', 'stat', 'like', {int_or_none}),
'tags': ('tags', ..., 'tag_name'),
'thumbnail': ('videoData', 'pic', {url_or_none}),
}),
**festival_info,
**traverse_obj(video_... | Review this code and list any quality issues. | [
{
"issue": "per https://github.com/yt-dlp/yt-dlp/pull/11734#issuecomment-2518613153, should we do this?\r\n```suggestion\r\n play_info = None\r\n if self.is_logged_in:\r\n play_info = traverse_obj(\r\n self._search_json(r'window\\.__playinfo__\\s*=', webpage, 'play info',... | 1 |
python | {
'url': 'https://au.bbcollab.com/collab/ui/session/playback/load/2bccf7165d7c419ab87afc1ec3f3bb15',
'only_matching': True,
},
]
def _call_api(self, region, video_id, api_call='', token=None, note='Downloading JSON metadata', fatal=False):
return self._download_json(f'ht... | Review this code and list any quality issues. | [
{
"issue": "these should be inlined in the return, and use `traverse_obj`, e.g.:\r\n\r\n```py\r\n return {\r\n **traverse_obj(video_info, {\r\n 'title': ('name', {str}),\r\n 'timestamp': ('created', {parse_iso8601}),\r\n 'duration': ('duration', {in... | 1 |
python | "Database cache backend."
import base64
import pickle
from datetime import UTC, datetime
from asgiref.sync import sync_to_async
from django.conf import settings
from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache
from django.db import DatabaseError, connections, models, router, transaction
from dj... | Review this code and list any quality issues. | [
{
"issue": "should be named `aget_many` not `aget`",
"severity": "minor",
"line": 15
}
] | 1 |
python | # Noted this only works with Notebook >7.0 or Jupyter Lab. It doesn't work with
# VS Code Notebook due to imcompatible backends.
app.commands.execute("notebook:insert-cell-below")
app.commands.execute("notebook:replace-selection", {"text": text})
for cell in cells:
_create_cell_with... | Review this code and list any quality issues. | [
{
"issue": "Can we distinguish between these variables instead of overwriting the same one?",
"severity": "minor",
"line": 26
}
] | 1 |
python | gen := next(iter(free)))): # <-- assigns symbol to gen
raise TypeError(filldedent('''
To avoid ambiguity, this expression requires either
a symbol (not int) generator or a Poly (which identifies
the generators).'''))
gen = sympify(gen, strict=True)
i... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n p = Poly(f, expand=False)\n gens = p.gens\n free = f.free_symbols\n if not (gen == 0 and len(gens) == 1 and len(free) < 2 and f.is_polynomial(\n gen := next(iter(gens))) and # <-- assigns gen\n gen.is_Atom): # e.g. x or pi\n ... | 1 |
python | tn = 1 / 6 + (t - et) / math.sqrt(45 * vt)
# approximate distribution of tn with limiting distribution
# of the one-sample test statistic
# if tn < 0.003, the _cdf_cvm_inf(tn) < 1.28*1e-18, return 1.0 directly
p = xpx.apply_where(tn >= 0.003,
(tn,),
lambd... | Review this code and list any quality issues. | [
{
"issue": "I don't see the statistic labeled as $T$ in [2]. [2] does define a $U$, but it is quite different from what is here, which would be confusing. Since this is actually what is on Wikipedia, which is more accessible than [2], how about:\r\n```suggestion\r\n The statistic :math:`T` is defined as in [... | 1 |
python | from .newsy import NewsyIE
from .nextmedia import (
NextMediaIE,
NextMediaActionNewsIE,
AppleDailyIE,
NextTVIE,
)
from .nexx import (
NexxIE,
NexxEmbedIE,
)
from .nfb import NFBIE
from .nfhsnetwork import NFHSNetworkIE
from .nfl import (
NFLIE,
NFLArticleIE,
)
from .nhk import (
NhkV... | Review this code and list any quality issues. | [] | 0 |
python | @mock_aws
def test_s3_copy_object_arg_combination_2(self):
conn = boto3.client("s3")
conn.create_bucket(Bucket=self.source_bucket)
conn.create_bucket(Bucket=self.dest_bucket)
conn.upload_fileobj(Bucket=self.source_bucket, Key=self.source_key, Fileobj=BytesIO(b"input"))
# the... | Review this code and list any quality issues. | [] | 0 |
python | agent = Agent(
'openai:gpt-4o',
output_type=NativeOutput(
[Fruit, Vehicle],
name='Fruit or vehicle',
description='Return a fruit or vehicle.'
),
)
result = agent.run_sync('What is a Ford Explorer?')
print(repr(result.output))
#> Vehicle(name='F... | Review this code and list any quality issues. | [
{
"issue": "We need to clarify that this is only used if 1) explicitly provided or 2) the model requires it",
"severity": "minor",
"line": 26
}
] | 1 |
python | class ConversationNotFoundError(ResourceNotFoundError):
"""raised when Llama Stack cannot find a referenced conversation"""
def __init__(self, conversation_id: str) -> None:
super().__init__(conversation_id, resource_type="Conversation")
class ConversationItemNotFoundError(ResourceNotFoundError):
... | Review this code and list any quality issues. | [] | 0 |
python | @property
def stopped(self) -> Awaitable[None]:
"""A Future that completes when the Server's run loop has exited."""
if self._starlette_server is not None:
async def _wait_for_starlette_stop() -> None:
if self._starlette_server is not None:
await sel... | Review this code and list any quality issues. | [
{
"issue": "Can you double check with Claude / Cursor that there aren't unintended side-effects with blocking all `//`?",
"severity": "minor",
"line": 26
}
] | 1 |
python | }
class ARDBetaMediathekIE(ARDMediathekBaseIE):
_VALID_URL = r'''(?x)https://
(?:(?:beta|www)\.)?ardmediathek\.de/
(?:(?P<client>[^/]+)/)?
(?:player|live|video|(?P<playlist>sendung|serie|sammlung))/
(?:(?P<display_id>(?(playlist)[^?#]+?|[^?#]+))/)?
(?P<id>(?(playlist)|Y3JpZ... | Review this code and list any quality issues. | [
{
"issue": "A value of `None` is treated like the absence of a value:\r\n```suggestion\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | if sensor.__class__ not in self._first_sensor_per_type:
self._first_sensor_per_type[sensor.__class__] = sensor
sensor.build()
if sensor._get_cache_dtype() not in cache_size_per_dtype:
cache_size_per_dtype[sensor._get_cache_dtype()] = 0
sensor._cache... | Review this code and list any quality issues. | [
{
"issue": "`self._sensors_by_type` is not define.",
"severity": "minor",
"line": 26
}
] | 1 |
python | _json_tricks_func_or_cls_decode,
_json_tricks_any_object_decode
]
# to bypass a deprecation warning in json-tricks
json_tricks_kwargs['ignore_comments'] = ignore_comments
if string is not None:
if isinstance(string, IOBase):
raise TypeError(f'Expect a string, found a {strin... | Review this code and list any quality issues. | [] | 0 |
python | {k: v for k, v in host.items() if k != "X_AVM-DE_WANAccess"}
for host in MOCK_HOST_ATTRIBUTES_DATA
]
fh_class_mock.get_hosts_attributes = MagicMock(return_value=attributes)
assert await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done(wait_background_tasks=True)
... | Review this code and list any quality issues. | [
{
"issue": "This test mutates `attributes[0]` and assumes the first entry in `MOCK_HOST_ATTRIBUTES_DATA` is always the printer. To make the test less brittle if the fixture ordering changes, select the host entry to modify by a stable key (for example `HostName` or `MACAddress`) instead of relying on list posit... | 1 |
python | if op := _operators.get(action):
cur_val = attrgetter(col)(ent)
return op(cur_val.isoformat() if isinstance(cur_val, (datetime, date)) else cur_val, val)
except Exception as e:
_warn(f"Error filtering with {col} {action} {val} on {ent}.", e)
return True
def _get_datanode_proper... | Review this code and list any quality issues. | [
{
"issue": "I guess you meant `__SC_LABELS`\r\nAnd shouldn't these be capitalized?",
"severity": "minor",
"line": 26
}
] | 1 |
python | self.generate(node, MIN_BLOCKS_TO_KEEP, sync_fun=self.no_op)
prune(1000)
assert not has_block(2), "blk00002.dat is still there, should be pruned by now"
assert not has_block(3), "blk00003.dat is still there, should be pruned by now"
# stop node, start back up with auto-prune at 550 MiB,... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n assert_equal(wallet_info[\"lastprocessedblock\"][\"height\"], self.nodes[5].getblockcount())\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | with cache_dir() as workspace:
for tag in range(0, 4):
src = (workspace / f"test{tag}.py").resolve()
src.write_text("print('hello')", encoding="utf-8")
with patch(
"black.concurrency.Manager", wraps=multiprocessing.Manager
) as mgr:
... | Review this code and list any quality issues. | [
{
"issue": "Could you also add a test for `format_many`?\n\nAlso, does this work when configured from `pyproject.toml`? I'm not sure how easy a test would be for that.",
"severity": "minor",
"line": 26
}
] | 1 |
python | vendor_part_id=None, content=gemini_part['text']
)
if maybe_event is not None: # pragma: no branch
yield maybe_event
elif 'function_call' in gemini_part:
# Here, we assume all function_call parts are complete and don't... | Review this code and list any quality issues. | [] | 0 |
python | 'channel_id': 'MS4wLjABAAAAEKnfa654JAJ_N5lgZDQluwsxmY0lhfmEYNQBBkwGG98',
'creator': '杨超越',
'duration': 15115,
'timestamp': 1621261163,
'upload_date': '20210517',
'track': '@杨超越创作的原声',
'view_count': int,
'like_count': int,
'r... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n detail = traverse_obj(self._download_json(\r\n 'https://www.douyin.com/aweme/v1/web/aweme/detail/', video_id,\r\n 'Downloading web detail JSON', 'Failed to download web detail JSON',\r\n query={'aweme_id': video_id}, fatal=False), ('aweme_det... | 1 |
python | class TestGetChartDataRequestSchema:
"""Test the GetChartDataRequest schema validation."""
def test_default_request(self):
"""Test creating request with all defaults."""
request = GetChartDataRequest(identifier=1)
assert request.identifier == 1
assert request.limit is None # U... | Review this code and list any quality issues. | [] | 0 |
python | assert_type(np.correlate(B, AR_i8, mode="valid"), npt.NDArray[np.signedinteger[Any]])
assert_type(np.correlate(AR_i8, AR_i8, mode="same"), npt.NDArray[np.signedinteger[Any]])
assert_type(np.correlate(AR_b, AR_b), npt.NDArray[np.bool])
assert_type(np.correlate(AR_b, AR_u8), npt.NDArray[np.unsignedinteger[Any]])
assert_t... | Review this code and list any quality issues. | [] | 0 |
python | 'title': 'Chlapci dobetónovali sme, máme hotovo!',
'display_id': 'chlapci_dobetonovali_sme_mame_hotovo',
'description': 'md5:a0822126044050d304a9ef58c92ddb34',
'thumbnail': 'https://fs5.mojevideo.sk/imgfb/250236.jpg',
'duration': 21.0,
'upload_date': '20230919... | Review this code and list any quality issues. | [
{
"issue": "Can you add support for multiple resolutions?\r\nHere a HD example https://www.mojevideo.sk/video/358c8/dva_nissany_skyline_strielaju_v_londyne.html\r\nSeemingly higher qualities also exist. The logic for constructing the url is as follows:\r\n```\r\nvPa = ['', '_lq', '_hd', '_fhd', '_2k']\r\nv.src ... | 1 |
python | # Separate from data loading workers (which use multiprocessing), we also have the option
# to use multi-threading (within workers).
num_threads = self.num_threads
# Slice the indices by data loader worker rank to avoid duplicates.
worker_info = torch.utils.data.get_worker_info()
... | Review this code and list any quality issues. | [
{
"issue": "So we can now have 0-n workers, and each worker can have 1-m threads? And at this point in time, `indices` is already carved up per worker, so carving it up once more for the threads only right here is the right thing to do?",
"severity": "minor",
"line": 26
}
] | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.