text
string
label_name
string
labels
int64
}, { let mut init = spc_handler { key: b"colorshadow\x00" as *const u8 as *const i8, exec: Some( spc_handler_xtx_unsupported as unsafe extern "C" fn(_: *mut spc_env, _: *mut spc_arg) -> i32, ), ...
Rust
0
g)), EncodingType::U32 => Box::new(VecCount::<u32>::new(grouping, output, max_index, dense_grouping)), EncodingType::I64 => Box::new(VecCount::<i64>::new(grouping, output, max_index, dense_grouping)), t => panic!("unsupported type {:?} for grouping key", t), } } pub ...
Rust
0
2(&self, id: &BlockIdExt) -> Result<BlockIdExt> { unimplemented!() } fn store_block_next1(&self, handle: &BlockHandle, next: &BlockIdExt) -> Result<()> { unimplemented!() } async fn load_block_next1(&self, id: &BlockIdExt) -> Result<BlockIdExt> { unimplemented!() } fn sto...
Rust
0
import streamlit as st import requests # Define FastAPI endpoint API_ENDPOINT = "http://127.0.0.1:8001/query" # Set up the Streamlit app st.title("Natural Language to SQL Query Generator") # Collect the user's natural language query input user_query = st.text_input("Enter your query in natural language:") # Button ...
Python
1
self.P = self.P - np.dot(kalman_gain,Hmat).dot(self.P) # return updated state return self.x, self.P if __name__ == "__main__": try: # initialise the ekf_slam node rospy.init_node('ekf_slam') # 2(range, bearing) landmarks + robot pose(x, y, theta), means dim_x = 7 ...
Python
1
# -*- coding: utf-8 -*- # # Copyright 2022 Google LLC. All Rights Reserved. # # 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 requir...
Python
1
"""Base classes and function for readers and writers. Authors: * Brian Granger """ # ----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file LICENSE,...
Python
1
} #[cfg(test)] mod tests { use super::*; use cosmwasm_std::testing::{ mock_dependencies, mock_dependencies_with_balance, mock_env, mock_info, }; use cosmwasm_std::{coins, Decimal, SubMsg}; fn setup(deps: DepsMut) { let msg = InstantiateMsg { fee: Decimal::percent(2), ...
Rust
0
{Explainer, Explanation}; use crate::int_model::{Cause, DiscreteModel, InferenceCause, InvalidUpdate}; use crate::lang::{BVar, IVar}; use crate::{Model, WriterId}; use aries_backtrack::Backtrack; use std::collections::HashSet; #[test] fn domain_updates() { let mut model = Model::new...
Rust
0
of>, } enum Kind { Chan { _close_tx: oneshot::Sender<()>, rx: mpsc::Receiver<Result<Chunk, ::Error>>, }, H2(h2::RecvStream), Wrapped(Box<Stream<Item=Chunk, Error=Box<::std::error::Error + Send + Sync>> + Send>), Once(Option<Chunk>), Empty, } type DelayEofUntil = oneshot::Receiv...
Rust
0
). https://doi.org/10.1016/S0009-2614(00)00158-5 .. [2] José Antonio de la Peñaa, Ivan Gutman, Juan Rada, "Estimating the Estrada index", Linear Algebra and its Applications. 427, 1 (2007). https://doi.org/10.1016/j.laa.2007.06.020 Examples -------- >>> G = nx.Graph([(0, 1),...
Python
1
r.manager.network.service_available = Some(update)); network.signal_strength.map(|update| inner.manager.network.signal_strength = Some(update)); network.roaming.map(|update| inner.manager.network.roaming = Some(update)); let current_network = inner.manager.network.clone(); for peer in i...
Rust
0
"summary": "Explore the release process, versioning, and deprecation policy for Litestar", "url": "releases", "icon": "releases", }, ], }, { "title": "Release notes", "children": [ ...
Python
1
; use byteorder::{ByteOrder, NetworkEndian}; fn main() { utils::setup_logging("warn"); let (mut opts, mut free) = utils::create_options(); utils::add_tap_options(&mut opts, &mut free); utils::add_middleware_options(&mut opts, &mut free); opts.optopt("c", "count", "Amount of echo request packets to...
Rust
0
= execute( deps.as_mut(), claim_ready.clone(), info.clone(), ExecuteMsg::Claim {}, ); assert!(fail.is_err(), "{:?}", fail); // provide the balance, but claim not yet mature - also prohibited deps.querier .update_balance(MOCK_C...
Rust
0
snumpy() res_cmp = np.ones_like(res_np).astype("float64") Whh_np = Whh_np.astype("float64") for t in range(1, n_num_step): res_cmp[t][:] = np.dot(res_cmp[t - 1], Whh_np) for i in range(n_num_step): for j in range(n_num_hidden): ...
Python
1
# Configuration file for the Sphinx documentation builder. # # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html import os import sys sys.path.insert(0, os.path.abspath("../..")) # -- Project information ------------------------...
Python
1
r) vampytest.assert_eq(integration_metadata.expire_grace_period, expire_grace_period) vampytest.assert_eq(integration_metadata.revoked, revoked) vampytest.assert_eq(integration_metadata.role_id, role_id) vampytest.assert_eq(integration_metadata.subscriber_count, subscriber_count) vampytest.assert_eq...
Python
1
from if target.find('@') == -1: LOG.warning('Vendordata target %(target)s lacks a name. ' 'Skipping', {'target': target}, instance=self.instance) continue tokens = target.split('@') name = token...
Python
1
ields; mod normalize_fields; pub mod ownership; pub mod rev_get_field; pub(crate) mod tuple_impls; // Using this macro instead of modules because compile-time errors print the full path to the // traits even if the variant_field module is private. include! {"./field/variant_field.rs"} pub use self::{ errors::{ ...
Rust
0
get_sta(addr0) if sta['addr'] != "FAIL": raise Exception("Unexpected STA association with permanent address") sta = hapd.get_sta(addr1) if sta['addr'] != addr1: raise Exception("STA association with random address not found") wpas.request("DISCONNECT") wpas.connect_network(id) a...
Python
1
if not next_node: head = None else: next_node.prev = head.prev head.next = None head = next_node return head doubly_head = remove_from_start(add_head) traverse_doubly(doubly_head) print("\n") def remove_from_end(tail: DoublyNode): if not tail: return ...
Python
1
ParseError> { let num = u8::parse(&attr)?; match num { 0 => Ok(false), _ => Ok(true), } } } impl<T: Clone + fmt::Debug> PayloadParser<T> for u8 { fn parse(attr: &Nlattr<T, Vec<u8>>) -> Result<Self, AttrParseError> { let payload: [u8; 1] = attr.payload.clo...
Rust
0
POINT_DEVICES: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(nm_sys::NM_CHECKPOINT_DEVICES) .to_str() .unwrap() }); pub static CHECKPOINT_ROLLBACK_TIMEOUT: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe...
Rust
0
directory and related entries in sitemap.xml from the built site.""" shutil.rmtree(SITE / "macros", ignore_errors=True) (SITE / "sitemap.xml.gz").unlink(missing_ok=True) # Process sitemap.xml sitemap = SITE / "sitemap.xml" lines = sitemap.read_text(encoding="utf-8").splitlines(keepends=True) ...
Python
1
702', 'nombre': 'Medicina Preventiva', 'creditos': 4}, {'codigo': 'MED703', 'nombre': 'Medicina Legal', 'creditos': 3}, {'codigo': 'OPT401', 'nombre': 'Materia Optativa III', 'creditos': 3}, {'codigo': 'OPT402', 'nombre': 'Materia Optativa IV', 'creditos': 3}, # Octavo semestre ...
Python
1
show_error!("failed to execute process: {}", err); if err.kind() == ErrorKind::NotFound { // FIXME: not sure which to use return 127; } else { // FIXME: this may not be 100% correct... return 126; } } }; ...
Rust
0
_ARB: i32 = 0x2094; const WGL_CONTEXT_CORE_PROFILE_BIT_ARB: i32 = 0x00000001; const WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB: i32 = 0x00000002; // See https://www.khronos.org/registry/OpenGL/extensions/ARB/WGL_ARB_pixel_format.txt type WglChoosePixelFormatARB = extern "system" fn(HDC, *const i32, *const f32, u3...
Rust
0
"Digital I/O control for port 0 pins PIO0_8"] pub mod pio0_8; #[doc = "PIO0_9 register accessor: an alias for `Reg<PIO0_9_SPEC>`"] pub type PIO0_9 = crate::Reg<pio0_9::PIO0_9_SPEC>; #[doc = "Digital I/O control for port 0 pins PIO0_9"] pub mod pio0_9; #[doc = "PIO0_10 register accessor: an alias for `Reg<PIO0_10_SPEC>...
Rust
0
from extensions.common.base import * from extensions.models import * class GoodsCategory(Model): """产品分类""" name = CharField(max_length=64, verbose_name='名称') remark = CharField(max_length=256, null=True, blank=True, verbose_name='备注') team = ForeignKey('system.Team', on_delete=CASCADE, related_name=...
Python
1
(Debug)] pub struct TokenVecWrapper<'a> { vec: &'a Vec<Spanned<Token>>, count: usize, } impl<'a> TokenVecWrapper<'a> { #[allow(clippy::ptr_arg)] pub fn new(vec: &'a Vec<Spanned<Token>>) -> Self { Self { vec, count: 0 } } } impl<'a> Iterator for TokenVecWrapper<'a> { type Item = Result<...
Rust
0
conversion pub const SAMPLE_RATE: Hertz = Hertz(48_000.0); <filename>src/test/ui/repr.rs // compile-pass #[repr] //^ WARN `repr` attribute must have a hint struct _A {} #[repr = "B"] //^ WARN `repr` attribute isn't configurable with a literal struct _B {} #[repr = "C"] //^ WARN `repr` attribute isn't configurable w...
Rust
0
counter for section ids. section_id_counter: usize, /// Section order for output ordering. section_order: VecDeque<SectionId>, } impl<'event> GitConfig<'event> { /// Constructs an empty `git-config` file. #[must_use] pub fn new() -> Self { Self::default() } /// Returns an inte...
Rust
0
1 # Define sparse matrices Kff = coo_matrix((Kff, (Kffi, Kffj)), shape=(D['nnode'] * D['ndof'] - D['ndisp'], D['nnode'] * D['ndof'] - D['ndisp'])) Kee = coo_matrix((Kee, (Keei, Keej)), shape=(D['ndisp'], D['ndisp'])) Kfe = coo_matrix((Kfe, (Kfei, Kfej)), shape=(D['nnode'] * D['ndof'] - D['ndisp'], D['ndisp'])) ...
Python
1
one } else { Some(Malloced::slice_from_raw_parts( data.cast::<&Method>(), len.assume_init() as usize, )) } } } /// Returns a property of `self` with `name`. /// /// See [documentation](https://develo...
Rust
0
# Copyright 2013 Red Hat, Inc. # # 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 agre...
Python
1
# aws_calls/aws_tts.py import os import sys import boto3 # 1) compute project root (one level up from aws_calls/) ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # 2) insert it onto sys.path if not already present if ROOT_DIR not in sys.path: sys.path.insert(0, ROOT_DIR) from config impor...
Python
1
esult<T, E> { type Ok = T; type Err = E; #[track_caller] fn log_err(self, target: &str, level: log::Level) -> Self where E: fmt::Display, { if let Err(ref e) = &self { log::log!(target: target, level, "{:#?}", e); } self } } const RESOURCES_REGI...
Rust
0
ing_{self.scope['user'].pk}", self.channel_name) except Exception as e: logger.error(f"Error during group_discard: {e}") def group_send(self, text, submission_id, full_text=False): return self.channel_layer.group_send(f"submission_listening_{self.scope['user'].pk}", { 'type'...
Python
1
: G (nx.MultiGraph): Ursprünglicher Multigraph. odd (list[int]): Liste der ungeraden Knoten. K (nx.Graph): Matching-Graph. path (dict[int, dict[int, list[int]]]): Kürzeste Pfade zwischen Knoten. nodes (Dict[int, dict]): Dictionary der Knoten mit Pixelkoordinaten. Rückgabe: ...
Python
1
Box<StablePath>, arg: Box<StablePath> }, } // The symbol table is in graph.rs // and consists of a set of Decl. // Each Bundle has its own symbol table. // Decls may have references to other decls. These may or may not be resolved. // A resolved ref is just a LocalRef. An unresolved ref requires a lookup/mixfix resolu...
Rust
0
L.random_element() for i in range(min(r,2*d))] # The lattice parameter is required when no rays are given, so # we pass it in case r == 0 or d == 0 (or d == 1 but we're # making a strictly convex cone). K = Cone(rays, lattice=L) # Now, some of the rays that we generated were pr...
Python
1
, 0, 1, 134, 98, 0, 0, 1, 135, 98, 0, 0, 1, 136, 98, 0, 0, 1, 137, 98, 0, 0, 1, 138, 98, 0, 0, 1, 139, 98, 0, 0, 1, 140, 98, 0, 0, 1, 141, 98, 0, 0, 1, 142, 98, 0, 0, 1, 143, 98, 0, 0, 1, 144, 106, ]; assert_eq!(true, RawTerm::from_bytes(bin).is_ok()); let bin = &[ 131, 104,...
Rust
0
# Copyright The OpenTelemetry 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
Python
1
Value { type Error = SerdeJsonError; fn deserialize_any<V>(mut self, visitor: V) -> Result<V::Value, Self::Error> where V: de::Visitor<'de>, { self.0.deserialize_any(visitor) } forward_to_deserialize_any! { bool i8 i16 i32 i64 i128 u8 u16 u32 u64 u128 f32 f64 char str ...
Rust
0
#! /usr/bin/env python """ :Author: David Goodger :Contact: goodger@users.sourceforge.net :Revision: $Revision: 1881 $ :Date: $Date: 2004-03-24 00:21:11 +0100 (Wed, 24 Mar 2004) $ :Copyright: This module has been placed in the public domain. """ from docutils import nodes from docutils.nodes import Element, TextElem...
Python
1
.kind { ExprKind::Lit(Lit::Str(s)) => Ok(s), _ => Err(CodeErrorKind::CannotConstEvaluate) .with_span(self.invocation_span), }) .collect::<Result<Vec<_>, _>>()?; let va...
Rust
0
rtSnapshot { pub e: Entry, } pub(crate) struct SnapshotQueue { q: Mutex<DelayQueue<InsertSnapshot>>, } impl SnapshotQueue { pub fn new() -> Self { Self { q: Mutex::new(DelayQueue::new()), } } pub async fn insert(&self, x: InsertSnapshot, delay: Duration) { self.q....
Rust
0
ame>Jomy10/swift-bridge //! An intermediate representation of the FFI layer. //! //! Things annotated with the `#[swift_bridge::bridge]` attribute get parsed into this IR. //! //! This IR is then used to generate the C header files, Objective-C bridging headers, Swift code, //! and Rust code needed to power Rust + Swif...
Rust
0
"""SCons.Scanner.IDL This module implements the dependency scanner for IDL (Interface Definition Language) files. """ # # __COPYRIGHT__ # # 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 wi...
Python
1
da = Datrie::new(); let id = da.find("hello", None); println!("{}", id.unwrap_or(-1)); da.build(&["hello", "world", "he", "hell"], Some(&[0, 1, 2, 3])).expect("build failed"); let id = da.find("hello", None); println!("{}", id.unwrap_or(-1)); let res = da.common_prefix_search("hello", 10, Non...
Rust
0
# coding: utf-8 ''' block factory ObjCBlock(py_callback,restype, argtypes[]) ''' from ctypes import * from objc_util import * import pdb NSBlock=ObjCClass('NSBlock') class ObjCBlockDescriptor(Structure): _fields_=[('reserved',c_ulong), ('size',c_ulong), ('signature', c_char_p)] def __init__(self...
Python
1
t cpu_local = crate::PerCpu::from_local_base(); let rsp = &cpu_local.vcpu.host_stack_top as *const _ as u64; VmcsField64Host::RSP.write(rsp)?; // used for saving guest registers self.host_stack_top = cpu_local.stack_top() as _; // the real host stack VmcsField64Host::RIP.write(vmx_exit a...
Rust
0
fixed_servers { db.add_server(&server).unwrap(); } } Ok(alpm) } /// Gets the current (last) error status. Most functions use this internally to get the /// error type to return, so there isn't much need to use this externally. pub fn error(&self) -> Option<...
Rust
0
, "halted"), TickType::BidYield => write!(fmt, "bidYield"), TickType::AskYield => write!(fmt, "askYield"), TickType::LastYield => write!(fmt, "lastYield"), TickType::CustOptionComputation => write!(fmt, "custOptComp"), TickType::TradeCount => write!(fmt, "trad...
Rust
0
al(get('1.0', 'end'), '\n') self.text.insert('1.0', self.hw) delete('1.2', '2.3') Equal(get('1.0', 'end'), 'held\n') def test_multiple_lines(self): # insert and delete self.text.insert('1.0', 'hello') self.text.insert('1.3', '1\n2\n3\n4\n5') self.assertEqual(self....
Python
1
= args { w.write_u16::<LE>(args.len() as u16)?; w.write_all(&args)?; } else { w.write_u16::<LE>(0)?; } Ok(()) } fn write_header<W: Write>(w: &mut W, version: &str) -> io::Result<()> { let padding = 128usize.checked_sub(version.len()).expect("128-byte fixed-size header"); w....
Rust
0
.as_ptr() } fn as_mut_ptr(&mut self) -> *mut T { self.obj.as_mut_ptr() } } impl<U> PxCapsuleControllerDesc<U> { /// Create a new capsule controller descriptor. pub fn new<M: Material>( height: f32, radius: f32, step_offset: f32, material: &mut M, use...
Rust
0
bajo de la primera, independientemente # de si se alcanzó la coordenada límite o no. draw.text((x2, y2), line, font=font1, fill=(0, 0, 0)) draw.text((233, 1183), "", font=font1, fill=(255, 255, 255)) # FALLECIMIENTO ...
Python
1
innorm64x4Core { let mut rng = SplitMix64::from_seed_u64(seed); Linnorm64x4Core::from_seed(Linnorm64x4Seed::from_rng(&mut rng)) } } pub struct Linnorm64x4Seed([u8; 32]); /// Seed for a `Linnorm64x4` or `Linnorm64x4Core`. impl Linnorm64x4Seed { #[inline] /// Create a seed for a `Linnorm64x4...
Rust
0
弃了。', TxtCtl.Enter, ), ) CloseMessageWindow() ChrTalk( 0x0104, ( '#0040440231V#033F#2P唔,看来是没办法的。', TxtCtl.Enter, ), ) CloseMessageWindow() @scena.Lambda('lambda_3949') def lambda_3949(): ChrTurnDirection(0x0104, ...
Python
1
)); let runnable_module = Caller::new(handler_data, trampolines, func_resolver); Ok(ModuleInner { runnable_module: Arc::new(Box::new(runnable_module)), cache_gen, info, }) } } pub struct Converter<T>(pub T); macro_rules! convert_clif_to_runtim...
Rust
0
file not found: {filepath}") try: with open(filepath, "r", encoding="utf-8") as f: data = json.load(f) except Exception as ex: raise IOError(f"Failed to read file {filepath}: {ex}") if "scenarios" not in data: raise ValueError("Datas...
Python
1
from queue import PriorityQueue # Define the city map city_map = [ ['x', 11, 5, 18, 'x', 14, 7, 'x', 15, 11, 14], ['x', 'x', 'x', 'x', 13, 13, 11, 17, 8, 13, 'x'], ['x', 8, 1, 5, 17, 'x', 4, 8, 20, 7, 4], ['x', 10, 'x', 'x', 18, 1, 'x', 'x', 20, 'x', 'x'], [18, 15, 'x', 6, 'x', 4, 3, 4, 3, 13, 'x'...
Python
1
\xf1(\ .\x92\x80@4\xd2\xb4\xd4\xda\x97\x80P\xb4\xafy\xa8\ \x86\x00\x01\x02\x04\x08\x10 @\x80\x00\x01\x02y\x05\x84\ \xa1yg\xab\xb3\x06\x02\x02\xd1\x06\xe8\xb6L$ \x14\ M4L\xad\x10 @\x80\x00\x01\x02\x04\x08\x10 @\ \xa0K\x01ah\x97cQTd\x01\x81h\xe4\xe9\xa9\ \xbd\x0f\x01\xa1h\x1fsP\x05\x01\x02\x04\x08\x10 @\ \x80\x00\x01\x02...
Python
1
# Support generic temperature sensors # # Copyright (C) 2019 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. KELVIN_TO_CELSIUS = -273.15 class PrinterSensorGeneric: def __init__(self, config): self.printer = config.get_printer() self....
Python
1
prefix(rest, f.thms.len()).ok_or_else(|| f.bad_index_parse())?; if self.replace(SymbolNames { sorts, terms, thms }).is_some() { return Err(ParseError::DuplicateIndexTable { p_index: u64_as_usize(f.header.p_index), id: e.id, }) } } Ok(()) } } make_index_trait! {...
Rust
0
ialize, Deserialize, Debug, Clone)] pub struct Hotspot { pub shape: TraceShape, pub transform_matrix: Option<[f64; 16]>, } <reponame>mrd0ll4r/ipfs-tools use ipfs_resolver_common::Result; use prometheus::IntCounterVec; use prometheus_exporter::PrometheusExporter; use std::net::SocketAddr; use std::thread; lazy_...
Rust
0
let obj2 = ap.cur.parse_pdf_object(ptr::null_mut()); if obj2.is_none() { spc_warn!(spe, "Missing (an) object(s) to put into \"{}\"!", ident); return ERR; } let obj2 = obj2.unwrap(); match &mut (*obj1).data { Object::Dict(d1) => { if let Object::Dict(d2) = &mut (*obj2)...
Rust
0
velExtension { /// MarshalTo serializes the members to buffer fn marshal_to(&self, mut buf: &mut [u8]) -> Result<usize> { if buf.remaining_mut() < AUDIO_LEVEL_EXTENSION_SIZE { return Err(Error::ErrBufferTooSmall.into()); } if self.level > 127 { return Err(Error::A...
Rust
0
It is not helpful to try to drive AF with simple slider controls, so ignore them. "AfMode", "AfTrigger", "AfSpeed", "AfRange", "AfWindows", "AfPause", "AfMetering", "ScalerCrops" } # Main widgets window = QWidget() bg_colour = window.palette().color(QPalette.Background).getRgb()[:3] qpi...
Python
1
; Ok(Scalar::null_ptr(this)) } } } fn linux_readdir64_r( &mut self, dirp_op: OpTy<'tcx, Tag>, entry_op: OpTy<'tcx, Tag>, result_op: OpTy<'tcx, Tag>, ) -> InterpResult<'tcx, i32> { let this = self.eval_context_mut(); this.a...
Rust
0
= a { Some(size_bytes) } else { None }}).next(); let first_field_is_auto_positioned = { if let Some(ref field) = fields.first() { let mp = get_field_mid_positioning(field); mp.bits_position == BitsPositionParsed::Next } else { ...
Rust
0
# Copyright (c) Microsoft Corporation. # # 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 wri...
Python
1
laxed))); } AnyArray::I64(array) } pub fn star(&self) -> Vec<String> { self.columns.iter().map(|(n, _)| n.clone()).collect() } pub fn insert(&self, records: &RecordBatch, txn: i64, tids: &mut I64Array, offset: &mut usize) { let (start, end) = self.reserve(records.len() ...
Rust
0
ss_process_arch for npm env values. // For windows, we only support `['ia32', 'x64', 'arm64']` // https://github.com/nodejs/node-gyp/blob/master/lib/install.js#L301 let arch = env::var("CARGO_CFG_TARGET_ARCH") .map(|arch| match arch.as_str() { "x86" => "x86", "x86_64" => "x64", // https://gi...
Rust
0
::LoseIn(ply) => { parts.push(format!("info score mate -{}", ply / 2)); } Score::Value(score) => { parts.push(format!("info score cp {}", score)); } } } if let Some(pv) = si.pv { parts.push("multipv 1".to_string()); parts.push("pv".to_string()); ...
Rust
0
lf, topology): """ Build a system from specified topology object. Parameters ---------- topology : simtk.openmm.app.Topology object The topology of the system to construct. Returns ------- system : openmm.System A system object ge...
Python
1
d (str): To specify the end-user (account owner) on behalf of whom you want to execute functions You need to first link corresponding account with the same owner id in the ACI dashboard (https://platform.aci.dev). allowed_apps_only (bool): If true, only return...
Python
1
""" .. _plotting_algorithms_example: Plotting with VTK Algorithms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Pass a :vtk:`vtkAlgorithm` to the ``Plotter`` for dynamic visualizations. .. note:: By "dynamic visualization" we mean that as the input data/source changes, so will the visualization in real time. A :vtk:`vtkAlgo...
Python
1
twiddle9.im*x1120n.re + -self.twiddle7.im*x1219n.re + -self.twiddle5.im*x1318n.re + -self.twiddle3.im*x1417n.re + -self.twiddle1.im*x1516n.re; let b328im_a = buffer.get_unchecked(0).im + self.twiddle3.re*x130p.im + self.twiddle6.re*x229p.im + self.twiddle9.re*x328p.im + self.twiddle12.re*x427p.im + self.twiddle...
Rust
0
Slot< String > >(), false ); } #[test] fn test_thread_local_reentrant_basic() { use std::sync::atomic::{AtomicUsize, Ordering}; static CTOR_COUNTER: AtomicUsize = AtomicUsize::new( 0 ); static DTOR_COUNTER: AtomicUsize = AtomicUsize::new( 0 ); struct Dummy { text: String } impl Drop...
Rust
0
# mask conv needs not update for param in self.mask_sum_conv.parameters(): param.requires_grad = False def forward(self, input_tuple): # http://masc.cs.gmu.edu/wiki/partialconv # C(X) = W^T * X + b, C(0) = b, D(M) = 1 * M + 0 = sum(M) # output = W^T* (M .* X) / sum(M) +...
Python
1
grade = { "prabhat":55, "Sammer":80, "praj":99, "Hritveek":36, "abhinab":85 } new_dict = {key: value for key,value in grade.items() if key[0]=="p"} print(new_dict) new_dict1 = {key: value/2 for key,value in grade.items() if value>70} print(new_dict1)
Python
1
from.json_dataset import *
Python
1
from holidata.holiday import Region from holidata.utils import day class CM(Region): def __init__(self, country): super().__init__("CM", country) self.define_holiday() \ .with_name("Lunes siguiente a la Epifanía del Señor") \ .in_years([2013]) \ .on(month=1, da...
Python
1
help = "Use this flag to override the default GDB connection string (localhost:1337)." )] gdb_connection_string: Option<String>, #[structopt( name = "list-probes", long = "list-probes", help = "list available debug probes" )] list: bool, #[structopt( name...
Rust
0
import os from conan import ConanFile from conan.tools.cmake import CMakeToolchain, cmake_layout, CMakeDeps from conan.tools.scm import Version class TestPackageConan(ConanFile): name = "up-cpp_unittest" # Optional metadata license = "Apache-2.0" author = "Contributors to the Eclipse Foundation <upro...
Python
1
, Gnome Guys <gnome@FreeBSD.org>') == ['amdmi3@freebsd.org', 'gnome@freebsd.org'] def test_list_name_complex(self): assert extract_maintainers('Marakasov, Dmitry <amdmi3@FreeBSD.org>, Guys, Gnome <gnome@FreeBSD.org>') == ['amdmi3@freebsd.org', 'gnome@freebsd.org'] def test_list_name_ambigous(self): ...
Python
1
EFAULT_ALPHABET, b"this is my salt", ); assert_eq!( "AdG05N6y2rljDQak4xgzn8ZR1oKYLmJpEbVq3OBv9WwXPMe7", alphabet.iter().map(|&u| u as char).collect::<String>() ); assert_eq!( "UHuhtcITCsFifS", separators.iter().map(|&u| u as c...
Rust
0
# main.py from dotenv import load_dotenv load_dotenv(dotenv_path=".env", override=True) import os import threading import signal import psycopg2 from logger.log_config import setup_logging from db.db_handler import DBLogger from monitor.post_processor import post_process from camera.rtsp_capture import start_stream_mo...
Python
1
-> &'a mut W { { self.bits(variant.into()) } } #[doc = "Unlock history: 0"] #[inline(always)] pub fn fllunlockhis_0(self) -> &'a mut W { self.variant(FLLUNLOCKHIS_A::FLLUNLOCKHIS_0) } #[doc = "Unlock history: 1"] #[inline(always)] pub fn fllunlockhis_...
Rust
0
) last_clipboard_content = typst_output # Update with our output to prevent re-processing except pyperclip.PyperclipException as e: print( f" [Warning] Could not copy Typst to clipboard: {e}" ...
Python
1
{}", msg), Err(e) => write!(ret, "Error: {:?}", e), }; } _ => { show_help = true; } } } else { show_help = true; } if show_help { let _ = write!(ret...
Rust
0
# Package from tkinter import * import backend # functions ## view button def view_command(): list1.delete(0,END) for row in backend.view(): list1.insert(END,row) ## search button def search_command(): list1.delete(0,END) for row in backend.search(title_text.get(),author_text.get(),year_text.g...
Python
1
0.0, '\xea\xae': 0.0, '\xea\xaf': 0.0, '\xea\xa8': 0.0, '\xea\xa9': 0.0, '\xea\xaa': 0.0, '\xea\xab': 0.0, '\xea\xa4': 0.0, '\xea\xa5': 0.0, '\xea\xa6': 0.0, '\xea\xa7': 0.0, '\xea\xa0': 0.0, '\xea\xa1': 0.0, '\xea\xa2': 0.0, '\xea\xa3': 0.0, '\xea\x9c': 0.0, '\xea\x9d': 0.0, '\xea\x9e': 0.0, '\xea\x9f': 0.0, '\xea\x9...
Python
1
]; let rows = 3; let cols = 5; let search_element = 7; let expect = [(0, 1, 4), (1, 1, 3), (2, 0, 1)]; setup(&sandwich, cols, rows, search_element, &expect); } #[test] fn test2() { let sandwich = [1, 2, 2, 5, 5, 3, 5, 5, 6, 9]; let rows = 2; let cols = 5; let search_element = 5; let expect = [(0...
Rust
0
import numpy as np from math import pi import bpy from bpy.props import FloatProperty, EnumProperty, BoolProperty, IntProperty, FloatVectorProperty from sverchok.node_tree import SverchCustomTreeNode from sverchok.data_structure import updateNode, zip_long_repeat, ensure_nesting_level, get_data_nesting_level from sve...
Python
1
x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x0F, 0x15, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0xF7, 0xFF, 0xFF, 0x0F, 0xF7, 0xFF, 0xFF, 0x0F, 0x1A, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x0...
Rust
0
def get_exact_position(self): return self._position.GetExact() position = property(get_position, set_position) class EntitySystem: def __init__(self, targetComponents=[]): self.targetComponents = targetComponents self.game = None self.removeO...
Python
1