text
string
label_name
string
labels
int64
rtex yy uncertainty", precision=12), vtx_czz = Var("userFloat('vtx_czz')", float, doc="post-fit vertex zz uncertainty", precision=12), vtx_cyx = Var("userFloat('vtx_cyx')", float, doc="post-fit vertex yx uncertainty", precision=12), vtx_czx = Var("userFloat('vtx_czx')", float, doc="post-fit vert...
Python
1
[test] fn bindgen_test_layout_elina_abstract0_t() { assert_eq!( ::std::mem::size_of::<elina_abstract0_t>(), 16usize, concat!("Size of: ", stringify!(elina_abstract0_t)) ); assert_eq!( ::std::mem::align_of::<elina_abstract0_t>(), 8usize, concat!("Alignment of "...
Rust
0
fg_batch_property_value}, error::MfgBatchStoreError, }, MAX_COMMIT_NUM, }; use diesel::{dsl::update, prelude::*}; pub(in crate::mfg_batch) trait DeleteMfgBatchOperation { fn delete_mfg_batch( &self, address: &str, current_commit_num: i64, ) -> Result<(), MfgBatchStoreErr...
Rust
0
reward): """Bin reward to {+1, 0, -1} by its sign.""" return np.sign(reward) class WarpFrame(gym.ObservationWrapper): def __init__(self, env): """Warp frames to 84x84 as done in the Nature paper and later work.""" gym.ObservationWrapper.__init__(self, env) self.width = 84 ...
Python
1
if self.release { "release" } else { "dev" }; let code = Command::new("nix") .args(&["build", "-v", "-L", "--impure", "--expr", expr]) .args(&["--argstr", "profile", profile]) .spawn()? .wait()?; ensure!(code.success(), "Exited with {:?}", code.code()); ...
Rust
0
from setuptools import setup, find_packages setup( name="lycoris_lora", packages=find_packages(), version="3.2.0.post2", url="https://github.com/KohakuBlueleaf/LyCORIS", description="Lora beYond Conventional methods, Other Rank adaptation Implementations for Stable diffusion", author="Shih-Yin...
Python
1
nsions_strings(gl: &gl::Gl, version: &Version) -> Vec<String> { if version >= &Version(Api::Gl, 3, 0) || version >= &Version(Api::GlEs, 3, 0) { let mut num_extensions = 0; gl.GetIntegerv(gl::NUM_EXTENSIONS, &mut num_extensions); (0 .. num_extensions).map(|num| { let ext = gl.Get...
Rust
0
""" 问题诊断脚本 帮助定位和解决常见问题 """ import sys import os import json from pathlib import Path # 添加项目根目录到Python路径 project_root = Path(__file__).parent sys.path.insert(0, str(project_root)) def diagnose_api_key(): """诊断API密钥问题""" print("🔍 诊断API密钥配置...") env_file = project_root / ".env" if not env_file.ex...
Python
1
s): ")) total_mins=(hour * 60) + mins + dura end_hour = (total_mins // 60) % 24 end_mins = total_mins % 60 print(end_hour, ":", end_mins, sep="") print() ########## NOTAS DEL CAPITULO #The print function sends data to the console. while the input gets data from the consoles. #The input() function comes with an ...
Python
1
fn get_char_class() { let lang = lang_portuguese(); assert_eq!(lang.get_char_class('a'), Some(CharClass::Vowel)); assert_eq!(lang.get_char_class('n'), Some(CharClass::Consonant)); assert_eq!(lang.get_char_class('%'), None); } }<reponame>Liamolucko/microbit<gh_stars>0 //! Named GPIO p...
Rust
0
from math import isclose, sqrt import pytest from skspatial._functions import _solve_quadratic A_MUST_BE_NON_ZERO = "The coefficient `a` must be non-zero." DISCRIMINANT_MUST_NOT_BE_NEGATIVE = "The discriminant must not be negative." @pytest.mark.parametrize( ("a", "b", "c", "x1_expected", "x2_expected"), [ ...
Python
1
print(' ') config.identifier = commands.signup(config.reroll_state) commands.save_account(config.reroll_state) config.access_token, config.secret = commands.signin(config.identifier) commands.tutorial() commands.daily_lo...
Python
1
ttention_mask = encoding["attention_mask"] # Move input_ids and attention_mask to the first device used by the model input_ids = input_ids.to(first_device) attention_mask = attention_mask.to(first_device) # Generate the summary with torch.no_grad(): generated_ids = model.generate( input_ids=input_ids, ...
Python
1
mdd.restricted(&root, -100, 1000).is_ok()); assert_eq!(30, heu.inserted); assert!(mdd.relaxed(&root, -100, 1000).is_ok()); assert_eq!(46, heu.inserted); } } use std::collections::HashMap; use websocket::OwnedMessage; use serde::Serialize; use FlareResponse; use serde_json::{Number,json}...
Rust
0
equire_vision @slow class GLPNModelIntegrationTest(unittest.TestCase): @slow def test_inference_depth_estimation(self): feature_extractor = GLPNFeatureExtractor.from_pretrained(GLPN_PRETRAINED_MODEL_ARCHIVE_LIST[0]) model = GLPNForDepthEstimation.from_pretrained(GLPN_PRETRAINED_MODEL_ARCHIVE_LIS...
Python
1
# This is for setting the window parameters like the initial size. Goes before any other import statements. from kivy.config import Config Config.set('graphics', 'height', '720') Config.set('graphics', 'width', '1280') Config.set('graphics', 'minimum_height', '720') Config.set('graphics', 'minimum_width', '1280') Conf...
Python
1
pub struct QueryTradesResponse(HashMap<String, Trade>); pub async fn query_trades( cred: &Credential, txids: &[&str], trades: Option<bool>, ) -> Result<QueryTradesResponse, Error> { let mut params: Vec<(&str, &str)> = vec![]; let trades_string; if let Some(val) = trades { trades_string ...
Rust
0
ted utxos for stored_utxo in spent_utxos.iter() { p.push(stored_utxo.contract()); p.input(); p.sign_tx(); } let pmnt = payment_receiver.blinded_value(); p.push(pmnt.qty); p.push(pmnt.flv); let chang...
Rust
0
HasOne::one() } else if w1.ge0() && !w1.is_zero() && w12.le0() { Z::R::one().neg() } else { HasZero::zero() }; let delta_new = if w13.le0() && w1234.ge0() && !w1234.is_zero() { HasOne::one() } else if w13.ge0() ...
Rust
0
_startup_system(crate::ui::ninepatches::setup_ninepatches); //app.add_plugin(bevy_asset_ron::RonAssetPlugin::<Ninepatches>::new(&["np"])); app.add_startup_system(init_ui_camera); app.add_system_to_stage(FuckStages::Pre, button_interact_visual); app.add_system(button_sounds); app....
Rust
0
NAME pattern: SELECT current_database(); // let query_str = String::from("SELECT oid FROM pg_database WHERE datname = $1;"); // let q = sql_query(query_str) // .bind::<Text, _>(data.db_name); // let debug_q = diesel::debug_query::<diesel::pg::Pg, _>(&q); // debug!(&data.logg...
Rust
0
.exp(yy[:, 1])) + K.epsilon(), axis=-1), axis=-1)], axis=1))(y) return y oracles = [build_model(sequence_input, i, n_models) for i in range(n_models)] oracles_mean = None oracles_var = None oracles_means = None oracles_vars = None if len(oracles) > 1 : oracles_concat = Concatenate(axis=-1)(o...
Python
1
ValueControlSource>> TimedValueControlSourceExt for O { //fn find_control_point_iter(&self, timestamp: impl Into<Option<gst::ClockTime>>) -> /*Ignored*/Option<glib::SequenceIter> { // unsafe { TODO: call ffi:gst_timed_value_control_source_find_control_point_iter() } //} //fn all(&self) -> /*Ignored*...
Rust
0
basename(cfg.mjcf_file_path).replace(".xml", ".mjb") ), ) copypy2( os.path.abspath(__file__), os.path.join(save_dir, os.path.basename(__file__)), ) arm_fik = AirbotPlayFIK( os.path.join(DISCOVERSE_ASSERT_DIR, "urdf/airbot_play_v3_gripper_fixed.urd...
Python
1
self> ToBase64 for &'self [u8] { fn to_base64(&self) -> ~str { let mut s = ~""; unsafe { let len = self.len(); str::reserve(&mut s, ((len + 3u) / 4u) * 3u); let mut i = 0u; while i < len - (len % 3u) { let n = (self[i] as uint) << 16u...
Rust
0
es.device) def smpl_losses_uncertainty( pred_rot6d, pred_betas, gt_pose, gt_betas, has_smpl, criterion, ): pred_rot6d_valid = pred_rot6d[has_smpl == 1] gt_rotmat_valid = batch_rodrigues(gt_pose.view(-1, 3)).view(-1, 24, 3, 3)[has_smpl == 1] gt_rot6d_valid = ...
Python
1
#!/usr/bin/env python3 """ Generate JavaScript requirements data from entry_requirements.json for use in the contribution form This script reads the structured requirements from entry_requirements.json and generates a JavaScript file that can be used by the contribution form to dynamically load field guidelines, examp...
Python
1
"""Command models for Absorbance Reader commands.""" from .close_lid import ( CloseLidCommandType, CloseLidParams, CloseLidResult, CloseLid, CloseLidCreate, ) from .open_lid import ( OpenLidCommandType, OpenLidParams, OpenLidResult, OpenLid, OpenLidCreate, ) from .initialize im...
Python
1
::BinaryExpr{ ref lhs, ref rhs, op } => { let l = eval_arith(lhs, ptr_map); let r = eval_arith(rhs, ptr_map); match op { ArithOp::Add => l + r, ArithOp::Sub => l - r, ArithOp::Mul => l * r, ArithOp::Div => l / r, ...
Rust
0
er, ), ) CloseMessageWindow() ChrTalk( 0x0107, ( '#0070091595V#063F好的…………', TxtCtl.Enter, TxtCtl.Clear, '#0070091596V…………………………', TxtCtl.Enter, ), ) CloseMessageWindow() def _loc_4841(): pass lab...
Python
1
# List to store ordered Jollibee items order_list = ['Chickenjoy', 'Jolly Spaghetti', 'Burger Steak', 'Jolly Hotdog'] # List to store item prices order_cost = [5.99, 3.99, 4.99, 3.49] # Display each ordered item with its cost for count, item in enumerate(order_list): print("Ordered: {} Cost ${:.2f}".format(item, ...
Python
1
from langchain_groq import ChatGroq import os def get_llm(model_name: str, temperature: float = 0.1, api_key: str = None): """ Get an LLM instance with proper error handling for missing API keys. Args: model_name: The name of the model to use temperature: The temperature for generation...
Python
1
C, epsilon=epsilon, order=order, is_test=is_test) input_blob = np.random.rand(N, C, H, W).astype(np.float32) if order == 'NHWC': input_blob = utils.NCHW2NHWC(input_blob) self.ws.create_blob('input').feed(input_blob) self.ws.crea...
Python
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 資料庫 Schema 修正腳本 修正資料庫索引重複問題,確保 schema 可以正常創建。 """ import sys from pathlib import Path # 添加專案根目錄到 Python 路徑 project_root = Path(__file__).parent sys.path.insert(0, str(project_root)) def check_schema_issues(): """檢查 schema 中的問題""" print("🔍 檢查資料庫 Schema 問題....
Python
1
de> { if args.len() == 2 { args.require_string_argument(0)?; args.require_integer_argument(1) } else if args.len() == 3 { args.require_string_argument(0)?; args.require_integer_argument(1)?; args.require_integer_argument(2) } else { ...
Rust
0
ldren.serialize()); } serialized_child = Some(active_child); } SerializedTraceItemData { n: self.name.clone(), v: self.elapsed, c: serialized_child } } pub fn to_string(&self) -> String { serde_json::to_string(&self.ser...
Rust
0
import numpy as np import pytest from pysisyphus.calculators import XTB from pysisyphus.calculators.PySCF import PySCF from pysisyphus.helpers import geom_loader from pysisyphus.optimizers.hessian_updates import ( bfgs_update, damped_bfgs_update, double_damp, sr1_update, psb_update, flowchart_u...
Python
1
for_sync(); wait_for_sync_packet(socket, con, timeout).await?; send_sync_packet(socket, con).await?; // Considering the non-master side only has to wait for the sync packet to arrive // we make the naive assumption the RTT is symmetrical to start. con.rtt_estimate = Instant::no...
Rust
0
# Copyright 2023 The JAX Authors. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
Python
1
self.depth = 10 def get_next_move(self, current_board_state): sheep_pos_raw = None for r in range(8): for c in range(8): if current_board_state[r][c] == SHEEP: sheep_pos_raw = (r, c) break if sheep_pos_raw: ...
Python
1
{ /// Instantiate a `Body` from a reader. /// /// # Note /// /// While allowing for many types to be used, these bodies do not have /// a way to reset to the beginning and be reused. This means that when /// encountering a 307 or 308 status code, instead of repeating the /// request at ...
Rust
0
argv: *const $crate::codegen_runtime::NIF_TERM) -> $crate::codegen_runtime::NIF_TERM { unsafe { $crate::rustler_export_nifs!( internal_handle_nif_call, ($nif_fun, $nif_arity, env, argc, argv)) ...
Rust
0
> Rem<S> for $MatN<S> { fn rem(matrix, scalar) -> $MatN<S> { $MatN { $($field: matrix.$field % scalar),+ } } }); impl_assignment_operator!(<S: Float> RemAssign<S> for $MatN<S> { fn rem_assign(&mut self, scalar) { $(self.$field %= scalar);+ } }); impl_operator!(<S...
Rust
0
dict(layer_sequences) # } # def capture_and_analyze(interface, count): # """ # Capture packets and analyze them. # """ # try: # packets = sniff(iface=interface, count=count) # results = analyze_packets(packets) # print("Analysis Results:", results) # except Exception as...
Python
1
#!/usr/bin/env python import socket import binascii import struct import pcapy import netifaces as ni import netaddr import random def notation(netmask): binary_str = '' for octet in netmask: binary_str += bin(int(octet))[2:].zfill(8) return str(len(binary_str.rstrip('0'))) ...
Python
1
*mut c_void { self.inner_as_raw_mut() } } impl core::AlgorithmTraitConst for PtrOfCUDA_OpticalFlowDual_TVL1 { #[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.inner_as_raw() } } impl core::AlgorithmTrait for PtrOfCUDA_OpticalFlowDual_TVL1 { #[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c...
Rust
0
.BitsAllocated, "bits_stored": ds.BitsStored, "number_of_frames": 1, "planar_configuration": ds.PlanarConfiguration, } runner = EncodeRunner(DeflatedImageFrameCompression) runner.set_options(**kwargs) runner._index = 0 encoded = _encode_deflat...
Python
1
let a = String::from_utf8(vetor_bytes).unwrap(); println!("{}", a); let mut frase = String::from("Este é o livro "); //Quando é concatenado string em string, geralmente rust vai esperar uma string estatica, logo usando o endereço dela (operador &). frase += &livro; frase += " da "; frase += &editora; frase...
Rust
0
tep": step_id, "total_steps": len(steps), "current_depth": current_depth, "max_depth": depth, "processed_queries": total_processed }, "stage": "insights_found" } ...
Python
1
.stdout.contains("Hello World!")); } // 测试 state 函数 #[test] fn state() { let exercise = Exercise { name: String::from("example"), path: PathBuf::from("exercise_test/HelloWorldThree.c"), hint: String::from(""), }; let state = exercise.state();...
Rust
0
import FWCore.ParameterSet.Config as cms process = cms.Process("CSCDigitizerTest") process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100) ) process.load('Configuration.StandardSequences.Services_cff') process.load("SimGeneral.MixingModule.mixLowLumPU_cfi") print(str(process.RandomNumberGenerato...
Python
1
# ---------------------------------------------------------------------------- # Title: Scientific Visualisation - Python & Matplotlib # Author: Nicolas P. Rougier # License: BSD # ---------------------------------------------------------------------------- # # -------------------------------------------------------...
Python
1
tch| mtch.as_str().parse::<u32>().unwrap()) .unwrap_or_else(|| 0) } #[cfg(test)] mod tests { use super::*; #[test] fn image_tag_to_re_test() { let pattern = image_tag_to_re("namespace/image", "1.2.4-alpha", "AS build").unwrap(); assert_eq!( pattern.as_str(), ...
Rust
0
} pub fn get_neuron_for_uid ( uid: u32 ) -> NeuronMetadataOf<T> { return Neurons::<T>::get( uid ); } // --- Returns the neuron associated with the passed hotkey. // The function makes a double mapping from hotkey -> uid -> neuron. pub fn get_neuron_for_hotkey(hotkey_id: &T::AccountId) -> NeuronMetadata...
Rust
0
Ok(n) => { debug_assert_eq!(status.bytes_transferred() as usize, n); buf.set_len(status.bytes_transferred() as usize); io.read = State::Ok(buf, 0); } Err(e) => { debug_assert_eq!(status.bytes_transferred(), 0); ...
Rust
0
# region Работа над курсом ''' Отлично! По ссылке ты найдешь наш Сборник задач по 23 номерам: https://stepik.org/lesson/1228672/step/1?unit=1242205 Переходи в наш Телеграм канал и ищи во вкладке "Разборы" похожие номера! Разборов там очень много 👉 https://t.me/+0z70ARRnvChlMTky ''' from traceback import print_tb ...
Python
1
from django import forms from django.contrib import admin from allauth import app_settings from allauth.account.adapter import get_adapter from .models import SocialAccount, SocialApp, SocialToken class SocialAppForm(forms.ModelForm): class Meta: model = SocialApp exclude = [] widgets = ...
Python
1
# -*- coding:utf-8 -*- import json import threading import queue from dispatcher import TaskDispatcher import config import tools from tools import WebServer, CLIENT_CLOSE_EXCEPTION # 守护模式下的后台服务器 class DownloadServer(WebServer): ESTABLISHED = 0 IN_TRANSIT = 1 DATA_CACHE_SIZE = 10 # 等待下载的任务队列 task...
Python
1
ated_by: "random python script", max_merge_delay: 0, key: include_bytes!("testdata/ecdsa-secp384r1-pub.raw"), id: [0x29, 0xbb, 0xef, 0x00, 0xba, 0xd9, 0x3d, 0x5d, 0x4c, 0x03, 0xc7, 0x29, 0xe9, 0x4d, 0xb6, 0xac, 0x00, 0xe0, 0xfd, 0x28, 0xf6, 0x46, 0x56, 0x37, 0x24, 0xac, 0x58, 0xdc, 0x66, 0xb1, 0x99, 0xe9], ...
Rust
0
result.to_excel(model_name + " result.xlsx") # 反归一化预测结果和实际数据 x_train_pred_unnorm = data_trasform(x_train_pred.reshape(-1, n_steps_out), anti=True, scaler=scaler) y_train_unnorm = data_trasform(y_train.reshape(-1, n_steps_out), anti=True, scaler=scaler) x_test_pred_unnorm = data...
Python
1
_match = Average() for ( index, (gold, pred, db_id), ) in enumerate(zip(gold_lines, predicted_lines, db_ids)): correct = int(spider_evaluate_func(gold, pred, db_id)) exact_match(correct) translated_predicted_item = translated_predicted_no_val...
Python
1
[m] # get module for j, a in enumerate(args): if isinstance(a, str): with contextlib.suppress(ValueError): args[j] = locals()[a] if a in locals() else ast.literal_eval(a) n = n_ = max(round(n * depth), 1) if n > 1 else n # depth gain if m in { ...
Python
1
# Section 5.2 snippets # Creating a List c = [-45, 6, 0, 72, 1543] c # Accessing Elements of a List c[0] c[4] # Determining a List’s Length len(c) # Accessing Elements from the End of the List with Negative Indices c[-1] c[-5] # Indices Must Be Integers or Integer Expressions a = 1 b = 2 c[a + b] # Lists Ar...
Python
1
SERIALIZER_DEFAULT = 0, } impl From<MODE_EN_DESERIALIZER_A> for bool { #[inline(always)] fn from(variant: MODE_EN_DESERIALIZER_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `MODE_EN_DESERIALIZER`"] pub type MODE_EN_DESERIALIZER_R = crate::R<bool, MODE_EN_DESERIALIZER_A>; impl MODE_EN_...
Rust
0
test = { 'name': 'Dictionaries', 'points': 0, 'suites': [ { 'cases': [ { 'code': r""" >>> pokemon = {'pikachu': 25, 'dragonair': 148, 'mew': 151} >>> pokemon['pikachu'] 25 >>> len(pokemon) 3 >>> 'mewtwo' in pokemon F...
Python
1
} #[cfg(test)] mod test { use super::*; use std::fs; #[test] fn should_return_error_if_invalid_json() { let json = r#"{"hello":"world"}"#; let rule = Rule::from_json(&json); assert!(rule.is_err()) } #[test] fn should_deserialize_rule_from_json() { let json...
Rust
0
put_details[0]['index']) return output_data def main(): start_time = time.time() parser = argparse.ArgumentParser() parser.add_argument('--model-name', help='TFLite model name to use for classification', type=str) parser.add_argument('--captcha-dir', help='Where to read the captchas to break', type...
Python
1
etrieved_documents: print('Missing query or retrieved documents') return None # Prepare the prompt for Ollama prompt = f"Question: {query}.\nInformation: {information}" # Call the Ollama API data = { "model": OLLAMA_MODEL, "prompt": prompt, "stream": False # Se...
Python
1
f = "String::is_empty", rename = "linkname")] pub link_name: String, #[serde( default, skip_serializing_if = "String::is_empty", rename = "lowerLink" )] pub lower_link: String, #[serde( default, skip_serializing_if = "String::is_empty", rename = "allow...
Rust
0
SubCommand::with_name("add:pick") .about("NOTE: THIS COMMAND IS NOT YET IMPLEMENTED!\nAllows the user to add a command by picking from the last history commands") .version("0.1.0") .author(crate_authors!("\n")), ) } /// Starts crow, parses command line argumen...
Rust
0
&self) -> PipelineFlags; fn get_thumbnail(&self, caps: &gst::Caps) -> Option<gst::Sample>; fn get_thumbnail_rgb24(&self, width: i32, height: i32) -> Option<gst::Sample>; fn preview_get_audio_sink(&self) -> Option<gst::Element>; fn preview_get_video_sink(&self) -> Option<gst::Element>; fn previe...
Rust
0
GDB TESTS =================================================================================== // gdb-command:run // gdb-command:print *a // gdbg-check:$1 = {value = [...] "abc"} // gdbr-check:$1 = unsized::Foo<[u8]> {value: [...]} // gdb-command:print *b // gdbg-check:$2 = {value = {value = [...] "abc"}} // gdbr-che...
Rust
0
#!/usr/bin/env python # -*- coding: utf-8 -*- from my_error import MyError import sys import mysql.connector from mysql.connector import errorcode import logging import re from my_utils import set_session_timeout_for_upgrade import config import opts import run_modules import actions import special_upgrade_action_pre ...
Python
1
fn filled(bit: bool) -> Self { let mut mask = bit as i64; mask |= mask << 1; mask |= mask << 2; mask |= mask << 4; mask |= mask << 8; mask |= mask << 16; mask |= mask << 32; Mod_e521_1_Mask([mask; 10]) } } impl PrimeField for Mod_e521_1 { fn fil...
Rust
0
for parser in parsers: result = parser(file_text) tags = {} if isinstance(result, tuple): tags, multi_lyrics_data = result else: mul...
Python
1
import _plotly_utils.basevalidators class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="scatterpolar", **kwargs): super(UnselectedValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_...
Python
1
ports = re.findall( "from Model.*Model|from Controller.*Controller", screen_module ) screens = "" path_to_view = os.path.join(path_to_project, "View") for name in os.listdir(path_to_view): if os.path.isdir(os.path.join(path_to_view, name)): res = ...
Python
1
am_Token); #[derive(Debug, Default)] pub struct AttribModParam_EffectFilter { pub ppch_tags: Vec<String>, // flattened from PowerSpec pub ppch_category_names: Vec<String>, pub ppch_powerset_names: Vec<String>, pub ppch_power_names: Vec<String>, } default_new!(AttribModParam_EffectFilter); /// Adde...
Rust
0
(&mut self) { for server in &mut self.servers { server.start().unwrap(); } } pub fn server(&self, id: u64) -> &Server { &self.servers[id as usize - 1] } pub fn logger(&self) -> &Logger { &self.logger } fn shutdown(&mut self) { for server in ...
Rust
0
], _adjust_sharpness(img, 1 + magnitude)[1:-1, 1:-1], rtol=0, atol=1) def test_cutout(): # test assertion for invalid type of shape with pytest.raises(TypeError): transform = dict(type='Cutout', shape=None) build_from_cfg(transform, PIPELINES) # test a...
Python
1
ctx ) relu_tvm = tvm.nd.array(np.zeros(shape=get_const_tuple(Relu.shape), dtype=Relu.dtype), ctx) # Measure time cost of kernel 1 (depthwise_conv2d) timer_1 = f1.time_evaluator(f1.entry_name, ctx, number=1000) tcost_1 = timer_1(input_tvm, filter_tvm, depthwise_conv2d_tvm).mean ...
Python
1
from_glib(ffi::ges_timeline_element_roll_end(self.to_glib_none().0, end.to_glib())) } } fn roll_start(&self, start: gst::ClockTime) -> bool { unsafe { from_glib(ffi::ges_timeline_element_roll_start(self.to_glib_none().0, start.to_glib())) } } //fn set_child_prop...
Rust
0
umHeight()) # 设置行中所有容器的高度为最大高度 for row_container in self.row_containers[current_row]: if row_container.minimumHeight() != max_height: row_container.setMinimumHeight(max_height) row_container.updateGeometry() ...
Python
1
# self.to_ifgram = # freqs, times, mags = librosa.reassigned_spectrogram(waveform, sr=SAMPLE_RATE, S=None, n_fft=1024, hop_length=None, win_length=None, window='hann', center=True, reassign_frequencies=True, reassign_times=True, ref_power=1e-06, fill_nan=False, clip=True, dtype=None, pad_mode='const...
Python
1
. /// /// The `ct_eq` function should execute in constant time. /// /// # Returns /// /// * `Choice(1u8)` if `self == other`; /// * `Choice(0u8)` if `self != other`. #[inline] fn ct_eq(&self, other: &Self) -> Choice; } impl<T: ConstantTimeEq> ConstantTimeEq for [T] { /// Check w...
Rust
0
); } } #[test] fn test_wrap_no_arg() { for wrap_param in &["-w", "--wrap"] { let expected_stderr = "error: The argument '--wrap <wrap>\' requires a value but none was \ supplied\n\nUSAGE:\n base32 [OPTION]... [FILE]\n\nFor more \ in...
Rust
0
l === def main(): load_css() render_header() employee_data_df = load_employee_data() employee_data = employee_info_form(employee_data_df) if employee_data: df_ponto = ponto_table(employee_data, employee_data_df) render_summary(employee_data, df_ponto) show_history(e...
Python
1
= format!( r#"REQUIREMENT: make sure '{}' has been add to your $PATH environment variable. manually add the directory to your $HOME/.bash_profile (or similar) then create a new session in terminal "#, self.bin_dir().display() ) ....
Rust
0
from datetime import datetime, time from sqlalchemy import asc, delete, desc, select from sqlalchemy.ext.asyncio import AsyncSession from module_admin.entity.do.log_do import SysLogininfor, SysOperLog from module_admin.entity.vo.log_vo import LogininforModel, LoginLogPageQueryModel, OperLogModel, OperLogPageQueryModel ...
Python
1
import numpy as np MATCH_SCORE = 1 MISMATCH_SCORE = -1 GAP_SCORE = -2 # READING CUSTOM SEQUENCES # sequence_one = input("Input the first sequence: ") # sequence_two = input("Input the second sequence: ") # USING DEFINED SEQUENCES sequence_one = "ATCGTAATTGCC" sequence_two = "ACGTTAATTGC" score_matrix = np.zeros((le...
Python
1
class Metaworld: def __init__(self): self.benchmark_name= 'ML1' self.env_name= 'reach-v2' self.max_episode_steps=500 self.num_epsiodes_of_validation = 4 self.num_lifetimes_for_validation = 120 self.seeding=False self.seed=1 self.device='auto' ...
Python
1
allocations = [ (1, 16), # 2 blocks (2, 24), # 3 blocks (3, 8), # 1 block ] for sequence_id, num_tokens in allocations: allocated_indices = manager.allocate_blocks(sequence_id, num_tokens) assert len(allocated_indices) > 0...
Python
1
[] frase_corrente = "" line = file_test.readline() while line != "": line = line.split() if (line != []): frase_corrente = frase_corrente + line[1] + "\t" + line[2] + " " else: frasi_corpus.append(frase_corrente) frase_corrente = "" line =...
Python
1
/// `16/32/64-bit` EVEX_Vpunpckhbw_ymm_k1z_ymm_ymmm256, /// `VPUNPCKHBW zmm1 {k1}{z}, zmm2, zmm3/m512` /// /// `EVEX.512.66.0F.WIG 68 /r` /// /// `AVX512BW` /// /// `16/32/64-bit` EVEX_Vpunpckhbw_zmm_k1z_zmm_zmmm512, /// `PUNPCKHWD mm, mm/m64` /// /// `NP 0F 69 /r` /// /// `MMX` /// /// `16/32/64-bit` ...
Rust
0
HashMap<String, NonterminalId> = HashMap::new(); for d in &desc.tokens { let id = match d.name { ast::TokenName::Name(ref name) => { let id = grammar.add_terminal(name.clone()); token_map.insert(name.clone(), id); id } ast::...
Rust
0
_name="advisory_hfi_percent_conifer", ) op.drop_column("advisory_hfi_percent_conifer", "fuel_type_raster_id") op.drop_constraint( "advisory_fuel_types_fuel_type_raster_id_fkey", "advisory_fuel_types", type_="foreignkey" ) op.drop_index( op.f("ix_advisory_fuel_types_fuel_type_raster_...
Python
1
#[repr(C)] #[derive(Debug, Copy, Clone)] pub struct lv_theme_t__bindgen_ty_1__bindgen_ty_6 { pub bg: *mut lv_style_t, pub indic: *mut lv_style_t, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct lv_theme_t__bindgen_ty_1__bindgen_ty_7 { pub bg: *mut lv_style_t, pub indic: *mut lv_style_t, pub kn...
Rust
0
_account(); assert_ok!(Oracle::add_asset_and_info( Origin::signed(account_2), 0, Validated::new(Percent::from_percent(80)).unwrap(), Validated::new(3).unwrap(), Validated::new(5).unwrap(), Validated::<BlockNumber, ValidBlockInterval<StalePrice>>::new(5).unwrap(), 5, 5 )); let asset_id = 0...
Rust
0
import os from pathlib import Path from dotenv import load_dotenv load_dotenv() # Configurações da API API_KEY = os.environ.get("OPENAI_API_KEY") EMBED_DIM = 1536 # text-embedding-3-small # Caminhos dos arquivos (absolutos, relativos ao pacote Assistente_Spart) BASE_DIR = Path(__file__).resolve().parent.parent CAMI...
Python
1
| SESSION_CREATED | SESSION_CREATED_STRING | SESSION_FORMAT | SESSION_GROUP | SESSION_GROUP_ATTACHED | SESSION_GROUP_ATTACHED_LIST | SESSION_GROUP_LIST | SESSION_GROUP_MANY_ATTACHED | SESSION_GROUP_SIZE | SESSION_GROUPED | SESSION_HEIGHT | SESSION_WIDTH | SESSION_ID ...
Rust
0