text
string
label_name
string
labels
int64
a_01.aggregate(&a_1); assert_eq!( retrieved, a_01, "retrieved attestation should be aggregated" ); /* * Throw a different attestation data in there and ensure it isn't aggregated */ let mut a_different = a_0.clone(); let diffe...
Rust
0
ance(toolset.tools[0], PplQueryAssistTool) # Verify tags include CORE assert ToolsetTag.CORE in toolset.tags @patch("holmes.plugins.toolsets.opensearch.opensearch_query_assist.os.path.exists") def test_template_file_existence_check(self, mock_exists): """Test behavior when template fil...
Python
1
plt.xticks([x for x in days if x % 2 == 0]) plt.grid(True, which='major', linewidth=0.8, color='#DDDDDD', axis='both') plt.grid(which='minor', color='#EEEEEE', linestyle=':', linewidth=0.5) # plt.title('score curve') plt.legend() plt.xlabel('Day') plt...
Python
1
F3FE': { # 👩🏻‍❤️‍💋‍👩🏾 'en': ':kiss_woman_woman_light_skin_tone_medium-dark_skin_tone:', 'status': fully_qualified, 'E': 13.1, 'de': ':sich_küssendes_paar_frau_frau_helle_hautfarbe,mitteldunkle_hautfarbe:', 'es': ':beso_mujer_mujer_tono_de_piel_claro_tono_de_piel_oscuro_medi...
Python
1
ig_fn.sig.ident.clone(); let orig_fn_string = orig_fn_ident.to_string(); let orig_fn_params = orig_fn.sig.inputs.clone(); let mod_name = format_ident!("_TURBOCHARGER_{}", orig_fn_ident); let store_name = format_ident!("_TURBOCHARGER_STORE_{}", orig_fn_ident); let dispatch = format_ident!("_TURBOCHARGER_DISPATCH_{...
Rust
0
use alloc::string::String; use alloc::vec::Vec; extern crate common; use common::contract_api::pointers::*; use common::contract_api::*; use common::key::Key; #[no_mangle] pub extern "C" fn call() { let mailing_uref = get_uref("mailing").unwrap_or_else(|| revert(100)); let pointer = if let Key::Hash(hash) = m...
Rust
0
import requests def get_tickers(okx_secret=None): url = 'https://api.bitget.com/api/spot/v1/market/tickers' response = requests.get(url) data = response.json()['data'] pairs_prices = {} for i in data: if float(i['usdtVol']) > 5000: # Bitget makes life very easy here by pair ...
Python
1
from typing import Annotated from fastapi import APIRouter, Header, status from askui.chat.api.assistants.dependencies import AssistantServiceDep from askui.chat.api.assistants.models import ( Assistant, AssistantCreateParams, AssistantModifyParams, ) from askui.chat.api.assistants.service import Assistan...
Python
1
de) 链接:https://leetcode-cn.com/problems/determine-if-string-halves-are-alike 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 */ pub fn halves_are_alike(s: String) -> bool { // let table = vec!['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']; let v = "aeiouAEIOU".to_string(); let l = s.len(); let mut res = 0; ...
Rust
0
# src/evaluate.py import sys import json import joblib import pandas as pd from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score from dvclive import Live from sklearn.metrics import confusion_matrix import matplotlib.pyplot as plt def evaluate(model_path, input_csv, output_json): mode...
Python
1
logger.info("Training...") op.PatchSize.setValue(patchSize) op.HaloSize.setValue(haloSize) op.DetectionMethod.setValue("svm") op.NHistogramBins.setValue(binSize) op.TrainingHistograms.setValue(trainHistograms[:, : binSize ...
Python
1
_idx: best_argmax_i, reference_idx: best_argmax_j } } else { debug_assert!(self.i <= self.query.len()); debug_assert!(self.query.len() - self.i < B * L); AlignResult { score: off + D10_buf.get(self.query.len() - self.i + (B - 1 - st...
Rust
0
fn from(columns: &'a [&'a Column]) -> Self { if columns.len() == 1 { ColumnDetail::Simple( columns[0].name.to_owned(), columns[0].specification.sql_type.clone(), ) } else { let compound: Vec<(ColumnName, SqlType)> = columns ...
Rust
0
# # This file is part of the Chemical Data Processing Toolkit # # Copyright (C) Thomas Seidel <thomas.seidel@univie.ac.at> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # versi...
Python
1
write!(f, "Could not load Ruby source {}", source) } ArtichokeError::TooManyArgs { given, max } => write!( f, "Too many args for funcall. Gave {}, but max is {}", given, max ), ArtichokeError::Uninitialized => write!(f, "mrb...
Rust
0
{ match self.entries[free_page_index] { PageFrameDatabaseEntry::Available { next } => { self.free_list_head = next; self.available -= 1; Some(self.page_index_to_physical_address(free_page_index)) } ...
Rust
0
(&format!("parser error on line {} with contents \"{}\": {}", self.line, self.text, self.msg.to_lowercase())) } } #[cfg(feature = "themes")] impl error::Error for ParserError {} <reponame>jorge-aragao-goulart/advent_of_code_2021<filename>src/days/day09.rs use super::{Day09, DaySolution}; impl DaySolution for Day09 ...
Rust
0
32, NisporError> { let err_msg = "wrong index when parsing as u32"; Ok(u32::from_ne_bytes([ *data .get(0) .ok_or_else(|| NisporError::bug(err_msg.into()))?, *data .get(1) .ok_or_else(|| NisporError::bug(err_msg.into()))?, *data ...
Rust
0
deep_gps.DSPPLayer` modules, and can also contain other modules as well. This Module contains an additional set of parameters, `raw_quad_weights`, that represent the mixture weights for the output distribution. """ def __init__(self, num_quad_sites): super().__init__() self.num_qua...
Python
1
_base_ = [ '../_base_/models/pointrend_r50.py', '../_base_/datasets/cityscapes.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py' ] lr_config = dict(warmup='linear', warmup_iters=200)
Python
1
import argparse from bi_encoder.faiss_retriever import search_by_faiss from msmarco_eval import compute_metrics_from_files def get_args(): parser = argparse.ArgumentParser() parser.add_argument("--query_reps_path", type=str, default=None) parser.add_argument("--passage_reps_path", type=str, default=None...
Python
1
hashset::rewindable_kernel_view(&txhashset, |view| view.kernel_data_read()) } /// Writes kernels provided to us (via a kernel data download). /// Currently does not write these to disk and simply deserializes /// the provided data. /// TODO - Write this data to disk and validate the rebuilt kernel MMR. pub fn ke...
Rust
0
_bbo, mean_ranks_mf = get_mean_loss( traj[dataset]) Y_label = 'Loss' else: xs, mean_ranks, mean_ranks_bbo, mean_ranks_mf = get_mean_rank( traj[dataset]) Y_label = 'Mean_rank' if len(family_rank): family_rank += mean_ranks ...
Python
1
arating_count_column['#value#'] = arating_count mi.set_user_metadata(arating_count_col_name, arating_count_column) if grating and grating_col_name: grating_column['#value#'] = grating mi.set_user_metadata(grating_col_name, grating_column) i...
Python
1
t jbmpwcu7fh0 ev3oqhl3fsm >>= hjf55uru2a8 pass return '# kites_gallows_deputies -> wiggles_thicknesses_contempt' def mm43e74dl4w(m_v6a_ev8tv, gs560xrq1_r, s1ja8wxv_ur: trdrxw507of, ww1_93q5biq, b_952vg51th: qn22wddfa2t, xqoxq672fn2, oyvk0rx5ijf: k2nhrysa2hh): False '# kites_gallows_deputies -> w...
Python
1
Severity::Ctritical), "3" | "ERROR" => Ok(LogSeverity::Error), "4" | "WARNING" => Ok(LogSeverity::Warning), "5" | "Notice" => Ok(LogSeverity::Notice), "6" | "INFO" => Ok(LogSeverity::Info), "7" | "DEBUG" => Ok(LogSeverity::Debug), _ => Err(Peripety...
Rust
0
input_value, GraphQLError( "Exactly one key must be specified" f" for OneOf type '{type_.name}'.", ), ) else: key = keys[0] value = coerced_dict[key] ...
Python
1
ocation( timestamp=datetime.now(), allocation_method=multi_agent_allocation.allocation_method, total_portfolio_value=multi_agent_allocation.total_portfolio_value, target_allocations=blended_allocations, risk_metrics=multi_agent_allocation.risk_metrics, ...
Python
1
") print(f"Avg. rank: {avg_rank[idx]}") print(f"Maximum rank: {num_edges_needed_to_cover_sol[idx]}") print(f"Optimality gap: {opt_gaps[idx]}") # Comparison to instances with only one optimal solution print( f"Avg. number of solution edges for instances wi...
Python
1
"""Task and queue management commands.""" from __future__ import annotations import json import typer from ..client import AgentClient from core.role_capabilities import apply_role_capabilities from core.model_context import ModelContext, TaskContext queue_app = typer.Typer(name="queue", help="Queue management") ta...
Python
1
t_arch = "x86_64"))] #[inline(always)] pub unsafe fn __hle_release_compare_exchange_n2(ptr: *mut u16, oldp: *mut u16, newv: u16) -> bool { let res: u8; asm!(".byte 0xf3; lock; cmpxchg %3,%1; setz %2" : "+a"(*oldp), "+m"(*ptr), "=r"(res) : "r"(newv) : "memory" : "volatile"); res == 1 } /// Atomically store (set) the...
Rust
0
(trie.get("lorem").await?.unwrap()); assert_eq!(batch, nodes); Ok(()) } #[async_std::test] async fn batch_delete() -> Result<(), Box<dyn std::error::Error>> { let mut trie = HyperTrie::ram().await?; let nodes = trie .batch_put(vec![ ("hello", b...
Rust
0
argestSuffix(Var(String::from("foo_bar123")), None), ]; let src = "${@%%foo}${*%%foo}${#%%foo}${?%%foo}${-%%foo}${$%%foo}${!%%foo}${0%%foo}${10%%foo}${100%%foo}${foo_bar123%%foo}${@%%}${*%%}${#%%}${?%%}${-%%}${$%%}${!%%}${0%%}${10%%}${100%%}${foo_bar123%%}"; let mut p = make_parser(src); for s in subs...
Rust
0
# License: Apache 2.0. See LICENSE file in root directory. # Copyright(c) 2021 Intel Corporation. All Rights Reserved. import pyrealsense2 as rs from rspy import log, test import sw # The timestamp jumps are closely correlated to the FPS passed to the video streams: # syncer expects frames to arrive every 1000/FPS m...
Python
1
#!/usr/bin/env python3 # SPDX-FileCopyrightText: 2023 Oxhead Alpha # SPDX-License-Identifier: LicenseRef-MIT-OA import os import json from .meta import packages_meta binaries_json_path_suffix = "tests/binaries.json" def update_binaries(binaries, field): binaries_json_path = os.path.join(os.environ["PWD"], binar...
Python
1
import asyncio from app.config import PLATFORMS, RESUME_PATH, JOB_QUERY, JOB_LOCATION, FULL_AUTO from app.llm.resume_tuner import tune_resume from app.platforms import linkedin, naukri, indeed, monster, foundit from app.utils import extract_resume_text # PDF text extraction async def run_auto_apply(): # ---------...
Python
1
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional information regarding # copyright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may not u...
Python
1
<\xa3\x84s\xb5Y\x82s\xd3\ \x86!@\x00\xa9+_'Z\x8c\xd6'\x9a\x8ccZ\ \x83q\x5c\xf7\xf8#\xf6\xb5\xb3n\xfd6\xd5}\xf9\xe2\ 3j\xd8j*\xb5H\xc2\xaaZ-S\x8c\xe5.]\ \xafd\xede\xab\xbe\xf7{\xbb\xfao\x8dF\x85\xab\xb1\ \xb1\xbc\xb0\x82\xea[\x05K\xab-OI\xd4\xa5\xb2\xba\ \xb2r\x04\x8f{\xa5\xdc\x01,\xae\x86X\xd1\xda\xdaY\ |\xb9`&\x19\x92...
Python
1
def generate_key(message, key): key = list(key) if len(message) == len(key): return key else: for i in range(len(message) - len(key)): key.append(message[i]) return ''.join(key) def encrypt(message, key): encrypted_message = [] key = generate_key(message, key) fo...
Python
1
od_return(); { let mut ia = arg::IterAppend::new(&mut mret); (handler)(iface, &mut ia, &mut pinfo)?; } Ok(Some(mret)) })), vec!(), vec!() )); } } pub struct DBusIntrospectable; fn introspect_ann...
Rust
0
{ let a = f64x2::new(-1.0, 5.0); let b = f64x2::new(-100.0, 20.0); let r = sse3::_mm_hsub_pd(a, b); assert_eq!(r, f64x2::new(-6.0, -120.0)); } #[simd_test = "sse3"] unsafe fn _mm_hsub_ps() { let a = f32x4::new(-1.0, 5.0, 0.0, -10.0); let b = f32x4::new(-100....
Rust
0
j] = c2_pos[lag] r = np.zeros(p) for i in range(p): if i + 1 < len(c2_pos): r[i] = c2_pos[i + 1] try: alpha = solve(R, r) except np.linalg.LinAlgError: alpha = lstsq(R, r)[0] a = np.zeros(p + 1) a[0] = 1.0 a[1...
Python
1
_sampler_desc_t; #[doc = ""] #[doc = " @brief Forward-declare ze_physical_mem_desc_t"] pub type ze_physical_mem_desc_t = _ze_physical_mem_desc_t; impl _ze_init_flags_t { #[doc = "< only initialize GPU drivers"] pub const ZE_INIT_FLAG_GPU_ONLY: _ze_init_flags_t = _ze_init_flags_t(1); } impl _ze_init_flags_t { ...
Rust
0
on_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] include!(concat!(env!("OUT_DIR"), "/bindings.rs")); #[cfg(test)] mod tests { use super::*; use std::ffi::{CString, CStr, c_void}; use std::os::raw::{c_char, c_int}; use libloading::library_filename; extern "C" fn con...
Rust
0
t UD2: u16 = 0x0B0F; const TRAP_MASK: u32 = 1 << 8; unsafe extern "system" fn vectored_handler( ep: *mut winnt::EXCEPTION_POINTERS, ) -> winnt::LONG { let cr = &mut *(*ep).ContextRecord; let er = &mut *(*ep).ExceptionRecord; match er.ExceptionCode { minwinbase::EXCEPTION_ILLEGAL_INSTRUCTION =>...
Rust
0
<common_pb::NameOrId>, predicate: Option<common_pb::Expression>, ) -> pb::QueryParams { pb::QueryParams { tables, columns, is_all_columns: true, limit: None, predicate, extra: HashMap::new(), } } } <reponame>jokrey/u...
Rust
0
import os import types import torch import numpy as np from einops import rearrange from .models.NNET import NNET from modules import devices from annotator.annotator_path import models_path import torchvision.transforms as transforms # load model def load_checkpoint(fpath, model): ckpt = torch.load(fpath, map_l...
Python
1
# # A simple example showing the use of the implied listAllMatches=True for # results names with a trailing '*' character. # # This example performs work similar to itertools.groupby, but without # having to sort the input first. # # Copyright 2004-2016, by Paul McGuire # from pyparsing import Word, ZeroOrMore, nums a...
Python
1
name=self.__class__.__name__, arf_config=arf_config, **self.__dict__) def test_arf(): jt.flags.use_cuda=1 import math out_channels = 4 in_channels = 2 nOrientation = 8 nRotation = 8 kernel_size = 3 def get_indices(nOrientation, nRotation, kernel_size, mode='fast'): kernel_indi...
Python
1
abels: # print(f"Debug: Arête ignorée dans to_mermaid (noeud non défini): {from_node} -> {to_node}") continue if safe_edge_label: edge_definitions.append(f" {from_node} -->|{safe_edge_label}| {to_node}") else: edge_definitions.append(f" {from_node} --> {to_n...
Python
1
(node, green, new_errors) = reparser(f.syntax(), &edit).expect("cannot incrementally reparse"); let green_root = node.replace_with(green); let errors = super::merge_errors(f.errors(), new_errors, node, &edit); SourceFileNode::new(green_root, errors) }; ...
Rust
0
y: row.get("easy"), hard: row.get("hard"), } } } <filename>rts/motoko-rts/src/static_checks.rs //! Compile-time assertions to make sure object layouts are as expected use crate::types::*; use core::mem::{align_of, size_of}; // `_` suppresses "unused X" warnings so we don't get any warnings fo...
Rust
0
# Finding the mostDirection maxDirection = max(DirectionCountsInTheInterval, key=DirectionCountsInTheInterval.get) # print(f"Writing: {maxDirection}") # print(f"Classified here is {SC.classifiedAlert}") FBIW.WriteToDisplay(maxDirection, SC.classifie...
Python
1
} } #[test] fn test_logging() { let drain = MyDrain::default(); let logger = Logger::root(drain.clone().fuse(), o!()); set_level(LogLevel::WARN); set_logger(Some(logger)); let mut cluster = Cluster::default(); cluster .set_contact_points("absolute-gibberish.invalid") .unwr...
Rust
0
"""This module defines specific functions for SQLite dialect.""" import re import warnings from geoalchemy2.elements import RasterElement from geoalchemy2.elements import WKBElement from geoalchemy2.elements import WKTElement from geoalchemy2.shape import to_shape def format_geom_type(wkt, default_srid=None): "...
Python
1
ram_size) as u32; //= https://www.rfc-editor.org/rfc/rfc9002#section-7.7 //# A perfectly paced sender spreads packets exactly evenly over time. //# For a window-based congestion controller, such as the one in this //# document, that rate can be computed by averaging the congestion ...
Rust
0
er: {}", e, state.server); }; } 0x03 => { metrics::incr_udp_received_count(&state.server, "PULL_RESP"); metrics::incr_udp_received_bytes(&state.server, "PULL_RESP", size); if let Err(e) = handle_pull_resp(&state, &buffer[..size]) {...
Rust
0
assert_eq!( has_2_or_3("bababc".chars()), Count2And3 { twos: 1, threes: 1 } ); assert_eq!( has_2_or_3("abbcde".chars()), Count2And3 { twos: 1, threes: 0 } ); assert_eq!( has_2_or_3("abcccd".chars()), Count2And3 { twos: 0, threes: 1 } ); assert_e...
Rust
0
ize, 0x09 => self.data.read_u8().unwrap() as usize, 0x0A => self.data.read_u32::<BigEndian>().unwrap() as usize, 0x15 => self.data.read_u64::<BigEndian>().unwrap() as usize, x => panic!("Expected string, found byte {:#04x}", x), }; let mut result = vec![0;...
Rust
0
re): internal_property: str = None @staticmethod @curry def builder(user_provided_argument, w3): middleware = MyMiddleware(w3) middleware.internal_property = user_provided_argument return middleware def request...
Python
1
wrap(); } } use ::std::collections::HashSet; use ::futures::{stream, StreamExt, TryStreamExt}; use ::indexmap::IndexMap; use ::itertools::Itertools; use ::lazy_static::lazy_static; use ::log::debug; use ::regex::Regex; use ::reqwest::Client; use crate::dvb::convert::parse_tag; use crate::dvb::data::Tag; use crate...
Rust
0
at (1,0) let theta = self.end_radians - self.start_radians; let (x0, y0) = ((theta/2.0).cos(), (theta/2.0).sin()); let (x1, y1) = ((4.0-x0)/3.0, ((1.0-x0)*(3.0-x0)/(3.0*y0))); let (x2, y2) = (x1, -y1); let (x3, y3) = (x0, -y0); // Rotate so the curve s...
Rust
0
e you _reasonable_ levels of SIMD just //! from LLVM's auto-vectorizer being pretty good at its job when you give it //! code that it recognizes. //! //! When `packed_simd` eventually makes it into Stable it _might_ make this //! crate obsolete. However, in September of 2019 I asked the `packed_simd` //! folks if there...
Rust
0
orm(g): g = g.local_var() in_deg = g.in_degrees(range(g.number_of_nodes())).float().numpy() norm = 1.0 / in_deg norm[np.isinf(norm)] = 0 return norm def build_graph_from_triplets(num_nodes, num_rels, triplets): """Create a DGL graph. The graph is bidirectional because RGCN authors use reve...
Python
1
Register = ReadWriteRegister { read_address: 0x01, write_address: 0x81, factory_default: 0x03, }; //Configuration 1 Register pub const MASK: ReadWriteRegister = ReadWriteRegister { read_address: 0x02, write_address: 0x82, factory_default: 0xFF, }; //Fault Mask...
Rust
0
locals; mod source; use rustc::hir::map::definitions::DefPathData; use rustc::ty::layout::Size; use horrorshow::{Raw, Template}; use rocket::response::content::Html; use miri::{AllocId, Frame, Pointer}; use crate::step::Breakpoint; use crate::PrirodaContext; pub fn template(pcx: &PrirodaContext, title: String, t:...
Rust
0
class BaseEditCallback: pass class TeacherEditCallback(BaseEditCallback): PREV = "teacher_prev" NEXT = "teacher_next" EDIT_NAME = "teacher_edit_name" EDIT_DESC = "teacher_edit_description" EDIT_PHOTO = "teacher_edit_photo" DELETE = "teacher_delete"
Python
1
(junctions, num_ways) = parser::junction::parse_file(&file, num_threads); let stats = junctions.stats(); timer.msg(format!( "Found {} junctions and {} internal nodes from {} ways", format_num(stats.1), format_num(stats.0), format_num(num_ways), )); // Load node info ...
Rust
0
ssage) -> yew::prelude::ShouldRender { true } fn change(&mut self, _: Self::Properties) -> yew::prelude::ShouldRender { false } fn view(&self) -> yew::prelude::Html { yew::prelude::html! { <svg class=self.props.class.unwrap_or("") ...
Rust
0
command, needs_config=False, needs_dnd_data=False, description='查看今日人品值(随机抽取易经64卦或浅水寺100签)' ), '.dnd': CommandInfo( handler=handle_dnd_command, needs_config=False, needs_dnd_data=True, ...
Python
1
s<ProbT>> { self.records .iter() .map(|x| x.get_cell_records(cell_id).unwrap()) .collect() } } <reponame>planet-s/git2-rs<filename>examples/tag.rs /* * libgit2 "tag" example - shows how to list, create and delete tags * * Written by the libgit2 contributors * * To th...
Rust
0
ould be one reply")) }); reply }); reply.wait().expect("wait for reply") } #[test] fn start() { ::logger::init_log(); let mut io = MetaIoHandler::<()>::default(); io.add_method("say_hello", |_params| { Ok(Value::String("hello".to_string())) }); let server = ServerBuilder::new(io); let _...
Rust
0
import random from OCC.Core.BRepFilletAPI import BRepFilletAPI_MakeChamfer import Utils.shape_factory as shape_factory import Utils.parameters as param from Features.machining_features import MachiningFeature class Chamfer(MachiningFeature): def __init__(self, shape, label_map, min_len, clearance, feat_names, e...
Python
1
import paramiko router_ip = "192.168.1.1" # The IP of the router username = "admin" password = "cisco" # Create SSH client ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) try: ssh.connect(router_ip, username=username, password=password) print("SSH Connection Successful!"...
Python
1
wrap(); assert_eq!( config.get_raw_multi_value("core", None, "a").unwrap(), vec![Cow::Borrowed(b"b"), Cow::Borrowed(b"c"), Cow::Borrowed(b"d")] ); } } #[cfg(test)] mod display { use super::{GitConfig, TryFrom}; #[test] fn can_reconstruct_empty_config() { ...
Rust
0
response.len()); } return return_status; } else{ //println!("Result len = {} > buf size = {}", response.len(), result_max_len); return sgx_status_t::SGX_ERROR_WASM_BUFFER_TOO_SHORT; } } <reponame>rajivshah3/bee // Copyright 2020 <NAME> // ...
Rust
0
ptr.as_ptr() as _, Ordering::Release, Ordering::Relaxed, ) .is_ok() { return; } } unsafe { Arena::release(ptr.as_ptr()) }; } })...
Rust
0
from pwn import * def create_ucontext( src: int, rsp=0, rbx=0, rbp=0, r12=0, r13=0, r14=0, r15=0, rsi=0, rdi=0, rcx=0, r8=0, r9=0, rdx=0, rip=0xDEADBEEF, ) -> bytearray: b = bytearray(0x200) b[0xE0:0xE8] = p64(src) # fldenv ptr b[0x1C0:0x1C8] = p...
Python
1
= get_triples_given_property(pid, entity2meta) num_triples += len(pid2triples[pid]) print(f"[Finish]total triples={num_triples}") print("[Start]save triples") MIN_COUNT = 200 os.makedirs(args.output_dir, exist_ok=True) for pid in pid2triples: triples = pid2triples[pid] if l...
Python
1
_state, arg2: mrb_value) -> mrb_sym; } extern "C" { #[link_name = "\u{1}_mrb_check_intern_cstr"] pub fn mrb_check_intern_cstr( arg1: *mut mrb_state, arg2: *const ::std::os::raw::c_char, ) -> mrb_value; } extern "C" { #[link_name = "\u{1}_mrb_check_intern"] pub fn mrb_check_intern( ...
Rust
0
# 5.- Hacer un programa que muestre todos los numeros entre 2 numeros que diga el usuario # Solicitar al usuario que ingrese los dos números inicio = int(input("Ingrese el primer número: ")) fin = int(input("Ingrese el segundo número: ")) # Verificar cuál número es mayor para establecer el rango adecuado if inicio < ...
Python
1
# .-. .-. .-. . . .-. .-. .-. .-. # |( |- |.| | | |- `-. | `-. # ' ' `-' `-`.`-' `-' `-' ' `-' __title__ = 'requests' __description__ = 'Python HTTP for Humans.' __url__ = 'https://requests.readthedocs.io' __version__ = '2.27.1' __build__ = 0x022701 __author__ = 'Kenneth Reitz' __author_email__ = 'me@kennethrei...
Python
1
import pytest from skimage._shared._geometry import polygon_clip, polygon_area import numpy as np from numpy.testing import assert_equal, assert_almost_equal pytest.importorskip("matplotlib") hand = np.array( [ [1.64516129, 1.16145833], [1.64516129, 1.59375], [1.35080645, 1.921875], ...
Python
1
from .stages_of_purchase import bot from .courses_interaction import bot from .admin_panel import bot
Python
1
; Skip this lane, its value is undef. br label %%test.%(next_i)d """ % dict(subst, i=i, next_i=i + 1) else: print """ test.%(i)d: %%v.%(i)d = extractelement <%(N)d x %(IT)s> %%v.cast, i32 %(i)d %%cmp.%(i)d = icmp ne %(IT)s %%v.%(i)d, %(r)d br i1 %%cmp.%(i)d, label %%die.%(i)d, label %%test.%(next_i)...
Python
1
position * 2.0), _ => (max * (1.0 - (position - 0.5) * 2.0), max), } } <filename>src/sstring.rs<gh_stars>0 // 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...
Rust
0
ment, conversion) temp_dry_k = convert_from_x_to_y_unit(unit, 'K', last_measurement_dry[1]) if temp_wet_k and temp_dry_k: measurements = copy.deepcopy(measurements_dict) psypi = None try: psypi = SI.state( "DBT", temp_dry_k, "...
Python
1
# Generated by Django 5.0.6 on 2024-07-27 10:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('PatientSystem', '0010_alter_admin_users_user_name'), ] operations = [ migrations.AlterField( model_name='admin_users', ...
Python
1
; use std::fmt; use std::iter::Step; use std::num::One; use std::ops::{Range, Index}; use token::TokenWithComments; const OPEN_CHAR: char = '['; const CLOSE_CHAR: char = ']'; const DIVIDER_CHAR: char = '|'; const ESCAPE_CHAR: char = '\\'; const COMMENT_CHAR: char = '#'; const CONTROL_CHARS: [char; 5] = [OPEN_C...
Rust
0
from django.contrib import admin from .models import Branch, Banker, Account, Customer, CustomerAccount, CreditCard @admin.register(Branch) class BranchAdmin(admin.ModelAdmin): list_display = ('branch_id', 'branch_name', 'branch_address', 'assets') search_fields = ('branch_name', 'branch_address') @admin.re...
Python
1
View { status: 1, lot_size: 1, user_lockscript: Default::default(), x_lock_address: Default::default(), signer_lockscript: Default::default(), x_unlock_address: Default::default(), ...
Rust
0
String, #[doc = "Phone extension number of the contact person."] #[serde(rename = "phoneExtension", default, skip_serializing_if = "Option::is_none")] pub phone_extension: Option<String>, #[doc = "Mobile number of the contact person."] #[serde(default, skip_serializing_if = "Option::is_none")] ...
Rust
0
> { type Output = [BytesBundle<W, LOCATION_BYTES>]; fn index(&self, receiver: u16) -> &Self::Output { let receiver = usize::from(receiver); &self.encoded[receiver * self.size.l..(receiver + 1) * self.size.l] } } pub struct IndexColumns<W> { gb: IndexColumn<W>, ev: IndexColumn<W>, }...
Rust
0
) ), min_size=10, )) def test_case_random1( pytestconfig, test_vectors ): run_sim( pytestconfig, __file__, config, test_vectors ) #------------------------------------------------------------------------- # test_case_random2 #------------------------------------------------------------------------- @setti...
Python
1
attributes.color.a as f64, )); window.inner.show_all(); // Initialize message handler let mut init = String::with_capacity(67 + 20 + 20); init.push_str("window.external={invoke:function(x){window.webkit.messageHandlers[\""); init.push_str(&window_hash); init.pus...
Rust
0
back3.rs #![feature(type_alias_impl_trait)] fn main() {} trait T { type Assoc; } type Foo = impl T; //~^ ERROR unconstrained opaque type fn a() -> Foo { // This is not a defining use, it doesn't actually constrain the opaque type. panic!() } <reponame>Techcable/cargo-out #![doc = include_str!("../README...
Rust
0
, 35, 37, 175, 2, 26, 104, 247, 7, 81, 26]); //! key.d(vec![157, 97, 177, 157, 239, 253, 90, 96, 186, 132, 74, 244, 146, 236, 44, 196, 68, 73, 197, 105, 123, 50, 105, 25, 112, 59, 172, 3, 28, 174, 127, 96]); //! key.key_ops(vec![keys::KEY_OPS_SIGN, keys::KEY_OPS_VERIFY]); //! //! // Add key to the cose-sign...
Rust
0
ton_infer = gr.Button("Infer") gen_audio = gr.Audio(label="Audio Gen", type="filepath") check_button_infer.click( fn=infer, inputs=[ cm_project, cm_checkpoint, exp_name, ref_text, ...
Python
1
unwrap(); log::trace!("distribute_handle: remote is {:?}", h); return H::from_handle(h); } Err(zx_status::Status::SHOULD_WAIT) => { continue; } Err(e) => panic!("Unexpected error {:?}", e), ...
Rust
0
]; static I16_CONCEALED: [u8; 20] = [ 0x61, 0x0, 0xc2, 0x37, 0x7, 0x97, 0x33, 0xf, 0xcf, 0xbb, 0x40, 0xcb, 0xad, 0xf7, 0x81, 0x7e, 0x10, 0xd, 0x55, 0xa5, ]; static I32_CONCEALED: [u8; 20] = [ 0xaa, 0xbe, 0x9b, 0x73, 0xf8, 0xfa, 0x84, 0x9d, 0x28, 0x79, 0x8b, 0x5c, 0x13, 0x9...
Rust
0