text
string
label_name
string
labels
int64
depth_buffer_write_port_addr", back_pipe.depth_buffer_write_port_addr); let depth_buffer_write_port_value = m.output("depth_buffer_write_port_value", back_pipe.depth_buffer_write_port_value); let depth_buffer_write_port_enable = m.output("depth_buffer_write_port_enable", back_pipe.depth_buffer_write_por...
Rust
0
# 재귀를 사용한 구현 # 인접 리스트가 더 편할듯 def solution(tickets): tics = {} for depart, dest in tickets: if depart not in tics.keys(): tics[depart] = [dest] else: tics[depart].append(dest) # 도착지들을 알파벳 순으로정렬 for depart in tics: tics[depart].sort() print(tics) ...
Python
1
name: "Waveform Storage - Trial (Retired)", }; /// 12-lead ECG Waveform Storage /// /// - **UID:** 1.2.840.10008.5.1.4.1.1.9.1.1 /// - **UID Type:** SOP Class pub static Tag_12leadECGWaveformStorage: UID = UID { ident: "Tag_12leadECGWaveformStorage", uid: "1.2.840.10008.5.1.4.1.1.9.1.1", name: "12-lead ...
Rust
0
FUNC(is_valid_bulk, "First Bone (or Pair or JSON-Array)" + f"?: ") if util.is_number(start): looper(start, core.MY_GENERAL_INPUT_FUNC(is_valid, "Last Bone" + f"?: "), True, all_arr) else: if not start.startswith('[['): if "-" in start: start = re.sub("-", ",", start) if not start.startswith('['): start ...
Python
1
(self_type = "Arc")] /// pub struct MyStruct { /// /* private fields */ /// } /// /// #[faux::methods(self_type = "Arc")] /// impl MyStruct { /// pub fn new() -> Arc<Self> { /// /* implementation */ /// # Arc::new(MyStruct {}) /// } /// /// /* more methods */ /// } /// # fn main() {} ///...
Rust
0
; } } let s2 = thread.join().unwrap(); let proxy = source.with_proxy("org.a11y.Bus", "/org/a11y/bus", Duration::from_secs(5)); let (s1,): (String,) = proxy .method_call("org.freedesktop.DBus.Peer", "GetMachineId", ()) .unwrap(); assert_eq!(s1, s2); } <filename>build.rs ext...
Rust
0
e.util.test_log_pb2' # @@protoc_insertion_point(class_scope:tensorflow.GPUInfo) )) _sym_db.RegisterMessage(GPUInfo) PlatformInfo = _reflection.GeneratedProtocolMessageType('PlatformInfo', (_message.Message,), dict( DESCRIPTOR = _PLATFORMINFO, __module__ = 'tensorflow.core.util.test_log_pb2' # @@protoc_insert...
Python
1
ip(max_elements = 42, elements = (max_elements = 3, elements = (max_size = 1337)))] struct TestMultiDimVec(Vec<Vec<String>>); #[derive(SomeIp)] #[someip(treat_as = [u8], max_elements = 123)] struct TestBytes(bytes::Bytes); fn main() { use serde_someip::length_fields::LengthFieldSize; use serde_someip::types::...
Rust
0
atch_size, _ = inputs.shape val_size += now_batch_size labels = labels.long() y_true.append(labels) # inputs, labels = inputs.to('cuda'), labels.to('cuda') # FusionNet pose = inputs[:, 0:272].reshape(-1, 1, 16, 17) face = inputs[:, 275...
Python
1
s, updater) test_acc = evaluate_accuracy(net, test_iter) animator.add(epoch + 1, train_metrics + (test_acc,)) d2l.plt.draw()# d2l.plt.pause(0.001)# train_loss, train_acc = train_metrics assert train_loss < 0.5, train_loss assert train_acc <= 1 and train_acc > 0.7, train_acc ...
Python
1
import pytest import vel.internals.parser as v @pytest.fixture def setup_parser(): """ Set up test environment """ v.Parser.register() def test_variable_parsing(setup_parser): yaml_text = """ x: y: !param xxx """ yaml_contents = v.Parser.parse(yaml_text) assert isinstance(yaml_contents['x'...
Python
1
,// 0x2 // 187 = 0xBB 0x9D,// RegIz2 0x03,// 0x3 // 188 = 0xBC 0x9D,// RegIz2 0x04,// 0x4 // 189 = 0xBD 0x9D,// RegIz2 0x05,// 0x5 // 190 = 0xBE 0x9D,// RegIz2 0x06,// 0x6 // 191 = 0xBF 0x9D,// RegIz2 0x07,// 0x7 // 192 = 0xC0 0x0E,// Group 0x08,// ArrayReference 0x15,// 0x15 = handlers...
Rust
0
isinstance(source, str): source = [source] if not isinstance(sigma, (list, tuple)): sigma = [sigma] if isinstance(evalf, str): evalf = [evalf] # get the static variogram parameters _var_opts = variogram.describe().get('params', {}) omit_names = [*source, 'verbose'] ar...
Python
1
import torch import numpy as np from tqdm import tqdm from LLMPruner.datasets.ppl_dataset import get_loaders def PPLMetric(model, tokenizer, datasets, seq_len=128, batch_size = 4, device="cuda"): metric = {} for dataset in datasets: _, test_loader = get_loaders(dataset, tokenizer, seq_len=seq_len, bat...
Python
1
from agentmake.utils.manage_package import installPipPackage REQUIREMENTS = ["yfinance"] try: import yfinance except: for i in REQUIREMENTS: installPipPackage(i) import yfinance TOOL_SYSTEM = f"""# Your role You are a finance expert who is skilled in writing python code in resolving user query. # ...
Python
1
px()).translate_y(5.5.px()).fill(gray); let circle2 = Circle(2.0.px()).translate(((-5.5).px(),(-3.0).px())).fill(gray); let circle3 = Circle(2.0.px()).translate((5.5.px(),(-3.0).px())).fill(gray); let red = style.get_color(theme::data_science::red); let c...
Rust
0
line_vals['line_quantity'] = abs(line_vals['line_quantity']) line_vals['line_extension_amount'] = extension_amount return line_vals def _get_invoice_tax_totals_vals_list(self, invoice, taxes_vals): """ Override to include/update values specific to ZATCA's UBL 2.1 specs. ...
Python
1
pub fn root(&self) -> AstView<T, L> { AstView(self.root, self) } pub fn cst_root<C, D>(d: D) -> Result<C, D> where D: Deref<Target = Self>, C: CstNode<String = T, Language = L, Node = OwnedNode<D>>, { if C::can_cast(d.root()) { Ok(C::new(OwnedNode(d.root, d))...
Rust
0
#[doc = "Field `lo_lf_r4_tx` reader - "] pub struct LO_LF_R4_TX_R(crate::FieldReader<u8, u8>); impl LO_LF_R4_TX_R { pub(crate) fn new(bits: u8) -> Self { LO_LF_R4_TX_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for LO_LF_R4_TX_R { type Target = crate::FieldReader<u8, u8>; #[inline(...
Rust
0
) { builder.parse(&s); } if let Ok(s) = env::var(env_logger::DEFAULT_WRITE_STYLE_ENV) { builder.parse_write_style(&s); } builder.init() } <reponame>DamieFC/fuchsia // Copyright 2020 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // f...
Rust
0
| ITM_TCR_ITMENA), )?; self.write_32(ITM_TER, stim_bits)?; self.write_32(ITM_TPR, stim_bits)?; self.set_dwt_sync_tap(sync_packets)?; Ok(()) } pub fn set_dwt_sync_tap(&mut self, syncbits: u32) -> Result<()> { // Selects the position of the synchronization packet c...
Rust
0
"""FastAPI server builder package"""
Python
1
true); } #[test] fn test_get_seed_at_offset() { let seed = 0x973bb011937bc1a8; assert_eq!(Rng::get_seed_at_offset(seed, 0), seed); assert_eq!( Rng::get_seed_at_offset(seed, 1), (w(seed) + w(MAGIC_SEED)).0 ); assert_eq!( Rng::get_s...
Rust
0
import time import random import winsound import tkinter as tk from tkinter import messagebox import json import os print(""" ⣤⣴⣾⣿⣿⣿⣿⣿⣶⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⢰⣦⣄⣀⣀⣠⣴⣾⣿ ⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⠀ ⠀⠀⣼⣿⡿⠿⠛⠻⠿⣿⣿⡇⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⡿⠀ ⠀⠀⠉⠀⠀⠀ ⠀⠀⠀⠈⠁⠀⢰⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀ ⠀⠀⣠⣴⣶⣿⣿⣿⣷⣶⣤⠀⠀⠀⠈⠉⠛⠛⠛⠉⠉⠀⠀⠀ ⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⣶⣦⣄⣀⣀⣀⣤⣤⣶⠀⠀ ⠀⣾⣿⣿⣿⣿...
Python
1
]), Some(vec![10])); assert_eq!(view2.get_bytes(&[1]), None); assert_iter(&view1, 1, &[(1, 10), (2, 20)]); assert_iter(&view2, 1, &[]); view2.put(&vec![1], vec![1]); view2.put(&vec![1], vec![2]); view2.put(&vec![2], vec![4]); view2.put(&vec![0], vec![0, 1, 2, 3])...
Rust
0
aracters...') with open(os.path.join(pydir, 'configs/mulcodechar.dt'), 'r', encoding='utf-8') as f: for line in f.readlines(): litm=line.split('#')[0].strip() if '-' not in litm: continue s, t=litm.split(' ')[0].split('-') s, t=s.strip(), t.strip() if s and t and s!=t and ord(t) in cmap: p...
Python
1
Error /// If the radial density distribution is empty the percentiles cannot be calculated. /// /// # Notes /// Makes the assumption that the array of radius values match the density values /// after invalid values (inf and NaN) have been removed from it. These shouldn't be /// there in the first place unless somethin...
Rust
0
"""Investigate the bugs found in troposphere.pinpoint""" import sys import math sys.path.insert(0, '/root/hypothesis-llm/envs/troposphere_env/lib/python3.13/site-packages') import troposphere.pinpoint as pinpoint from troposphere.validators import double # Bug 1: Investigate NaN handling in double validator print("=...
Python
1
.len(), 1); } #[test] fn commit_duplicate_email() { let project = TestProject::new(); let user1 = project.create_user().finish(); let first_name = Some("Jeff".to_string()); let last_name = Some("Wilco".to_string()); let email = user1.email; let phone_number = Some("555-555-5555".to_string()); ...
Rust
0
ame, OriginSecretKey::get_name, )); fields.push(::protobuf::reflect::accessor::make_singular_string_accessor( "revision", OriginSecretKey::has_revision, OriginSecretKey::get_revision, )); ...
Rust
0
!("Debug: {:?}", m); println!("Display:\n{}", m); println!("Display Transpose:\n{}", m.transpose()); } fn reverse(pair: (i8, bool)) -> (bool, i8) { let (integer, boolean) = pair; (boolean, integer) } #[derive(Debug)] struct Martix(f32, f32, f32, f32); use std::fmt::{Display, Formatter, Result}; impl...
Rust
0
od.vis.clone(); let has_self = has_self_in_sig(sig) || has_self_in_block(block); transform_block(context, sig, block, has_self, is_local); transform_signature(context, sig, has_self, is_local); method.vis = vis; } } } } #[derive(...
Rust
0
t!(INVOKEEXPR, sim_INVOKEEXPR); set!(FUNCDEF, sim_FUNCDEF); set!(LAMBDA, sim_LAMBDA); set!(GENERATORDEF, sim_GENERATORDEF); set!(COLLECTARRAY, sim_COLLECTARRAY); set!(COLLECTDICT, sim_COLLECTDICT); set!(COLLECTSET, sim_COLLECTSET); set!(ARRAYEXPR, sim_ARRAYEXPR); set!(EVALUATEARRAYEXPR, ...
Rust
0
""" Classifies: CHEBI:15341 beta-D-glucosiduronic acid """ from rdkit import Chem def is_beta_D_glucosiduronic_acid(smiles: str): """ Determines if a molecule is a beta-D-glucosiduronic acid based on its SMILES string. A beta-D-glucosiduronic acid has a beta-D-glucuronic acid moiety bound via a glycosidic ...
Python
1
% self._TOKEN, }) if data.get('success') is False: break html = data.get('html') if not html: break video_ids = re.findall( r'class=["\']channel-videos-image-container[^>]+>\s*<a\b[^>]+\bhref=["\']/video/([^...
Python
1
()); log_batch.add_entries(region_id, entries); let mut kvs = Vec::new(); fk(&*memtable.rl(), &mut kvs); for (k, v) in kvs { log_batch.put(region_id, k, v); } let target_file_size = self.cfg.target_file_size.0 as usize; ...
Rust
0
isinstance(sample['RandomRotate_Param'], tuple)): transform_param_list = json.loads(sample['RandomRotate_Param'][0]) else: transform_param_list = json.loads(sample['RandomRotate_Param']) transform_param_list.reverse() for i in range(len(transform_param_list))...
Python
1
}, ) ) # Search wallpapers by filename - Show ALL wallpapers like example_wallpapers.py if not query or ( query and "matugen" not in query and "random" not in query and "scheme" not in query and "st...
Python
1
_to_process: Option<i64>, #[doc = "Number of files not adhering to azure naming conventions which were processed by automatic renaming"] #[serde(rename = "invalidFilesProcessed", default, skip_serializing_if = "Option::is_none")] pub invalid_files_processed: Option<i64>, #[doc = "Total amount of data no...
Rust
0
ction and objc.native_selector only support positional # arguments, and not keyword arguments. if not hasattr(callable_object, "__name__") or not hasattr( callable_object, "__metadata__" ): return None try: metadata = callable_object.__metadata__() except objc.internal_error...
Python
1
import nltk from nltk.corpus import stopwords from lvl1_6 import delete_punctuation def delete_stop_words() -> list[str]: nltk.download('stopwords') return [word for word in delete_punctuation() if word not in stopwords.words('russian')] if __name__ == '__main__': print(delete_stop_words())
Python
1
RCASE_Z; bitmap_mem[0x7B] = Bitmap::LEFT_CURLY_BRACKET; bitmap_mem[0x7C] = Bitmap::VERTICAL_BAR; bitmap_mem[0x7D] = Bitmap::RIGHT_CURLY_BRACKET; bitmap_mem[0x7E] = Bitmap::TILDE; bitmap_mem[0x7F] = Bitmap::REPLACEMENT_CHAR; Self { bitmap_mem, pale...
Rust
0
""" This module contains functions for computing subgroup variance and error metrics. """ from virny.configs.constants import * from .accuracy_metrics import ( mean_prediction, statistical_bias_from_predict_proba, statistical_bias, confusion_matrix_metrics ) from .stability_metrics import ( std, ...
Python
1
id, basis, function, tzero, np, therest] = line.split(None, 15) sdate = datetime.datetime(int(syr), int(smon), int(sday)) edate = datetime.datetime(int(eyr), int(emon), int(eday)) tzero = float(tzero) np = int(np) if np < 0 or np > 10: print("...
Python
1
fig', False) rollback = options.get('rollback', False) if rollback: self._rollback_migration() return self.stdout.write(self.style.SUCCESS("=== MIGRAÇÃO PARA GPT-OSS ===")) # Backup das configurações atuais if backup_config: self.stdout.writ...
Python
1
// let expected = b"D"; /// OP_EQUALVERIFY(d, expected); /// let expected = b"C"; /// OP_EQUALVERIFY(c, expected); /// let expected = b"B"; /// OP_EQUALVERIFY(b, expected); /// let expected = b"A"; /// OP_EQUALVERIFY(a, expected); /// # } /// ``` OP_2OVER = 0x70, /// ```text...
Rust
0
_data(&cache); policy.forward(OpPhase::Learning); let output = policy.get_output(); self.act_dist.reset(&output.borrow()[ .. action_dim]); let act_idx = self.act_dist.sample(rng).unwrap(); let action = <E::Action as DiscreteAction>::from_idx(act_idx as u32); if let Ok(res...
Rust
0
# Copyright (C) 2013 ~ 2016 - Oscar Campos <oscar.campos@member.fsf.org> # This program is Free Software se LICENSE file for details import os import platform import tempfile class UnixSocketPath(object): """Encapsulate logic to handle with paths to UNIX domain sockets """ socketpath = { 'linux...
Python
1
np.ndarray: depth = np.copy(depth) v_idx, u_idx = np.where(depth > 0) if not self.debug: missing_fraction = np.random.uniform(0, self.max_missing_fraction) else: missing_fraction = self.max_missing_fraction dropout_ids = np.random.choice( np.a...
Python
1
tched version of the file. """ logging.info('Retrieving patched file source: %s', self.url) return { file.path: self.get_file_at_rev(file.path) for file in self._patch.added_files + self._patch.modified_files # Gitiles has a bug and cannot serve raw markdown files; exclude them ...
Python
1
Item = Result<Row, PostgresError>> + Send>>; #[cfg(nightly)] type Output<Row: PostgresData> = impl Stream<Item = Result<Row, PostgresError>> + Send; FnMutNamed! { pub type Closure<Row> = |self|(config, tables)=> (ConnectParams, Vec<PostgresSelect>)| -> Output<Row> where Row: PostgresData { #[allow(clippy::let_a...
Rust
0
upload_per_sec: 0, peerset: serde_json::Value::Null, } } fn peers(&self) -> Vec<(PeerId, NetworkPeerInfo<Block>)> { let mut peers = vec![]; for _peer in 0..self.peers { peers.push( (self.peer_id.clone(), NetworkPeerInfo { roles: Roles::FULL, protocol_version: 1, best_hash: Default::def...
Rust
0
################################################################################ # 14. Stop L2/L3 traffic ################################################################################ print ('Stopping L2/L3 traffic') ixNet.execute('stop', ixNet.getRoot() + '/traffic') time.sleep(5) ###############################...
Python
1
Vec::with_capacity(messages.len()); let mut reports = Vec::new(); for (message, size_bytes) in messages { metrics.on_notification_received(peer_set, size_bytes); outgoing_messages.push(match message { WireMessage::ViewUpdate(new_view) => { if new_view.len() > MAX_VIEW_HEADS || new_view.finalized_nu...
Rust
0
import numpy as np import matplotlib.pyplot as plt ## Lift functions for two different valve trim types def f_lin(x): return x # linear valve trim def f_ep(x): R = 20 return R**(x-1) # equal percentage valve trim (R = 20-50) lift = np.linspace(0,1) # equally spaced points between 0 and 1...
Python
1
evaluator of asking the LLM to judge whether the prediction is correct given the gold label prompt = "Given the following question and reference answer, determine if the prediction is correct. Just tell me 'yes' or 'no', nothing else is needed.\n\nQuestion: {}\n\nReference Answer: {}\n\nPrediction: {}\n\n".format(q...
Python
1
room = { if config.new_save_spawn_room.to_string() == "" { // if unspecified if config.skip_frigate { SpawnRoom::from_room_idx(config.elevator_layout[20] as usize) // go to elevator specified in layout string } else { SpawnRoom::frigate_spawn_room() // spa...
Rust
0
mut tmp = v[count].0; tmp *= &v[count].1; count = (count + 1) % SAMPLES; tmp }); } #[bench] fn bench_fp_square(b: &mut ::test::Bencher) { const SAMPLES: usize = 1000; let mut rng = XorShiftRng::from_seed([ 0x59, 0x62, 0xbe, 0x5d, 0x76, 0x3d, 0x31, 0x8d, 0x17, 0xdb, 0x37, 0x...
Rust
0
ogger.info( f"使用插件目录中的停用词文件: {stop_words_file}" ) # 初始化词云生成器 self.wordcloud_generator = WordCloudGenerator( max_words=max_words, min_word_length=min_word_length, min_word_frequency=min_word_frequency, # 新增:传递最小词频参数 bac...
Python
1
# Cria a lista com 10 números inteiros fornecidos pelo usuário numeros = [] for i in range(10): numero = int(input(f"Digite o {i+1}º número inteiro: ")) numeros.append(numero) soma = 0 for numero in numeros: soma = soma+numero print(f"Soma de todos os números: {soma}")
Python
1
ElementAt_uchar4(bitmap, min(x + r1, wmax), y); (*sir).r = p.r; (*sir).g = p.g; (*sir).b = p.b; insum += *sir; sum += insum; stackpointer = (stackpointer + 1) % radiusStruct.div; sir = &stack[(stackpointer) % radiusStruct.div]; o...
Rust
0
# updated_fields.append('cacheParameters.cacheConfig.atimeScrubEnabled') # if 'atime-scrub-minutes' in config: # updated_fields.append('cacheParameters.cacheConfig.atimeScrubMinutes') if 'cifs-change-notify-enabled' in config: updated_fields.append( 'cachePar...
Python
1
e = [] img_queue = SimpleQueue(3) ecr_queue = SimpleQueue(5) count = 0 while True: success, image = vidcap.read() # repeat if video reading has not started if vidcap.get(cv2.CAP_PROP_POS_MSEC) == 0.0: su...
Python
1
#Last question of the Moderate Series guys!!, good going!!, Im really proud of you!! #Bet its been a while since you heard that, dont worry though, im really proud of you!! #Lets get to the point now, The last moderate one, is..., yk, it'll need atleast some brains.. #Dont worry, you got this!! #Just remember, to get t...
Python
1
""" core.array_algos is for algorithms that operate on ndarray and ExtensionArray. These should: - Assume that any Index, Series, or DataFrame objects have already been unwrapped. - Assume that any list arguments have already been cast to ndarray/EA. - Not depend on Index, Series, or DataFrame, nor import any of these...
Python
1
from rest_framework import serializers from restaurants.models import Restaurant class RestaurantSerializer(serializers.ModelSerializer): class Meta: model = Restaurant fields = '__all__' read_only_fields = ['created_at', 'updated_at']
Python
1
# -*- coding: utf-8 -*- # Copyright 2020 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...
Python
1
sage: print(''.join(solver3._output)) # optional - glucose c... s SATISFIABLE v -1 -2 ... 100 0 """ command = [Glucose_executable("glucose-syrup"), "-model", "-verb=0", "{input}"] class Kissat(DIMACS): """ An instance of the Kissat SAT solver. For information on...
Python
1
essor) } } struct TestData; impl<'a> DynamicSystemData<'a> for TestData { type Accessor = TestAccessor; fn setup(_accessor: &Self::Accessor, _world: &mut World) {} fn fetch(_access: &Self::Accessor, _world: &'a World) -> Self { TestData } } st...
Rust
0
__import__("pkg_resources").declare_namespace(__name__)
Python
1
ting task."); } } /// Add a new task with description `task` and a certain `priority` level. fn add(task: &str, priority: u8) { println!("Adding task `{}` with priority {}...", task, priority); let task = Task::new(task.to_owned(), priority); if let Err(_) = file::add_task(task) { println!("Error adding ta...
Rust
0
from __future__ import absolute_import, division, print_function from libtbx.utils import Usage, Sorry import libtbx.phil import sys master_phil = libtbx.phil.parse(""" model = None .type = path restraints = None .type = path .multiple = True """) def run(args, out=sys.stdout): if (len(args) == 0) or ("--hel...
Python
1
E-TBA" => "Lower Bavaria", "1DFG-DE-TBB" => "Upper Bavaria", "1DFG-DE-TBC" => "Munich", "1DFG-DE-TBD" => "Nuremburg", "1DFG-DE-U" => "Southwest Germany", "1DFG-DE-UB" => "Baden-Württemberg", "1DFG-DE-UBA" => "Stuttgart", "1DFG-DE-UH" => "Hesse", "1DFG-DE-UHA" => "Frankfurt", "1DFG-DE...
Rust
0
tp://localhost:5000' OSRM instance URL (no final backslash) Return ------ gdf_ploy: GeoDataFrame The shape of the computed accessibility polygons. grid: GeoDataFrame The location and time of each used point. point_origine: 2-floats tuple The coord (x, y) of the origi...
Python
1
import pygame import myLib as ml from sys import exit d1 = ["axe", "axe", "arrow", "shield", "felmet", "fteal"] d2 = ["axe", "axe", "farrow", "shield", "felmet", "steal"] d3 = ["axe", "axe", "farrow", "shield", "helmet", "fteal"] d4 = ["axe", "axe", "arrow", "field", "felmet", "steal"] d5 = ["axe", "axe", "arrow", "fi...
Python
1
print 'shlex: raw token=' + repr(result) else: print 'shlex: raw token=EOF' return result def sourcehook(self, newfile): """Hook called on a filename to be sourced.""" if newfile[0] == '"': newfile = newfile[1:-1] if isinstance(self.infile,...
Python
1
tdInput(id='user-mgmt-update-phone-number'), label=t__access('电话号码')), ] ), fac.AntdFlex( [ fac.AntdFormItem(fac.AntdSwitch(...
Python
1
c_6DA', ) OP_62(0x00F9, 0x00000000, 1700, 0x02, 0x07, 0x00000050, 0x01) PlaySE(39, 0x00, 0x64) Jump('loc_6F1') def _loc_6DA(): pass label('loc_6DA') OP_62(0x00F9, 0x00000000, 2000, 0x02, 0x07, 0x00000050, 0x01) PlaySE(39, 0x00, 0x64) def _loc_6F1(): pass label('loc_6F1') ...
Python
1
_ssctl0_d0(&self) -> ADC_SSCTL0_D0R { let bits = ((self.bits >> 0) & 1) != 0; ADC_SSCTL0_D0R { bits } } #[doc = "Bit 1 - 1st Sample is End of Sequence"] #[inline(always)] pub fn adc_ssctl0_end0(&self) -> ADC_SSCTL0_END0R { let bits = ((self.bits >> 1) & 1) != 0; ADC_SSCTL...
Rust
0
{ /// Logical not. pub fn not(&self) -> Self { ArrayExt(!self.deref()) } /// Logical and. pub fn and(&self, other: &Self) -> Self { ArrayExt(af::and(self, other, batch(self, other))) } /// Logical or. pub fn or(&self, other: &Self) -> Self { ArrayExt(af::or(sel...
Rust
0
account is neither written to nor read from. pub authority: UncheckedAccount<'info>, pub gummyroll_program: Program<'info, Gummyroll>, #[account(zero)] /// CHECK: This account must be all zeros pub merkle_slab: UncheckedAccount<'info>, } #[derive(Accounts)] pub struct Mint<'info> { /// CHECK: ...
Rust
0
coefficients: Qn_here = 2**n * Qn_for_q (see s_expm1.c): */ const Q1: f32 = -3.333_321_213_7_e-2; /* -0x_88_8868.0p-28 */ const Q2: f32 = 1.580_717_042_1_e-3; /* 0x_cf_3010.0p-33 */ /// Exponential, base *e*, of x-1 (f32) /// /// Calculates the exponential of `x` and subtract 1, that is, *e* raised /// to the power...
Rust
0
97, kind: 1 }, /// RelData { offset: 0x2d, sym: 83, kind: 1 }, /// RelData { offset: 0x39, sym: 96, kind: 2 }, /// ]; /// /// let rels: Rels<'_, LittleEndian, Elf32> = /// Rels::try_from(&RELS[0..]).unwrap(); /// /// for i in 0 .. 4 { /// let rel = rels.idx(i).unwrap(); /// let data: RelData<u32, E...
Rust
0
push((attempt.start_time, "start")); sequence.push((attempt.stop_time, "stop")); } _ => { panic!("Unexpected message") } } } sequence.sort(); let mut n_running = 0; let mut max_running =...
Rust
0
02 & (0x7fffffff as u64)) as u32); let x105: u64 = ((x103 as u64) + x78); let x106: u8 = ((x105 >> 30) as u8); let x107: u32 = ((x105 & (0x3fffffff as u64)) as u32); let x108: u64 = ((x106 as u64) + x77); let x109: u8 = ((x108 >> 31) as u8); let x110: u32 = ((x108 & (0x7fffffff as u64)) as u32); let x111:...
Rust
0
portedLaneCount, { let h = hash & Simd::splat(0xF); let v = (h & Simd::splat(7)).cast::<f32>(); let h_and_8 = (h & Simd::splat(8)).lanes_eq(Simd::splat(0)); h_and_8.select(v, Simd::splat(0.0) - v) } #[derive(Debug, Clone)] pub struct Simplex2d { seed: i32, } impl Simplex2d { #[inline] pub...
Rust
0
_ => return Err(LfscError::NotACmd(t.string())), } } Ok(()) } #[derive(StructOpt, Debug)] #[structopt(name = "rlfsc")] struct Args { /// Trace side condition executions #[structopt(short = "t", long)] trace_sc: bool, /// Whether to use color ouput #[structopt(short = "c...
Rust
0
返回: 裁剪后的图像 """ # 确保裁剪区域在图像范围内 img_height, img_width = image.shape[:2] x = max(0, min(x, img_width - 1)) y = max(0, min(y, img_height - 1)) width = max(1, min(width, img_width - x)) height = max(1, min(height, img_height - y)) # 裁剪图像 cropped = image[y:y+height, x:x+width...
Python
1
#!/usr/bin/env python # # Electrum - Lightweight Bitcoin Client # Copyright (C) 2023 The Electrum Developers # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including...
Python
1
""" This module use the usecase ReadAttackPattern""" from typing import Dict from gen_stix.src import STORAGE_ENGINE from gen_stix.src.utils.container import Container from gen_stix.src.gen_stix.usecase.sdos.attack_pattern.read_attack_pattern.read_attack_pattern_inputport_builder import ( ReadAttackPatternInputP...
Python
1
new(cursor_tup.0,cursor_tup.1,0.0); if collides(cursor_vec,Vec2::new(1.0,1.0),translation.0,sprite.size) { //println!("{}",name.0); println!(" cursor_tup {} translation.0 {} translation.1 {}",cursor_tup, translation.0, translation.1); } } */ } /* fn mouse_system( ...
Rust
0
: """ Lấy đoạn văn cuối cùng có chứa văn bản (loại trừ các đoạn rỗng hoặc chỉ chứa khoảng trắng). """ for paragraph in reversed(doc.paragraphs): if paragraph.text.strip(): # Kiểm tra nếu đoạn văn không rỗng sau khi loại bỏ khoảng trắng return paragraph return None def split_int...
Python
1
point_structure: the keypoint structure associated with the task :return: rest representation of task graph """ connections = [PipelineRESTViews.task_connection_to_rest(edge) for edge in graph.edges] return { TASKS: [ PipelineRESTViews.task_node_to_rest( ...
Python
1
, c: &mut ArrayBase<SC, Ix2>) where A: Scalar, SV: Data<Elem = A>, SC: DataMut<Elem = A>, { if tau == A::zero() { return; } let (last_v, _) = v .iter() .enumerate() .rev() .find(|(_, &elem)| elem != A::zero()) .unwrap(); let last_c = if let Som...
Rust
0
, np.pi / 2, -np.pi / 2]), 'zyz', np.array([ [1, 0, 0], [0, 0, -1], [0, 1, 0], ]), np.array([1, 0, 0]), np.pi / 2, ), ] ) def test_quaternions_special_cases( q, euler_angles, mode, rotation_matrix...
Python
1
Result<(), String>> }, UseProgram { program: ProgramId }, GetAttribLocation { program: ProgramId, name: String, id: ProgramLocationId }, DeleteAttribLocation { id: ProgramLocationId }, GetUniformLocation { program: ProgramId, name: String, id: UniformLocationId }, GetProgramParameter { program: Prog...
Rust
0
# coding=utf-8 """ desc.. :copyright: (c) 2016 by fangpeng(@beginman.cn). :license: MIT, see LICENSE for more details. """ import socket import os import sys HOST = 'localhost' sockets = [] # IPv4 socket和 IPv6 socket def echo_server(port, host=HOST): for result in socket.getaddrinfo(host, ...
Python
1
''' Utility functions for "Data Mining for Business Analytics: Concepts, Techniques, and Applications in Python" (c) 2019-2023 Galit Shmueli, Peter C. Bruce, Peter Gedeck ''' import unittest from pathlib import Path from tempfile import TemporaryDirectory import pandas as pd from sklearn.datasets import load_iris fro...
Python
1
# -*- coding: utf-8 -*- # @Time: 2020/5/10 22:47 # @Author: GraceKoo # @File: interview_4.py # @Desc: https://leetcode-cn.com/problems/zhong-jian-er-cha-shu-lcof/ class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution(object): def buildT...
Python
1
Spades, }, Card { rank: Rank::Queen, suit: Suit::Clubs, }, Card { rank: Rank::Queen, suit: Suit::Diamonds, }, Card { rank: R...
Rust
0