text
string
label_name
string
labels
int64
a> { Self::new() } } impl<'a> std::fmt::Debug for ShaderResourceUsageAMDBuilder<'a> { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { std::fmt::Debug::fmt(&self.0, f) } } impl<'a> std::ops::Deref for ShaderResourceUsageAMDBuilder<'a> { type Target = ShaderResourceUsageAM...
Rust
0
ANISTER, begin: 21, count: 1, }, SignalConfig { end: 21 }, ); let msg = loopback_stream.messages().iter().next().unwrap().1.clone(); initial_state.with_streams(btreemap![LOCAL_SUBNET => loopback_stream]); // Expecting an unchanged ...
Rust
0
activas en Binance") print(f" 🔄 El bot se puede reiniciar para continuar gestionándolas") if self.database: await self.database.log_event('CRITICAL', 'SYSTEM', 'Parada de emergencia activada - Posiciones preservadas') print("🚨 PARADA DE EMERGENCIA ACTIVADA - Posiciones prese...
Python
1
import matplotlib import sys import json import matplotlib.pyplot as plt import matplotlib.patches as mpatches import matplotlib.axes as axes import numpy as np import sklearn.decomposition import sklearn.preprocessing from sklearn.manifold import TSNE COLOR_MAP = plt.cm.gist_rainbow SEED = 0x37255c25 USE_TSNE = True...
Python
1
return { # 力矩(有效 DOF 的 τ_des) 'tau_abs_sum': 0.0, # 累加:每控制步的 mean(|tau|);最后 / step_count → avg_tau_abs 'tau_sq_sum': 0.0, # 累加:每控制步的 sum(tau^2) → sum_tau_sq 'tau_abs_max': 0.0, # 最大:回合 max(|tau|)(控制步内聚合细步峰值) #...
Python
1
letion_overlay: BTreeSet::new(), }; // validate that the stored state is sane debug_assert!(submissions .indices .values() .copied() .max() .map_or(true, |max_idx| submissions.next_idx > max_idx,)); submissions } /// Put the signed submissions back into storage. pub fn put(mut self) { // va...
Rust
0
k, CowStr}; use std::{cell::RefCell, fmt::Debug}; /// Search every file in the [`Files`] and collate all the links that are /// found. pub fn extract<I>( target_files: I, files: &Files<String>, ) -> (Vec<Link>, Vec<IncompleteLink>) where I: IntoIterator<Item = FileId>, { let mut links = Vec::new(); ...
Rust
0
while pool.is_err() && attempts <= MAX_ATTEMPTS { let manager = PostgresConnectionManager::new( connection_string.parse().unwrap(), NativeTls ).unwrap(); println!("Unable to connect, attempt {}/{}", attempts, MAX_ATTEMPTS); pool = Pool::new(manager); atte...
Rust
0
Ok(()) }); methods.add_method("get_id", |lua_ctx, this, ()| { this.borrow().id.to_lua(lua_ctx) }); methods.add_method("get_ty", |_lua_ctx, this, ()| { Ok(this.borrow().ty.as_ref().map(|ty| LuaAstNode::new(ty.clone()))) }); methods....
Rust
0
from django.conf import settings from django.contrib.auth.decorators import permission_required from django.http import HttpResponseRedirect, HttpResponseServerError from django.shortcuts import render, get_object_or_404 from django.template import loader, TemplateDoesNotExist from django.urls import reverse from djang...
Python
1
disp.push_str(format!("Include cycle detected:\n{:?} imports ", self.0[0]).as_str()); for p in &self.0[1..self.0.len() - 1] { disp.push_str(format!("\n{:?}, which imports ", *p).as_str()); } disp.push_str(format!("\n{:?}", self.0[self.0.len() - 1]).as_str...
Rust
0
I pii = tagger.analyze(seq['text']).get_by_entity_class(attack_args.pii_class).unique() pii = ListPII(data=[p for p in pii if len(p.text) > 3]) # min chars for PII if len(pii) == 0: continue # 2. Randomly sample one target PII ...
Python
1
(), tx, ) .map_err(Error::from)?; nvim.subscribe("Gnvim").await.map_err(Error::from)?; let api_info = nvim.get_api_info().await.map_err(Error::from)?; nvim.set_var("gnvim_channel_id", api_info[0].clone()) .await .map_err(Error::from)?; let mut ui_opts = nvim_rs::UiAtta...
Rust
0
, pub solar_system: Option<Vec<i32>>, pub station: Option<Vec<i32>>, } /// Endpoints for Search pub struct SearchGroup<'a> { pub(crate) esi: &'a Esi, } impl<'a> SearchGroup<'a> { api_get!( /// Get a character's public information. get_search, "get_search", RequestType::...
Rust
0
* * Kafka protocol string representation prefixed with a convenience header * * Serialized format: * { uint16, data.. } * */ pub type rd_kafkap_str_t = rd_kafkap_str_s; #[repr(C)] #[derive(Copy, Clone)] #[derive(Debug)] pub struct rd_kafkap_str_s { // convenience header (aligned access, host endian) le...
Rust
0
p1, p2 = value.split("@") except ValueError: # value contains more than one @. return False # Dot must be in p2 (e.g. example.com) if "." not in p2 or p2.startswith("."): return False return True urlizer = Urlizer() @keep_lazy_text def urlize(...
Python
1
from typing import cast from hydra.utils import instantiate from omegaconf import DictConfig, OmegaConf from nuplan.planning.scenario_builder.abstract_scenario import AbstractScenario from nuplan.planning.script.builders.model_builder import build_torch_module_wrapper from nuplan.planning.script.builders.utils.utils_...
Python
1
#!/usr/bin/env python3 """ CellRanger Integration Example for CRISPR Toolkit. This example demonstrates how to use the CellRanger integration module for processing 10x Genomics single-cell RNA-seq data. Usage: python cellranger_example.py Requirements: - CellRanger installed and in PATH - Reference trans...
Python
1
# 25-dars.Son topish o'yini def son_topish(d): import random inson = 0 kompyuter = 0 while True: print('son topish o\'yinini o\'ynaymiz avval men son o\'ylayman siz topasiz') tahminlar1 = 0 b_son = random.randint(1, d) while True: tahminlar1 += 1 ...
Python
1
substeps = 1 gravity = [0., 0. ,-9.81] # [m/s^2] up_axis = 1 # 0 is y, 1 is z class physx: num_threads = 10 solver_type = 1 # 0: pgs, 1: tgs num_position_iterations = 4 num_velocity_iterations = 0 contact_offset = 0.01 # [m] ...
Python
1
abel.setFont(main_text_font) icons_btn = QHBoxLayout() self.show_btn = IconBtn("show_icon_brown.png", Color.LIGHT_GRAY.value, Color.LIGHT_GRAY_DARKER.value) self.show_btn.clicked.connect(self.clicked_show_btn) self.update_btn = IconBtn("update_icon_brown.png", Color.LIGHT_GRAY.value, ...
Python
1
continue if settings.AUTO_BUY is True: balance = await self.get_stats(http_client=http_client) new_pet_cost = await self.get_cost(http_client=http_client) if (balance is not None and new_pet_cost is not None) and int(balance) >= int(new...
Python
1
import unittest from caffe2.python import brew, model_helper, workspace from caffe2.python.modeling.initializers import ( Initializer, PseudoFP16Initializer) class InitializerTest(unittest.TestCase): def test_fc_initializer(self): model = model_helper.ModelHelper(name="test") data = m...
Python
1
s 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 License for the specific language governing permissions and limitations under the License. */ us...
Rust
0
"""Isotope data extracted from NIST public website. Source data has been compiled by NIST: https://www.nist.gov/pml/atomic-weights-and-isotopic-compositions-relative-atomic-masses The atomic weights data were published in: J. Meija et al, Atomic weights of the elements 2013, Pure and Applied Chemistry 8...
Python
1
"""The home config domain application.""" from jupiter.core.domain.application.home.home_tab import HomeTab from jupiter.core.domain.application.home.home_tab_target import HomeTabTarget from jupiter.core.framework.base.entity_id import EntityId from jupiter.core.framework.context import DomainContext from jupiter.cor...
Python
1
rsa_private_keys(&mut reader) .unwrap() .len(), 2 ); } #[test] fn test_certs() { let data = include_bytes!("data/certificate.chain.pem"); let mut reader = BufReader::new(&data[..]); assert_eq!( rustls_pemfile::certs(&mut reader) .unwrap() ...
Rust
0
, ) -> gboolean; pub fn gst_mikey_message_add_rand( msg: *mut GstMIKEYMessage, len: u8, rand: *const u8, ) -> gboolean; pub fn gst_mikey_message_add_rand_len(msg: *mut GstMIKEYMessage, len: u8) -> gboolean; pub fn gst_mikey_message_add_t( msg: *mut GstMIKEYMessage, ...
Rust
0
loc, .. }) => { error!("can't gen field term to c {} ({:?})", name, loc); CExpr::Other("/* error */ 0") } KTerm::TyProperty { kind, ty, .. } => { let value_opt = match *kind { KTyProperty::AlignOf => ty.align_of(ty_env, cx.mod_outline), ...
Rust
0
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
Python
1
AL, "line_normal") .with_out( shader::defs::V_POS, "curr_projected + vec4(line_offset, 0.0, 0.0)", ); let fragment = shader::FragmentCore::empty() .with_in_def(shader::defs::V_COLOR) .with_in_def(V_NORMAL) .with_body( ...
Rust
0
], S::zero(), S::zero(), S::zero(), S::one() ) } } impl<S> Matrix4x4<S> { /// Construct a new matrix from its elements. #[rustfmt::skip] #[inline] pub const fn new( c0r0: S, c0r1: S, c0r2: S, c0r3: S, c1r0: S, c1r1: S, c1r2: S, c1r3: S, c2r0: S, c2r...
Rust
0
TESTCTRL_PARSER_COVERAGE: u32 = 26u32; #[doc = "*Required features: 'Win32_System_SqlLite'*"] pub const SQLITE_TESTCTRL_PENDING_BYTE: u32 = 11u32; #[doc = "*Required features: 'Win32_System_SqlLite'*"] pub const SQLITE_TESTCTRL_PRNG_RESET: u32 = 7u32; #[doc = "*Required features: 'Win32_System_SqlLite'*"] pub const SQL...
Rust
0
ext="🟡 Проблемы", callback_data="manual_notify_degraded"), types.InlineKeyboardButton(text="🔧 Обслуживание", callback_data="manual_notify_maintenance") ], [types.InlineKeyboardButton(text="❌ Отмена", callback_data="maintenance_panel")] ]) await callback.message.edit_text( ...
Python
1
Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct SnippetTextEdit { pub range: Range, pub new_text: String, #[serde(skip_serializing_if = "Option::is_none")] pub insert_text_format: Option<InsertTextFormat>, } pub fn apply_source_change(meta: E...
Rust
0
from unittest import mock import pytest from plotly.graph_objs import Figure from apple_health_parser.exceptions import InvalidImageFormat from apple_health_parser.plot.sleep import SleepPlot from apple_health_parser.utils.parser import Parser class TestSleepPlot: def test_get_figure(self, parser: Parser) -> No...
Python
1
tile away in specified `direction`. /// This is an [`Action`](crate::actions::Action). /// This ability is unlocked at **Level 6**. pub fn rescue_toward(&self, direction: Direction) { if self.level < 6 { panic!("You have not yet learned `rescue_toward`! Perhaps you meant `rescue`?") ...
Rust
0
from manim import * from manimdef import NumText, rect, NumBox, texbox, DefaultManimClass from math import e _dist_buf = DEFAULT_MOBJECT_TO_MOBJECT_BUFFER class TranslationScene(DefaultManimClass): def construct(self): # self.camera.frame.save_state() # self.sceneA() # self.clear() ...
Python
1
import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt df = pd.read_csv('E:/RESUME PROJECY/rue chess/chess heatmap/dataset/chess_games.csv') to_remove_cols = list(df.columns) to_remove_cols.pop() df = df.drop(columns = to_remove_cols) df.head(5) def squares_dictionary_maker()...
Python
1
, map_dates .get(&person.birthday) .unwrap() .format("%b %e") .to_string() ) .bright_blue() ) } } else { ...
Rust
0
from enum import Enum from typing import Any from langgraph.graph import END, StateGraph from documentassistent.agents.classification_agent import ClassificationAgent from documentassistent.agents.invoice_agent import InvoiceAgent from documentassistent.agents.note_agent import NoteAgent from documentassistent.agents...
Python
1
rgs.fasta_dir.mkdir(parents=True, exist_ok=True) # pdb_stream = get_pdb_stream(args.pdb_dir) data = GeneralFileData(args.pdb_dir, allowed_suffixes=['.pdb']) pdb_stream = get_stream(data, batch_size=1, process_fn=None) for pdb_path in pdb_stream: pdb_path = Path(pdb_path[0][0]) #one worker output_path = args....
Python
1
er.debug(f"Importance weighted distribution: {np.array2string(imp_weight_dist, precision=8)}") if cfg.print_debug_outs: print("\n\n" + "=" * 100 + "\n\n") print("\n\n" + "Prefix:\n" + samples[input_key]["prefix"]) print("\n\n" + "Suffix:\n" + ...
Python
1
# # This file is part of LiteX-Boards. # # Copyright (c) 2021 Andrew Dennison <andrew@motec.com.au> # SPDX-License-Identifier: BSD-2-Clause from litex.build.generic_platform import * from litex.build.efinix.platform import EfinixPlatform from litex.build.openfpgaloader import OpenFPGALoader # IOs --------------------...
Python
1
as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `EXTIPSEL1`"] pub enum EXTIPSEL1W { #[doc = "Port A pin 1 selected for external interrupt 1"] PORTA, #[doc = "Port B pin 1 selected for external interrupt 1"...
Rust
0
.arg(edit_config) .arg("--rpu-out") .arg(output_rpu.as_ref()) .assert(); assert.success().stderr(predicate::str::is_empty()); output_rpu.assert(predicate::path::is_file()); let rpus = utilities_dovi::parse_rpu_file(output_rpu.as_ref())?.unwrap(); assert_eq!(rpus.len(), 1); ...
Rust
0
t this as a scheme-less netloc, thereby losing # the original intent of the request. Here we shamelessly stole 4 lines of # code from the CPython stdlib to parse out the fragment and query but # leave the path alone. See # https://github.com/python/cpython/blob/8c9e9b0cd5b24dfbf1424d1f253d02de80e8f5ef/L...
Python
1
import math def inverse_kinematics(p: tuple[float, float, float]) -> tuple[float, float, float, float]: """ Gets the joint values needed to reach position "p". :param p: The position to reach in the form [x, y, z]. :return: A list of the values to set the links to for reaching position "p". """ ...
Python
1
) .walk_expr(body); }); delegate.mutation_span() } struct MutatePairDelegate<'a, 'tcx> { cx: &'a LateContext<'tcx>, hir_id_low: Option<HirId>, hir_id_high: Option<HirId>, span_low: Option<Span>, span_high: Option<Span>, } impl<'tcx> Delegate<'tcx> for MutatePairDelegate<'_...
Rust
0
# -*- coding: utf-8 -*- from www.models.main import ConsoleConfig from console.repositories.custom_configs import custom_configs_repo class CustomConfigsService(object): @staticmethod def bulk_create_or_update(configs, user_nick_name=""): create_config_models = [] update_config_models = [] ...
Python
1
of strikes on either side of the // atm strike. pub const LADDER_SIZE: i32 = (STRIKES - 1) / 2; pub const BTC_STRIKES_INCR_USD: i32 = 500; pub const ETH_STRIKES_INCR_USD: i32 = 50; // Constant program addressses in devnet and mainnet for the oracles pub const SWITCHBOARD_DEVNET_BTC_USD: &str = "74YzQPGUT9VnjrBz8MuyDL...
Rust
0
from patterns import ( Parameter, State, Table, Connection ) from collections import Counter from dataclasses import dataclass, asdict, replace import requests from patterns_components.helpers.api import handle_rate_limiting from .base import table_info, completion, double_check_query, fix_sql_bug, get_...
Python
1
scheme = &s[..scheme_end_idx]; let rest = &s[scheme_end_idx + "://".len()..]; let host_end_idx = rest.rfind(':').ok_or_else(|| Error::InvalidDestinationUrl { value: s.to_owned(), reason: "port is missing", })?; let host = &rest[..host_end_idx]; let port =...
Rust
0
import os from PIL import Image, ImageDraw, ImageFont # 创建digits目录 output_dir = "digits" os.makedirs(output_dir, exist_ok=True) # 配置参数 - 改为正方形尺寸 size = 28 # 正方形尺寸 background_color = 0 # 黑色背景 text_color = 255 # 白色数字 try: # 尝试加载系统字体(适用于不同平台) font_paths = [ # Windows "C:/Windows/F...
Python
1
) os.close(pred_fd) os.close(test_fd) os.close(res_fd) try: os.remove(pred_path) os.remove(test_path) os.remove(res_path) except OSError as e: print(e) def uniqueness(graph_pred_path, graph_pred_indices, temp_path, timeout): pred_fd, pred_path = tempfile.mkste...
Python
1
": [ {"type": "text", "text": prompt}, {"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{base64_image}"}}, ]} ] try: response_content = self._openai_vision_call(messages, is_json=True, is_vision=True) if...
Python
1
by_expr(i: Input) -> IResult<OrderByExpr> { map( rule! { #expr ~ ( ASC | DESC )? }, |(expr, opt_asc)| OrderByExpr { expr, asc: opt_asc.map(|asc| asc.kind == ASC), nulls_first: None, }, )(i) } fn main() { println!("cargo:rerun-if...
Rust
0
].map( lambda x: '是' if x == 'Y' else ( '否' if x == 'N' else "")) df["is_management_experience"] = df["management_experience"] df["is_marital"] = df["marital"] clms.extend(["is_management_experience", "is_marital"]) df.fillna("", inplace=True) for i in range(len(df)): ...
Python
1
from fastapi import APIRouter, FastAPI from fastapi.middleware.cors import CORSMiddleware from data_copilot.backend.config import Config from data_copilot.backend.database.psql import engine from data_copilot.backend.routers.admin.admin import admin_router as admin_router from data_copilot.backend.routers.artifacts im...
Python
1
# Copyright 2023 Google LLC # # 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 applicable law or agreed to in writing, ...
Python
1
se_url') model = os.getenv('model', 'deepseek-coder') files = [ # "./sendbody/openai_search3b_glm-4-flash.txt" "./自留测试数据/openai_普通问题.txt" # "./sendbody/openai图片2.txt" # "/Users/ll/Desktop/2024/ll-openai/app/provider/sendbody/vertexai_gemini_weather-gemini-1.5-flash-001a_gemini-1...
Python
1
ontext creation. #[derive(Debug)] pub enum ContextError { /// Runtime could not be created. RuntimeCreationFailed, /// Context could not be created. ContextCreationFailed, /// Execution error while building. Execution(ExecutionError), #[doc(hidden)] __NonExhaustive, } impl fmt::Display ...
Rust
0
import os # import shlex # import subprocess import numpy from osgeo import gdal from osgeo.gdalconst import * import pcraster nr_rows = 6000 nr_cols = 80000 extension_by_format = { "pcraster": "map" } string_by_type = { numpy.bool8: "bool8", numpy.int32: "int32", numpy.float32: "float32" } gdal_ty...
Python
1
#!/usr/bin/env python from setuptools import find_packages, setup from flat_json_widget import get_version setup( name="django-flat-json-widget", version=get_version(), license="BSD-3-Clause", author="OpenWISP", author_email="support@openwisp.io", description="Django Flat JSON Key/Value Widget...
Python
1
from audalign.config import BaseConfig import typing class VisualConfig(BaseConfig): # width of spectrogram image for recognition in seconds. img_width: float = 1.0 # doesn't find stats for sections with max volume below threshold. volume_threshold: float = 215.0 # ignores volume levels below f...
Python
1
ssor: an alias for `Reg<DIEPMSK_SPEC>`"] pub type DIEPMSK = crate::Reg<diepmsk::DIEPMSK_SPEC>; #[doc = "OTG_FS device IN endpoint common interrupt mask register (OTG_FS_DIEPMSK)"] pub mod diepmsk; #[doc = "DOEPMSK register accessor: an alias for `Reg<DOEPMSK_SPEC>`"] pub type DOEPMSK = crate::Reg<doepmsk::DOEPMSK_SPEC>...
Rust
0
min_seq_len=197, # split='test', # random_mask=False, # signal_num=6, # tlcontrol_joint_sequence=True, # ) # ) val_dataloader = dict( batch_size=64, num_workers=2, persistent_workers=True, drop_last=False, sampler=dict(type='DefaultSampler', shuffle=False, round_...
Python
1
參拾捌京肆仟陸佰參拾肆萬陸仟參佰參拾柒兆肆仟陸佰零柒萬肆仟參佰壹拾柒億陸仟捌佰貳拾壹萬壹仟肆佰伍拾伍"); } #[test] fn to_uppercase_high() { macro_rules! to_uppercase_high_batch_test { ($value:expr, $exp:expr) => { batch_test1!($value, to_uppercase_high, $exp); }; } to_uppercase_high_batch_test!(i8::max_value(), "壹佰貳拾柒"); to...
Rust
0
dings[step] @ imag, np.arange(59)],axis=0) embed_df = pd.DataFrame(embed.T, columns=['x', 'y', 'id']) sns.scatterplot(x='x', y='y', hue='id', data=embed_df, ax=axes[i, j], palette="viridis", legend=False) axes[i, j].set(xlabel=None) axes[i, j].set(ylabel=None) axes[i, j...
Python
1
into_iter().enumerate() { if !(index < diff_len) { // kick out old value. new_price_list.try_push(value); } } // Reduce the depth. <AresPrice<T>>::insert(price_key.clone(), new_price_list); } } // need to recalculate the average. Self::check_a...
Rust
0
Constraint::Length(1), Constraint::Percentage(100), ] .as_ref(), ) .split(f.size()); let items = app .list .items .iter() .map(|item| item.to_list_...
Rust
0
rom the YV12 format. /// /// For instance, if you have an image with p_data and stride, then the planes are located as follows: /// ```c++ /// uint8_t *p_y = (uint8_t*)p_data; /// uint8_t *p_v = p_y + stride*yres; /// uint8_t *p_u = p_v + (stride/2)*(yres/2); /// ``` /// To illustrate, a...
Rust
0
lized plane as a 4D vector whose components are the plane coefficients /// (`A`, `B`, `C`, `D`) for the plane equation `Ax+By+Cz+D=0`. /// /// ## Remarks /// /// `Est` functions offer increased performance at the expense of reduced accuracy. `Est` functions are appropriate /// for non-critical calculations where accura...
Rust
0
"""empty message Revision ID: e4311ef3ddf5 Revises: akl592fe692n Create Date: 2018-08-01 14:17:47.445218 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = 'e4311ef3ddf5' down_revision = 'akl592fe692n' def upgrade(): op.create_table('events_orga', sa.Col...
Python
1
#[derive(Debug, Clone, Copy, PartialEq)] pub enum Verbosity { Verbose, Normal, Quiet, } fn format_crate(verbosity: Verbosity) -> Result<ExitStatus, std::io::Error> { let targets = try!(get_targets()); // Currently only bin and lib files get formatted let files: Vec<_> = targets.into_iter() ...
Rust
0
GPIO_INT_SPEC>) -> Self { R(reader) } } #[doc = "Register `pds_gpio_int` writer"] pub struct W(crate::W<PDS_GPIO_INT_SPEC>); impl core::ops::Deref for W { type Target = crate::W<PDS_GPIO_INT_SPEC>; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } impl core::ops::Deref...
Rust
0
:stdout().flush().unwrap(); } } println!("main: exited command loop"); drop(send); guards.unwrap(); } use chrono::DateTime; use common::getter; use common::poster; use common::test_data; use hvcg_academics_openapi_student::models::{StudentUpsert, StudentView, StudentViewCollection}; use lambda...
Rust
0
"test", &[17, 18, 19, 20, 21], &[17, 18, 19, 20, 21] ) } #[test] fn classdef2_single_range() { gsub_test( "classdef2_font1.otf", "latn", "UNKN", "test", &[17, 18, 19, 20, 21], &[17, 23, 24, 25, 21] ) } #[test] fn classdef2_empty_class() { gsub_test( ...
Rust
0
from abaqusConstants import * from .CrushableFoamHardening import CrushableFoamHardening from ..Metal.RateDependent.RateDependent import RateDependent class CrushableFoam: """The CrushableFoam object specifies the crushable foam plasticity model. Notes ----- This object can be accessed by: .. co...
Python
1
()).unwrap(); assert_eq!(clone_count.get(), 3); let fourth_cloned_tree = tree.clone(); tree.remove(&"Fourth".to_string()).unwrap(); assert_eq!(clone_count.get(), 4); let fifth_cloned_tree = tree.clone(); tree.remove(&"Fifth".to_string()).unwrap(); assert_eq!(clone_count.get(), 5); a...
Rust
0
""" Created on 20250601 """ import sys from typing import Tuple import logging import pandas as pd sys.path.extend(['../..', '.']) import kis_auth as ka # 로깅 설정 logging.basicConfig(level=logging.INFO) ############################################################################################## # [국내선물옵션] 기본시세 >...
Python
1
_count, 1); { alice_model.weights.0.borrow_mut().data *= 0.0; bob_model.weights.0.borrow_mut().data *= 0.0; charlie_model.weights.0.borrow_mut().data *= 0.0; } let n_iterations = 10; let batch_size = 200; let n_batches = train_dataset_size / (3 * batch_size); println!(...
Rust
0
self.device, ) return GaussianOperator(**gs_dict) def rescale(self, scale: float): if scale != 1.0: self._means *= scale self._scales += torch.log(self._scales.new_tensor(scale)) def set_scale_by_height(self, real_height: float) -> None: def _ptp(tensor...
Python
1
::new(TCP_PORT) .display_order(1) .help_heading(Some("Networking")) .takes_value(true) .short('t') .long("tcp-port") .value_name("PORT") .default_value("7777") .about("tcp port"), Arg::new(WEBSOCKET_PORT) ...
Rust
0
repr(C)] #[doc = "*Required features: 'Win32_System_SystemServices', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct IMAGE_POLICY_ENTRY { pub Type: IMAGE_POLICY_ENTRY_TYPE, pub PolicyId: IMAGE_POLICY_ID, pub u: IMAGE_POLICY_ENTRY_0, } #[cfg(feature = "Win32_Foundation")] impl ::core::m...
Rust
0
:y_axis()).unwrap() * object_hit_point; Vector2::new(p.x, p.z) } } pub fn insertion_sort<T: PartialOrd>(array: &mut [T]) { for mut index in 1..array.len() { while array[index - 1] > array[index] { array.swap(index - 1, index); if index > 1 { i...
Rust
0
""" Powers of 2 Complete the function that takes a non-negative integer n as input, and returns a list of all the powers of 2 with the exponent ranging from 0 to n ( inclusive ). Examples n = 0 ==> [1] # [2^0] n = 1 ==> [1, 2] # [2^0, 2^1] n = 2 ==> [1, 2, 4] # [2^0, 2^1, 2^2] """ #Solution def power...
Python
1
import base64 import dashscope from PIL import Image import io from typing import List, Dict, Any, Optional from .embedder import EmbeddingResult from ...utils.logger import get_logger from ...utils.config import get_settings logger = get_logger(__name__) class MultimodalEmbedder: """多模态嵌入器,支持文本和图像嵌入""" ...
Python
1
ciphertext_2_buf[i] = rcvd_message_2[i + 2 + P256_ELEM_LEN]; } } fn compute_prk_2e<A: Accelerator>( acc: &mut A, x: [u8; P256_ELEM_LEN], g_y: [u8; P256_ELEM_LEN], prk_2e: &mut [u8; P256_ELEM_LEN], ) { let mut g_xy = [0x00_u8; P256_ELEM_LEN]; // compute the shared secret acc.p256_ecdh(&x...
Rust
0
class Solution: def sortArray(self, nums: List[int]) -> int: n = len(nums) numToIndex = [0] * n for i, num in enumerate(nums): numToIndex[num] = i def minOps(numToIndex: List[int], zeroInBeginning: bool) -> int: ops = 0 num = 1 # If zeroInBeginning, the correct index of each ...
Python
1
#!/usr/bin/env python3 import sys from SigProfilerAssignment.controllers import cli_controller def main_function(): commands = { "decompose_fit": "Perform decomposition fitting on the input samples.", "denovo_fit": "Perform de novo fitting on the input samples.", "cosmic_fit": "Perform CO...
Python
1
for row_id in origin_accs: table_tag = self.table_tag # 创建列表实例 # Printer().debug(self.rows_frame) row = CfgManagerCR(self, self.form_frame, row_id, table_tag) self.rows[row_id] = row if len(self.rows) == 0: self.null_data = True ...
Python
1
mangle] pub extern "C" fn hello_name_ext() { let name: String = runtime::get_arg(Arg::Name as u32) .unwrap_or_revert_with(ApiError::MissingArgument) .unwrap_or_revert_with(ApiError::InvalidArgument); let return_value = CLValue::from_t(hello_name(&name)).unwrap_or_revert(); runtime::ret(retur...
Rust
0
object_points, object_visibilities, object_motions_valid, num_original_points, num_surface_points, ) results_test = evaluate_prediction( train_frame, test_frame, vertices, object_points, ...
Python
1
rotobuf::reflect::ReflectValueRef::Message(self) } } #[derive(PartialEq,Clone,Default)] #[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] pub struct RegulatorEventAndStatusATCC { // message fields BndCtr: ::protobuf::SingularPtrField<super::commonmodule::ASG>, BndWid: ::protobuf::Sing...
Rust
0
ndarray_ret = nd_reduce_func(mx.nd.array(dat), axis=axes, keepdims=keepdims) if type(ndarray_ret) is mx.ndarray.NDArray: ndarray_ret = ndarray_ret.asnumpy() assert (ndarray_ret.shape == numpy_ret.shape) or \ (ndarray_ret.shape == (1,) and numpy_ret.s...
Python
1
assert!(tex > 0); let mut max_aniso = 0.0; unsafe { gl::GetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &mut max_aniso); // Set the maximum! gl::TexParameterf(gl::TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, max_aniso); } Ok(tex) } /// The GLFW frame buffer size callback funct...
Rust
0
import subprocess, os, sys TESTS = ['MSTTest', 'DijkstraTest', 'PriorityQueueTest', 'SkipListTest', 'DisjointSetTest'] DATASTRUCTURES = ['PriorityQueue', 'GraphNode', 'GraphEdge', 'SkipList', 'DisjointSet'] ALGORITHMS = ['PrimMST', 'KruskalMST', 'DijkstraPathFinder'] DEPENDENCIES = ['GraphMaker', 'Utilities'] BIN_DIR ...
Python
1
Relato.read(caso.caminho+"/relato."+extensao).convergencia df_caso = df_temp.loc[(df_temp["caso"] == caso.nome)] tempo_total = df_caso.loc[(df_caso["etapa"] == "Tempo Total")]["tempo"].iloc[0]/60 iteracoes = data_relato["iteracao"].iloc[-1] zinf = data_relato["zinf"].iloc[-1] cus...
Python
1
args, ignore_failure=False): try: orig_out, orig_grad = call_forwards_backwards(f, args) except Exception: if ignore_failure: return raise # See https://github.com/pytorch/pytorch/pull/98960#issuecomment-1505962215 tensor_args = [x for...
Python
1