language string | code-snippit string | instruction string | flaws list | flaw_count int64 |
|---|---|---|---|---|
python | )
self.add(number_line, pointer,label)
self.play(pointer_value.animate.set_value(0.5))
self.wait(0.5)
self.play(pointer_value.animate.set_value(6))
self.wait(0.5)
self.play(pointer_value.animate.set_value(3))
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n \"\"\"Tracks a complex-valued parameter.\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | "type": "input_text",
"text": block.describe(),
}
def _serialize_media_block(
self,
media_type: str,
attachment: Optional[AttachmentRef],
) -> Dict[str, Any]:
payload: Dict[str, Any] = {"type": media_type}
if not attachment:
return payload... | Review this code and list any quality issues. | [
{
"issue": "The indentation is inconsistent on these lines. There are extra spaces causing the comment and subsequent lines to not align properly with the expected indentation level. Lines 293-302 should be indented with 12 spaces (3 levels), not 13.\n```suggestion\n # basic conversion if it looks li... | 1 |
python | # If it does request such blocks, the snapshot_node will ignore requests it cannot fulfill, causing the ibd_node
# to stall. This stall could last for up to 10 min, ultimately resulting in an abrupt disconnection due to the
# ibd_node's perceived unresponsiveness.
ensure_for(duration=3, f=lambda... | Review this code and list any quality issues. | [
{
"issue": "Nitty nit: I think it would be a bit clearer if you'd call this forking_node, or something along the lines.",
"severity": "minor",
"line": 26
}
] | 1 |
python | if update_successful:
# allgather already execute in optimizer.step in new megatron
pass
else:
raise NotImplementedError("Megatron optimizer step failed. This should not happen")
return grad_norm
def lr_scheduler_step(self):
"""
Advance the learn... | Review this code and list any quality issues. | [] | 0 |
python | The key is a font filename.
The value is a list of dictionaries, each mapping at most *subset_size*
character codes to glyph indices. Note this mapping is the inverse of FreeType,
which maps glyph indices to character codes.
If *subset_size* is not set, then there will only be one subs... | Review this code and list any quality issues. | [
{
"issue": "- Should the key be a tuple of charcodes, or would be it easier to just make it a string? (`\"\".join(map(chr, charcodes))`, as in _to_unicode in backend_pdf)\n- Is Unicode normalization an issue here?",
"severity": "minor",
"line": 26
}
] | 1 |
python | hash_funcs=hash_funcs,
on_release=on_release,
scope=scope,
)
)
return make_cached_func_wrapper(
CachedResourceFuncInfo(
func=func,
show_spinner=show_spinner,
show_time=show_time,
... | Review this code and list any quality issues. | [
{
"issue": "**question:** is `clear_session` supposed to be exposed to users via the public API? I think there isn't even an official API to retrieve the session ID. In case it should be exposed, it would be good to add a `gather_metrics` decorator to track its usage. cc @jrieke",
"severity": "minor",
"... | 1 |
python | from .common import InfoExtractor
from .. import traverse_obj
from ..utils import (
determine_ext,
int_or_none,
url_or_none,
)
class ManyVidsIE(InfoExtractor):
_WORKING = True
_VALID_URL = r'(?i)https?://(?:www\.)?manyvids\.com/video/(?P<id>\d+)'
_TESTS = [
{
# Dead preview... | Review this code and list any quality issues. | [
{
"issue": "I saw the reviewer on the prior PR asked for the test to be skipped instead of removed, so I've done that here.",
"severity": "minor",
"line": 12
}
] | 1 |
python | variance_epsilon,
residual,
x_pad_to_multiple=x_pad_to_multiple,
)
def _rocm_aiter_triton_add_rmsnorm_pad_fake(
x: torch.Tensor,
weight: torch.Tensor,
variance_epsilon: float,
residual: torch.Tensor,
x_pad_to_multiple: int,
) -> tuple[torch.Tensor, torch.Tensor]:
M, N = x.s... | Review this code and list any quality issues. | [] | 0 |
python | if model_name in _MODELS_MAP:
result = _MODELS_MAP[model_name].freeze_layers
print(f"Frozen layers: {result}")
else:
print(f"No frozen layers defined for {model_name}!")
return result
def _get_chat_template(model_name: ModelName) -> str:
result = ""
if model_name in _MODELS_MAP... | Review this code and list any quality issues. | [] | 0 |
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 | except CannotRetrieveData as err:
self.coordinator.last_update_success = False
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key="cannot_retrieve_data_with_error",
translation_placeholders={"error": repr(err)},
) from... | Review this code and list any quality issues. | [
{
"issue": "The parameters to `async_get_entity_id` are in the wrong order. According to the entity registry API signature `async_get_entity_id(domain: str, platform: str, unique_id: str)`, the first parameter should be the entity domain (e.g., \"switch\", \"sensor\") and the second should be the integration pl... | 1 |
python | return
# Emit a `warning` message to the log, only once per call
warning_flag = True
for request in request_iterator:
if isinstance(request, Request):
if request.enqueue_strategy != strategy:
request.enqueue_strategy = strategy
ta... | Review this code and list any quality issues. | [
{
"issue": "Consider using a nested condition here. It seems to me slightly more readable, and we do not need to check the limit for None twice. (Just a weak recommendation)\r\n\r\n```\r\n if limit is not None:\r\n limit -= 1\r\n if limit <= 0:\r\n ... | 1 |
python | return resp
def check_sbom_packages(sbom_data: dict[str, typing.Any]) -> None:
"""Make a bunch of assertions about the SBOM package data to ensure it's consistent."""
for package in sbom_data["packages"]:
# Properties and ID must be properly formed.
error_if(
"name" not in package... | Review this code and list any quality issues. | [] | 0 |
python | ),
SampledAttributeValue(
id="v3", name="value3", description="desc3", sample_rate=0.1
),
SampledAttributeValue(
id="v4", name="value4", description="desc4", sample_rate=0.1
),
SampledAttributeValue(
id="v5", name="value5", description="desc5",... | Review this code and list any quality issues. | [] | 0 |
python | data=data, headers=headers, query=query, fatal=fatal)
def _call_encrypted_api(self, video_id, param='', msg='API', data={}, query={}, fatal=True):
if not Cryptodome.RSA:
raise ExtractorError('pycryptodomex not found. Please install', expected=True)
private_key = Cryptodome.RSA.generate(... | Review this code and list any quality issues. | [
{
"issue": "revert. this would change the message for wrestleuniverse as well, and 'metadata' is just as accurate, no?\r\n```suggestion\r\n metadata = self._call_api(video_id, msg='metadata', query={'al': lang or 'ja'}, auth=False, fatal=False)\r\n```",
"severity": "critical",
"line": 26
}
] | 1 |
python | import argparse
import os
import shutil
def wipe():
path = "local_data"
print(f"Wiping {path}...")
all_files = os.listdir(path)
files_to_remove = [file for file in all_files if file != ".gitignore"]
for file_name in files_to_remove:
file_path = os.path.join(path, file_name)
try:
... | Review this code and list any quality issues. | [
{
"issue": "What do you think of making it more verbose ?\r\n\r\n```suggestion\r\n elif os.path.isdir(file_path):\r\n shutil.rmtree(file_path)\r\n print(f\" - Deleted {file_path}\")\r\n except PermissionError:\r\n```",
"severity": "critical",
"line": 20
}
] | 1 |
python | output_dtype = _find_matching_floating_dtype(a, weights, xp=xp)
a = xp.astype(a, output_dtype)
if weights is None:
return (xp.mean if normalize else xp.sum)(a, axis=axis)
weights = xp.astype(weights, output_dtype)
sum_ = xp.sum(xp.multiply(a, weights), axis=axis)
if not normalize:
... | Review this code and list any quality issues. | [
{
"issue": "Bumped into this trying to find some code that was specific to old scipy versions we could clean-up ...\n\nThis is a typo and should be scipy 1.16 (sixteen) right? not scipy 1.6 (six)? @lucyleeow @ogrisel",
"severity": "minor",
"line": 26
}
] | 1 |
python | embedding_function (List[Callable]): List of embedding functions to be used to create embedding data.
embedding_data (List[Any]): List of data to be embedded.
embedding_tensor (Union[str, List[str]]): Name of the tensor(s) to store the embedding data.
processed_tensors (Dict[str, List[Any]]): Di... | Review this code and list any quality issues. | [
{
"issue": "Is this too tightly coupled to openai embeddings? Other rate-limited APIs would have similar needs, and we don't necessarily know them all. And/or limits may change over time?\r\n\r\nI like how it automatically works right for openai, but maybe instead of the arguments always having a value and slee... | 1 |
python | import logging
import os
import threading
from typing import Dict, Optional, Tuple
import redis
import uvicorn
from kubernetes import client, config, watch
from starlette.applications import Starlette
from starlette.responses import JSONResponse, PlainTextResponse
from aibrix.gpu_optimizer.load_monitor.load_reader im... | Review this code and list any quality issues. | [
{
"issue": "@weapons97 could you help format this file. seems the linter report the format issue on this file",
"severity": "minor",
"line": 26
}
] | 1 |
python | parents.remove(term)
@property
def outputs(self):
"""
Dict mapping names to designated output terms.
"""
return self._outputs
def execution_order(self, refcounts):
"""
Return a topologically-sorted iterator over the terms in ``self`` which
need to be... | Review this code and list any quality issues. | [
{
"issue": "given that we memoize this as a lazyval, could we make it a frozenset to preserve the immutability?",
"severity": "minor",
"line": 26
}
] | 1 |
python | Returns:
str: The corresponding model label.
"""
# Get model label from llm mode setting YAML
# Labels: local, openai, openailike, sagemaker, mock, ollama
config_settings = settings()
... | Review this code and list any quality issues. | [
{
"issue": "Instead of raising an error, we should return None to not break the execution with new models added",
"severity": "minor",
"line": 26
}
] | 1 |
python | _log.debug(report)
return report
@classmethod
def make_dvi(cls, tex, fontsize):
"""
Generate a dvi file containing latex's layout of tex string.
Return the file name.
"""
basefile = cls.get_basefile(tex, fontsize)
dvifile = '%s.dvi' % basefile
if... | Review this code and list any quality issues. | [
{
"issue": "I don't think we need this any more?",
"severity": "minor",
"line": 26
}
] | 1 |
python | default_step = 1
if x_range is None:
x_range = [
round(-config["frame_x_radius"]),
round(config["frame_x_radius"]),
default_step,
]
elif len(x_range) == 2:
x_range = [*x_range, default_step]
if y_range is None:
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n def coords_to_point(self, *coords: ManimFloat):\r\n```\r\n\r\nThis is what got me confused regarding my other comment",
"severity": "minor",
"line": 26
}
] | 1 |
python | RocCurveDisplay,
)
from sklearn.model_selection import cross_validate, train_test_split
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
from sklearn.utils import shuffle
@pytest.fixture(scope="module")
d... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n # create highly imbalanced classes\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | ModelConfigEntity,
PromptTemplateEntity,
VariableEntity,
)
from core.app.apps.agent_chat.app_config_manager import AgentChatAppConfigManager
from core.app.apps.chat.app_config_manager import ChatAppConfigManager
from core.app.apps.completion.app_config_manager import CompletionAppConfigManager
from core.file.mo... | Review this code and list any quality issues. | [
{
"issue": "The `_NodeType` TypedDict definition is incomplete. Looking at the actual node structures created in the code (e.g., lines 294-307, 312-324, 352-382), nodes have a `position` field typed as `None` (literal None value), but the `data` field contains structured dictionaries with specific keys like 'ti... | 1 |
python | Retrieve sizes of connected components in a graph.
This function executes a query to calculate the sizes of connected components in the
specified graph using the Graph Data Science library, and returns a list of these sizes
in descending order.
Parameters:
-----------
- adapter (Neo4jAdap... | Review this code and list any quality issues. | [] | 0 |
python | def _emit_events(self, span: Span, events: list[Event]) -> None:
if self.event_mode == 'logs':
for event in events:
self.event_logger.emit(event)
else:
attr_name = 'events'
span.set_attributes(
{
attr_name: json.dump... | Review this code and list any quality issues. | [
{
"issue": "Why can't we use the proper type?",
"severity": "minor",
"line": 26
}
] | 1 |
python | self._inertial_pos = np.zeros(3, dtype=gs.np_float)
self._inertial_i = np.zeros((3, 3), dtype=gs.np_float)
geom_list = []
# Process each geom individually and compose their properties
if len(geom_list) > 0:
total_mass = 0.0
total_c... | Review this code and list any quality issues. | [
{
"issue": "You should just raise an exception is `inertia_mesh.mass < gs.EPS`. No point to support this, it will just cause more issues later on.",
"severity": "minor",
"line": 26
}
] | 1 |
python | transformed_input_op = input_op._apply_transform(transform)
transformed_input_ops.append(transformed_input_op)
if transformed_input_op is not input_op:
has_changes = True
# 2) If any input changed, create a shallow copy of the current node,
# rebind its inputs, a... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n # to the returned replacement node inputs.\n # Returning the same node must not mutate inputs in-place.\n transformed_target = transform(target)\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | class IdagioPlaylistIE(IdagioPlaylistBaseIE):
_VALID_URL = r'https?://(?:www\.)?app\.idagio\.com(?:/[a-z]{2})?/playlists/(?!personal/)(?P<id>[\w-]+)'
_TESTS = [{
'url': 'https://app.idagio.com/playlists/beethoven-the-most-beautiful-piano-music',
'info_dict': {
'id': '31652bec-8c5b-46... | Review this code and list any quality issues. | [
{
"issue": "since this is a unique test, let's just remove `only_matching` and keep the test data\r\n```suggestion\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | assert video_url.media_type == 'video/mp4'
assert video_url.format == 'mp4'
@pytest.mark.parametrize(
'url,is_youtube',
[
pytest.param('https://youtu.be/lCdaVNyHtjU', True, id='youtu.be'),
pytest.param('https://www.youtube.com/lCdaVNyHtjU', True, id='www.youtube.com'),
pytest.param... | Review this code and list any quality issues. | [
{
"issue": "Can't we make the argument `media_type`? That may require a custom `__init__`.",
"severity": "minor",
"line": 26
}
] | 1 |
python | # You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the Licens... | Review this code and list any quality issues. | [
{
"issue": "otherwise these error about `--ignore-files` from the nosetests command",
"severity": "minor",
"line": 26
}
] | 1 |
python | def _apply_residual(self, out, residual):
if self.tensor_parallel_shards > 1:
return op.ccl_allreduce(out, "sum") + residual
return out + residual
class LlamaModel(nn.Module):
def __init__(self, config: LlamaConfig):
assert config.hidden_size % config.num_attention_heads == 0
... | Review this code and list any quality issues. | [] | 0 |
python | Note that Django docs advise _against_ interacting with the database using
the ORM models in the ready() path. Specifically, during testing.
However, we explicitly use the @bypass_in_test decorator to avoid calling this
method during testing.
Django also advises against running pattern ... | Review this code and list any quality issues. | [
{
"issue": "Is it possible to avoid having in-function imports?",
"severity": "minor",
"line": 26
}
] | 1 |
python | # populate new commit folder
copy_metas(parent_commit_id, new_commit_id, storage, version_state)
create_commit_chunk_maps(new_commit_id, storage, version_state)
# update and save version state
parent_node: CommitNode = version_state["commit_node"]
new_node = CommitNode(branch, new_commit_id)
ne... | Review this code and list any quality issues. | [
{
"issue": "s3 listing objects is pretty slow, commits should instead be found by traversing starting from firstdb commit, which points to the next locations to check",
"severity": "major",
"line": 26
}
] | 1 |
python | channel_key = await connection_manager.subscribe_graph_execs(
user_id=user_id,
graph_id=sub_req.graph_id,
websocket=websocket,
)
else:
raise ValueError(
f"{handle_subscribe.__name__} can't handle '{message.method}' messages"
)
logger.debu... | Review this code and list any quality issues. | [] | 0 |
python | 'author_id': str_or_none(author.get('uid')),
'id': str_or_none(comment.get('commentID')),
'text': content,
'timestamp': int_or_none(comment.get('createdAt')),
'parent': 'root' if parent == 0 else str_or_none(parent),
})
info = {
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n _VALID_URL = r'trovovod:(?P<id>[^\\s]+)'\r\n IE_DESC = 'All VODs of a trovo.live channel, \"trovovod\" keyword'\r\n```\r\nAdd similar desc for clips",
"severity": "minor",
"line": 26
}
] | 1 |
python | root_page = Page.objects.get(pk=1)
homepage = HomePage(title="Home")
root_page.add_child(instance=homepage)
self.assertTrue(HomePage.objects.filter(title="Home").exists())
class HomeTests(WagtailPageTestCase):
"""
Class for testing homepage logic
"""
def setUp(self):
"... | Review this code and list any quality issues. | [
{
"issue": "I think we should choose to start with a set of tests that pass. It's possible it could cause confusion if the tutorial starting point does not pass.\r\n\r\nI would recommend we actually remove this 'placeholder' test and just add a few more starting tests.",
"severity": "major",
"line": 26
... | 1 |
python | crops {
name
renditions {
name
width
height
url
}
}
}
}
renditions {
type
width
height
url
bitrate
}
summary
}
}
}'''
def _build_playli... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n json_obj = self._call_api(media_id)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | """Generate blocks with coinbase outputs to the internal address, and call rescan_utxos"""
blocks = self._test_node.generatetodescriptor(num_blocks, self.get_descriptor(), **kwargs)
# Calling rescan_utxos here makes sure that after a generate the utxo
# set is in a clean state. For example, the ... | Review this code and list any quality issues. | [] | 0 |
python | DEFAULT,
DEPRECATED_MODELS,
DOMAIN,
)
if TYPE_CHECKING:
from . import AnthropicConfigEntry
class ModelDeprecatedRepairFlow(RepairsFlow):
"""Handler for an issue fixing flow."""
_subentry_iter: Iterator[tuple[str, str]] | None
_current_entry_id: str | None
_current_subentry_id: str | None... | Review this code and list any quality issues. | [
{
"issue": "The signature change for `async_step_init` is incorrect. The method should accept `user_input` as `dict[str, str] | None = None` because the framework calls this method with `None` on the initial invocation (when showing the form). The current signature `user_input: dict[str, str]` will cause a type... | 1 |
python | IE_NAME = 'laracasts:series'
_VALID_URL = r'https?://(?:www\.)?laracasts\.com/series/(?P<series>[^/?#]+)/?(?:$|[?#])'
_TESTS = [{
'url': 'https://laracasts.com/series/30-days-to-learn-laravel-11',
'info_dict': {
'title': '30 Days to Learn Laravel',
'id': 210,
},
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n return self.playlist_result(self._entries(display_id, episode_count), playlist_id, playlist_title)\r\n\r\n\r\nclass LaracastsIE(InfoExtractor):\r\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | # Return early if we have the right wrappers for the system unit
if system_temperature_unit == UnitOfTemperature.FAHRENHEIT:
if (
(current_fahrenheit and set_fahrenheit)
or (current_fahrenheit and not set_celsius)
or (set_fahrenheit and not current_celsius)
):
... | Review this code and list any quality issues. | [] | 0 |
python | 3. Perform the batched matrix multiplication.
4. Unfuse the output to get the desired final index order.
"""
lhs, out = eq.split("->")
a_term, b_term = lhs.split(",")
if len(a_term) != len(shape_a):
raise ValueError(f"Term '{a_term}' does not match shape {shape_a}.")
if len(b_term)... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n # set and check size\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | @parameterize("keep_gathered", [False, True])
@parameterize("model_name", ["gpt2", "bert"])
@parameterize("use_grad_checkpoint", [False, True])
@parameterize("master_weights", [False, True])
def exam_gemini_grad_acc(
placement_config, keep_gathered: bool, model_name: str, use_grad_checkpoint: bool, master_weights: ... | Review this code and list any quality issues. | [] | 0 |
python | include_index = not isinstance(df.index, pd.RangeIndex)
columns = list(df.columns)
verbose_map = self._qc_datasource.data.get("verbose_map", {})
if verbose_map:
df.columns = [verbose_map.get(column, column) for column in columns]
result = None
... | Review this code and list any quality issues. | [
{
"issue": "Looking at the `buildQuery` this is something to be computed by `query_object -> exe_post_processing`. I don't think we should bring these into the context processor which is a more abstract concept. Meaning, these changes would be introducing an implementation that's very specific for your use cas... | 1 |
python | patterns = [pattern for pattern in PromptflowIgnoreFile.IGNORE_FILE]
# ignore current output parent folder to avoid potential recursive copy
patterns.append(self._run._output_path.parent.name)
shutil.copytree(
flow.code.as_posix(),
self._snapshot_folder_path,
... | Review this code and list any quality issues. | [] | 0 |
python | # "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT... | Review this code and list any quality issues. | [] | 0 |
python | """Return the priority of the most preferred tag that one of the wheel's file
tag combinations acheives in the given list of supported tags using the given
tag_to_priority mapping, where lower priorities are more-preferred.
This is used in place of support_index_min in some cases in order to av... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n return not self.file_tags.isdisjoint(tags)\r\n```\r\n\r\nThis should work, I think?",
"severity": "minor",
"line": 26
}
] | 1 |
python | def convert_audio(input_path: Path, output_path: Path, codec_name: str):
with (
av.open(input_path) as input_audio,
av.open(output_path, "w") as output_audio,
):
input_audio_stream = input_audio.streams.audio[0]
output_audio_stream = output_audio.add_stream(codec_name)
fo... | Review this code and list any quality issues. | [
{
"issue": "I think the best way to get the out format is to just use `config.movie_file_extension.removeprefix(\".\")` - and then you can also avoid the checks.",
"severity": "minor",
"line": 26
}
] | 1 |
python | try:
# Get default credentials - will read from GOOGLE_APPLICATION_CREDENTIALS
credentials, _ = default(scopes=["https://www.googleapis.com/auth/cloud-platform"])
credentials.refresh(google.auth.transport.requests.Request())
return str(credentials.token)
except Ex... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n return [\"vertexai/gemini-2.0-flash\", \"vertexai/gemini-2.5-flash\", \"vertexai/gemini-2.5-pro\"]\n```\n\nThat seems more consistent with the provider's name.",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'description': audio_description,
'categories': list(filter(None, [audio_info.get('category_name')])),
'duration': audio_info.get('duration'),
'view_count': audio_info.get('play_count'),
'like_count': audio_info.get('favorites_count'),
'formats': formats,
... | Review this code and list any quality issues. | [
{
"issue": "for playlists it's good to test the number of entries too\r\n```suggestion\r\n },\r\n 'playlist_mincount': 41,\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | from ..utils import (
OnDemandPagedList,
traverse_obj,
unified_strdate,
)
class GronkhIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?gronkh\.tv/(?:watch/)?streams?/(?P<id>\d+)'
_TESTS = [{
'url': 'https://gronkh.tv/streams/657',
'info_dict': {
'id': '657',
... | Review this code and list any quality issues. | [
{
"issue": "this `only_matching` test case is redundant\r\n```suggestion\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | self._visualize_contact = visualize_contact
self._geoms: list[RigidGeom] = gs.List()
self._vgeoms: list[RigidVisGeom] = gs.List()
def _build(self):
for geom in self._geoms:
geom._build()
for vgeom in self._vgeoms:
vgeom._build()
if self._inertial_m... | Review this code and list any quality issues. | [
{
"issue": "This is not a fallback. It is the right solution where there is no geometry attached to a link.",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'uploader': 'NHK-FM',
'channel': 'NHK-FM',
'thumbnail': 'https://www.nhk.or.jp/prog/img/449/g449.jpg',
'release_date': '20240217',
'description': 'md5:a456ee8e5e59e6dd2a7d32e62386e811',
'timestamp': 1708185600,
'release_timestamp': 1708178400,
... | Review this code and list any quality issues. | [
{
"issue": "I've pushed some changes, but just fyi in the future you can use `expected_warnings` to allow the test to pass",
"severity": "minor",
"line": 26
}
] | 1 |
python | from starlette.middleware.base import BaseHTTPMiddleware
from starlette.requests import Request
from starlette.responses import Response
class TrailingSlashMiddleware(BaseHTTPMiddleware):
"""
Middleware that strips trailing slashes from request paths.
This ensures that both /agents and /agents/ are handl... | Review this code and list any quality issues. | [
{
"issue": "Consider adding a guard to ensure the path doesn't become empty after stripping trailing slashes. If a malformed URL like \"//\" is received, the current implementation would strip all slashes leaving an empty path. Add a check: `if path != \"/\" and path.endswith(\"/\") and len(path.rstrip(\"/\")) ... | 1 |
python | op_metrics = operator.metrics
op_task_stats_map[operator.id] = op_metrics._op_task_duration_stats
self._op_id_to_name[operator.id] = operator.name
if operator.has_execution_finished():
# Remove finished operators / tasks from the state map
if operator.... | Review this code and list any quality issues. | [
{
"issue": "I felt confused while reading this code because I don't think it's obvious that `task_id` and `node_id` are fields on the `task_state` dataclass. Could you clarify?",
"severity": "minor",
"line": 26
}
] | 1 |
python | from backend.sdk.registry import AutoRegistry
def get_all_provider_names() -> list[str]:
"""
Collect all provider names from both ProviderName enum and AutoRegistry.
This function should be called at runtime to ensure we get all
dynamically registered providers.
Returns:
A sorted list of... | Review this code and list any quality issues. | [] | 0 |
python | The new *in-memory* data node configuration.
""" # noqa: E501
if default_data is not None:
properties[cls._OPTIONAL_DEFAULT_DATA_IN_MEMORY_PROPERTY] = default_data
return cls.__configure(id, DataNodeConfig._STORAGE_TYPE_VALUE_IN_MEMORY, scope, validity_period, **properties)
@c... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n So it is designed to handle small data values like parameters, and it must be Json serializable.\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | chapter_marks = t.get('streamAnchorTag') or []
chapter_marks.append({'anchorOffset': int_or_none(t.get('duration'))})
chapters = [{
'start_time': chap.get('anchorOffset'),
'end_time': next_chap.get('anchorOffset'),
'title': chap.get('anchorLabel'),
} for chap,... | Review this code and list any quality issues. | [
{
"issue": "~~Currently, the usage of `merge_dicts` will overwrite these metadata fields if they already exist in the `info` dict. Do we want that? or do we want to priotize the new data? Or doesn't it matter?~~",
"severity": "minor",
"line": 26
}
] | 1 |
python | use_lite_mode (`bool`, *optional*, defaults to `False`):
Enables a lightweight TaylorSeer variant that minimizes memory usage by applying predefined patterns for
skipping and caching (e.g., skipping blocks and caching projections). This overrides any custom
`inactive_identifiers` or ... | Review this code and list any quality issues. | [
{
"issue": "How about? \n```python\nskip_predict_indentifiers:\ncache_identifiers:\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | nd = len(y.shape)
if start is None:
start = 0
step = 2
slice_all = (slice(None),)*nd
slice0 = tupleset(slice_all, axis, slice(start, stop, step))
slice1 = tupleset(slice_all, axis, slice(start+1, stop+1, step))
slice2 = tupleset(slice_all, axis, slice(start+2, stop+2, step))
slice_ea... | Review this code and list any quality issues. | [
{
"issue": "Is creating this zero array and the several `xp.where`s going to lead to performance issues for large h0/h1/hprod/hsum? Is a lazywhere better, or even fixing up afterwards.",
"severity": "major",
"line": 26
}
] | 1 |
python | return False
@functools.lru_cache(None)
def detect_default_tf32() -> bool:
"""
Dectect if there is anything that may enable TF32 mode by default.
If any, show a warning message.
"""
may_enable_tf32 = False
try:
if not has_ampere_or_later():
return False
from monai.... | Review this code and list any quality issues. | [
{
"issue": "A typo in Line55, \"Dectect\" -> \"Detect\".",
"severity": "minor",
"line": 26
}
] | 1 |
python | if all([subscription_id, resource_group_name, workspace_name]):
workspace_triad = AzureMLWorkspaceTriad(
subscription_id=subscription_id,
resource_group_name=resource_group_name,
workspace_name=workspace_name,
)
# tracer provider
# create resource & tracer pro... | Review this code and list any quality issues. | [
{
"issue": "Do we need to have a fallback logic for the scenario that OTEL_EXPORTER_OTLP_ENDPOINT is set but OTEL_EXPORTER_OTLP_TRACES_ENDPOINT is not set?",
"severity": "minor",
"line": 26
}
] | 1 |
python | import json
from fuzzywuzzy import fuzz
class Singleton:
_instance = None
def __new__(cls, *args, **kwargs):
if cls._instance is None:
cls._instance = super().__new__(cls, *args, **kwargs)
return cls._instance
def parse_json(response):
try:
return json.loads(respons... | Review this code and list any quality issues. | [
{
"issue": "I tried [this example](https://github.com/you-n-g/cheatsheets/blob/master/language/python/meta.py#L74) before.\r\nI can't understand why we need two level of class for Singleton?",
"severity": "minor",
"line": 14
}
] | 1 |
python | def _real_extract(self, url):
post_id = self._match_id(url)
post_data = self._download_json(
'https://www.floatplane.com/api/v3/content/post', post_id, query={'id': post_id},
note='Downloading post data', errnote='Unable to download post data')
if not any(traverse_obj(p... | Review this code and list any quality issues. | [
{
"issue": "could inline `channel_url`\r\n```suggestion\r\n uploader_url = format_field(\r\n post_data, [('creator', 'urlname')], 'https://www.floatplane.com/channel/%s/home') or None\r\n\r\n common_info = {\r\n **traverse_obj(post_data, {\r\n 'uploader': ('cre... | 1 |
python | import socket
import ssl
import time
from pymemcache.client.base import Client as MCClient
from . import dfly_args
from .instance import DflyInstance
DEFAULT_ARGS = {"memcached_port": 11212, "proactor_threads": 4}
def read_response(client, expected_len):
response = b""
while len(response) < expected_len:
... | Review this code and list any quality issues. | [
{
"issue": "The test_basic method is declared as async but does not contain any await expressions. This means it will return a coroutine that never gets awaited, causing the test to not actually execute any of its assertions. Either remove the async keyword or add await calls where appropriate (e.g., if interac... | 1 |
python | from homeassistant.helpers.condition import (
async_get_all_descriptions as async_get_all_condition_descriptions,
)
from homeassistant.helpers.entity import (
entity_sources,
get_device_class,
get_supported_features,
)
from homeassistant.helpers.service import (
async_get_all_descriptions as async_g... | Review this code and list any quality issues. | [
{
"issue": "The list is not a good fit here. Make it a dict instead, where the key is `condition`, `service`, `trigger` and let the caller of `_async_get_automation_components_for_target` pass it in as `component_type` or something like that.",
"severity": "minor",
"line": 26
}
] | 1 |
python | UserNotLive,
determine_ext,
filter_dict,
int_or_none,
orderedSet,
parse_iso8601,
url_or_none,
urlencode_postdata,
urljoin,
)
from ..utils.traversal import traverse_obj
def _cloudfront_auth_request(m3u8_url, strm_id, video_id, url):
post_data = {
'type': 'vod',
'strm... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'Referer': referer_url,\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | @pytest.fixture
async def controller(browser: Browser) -> AsyncGenerator[PlaywrightBrowserController, None]:
controller = PlaywrightBrowserController(browser, max_open_pages_per_browser=2)
yield controller
await controller.close()
async def test_initial_state(browser: Browser) -> None:
controller = Pl... | Review this code and list any quality issues. | [
{
"issue": "could you please update it here to only `str(httpbin)` as well?",
"severity": "minor",
"line": 26
}
] | 1 |
python | string = str(frac.numerator) + constant_label
else:
if self.azimuth_compact_fraction:
string = (
r"\tfrac{"
+ str(frac.numerator)
+ constant_label
+ r"}{"
+ str(frac.denominator)
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n self, r_func: Callable[[float], float], theta_range: Sequence[float] = [0, 2 * PI], **kwargs\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | def mock_invoke_model_stream(self: BedrockLLM, *args, **kwargs) -> dict:
# use json object to mock EventStream
def dict2bytes(x):
return json.dumps(x).encode("utf-8")
provider = self.config.model.split(".")[0]
if provider == "amazon":
response_body_bytes = dict2bytes({"outputText": "He... | Review this code and list any quality issues. | [] | 0 |
python | from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,
assert_greater_than,
assert_raises_rpc_error,
)
class FeatureIndexPruneTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 4
self.extra_args = [
... | Review this code and list any quality issues. | [
{
"issue": "could start at `n.getblockcount() + 1`, nodes will already have the block at `n.getblockcount()`.",
"severity": "minor",
"line": 26
}
] | 1 |
python | node.children[1],
parent=node,
remove_brackets_around_comma=True,
):
wrap_in_parentheses(node, node.children[1], visible=False)
# Since await is an expression we shouldn't remove
# brackets in cases where this would change
... | Review this code and list any quality issues. | [
{
"issue": "When do we need to manually make this recursive call?",
"severity": "minor",
"line": 26
}
] | 1 |
python | raise ModularPipelineError("Inputs must not be outputs from another node")
if outputs & free_inputs:
raise ModularPipelineError("Outputs can't contain free inputs to the pipeline")
def _validate_datasets_exist(
inputs: AbstractSet[str],
outputs: AbstractSet[str],
parameters: AbstractSet[str],... | Review this code and list any quality issues. | [
{
"issue": "Sorting sometimes breaks the order so that the order `non_existent` differs from `possible_matches` found when there is more than one `non_existent` input. For example:\r\n```\r\ndef create_pipeline(**kwargs) -> Pipeline:\r\n pipeline_instance = pipeline(\r\n [\r\n node(\r\n ... | 1 |
python | # When given a submodule, import_string() can raise ImportError
# if its parent module has not been already imported during
# test discovery. Since the parallel test runner spawns workers
# with a fresh import cache and then applies these skips, do
# not e... | Review this code and list any quality issues. | [
{
"issue": "I hate this formatting and how other lines have to be multi-lined. I don't normally advocate for abbreviations, but I'm a bit tempted to abbreviate \"class\" -> \"cls\" if it avoids that.",
"severity": "minor",
"line": 26
}
] | 1 |
python | _TaipyLogger._get_logger().info("Gui server has been reloaded.")
def stop(self):
"""Stop the web server.
This function stops the underlying web server only in the situation where
it was run in a separated thread: the *run_in_thread* parameter to the
`(Gui.)run()^` method was set to... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n _warn(\"Hooks._is_exception_ignored()\", e)\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | from unit.common import DistributedTest
from unit.simple_model import SimpleModel
config = {
"train_batch_size": 2,
"steps_per_print": 1,
"optimizer": {
"type": "Adam",
"params": {
"lr": 0.00015
}
},
"zero_optimization": {
"stage": 3,
"stage3_para... | Review this code and list any quality issues. | [] | 0 |
python | np_str_int_types, pa_int_types = zip(*int_type_pairs)
class StrangeIterable:
def __init__(self, lst):
self.lst = lst
def __iter__(self):
return self.lst.__iter__()
class MyInt:
def __init__(self, value):
self.value = value
def __int__(self):
return self.value
clas... | Review this code and list any quality issues. | [
{
"issue": "AFAICT, this function was only necessary because we wanted to ignore field order. So now all call sites could use an equality assertion between types directly?",
"severity": "minor",
"line": 26
}
] | 1 |
python | def test_ctypes_integer_via_memoryview(self):
# gh-11150, due to bpo-10746
for c_integer in {ctypes.c_int, ctypes.c_long, ctypes.c_longlong}:
value = c_integer(42)
with warnings.catch_warnings(record=True):
warnings.filterwarnings('always', r'.*\bctypes\b', Runtim... | Review this code and list any quality issues. | [
{
"issue": "It looks like this test uses memoryview, which is thread-unsafe.",
"severity": "major",
"line": 26
}
] | 1 |
python | ]
@pytest.fixture
def audio_assets() -> list[AudioAsset]:
return [AudioAsset("mary_had_lamb"), AudioAsset("winning_call")]
@pytest.fixture
def tokenizer() -> MistralTokenizer:
return MistralTokenizer.from_hf_hub(MODEL_NAME)
@pytest.fixture
def engine() -> LLM:
engine_args = EngineArgs(**ENGINE_CONFIG)... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n@pytest.mark.skip(reason=\"Voxtral streaming is not yet public\")\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | logger = logging.getLogger(__name__)
class VersionQuery(BaseModel):
current_version: str = Field(..., description="Current application version")
class VersionFeatures(BaseModel):
can_replace_logo: bool = Field(description="Whether logo replacement is supported")
model_load_balancing_enabled: bool = Fiel... | Review this code and list any quality issues. | [
{
"issue": "Registration of this endpoint depends on the `controllers.console.version` module being imported so the `@console_router.get(...)` decorator executes. `extensions/ext_fastopenapi.py` currently only imports `controllers.console.ping` before `include_router`, so `/console/api/version` may not be regis... | 1 |
python | 'title': title,
'description': description,
'duration': duration,
'creator': creators, # TODO: change to 'creators'
'formats': formats,
'subtitles': subtitles,
'thumbnails': self._extract_thumbnails(
tra... | Review this code and list any quality issues. | [
{
"issue": "instead of performing the same traversal outside of this method both times we call it, let's handle the traversal inside the method:\r\n```suggestion\r\n return traverse_obj(self._download_json(\r\n self._GRAPHQL_API, media_id, 'Downloading JSON from GraphQL API', data=json.dumps({... | 1 |
python | async def _disconnect_raise(self, conn: Connection, error: Exception):
"""
Close the connection and raise an exception
if retry_on_error is not set or the error
is not one of the specified error types
"""
await conn.disconnect()
if (
conn.retry_on_erro... | Review this code and list any quality issues. | [
{
"issue": "The try...finally should be inside the asyncio.shield if you want to prevent disconnects.",
"severity": "minor",
"line": 26
}
] | 1 |
python | from taipy.gui import Gui, Icon, State, get_state_id, invoke_callback, invoke_long_callback
# The Wikipedia API used to generate content for a date
wiki_url = "https://en.wikipedia.org/api/rest_v1/feed/onthisday/{type}/{month}/{day}"
event_types = {
"happen": "events",
"passé": "events",
"born": "births",
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n# Initialize the user state\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | """Simplified Task Instance representation"""
email_type: Literal["failure", "retry"] = "failure"
"""Whether this is for a failure or retry email"""
context_from_server: ti_datamodel.TIRunContext
"""Task execution context from the Server"""
type: Literal["EmailRequest"] = "EmailRequest"
class DagR... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n sa_inspect(dag_run)\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | )
message = warn + result
hint = (
click.style(
"\nHint: Kedro is looking for a file called ", fg=BRIGHT_BLACK
)
+ click.style("'pyproject.toml", fg="magenta")
+ click.style(
... | Review this code and list any quality issues. | [
{
"issue": "I think you'll have to combine the call to `after_command_run` under the first except condition, since when the command runs fine, this hook executes twice.",
"severity": "minor",
"line": 26
}
] | 1 |
python | else:
raise NotImplementedError(
"qr currently supports only tall-and-skinny (single column chunk/block; see tsqr)\n"
"and short-and-fat (single row chunk/block; see sfqr) matrices\n\n"
"Consider use of the rechunk method. For example,\n\n"
"x.rechunk({0: -1, 1: '... | Review this code and list any quality issues. | [
{
"issue": "This will likely land in `2026.3.0` now.\n\n```suggestion\n .. versionadded:: 2026.3.0\n```\n\nFun to note that we have only used `versionadded` in the dask docs twice, a loooong time ago. But the docs preview renders it nicely so I'm happy to add it.",
"severity": "minor",
"line": 26... | 1 |
python | class SkyNewsStoryIE(SkyBaseIE):
IE_NAME = 'sky:news:story'
_VALID_URL = r'https?://news\.sky\.com/story/[0-9a-z-]+-(?P<id>[0-9]+)'
_TEST = {
'url': 'https://news.sky.com/story/budget-2021-chancellor-rishi-sunak-vows-address-will-deliver-strong-economy-fit-for-a-new-age-of-optimism-12445425',
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n entries = [self._process_ooyala_element(webpage, sdc_el, url)\r\n for sdc_el in re.findall(self._SDC_EL_REGEX, webpage)]\r\n\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | },
}]
_TOKEN = None
def _real_initialize(self):
token = self._get_cookies('https://gofile.io/').get('accountToken')
if token:
self._TOKEN = token.value
return
account_data = self._download_json(
'https://api.gofile.io/createAccount', None, note='... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n files = self._download_json(\r\n 'https://api.gofile.io/getContent', file_id, note='Getting filelist', query=query_params)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | DATA myData;
INPUT X Y;
CARDS;
1 0
1 1
1 2
1 3
1 4
2 0
2 1
2 4
2 9
2 16
ods graphics on;
proc npar1way mood data=myData ;
class X;
ods output MoodTest=mt;
proc contents data=mt... | Review this code and list any quality issues. | [
{
"issue": "Since you test with \"default dtypes\" below, I was somewhat curious why this was being pinned to a single dtype here. Maybe this best reflects a match to what the original test did.\n\nFWIW, the test seems to pass with array API locally even if you parametrize this to try \"float32\" and \"float64\... | 1 |
python | DatasetNotFoundError,
Version,
generate_timestamp,
)
from kedro.io.memory_dataset import MemoryDataset
from kedro.utils import _format_rich, _has_rich_handler
class KedroDataCatalog(CatalogProtocol):
def __init__(
self,
datasets: dict[str, AbstractDataset] | None = None,
raw_data: ... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n Note: ``KedroDataCatalog`` is an experimental feature and is under active development. Therefore, it is possible we'll introduce breaking changes to this class, so be mindful of that if you decide to use it already.\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | # array-taker has the most dependents, but it's not what we want to look at
n_splits = sorted(count_dependents)[-2]
# There is a transpose/stack group that is splitting into many tasks
# see https://github.com/dask/dask/pull/10660#discussion_r1420571664
# the name depends on the version of xarray
as... | Review this code and list any quality issues. | [
{
"issue": "This hovers around 99 on main and now we add one task so we get to approx 100",
"severity": "minor",
"line": 26
}
] | 1 |
python | Namespace support is not enabled by default. To enabled it call:
sklearn.set_config(array_api_dispatch=True)
or:
with sklearn.config_context(array_api_dispatch=True):
# your code here
Otherwise `array_api_compat.numpy` is
always returned irrespective of the fact that arrays impleme... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n remove_types : tuple or list, default=(str, list, tuple)\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | # under the License.
from __future__ import annotations
import json
import os
import sys
import rich
from airflowctl.api.client import NEW_API_CLIENT, ClientKind, provide_api_client
from airflowctl.api.datamodels.generated import (
BulkActionOnExistence,
BulkBodyVariableBody,
BulkCreateActionVariableBody... | Review this code and list any quality issues. | [] | 0 |
python | _TESTS = [{
'url': 'https://cu.tbs.co.jp/program/23601',
'playlist_mincount': 4,
'info_dict': {
'id': '23601',
'categories': ['エンタメ', 'ミライカプセル', '会社', '働く', 'バラエティ', '動画'],
'description': '幼少期の夢は大人になって、どう成長したのだろうか?\nそしてその夢は今後、どのように広がっていくのか?\nいま話題の会社で働く人の「夢の成長」... | Review this code and list any quality issues. | [
{
"issue": "- wouldn't hurt to have a fallback for the playlist id\r\n - it's a good idea to call `str_or_none` if the `id` is numeric and could possibly be returned as int\r\n```suggestion\r\n 'id': program_id,\r\n **traverse_obj(programme, {\r\n 'categories': 'keywords',\r... | 1 |
python | # Integer masked array should produce Int64 with pd.NA where mask=True
ma_arr = ma.array([1, 2, 3, 4], mask=[False, True, False, True])
result = pd.array(ma_arr)
expected = pd.array([1, pd.NA, 3, pd.NA], dtype="Int64")
tm.assert_extension_array_equal(result, expected)
def test_pd_array_from_masked_arr... | Review this code and list any quality issues. | [
{
"issue": "Expected cannot depend on result.",
"severity": "minor",
"line": 26
}
] | 1 |
python | [
(MINUTELY, 15),
(MINUTELY, 120),
(MINUTELY, 60 * 24 * 3),
(HOURLY, 7),
(HOURLY, 24 * 3),
],
)
def test_fast_forward_date(freq, interval):
'''
Assert that the resulting fast forwarded date is included in the original rrule
occurrence list
'''
dtstart = no... | Review this code and list any quality issues. | [
{
"issue": "Any reason it's not\r\n```suggestion\r\n assert new_datetime in gen\r\n```\r\n?",
"severity": "minor",
"line": 26
}
] | 1 |
python | for dimension, distinct_values in values_per_dimension.items():
if len(distinct_values) == 1:
uninteresting.add(dimension)
return uninteresting
def collect_data(tag: str, binary_dir: Path, pytest_opts: str):
"""Executes the specified test using the provided firecracker binaries"""
bin... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n os.rename(\"test_results\", tag)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | box0_input_pos = box0_init_pos
box1_input_pos = box1_init_pos
box0_input_quat = box0_init_quat
box1_input_quat = box1_init_quat
for trial in range(TRIALS):
rand_dx = torch.randn_like(dL_dx)
rand_dx = torch.nn.functional.normalize(rand_dx, dim=-1)
dL ... | Review this code and list any quality issues. | [] | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.