text
string
label_name
string
labels
int64
frappe.desk.doctype.event.event.get_events": "hrms.event.get_events" # } # # each overriding function accepts a `data` argument; # generated from the base implementation of the doctype dashboard, # along with any modifications made in other Frappe apps override_doctype_dashboards = { "Employee": "hrms.overrides.dashbo...
Python
1
erstood. # pd.testing.assert_frame_equal(new_X, expected) <- this should work assert all(new_X == expected) assert all(new_X.columns == expected.columns) assert all(new_X.index == expected.index) assert new_X.ww.logical_types == expected.ww.logical_types assert new_X.ww.logical_types == expect...
Python
1
to-order logic: if single_action == 'hold' or self.is_done_enabled: pass elif single_action == 'buy': self.order = self.buy(data=key, size=self.p.order_size[key]) self.broker_message = 'new {}_BUY created; '.format(key) + self.broker_message ...
Python
1
from sleap.gui.commands import CommandContext from sleap.gui.dialogs.delete import DeleteDialog def test_delete_user_dialog(centered_pair_labels, qtbot): context = CommandContext.from_labels(centered_pair_labels) context.state["frame_idx"] = 123 context.state["video"] = centered_pair_labels.videos[0] ...
Python
1
import re import setuptools from setuptools import find_packages with open("./kgl/__init__.py", "r") as f: content = f.read() version = re.search(r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', content).group(1) with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="kgl", ...
Python
1
import jinja2.exceptions from flask import render_template from werkzeug.exceptions import InternalServerError def render_error(error): if ( isinstance(error, InternalServerError) and error.description == InternalServerError.description ): error.description = "An Internal Server Error ...
Python
1
_rules! app_flash_component_helper { ($F:ty, $buffer_size: literal) => {{ static mut BUFFER: [u8; $buffer_size] = [0; $buffer_size]; use capsules::app_flash_driver::AppFlash; use capsules::nonvolatile_to_pages::NonvolatileToPages; use core::mem::MaybeUninit; use kernel::hil; ...
Rust
0
import yfinance as yf import matplotlib microsoft = yf.Ticker('MSFT') microsoft_data = microsoft.history(period= 'max') microsoft_data.head() # GRAPH.... # def make_graph(stock_data, revenue_data, stock): # fig = make_subplots(rows=2, cols=1, shared_xaxes=True, subplot_titles=("Historical Share Price", "Histo...
Python
1
(&mut self) { if !self.is_valid() { self.0.sub_noborrow(&P::MODULUS); } } fn mont_reduce( &mut self, r0: u64, mut r1: u64, mut r2: u64, mut r3: u64, mut r4: u64, mut r5: u64, mut r6: u64, mut r7: u64, mu...
Rust
0
rng.fill(&mut seed)); let key_pair = Ed25519KeyPair::from_seed(&seed); let bytes = Ed25519KeyPairBytes { private_key: seed, public_key: key_pair.public_key, }; Ok((key_pair, bytes)) } /// Copies key data from the given slices to create a new key pair. T...
Rust
0
#!/usr/bin/env python3 import logging import time import click logging.getLogger("scapy.runtime").setLevel(logging.ERROR) from habu.lib.iface import search_iface from scapy.all import ARP, Ether, conf, getmacbyip, sendp @click.command() @click.argument('victim1') @click.argument('victim2') @click.option('-i', 'if...
Python
1
#[inline] fn interpolate(&self, a: Vec3A, b: Vec3A, p: f32) -> Vec3A { interpolation::lerp(a, b, p) } #[inline] fn interpolate_half(&self, a: Vec3A, b: Vec3A) -> Vec3A { interpolation::lerp_half(a, b) } #[inline] fn interpolate_multiple(&self, a: Vec3A, b: Vec3A, indice...
Rust
0
.query_wasm_smart( &env.proxy_addr, &QueryMsg::PhaseAggregators { phase_id: new_phase, }, ) .unwrap(); assert_eq!(old_aggregator, old_phase_agg); assert_eq!(new_aggregator, new_phase_agg); let latest_round: Round = env .rou...
Rust
0
, FAR_EL1", out(reg) address, options(nomem, nostack, preserves_flags)); } address } fn elr() -> u64 { let elr: u64; unsafe { asm!("mrs {}, ELR_EL1", out(reg) elr, options(nomem, nostack, preserves_flags)); } elr } fn try_map_page(thread: Option<&Thread<File>>, fault_address: usize, is...
Rust
0
// }"#, // )?; // assert_eq!(tool_version, expect); Ok(()) } #[test] fn test_tool_version_version() -> Result<()> { let config = config::io::read_config("./tests/test_config_CWL_validated.yml")?; let tool_version = ToolVersion::new(&config, "tes...
Rust
0
orprint(f"\n使用 'python {sys.argv[0]} config --set key=value' 来修改配置", Colors.CYAN) sys.exit(1) # 执行命令 if args.command == 'list-users': export_manager.list_users() elif args.command == 'export': output_dir = args.output or config.get('default_output_dir') export_manag...
Python
1
files_async::readdir_recursive(&proxy) .await .or(Err(zx::Status::INTERNAL))? .into_iter() .map(|val| { let pb = PathBuf::from(val.name); let meta = path.join(&pb).metadata().ok(); (pb, meta) }) .filter_map(|entry| match entry { ...
Rust
0
wrap(); //! assert_eq!(val, 0); //! ``` //! //! A cancelable version of the inner future can be implemented using //! [`abortable`](futures::future::abortable). However keep in mind that on backends like io_uring, //! cancelling the future may not cancel the underlying IO operation. mod blocking; mod enter; mod event;...
Rust
0
from django.db import models from django.conf import settings from django.contrib.auth.models import User class Profile(models.Model): user = models.OneToOneField(settings.AUTH_USER_MODEL) date_of_birth = models.DateField(blank=True, null=True) photo = models.ImageField(upload_to='users/%Y/%m/%d', blank=T...
Python
1
.tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True, enable_thinking=False, ) model_inputs = self.tokenizer([text], return_tensors="pt").to(self.model.device) # conduct text completion generated_ids = self....
Python
1
ex(int_to_f64(int)? + comp)) } (Float(float), Complex(comp)) | (Complex(comp), Float(float)) => Ok(Complex(float + comp)), _ => unimplemented!(), } } /// Subtracts two numbers. /// /// **Panics** if either of the arguments is not a number. fn sub_numbers(lhs: Value, rhs: Value) -> Result<Va...
Rust
0
if mat.try_get(p.left()) == Some(&PASSAGE) { found(name, p.left()); } else if mat.try_get(pright.right()) == Some(&PASSAGE) { found(name, pright.right()); } else { panic!("confused at {:?}", p); } ...
Rust
0
("{}/CoinPresolveTripleton.cpp", COIN_UTILS_SRC)) .file(format!("{}/CoinPresolveUseless.cpp", COIN_UTILS_SRC)) .file(format!("{}/CoinPresolveZeros.cpp", COIN_UTILS_SRC)) .file(format!("{}/CoinRational.cpp", COIN_UTILS_SRC)) .file(format!("{}/CoinSearchTree.cpp", COIN_UTILS_SRC)) ...
Rust
0
list =["shikha","Hauna","Muzam",'01971700130'] total_character=''.join(list) print(f"Number of Character : {len(total_character)}") def count_vowel(string): vowel="aeiouAEIOU" count=0 for char in string: if char in vowel: count+=1 return count num_vowels=count_vowel(total_character) ...
Python
1
__mod_name__ = "Tools" __help__ = """ *Date-time-Weather* •`/time <country code>`*:* Gives information about a timezone. •`/weather <city>` *:* Get weather info in a particular place. •`/wttr moon` : Get the current status of moon •`/wttr <city>` : Advanced weather module, usage same Tagger •`/tagall` : for tag eve...
Python
1
select(room for room in Room if room.owner == session["_id"]) seeds = select(seed for seed in Seed if seed.owner == session["_id"]) return render_template("userContent.html", rooms=rooms, seeds=seeds) @app.route("/disown_seed/<suuid:seed>", methods=["GET"]) def disown_seed(seed): seed = Seed.get(id=seed)...
Python
1
import torch from TTS.api import TTS # Get device device = "cuda" if torch.cuda.is_available() else "cpu" # List available 🐸TTS models # print(TTS().list_models()) # Init TTS tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device) english_file = "poem_english.txt" arabic_file = "poem_arabic.txt" tur...
Python
1
{ reg[*a] /= b.to_val(reg); } Instruction::Mod(a, b) => { reg[*a] %= b.to_val(reg); } Instruction::Eql(a, b) => { reg[*a] = if reg[*a] == b.to_val(reg) { 1 } else { 0 }; } } } } fn reg_idx(reg: char...
Rust
0
use image; use image::{GenericImage, Pixel}; use minifb::{Key}; use rand::{thread_rng, Rng}; use tiles::{Tile, TileGrid}; /// Reads an image from a path into a buffer. /// Panics if the image can't be read for any reason. fn read_image(path: &str) -> Vec<u32> { let img = image::open(path).expect(&format!("Couldn'...
Rust
0
.format("[=> ]"); Some(bar) } else { None }; loop { let n = { let buf = src.fill_buf()?; dest.write_all(&buf)?; buf.len() }; if n == 0 { break; } src.consume(n); if let Some(ref mut bar) = bar { bar.add(n as u64); } } if show_progress { pri...
Rust
0
seq = Sequence::new(); let c_memory_pool_mxbean = jni_type!(jclass); let i_memory_pool_mxbean = jni_type!(jobject); let m_get_usage = jni_type!(jmethodID); jni .expect_get_method() .withf_st(move |&a_class, a_method, a_signature| { ptr::eq(a_clas...
Rust
0
)* _ => Err(E::invalid_value(de::Unexpected::Unsigned(value), &self)), } } } // Deserialize the enum from a u64. deserializer.deserialize_u64(Visitor) } } } } // args0.rs fn ...
Rust
0
import pytest from os2datascanner.projects.admin.adminapp.models.scannerjobs.scanner_helpers import ( ScheduledCheckup) from os2datascanner.engine2.model import http from os2datascanner.engine2.pipeline import messages @pytest.mark.django_db class TestScanStartup: def test_simple_scan_startup(self, web...
Python
1
eq!(results.len(), 2, "{:?}", results); let mut values = results.values().collect::<Vec<_>>(); values.sort(); assert_eq!(serde_json::from_str::<LogEntry>(values.get(0).unwrap()).unwrap(), log); assert_eq!(serde_json::from_str::<LogEntry>(values.get(1).unwrap()).unwrap(), log2); ...
Rust
0
# Wake up queue management thread self._result_queue.put(None) self._start_queue_management_thread() return f submit.__doc__ = _base.Executor.submit.__doc__ def map(self, fn, *iterables, timeout=None, chunksize=1): """Returns an iterator equivalent to map(fn, iter...
Python
1
} #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct BmspoQueryObject { #[serde(rename = "backupManagementType", default, skip_serializing_if = "Option::is_none")] pub backup_management_type: Option<bmspo_query_object::BackupManagementType>, #[serde(rename = "workloadType", default, skip...
Rust
0
from enum import Enum class ParserOSType(Enum): ios = "ios" android = "android"
Python
1
} } _ => None, } } else { None } }) .collect::<Vec<_>>(); info!(name, zone_id, %kind, ?ip_list, "get dns records success"); Ok(ip_list) ...
Rust
0
} } else { break None } }) } fn accum_done(&mut self, dalloc: &mut DA) -> Result<TT, AllocError> { let mut accum = self.accum.take().unwrap_or_else(TT::empty); if let Some(ccss) = &mut self.cur_chunk_src_strm { let chun...
Rust
0
to remove the audio filter. `replace` If True, the audio filter replaces the current audio filter immediately, changing currently playing and queued sounds. If False, the audio filter will be used the next time a sound is played or queued. `duration` The duration to change from...
Python
1
rxwtoe, 28, 28, u8; /// Receiver Wait Timeout Enable rxautr, 29, 29, u8; /// Receiver Auto-Re-Enable autoack, 30, 30, u8; /// Automatic Acknowledgement Enable aackpend, 31, 31, u8; /// Automatic Acknowledgement Pending } 0x06, 0x00, 5, RO, SYS_TIME(sys_time) { /// S...
Rust
0
.push_str("\n}"); return str; } // rust utility functions for jaxrs fn get_java_type(sjtype:&str, is_array:bool) -> String { let mut jtype:&str; if !model::Type::is_basic_type(sjtype) { if is_array { return format!("ArrayList<{}>", sjtype); } else { jtype = sjtype; } } else if sjtype ...
Rust
0
import pandas as pd from scripts.config import BULLISH_SIGNAL, BEARISH_SIGNAL, BULLISH_TREND, BEARISH_TREND, NEUTRAL_TREND, OVERBOUGHT, OVERSOLD, NO_SIGNAL, HIGH_VOLUME, LOW_VOLUME, HIGH_VOLATILITY, LOW_VOLATILITY, INCREASING_VOLATILITY, DECREASING_VOLATILITY, STABLE_VOLATILITY, INCONCLUSIVE def signal_sherif_hilo(df:...
Python
1
()); assert!(id.validate_rule_name("").is_err()); assert!(id.validate_rule_name(" ").is_err()); assert!(id.validate_rule_name("!").is_err()); assert!(id.validate_rule_name("hello world").is_err()); assert!(id.validate_rule_name("hello!").is_err()); assert!(id.validate_ru...
Rust
0
effective_rules}, handwritten::{self, handwritten_rules}, opts::{self, SplitPhase}, scheduler::LoggingData, split_by_syntax, tracking::TrackRewrites, veclang::{DiosRwrite, VecLang}, }; /// Different "phases" of e-graph rule application. #[derive(Hash, PartialEq, Eq)] pub enum Phase { PreCom...
Rust
0
), factor=scheduling_config.get("factor", 1.) ) elif scheduling_config["type"] == "cosine_annealing_with_restart": scheduler = torch.optim.lr_scheduler.CosineAnnealingWarmRestarts( optimizer, T_0=1, T_mult=2, eta_min=scheduling_config.get("min_lr") ) else: ...
Python
1
e_net() res = self.base_net("forward") for ref, actual in zip(res_ref, res): np.testing.assert_allclose(ref, actual, rtol=1e-3, atol=1e-3) def test_prim_backward(self): res_ref = self.base_net() res = self.base_net("backward") for ref, actual in zip(res_ref, res)...
Python
1
import json from json import JSONEncoder from com.pnfsoftware.jeb.client.api import IScript from com.pnfsoftware.jeb.core.units.code.android import IDexUnit class UpdateName(IScript): def __init__(self): self.dexUnit = None self.ctx = None self.mainProject = None def renamePerfect(s...
Python
1
f64{ let num_atoms:usize = atom_level_energy.len(); let mut ulj = 0.0; for aa in 0..num_atoms-1{ for bb in (aa+1)..num_atoms{ if mdenv.num_edges[aa][bb] < 3{ }else{ let ddis = mdenv.dist[aa][bb]+EPSILON; //ToDo c...
Rust
0
mb_ev) = input.next().await { match mb_ev { Err(_) => {} Ok(Event::Key(Key::Tab)) => { fg = !fg; } Ok(Event::Key(Key::Esc)) => { return; } Ok(_) => {} } ...
Rust
0
controls(f"/{i}") gs_handle = server.scene.add_gaussian_splats( f"/{i}/gaussian_splats", centers=splat_data["centers"], rgbs=splat_data["rgbs"], opacities=splat_data["opacities"], covariances=splat_data["covariances"], ) remove_button ...
Python
1
use std::collections::HashMap; /// An implementation of an interface. #[derive(Debug)] pub struct IFaceImpl { pub implementor: Type, pub iface: Instance<ADT>, pub methods: HashMap<SmolStr, MutRc<Function>>, /// Module that the impl block is in. pub module: MutRc<Module>, pub ast: ast::IfaceImp...
Rust
0
"""Fixtures for the Scrape integration.""" from __future__ import annotations from collections.abc import Generator from typing import Any from unittest.mock import AsyncMock, patch import uuid import pytest from homeassistant.components.rest.data import DEFAULT_TIMEOUT from homeassistant.components.rest.schema impo...
Python
1
from os import link from re import T from turtle import bgcolor, color from click import style import flet as ft def main(page: ft.Page): page.window_width = 300.0 page.window_height = 1039.0 page.window_top = 0 page.window_left = 1627.0 page.horizontal_alignment = ft.CrossAxisAlignment.CENTER ...
Python
1
#!/usr/bin/env python3 """ Test Discord Bot Integration Quick test to validate Discord bot functionality with new Drive manager. """ import os import sys import traceback from datetime import datetime # Add parent directory to path sys.path.append(os.path.dirname(os.path.dirname(__file__))) def test_discord_bot_impo...
Python
1
t reg = Register::new_from_debug_string( "register { a: 40, b: 0, c: 9, d: 0, e: 0, f: 160, h: 96, l: 138, pc: 24702, sp: 57331 }", ); mem.borrow_mut().fake_data(24714, 101); mem.borrow_mut().fake_data(24702, 111); let mut cpu = CPU::new(mem, false); cpu.set_reg(reg); cpu.op_0x66(); ...
Rust
0
import random import os import time def choice_word(): words = ['capibara', 'marmota', 'crazydev'] return random.choice(words) def fade_word(word: str): idx_fade = random.choices(range(len(word)), k=int(len(word) * 0.6)) ocult_word = list(word) for i in idx_fade: ocult_word[i] = '_' re...
Python
1
{ use super::*; #[derive(Debug, PartialEq, Eq)] enum Operator { Add, Sub, Mul, Div, Pow } impl Operators for Operator { fn precedence(&self) -> u8 { match *self { Operator::Add => 2, Operator::Sub => 2, Operator::Mul => 3,...
Rust
0
lue(row) == base_value.value(row))?; } else { builder.append_null()?; } } Ok(builder.finish()) }}; } fn array_equals( data_type: &DataType, when_value: ArrayRef, base_value: ArrayRef, ) -> Result<BooleanArray> { match data_type { DataT...
Rust
0
], fit_fn.coeffs[1]) return xhat, fit_fn(xhat), eq elif fit == 'quadratic': xs, ys = _medianify(df, x, y) mb = np.polyfit(xs, ys, 2, **fitparams) fit_fn = np.poly1d(mb) # TODO: make this handle precision correctly... eq = 'f(x) = {:.4f}x^2 + {:.4f}x + {:.4f}'.format...
Python
1
import json import unittest from oaklib import get_adapter from oaklib.implementations import UniprotImplementation from oaklib.interfaces.association_provider_interface import ( AssociationProviderInterface, ) from tests import INPUT_DIR PROTEIN_PATH = INPUT_DIR / "uniprot-P12345.json" # TODO: use mock tests c...
Python
1
0xa662, 0x3762, 0xae, 0x33, 0xbc, 0x7d, 0xfd, 0xd5, 0x38, 0xf4)] interface _DriveNotFoundException(_DriveNotFoundExceptionVtbl): IDispatch(IDispatchVtbl) {}} RIDL!{#[uuid(0xd625afd0, 0x8fd9, 0x3113, 0xa9, 0x00, 0x43, 0x91, 0x2a, 0x54, 0xc4, 0x21)] interface _EndOfStreamException(_EndOfStreamExceptionVtbl): IDispatc...
Rust
0
tStr #get the appropriate dictionary if 'HD1' in hisAtomNames and 'HE2' in hisAtomNames: d = q['HIS+'] elif 'HD1' in hisAtomNames: d = q['HISD'] elif 'HE2' in hisAtomNames: d = q['HIS'] else: msgStr = his.full_name() + ' missing bo...
Python
1
em__(self, index): img_path = self.data_dict[index]["img_path"] segmentation_path = self.data_dict[index]["segmentation_path"] img = to_tensor(np.load(img_path)) # already RGB img = crop_to_aspect_ratio(img, self.aspect_ratio) img = F.interpolate( img.unsqueeze(0),...
Python
1
let (v, o1) = me_5.overflowing_sub(you_5); let (v, o2) = v.overflowing_sub(if carry { 1 } else { 0 }); ret[32] = v; carry = o1 || o2; (U264(ret), carry) } pub fn low_u32(&self) -> u32 { let &Self(ref arr) = self; let (arr, _) = array_refs!(arr, 4, 29); ...
Rust
0
# Read the file and store all lines in list # Reverse list # Write back to file with open('test.txt', 'r') as reader: content = reader.readlines() # [apple, boy, cat, dog, elephant] reversed(content) # {elephant, dog, cat, boy, apple] with open('test.txt', 'w') as writer: for line in reversed(co...
Python
1
azyMOCIter<u64, IntoIter<HpxCell<u64>>>; type MergeMoc = MergeIter<u64, FlatLazyMOCIter<u64, IntoIter<u64>>>; impl OwnedMOC<u64> { pub fn expand(self) -> OrMocIter<u64, LazyMoc, MergeMoc> { let mut ext: Vec<u64> = Vec::with_capacity(10 * self.moc.len()); // constant to be adjusted for HpxCell { depth, has...
Rust
0
ch_bilingual_code(self, english_query: str, chinese_query: str, language: str = None, per_page: int = 30) -> List[Dict]: """同时搜索中英文代码并合并结果""" try: # 搜索英文代码 english_results = await self._search_code( query=english_query, language=language, ...
Python
1
import numpy as np from PuzzleLib.Backend import gpuarray from PuzzleLib.Containers import Sequential from PuzzleLib.Modules import Conv2D, AvgPool2D, BatchNorm2D, Activation, relu, Flatten from PuzzleLib.Cost import BCE def buildNet(): net = Sequential(name="test-net") net.append(Conv2D(1, 2, 3, wscale=1.0, ini...
Python
1
let test_time = "Saturday, July 21, 2018 4:39 PM".to_string(); let mut batch = Batch::new(); batch .add_entry(Entry::from_email(&Email::from_str(TEST_COOL_STR).unwrap()).unwrap()) .unwrap(); batch .add_entry(Entry::from_email(&Email::from_str(TEST_COO...
Rust
0
0x7161); with_parser(&[r"\displaystyle ^a%"], |parser| { assert_eq!( parser.parse_math_list(), vec![ MathListElem::StyleChange(MathStyle::DisplayStyle), MathListElem::Atom(MathAtom::empty_ord().with_superscript( ...
Rust
0
:new(x, y); for (_, (transform , interactive_sprite)) in world .query::<( &mut CompositeTransform, &mut InteractiveSprite, )>() .iter() { if let Some(camera) = hierarchy.entity_by_name("camera") { // Transform point to world space if let Some(w_point) = camera_cache.screen_to_world_space(cam...
Rust
0
# Copyright 2025 The Magenta 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
量送审,1: 自定义送审 :type AuditType: int :param _UserIdRegex: 用户号正则表达式。 符合此正则表达式规则的用户号将被送检。示例:^6.*(表示所有以6开头的用户号将被送检) :type UserIdRegex: list of str :param _RoomIdRegex: 房间号正则表达式。 符合此正则表达式规则的房间号将被送检。示例:^6.*(表示所有以6开头的房间号将被送检) :type RoomIdRegex: list of str :param _UserIdString: 用户...
Python
1
had been previously authorized. :type cache_security_group_name: string :param cache_security_group_name: The name of the cache security group to revoke ingress from. :type ec2_security_group_name: string :param ec2_security_group_name: The name of the Amazon EC2 se...
Python
1
as _, imm7: imm7 as _, }); } if (d & 0xffc00000) == 0x69c00000 { return Some(InstructionKind::LDPSW64LdstpairPre { Rn: Rn as _, Rt: Rt as _, Rt2: Rt2 as _, imm7: imm7 as _, }); } if (d & 0xffc00000) == 0x6d800000 { ...
Rust
0
// Set a page table pointer value we can update as we traverse the table asm.mov(&[Reg(Rdx), Reg(R9)]); // Start a page walk for ii in 0..PAGE_TABLE_LAYOUT.len()-1 { let shift = PAGE_TABLE_LAYOUT[ii] as i64; asm.rol(&[Reg(Rcx), Imm(shift)]); // Mask off bits not used in this tabl...
Rust
0
[RFC3339](https://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) as `ISO-8601`. //! * **decimal** Add support for [rust_decimal](https://crates.io/crates/rust_decimal) `Decimal` type. **By default** //! it is interpreted as `String`. If you wish to change the format you need to override the type. //! Se...
Rust
0
xbb\xaf\xbe\xfd\xae\xf0\xef\xbf\xe8\xc2\x0a\xef\xc0\xfb\x15\ \xbc\xe9\xc1\x08\x03\x18\xb0\x07\x0dG\xacp\xa0\x0cGl\ \xe0\xc3\xd9Zl\xf1\xc4fV\xac\xf1\x82\x18O\x90\xec\ \xc7\x0ds\xbc\xa4\xc7$G\x18\xf2o)\xb7\x5c\xc0\xca\ \x0b\xb8\xec\xb2\xc9\x1f\xa2,3\x87\x18\xdb|3\x874\ \x0f\xa8\xf3\xce8\xcf\xfb3\xd0<\xbbK\xf4\xd1\xe3\x0e...
Python
1
kedirs`. Args: path (str): A URI supported by this PathHandler """ return PathManager.__get_path_handler(path)._mkdirs(path) @staticmethod def rm(path: str) -> None: """ Remove the file (not directory) at the provided URI. Args: path (st...
Python
1
tiplier, &SortDirection::Decreasing) } CorrectionType::Sidak => p_vec .iter() .map(|x| 1. - (1. - x).powf(fsize)) .collect::<Vec<_>>(), CorrectionType::Hommel => hommel(&p_vec), } } // prints array into a nice table, max 5 floats/row fn array_to_string(a:...
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
d2, SIZE_TURRET_INPUT_CARD2}; pub use turret_input_card3::{TurretInputCard3, SIZE_TURRET_INPUT_CARD3}; pub use turret_input_card4::{TurretInputCard4, SIZE_TURRET_INPUT_CARD4}; pub use turret_input_card5::{TurretInputCard5, SIZE_TURRET_INPUT_CARD5}; pub use turret_input_card6::{TurretInputCard6, SIZE_TURRET_INPUT_CARD6}...
Rust
0
ded(path-minus-site).xml pub fn backup_filename(path: &PathInfo) -> String { format!("{}.xml", utf8_percent_encode(&format!("{}", drop_site(&path.path)), NON_ALPHANUMERIC)) //.to_string() } #[cfg(test)] mod tests { use super::*; use repos::RepoType; use chrono::{DateTime, Local}; #[test] fn te...
Rust
0
tobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Call_Reconcile_Task>>( "tasks", Call_Reconcile::get_tasks_for_reflect, Call_Reconcile::mut_tasks_for_reflect, )); ::protobuf::ref...
Rust
0
.set_time(seconds_to_timestamp(start_block_time)); req.set_last_commit_info(env.last_commit_info_signed()); app.begin_block(&req); app.end_block(&RequestEndBlock::new()); app.commit(&RequestCommit::new()); assert_eq!( app.last_state.a...
Rust
0
NVMPROG, _reserved2: [u8; 2usize], #[doc = "0x08 - NVM Configuration Register"] pub nvmconf: NVMCONF, _reserved3: [u8; 62usize], #[doc = "0x48 - Configuration 1 Register"] pub config1: CONFIG1, } #[doc = "NVM Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API...
Rust
0
# extract the neural network module # we do this in a try-except to maintain backwards compatibility. try: # version 2.3 onwards policy_nn = runner.alg.policy except AttributeError: # version 2.2 and below policy_nn = runner.alg.actor_critic # extract the normalizer ...
Python
1
import logging import socket from time import sleep import scaspharness if __name__ == '__main__': scasprunner = scaspharness.ScaspHarness(None) filename = "scasp_knowledge_base/generated_scasp.pl" # get the hostname host = socket.gethostname() port = 5602 # initiate port no above 1024 print...
Python
1
ode = // Set correct orientation for the first site of the second node. if site_event.is_segment() { VB::BeachLineNodeKey::<I, F>::new_2(*site_event.clone().inverse(), site_arc2) } else { VB::BeachLineNodeKey::<I, F>::new_2(site_event, site_arc2) ...
Rust
0
82, &['\u{5ED2}']), (0x2f96f, &['\u{7E02}']), (0x1f33, &['\u{03B9}', '\u{0314}', '\u{0300}']), (0x1f5f, &['\u{03A5}', '\u{0314}', '\u{0342}']), (0x1e67, &['\u{0073}', '\u{030C}', '\u{0307}']), (0x30d9, &['\u{30D8}', '\u{3099}']), (0xf99a, &['\u{9023}']), (0x22ec, &['\u{22B4}', '\u{0338}']), ...
Rust
0
_stars>0 use crate::SimulationParameters; use crate::fdtd::Terminator; pub struct MatchedTerminator { pub inductance: f32, pub capacitance: f32, pub resistance: f32, pub conductance: f32, } impl Terminator for MatchedTerminator { fn next_voltage( &self, last_volt: f32, last_...
Rust
0
, "کیا", "ق ک", "ر ہ", "ا م", "دہ ", " من", " بن", " قو", "ے ج", "یہ ", "ں م", "اشر", "مل ", " دو", "عاش", "قوم", "ر ب", "انی", "وام", "قوا", "اقو", "لیٔ", "دار", " وہ", " و ", " عا", "ی س", "بر ", "علا", "اد ", "ہ م", "و ت", "ر ن", " جس", "ے۔ہ", "ے، ", "انو", " دی", "گی ", "لیم", "ی...
Rust
0
8, operand: Operand::InlineI8(val), } } pub fn ldc_r4(val: f32) -> Instruction { Instruction { opcode: LDC_R4, operand: Operand::ShortInlineR(val), } } pub fn ldc_r8(val: f64) -> Instruction { Instruction { opcode: LDC_R8, operand: Operand::InlineR(val), } } p...
Rust
0
xed\xd3\x8a\x95\xb9B*\ \x22\xb9\xefM\xc5\xa4%-D\x07s\x0e*N\x8b\x8a\ A\xf2\x0fZN\xab\x9a\x12\x1b\x1a\x83&\xa5\x03\xbf\xe9\ M\x09\xc7\xbdAq}\x0d\x8a\x17\x9aM\xad\xd9\x07\xde\ o\xc2\xae1}\x09\xb93\x8d\xc4\xf6\xaev\xfbS\x9e\ \xfaF\xb7\xd2\x8a\xb7\x1f5\xd3}\xc5\xfa\x1e\xe6\xadI\ \x1d\xd6\xbe\x99b\xf66?\xc4\x9d$\x93\xeb\xedW...
Python
1
self.errors.append(SchemaError.SchemaErrorEntry( msg=u"Type '{prefix}' has size of '{value}', less than min limit '{min_}'. Path: '{path}'", path=path, value=nativestr(value) if tt['str'](value) else value, prefix=prefix, ...
Python
1
#! /usr/bin/python import socket,time,string,random,thread m_Vars = { "bufLen" : 1024 * 10, "defaultServerIp" : "192.168.1.100", "defaultServerPort" : 554, "defaultTestUrl" : "rtsp://192.168.1.100/test1.mp4", "defaultUserAgent" : "LibVLC/2.0.3 (LIVE555 Streaming Media v2011.12.23)" } def genmsg_OPTIONS(url,seq,...
Python
1
'True'}), 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'taggit_taggeditem_items'", 'to': u"orm['taggit.Tag']"}), 'tag_category': ('django.db.models.fields.related.Foreign...
Python
1
def __get_s3_client(self, bucket_name: str): if bucket_name not in set([conf.bucket_name for conf in self.s3_configs]): raise InvalidParams( f'bucket name: {bucket_name} not found in s3_configs: {self.s3_configs}' ) if bucket_name not in self._s3_clients_h: ...
Python
1
] ); } #[test] fn verify() { let digest = [ 0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55, ]; ...
Rust
0