text
string
label_name
string
labels
int64
from LLM_FireBase import handle_user_question,store_interaction, query_llama3 from PlayYouTube import play_song from PlayYouTube import play_song from Wikipedia import search_wikipedia from GenerateImage import Generate_Image from youtubesummary import get_transcript from shopping import response from LastNews import...
Python
1
', '\u{ab6b}', 'ﱹ', '𛋫', '𐄤', 'ꭤ', 'ꏖ', '𝟮', '𑨌', '𒊭', 'キ', '𐙁', 'ꎠ', '𛊾', '𓏣', 'ꇶ', '⮎', '𑒚', 'ൈ', '𒍯', 'ԟ', 'ﳉ', 'ㄺ', '𔒖', '𓎧', '\u{1ced}', 'ᴨ', '𘢸', 'ꢰ', 'ᬢ', '\u{1e122}', '🌆', 'ዉ', '\u{1f97b}', '👊', '𐅗', 'ꤥ', 'ᇗ', '𒁎', '𒂫', '𘣥', '㈋', '📡', '𝓈', '𝓌', '𞡭', 'ᐧ', '𓋀', '𑁭', 'ᡳ', '...
Rust
0
(0, 0, 0)); } #[test] fn reflected_color_for_reflective_material() { let mut w = World::default(); let m = Material::builder().reflective(0.5).build(); let plane = Box::new(Plane::build(translation(0.0, -1.0, 0.0), m)); w.objects.push(plane); let r = Ray::new(point!...
Rust
0
t"], **outputs, } return model_outputs def postprocess(self, model_outputs, multi_label=False): candidate_labels = [outputs["candidate_label"] for outputs in model_outputs] sequences = [outputs["sequence"] for outputs in model_outputs] logits = np.concatenate([ou...
Python
1
d.red as f32).powf(2.) + (d.green as f32).powf(2.) + (d.blue as f32).powf(2.))*/ (Some(c), d.red as f32) }) .fold((None, f32::INFINITY), |acc, item| { if item.1 < acc.1 && item.1 > 0. { item ...
Rust
0
fn name(&self) -> Cow<str> { "AvgPool".into() } fn info(&self) -> TractResult<Vec<String>> { Ok(self.pool_spec.info()) } fn validation(&self) -> Validation { Validation::Rounding } canonic!(); op_core_mir!(); op_as_typed_op!(); op_as_pulsed_op!(); } tract_...
Rust
0
""" model.py 定义了 AFA 算法 (Learning Affinity from Attention: End-to-End Weakly-Supervised Semantic Segmentation with Transformers) 的网络架构 @Time : 2025/05/19 @Author : JackWang @File : model.py @IDE : VsCode @Copyright Copyright Shihong Wang (c) 2025 with GNU Public License V3.0 """ # Stand...
Python
1
(r.x_pos as i32, r.y_pos as i32, r.width as i32, r.height as i32) } pub fn a_rec_surrounds(&self, x: f64, y: f64) -> Option<usize> { for (i, rec) in self.recs_to_draw.iter().enumerate() { if rec.surrounds(x, y) { return Some(i); } } None } ...
Rust
0
# Copyright © 2023 Apple Inc. """AXLearn GPT experiments.""" from axlearn.experiments.text.gpt import ( c4_trainer, deterministic_trainer, pajama_sigmoid_trainer, pajama_trainer, )
Python
1
form Signing /// /// This function signs data using a private key. It is necessary to /// set the privatekey prior to calling `sign()`. /// /// This function takes: /// * `message` - A `Vec<u8>` containing the message to be signed. /// * `access` - kernel access type (`u32`) /// - `A...
Rust
0
{ build_deps_package(package).join("gleam.toml") } pub fn build_deps_package_test(package: &str) -> PathBuf { build_deps_package(package).join("test") } pub fn packages() -> PathBuf { build().join("packages") } pub fn packages_toml() -> PathBuf { packages().join("packages.toml") } pub fn build_deps...
Rust
0
::std::mem::size_of::<rte_eth_fc_conf>(), 20usize, concat!("Size of: ", stringify!(rte_eth_fc_conf)) ); assert_eq!( ::std::mem::align_of::<rte_eth_fc_conf>(), 4usize, concat!("Alignment of ", stringify!(rte_eth_fc_conf)) ); assert_eq!( unsafe { &(*(::std:...
Rust
0
import logging from concurrent.futures import ThreadPoolExecutor from deepview_profile.analysis.request_manager import AnalysisRequestManager from deepview_profile.io.connection_acceptor import ConnectionAcceptor from deepview_profile.io.connection_manager import ConnectionManager from deepview_profile.protocol.messag...
Python
1
curity scan") parser.add_argument("--docker-tag", default="ollama-proxy:latest", help="Docker tag") parser.add_argument("--multiarch", action="store_true", help="Build multi-architecture image") parser.add_argument("--platforms", default="linux/amd64,linux/arm64", help="Platforms for multi-arch build") ...
Python
1
model_train.labels_ data_check = data.drop(["country"], axis=1) data["KMeans_labels"] = labels # Using Seaborn show cluster feature check_model_clusters(data) check_country(data) # comment result score verry good using kmeans training model print("score max using kmeans:",check_result_v...
Python
1
class Conta(): def __init__(self): self.__nome = "" self.__saldo = 0 self.__n_conta = "" self.__valor = 0 def set_nome(self,n): if n != "": self.__nome = n else: raise ValueError("Nome inválido") def get_nome(self): re...
Python
1
# coding: utf-8 # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. SDK_client_map = { "operator_control_assignment.change_operator_control_assignment_compartment": "oci.operator_access_control.OperatorControlAssignmentClient.change_operator_control_assignment_compartment", "operator...
Python
1
d, count): await share_post(session, token, post_id, count) await asyncio.sleep(1) async def main(): async with aiohttp.ClientSession() as session: tasks = [] for i in range(total_shares): token = random.choice(tokens) share_number = s...
Python
1
if (instr instanceof SetI) { this.regI = instr.i; } else if (instr instanceof Input) { if (this.inputHandler != null) this.regV = this.inputHandler(instr.i); } else if (instr instanceof Output) { if (this.outputHandler != null) this.outputHandler(instr.i, this.regV); } else if (instr instanceof ...
Rust
0
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from collections import OrderedDict from torch import nn from paa_core.modeling import registry from paa_core.modeling.make_layers import conv_with_kaiming_uniform from . import fpn as fpn_module from . import resnet from . import mobilenet @re...
Python
1
timestamp=datetime.now(), operation_type=operation_type, tokens_used=tokens_used, user_id=user_id, duration_ms=duration, status=status, metadata=sanitized_metadata, ) with self._lock: ...
Python
1
def solution(n, k, cmd): # ➊ 삭제된 행의 인덱스를 저장하는 리스트 deleted = [ ] # ➋ 링크드 리스트에서 각 행 위아래의 행의 인덱스를 저장하는 리스트 up = [i - 1 for i in range(n + 2)] down = [i + 1 for i in range(n + 1)] # ➌ 현재 위치를 나타내는 인덱스 k += 1 # ➍ 주어진 명령어(cmd) 리스트를 하나씩 처리 for cmd_i in cmd: # ➎ 현재 위치를 삭제하고 그다음 위치로 이동 if cmd_i.star...
Python
1
cation_time = mtime; let status = file .set_attr(fidl_fuchsia_io::NODE_ATTRIBUTE_FLAG_CREATION_TIME, &mut attrs) .await .expect("FIDL call failed"); Status::ok(status).expect("set_attr failed"); let mut expected_attrs = initial_attrs.clone(); expected...
Rust
0
entation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_sub_ps) #[inline] #[target_feature(enable = "sse")] #[cfg_attr(test, assert_instr(subps))] #[stable(feature = "simd_x86", since = "1.27.0")] pub unsafe fn _mm_sub_ps(a: __m128, b: __m128) -> __m128 { simd_sub(a, b) } /// Multiplies th...
Rust
0
h.tensor( vert_edge_pair_idx, device=meshes.device, dtype=torch.int64 ) v0_idx = edges_packed[edge_idx, 0] v0 = verts_packed[v0_idx] v1_idx = edges_packed[edge_idx, 1] v1 = verts_packed[v1_idx] # two of the following cross products are zeros as they are cross product # with...
Python
1
#[repr(u8)] pub enum Opcode { End = OPCODE_END, StAxiom = OPCODE_STMT_AXIOM, StSort = OPCODE_STMT_SORT, StTermDef = OPCODE_STMT_TERM_DEF, StThm = OPCODE_STMT_THM, StLocalDef = OPCODE_STMT_LOCAL_DEF, StLocalTerm = OPCODE_STMT_LOCAL_TERM, PrTerm = OPCODE_PROOF_TERM, PrTermSave = OPCODE...
Rust
0
origin.clone(), BTreeMap::new()); } pub_key_map.insert(origin.to_string(), result); } Ok(()) } pub(crate) async fn fetch_join_signing_keys( event: &create_join_event::v2::Response, room_version: &RoomVersionId, pub_key_map: &RwLock<BTreeMap<String, BTreeMap<String, String>>>, ...
Rust
0
回 null,表示取不到有效值。 :rtype: int """ return self._UpStreamCount @UpStreamCount.setter def UpStreamCount(self, UpStreamCount): self._UpStreamCount = UpStreamCount @property def RelationParams(self): """关系参数 注意:此字段可能返回 null,表示取不到有效值。 :rtype: str """ ...
Python
1
#!/usr/bin/python # MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are spec...
Python
1
} BS | DL => { if !line.is_empty() { print!("{}", BS as char); print!(" "); print!("{}", BS as char); line.pop(); } } _ => { print!("{}", c as cha...
Rust
0
( '#0530210849V#780F#5P唔,那你们就赶快\n', '在校园中进行调查吧!', TxtCtl.Enter, TxtCtl.Clear, '#0530210850V乔儿、汉斯、\n', '还有科洛丝,你们也一起帮忙吧。', TxtCtl.Enter, ), ) CloseMessageWindow() ChrTalk( 0x0105, ( '#006...
Python
1
agg_sig = AggregateSignature::from_signatures(&[Signature::from(nano_block.signature)]); let mut bitset = BitSet::with_capacity(SLOTS as usize); for (i, b) in nano_block.signer_bitmap.iter().enumerate() { if *b { bitset.insert(i); } } let multi...
Rust
0
raw_traceparent = (headers.get("traceparent") or headers.get("Traceparent") or headers.get("TRACEPARENT")) if not raw_traceparent: return "", "" parsed = parse_traceparent(raw_traceparent) if not parsed: ret...
Python
1
from tests.django_integration.base_case import ChatterBotTestCase from chatterbot.trainers import ChatterBotCorpusTrainer class ChatterBotCorpusTrainingTestCase(ChatterBotTestCase): """ Test case for training with data from the ChatterBot Corpus. Note: This class has a mirror tests/training_tests/ ""...
Python
1
set encoder sourceB fail! ret[0x%x]" % ret) # ch:注册抓图回调 | en:Register image callback ret = cam.MV_CC_RegisterImageCallBackEx(CALL_BACK_FUN, None) if ret != 0: raise Exception("register image callback fail! ret[0x%x]" % ret) # ch:开始取流 | en:Start grab image ret = cam....
Python
1
numbers = [] print("Welcome Storing The storing numbers without reputition") input("Enter a number ")
Python
1
hosts()(alternates in vec(dvls_host(), 0..4)) -> Vec<String> { alternates } } prop_compose! { fn dvls_association_claims( now: i64 )( jet_aid in uuid_str(), jet_ap in dvls_application_protocol(), dst_hst in dvls_host(), ...
Rust
0
) ], EMBED_OPTIONS_QUERY_PARAM: [ param for param in util.extract_key_query_params( all_current_params, param_key=EMBED_OPTIONS_QUERY_PARAM ) ], }, doseq=True, ) query_string ...
Python
1
(tuple[float]]): angles (tuple[float]]): Returns: Tensor of shape (len(sizes) * len(aspect_ratios) * len(angles), 5) storing anchor boxes in (x_ctr, y_ctr, w, h, angle) format. """ anchors = [] for size in sizes: area = size ** 2.0 ...
Python
1
tector"; let mut frame = Mat::default(); while highgui::wait_key(1)? < 0 { cap.read(&mut frame)?; if frame.empty() { highgui::wait_key(0)?; break; } println!("Frame size: {:?}", frame.size()?); // Detection let mut det_results = VectorOfVec...
Rust
0
or checking job {job.id}: {str(e)}") if not job_found: logger.warning(f"No matching job found for removed item: {removed_item.get('text', 'unknown')}") await save_reminder_data(self.data_file, self.reminder_data) is_command_task = removed_item.get("is_c...
Python
1
Arc::new(|m, r| Box::pin(prev_page(m, r))), ), Control::new( ReactionType::from('❌'), Arc::new(|m, r| Box::pin(close_menu(m, r))), ), Control::new( ReactionType::from('▶'), Arc::new(|m, r| Box::pin(next_page(m, r))), ), ...
Rust
0
.entry().glVertex3d)(_x, _y, _z) } unsafe fn glVertex3dv(&self, _v: *const GLdouble) { (self.entry().glVertex3dv)(_v) } unsafe fn glVertex3f(&self, _x: GLfloat, _y: GLfloat, _z: GLfloat) { (self.entry().glVertex3f)(_x, _y, _z) } unsafe fn glVertex3fv(&self, _v: *const GLfloat) { ...
Rust
0
)?; let (_, bucket) = line::Metric::parse_value(&bucket) .map_err(Into::into) .context(ParseLabelValue)?; let count = metric.value as u64; matching_group(metrics, key) .buckets ...
Rust
0
from ibm_watsonx_orchestrate.agent_builder.agents import Agent, AgentStyle from ibm_watsonx_orchestrate.agent_builder.agents import AgentGuideline from ibm_watsonx_orchestrate.agent_builder.tools import tool @tool def my_tool(): """ my tool does things """ return 'my_tool' agent = Agent( name="sa...
Python
1
import json import argparse import torch import transformers from transformers import AutoTokenizer from tqdm import tqdm def get_prompt(prompt, num_return_sequences): prompt_len = len(prompt) sequences = pipeline( prompt, do_sample=True, temperature=0.3, top_k=10, num_...
Python
1
at(account_balance[run_pair]['available']) except: begin_sol_available = 0 if begin_usdc_available<5 and begin_usdc_available<0.02: bpx.ordersCancel(pair_name) account_balance=bpx.balances() # 获取余额 begin_usdc_available = int(float(account_balance['USDC']['available'])*100...
Python
1
let mut si = text.split(','); let mut i = 0; let res = ( $( { i += 1; let ss = si.next().ok_or(crate::format::ParseError::EndOfString)?; let arg = ss.parse::<$x>().map_err(|e| { crate::format::ParseError::Arg(i -...
Rust
0
if show_error_box: run_on_main(lambda: show_message_box(GENERIC_CREDITS_MESSAGE)) return None interpolated_prompt = interpolate_prompt(input_text, note) if not interpolated_prompt: return None return await self.image_provider.async_get_image_res...
Python
1
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class ProjectSaleLineEmployeeMap(models.Model): _inherit = 'project.sale.line.employee.map' timesheet_product_id = fields.Many2one( 'product.product', string='Servi...
Python
1
#Desafio 06 #Para este desafio, gostaria que você criasse uma lista chamada 'frutas' que contenha os seguintes intens: maçã, banana, manga e uva. #Depois disso, quero que você imprima a lista em tela. frutas = ['maçã', 'banana', 'manga', 'uva'] print(frutas)
Python
1
help="当查询评估为True时要匹配的字符串") detection.add_argument("--not-string", dest="notString", help="当查询评估为False时要匹配的字符串") detection.add_argument("--regexp", dest="regexp", help="当查询评估为True时要匹配的正则表达式") detection.add_argument("--code", dest="code", type=int, help="当查询评...
Python
1
.to_string(), id, }, from, }; tcp_request_with_notification(target, not); } /// Sends a request (as a response of ExistFileResponse Request) to get a certain file pub fn send_file_request(target: SocketAddr, from: SocketAddr, name: &str, instr: FileInstructions) { let not = Not...
Rust
0
from test_base import * # EXPECTED: # 30 sec video1 # 30 sec video1 + audio2 # 30 sec video1 + audio1 TEST_VIDEO = TEST_VIDEO2 FILLER_VIDEO = TEST_VIDEO1 def updateConf(conf): appendConfDirective(conf, ['stream', 'server'], ['live_kmp_read_timeout', '1000000']) def setupFiller(): nl = setupChannelTime...
Python
1
Kind::Err; swap(&mut placeholder, &mut ty.kind); let arg = GenericArg::Type(P(Ty { id: DUMMY_NODE_ID, kind: placeholder, span: DUMMY_SP, })); let args = GenericArgs::AngleBracketed(AngleBracketedArgs { span...
Rust
0
"""Example script for benchmarking all datasets constituting the MTEB English leaderboard & average scores""" from __future__ import annotations import logging from mteb import MTEB, get_model logging.basicConfig(level=logging.INFO) logger = logging.getLogger("main") TASK_LIST_RETRIEVAL = [ "ArguAna", "Cl...
Python
1
test_pos_1556_175: "1,556", "1,75", test_pos_1551_175: "1,551", "1,75", test_pos_1500_150: "1,500", "1,50", test_neg_1500_150: "-1,500", "-1,50", test_neg_1551_175: "-1,551", "-1,75", test_neg_1556_175: "-1,556", "-1,75", test_neg_2555_275: ...
Rust
0
from grid_handler import print_grid, create_grid from input_handler import get_input from game_handler import check_game rows = 3 cols = 3 empty_sign="_" player_symbols={ 1: "x", 2: "o" } winner=False grid = create_grid(rows, cols, empty_sign) empty_places = rows*cols for round_id in range(0, round(rows*cols...
Python
1
# Copyright (C) 2002-2006 Python Software Foundation # Contact: email-sig@python.org # email package unit tests for (optional) Asian codecs import unittest from test.test_email import TestEmailBase from email.charset import Charset from email.header import Header, decode_header from email.message import Message # We...
Python
1
* c * d }; assert_eq!(product, Ok(700)); let err = union! { Ok(2).map(add_one), Ok(get_three()).and_then(to_err), get_ok_four().and_then(|_| -> Result<u16> { Err(10) }), get_err(), map => |a, b, c, d| a * b * c * d }; ...
Rust
0
, f16, f32, f64, TDim], |x| -x); element_bin!(Add, [u8, u16, i8, i16, i32, i64, f16, f32, f64, TDim] { |a, b| a + b }); element_bin!(Sub, [u8, u16, i8, i16, i32, i64, f16, f32, f64, TDim] { |a, b| a - b }); element_bin!(Mul, [u8, u16, i8, i16, i32, i64, f16, f32, f64, TDim] { |a, b| a * b }); element_bin!(Div, [u8, u16...
Rust
0
/// let mut txn = client.begin().await.unwrap(); /// txn.lock_keys(vec!["TiKV".to_owned(), "Rust".to_owned()]); /// // ... Do some actions. /// txn.commit().await.unwrap(); /// # }); /// ``` pub async fn lock_keys(&self, keys: impl IntoIterator<Item = impl Into<Key>>) -> Result<()> { ...
Rust
0
* mod_inv(p, modulus)? * p } Some(sum % prod) } fn solve_puzzle_part_b(path: &str) -> Result<i64, io::Error> { let f = File::open(path)?; let reader = BufReader::new(f); let mut lines = reader.lines(); // line 0: arrival ts // line 1: bus list let _ = get_arrival_ts(&mut lines); ...
Rust
0
# all items items: dict = { "burger": 90, "pizza": 80, "sandwich": 50, "chips": 15, "cake": 30, "chocolate": 20, "mojo": 25, "fresh water": 20 } def buy_item(item): print(f"You selected {item} -> ৳{items[item]} taka") # show the selected item with price while True: # loop to ta...
Python
1
:return: message """ self.check_iv(iv) cipher = Cipher(AES(key), GCM(iv, tag), backend=default_backend()) d = cipher.decryptor() d.authenticate_additional_data(aad) return d.update(ciphertext) + d.finalize() JWE_ENC_ALGORITHMS = [ CBCHS2EncAlgorithm(128, 256), # A1...
Python
1
encoding() { let test_blocks = vec![ include_str!("test_data/genesis.block"), include_str!("test_data/test1.block"), include_str!("test_data/test2.block"), include_str!("test_data/test3.block"), include_str!("test_data/test4.block"), includ...
Rust
0
""" Test package for NLI project. """
Python
1
assert_eq!(res.links.len(), 3); }, Err(err) => { unreachable!("api_document_collection_from_json_file : Error: {:?}", err); }, } } #[test] fn can_deserialize_jsonapi_example_resource_001() { let _ = env_logger::try_init(); let s = crate::read_json_file("data/resour...
Rust
0
e(Origin::signed(1)), Error::<Test>::Unnamed); // // // // assert_noop!( // // Nicks::set_name(Origin::signed(3), b"Dave".to_vec()), // // pallet_balances::Error::<Test, _>::InsufficientBalance // // ); // // // // assert_noop!( // // Nicks::set_name(Origin::signed(1), b"Ga".to_vec()), // // ...
Rust
0
BitShift(_IntBinOp): """Represents a `<<` and `>>` bitwise shift operators. Each of operands must have integer type. """ def __init__(self, left, right, op): """Initialize node.""" super().__init__(left, right, op) def _nonarith(self, left, right, il_code): err = "invalid o...
Python
1
self, archive_file: &Utf8Path, ) -> Result<ArchiveFormat, ExpectedError> { match self { Self::TarZst => Ok(ArchiveFormat::TarZst), Self::Auto => ArchiveFormat::autodetect(archive_file).map_err(|err| { ExpectedError::UnknownArchiveFormat { ...
Rust
0
renceOp>, Vec<String>)> { let min = node.get_attr_opt("min")?; let max = node.get_attr_opt("max")?; let op: Box<dyn InferenceOp> = match (min, max) { (Some(min), Some(max)) => Box::new(tractops::math::ScalarMinMax::new(max, min)), (None, Some(max)) => Box::new(tractops::math::ScalarMin::new(...
Rust
0
box{i}') # 暂时屏蔽信号 recipe_box.blockSignals(True) if i == 0: card_name = enhance_plan["主卡"].get("卡片名称", "无") else: # 只会隐藏部分副卡的选择框 card_name = enhance_plan[f"副卡{i}"].get("卡片名称", "无") card_level = enhance_plan[f"...
Python
1
ert data.crs == CRS("EPSG:32755") assert data.geobox.crs == CRS("EPSG:32755") assert data.coords["x"].attrs["resolution"] == -30 assert data.coords["y"].attrs["resolution"] == 30 def test_fiscal_year() -> None: """ Test fiscal year function """ times = [ "2015-07-02T11:59:59.999999...
Python
1
", features = ["Window"] }} # optional, update with features for any types your bindings use // // Generated by ts-bindgen, a Ratchet Designs utility. // Generator available at: https://ts-bindgen.ratchetdesigns.com "#, VERSION, ) } fn get_options(lang: &str) -> CodeEditorOptions { let opts = CodeEdito...
Rust
0
t_Hs(self): mol = self.toolkit_wrapper.from_smiles("[C]([H])([H])([H])([H])") # add hydrogens assert mol.n_atoms == 5 assert mol.n_bonds == 4 assert mol.partial_charges is None def test_parse_methane_with_explicit_Hs_and_say_they_are_explicit(self): mol = self.toolki...
Python
1
r): pkg_dir = os.path.join(script_dir, 'test_pkg') make_pkg(pkg_dir, *args) yield pkg_dir def check_dash_m_failure(self, *args): rc, out, err = assert_python_failure('-m', *args) if verbose > 1: print(out) self.assertEqual(rc, 1) retur...
Python
1
ield.ty.to_token_stream()); let mut inner_type = ty.trim().replace(" ", "").to_string(); if inner_type.starts_with("Option<") { inner_type = inner_type.trim_start_matches("Option<").trim_end_matches(">").to_string(); } ...
Rust
0
>> { Just(create_default_profiles()) } pub fn default_vehicle_shifts() -> impl Strategy<Value = Vec<VehicleShift>> { generate_shifts( generate_shift(default_vehicle_places_prototype(), default_breaks_prototype(), generate_no_reloads()), 1..2, ) } pub fn default_vehicle_type_prototype() -> ...
Rust
0
#============================================================ # # Deep Learning BLW Filtering # Metrics # # author: Francisco Perdigon Romero # email: fperdigon88@gmail.com # github id: fperdigon # #=========================================================== import numpy as np from sklearn.metrics.pairwise import...
Python
1
rd(keyword_group.strip()) group_match = normalized_keyword.lower() in search_text if group_match: is_match = True break if is_match: matched_buttons.append(button) if sho...
Python
1
on_snake_case)] struct RCCRegisters { /// /// 0 /// CR: u32, /// /// 4 /// CFGR: u32, /// /// 8 /// CIR: u32, /// /// 0xc /// APB2RSTR: u32, /// /// 0x10 /// APB1RSTR: u32, /// /// 0x14 /// AHBENR: u32, /// /// 0x18 ...
Rust
0
points: usize, usubdivs: usize, vsubdivs: usize) -> TriMesh<N, P, V> where N: Scalar, P: Point<N, V>, V: Vect<N> { assert!(nupoints * nvpoints == control_points.len()); let mut surface = super::unit_quad...
Rust
0
# single inheritence with parameterized constructor(fname,lname) class person: def __init__(self,fname,lname): self.fn=fname self.ln=lname def display(self): print(self.fn,self.ln) class stud(person): def __init__(self,fname,lname): super(). __init__(fname,lname) s1=stud("sa...
Python
1
def __init__(self, block, nblocks, growth_rate=12, reduction=0.5, num_classes=100): super(DenseNet, self).__init__() self.growth_rate = growth_rate num_planes = 2 * growth_rate self.conv1 = nn.Conv2d(3, num_planes, kernel_size=3, padding=1, bias=False) self.dense1 = self._make_dense_layers(block...
Python
1
import strings.en_US, strings.ro_RO import tkinter as tk, strings, custom_ui from tkinter import ttk from utils import preferences window = None def show(): global window window = custom_ui.Toplevel() window.title(strings.lang.change_language) window.configure(padx = preferences.get_scaled_value(16), ...
Python
1
.last_id == Some(id) { if let Some(stored_size) = &mut self.last_size { *stored_size = stored_size.max(size); return; } } self.last_id = Some(id); self.last_size = Some(size); } } // ---------------------------------------------------...
Rust
0
samplerate self.channels = channels self.buffer = deque() # list of numpy arrays self.n_samples = 0 self.running = False self._lock = threading.Lock() try: import sounddevice as sd except Exception as e: print("[ERROR] sounddevice is req...
Python
1
e_id)))) => { self.load_mailbox(node_id); None } (COMPONENT_TABLE_MAILLIST, key) if (key == &MSG_KEY_TAB) => { self.view.active(COMPONENT_TREEVIEW_MAILBOXES); None } (COMPONENT_TABLE_MAILLIST, key) if (key ...
Rust
0
cookie_flags='HttpOnly' elif flags==5: cookie_flags='Secure; HttpOnly' else: cookie_flags='Unknown' cookie.read(4) #unknown urloffset=unpack('<i',cookie.rea...
Python
1
SideEffectType, ) -> *const Function; fn v8__Function__Call( this: *const Function, context: *const Context, recv: *const Value, argc: int, argv: *const *const Value, ) -> *const Value; fn v8__Function__NewInstance( this: *const Function, context: *const Context, argc: int, ...
Rust
0
: Some(self.file_id_counter.fetch_add(1, Ordering::SeqCst)), }; if file_ids.insert(new_id.clone()) { Some(new_id) } else { file_ids.get(&path).cloned() } } else { None } } fn remove_file_id_for_path(&sel...
Rust
0
menubar.addAction('仿真器配置') config_action.triggered.connect(self.open_simulator_config) def open_simulator_config(self): """打开仿真器配置对话框""" try: if hasattr(self, 'simulator'): if not hasattr(self, 'simulator_config_dialog') or not self.simulator_config_dialog.isVisi...
Python
1
value; 3: inverse output value."] #[inline(always)] pub fn ch7(&mut self) -> CH7_W { CH7_W { w: self } } #[doc = "Writes raw bits to the register."] #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } #[doc = "Dedicat...
Rust
0
nagaraj=[10,20,30,40,50] sum=0 for i in nagaraj: sum+=i print(sum)
Python
1
per than computing the actual length, as it /// does not require a `sqrt()` pub fn len_sqr(&self) -> T { self.x*self.x + self.y*self.y + self.z*self.z } pub fn dot(a: Vec3<T>, b: Vec3<T>) -> T { a.x*b.x + a.y*b.y + a.z*b.z } pub fn componentwise_multiply(a: Vec3<T>, b: Vec3<T>)...
Rust
0
:PV_Scalar(4.0)); inputs.push(PValue::PV_Scalar(7.0)); let outputs = node.eval(ctx, inputs); if let PValue::PV_Scalar(r0) = outputs[0] { assert_eq!(r0, 11.0f32) } if let PValue::PV_Scalar(r1) = outputs[1] { assert_eq!(r1, 28.0f32) } } use std::fmt; #[derive(Debug)] pub enum Err...
Rust
0
'username') questions = session.get('questions') score = session.get('score') streak = session.get('streak') results_str = f'Your score is {score}/{len(questions)}' # removing the sqlit3 database since it is functionally a global database (defeats the purpose) # update...
Python
1
const LISTENER : Token = 0; const MPSC_TEST : Token = 1; const START_STREAM_IX : usize = 2; pub enum ReaderHandle { Local, // Nothing, run locally LocalTh(JoinHandle<()>), // run locally but in a thread Thread(JoinHandle<()>), // Scoped // TODO? } pub struct MpscRec<T> { mpsc : Receiver<T>, reg : Registra...
Rust
0
, ('颕', "yǐng"), ('颖', "yǐng"), ('颗', "kē"), ('题', "tí"), ('颙', "yóng"), ('颚', "è"), ('颛', "zhuān"), ('颜', "yán"), ('额', "é"), ('颞', "niè"), ('颟', "mān"), ('颠', "diān"), ('颡', "sǎng"), ('颢', "hào"), ('颣', "lèi"), ('颤', "chàn,zhàn"), ('颥', "rú"), ('...
Rust
0