text
string
label_name
string
labels
int64
stderr( "\ [WARNING] Target filters `bins`, `tests`, `examples`, `benches` specified, \ but no targets matched. This is a no-op [FINISHED][..] ", ) .run(); } #[cargo_test] fn reserved_windows_target_name() { let p = project() .file( "Cargo.toml", r#" ...
Rust
0
#****************************************# #* *# #* CodinGame.com Solutions by pathosDev *# #* *# #* Puzzle: Defibrillators *# #* Difficulty: Easy *# #* Date solved: 08.11.2018 *# #* ...
Python
1
tate = 7; pub const VkDynamicState_VK_DYNAMIC_STATE_STENCIL_REFERENCE: VkDynamicState = 8; pub const VkDynamicState_VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV: VkDynamicState = 1000087000; pub const VkDynamicState_VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT: VkDynamicState = 1000099000; pub const VkDynamicState_VK_DYNAMIC_STATE...
Rust
0
l, TFXLNetForSequenceClassification, TFXLNetForTokenClassification, TFXLNetForQuestionAnsweringSimple, TF_XLNET_PRETRAINED_MODEL_ARCHIVE_MAP) from .modeling_tf_xlm i...
Python
1
# coding: utf-8 """ Graphiant APIs **To use the APIs:** 1) Login using `/api/v1/auth/login` 2) Copy the value of \"token\" in the response 3) Click the \"Authorize\" button 4) In the \"Value\" text field enter: `Bearer <your token>` 5) Click \"Authorize\" 6) All requests are now authorized. **Toke...
Python
1
!(addr, "bc1qum864wd9nwsc0u9ytkctz6wzrw6g7zdntm7f4e"); } #[test] pub fn test_btc_fork_address_from_str() { let addr = BtcForkAddress::from_str("MR5Hu9zXPX3o9QuYNJGft1VMpRP418QDfW").unwrap(); assert_eq!(addr.network.coin, "LITECOIN"); assert_eq!(addr.network.seg_wit, "P2WPKH"); ...
Rust
0
ssagebox.showerror("Fout bij melding", f"Fout bij weergeven melding: {e}") def update_tree(self): for item in self.tree.get_children(): self.tree.delete(item) for i, watcher_data in enumerate(self.watchers): observer = watcher_data.get("observer") status = "Actie...
Python
1
ut Self) -> Result<()>, ) -> Result<Chunk> { let postfixes_before = self.comments.remove_postfixes_before(byte_offset); let prefixes = self.comments.remove_prefixes_before(byte_offset); let content = self.with_temp_buf(fun)?.w; let postfixes = next_byte_offset .map(|byte_...
Rust
0
_total(&self, categories: &CategoryLookup) -> u32 { let mut total = 0; for (cat, reps) in self.reps_by_category.iter() { if let Some(category) = categories.find(cat) { total += ((*reps as f64) * category.weight) as u32; } else { // default to a we...
Rust
0
## Determinar si una palabra ingresada desde el teclado es un sustantivo propio o no. import string palabra = input("Ingrese una palabra: ") if (palabra[0] in string.ascii_uppercase): print("Es sustantivo propio") else: print("No es sustantivo propio")
Python
1
Some(None) } } struct NullIgnoringSink<'a> { sink: SinkHandle<'a>, } impl<'a> Sink for NullIgnoringSink<'a> { fn atom(&mut self, atom: Atom, state: &DeserializerState) -> Result<(), Error> { match atom { Atom::Null => Ok(()), other => self.sink.atom(other, state), ...
Rust
0
ketch_1/SketchLine_1][Extrusion_1_1_1/To_Face]"): True, model.selection("VERTEX", "[Extrusion_1_1_1/Generated_Face&Sketch_1/SketchCircle_1_2&weak_name_1][Extrusion_1_1_1/Generated_Face&Sketch_1/SketchLine_1][Extrusion_1_1_1/To_Face]"): True, model.selection("VERTEX", "[Extrusion_1_1_1/Generated_Face&Sketch_1/Sk...
Python
1
(0.5, 0.5), aspect: Aspect(1.0), ..Default::default() }) .add_bundle(TextBundle { font, text: Text::new("Ivy"), color: Color::dark_green(), align: Alignment::new(HorizontalAlign::Left, VerticalAlign::Bottom), ..Default:...
Rust
0
''' Compute SAP score using classification algorithms :param factors: factors dataset :param codes: latent codes dataset :param nb_factors: number of factors in the factors dataset :param nb_codes: number of codes in the latent codes dataset ''' # compute accu...
Python
1
e::create(key_path)?; key_file.write_all(key.as_bytes())?; Ok(()) } /// Search for files in `search_directory` that match `file_pattern` and return the last match fn get_last_path(search_directory: impl AsRef<Path>, file_pattern: &str) -> Result<PathBuf, Error> { let pattern = search_directory.as_ref()....
Rust
0
unchecked_signal)?; } pid if pid == -1 => { // "If pid equals -1, then sig is sent to every process for which // the calling process has permission to send signals, except for // process 1 (init), but ... POSIX.1-2001 requires that kill(-1,sig) // send sig...
Rust
0
e = "v1_12", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] fn task_state(&self) -> TaskState { unsafe { from_glib(ffi::gst_pad_get_task_state(self.as_ref().to_glib_none().0)) } } fn has_current_caps(&self) -> bool { unsafe { from_glib(ffi::gst_...
Rust
0
denom: uusd_asset.clone(), }, amount: Uint128::from(100_000_u128), }, Asset { info: AssetInfo::NativeToken { denom: uluna_asset.clone(), }, amount: Uint128::from(100_000_u128), ...
Rust
0
import CodeRefinement.ModelRunner import os import re import logging logger = logging.getLogger(__name__) class CodeRefiner: def __init__(self): MODEL_PATH = "NexusrexDev/CodeGator-Refinement" self.model = CodeRefinement.ModelRunner.ModelRunner(MODEL_PATH) def clean_code(self, code): ...
Python
1
, }; unsafe { longfi_sys::longfi_handle_event(&mut self.c_handle, event_for_c) } } pub fn send(&mut self, buffer: &[u8]) { unsafe { longfi_sys::longfi_send(&mut self.c_handle, buffer.as_ptr(), buffer.len()); } } pub fn send_test(&mut self) { unsafe {...
Rust
0
efghijklmnopqrstuvxyzʻ"; const VIE: &str = "abcdefghijklmnopqrstuvwxyzàáâãèéêìíòóôõùúýăđĩũơưạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ"; const ZUL: &str = "abcdefghijklmnopqrstuvwxyz"; const LATIN_ALPHABETS: &[(Lang, &str)] = &[ (Lang::Afr, AFR), (Lang::Aka, AKA), (Lang::Aze, AZE), (Lang::Cat, C...
Rust
0
# 给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。 # # 你可以假设每种输入只会对应一个答案。但是,数组中同一个元素不能使用两遍。 # # # # 示例: # # 给定 nums = [2, 7, 11, 15], target = 9 # # 因为 nums[0] + nums[1] = 2 + 7 = 9 # 所以返回 [0, 1] # # Related Topics 数组 哈希表 # leetcode submit region begin(Prohibit modification and deletion)...
Python
1
from fastapi import APIRouter, HTTPException, status from dispatch.database.core import DbSession from dispatch.database.service import CommonParameters, search_filter_sort_paginate from dispatch.models import PrimaryKey from .models import ( SourceTypeCreate, SourceTypePagination, SourceTypeRead, So...
Python
1
decoration_similarity = 1.0 else: decoration_similarity = 0.5 # 3.4 房龄相似度 age_similarity = 1.0 if 'age' in target and 'age' in case: age_diff = abs(target['age'] - case['age']) age_similarity = np.exp(-age_diff / 10) # ...
Python
1
ase, Nature, Jagged, Vector1D, Value, Array, Vector1DNull, NatureCategorical, NatureContinuous, AggregatorProperties, ValueProperties, JaggedProperties, DataType, ArrayProperties, ReleaseNode, GroupId, IndexKey, ComponentExpansion, DataframeProperties, PartitionsProperties}; use indexmap::IndexMap; use error_chain::Cha...
Rust
0
ive_system.process_natural_language(message) # Send response with metrics await websocket.send_json({ "type": "cognitive_response", "content": response, "metrics": { "coherence_strength":...
Python
1
#!/usr/bin/env python import logging import argparse from rush_scraper import RushScraper logger = logging.getLogger(__name__) def parse_args(): parser = argparse.ArgumentParser(description='Scrape Rush Limbaugh audio data') subparsers = parser.add_subparsers(help='scrape-related subcommands', ...
Python
1
\":\"20170101010101\"\ },\ \"checksum\":\"checksum\",\ \"manifest\":\"manifest\",\ \"target\":\"x86_64-linux\",\ \"deps\":[{\ \"origin\":\"dep_org\",\ \"name\":\"dep_name\",\ \"version\":\"1.1.1-dep\",\ ...
Rust
0
ype_annotation() -> Test { let (root, storage) = parse_entities("3 * 4 : Int")?; let node_3 = HasValue::new(Prim::I32(3)).at(TEST_FN, 1, 1); let node_mul = SymbolRef::new(path!("*"), path!(TEST_FN)).at(TEST_FN, 1, 3); let node_4 = HasValue::new(Prim::I32(4)).at(TEST_FN, 1, 5); le...
Rust
0
common::flush_only_n(segment_meta, &compaction) as usize; for (col_name, col_meta) in &table_meta.schema.columns { let flush_file = dirs::flush_col_file(dir, compaction_key, col_name); let bytes_result = fs::read(&flush_file).await; if let Err(e) = &bytes_result { if matches!(e.kind(), i...
Rust
0
ctx.with_simulation(|mut sim_ctx| { // TODO: Use separate batch gas limit for query execution. // Decode transaction and verify signature. let tx_size = args .tx .len() .try_into() .map_err(|_| Error::OversizedT...
Rust
0
add_material(obj, shader, input_kwargs=shader_kwargs) if __name__ == "__main__": for i in range(1): bpy.ops.wm.open_mainfile(filepath="dev_scene_fish_nurb.blend") i = 0 for obj in bpy.data.objects: if obj.name.find("Nurb") >= 0: apply( obj, ...
Python
1
tes of the current level feature map. Args: mask (Tensor): Binary mask of a feature map, has shape (bs, H, W). Returns: Tensor: valid ratios [r_w, r_h] of a feature map, has shape (1, 2). """ _, H, W = mask.shape valid_H = torch.sum(~mask[:, :, 0], 1) ...
Python
1
Processing", Prentice-Hall, 1996, ch. 11, "Digital Filter Design" Examples -------- Design and plot notching comb filter at 20 Hz for a signal sampled at 200 Hz, using quality factor Q = 30 >>> from scipy import signal >>> import matplotlib.pyplot as plt >>> import numpy as np >>> fs = 200.0 # Sample freque...
Python
1
} } /// A task to execute as the bottom half of an interrupt handler pub trait BottomHalf { /// Exectute the work for this bottom half fn execute(&mut self); } /// A first in first out queue of `BottomHalf` tasks struct BottomHalfQueue { queue: LinkedList<Box<BottomHalf>>, } impl BottomHalfQueue { //...
Rust
0
_addr constant #[no_mangle] pub static C: u8 = 0; // CHECK: @D = local_unnamed_addr global #[no_mangle] pub static mut D: u8 = 0; mod private { // CHECK: @E = local_unnamed_addr constant #[no_mangle] static E: u8 = 0; // CHECK: @F = local_unnamed_addr global #[no_mangle] static mut F: u8 = 0;...
Rust
0
use super::*; #[test] fn verify_groupentry_output() { assert_eq!( GroupEntry::TypeGroupname { ge: TypeGroupnameEntry { occur: None, name: Identifier::from("entry1"), generic_arg: None, }, span: (0, 0, 0), } .to_string(), "entry1".to_...
Rust
0
&self.previous_channel_id } pub fn counterparty_version(&self) -> &String { &self.counterparty_version } pub fn channel(&self) -> &ChannelEnd { &self.channel } pub fn proofs(&self) -> &Proofs { &self.proofs } } impl Msg for MsgChannelOpenTry { type Validati...
Rust
0
ty, style, vm_definition_location, )?)) } } #[cfg(test)] mod tests { use super::*; #[test] fn memory_style() { let tunables = BaseTunables { static_memory_bound: Pages(2048), static_memory_offset_guard_size: 128, ...
Rust
0
from django.shortcuts import render from django.views.generic import TemplateView class AboutTemplateView(TemplateView): template_name = 'pages/about.html' class RulesTemplateView(TemplateView): template_name = 'pages/rules.html' def permission_denied(request, exception): return render(request, 'pages...
Python
1
SceneNode::LinesNode(ref mut n) => n.update(), SceneNode::SegmentNode(ref mut n) => n.update(), } } } // FIXME: else, the object has been removed! Destroy its graphical representation as // well? } ...
Rust
0
t': '戈馬拉文'}, 'bbk': {'en': 'Babanki'}, 'bbl': {'en': 'Bats'}, 'bbm': {'en': 'Babango'}, 'bbn': {'en': 'Uneapa'}, 'bbo': {'en': 'Northern Bobo Madaré'}, 'bbp': {'en': 'West Central Banda'}, 'bbq': {'en': 'Bamali'}, 'bbr': {'en': 'Girawa'}, 'bbs': {'en': 'Bakpinka'}, 'bbt': {'en': ...
Python
1
] use libfuzzer_sys::fuzz_target; extern crate kiro_editor; use kiro_editor::{Editor, Error, InputSeq, KeySeq, Language, Result}; use std::io::{self, Write}; use std::str; // TODO: Fuzz stdin input struct AllOperations(Vec<InputSeq>); impl AllOperations { fn new() -> Self { let mut ops = vec![ ...
Rust
0
A ind,y"); rla!(self, self.indy()); }, 0x34 => { mnemonic!(pc, "NOP"); nop!(self, self.zpx()); }, 0x35 => { mnemonic!(pc, "AND zp,x"); and!(self, self.zpx()); }, 0x36 => { mnemonic!(pc, "ROL zp,x"); rol!(self, self.zpx()); }, 0x37 => { mnemonic!(pc, "RLA zp,x"); rla!(self, self.zpx()); }, 0x38 =...
Rust
0
from thinc.api import Relu, Softmax, chain, concatenate from thinc.model import Model from thinc.types import Floats2d n_hidden = 32 dropout = 0.2 model1: Model[Floats2d, Floats2d] = chain( Relu(nO=n_hidden, dropout=dropout), Relu(nO=n_hidden, dropout=dropout), Softmax() ) model2: Model[Floats2d, Floats2d] = cha...
Python
1
5$)Nr= dropout1drr?r)rr:s rr@Dropout1d.forwardr!{{5&&$--FFr rCNrDrCr rr r I&PGVGGr r c*\rSrSrSrS\S\4SjrSrg)r vRandomly zero out entire cha...
Python
1
Eliminate service.sh if get_current_uid() != 0 { let sudo_path = match search_path(OsStr::new("sudo")) { Some(path) => path, None => { eprintln!("WhiteBeam: Insufficient privileges for installation of WhiteBeam and no sudo present"); return; ...
Rust
0
from typing import List, Tuple from types import FunctionType from Script.Core import cache_control, game_type, get_text, flow_handle, constant from Script.Design import basement, handle_premise, attr_calculation, map_handle from Script.UI.Moudle import draw from Script.Config import game_config, normal_config import r...
Python
1
f"{len(stats['updated_digit_difference'])} diff chiffres, " f"{len(stats['updated_exact_chars'])} mêmes caractères, " f"{len(stats['errors'])} erreurs") return werkzeug.wrappers.Response( status=200, ...
Python
1
Some(call_boxed_value::<A, W, T>), Some(call_boxed_inverse::<A, W, T>), Some(free_boxed_value::<W>), ) }; self.decode_result(r) } fn remove_function(&mut self, fn_name: &str, n_arg: c_int) -> Result<()> { let c_name = str_to_c...
Rust
0
used_imports)] use spirv_std::num_traits::Float; use crate::{bool::Bool32, ray::Ray}; #[derive(Clone, Copy)] pub struct AABB { pub minimum: Vec3, pub maximum: Vec3, } impl AABB { pub fn hit(&self, ray: &Ray, mut t_min: f32, mut t_max: f32) -> Bool32 { { let inv_d = 1.0 / ray.direction...
Rust
0
() { Ok(x) => match x.subcommand { flags::XtaskCmd::Help(_) => { println!("{}", flags::Xtask::HELP) } flags::XtaskCmd::Bindgen(_) => run_bindgen(), }, Err(e) => println!("Error: {}", e.to_string()), } } use core::any::{Any, TypeId}; use has...
Rust
0
#!/usr/bin/env python3 """ Simple test to show orderbook service is working. """ import asyncio import grpc import orderbook_pb2 import orderbook_pb2_grpc async def test_orderbook_service(): """Test basic orderbook service functionality.""" server_address = "localhost:50051" async with grpc.aio...
Python
1
= "col" or element == "order" or element == "offset" ): if device == "xs": classes.append(f"{element}-{int(size)}") else: classes.append(f"{element}-{device}-{int(size)}") elif size: ...
Python
1
o=reply_to, ) else: await event.client.send_message( chat.id, start_msg, link_preview=False, buttons=buttons, reply_to=reply_to, ) except Exception as e: if BOTLOG: await e...
Python
1
let root_name = file_encryption_service::get_name(config, &current)?; current_path = format!("{}/{}", root_name, current_path); paths.push(current_path.to_string()); } Ok(paths) } pub fn get_path_by_id(config: &Config, id: Uuid) -> Result<String, CoreError> { let mut current_id = i...
Rust
0
for reference metrics retrieval_context=[ context ], # You might need to provide context here based on your setup ) # Evaluate with DeepEval and store results deepeval_metric.measure(deepeval_test_case) return { "metric": deepeval_me...
Python
1
or i in range(n-1): theta1.append(theta1[-1]+Vtheta1[-1]*dt) theta2.append(theta2[-1]+Vtheta2[-1]*dt) Vtheta1.append(Vtheta1[-1]+(-g*(2*m1+m2)*np.sin(theta1[-2])-m2*g*np.sin(theta1[-2]-2*theta2[-2])-2*np.sin(theta1[-2]-theta2[-2])*m2*(((Vtheta2[-1...
Python
1
_: page.go("/"), ), ft.ElevatedButton( text="Ir para App", on_click=lambda _: page.go("/app"), ), ], # serve para um link na app e ele abre a página de ...
Python
1
STD_frameParameters), "::", stringify!(noDictIDFlag) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ZSTD_parameters { pub cParams: ZSTD_compressionParameters, pub fParams: ZSTD_frameParameters, } #[test] fn bindgen_test_layout_ZSTD_parameters() { assert_eq!( ...
Rust
0
<'_> {} pub type SshResult<T> = Result<T, SshError>; impl SshSession { pub fn new() -> Option<SshSession> { let ptr = unsafe { ssh_new() }; if ptr.is_null() { None } else { Some(SshSession { session_ptr: ptr, connected: false, mutex: Mutex::new(()) }) } } fn last_error_unlocked(&self) -> SshError { ...
Rust
0
e): video_segments[out_frame_idx] = { out_obj_id: (out_mask_logits[i] > 0.0).cpu().numpy() for i, out_obj_id in enumerate(out_obj_ids) } # imported from chatgpt to extract mask to csv (I hate myself) ################################################################################ import pandas...
Python
1
self) -> u32 { match self { Resolution::TwelveBit => (1 << 12) - 1, Resolution::TenBit => (1 << 10) - 1, Resolution::EightBit => (1 << 8) - 1, Resolution::SixBit => (1 << 6) - 1, } } } pub struct Vref; impl<T: Instance> AdcPin<T> for Vref {} impl<T: I...
Rust
0
let mut end = start; end.col = size.cols() - 1; rects.push(Self::create_rect(metrics, size, flag, start, end, self.color)); start.col = Column(0); start.line += 1; } rects.push(Self::create_rect(metrics, size, flag, start, self.end, self.col...
Rust
0
elif ptype == "file": pdf_count += 1 file_data = part.get("file", {}) or {} data_url = file_data.get("file_data", "") filename = (file_data.get("filename") or "").lower() if filename.endswith...
Python
1
def insertion_sort(source_array: list) -> list: """ Implementation of the polynomial O(n^2) Insertion Sort algorithm Arguments: source_array - array of integers to be sorted Returns: Contents of array argument """ # Create copy to avoid affecting source array array = source...
Python
1
.comment = Some("Fmmm.".to_string()); } GameResult::Win => { // Don't choose to lose. // 自分が負ける手は選びません。 search_info.result = Some(GameResult::Lose); ...
Rust
0
import streamlit as st from langchain_openai import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate from langchain_core.output_parsers import PydanticOutputParser from langchain_core.pydantic_v1 import BaseModel, Field from typing import List import base64, httpx # Page setting st.set_page_config(lay...
Python
1
256_xor_si256, }; #[cfg(target_arch = "x86_64")] use std::arch::x86_64::{ __m256i, _mm256_and_si256, _mm256_cmpeq_epi8, _mm256_loadu_si256, _mm256_movemask_epi8, _mm256_or_si256, _mm256_set1_epi8, _mm256_xor_si256, }; let mut idx = 0; let zero = _mm256_set1_epi8(0); let lowe...
Rust
0
n('%s/opts.yaml'%dir_name,'w') as fp: yaml.dump(vars(opt), fp, default_flow_style=False) # model to gpu model = model.cuda() if fp16: model, optimizer_ft = amp.initialize(model, optimizer_ft, opt_level = "O1") criterion = nn.CrossEntropyLoss() if opt.moving_avg<1.0: model_test = copy.deepcopy(model) ...
Python
1
"""""" """ Task 16 """ """ Пути решения: 1. Простой рекурсией 2. Для ускорения расчета используется кеширование from functools import lru_cache @lru_cache(None) # None - нет ограничения на кол-во ключей с данными def fn(n): pass # @lru_cache(None) == @cache # @lru_cache(None) # Включает вытеснение старых ...
Python
1
collection("performance_summary"); let cursor = records.find(None, None).await?; // cursor is a stream so it requires try_fold() from TryStreamExt cursor .try_fold( Capacity { total_hosts: 0, read_only: 0, source_chain: 0, }, ...
Rust
0
pe LOCK = crate::Reg<lock::LOCK_SPEC>; #[doc = "This register locks the SECUREAPPROTECT.DISABLE register from being written until next reset."] pub mod lock; #[doc = "DISABLE register accessor: an alias for `Reg<DISABLE_SPEC>`"] pub type DISABLE = crate::Reg<disable::DISABLE_SPEC>; #[doc = "This register disables the S...
Rust
0
pub struct Traceroute { pub length: u32, /// Flags describing traceroute parameters and high-level outcomes. pub flags: Flags, /// Parameter length, included if any flags are set. #[deku(cond = "flags.any()")] pub param_length: Option<u16>, /// List ID assigned by warts, included if flag 1 i...
Rust
0
import os import allure import pytest from pages.login_nemesis_page import LoginPageNemesis from utils.browser_settings.browser_settings import BrowserSettings @pytest.fixture def browser(): browser_settings = BrowserSettings() driver = browser_settings.get_driver() yield driver driver.quit() @py...
Python
1
from django.shortcuts import render from django.contrib.auth.models import User,Group from rest_framework import viewsets from .serializer import MovieSerializer from .models import Movie class MovieViewSet(viewsets.ModelViewSet): queryset = Movie.objects.all() serializer_class = MovieSerializer
Python
1
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2021, Cisco Systems # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = r""" --- module: mnt_session_by_mac_info short_description: Information module for MNT Session By Mac description: - Get MNT Sessio...
Python
1
izes the score if winning state has been reached. /// Subsequent marks after the first winning does not alter the bingo board markings. fn mark(&mut self, call: T) -> Option<T> where T: Hash + Sum, { if self.score.is_none() { if let Some((i, j)) = self.board.mapper.get(&call)...
Rust
0
with( [ 'aws', '--output', 'json', '--region', 'us-east-1', 'redshift', 'create-cluster', '--cluster-identifier', PKB_CLUSTER, '--number-of-nodes', '2', ...
Python
1
/// Its SQL type is `Timestamp`. /// /// (Automatically generated by Diesel.) register_time -> Timestamp, /// The `register_ip` column of the `user_register_log` table. /// /// Its SQL type is `Varchar`. /// /// (Automatically generated by Diesel.)...
Rust
0
itx::Type::Pointer(p) => { let rt = names.runtime_mod(); define_witx_pointer(names, &namedtype.name, quote!(#rt::GuestPtr), p) } witx::Type::ConstPointer(p) => { let rt = names.runtime_mod(); define_witx_pointer(names, &namedtype.na...
Rust
0
import numpy as np from jaxtyping import Bool, Float, Int64 from repeng.evals.logits import eval_logits_by_question, eval_logits_by_row from repeng.evals.types import QuestionsEvalResult, RowsEvalResult from repeng.probes.base import BaseProbe def eval_probe_by_row( probe: BaseProbe, *, activations: Floa...
Python
1
Address Sanitizer, generating 10000 routes") prefix_count = 10000 else: logger.info("Address Sanitizer build, only testing 50 routes") prefix_count = 50 prefix_base = [ ["10.0.0.0/8", "11.0.0.0/8"], ["2100:1111:2220::/44", "2100:3333:4440::/44"], ] # This appar...
Python
1
etime_phantom` ensures that the slice is unaccessible until // `self` goes out of scope. lifetime_phantom: PhantomData<&'arena mut ()>, // Invariant: this pointer points to an allocation, with lifetime 'arena, // of `buf_len` bytes at all times. In other words, it points to the first // byte of the ...
Rust
0
""" Zip module """ import os from zipfile import ZipFile, ZIP_DEFLATED from .compress import Compress class Zip(Compress): """ Zip compression """ def pack(self, path, output): with ZipFile(output, "w", ZIP_DEFLATED) as zfile: for root, _, files in sorted(os.walk(path)): ...
Python
1
-> Result<DateTime<Utc>, XRPLTimeRangeException> { _ripple_check_max(ripple_time, Utc.timestamp(ripple_time + RIPPLE_EPOCH, 0)) } /// Convert from a [`chrono::DateTime`] object to an XRP Ledger /// 'Ripple Epoch' time. /// Used internally. /// /// [`chrono::DateTime`]: mod@chrono::DateTime /// ``` pub(crate) fn d...
Rust
0
from __future__ import print_function, division import torch import numpy as np import BPnP import matplotlib.pyplot as plt import kornia as kn from scipy.io import savemat, loadmat device = 'cuda' cube = loadmat('demo_data/cube.mat') pts3d_gt = torch.tensor(cube['pts3d'], device=device, dtype=torch.float) n = pts3d_...
Python
1
"p1": {str(k): v for k, v in DEFAULT_KEY_MAPPING_P1.items()}, "p2": {str(k): v for k, v in DEFAULT_KEY_MAPPING_P2.items()} } try: with open("key_config.json", "w") as f: json.dump(new_config, f, indent=2) print("�f�t�H���g�ݒ�t�@�C�����쐬���܂��...
Python
1
1P7)L6D 8J4)F5G 8Y6)RQW N8V)M2J ZM7)HDW XG9)3YT 9G6)T53 P7G)38R C9P)9D1 XM5)WBJ FVT)ST3 NX5)YKP 8R2)4SM LCL)8CT WCP)5JM 221)J18 MLP)N6H 18X)K9N 393)GDS 182)Z3Q WMY)WGJ 9JM)QQ6 FZZ)RDD 6YW)CDP 9X7)VGQ PK6)41M 8P3)YD5 9SV)W3L M4N)W67 F7Q)ZRH VCS)P2J QSB)T95 NXW)MG7 SS6)HNS V8G)R4P 2DB)BVL 7DF)WMS 6QS)RGC 9D1)865 54X)JF8 ...
Rust
0
#!/usr/bin/python # -*- coding: UTF-8 -*- import time from common import update_and_send_message_CSGO, update_and_send_message_DOTA2, steam_id_convert_32_to_64 import json from player import PLAYER_LIST, player from DBOper import is_player_stored, insert_info, update_CSGO_match_ID, update_DOTA2_match_ID import CSGO imp...
Python
1
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Date: 2019/10/20 10:21 Desc: 债券配置文件 """ # bond-cov-sina zh_sina_bond_hs_cov_url = "http://vip.stock.finance.sina.com.cn/quotes_service/api/json_v2.php/Market_Center.getHQNodeDataSimple" zh_sina_bond_hs_cov_count_url = "http://vip.stock.finance.sina.com.cn/quotes_service...
Python
1
update_delay.clone(), "--auto-update-delay=[NUM]", "Specify the maximum number of blocks used for randomly delaying updates.", ARG arg_auto_update_check_frequency: (u16) = 20u16, or |c: &Config| c.parity.as_ref()?.auto_update_check_frequency.clone(), "--auto-update-check-frequency=[NUM]", "Specify the n...
Rust
0
_: Checked<not_one> = Checked::<not_two>; let _ = Checked::<generic_arg>; let _ = Checked::<{generic_arg::<usize>}>; let _ = Checked::<{generic_arg::<u32>}>; let _ = Checked::<generic>; let _ = Checked::<{generic::<u16>}>; let _: Checked<{generic::<u16>}> = Checked::<{generic::<u16>}>; le...
Rust
0
#[wasm_bindgen(method, js_name = setUTCFullYear)] pub fn set_utc_full_year_with_month(this: &Date, year: u32, month: i32) -> f64; /// The `setUTCFullYear()` method sets the full year for a specified date according to universal time. /// /// [MDN documentation](https://developer.mozilla.org/en-US/do...
Rust
0
use embedded_time::{duration::Extensions, rate::Extensions as RateExtensions}; use ssd1306::{size::DisplaySize128x64, I2CDisplayInterface, rotation::DisplayRotation, mode::DisplayConfig}; use xiao2040_bsp as bsp; use bsp::{ hal::{ clocks::{init_clocks_and_plls}, pac, timer::Timer, wa...
Rust
0
JUMP_SHIFT; pub const PERF_SAMPLE_BRANCH_CALL: u32 = 1 << PERF_SAMPLE_BRANCH_CALL_SHIFT; pub const PERF_SAMPLE_BRANCH_NO_FLAGS: u32 = 1 << PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT; pub const PERF_SAMPLE_BRANCH_NO_CYCLES: u32 = 1 << PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT; pub const PERF_SAMPLE_BRANCH_TYPE_SAVE: u32 = 1 << PERF_S...
Rust
0
Code { code: isize, modes: Vec<isize>, } impl OpCode { fn from(value: isize) -> OpCode { if value < 100 { OpCode { code: value, modes: Vec::new(), } } else { let tmp = value.to_string(); let mut digits = tmp ...
Rust
0
format(log_format) .log_target(flexi_logger::LogTarget::StdOut) .start()?; let config = GameroomConfigBuilder::default() .with_cli_args(&matches) .build()?; let connection_pool: ConnectionPool = gameroom_database::create_connection_pool(config.database_url())?; // ...
Rust
0
import json import logging import ssl import time import uuid from nostr.event import Event, EventKind from nostr.filter import Filter, Filters from nostr.key import PrivateKey from nostr.message_type import ClientMessageType from nostr.relay_manager import RelayManager from src.utils.payload import PayloadKeys NOS...
Python
1
RateInfoAfterLast = 13, RateInfoMax = 12, } impl NlAttrType for Nl80211RateInfo {} /// nl80211StaBssParam /// /// Enumeration from nl80211/nl80211.h:2542 #[neli_enum(serialized_type = "u16")] pub enum Nl80211StaBssParam { StaBssParamInvalid = 0, StaBssParamCtsProt = 1, StaBssParamShortPreamble = 2, ...
Rust
0