text
string
label_name
string
labels
int64
i32_to_utf8() -> Result<()> { let schema = Schema::new(vec![Field::new("a", DataType::Int32, false)]); let a = Int32Array::from(vec![1, 2, 3, 4, 5]); let batch = RecordBatch::try_new(Arc::new(schema.clone()), vec![Arc::new(a)])?; let cast = CastExpr::try_new(col(0), &schema, DataType::U...
Rust
0
from math import sin, pi from lib.expression import Expression from .methods import optimization_loop, gradient_descent_step, \ nesterov_step, heavy_ball_step, newton_step expressions = [ Expression("y = x1 ^ 2", lambda x: x[0] ** 2, 1, [0]), Expression("y = sin x1", lambda x: sin(x[0]), 1, [-pi / 2...
Python
1
should_rpush_values); centralized_test!(lists, should_rpushx_values); } pub mod geo { centralized_test!(geo, should_geoadd_values); centralized_test!(geo, should_geohash_values); centralized_test!(geo, should_geopos_values); centralized_test!(geo, should_geodist_values); centralized_test!(geo, should_geo...
Rust
0
# Problem: Step-By-Step Directions From a Binary Tree Node to Another - https://leetcode.com/problems/step-by-step-directions-from-a-binary-tree-node-to-another/ # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left =...
Python
1
190: OnClose(event) if x > 195 and x < 252: print "OpenSource Development: https://github.com/arturaugusto/display_ocr.\nBased on examples availables at https://code.google.com/p/python-tesseract/.\nGPLv2 License" else: drawing = True ...
Python
1
{ b[0..2] .try_into() .map_err(|_| Error(ErrorOrigin::OsLayer, ErrorKind::Encoding)) }) .filter_map(Result::ok) .map(|b| match proc_arch.endianess() { Endianess::LittleEndian => u16::from_le_bytes(b), ...
Rust
0
} // Copyright 2017 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT ...
Rust
0
from pathlib import Path import numpy as np import pytest from ms2deepscore import MS2DeepScore from ms2deepscore.models import load_model from tests.create_test_spectra import pesticides_test_spectra TEST_RESOURCES_PATH = Path(__file__).parent / 'resources' def get_test_ms2deepscore_instance(): """Load data a...
Python
1
e Microcystis. */ pub mod microcystis { /** * Need to serialize forcing and result. */ use serde::{Serialize, Deserialize}; /** * Stateless container for bounded floating point values */ #[derive(Debug, Serialize, Deserialize)] struct BoundedValue { min: f64, m...
Rust
0
per::*; use crate::tests::{new_test_ext, Test}; use frame_support::assert_ok; #[test] fn test_benchmarks() { new_test_ext().execute_with(|| { assert_ok!(test_benchmark_proxy::<Test>()); assert_ok!(test_benchmark_add_proxy::<Test>()); assert_ok!(test_benchmark_remove_proxy::<Test>()); assert_ok!(test_...
Rust
0
let cipher = Aes128CcmNLen13TagLen8::new(&key); cipher.encrypt_slice(&nonce, &aad, &mut ciphertext_and_tag); assert_eq!( &ciphertext_and_tag[..], &hex_decode( "DC F1 FB 7B 5D 9E 23 FB 9D 4E 13 12 53 65 8A D8 6E BD CA 3E 51 E8 3F 07 7D 9C 2D 93" )[..] ); ...
Rust
0
Cyan, White, } /// The supported background colours. /// /// Use them with `Display` to engage setting colour. /// /// You can use this with `{:.0}` which will *not* change the colour. /// /// Note: take *extreme* care, as each and every call to `Display::fmt()` on this enum might change the *terminal*'s back...
Rust
0
let power = web::block(move || power::find_by_id(&conn, id)) .await .map_err(|err| { eprintln!("{}", err); HttpResponse::InternalServerError().finish() })?; match power { Some(power) => Ok(HttpResponse::Ok().json(power)), None => Ok(HttpResponse::O...
Rust
0
# Choregraphe simplified export in Python. from naoqi import ALProxy names = list() times = list() keys = list() names.append("LElbowRoll") times.append([1.24]) keys.append([-1.53764]) names.append("LElbowYaw") times.append([1.24]) keys.append([-2.04727]) names.append("LHand") times.append([1.24]) keys.append([0.93]...
Python
1
:class: toggle CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384) | o Property SliversAndCracks() As References (Read Only) | | Returns or sets the slivers face. | | Example: | ...
Python
1
xpiration, "expiration_type": "standard", "option_type": "put", "root_symbol": symbol } puts.append(put) logger.info(f"Generated simulated option chain for {symbol}: {len(calls)} calls, {len(puts)} puts") return { "calls": calls, "put...
Python
1
r<Peeked<ReadableChunks<Body>>>>, buf: BytesMut, } impl fmt::Debug for Decoder { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("Decoder") .finish() } } impl Decoder { /// An empty decoder. /// /// This decoder will produce a single 0 byte chunk. ...
Rust
0
import os os.system('cls') import random print('-' * 90) print('ESCOLHA DO USUÁRIO') print ('.' * 90) valor = int(input('Entre com o valor: ')) numero = random.randint(0, 5) if numero == valor: print(f'O {valor} o valor está correto, usuário.') else: print(f'O {valor} está errado, tente novamente.') print(...
Python
1
>>> paths["0"]["2"] ['0', '1', '2'] Notes ----- Johnson's algorithm is suitable even for graphs with negative weights. It works by using the Bellman–Ford algorithm to compute a transformation of the input graph that removes all negative weights, allowing Dijkstra's algorithm to be used o...
Python
1
uuid(&self) -> Result<Option<[u8; 16]>> { self.header.uuid(self.endian, self.data) } fn entry(&self) -> u64 { if let Ok(mut commands) = self.header.load_commands(self.endian, self.data) { while let Ok(Some(command)) = commands.next() { if let Ok(Some(command)) = comm...
Rust
0
ft_limit_delta": -0.1}, "left_limit_delta (=-0.1) argument should be >= 0.", ], ), ) def test_murphy_thetas_invalid_inputs(new_kwargs, expected_exception_msg): """murphy_thetas raises an exception for invalid inputs.""" forecasts = [_test_array([1.0, 2.0]), _test_array([0.0, np.nan])] ...
Python
1
on = false; let mut in_nearby_tickets_section = false; let mut rules = TicketRules::new(); let mut your_ticket = Ticket::new(""); let mut nearby_tickets = Vec::new(); for line in info { if line.is_empty() { continue; } else if line == "yo...
Rust
0
= Runner::new(); // Interval must be positive. let mut query = runner.proxy.start_logging(0, 200); assert_matches!( runner.executor.run_until_stalled(&mut query), Poll::Ready(Ok(Err(fthermal::TemperatureLoggerError::InvalidArgument))) ); // Duration mus...
Rust
0
with a /// reference count > 0 as Black. The latter group's reference count is restored /// to its previous value from before step (1). /// /// 3. `collect_roots`: Finally, the buffer of possible dead cycle roots is /// emptied and members of dead cycles (White nodes) are dropped. /// /// ```rust /// use bacon_rajan_c...
Rust
0
ew() .entry("data", "1") .entry("meta", "2") .build() )?; writeln!( &mut file, "static VALUES_HMAC: SubValuesMap = \n{};\n\n", phf_codegen::OrderedMap::new() .entry("list", format!("({}, ...
Rust
0
// Setup let num_shreds_per_slot = 2; let (blocktree, genesis_config, cluster_info, bank0, leader_keypair, socket) = setup(num_shreds_per_slot); // Insert complete slot of ticks needed to finish the slot let ticks = create_ticks(genesis_config.ticks_per_slot, 0, gen...
Rust
0
s to the project name. #epub_basename = u'Python Client for eAPI' # The HTML theme for the epub output. Since the default themes are not optimized # for small screen space, using the same theme for HTML and epub output is # usually not wise. This defaults to 'epub', a theme designed to save visual # space. #epub_theme...
Python
1
# import the necessary packages from .tempfile import TempFile
Python
1
IoU_1_1, IoU_1_1, epoch_loss.item(), epoch) # checkpoint_info['last'] = 'LAST' return checkpoint_info def main(): # https://github.com/pytorch/pytorch/issues/27588 torch.backends.cudnn.enabled = True seed_all(7240) args = parse_args() train_f = args.config_fil...
Python
1
); let color = style.mode.color(*a, *b, line); let effect = byte_effect(*a); printer.append_text(&s, color, effect); if style.spacer && i + 1 != width && i % 8 == 7 { printer.append_text(" ", color, effect); } } if style.right_t...
Rust
0
producer=exgen.Producer, extractor=exgen, registrationName=smtrace.Trace.get_registered_name(exgen, "extractors")) traceitem.finalize() del traceitem trace.append_separated(smtrace.get_current_trace_output_and_reset(raw=...
Python
1
0x7d, 0xf3, 0xd7, 0x7a, 0xe2, 0xea, 0x9b, 0x4e, 0x7c, 0x14, 0x63, 0x64, 0xa3, 0xdf, 0xdb, 0x3, 0x30, 0x77, 0x88, 0xf6, 0x38, 0xbb, 0x8, 0x17, 0xed, 0x8b, 0x9f, 0x1d, 0x2d, 0x7, 0x16, 0xbe, 0xad, 0xc3, 0x4b, 0x80, 0x8c, 0x8b, 0x63, 0xfe, 0xd3, 0xe6, 0xd5, 0x1d, 0x4, 0x8d, 0x4f, 0x47, 0x10, 0xc...
Rust
0
local_data::set(key_vector, ~[4]); local_data::get(key_int, |opt| assert_eq!(opt, Some(&~[4]))); ~~~ Casting 'Arcane Sight' reveals an overwhelming aura of Transmutation magic. */ use prelude::*; use task::local_data_priv::*; #[cfg(test)] use task; /** * Indexes a task-local data slot. This pointer is used for...
Rust
0
raise ValueError( f"Got no tools for {cls.__name__}. At least one tool must be provided." ) for tool in tools: if tool.description is None: raise ValueError( f"Got a tool {tool.name} without a description. For this agent, " ...
Python
1
"""Jina AI toolkit""" from langchain_community.tools.jina_search.tool import JinaSearch __all__ = ["JinaSearch"]
Python
1
Q, task: &T, fold: &F) -> Result<C> where P: AsRef<Path>, Q: AsRef<Path>, T: Fn(&Path, &Path) -> std::io::Result<R>, R: Eq + Hash, F: Fn(&mut C, R), C: Default, { let mut collector = C::default(); inner_io_task_into(from.as_ref(), into.as_ref(), task, fold, &mut collector)?; Ok(colle...
Rust
0
it_u32(sub_reg(x64, dest, REG_ZERO, src)); } pub fn int_not(&mut self, mode: MachineMode, dest: Reg, src: Reg) { let x64 = match mode { MachineMode::Int32 => 0, MachineMode::Int64 => 1, _ => panic!("unimplemented mode {:?}", mode), }; self.emit_u32(o...
Rust
0
class AiogramWarning(Warning): pass class Recommendation(AiogramWarning): pass
Python
1
#!/usr/bin/env python import matplotlib.pyplot as plt import numpy as np import glob Ry2eV = 13.60569193 if __name__ == '__main__': dat = np.loadtxt('info.iterate') ind=[] istr=0 for j in range(len(dat)-1): if dat[j+1][2]<=dat[j][2]: ind.append(j) if dat[j+1][0]<dat[j][...
Python
1
} fn quoted_ident(i: &str) -> IResult<&str, &str> { delimited(opt(tag("\"")), ident, opt(tag("\"")))(i) } // TODO: this needs more robust numeric/string literal support // see: https://github.com/Geal/nom/blob/main/examples/string.rs // see: https://docs.rs/nom/latest/nom/recipes/index.html#floating-point-number...
Rust
0
#!/usr/bin/env python3 """ Import the wait_random function from the 0-basic_async_syntax module """ import asyncio wait_random = __import__('0-basic_async_syntax').wait_random def task_wait_random(max_delay: int) -> asyncio.Task: """ Creates a new asyncio Task that runs the wait_random coroutine. The ...
Python
1
results["status"], "caution") def test_analyze(self): output = { "whois": "http://whois.domaintools.com/192.168.1.1", "reputation": 0, "indicator": "192.168.1.1", "type": "IPv4", "pulse_info": { ...
Python
1
goCell { value: parsed_numbers[2], called: false, }, BingoCell { value: parsed_numbers[3], called: false, }, BingoCell { value: parsed_numbers[4], ...
Rust
0
Weight{edge}), Some(val) => (value / val).abs() }; let should_update = match current_max { None => true, Some(max_val) => grade > max_val }; if should_update { current_max = Some(grade); max_...
Rust
0
{ let BufferMemory::Native(m) = mem; let new_dev = BufferDevice::Native(dev.clone()); Box::new(dev.sync_from_vec(m, vec).map(move |mem| { self.latest_source = RawBuffer::<T>::device_source(&new_dev); self.copies.insert(new_dev, BufferMemory::Native(mem)); ...
Rust
0
_seq.search(content): return re.sub(r"\s", "", rgx_seq.search(content).group(1)) else: print(f"{name_} was not found in {file}!") return def spe_in_fas(spe, file): rgx_seq = re.compile(f">{spe}([^>]+)") ...
Python
1
`read()` method returns [dma_apbperi_sha_pms_constrain_1::R](R) reader structure"] impl crate::Readable for DMA_APBPERI_SHA_PMS_CONSTRAIN_1_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes [dma_apbperi_sha_pms_constrain_1::W](W) writer structure"] impl crate::Writable for DMA_APBPERI_SHA_PMS_CONSTRAI...
Rust
0
import cv2 from passport_cropper.utils import draw_text_with_shadow, rotate_to_passport_orientation, save_cropped_with_size_limit def crop_passport_photo(image_path:str, output_path="output.jpg", max_size_kb=None, serial_number: str = None): image = cv2.imread(image_path) gray = cv2.cvtColor(image, cv2.COLOR_B...
Python
1
vals = get_args($doc, $args); let expected = map_from_alist($expected); same_args(&expected, &vals); } ); ); macro_rules! test_user_error( ($name:ident, $doc:expr, $args:expr) => ( #[test] #[should_panic] fn $name() { get_args($doc, $args); } ); ); t...
Rust
0
dp_uuid_to_proto(uuid: *mut uuid_t) -> c_int; pub fn sdp_uuid_extract( buffer: *const u8, bufsize: c_int, uuid: *mut uuid_t, scanned: *mut c_int, ) -> c_int; pub fn sdp_uuid_print(uuid: *const uuid_t); pub fn sdp_uuid2strn(uuid: *const uuid_t, str: *mut c_char, n: size_t)...
Rust
0
}); } } } let display_stats = DisplayStats::new(rec_counts, hist); let json = serde_json::to_string_pretty(&display_stats)?; Ok(json) } fn main() { // clap::Appを使ってコマンドライン名やバージョンなどを設定する let arg_matches = App::new("trip-analyzer") .version("1.0")...
Rust
0
import pytest from rotkehlchen.tests.utils.exchanges import create_test_poloniex @pytest.fixture(name='poloniex') def fixture_poloniex( database, inquirer, # pylint: disable=unused-argument function_scope_messages_aggregator, ): return create_test_poloniex( database=database, ...
Python
1
db: Option<PathBuf>, previous_stop: Option<SystemTime>, } fn load_zenith_store(path: PathBuf, current_time: &SystemTime) -> HistogramMap { // need to fill in time between when it was last stored and now, like the sled DB let data = std::fs::read(path).expect(DB_ERROR); let mut hm: HistogramMap = bi...
Rust
0
_permutation[0x48..]) as usize; let r_data_offset = LittleEndian::read_u32(&r_permutation[0x48..]) as usize; let t_sound_data = if t_permutation[0x44] & 1 == 1 { &sounds_pc[t_data_offset .. t_data_offset + t_data_size] ...
Rust
0
ACTIVE_W { CCLK_SAMPLE_DELAY_ACTIVE_W { w: self } } } // Copyright 2021 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. //! Helpers for triggering best-effort crash reports. use anyhow::anyhow; use fidl_fuchs...
Rust
0
database doc. let role_id_u64: u64 = match guild_doc.mod_role_ID.parse::<u64>() { Ok(num) => num, Err(_) => return Err("Could not parse mod role ID."), }; debug!("Role ID as a u64 {:?}", role_id_u64); // Check if the user has the mod role, and return the Ok(bool) let allowed: bool...
Rust
0
import os from groq import Groq from dotenv import load_dotenv # loading in api keys from the .env file load_dotenv() def find_keywords_groq(topic): apikey = os.getenv("GROQ_API_KEY") # Break down the topic into keywords/phrases client = Groq( #api_key=os.environ.get("gsk_h4AKB5A1AfuGlYNXw4TpWGdyb...
Python
1
#!/usr/bin/env python3 # Convert a ddrescue log to dm-dust badblock list import sys BS = 512 dev = "dust1" # blockdev --getsz /dev/loop0 # dmsetup create dust1 --table '0 488397168 dust /dev/loop0 0 512' # kpartx -u /dev/mapper/dust1 print(f"dmsetup message {dev} 0 clearbadblocks") for line in sys.stdin: if lin...
Python
1
: None }, redacts, event_id, origin_server_ts, room_id: Some(room_id), sender, unsigned: UnsignedData { age: Some(age), redacted_because: None, transaction_id: None...
Rust
0
_latex_(self): r""" Return a latex representation of ``self``. EXAMPLES:: sage: G = cellular_automata.GraftalLace([5,1,2,5,4,5,5,0]) sage: G.evolve(2) sage: latex(G) \begin{tikzpicture} \fill (3,1) circle (2pt); \draw[-] (...
Python
1
pub const WATERMARK_HIGH: &str = "watermark_high"; pub const RANGE: &str = "range"; pub const COMMIT: &str = "commit"; pub const ENV_CACHE_DRIVES: &str = "HULK_CACHE_DRIVES"; pub const ENV_CACHE_EXCLUDE: &str = "HULK_CACHE_EXCLUDE"; pub const ENV_CACHE_EXPIRY: &str = "HULK_CACHE_EXPIRY"; pub const ENV_CACHE_MAX_USE: &...
Rust
0
' |-->| Rec |-->| B2 |-->| B1' |-->| Rec |-->| B3 | /// +----+ +----+ +-----+ +-----+ +----+ +-----+ +-----+ +----+ /// /// Where: /// * B0 and B1 are "user blocks" in the MIR before the transformation. /// * B0' and B1' are "shadow blocks" of B0 and B1 respectively. /// * B2 and B3 are copies ...
Rust
0
import os import sys # Ensure project root is on sys.path so 'app' package can be imported inside container sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import dotenv import telebot from cryptography.fernet import Fernet # Локальные модули from app.db import init_db from app.hand...
Python
1
ing>); impl Validate for StringAttrList {} #[derive(Default, PartialEq, Debug, UtilsTupleIo, UtilsDefaultSerde)] pub struct ReferenceTokenList(pub Vec<ReferenceToken>); impl Validate for ReferenceTokenList {} #[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)] #[yaserde(prefix = "tt", namespace = "tt: ...
Rust
0
sys.executable, os.path.join(SCRIPTS_DIR, "add_trigger_word_to_captions.py"), dataset_path, "--trigger-word", basename ] logger.info(f"执行触发词添加命令: {' '.join(add_trigger_cmd)}") trigger_output = run_command(add_trigger_cmd, s...
Python
1
if()) # 打印私钥的WIF格式 #print("Bitcoin Address:", key.address_obj.address) # 打印比特币地址 #print("Bitcoin Address:", key.wif_private()) addresses=[p2k_compressed_base58,p2s_compressed_base58,p2k_compressed_bech32,p2s_compressed_bech32,p2k_uncompressed_base58,p2s_uncompressed_base58] ...
Python
1
nn.Conv2d( in_channels=5, out_channels=5, kernel_size=(4, 7), stride=(1, 1), ), nn.ReLU(), nn.AdaptiveAvgPool2d(output_size=(ch_out, 1...
Python
1
{'params': [p for n, p in model.named_parameters() if 'bert' not in n], # 'lr': configs.other_lr}] # optimizer = AdamW(optimizer_grouped_parameters, lr=configs.lr, eps=configs.adam_epsilon) # # 分层设置学习率结束 bert_test = model params_list = [n f...
Python
1
base_ptr(&mut self) -> *mut ffi::Joint { use self::UnknownJoint::*; match self { &mut Distance(ref mut x) => x.mut_base_ptr(), &mut Friction(ref mut x) => x.mut_base_ptr(), &mut Gear(ref mut x) => x.mut_base_ptr(), &mut Motor(ref mut x) => x.mut_base_ptr()...
Rust
0
id(), schema.is_column_id()); } } Box::into_raw(plan) as *const c_void } /// To destroy a logical plan. #[no_mangle] pub extern "C" fn destroy_logical_plan(ptr_plan: *const c_void) { destroy_ptr::<LogicalPlan>(ptr_plan) } /// To release a FfiError #[no_mangle] pub extern "C" fn destroy_ffi_error(e...
Rust
0
import torch import torch.nn as nn import torch.nn.functional as F from onmt.Utils import aeq SCALE_WEIGHT = 0.5 ** 0.5 def seq_linear(linear, x): # linear transform for 3-d tensor batch, hidden_size, length, _ = x.size() h = linear(torch.transpose(x, 1, 2).contiguous().view( batch * length, hid...
Python
1
# coding: utf-8 """ Coinbase Developer Platform APIs The Coinbase Developer Platform APIs - leading the world's transition onchain. The version of the OpenAPI document: 2.0.0 Contact: cdp@coinbase.com Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manua...
Python
1
elf.settlement_currency, 'to_alipay_dict'): params['settlement_currency'] = self.settlement_currency.to_alipay_dict() else: params['settlement_currency'] = self.settlement_currency if self.trans_amount: if hasattr(self.trans_amount, 'to_alipay_dict'): ...
Python
1
/// /// [`None`]: ../../std/option/enum.Option.html#variant.None /// [`write`]: ../../std/io/trait.Write.html#tymethod.write /// pub fn write_timeout(&self) -> io::Result<Option<Duration>> { self.0.write_timeout() } /// Sets the value of the `SO_BROADCAST` option for this socket. ...
Rust
0
""" ========================================================================== IncrWires_test.py ========================================================================== IncrWires is an incrementer model that uses wires for internal communication between update blocks. If we use wires, then the framework can automati...
Python
1
t sys # 导入系统模块,用于访问与Python解释器紧密相关的变量和函数 # # # import cv2 # 导入OpenCV库,用于图像处理和计算机视觉任务 # # # import torch # 导入PyTorch库,用于深度学习 # # # from PySide6.QtWidgets import QMainWindow, QApplication, QFileDialog, QLabel, QVBoxLayout, QScrollArea, QWidget, QVBoxLayout, QTableWidget, QTableWidgetItem, QHeaderView # 导入PySide6的GUI控件 ...
Python
1
import numpy as np import copy def find_ground(pcd, data): # Find ground using RANSAC rest = copy.deepcopy(pcd) ground = copy.deepcopy(pcd) discarted_segments = [] ground_found = False i = 0 while not ground_found: if i > 3: return ground_found, None, None, None ...
Python
1
d line contains an empty argument. """ value = io.StringIO(command) args = [] current_arg = "" while True: c = value.read(1) match c: case "": # We found the end of the string. break case "\\": # We found a backslash, the next character should be either a space or ...
Python
1
d75jg\x05\xc8\xd6=\ *\xadJiR\x8d\xeb~\x89\x7f0/\xb2\x05\xa4D\ \xe9\x88F% V\xd7\xd3\x17\x0a\xfaVJ\xe7'\xff\ \xd4\xb7\x02\x00\xcc\x8dus\xee \x04\xf4\xa2\x9a\x9d6\ E\x89\x90%\xb3JAc\xf7\xd8\xb0\xac >\xabY\ \xa7\x7f3\xcb\xc7\xed\x99\x1bP\xdf\xd9\x00j\xa7\xcb\xe7\ v\xe0\xf4)\x0el\x9e?\xc6\x9bD\xfb\xa9K\xe5\x7f\ \xf8\xcd\xf0...
Python
1
from importlib import reload import goo from goo.division import * from goo.handler import * from scipy.spatial.distance import pdist, cdist, squareform reload(goo) goo.reset_modules() goo.reset_scene() celltype = goo.CellType("A", physics_enabled=False) cell = celltype.create_cell("cellA", (0, 0, 0)) np.random.see...
Python
1
= 10, /// Well known service description, [RFC 1035](https://tools.ietf.org/html/rfc1035) WKS = 11, /// Domain name pointer, [RFC 1035](https://tools.ietf.org/html/rfc1035) PTR = 12, /// Host Information, [RFC 1035](https://tools.ietf.org/html/rfc1035) HINFO = 13, /// Mailbox or mail list i...
Rust
0
code, [ 0xA9, 0xFB ]); } /// Has to work without any labels #[test] fn no_label() { let mcode = assemble6502!( lda #0xfb lda #0xab ); assert_eq!(mcode, [ 0xA9, 0xFB, 0xA9, 0xAB ]); } /// Tests multiple labels and relocated jumps, `lbl1` is unused #[test] fn labels() { let mcode = assem...
Rust
0
# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
Python
1
axis_title="Count", height=300, margin=dict(l=32, r=16, t=40, b=32)) else: fig_interfaces = go.Figure() fig_interfaces.update_layout(title="Interfaces Status", height=300) # Health gauge fig_health = go.Figure( go.Indicator( mode="gauge+number", value=healthy...
Python
1
of::<GeeMultiMapIface>(), alignment: align_of::<GeeMultiMapIface>()}), ("GeeMultiSetIface", Layout {size: size_of::<GeeMultiSetIface>(), alignment: align_of::<GeeMultiSetIface>()}), ("GeePriorityQueue", Layout {size: size_of::<GeePriorityQueue>(), alignment: align_of::<GeePriorityQueue>()}), ("GeePriorityQu...
Rust
0
#!/usr/bin/env python3 """ Helper script to get DocSend cookies from your browser """ import json import os def print_cookie_instructions(): """Print detailed instructions for getting cookies""" print("🔐 DOCSEND COOKIE EXTRACTION GUIDE") print("=" * 60) print() print("Follow these steps to get yo...
Python
1
#!/usr/bin/env python # coding:utf8 ''' 对清洗后的电影数据进行基本统计 author: Honlan email: 493722771@qq.com date: 2015/09/20 ''' import json import time import random import pprint import MySQLdb import MySQLdb.cursors inputFile = 'douban_movie_clean.txt' fr = open(inputFile, 'r') db = MySQLdb.connect(host='127.0.0.1', user...
Python
1
} pub fn sys_getrandom( ctx: &ThreadContext, buf_addr: UserAddress, size: usize, _flags: i32, ) -> Result<SyscallResult, Errno> { let mut buf = vec![0; size]; let size = zx::cprng_draw(&mut buf).map_err(impossible_error)?; ctx.process.write_memory(buf_addr, &buf[0..size])?; Ok(size.into...
Rust
0
ntifierType::Not_XID), ('\u{270a}', '\u{270b}', IdentifierType::Not_XID), ('\u{270c}', '\u{2727}', IdentifierType::Not_XID), ('\u{2728}', '\u{2728}', IdentifierType::Not_XID), ('\u{2729}', '\u{274b}', IdentifierType::Not_XID), ('\u{274c}', '\u{274c}', IdentifierType::Not_XID), ('\u{274d}', ...
Rust
0
"6e031d1c-c313-47b6-9cc9-683a28ae9ab3", ) .is_ok());*/ // longda let params = AssignCustomerNodesRequest { customer: "e150535f-c285-41b8-9e34-e7cac1c9d09c".to_string(), server_id: "0009".to_string(), node_start: 50, node_end: 6...
Rust
0
w(Type::Char(true)), ArrayType::Fixed(len)) } }; Expr { lval: false, ctype, location, expr: ExprType::Literal(literal), } } // 6.5.15 - Conditional operator fn pointer_promote(left: &mut Expr, right: &mut Expr) -> bool { let is_convertible_to_any_pointer = |expr:...
Rust
0
operty.""" self._cards[0].set_value("c1", value) @property def r2(self) -> float: """Get or set the Parameters (Resistances, inductances, capacities) for the different circuits. """ # nopep8 return self._cards[0].get_value("r2") @r2.setter def r2(self, value: float) -> ...
Python
1
.41014531], [ 0.08382316, 0.43259439, 0.1428889 , 0.44830176], [ 0.51529756, 0.70111616, 0.20799415, 0.91851457] ], ]; assert!(a.std_axis(Axis(0), 1.5).all_close( &aview2(&[ [ 0.05989184, 0.36051836, 0.00989781, 0.32669847], [ 0.81957535, ...
Rust
0
Open::new(name, flags, mode); uhyve_send(UHYVE_PORT_OPEN, &mut sysopen); sysopen.ret } fn close(&self, fd: i32) -> i32 { let mut sysclose = SysClose::new(fd); uhyve_send(UHYVE_PORT_CLOSE, &mut sysclose); sysclose.ret } fn shutdown(&self) -> ! { let mut sysexit = SysExit::new(scheduler::get_last_exit...
Rust
0
isError> { None } /// Check for special errors configured by the caller to initiate a reconnection process. fn check_special_errors(inner: &Arc<RedisClientInner>, frame: &ProtocolFrame) -> Option<RedisError> { if let Some(auth_error) = parse_redis_auth_error(frame) { // this closes the stream and initiates a r...
Rust
0
: String) -> bool { self.find(prefix).is_some() } fn find(&self, word: String) -> Option<&Trie> { let mut curr = self; for i in word.chars().map(|ch| (ch as u8 - 'a' as u8) as usize) { curr = curr.nodes[i].as_ref()?; } Some(curr) } } // submission codes ...
Rust
0
not a Num, the first arg is used as lhs dividing by 0 will result in infinity (∞)", vec![ HelpExample { desc: "divide 4 by 2", code: "\\ 4 | / 2", }, HelpExample { desc: "divide 2 ÷ 3", code: "÷ 2 3", ...
Rust
0
from typing import Literal from pydantic import BaseModel class Evidence(BaseModel): text: str label: Literal["Supports", "Refutes", "Neutral"] paragraph_id: int class Answer(BaseModel): answer: str | bool evidence_ids: list[int] def as_string(self): if isinstance(self.answer, str)...
Python
1
,self.arucoId) elif(T2_filtered is not None and self.arucoId==0): print("T2...: ",T2_filtered) NaprejNazaj = (T2_filtered[0])*10 if NaprejNazaj > 15: NaprejNazaj = 15 LevoDesno = (-T2_filtered[1]...
Python
1
_secrets: r.restrict_to_secrets, write: r.write, } } } pub fn api_key_info(config: &Config) -> Result<ApiKeyInfo> { let body = InspectApiKeyRequest { api_key_id: config .psono_settings .api_key_id .to_hyphenated() .to_string() ...
Rust
0