text string | label_name string | labels int64 |
|---|---|---|
heck: [1] : 0x14 [Type: unsigned int]
// cdb-command: dx t2
// cdb-check:t2 : (0x1e, 0x28) [Type: tuple$<u64,u64>]
// cdb-check: [0] : 0x1e [Type: unsigned __int64]
// cdb-check: [1] : 0x28 [Type: unsigned __int64]
// cdb-command: g
// cdb-command: dx s
//... | Rust | 0 |
== 0x9C: # :
result += ":"
elif b == 0x9D: # ;
result += ";"
elif b == 0x9E: # [
result += "["
elif b == 0x9F: # ]
result += "]"
# Special characters
elif b == 0x7F: # Space
... | Python | 1 |
t.clone()).expect("I know this won't panic because the frequencies are hardcoded to be the same");
///
/// let (recovered_cos, recovered_sin) = combined.to_orthogonal_components();
///
/// //there is a small loss of precision when going back and forth between split components and one sinusoid.
/// a... | Rust | 0 |
ed deposit.
//! - `reject_proposal` - Reject a proposal, slashing the deposit.
//! - `approve_proposal` - Accept the proposal, returning the deposit.
//!
//! ## GenesisConfig
//!
//! The Treasury pallet depends on the [`GenesisConfig`].
#![cfg_attr(not(feature = "std"), no_std)]
mod benchmarking;
#[cfg(test)]
mod tes... | Rust | 0 |
unsqueeze(2) # Add back time dimension
else:
latent_out = latent_out.view(B, C, T, int(H * upscale), int(W * upscale))
elif len(original_shape) == 3:
latent_out = latent_out.squeeze(0)
# Convert to float32 if needed
if self.dtype != torch.float32:
... | Python | 1 |
"
setup_file.write_text(
"""
from setuptools import setup
setup(
name="test-package",
install_requires=["requests>=2.25.0"]
)
"""
)
# Mock universal parser to fail, forcing fallback to line 145
with patch.object(
updater.universal_parser, "parse_file", si... | Python | 1 |
let mut value = BytesMut::new();
encode_string("measurement name", &mut value);
assert_eq!(value, "measurement\\ name");
let mut value = BytesMut::new();
encode_string("measurement=name", &mut value);
assert_eq!(value, "measurement\\=name");
let mut value = BytesMut::ne... | Rust | 0 |
241, 1.001310, 1.055563, 1.004187, 1.006212, 1.050846, 1.050423, 1.048931, 1.047128, 1.045364, 1.044571,
1.042123, 1.036002, 1.031195, 1.028148, 1.023533, 1.021181, 1.015756, 1.013636, 1.014241, 1.148380, 1.193790, 1.004262, 1.022560, 1.001873, 1.000048, 1.006319, 1.008273, 1.010241,
1.001310, 1.05556... | Python | 1 |
.
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<Vec<EvgParameter>>,
}
impl Default for EvgProject {
fn default() -> Self {
EvgProject {
buildvariants: vec![],
tasks: vec![],
task_groups: None,
functions: Default::default(),
... | Rust | 0 |
(&self) -> String {
return format!("{}/{}", self.namespace, self.name);
}
}
<filename>crates/bounded/src/bounded_map.rs
use super::{
BoundedArray,
Index,
OutOfBoundsAccess,
};
use core::{
iter::IntoIterator,
marker::PhantomData,
ops,
};
/// A map with a bounded size for index-like k... | Rust | 0 |
# -*- coding: utf-8 -*-
# 版权所有 2019 深圳米筐科技有限公司(下称“米筐科技”)
#
# 除非遵守当前许可,否则不得使用本软件。
#
# * 非商业用途(非商业用途指个人出于非商业目的使用本软件,或者高校、研究所等非营利机构出于教育、科研等目的使用本软件):
# 遵守 Apache License 2.0(下称“Apache 2.0 许可”),
# 您可以在以下位置获得 Apache 2.0 许可的副本:http://www.apache.org/licenses/LICENSE-2.0。
# 除非法律有要求或以书面形式达成协议,否则本软件分发时... | Python | 1 |
import json
import math
import os
import pickle
import sys
import pandas as pd
from sklearn import metrics
from sklearn import tree
from dvclive import Live
from matplotlib import pyplot as plt
EVAL_PATH = "eval"
if len(sys.argv) != 3:
sys.stderr.write("Arguments error. Usage:\n")
sys.stderr.write("\tpytho... | Python | 1 |
counter_copy.0.fetch_add(1, Ordering::Relaxed);
}) {
println!("!!!> spawn singale task failed, reason: {:?}", e);
}
}
println!("!!!!!!spawn single task ok, time: {:?}", Instant::now() - start);
});
thread::sleep(Duration::from_millis(100... | Rust | 0 |
)
response.raise_for_status()
except requests.exceptions.HTTPError as err:
raise (err)
return json.loads(response.text)
def setChargerSchedules(self, chargerId, newSchedules):
try:
# Enforce chargerId
for schedule in newSchedules.get('schedu... | Python | 1 |
der.wait_for_connection()) {
Ok(event_data) => {
use hci::events::LEConnectionAddressType;
println!("Device Connected! (use ctrl-c to disconnect and exit)");
// Start the server
block_on(bonder.clone().abortable_server_loop(
advertise_address.clo... | Rust | 0 |
_is_valid_unquoted_identifier_start(character: char) -> bool {
return character == '_' || character.is_alphabetic();
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn identifier_basic_unquoted() {
assert_eq!(
parse_identifier_token_value(&String::from("firstname")),
S... | Rust | 0 |
dvbt2_freqinterleaver = dvbt2.freqinterleaver_cc(carrier_mode, fft_size, pilot_pattern, guard_interval, data_symbols, papr_mode, version, mode)
dvbt2_pilotgenerator = dvbt2.pilotgenerator_cc(carrier_mode, fft_size, pilot_pattern, guard_interval, data_symbols, papr_mode, version, mode, dvbt2.MISO_TX1, dvbt2.EQUA... | Python | 1 |
st HID_USAGE_PAGE_UNDEFINED: USAGE = 0x00;
pub const HID_USAGE_PAGE_GENERIC: USAGE = 0x01;
pub const HID_USAGE_PAGE_SIMULATION: USAGE = 0x02;
pub const HID_USAGE_PAGE_VR: USAGE = 0x03;
pub const HID_USAGE_PAGE_SPORT: USAGE = 0x04;
pub const HID_USAGE_PAGE_GAME: USAGE = 0x05;
pub const HID_USAGE_PAGE_KEYBOARD: USAGE = 0... | Rust | 0 |
cluster.minio_port}/{bucket}/test_cache4.jsonl', {auth})"
).strip()
)
def test_no_sign_named_collections(started_cluster):
instance = started_cluster.instances["s3_with_invalid_environment_credentials"]
bucket = started_cluster.minio_bucket
instance.query(
f"insert into funct... | Python | 1 |
curobo.rollout.rollout_base.Goal`
Goal containing desired and current joint configuration.
current_state : :class:`~curobo.types.robot.JointState`, optional
Current robot state. When ``None``, :attr:`Goal.current_state`
is used.
Returns
-------
:clas... | Python | 1 |
django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject... | Python | 1 |
(
&self,
request: BitcoinAdapterRequestWrapper,
opts: Options,
) -> RpcResult<BitcoinAdapterResponseWrapper>;
}
<filename>src/test/ui/methods/method-not-found-generic-arg-elision.rs
// Test for issue 81576
// Remove generic arguments if no method is found for all possible generic argument
u... | Rust | 0 |
import os
import config
import random
import colorsys
import numpy as np
import tensorflow as tf
from model.yolo3_model import yolo
class yolo_predictor:
def __init__(self, obj_threshold, nms_threshold, classes_file, anchors_file):
"""
Introduction
------------
初始化函数
Pa... | Python | 1 |
t_property('Allow', doc='''
The Allow entity-header field lists the set of methods supported
by the resource identified by the Request-URI. The purpose of this
field is strictly to inform the recipient of valid methods
associated with the resource. An Allow header field MUST be
p... | Python | 1 |
StorageType Delete tests
*/
/** positive tests */
#[test]
fn sqlite_storage_type_create_check_metadata() {
_prepare_path();
let storage_type = SQLiteStorageType::new();
let test_metadata = _get_test_keys();
storage_type.create_storage("test_wallet", None, &"", &test_me... | Rust | 0 |
ame} → metric_T0.7_scaled.pt")
logger.info(f"✅ All components updated! Backup in: {backup_dir}")
def verify_stage2_can_load_components(self) -> bool:
"""Verify that Stage 2 can successfully load the corrected components."""
logger.info("🧪 Testing Stage 2 compatibility with cor... | Python | 1 |
res
//!
//! * Apply simple transforms (using JMESPath queries or well known properties) to JSON before writing to Delta
//! * Write bad messages to a dead letter queue
//! * Send metrics to a Statsd endpoint
//! * Control the characteristics of output files written to Delta Lake by tuning buffer latency and file size p... | Rust | 0 |
, Tune(2.0)]
])))
);
assert!(single_parse(synthesize, "@(CE)").is_err());
assert!(single_parse(synthesize, "@(@0").is_err());
assert!(single_parse(synthesize, "@").unwrap().is_none());
assert!(single_parse(synthesize, "94").unwrap().is_none());
}
use cosmwasm_std::{Addr, Uint128};
use cw_sto... | Rust | 0 |
from transformers import pipeline
import pandas as pd
def readData(content_path):
df = pd.read_csv(content_path, encoding='ANSI')
return df
def split_string(text, chunk_size=200):
chunks = []
for i in range(0, len(text), chunk_size):
chunks.append(text[i:i+chunk_size])
return chunks
def e... | Python | 1 |
# ckwg +29
# Copyright 2020 by Kitware, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditi... | Python | 1 |
read_u8()?;
let num_bones = reader.read_u8()?;
for _ in 0..num_frames {
frm.frames
.push(Frame::from_reader(&mut reader, num_bones as u16)?);
}
frm
} else {
let mut frm = Self::new(FrmVersion::V1_1);
le... | Rust | 0 |
import sys
def caesar_cipher(text, shift, mode):
if mode not in ("encode", "decode"):
raise ValueError("Not mode 'encode' or 'decode'.")
if mode == "decode":
shift = -shift
result = []
for char in text:
if "a" <= char <= "z":
new_char = chr((ord(char) - ord("a") +... | Python | 1 |
Some(unsafe { &mut *oldset_ptr })
} else {
None
}
};
super::do_sigprocmask::do_rt_sigprocmask(op_and_set, old_set)?;
Ok(0)
}
pub fn do_rt_sigpending(buf_ptr: *mut sigset_t, buf_size: usize) -> Result<isize> {
let buf: &mut sigset_t = {
if buf_size < std::m... | Rust | 0 |
import pandas as pd
from pathlib import Path
import pytest
from covsirphy import ODEScenario, SIRFModel, ScenarioNotFoundError, SubsetNotFoundError, Term
@pytest.fixture(scope="module")
def jsonpath():
dirpath = Path("input")
dirpath.mkdir(exist_ok=True)
jsonpath = dirpath.joinpath("test.json")
yield ... | Python | 1 |
#!/usr/bin/env python3
import argparse
import bisect
import select
import sys
import termios
import time
import tty
from collections import defaultdict
import cereal.messaging as messaging
from openpilot.tools.lib.framereader import FrameReader
from openpilot.tools.lib.logreader import LogReader
from openpilot.tools.... | Python | 1 |
t_cfg.fp8_amax_history_length = 0
quantized_dot_general_layer: QuantizedDotGeneral = q_dot_cfg.instantiate(parent=None)
params = quantized_dot_general_layer.initialize_parameters_recursively(
prng_key=jax.random.PRNGKey(123)
)
inputs = [
"b... | Python | 1 |
lass CompleteCommit:
"""Commit with complete metadata."""
hash: str
date: str
summary: str
line_num: int
@dataclass(frozen=True, kw_only=True)
class ParsedLine:
"""Line information parsed from git."""
hash: str
date: str
summary: str
line_num: int
content: str
def _form... | Python | 1 |
use clap::Arg;
use crate::args::{hexagram, trigram};
pub const HELP: &str =
"(A 6 digit number){n}Cast your own coins and enter the sequence as a series of digits.{n} ";
pub const LONG_HELP: &str = "\
For each line, cast 3 coins. Heads count for 3 and tails count for 2. Add up the \
result of casting 3 coins to g... | Rust | 0 |
"""
The :mod:`dynamic_obstacle_avoidance` module implements mixture modeling algorithms.
"""
# Various modulation functions
# from .utils import * # Added this to avoid 'circular'-error
from .modulation import obs_avoidance_interpolation_moving
from .repulsion_modulation import obs_avoidance_nonlinear_hirarchy
from ... | Python | 1 |
from deeplite_torch_zoo.src.object_detection.yolo.config_parser import YOLO | Python | 1 |
}
}
bail!("Invalid size argument provided.")
}
fn column_time(&self, stat: &FileStat) -> Result<String> {
let mtime = Local.timestamp(stat.mtime.with_context(|| "File has no mtime.")? as i64, 0);
Ok(format!(
"{mtime}{sep}",
mtime = mtime.form... | Rust | 0 |
# coding: utf-8
"""
merged spec
merged spec
The version of the OpenAPI document: 1.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from kubernetes_asyncio_pydantic.api.apiextensions_v1_api import Apiextensio... | Python | 1 |
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "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 appli... | Python | 1 |
# Fluster - testing framework for decoders conformance
# Copyright (C) 2021, Fluendo, S.A.
# Author: Manuel Jimeno Martínez <mjimeno@fluendo.com>, Fluendo, S.A.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the F... | Python | 1 |
platform. In practice, this
//! means that 64-bit targets should not send messages with slices containing `(1 << 32) - 1` items
//! to 32-bit targets, which is uncommon in practice. Enum discriminants already have a fixed
//! maximum value of `(1 << 32) - 1` as currently defined in Rust. Varints larger than the current... | Rust | 0 |
# Create table in BQ with historical practice data in same format as hscic.practice_details.
#
# New table will be at research.practices_yyyy_mm
#
# Run with ./manage.py runscript create_historical_practice_table --script-args yyyy_mm.
import csv
import sys
from google.cloud import bigquery as gcbq
from google.cloud... | Python | 1 |
();
for i in self.pos..data.len() {
ptr::drop_in_place(&mut data[i]);
}
}
}
}
impl<L: Arrayify<T>, T> Iterator for ArrayIter<L, T> {
type Item = T;
fn next(&mut self) -> Option<T> {
unsafe {
let data = self.data.as_ref().unwrap_unchecked(... | Rust | 0 |
.use_program();
let radius_location = compute_program.get_uniform_location("radius");
unsafe {
// TODO: Make the radius vary for each frame.
gl::Uniform1f(radius_location, 0.5 as GLfloat);
}
// Bind the VBO onto the SSBO, which is going to be filled within the c... | Rust | 0 |