text
string
label_name
string
labels
int64
inst, target,doer) end),inst是有该组件的预制物,target是治疗目标,doer是使用者\n ※贡献者: @御坂十七号" }, "组件.health:StopRegen:": { "prefix": "components.health:StopRegen", "body": "components.health:StopRegen()", "description": "\n ※说明: \n ※贡献者: @" }, "组件.health:ForceUpdateHUD:": { "prefix": "comp...
Python
1
rCommand>, pub live_sender: Sender<LiveCommand>, pub live_receiver: Receiver<LiveCommand>, pub queue: Arc<Mutex<Vec<Kfile>>>, pub events_loop: Rc<RefCell<glutin::EventsLoop>>, pub display: glium::Display, pub dimensions: glutin::dpi::LogicalSize, pub background: glium::texture::Texture2d, } ...
Rust
0
ub use self::ext::RequestMultipartExt; pub use multer::{Constraints, Error, Field, Multipart, SizeLimit}; mod ext; use logos::source::Source; use logos::Logos; use std::fmt; use std::ops::Range; mod binary; type TestCase<'a, Token> = ( Result<Token, <Token as Logos<'a>>::Error>, &'a <<Token as Logos<'a>>::S...
Rust
0
s_url, description, **kwargs) def generate_any_video(video_type: str, **kwargs) -> str: """生成任意类型视频的便捷函数""" return video_api.generate_video_by_type(video_type, **kwargs) # ========== Tongyi Wanxiang 便捷函数 ========== def wanxiang_text_to_image(prompt: str, version: str = "v2", **kwargs) -> str: """通义万相文生图便捷...
Python
1
len()); self.node_view_list_stack.push(Default::default()); } fn add_to_list(&mut self, node_data: ASTNodeView) { self.current_list_mut().push(node_data); } fn pop_list(&mut self) { self.node_list_idx_stack.pop(); } fn current_list_mut(&mut self) -> &mut Vec<ASTNodeView> { let index = sel...
Rust
0
for _ in range(10): self.click(1, 1) self.lock_home() else: self.log.write_log("warning", "在地下城伤亡惨重!") for _ in range(10): self.click(1, 1) stop_fun() re...
Python
1
assert_eq!(Crowdfund::endings_count(), 1); // Onboard crowdfund assert_ok!(Crowdfund::onboard(Origin::signed(1), 0, 0.into())); let fund = Crowdfund::funds(0).unwrap(); // Crowdfund is now assigned a parachain id assert_eq!(fund.parachain, Some(0.into())); // This parachain is managed by Slots ...
Rust
0
).ok()); if let Some(updated_date) = updated_date { document.insert( "domain_age", (end_date.timestamp_millis() - updated_date.timestamp_millis()) / 1_000, ...
Rust
0
end: self.primary.span.end.line + 1, }; for addl in &self.other { if addl.span.start.line < range.start { range.start = addl.span.start.line; } if addl.span.end.line + 1 > range.end { range.end = addl.span.end.line + 1; ...
Rust
0
""" Language module tests """ import os import unittest import tempfile from staticvectors import FastTextConverter, Retriever, StaticVectors class TestLanguage(unittest.TestCase): """ Language model tests """ def testConvert(self): """ Test converting an existing FastText model fo...
Python
1
); } #[test] fn complex_message2() { let msg: Result<Message, Error> = Message::parse( r#"<29>1 2016-02-21T04:32:57+00:00 web1 someservice - - [origin x-service="someservice"][meta sequenceId="14125553"] 127.0.0.1 - - 1456029177 "GET /v1/ok HTTP/1.1" 200 145 "-" "hacheck 0.9.0" 24306 127.0.0.1:40124 5...
Rust
0
self.arr[8].bitand(rhs.arr[8]), self.arr[9].bitand(rhs.arr[9]), self.arr[10].bitand(rhs.arr[10]), self.arr[11].bitand(rhs.arr[11]), self.arr[12].bitand(rhs.arr[12]), self.arr[13].bitand(rhs.arr[13]), self.arr[14].bitand(rhs.arr[14]), self.a...
Rust
0
import uuid def labeling_function(targets, label_encoder=None, **kwargs): """ ???+ note "Hover's flavor of the Snorkel labeling_function decorator." However, due to the dynamic label encoding nature of hover, the decorated function should return the original string label, not its encoding inte...
Python
1
warpgroup): Fence(wgmma_fence_1, wgmma_fence_2) for k_mma in seq(0, smem_k / wg_k): Sm90_mma_async_tf32(D_rmem[m_cta,n_cta,wg,:,:], A_smem[m_cta,n_c...
Python
1
", sum); }<reponame>HW21/Spice21 use super::bsim4defs::Bsim4ModelVals; use super::*; use crate::comps::consts::*; /// BSIM4 Model /// Derive internal parameters from specified param-values pub(crate) fn derive(model: &Bsim4ModelVals) -> Bsim4ModelDerivedParams { let mut Eg: f64; let mut Eg0: f64; let mut n...
Rust
0
import asyncio async def fn(): print("one") await asyncio.sleep(1) await fn2() print('four') await asyncio.sleep(1) print('five') await asyncio.sleep(1) async def fn2(): await asyncio.sleep(1) print("two") await asyncio.sleep(1) print("three") asyncio.run(fn())
Python
1
| CompressedDataPacket::Zip(ref d) | CompressedDataPacket::Zlib(ref d) | CompressedDataPacket::Bzip2(ref d) => &d } } } #[derive(Debug, Fail)] pub enum CompressionError { #[fail(display = "Invalid compressed data: {}", reason)] InvalidFormat { reason: String }, } // Cop...
Rust
0
import idaapi import idc import idautils def find_and_apply_switch(): # 获取当前屏幕地址或函数起始 ea = idc.here() func = idaapi.get_func(ea) if not func: print("No function at current address.") return # 扫描函数指令 for head in idautils.Heads(func.start_ea, func.end_ea): if idc.print_i...
Python
1
; } cublas_sgemm(self.handle, CublasOperation::None, CublasOperation::None, left_op.len() as i32, right_op.len() as i32, 1, &1.0, left_op.as_ptr(), left_op.len() as i32, right_op.as_ptr(), 1, &0.0, o...
Rust
0
is_graceful_shutdown); for handle in handles { handle .await .unwrap_or_else(|e| error!("{} exit on error: {}", worker_name(), e)); } shutdown_handle.shutdown().await; } fn worker_name() -> String { thread::current() .name() .map(ToString::to_string) ...
Rust
0
torOption = 43; pub const BTOR_OPT_SLS_MOVE_RAND_RANGE: BtorOption = 44; pub const BTOR_OPT_SLS_MOVE_PROP: BtorOption = 45; pub const BTOR_OPT_SLS_MOVE_PROP_N_PROP: BtorOption = 46; pub const BTOR_OPT_SLS_MOVE_PROP_N_SLS: BtorOption = 47; pub const BTOR_OPT_SLS_MOVE_PROP_FORCE_RW: BtorOption = 48; pub const BTOR_OPT_SL...
Rust
0
name = input("Enter Chapri Name: ") print("Welcome chomu aadmi and Gudh Afternoon",name) #print(f"Gudh afternoon {name}")
Python
1
D, width=40, height=5) volume_info.place(relx=0.37, rely=1.0, anchor='se') plot_k_function_and_distribution(fig, ax6, slider_points.get(), slider_clusters.get(), slider_std.get(), slider_min_distance.get(), ...
Python
1
::os::raw::c_long; pub type __socklen_t = ::std::os::raw::c_uint; pub type __sig_atomic_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Copy, Clone)] pub struct __mbstate_t { pub __count: ::std::os::raw::c_int, pub __value: __mbstate_t__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union __mbstate_t__bin...
Rust
0
debug_log!(" - Arg2 type: {}", self.debug_get_display_name(ctx, arg2_expr_id)); debug_log!(" - Expr type: {}", self.debug_get_display_name(ctx, upcast_id)); // Assignment does not return anything (it operates like a statement) let progress_expr = self.apply_forced_constraint(ctx, upcast_id,...
Rust
0
// Checks that when we delete a pseudo-edge reason, we don't delete the pseudo-edge as long as // there is another reason. #[test] fn double_reason() { let d = graggle!( live: 0, 1, 2, 3 edges: 0-1, 1-0, 2-0, 3-0, 3-1 ); let ch1 = changes!( delete: 1, 2, 3 nodes: 10, 11 ...
Rust
0
"""The time_date component."""
Python
1
d = (hi + lo) // 2 if self.boundaries[mid] < x and x <= self.boundaries[mid+1]: return mid elif x <= self.boundaries[mid]: return self._bisect(x, lo, mid) else: return self._bisect(x, mid + 1, hi) else: return -1 def __len__(se...
Python
1
print("The Love Calculator is calculating your score...") name1 = input() # What is your name? name2 = input() # What is their name? # Your code below this line 👇 combined_names = name1 + name2 lower_names = combined_names.lower() t = lower_names.count("t") r = lower_names.count("r") u = lower_names.count("u") e = l...
Python
1
&genesis_context_hash, &log, )?; // call get additional/json data for genesis (this must be second call, because this triggers context.checkout) // this needs to be second step, because, this triggers context.checkout, so we need to call it after stor...
Rust
0
&'a self, feed_id: i64, entries: &'a [&'a FeedExt], ) -> Result<Vec<&FeedExt>, Error> { let database = self.database.as_ref().unwrap(); let mut stmt = database .connection() .prepare("SELECT guid FROM entries WHERE feed_id = ?1 AND guid = ?2")?; let ...
Rust
0
")), packages::Mercurial => Some(vec!("hg")), } } fn system_deps(pkg: packages::Package) -> Option<Vec<&'static str>> { match pkg { packages::BuildEssential => Some(vec!()), packages::Https => Some(vec!()), packages::Python2 => Some(vec!("python")), packages::Python2Dev ...
Rust
0
| format!("Failed to build reqwest client: {:?}", x))?; let locations_response: ResponseLocations = client .get(&format!("{}/locations", ENDPOINT)) .query(&[("search", config.location.clone())]) .send() .map_err(|x| format!("Failed to handle locations request: {:...
Rust
0
""" Assertion helpers for arithmetic tests. """ import numpy as np import pytest from pandas import ( DataFrame, Index, Series, array, ) import pandas._testing as tm from pandas.core.arrays import PandasArray def assert_invalid_addsub_type(left, right, msg=None): """ Helper to assert that lef...
Python
1
from jnius import autoclass from plyer.facades import IrBlaster from plyer.platforms.android import activity, SDK_INT, ANDROID_VERSION if SDK_INT >= 19: Context = autoclass('android.content.Context') ir_manager = activity.getSystemService(Context.CONSUMER_IR_SERVICE) else: ir_manager = None class Androi...
Python
1
REGISTRY = {} from .episode_runner import EpisodeRunner REGISTRY["episode"] = EpisodeRunner from .episode_offpolicy_runner import EpisodeRunner as OffPolicyRunner REGISTRY["offpolicy"] = OffPolicyRunner from .parallel_runner import ParallelRunner REGISTRY["parallel"] = ParallelRunner
Python
1
// entry_module.borrow_mut().is }); entry_modules } pub fn load_entry_module( &mut self, unresolved_id: &str, is_entry: bool, importer: Option<&str>, ) -> Shared<Module> { debug!("load_entry_module for unresolved_id {}", unresolved_id); let resolve_id_result = resolve_id(un...
Rust
0
) # Labels and title in English plt.xlabel('Voltage [V]', fontsize=12) plt.ylabel('Current [mA]', fontsize=12) plt.title('CIGS Solar Cell I-V Curve\n(by sample)', fontsize=14, fontweight='bold') plt.grid(True, alpha=0.3) # Legend...
Python
1
perature: Sampling temperature (0.0 to 1.0) max_tokens: Maximum number of tokens to generate **kwargs: Additional provider-specific parameters Returns: str: The model's response text Raises: ConnectionError: When there's a connection issue with the API ...
Python
1
"""niNety-nniinE BoOttels of Mlik On teh waLl By Al Sweigart al@inventwithpython.com Print the full lyrics to one of the longest songs ever! The song gets sillier and sillier with each verse. Press Ctrl-C to stop. This code is available at https://nostarch.com/big-book-small-python-programming Tags: short, scrolling, w...
Python
1
{ crate::ast::QuoteMore(Box::new(ast!($sub)), $pos) }; ( (-- $depth:tt $sub:tt ) ) => { crate::ast::QuoteLess(Box::new(ast!($sub)), $depth) }; ( (import $beta:tt $sub:tt) ) => { crate::ast::ExtendEnv(Box::new(ast!($sub)), beta!($beta)) }; ( (import_phaseless $beta:tt $su...
Rust
0
import random TEMPLATES = [ "Once upon a time in {place}, there was a {adjective} {noun} who loved to {verb} with {person}.", "{person} always said that the best way to {verb} a {noun} is in {place} while being {adjective}.", "In the middle of {place}, a {adjective} {noun} was trying to {verb} with help fr...
Python
1
text_input.insert("1.0", text) def process_file(file_path): utilities = TextUtilities() text = "" if file_path.lower().endswith('.pdf'): text = utilities.pdf_to_text(file_path) elif file_path.lower().endswith('.docx'): text = utilities.docx_to_text(file_path) elif file_path.low...
Python
1
_uns - left_intervals) / delta * bases[..., :-1]) + \ ((grid[..., k + 1:] - x_uns) / (grid[..., k + 1:] - grid[..., 1:(-k)]) * bases[..., 1:]) bases = bases.contiguous() bases = bases.moveaxis(-1, 2).flatten(1, 2) spline_output = self.spline_conv[group_index](bases) x...
Python
1
, Debug, Deserialize)] pub struct ConfigNote { pub frequency: ConfigRange<f32>, pub adsr: ConfigADSR, }<gh_stars>1-10 use std::time; pub struct Stopwatch { start: time::Instant, name: String, treshold: usize, stopped: bool, } impl Stopwatch { pub fn new<S: Into<String>>(name: S, tr...
Rust
0
'''Desenvolva um programa que faça a tabuada de um número qualquer inteiro que será digitado pelo usuário, mas a tabuada não deve necessariamente iniciar em 1 e terminar em 10, o valor inicial e final devem ser informados também pelo usuário, conforme exemplo abaixo: Montar a tabuada de: 5 Começar por: 4 Terminar em: 7...
Python
1
GraphGenerator(train_pygraphs, neural_attr_sampler, degree=args.degree, device=args.device) eval_evaluator = GenericGraphEvaluator(eval_nx_graphs, device=args.device) test_evaluator = GenericGraphEvaluator(test_nx_graphs, device=args.device) monitoring_statistics = ['clustering_mmd', 'orbits_m...
Python
1
= RBTree::<usize, char>::new(); for (k, v) in String::from("hello, world!").chars().enumerate() { tree.insert(k, v); } tree.delete(&1); tree.delete(&3); tree.delete(&5); tree.delete(&7); tree.delete(&11); let s: String = tree.iter().map(|x| x....
Rust
0
sult.append(name) else: # pragma: no cover raise TypeError("The input model must inherit from `nn.Module`.") logger.info( "Inferred %i hidden layers on PyTorch classifier.", len(result),...
Python
1
),转换为列表 symbols = [symbols] expanded = [] for symbol in symbols: if symbol.startswith('@'): # 处理@引用,如 "@china_tech" pool_name = symbol[1:] # 移除@符号 if pool_name in self.system_config.stock_pools: expande...
Python
1
center.repeat(xyz.shape[0], 1) scale = torch.ones(xyz.shape[0], 2)*torch.tensor([.3,.3]) distr = WrappedNormal(Sphere(), loc, scale) probs = torch.exp(distr.log_prob(xyz)) return probs def true_4wrapped_probs(lonlat, npts): xyz, _ = spherical_to_xyz(lonlat) one = torch.ones(3) oned = tor...
Python
1
} let addr: SocketAddr = format!("[::]:{}", port).parse() .chain_err(|| "Could not parse address")?; let socket = UdpSocket::bind(addr) .chain_err(|| "Could not bind to socket")?; socket.set_read_timeout(Some(Duration::new(1, 0))) .chain_err(|| "could not set timeout")?; ...
Rust
0
sfied); } if command.p1 != 0x00 { return Err(Status::IncorrectP1OrP2Parameter); } if command.p2 != 0x9a { // TODO: make more general return Err(Status::FunctionNotSupported); } // example: 00 47 00 9A 0B // AC 09 //...
Rust
0
from shared.database.report.report_template import ReportTemplate from shared.database.task.task_time_tracking import TaskTimeTracking from sqlalchemy.orm.session import Session from sqlalchemy import func class TimeSpentReport: report_template: ReportTemplate session: Session def __init__(self, report_t...
Python
1
xt_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for EosTxActionAck_EosActionNewAccount { fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { ::protobuf::reflect::ReflectValueRef::Message(self) } } #[derive(PartialEq,Clone,Default)] pub struct EosTxActionAck_EosActionUnkn...
Rust
0
os(data[key].x.shape[0], dtype=torch.long, device=data[key].x.device) value = np.cumsum(value) assert value[-1] == data[key].x.shape[0] for i in range(1, len(value)): neighbor_mask[value[i - 1]:value[i]] = i data[key].neighbor_mask = neighbor_mask def...
Python
1
""" Query formatting for DBAPI-compliant interfaces """ from enum import Enum from typing import ClassVar import attr from dl_constants.enums import UserDataType from dl_dashsql.formatting.base import ( JinjaStyleParamMatcher, QueryFormatter, QueryFormatterFactory, UnconsumedParameterPolicy, Unkn...
Python
1
[] for concept, data in memory_nodes: memory_items = data.get("memory_items", "") # 直接检查字符串是否为空,不需要分割成列表 if not memory_items or memory_items.strip() == "": self.memory_graph.G.remove_node(concept) continue # 计算内存中节点的特征值 ...
Python
1
avigation_bar @property def navigation_bar(self) -> Union[NavigationBar, CupertinoNavigationBar, None]: return self.__navigation_bar @navigation_bar.setter def navigation_bar( self, value: Union[NavigationBar, CupertinoNavigationBar, None], ): self.__navigation_bar =...
Python
1
vice=device, name=self.name, label=self.label ) instantiate.do_not_call_in_templates = True def clean(self): if self.device_type and self.device_type.subdevice_role != SubdeviceRoleChoices.ROLE_PARENT: raise ValidationError( _( ...
Python
1
import binascii import string def crack_crc(): print('-------------Start Crack CRC-------------') crc_list = [0x05dec988]#文件的CRC32值列表,注意顺序 comment = '' chars = 'abcdefghijklmnopqrstuvwxyz\{\}' for crc_value in crc_list: for char1 in chars: for char2 in chars: for...
Python
1
# -*- coding: utf-8 -*- # Copyright 2024 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
file = File(fp=chart, filename="chart.png") balance, bank, wins, total = await self.bot.db.fetchrow( """SELECT balance, bank, wins, total FROM economy WHERE user_id = $1""", member.id, ) balance = self.format_int(float(balance)) bank = self.format_int(floa...
Python
1
import pytest import os from partfinder import morph_tiger from partfinder.alignment import Alignment MORPH_DATA = """ 5 25 tax1 1101100000111111021200001 tax2 110110010?0011100212?0000 tax3 ?11210?1010?00101000?010? tax4 1021011201000010111111111 tax5 10?1011311000120121211111 """ ...
Python
1
yze results 4) **VERIFY** success by checking output files and logs 5) mark_task_done("brief, precise description of the completed step") 6) show_todos() Repeat until all todos are completed. PHASE 3 — ADAPTIVE TODO REFINEMENT - If dependencies missing → add_todo("Install missing ATAC-seq tools") - If quality is...
Python
1
import logging from typing import Tuple import torch import torch.nn as nn from torch.nn.utils.parametrizations import weight_norm from modeling_llama import LlamaModel, LlamaConfig class GPT(nn.Module): def __init__( self, gpt_config: dict, num_audio_tokens: int = 626, num_text_...
Python
1
e); } for (coeff, var_and_power) in coeffs_variables_and_powers.iter() { let mut subpart = *coeff; for (variable, power) in var_and_power.iter() { let variable_powers = variables.get(*variable).ok_or(ApiError::MissingValue)?; let variable_power_value = variable_powers.ge...
Rust
0
e: # 本地测试 test_reverse_list() # 性能测试(可选) if len(sys.argv) > 1 and sys.argv[1] == "perf": performance_test() # 可视化演示(可选) if len(sys.argv) > 1 and sys.argv[1] == "visual": visualize_reverse_process() # 交互式测试 ...
Python
1
ssert_eq!(array.as_slice(), b"9.9E+37,-9.9E+37,9.91E+37"); } use crate::http::Error as HTTPError; use assert_impl::assert_impl; use std::{ collections::HashSet, convert::TryInto, io::{Error as IOError, ErrorKind as IOErrorKind, Read, Seek, SeekFrom}, sync::Mutex, }; pub(super) enum Result { Success...
Rust
0
ommon artifacts response = re.sub(r'^["\']|["\']$', '', response) # Remove quotes response = re.sub(r'\s+', ' ', response) # Normalize whitespace # Verify non-empty content if response.strip(): return response.strip()...
Python
1
_2_aug) pos_2_aug = np.dot(aug_T_trans, pos_2_aug) pos_2 = np.transpose(pos_2_aug) trans = np.dot(aug_T_trans, trans) elif aug_frame == 1: padding = np.zeros((pos_1.shape[0], 1)) pos_1_aug = np.concatenate((pos_1, padding), axis=1) pos_1_aug = np.transpose(pos_1_au...
Python
1
''' /** * AS - the open source Automotive Software on https://github.com/parai * * Copyright (C) 2015 AS <parai@foxmail.com> * * This source code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published by the * Free Software Foundatio...
Python
1
Result<Self::Config, ConfigFileReaderError>; } #[cfg(test)] mockall::mock! { pub ConfigFileReader<C: 'static + serde::Serialize + serde::de::DeserializeOwned> {} trait ConfigFileReader { type Config = C; fn with_file_path( &self, file_path: PathBuf, ) -> Resul...
Rust
0
(0x1F401, '🐁', "mouse"), (0x1F402, '🐂', "ox"), (0x1F403, '🐃', "water buffalo"), (0x1F404, '🐄', "animal-cow"), (0x1F405, '🐅', "tiger"), (0x1F406, '🐆', "leopard"), (0x1F407, '🐇', "animal-rabbit"), (0x1F408, '🐈', "animal-cat"), (0x1F409, '🐉', "dragon"), (0x1F40A, '🐊', "cr...
Rust
0
proximity_map.gen_range = gen_range; } #[tokio::test] async fn pick_node_no_roundtrip_times() { with_test_replica_logger(|log| { let registry = create_xnet_endpoint_url_test_fixture(); let metrics = MetricsRegistry::new(); let mut proximity_map = ProximityMap::with_rng( mock...
Rust
0
# from ast import Param from drqa.retriever import DocDB, utils class FeverDocDB(DocDB): def __init__(self,path=None): super().__init__(path) def get_doc_lines(self, doc_id): """Fetch the raw text of the doc for 'doc_id'.""" cursor = self.connection.cursor() cursor.execute( ...
Python
1
t_ioint_info); $crate::_bind_record_write!(stringoutRecord, StringoutRecord, rsbind_stringout_write_stringout); }; } <reponame>JesseWright/aws-sdk-rust<gh_stars>0 // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. #[allow(clippy::unnecessary_wraps)] pub fn parse_accept_match_er...
Rust
0
ListAttachedRolePoliciesInput) pub fn builder() -> crate::input::list_attached_role_policies_input::Builder { crate::input::list_attached_role_policies_input::Builder::default() } pub fn new() -> Self { Self { _private: () } } } impl smithy_http::response::ParseStrictResponse for ListAtt...
Rust
0
) subparser.add_argument("--json", action="store_true", help="output stats as JSON (implies --stats)") subparser.add_argument( "--ignore-zeros", dest="ignore_zeros", action="store_true", help="ignore zero-filled blocks in the input tarball", ) ...
Python
1
from selenium import webdriver def add_cookie(): driver = webdriver.Chrome() driver.get("http://www.example.com") # Adds the cookie into current browser context driver.add_cookie({"name": "key", "value": "value"}) def get_named_cookie(): driver = webdriver.Chrome() driver.get("http://www.ex...
Python
1
@@@@ë.*=????????=?@@@@@Ñ // @@@@@@@@@@@@@@@@@@@@@@@@@@@¶ // É@@@@@@@@@@@@@@@@Ѷ // Næ§@@@ÑÉ© // Copyright 2020 <NAME> // This file is part of Totem Live Accounting. // Authors: // - <NAME> email: <EMAIL> // - <NAME> email: <EMAIL> // Tot...
Rust
0
ec_fname) gtab = gradient_table(bvals, bvecs=bvecs) mask = np.zeros(data.shape[0:3], dtype=bool) mask[38:40, 45:50, 35:40] = 1 for backend in BACKENDS: monkeypatch.setenv("DIPY_NN_BACKEND", backend) with warnings.catch_warnings(): msg = ".*uses TensorFlow.*install PyTorch.*...
Python
1
p.sum( (_angles_signed <= 0 ), axis = 0 )**2 ) # Scores _scores = np.sum( np.abs(_angles_signed), axis = 0 ) / _count_denominator # Return return( _scores ) # # ################################################################ # # ##########################################...
Python
1
::Operator(Operator::Multiply), '(' => Node::LeftBracket, ')' => Node::RightBracket, n => { if let Ok(op) = n.to_string().parse::<usize>() { Node::Value(op) } else { panic!("invalid char in expression: {}", n) ...
Rust
0
"\\t"), ("\v", "\\v"), # ("'", "\\'"), # Skip, as we're only dealing with full strings. ('"', '\\"'), ] C_ESCAPE_TABLE = str.maketrans(dict((x, y) for x, y in C_ESCAPABLES)) def to_escaped_cstring(value: str) -> str: return value.translate(C_ESCAPE_TABLE) def to_raw_cstring(value: Union[str, List[...
Python
1
/opencv_contrib/blob/4.5.4/modules/hdf/samples/read_write_attributes.cpp#L1) /// /// /// Note: CV_Error() is called if the given attribute already exists. Use atexists() /// to check whether it exists or not beforehand. And use atdelete() to delete /// it if it already exists. /// ## See also /// atexists, atd...
Rust
0
0b0110_0000]), // 'E' ( 7 => [0b0110_0001]), // 'F' ( 7 => [0b0110_0010]), // 'G' ( 7 => [0b0110_0011]), // 'H' ( 7 => [0b0110_0100]), // 'I' ( 7 => [0b0110_0101]), // 'J' ( 7 => [0b0110_0110]), // 'K' ( 7 => [0b0110_0111]), // 'L' ( 7 => [0b0110_1000]), // 'M' ( 7 => [0b011...
Rust
0
arg_3); let r = result; return Some(Ok(NativeObjectValue::NatObj(NativeObject::new_owned(r)))); }, _ => { return Some(Err("Invalid type of 3th parameter".to_string())); }, } }, _ => { return Some(Err("Invalid type of 2th parameter".to_string(...
Rust
0
matches = [ { "home_team": "Bolivia", "away_team": "Uruguay", "home_team_score": 3, "away_team_score": 1, "home_team_result": "Win", }, { "home_team": "Brazil", "away_team": "Mexico", "home_team_score": 1, "away_team_score": 1, ...
Python
1
d=693 _DATA._serialized_start=695 _DATA._serialized_end=791 _LABEL._serialized_start=793 _LABEL._serialized_end=861 _LABELEDDATA._serialized_start=864 _LABELEDDATA._serialized_end=1077 _LABELEDDATA_ALIASDATAMAPENTRY._serialized_start=1006 _LABELEDDATA_ALIASDATAMAPENTRY._serialized_end=1077 _METRICDATA...
Python
1
X_pred = pd.DataFrame([ ["overweight","female","pescatarian","daily","coal","walk/bicycle", np.nan,"often",230,"frequently",210,"large", 4,7,26,1,"No",False,1,0,0,True,0,0,1], ["obese","female","vegetarian","less frequently","natural gas","walk/bicycle", np.nan,"often",114,"rarely",9,"extra large",3,9,38,5,"No",Fal...
Python
1
224usize, concat!( "Offset of field: ", stringify!(wtap_rec), "::", stringify!(opt_comment) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<wtap_rec>())).has_comment_changed as *const _ as usize }, 232usize, concat!( ...
Rust
0
9379912!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x31752fb25acd0da5%3A0xa7a9066ba8f7e7c8!2sCellphoneS!5e0!3m2!1svi!2s!4v1743648268531!5m2!1svi!2s" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe> # 265 Lĩnh Nam, P. Vĩnh Hưng, Q. ...
Python
1
import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy import spatial # heritage heights # read saved telemetry data (use telemetry.py to create) df_border = pd.read_csv("20230209_180752_telemetry_reference_2left4right6fast.csv") df_wrong = pd.read_csv("20230217_103423_telemetry_reference_wr...
Python
1
ndary")); } } match c { '\\' | '/' | '&' | ' ' => result.push('\\'), _ => (), } result.push(c); } Ok(result) } /// Generates a vector of words. /// /// # Returns /// /// A newly alloc...
Rust
0
import typer from ..motion_planning.motion_planner import MotionPlanner from ..motion_planning.geometry_and_transforms import GeometryAndTransforms from lab_ur5.manipulation.manipulation_controller import ManipulationController from lab_ur5.robot_inteface.robots_metadata import ur5e_1, ur5e_2 app = typer.Typer() mid...
Python
1
gr.open(cfg_file, "r") as f: cfg = _C.load_cfg(f) _C.merge_from_other_cfg(cfg) def dump_cfg(): """Dumps the config to the output directory.""" cfg_file = os.path.join(_C.SAVE_DIR, _C.CFG_DEST) with g_pathmgr.open(cfg_file, "w") as f: _C.dump(stream=f) def load_cfg(out_dir, cfg_dest="...
Python
1
if not self.launch_hwp(): return False # 파일 열기 if not self.open_file(hwp_path): self.close_hwp() return False # PDF로 저장 success = self.save_as_pdf(pdf_path) # 한글 닫기 self.close_hwp() # 결과 확인 ...
Python
1
et mut f = File::open(path)?; let mut s = String::new(); f.read_to_string(&mut s)?; Ok(s) } fn print_entries_resource(res: &Resource<&str>) { println!("{:#?}", res); } pub fn parse_file(input: &str, silent: bool) { let source = read_file(&input).expect("Read file failed"); let res = parse(sou...
Rust
0
g=msg) elif isinstance(first, list): self.assertEqual(len(first), len(second), msg=msg) for i in range(len(first)): self.assertEqualTorch(first[i], second[i], msg=msg) elif isinstance(first, KvsAllIndex): first_attributes = [a for a in dir(first) if no...
Python
1