text string | label_name string | labels int64 |
|---|---|---|
_from: Option<DateTime<Utc>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub valid_to: Option<DateTime<Utc>>,
pub charging_schedule: ChargingSchedule,
}
<reponame>mcarson-sandia/redis-rs<filename>tests/parser.rs
mod support;
#[macro_use]
extern crate quickcheck;
use std::{io, pin::Pin};
use {
... | Rust | 0 |
(width / height)
angle = 180 / math.pi * radian
# 타겟구가 1사분면에 위치
if target_x > whiteBall_x and target_y > whiteBall_y:
radian = math.atan(width / height)
angle = 180 / math.pi * radian
# 타겟구가 4사분면에 위치
elif target_x > whiteBall_x and target_y < whiteBall_y:
radian = math.atan(h... | Python | 1 |
("M_SRM_RP1", 0x194, 4),
("M_SRM_RP2", 0x198, 4),
("M_SRM_RP3", 0x19C, 4),
("M_SRM_RP4", 0x1A0, 4),
("ECC_DATA1", 0x380, 4),
("ECC_DATA2", 0x384, 4),
("MULTI_BIT_ECC_DATA_WRITE", 0x400, 4),
("DBG_MODE", 0x404, 4),
("LA... | Python | 1 |
92", content_apis),
("TC314798", play_apis),
("TC314799", play_apis),
("TC314800", login_apis),
("TC314801", login_apis),
("TC314802", login_apis),
("TC314803", login_apis),
]
created_files = []
for test_case_id, apis in configs:
config_file = con... | Python | 1 |
_imports {
let imp = LtImport {
mod_atom_i: r.read_u32be() as usize,
fun_atom_i: r.read_u32be() as usize,
arity: r.read_u32be() as defs::Arity,
};
self.imports.push(imp);
}
}
/// Read the exports or local functions table (same format).
/// Format is u32/big count { f... | Rust | 0 |
3/23/2016");
profil.analyze("04/27/2016");
profil.analyze("05/02/2016");
profil.analyze("07/16/2015");
profil.analyze("08/20/2015");
profil.analyze("09/17/2015");
profil.analyze("10/01/2014");
profil.analyze("11/25/2014");
profil.analyze("12/31/2018");
... | Rust | 0 |
pt(
&example.nonce,
&example.ad,
&example.ciphertext,
),
_ => panic!("unexpected key size: {}", example.key.len()),
},
"AES-PMAC-SIV" => match example.key.len() {
32 => Aes128PmacSivAead::... | Rust | 0 |
ager.backtest_results:
st.subheader("📚 歷史回測記錄")
with st.expander("查看歷史記錄", expanded=False):
for result_id, result in backtest_manager.backtest_results.items():
col1, col2, col3 = st.columns([2, 1, 1])
with col1:
st.write(f"**{result_id}*... | Python | 1 |
df.iat[key] = 100
native_df = native_df_with_multiindex_columns
snowpark_df = pd.DataFrame(native_df)
eval_snowpark_pandas_result(snowpark_df, native_df, at_set_helper, inplace=True)
@pytest.mark.parametrize(
"key",
[
(0, 0),
(0, -7),
(-7, 0),
(-7, -7),
],... | Python | 1 |
= draw_doubles(number_of_players, number_of_rounds, Some(DrawOption::ValidCompositionsOnly));
assert_eq!(rounds.len(), number_of_rounds);
rounds.iter().for_each(|r| {
assert_eq!(r.matches.len(), ((number_of_players + 3) / 4) - 1);
// ghost player should not be in the games list... | Rust | 0 |
# SPDX-License-Identifier: GPL-2.0-or-later
# ############################################################
# Importing - Same For All Render Layer Tests
# ############################################################
import unittest
import os
import sys
from view_layer_common import *
# ############################... | Python | 1 |
from C2_W2.Eulerian_Path_Problem import EulerianPath
filename = "C://Users\Admin\Desktop\dataset_203_6.txt"
in_put = []
with open(filename, "r") as file:
in_put = file.read().split("\n")
out_put = EulerianPath(in_put)
with open("result.txt", "w") as file:
file.write(out_put)
print(out_put) | Python | 1 |
import pytest
from pandas import (
Period,
PeriodIndex,
Series,
period_range,
)
import pandas._testing as tm
pytestmark = pytest.mark.filterwarnings(
"ignore:Setting a value on a view:FutureWarning"
)
@pytest.mark.parametrize(
"cons",
[
lambda x: PeriodIndex(x),
lambda x:... | Python | 1 |
ion<Bdev<T>> {
self.0.next().map(Self::Item::new)
}
}
impl<T> Default for BdevIter<T>
where
T: spdk_rs::BdevOps,
{
fn default() -> Self {
BdevIter(spdk_rs::Bdev::iter_all())
}
}
impl<T> BdevIter<T>
where
T: spdk_rs::BdevOps,
{
pub fn new() -> Self {
Default::default()
... | Rust | 0 |
"""Reporting utilities for runs.
Generates Markdown reports summarizing detected anomalies. Future phases will
add HTML + rich visualization.
"""
from __future__ import annotations
import json
from pathlib import Path
from typing import Any, Dict, List
import numpy as np
try: # pragma: no cover
import matplotl... | Python | 1 |
signal.signal(signal.SIGINT, shutdown)
# Ask all sensors to release their data.
release_sensor_stream.send(
erdos.WatermarkMessage(erdos.Timestamp(is_top=True)))
for stream in streams_to_send_top_on:
stream.send(erdos.WatermarkMessage(erdos.Timestamp(is_top=True)))
try:
i... | Python | 1 |
import heapq
import sys
input = sys.stdin.readline
T = int(input())
for _ in range(T):
n, m, t = map(int, input().split())
s, g, h = map(int, input().split())
graph = [[] for _ in range(n + 1)]
for _ in range(m):
a, b, d = map(int, input().split())
graph[a].append([b, d])
graph... | Python | 1 |
.step prepare template resource
crowdsource_tempate_dir = os.path.join(dump_dir, 'templates')
if not os.path.exists(crowdsource_tempate_dir):
os.makedirs(crowdsource_tempate_dir)
shutil.copy(os.path.join(static_folder, 'resource', 'templates', 'crowdsource.html'), crowdsource_tempate_dir)
if os.p... | Python | 1 |
: Config> {
fn validate_call(call: &<T as Config>::Call) -> bool;
}
impl<T: Config> ValidateCall<T> for () {
fn validate_call(_: &<T as Config>::Call) -> bool { false }
}
impl<T: Config> ValidateCall<T> for Pallet<T> {
fn validate_call(call: &<T as Config>::Call) -> bool {
let valid_calls = CallIndices::<T>::get... | Rust | 0 |
Spec::PerRowMax(m) => per_row!(ab, m, |a, b| if a > b { a } else { b }),
FusedKerSpec::PerRowAdd(m) => per_row!(ab, m, |a, b| a + b),
FusedKerSpec::PerRowSub(m) => per_row!(ab, m, |a, b| a - b),
FusedKerSpec::PerRowSubF(m) => per_row!(ab, m, |a, b| b - a),
... | Rust | 0 |
d'] == series_id]
horizon = M4Info[group].horizon
# --- 数据分割与准备 ---
train_series = time_series_df['y'].values[:-horizon]
test_series_truth = time_series_df['y'].values[-horizon:]
print(f"已加载序列 '{series_id}',训练集长度: {len(train_series)}, 预测步长: {len(test_series_truth)}")
# --- 数据标准化 ... | Python | 1 |
import cv2 as cv
def detect_faces_and_eyes():
"""
Detects faces and eyes in real-time using the webcam.
Press 'q' to exit the program.
"""
# Load the pre-trained classifiers for face and eye detection
face_cascade = cv.CascadeClassifier(r"..\libs\haarcascade_frontalface_default.xml")
eye_... | Python | 1 |
use log::LevelFilter;
use env_logger::Builder;
use mdbook::utils;
pub mod build;
pub mod clean;
pub mod init;
pub mod test;
#[cfg(feature = "serve")]
pub mod serve;
#[cfg(feature = "watch")]
pub mod watch;
const NAME: &'static str = "mdbook";
fn main() {
init_logger();
// Create a list of valid arguments a... | Rust | 0 |
/fonts/text-rendering-tests/NotoSerifKannada-Regular.ttf",
"\u{0CB2}\u{0CBF}",
"--ned --remove-default-ignorables",
),
"knLI"
);
}
#[test]
fn shknda_1_026() {
assert_eq!(
shape(
"tests/fonts/text-rendering-tests/NotoSerifKannada-Regular.ttf",
... | Rust | 0 |
n_info);
log::trace!("Created buffer: {:?}", vk_buffer);
Ok(Self {
allocator: AllocatorHandle::clone(allocator),
vk_buffer,
allocation,
size,
is_mapped: false,
})
}
fn with_data(
allocator: &AllocatorHandle,
da... | Rust | 0 |
import datetime
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.urls import reverse
class SessionError(Exception):
pass
def save_session_data(session, key, data):
"""
Save data to session, then return a timestamp. This timestamp should be
sent to the ser... | Python | 1 |
g,
pub reap: *mut alloc_chain,
}
#[repr(C)]
pub struct alloc_chain {
pub ptr: *mut c_void,
pub next: *mut alloc_chain,
}
#[repr(C)]
pub struct vorbis_comment {
pub user_comments: *mut *mut c_char,
pub comment_lengths: *mut c_int,
pub comments: c_int,
pub vendor: *mut c_char,
}
#[repr(C)]
... | Rust | 0 |
import random
karakterler = "+-/*!&$#?=@abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
parolaUzunlugu = int(input("parolanın uzunluğu ne kadar olsun= "))
parola = ""
for i in range(parolaUzunlugu):
parola=parola+random.choice(karakterler)
print("parolanız: ", parola)
| Python | 1 |
import os
import time
import itertools
import tensorflow as tf
import udc_model
import udc_hparams
import udc_metrics
import udc_inputs
from models.dual_encoder import dual_encoder_model
tf.flags.DEFINE_string("input_dir", "./data", "Directory containing input data files 'train.tfrecords' and 'validation.tfrecords'")
... | Python | 1 |
utput, write expanded unittest
### module test
if __name__ == '__main__':
def dumpCfg(cfg):
print('\n', cfg, '\n')
for key in cfg:
sections = cfg[key].sections()
print(key)
print(sections)
for section in sections:
options = cfg[key].opt... | Python | 1 |
: &str,
) -> Result<UserRes, Status> {
let mut client = self.user_client_connect().await?;
let mut request = Request::new(req.clone());
let context = Span::current().context();
opentelemetry::global::get_text_map_propagator(|propagator| {
propagator.inject_context(&contex... | Rust | 0 |
egory) is not list and category in category_convert_dict:
category=category_convert_dict[category]
elif type(category) is list:
category=[category_convert_dict[cat] if cat in category_convert_dict else cat for cat in category]
(pred,classes) =inference(model, aug, input_image, vocab, label_list... | Python | 1 |
))
}
match *self {
Segment::Text(ref s) => {
write!(f, "text: {:?}", s)?;
}
Segment::Expr(ref expr) => {
write!(f, "expr: {}", expr)?;
}
Segment::Label { ref id, ref body } => {
write!(f, "{{{{:{... | Rust | 0 |
ardProgram, card_program, path=["response"])
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncLithic) -> None:
async with async_client.card_programs.with_streaming_response.retrieve(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
) as response:
a... | Python | 1 |
proposal_target(rois, gt_boxes) # 输入的rois为2000×4, 经过筛选之后,输出为256×4
# rois, rois_label, rois_target, rois_inside_ws, rois_outside_ws = roi_data # rcnn部分就是一个分类器和一个回归器
rois = roi_data
# rois_label = Variable(rois_label.view(-1).long())
# rois_target = Variable(rois_target.... | Python | 1 |
{
HttpResponse::Ok().body("'Site' site is up.")
}
pub async fn index_action() -> impl Responder {
HttpResponse::Ok().body("'site/index' action.")
}
<filename>src/raft/state_machine/configs.rs
use crate::raft::state_machine::callback::server::Subscriptions;
use crate::raft::state_machine::callback::SubKey;
use cra... | Rust | 0 |
le": "zh_CN_#Hans",
# 设备信息
"wm": "2468_1001",
"ua": "google-Pixel 2 XL_11_WeiboIntlAndroid_6460",
"aid": self.aid,
}
resp = requests.request(
method="post",
url="https://api.weibo.cn/2/account/login_sendcode",
headers=he... | Python | 1 |
#!/usr/bin/env python3
"""Module that demonstrates Multiple Inheritance."""
class Fish:
"""Class representing a fish with swimming and habitat behaviors."""
def swim(self):
"""Print a message indicating the fish is swimming."""
print("The fish is swimming")
def habitat(self):
"""... | Python | 1 |
ListReaders(hContext: SCARDCONTEXT, mszGroups: LPCSTR, mszReaders: LPSTR, pcchReaders: LPDWORD) -> LONG;
pub fn SCardFreeMemory(hContext: SCARDCONTEXT, pvMem: LPCVOID) -> LONG;
pub fn SCardCancel(hContext: SCARDCONTEXT) -> LONG;
pub fn SCardGetAttrib(hCard: SCARDHANDLE, dwAttrId: DWORD, pbAttr: LPBYTE, pcbA... | Rust | 0 |
from_char('s'):
keep_going = False
# the main function: just call the helper, while parsing the serial port path.
if __name__ == '__main__':
# init ROS stuff
rospy.init_node('tensegrity')
control_pub = rospy.Publisher('control_msg',TensegrityStamped,queue_size=100)
# strain_pub = ... | Python | 1 |
-flash-preview", # for AI studio key
name="video_streaming_agent",
instruction="""
You are a monitoring agent. You can do video monitoring and stock price monitoring
using the provided tools/functions.
When users want to monitor a video stream,
You can use monitor_video_stream function ... | Python | 1 |
1 => (texture_view, None),
_ => (&pipeline.msaa_texture.as_ref().unwrap().view, Some(texture_view)),
};
wgpu::RenderPassColorAttachment { view, resolve_target, ops }
}
}
fn render_pass_descriptor<'a>(color_attachments: &'a [wgpu::RenderPassColorAttachment]) -> wgpu::RenderPassDescrip... | Rust | 0 |
parse, b/c there is no terminal char
/// retuns the name of the Zone, i.e. the `example.com` of `www.example.com.`
pub fn get_zone(&self) -> ProtoResult<Name> {
Name::parse(&self.zone, Some(&Name::new()))
}
/// the type of the zone
pub fn get_zone_type(&self) -> ZoneType {
self.zon... | Rust | 0 |
_doc(instance):
doc_instance = doc(related_instance_to_ignore=instance)
try:
related = doc_instance.get_instances_from_related(instance)
except ObjectDoesNotExist:
related = None
if related is not None:
doc_instance.update(... | Python | 1 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "ipetrash"
# SOURCE: https://github.com/martinblech/xmltodict#namespace-support
import json
# pip install xmltodict
import xmltodict
# By default, xmltodict does no XML namespace processing (it just treats namespace declarations as regular
# node attri... | Python | 1 |
from typing import Tuple
import numpy as np
from ..base import LinkFunction
from ..robust_math import SMALL_NUMBER, robust_exp, robust_log
class Log(LinkFunction):
"""
The log-link function.
The log-link function is defined as \(g(x) = \log(x)\).
"""
link_support = (np.nextafter(0, 1), np.inf)... | Python | 1 |
}
AscDescError::ReservedKeyword { name } if name.starts_with("_geoRadius") => {
SortError::ReservedNameForFilter { name: String::from("_geoRadius") }
}
AscDescError::ReservedKeyword { name } => SortError::ReservedName { name },
}
}
}
impl fmt::Display fo... | Rust | 0 |
:core::clone::Clone for WS_NETPIPE_URL {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
#[doc = "*Required features: `\"Win32_Networking_WindowsWebServices\"`*"]
pub struct WS_NETTCP_URL {
pub url: WS_URL,
pub host: WS_STRING,
pub port: u16,
pub portAsString: WS_STRING,
pub path: WS_... | Rust | 0 |
import subprocess
import os
import sys
import shutil
# Определяем пути к файлам
db_checker_script = os.path.join(os.getcwd(), 'dbchecker.py')
bot_script = os.path.join(os.getcwd(), 'cryptogamers.py')
webhook_script = os.path.join(os.getcwd(), 'webhook.py')
messages_file = os.path.join(os.getcwd(), 'messages.json')
# ... | Python | 1 |
field `ICEDGE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ICEDGER {
#[doc = "Rising edges detected"]
RISING,
#[doc = "Falling edges detected"]
FALLING,
#[doc = "Both edges detected"]
BOTH,
#[doc = "No edge detection, signal is left as it is"]
NONE,
}
impl ICEDGER {
#[doc = ... | Rust | 0 |
,
META_CHAN_PREFIX => {
iter.read_expect(LEN_META_CHAN_PREFIX).context(io!())?;
Ok(MetaEvent::MidiChannelPrefix(Channel::new(
iter.read_or_die().context(io!())?,
)))
}
META_END_OF_TRACK => Ok(MetaEvent::parse_end_of_... | Rust | 0 |
import requests
from lxml import html
from urllib.parse import urljoin
import json
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import Ti... | Python | 1 |
ze = 20, loc = "lower left", ncol = 2)
ax2.set(xlabel = r"\textbf{$x_{\rm B}$}")
ax2.set_ylabel(r"\textbf{HOPPET / APFEL++}", fontsize = 16)
ax2.set_xlim([0.00001, 1])
ax2.set_ylim([0.99995, 1.00005])
ax2.set_xscale("log")
ax2.plot(pdfs[0:nd:,0], pdfs[0:nd:,24] / pdfs[0:nd:,24], color = "black", lw = 1, ls = "--")
for... | Python | 1 |
prize,r=map(int,input().split())
shovel=1
while True:
if (prize *shovel)%10==0 or (prize *shovel)%10==r:
break
else:
shovel+=1
print(shovel)
| Python | 1 |
from django.urls import path
from . import views
urlpatterns = [
path('', views.contact, name='contact'),
path('contact_success/', views.contact_success, name='contact_success'),
]
| Python | 1 |
=> (ind, binop(&N::zero(), val)),
Both((ind, lval, rval)) => (ind, binop(lval, rval)),
};
res.append(ind, binop_val);
}
Ok(res)
}
fn csvec_fix_zeros<N, I: SpIndex>(lhs: &mut CsVecViewI<N, I>, rhs: &mut CsVecViewI<N, I>) {
if rhs.dim() == 0 {
rhs.dim = lhs.dim;
}
... | Rust | 0 |
import numpy as np
from skopt import Optimizer
from skopt.learning import GaussianProcessRegressor
from skopt.learning.gaussian_process.kernels import Matern
from skopt.space import Real, Integer, Categorical
import pandas as pd
import glob
import pickle
import os
### Script to run the hyperparameter search for RNN-... | Python | 1 |
selected_neurons == None:
selected_neurons = list(np.arange(X_test.shape[1]))
probe.test_features = torch.tensor(X_test).to(probe.device)
probe.test_labels = torch.tensor(y_test).to(probe.device).long()
probe.feature_sets["test"] = probe.test_features
probe.label_sets["test"] = probe.test_label... | Python | 1 |
;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) as u8
};
AGC_DOWN_BBA_STEP_SZR { bits }
}
#[doc = "Bits 12:15 - AGC_DOWN_LNA_STEP_SZ"]
#[inline]
pub fn agc_down_lna_step_sz(&self) -> AGC_DOWN_LNA_STEP_SZR {
let bits = {
const MASK... | Rust | 0 |
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | Python | 1 |
/s59562049.txt
's52674888': [145, 296], # files/p19/p19381919/s52674888.txt
's55258338': [192, 568], # files/p13/p13719117/s55258338.txt
's59330497': [140, 655], # files/p15/p15479218/s59330497.txt
's52119491': [179, 454], # files/p17/p17959278/s52119491.txt
# below have no f... | Python | 1 |
o_use]
extern crate serde_derive;
extern crate toml;
extern crate image;
extern crate rand;
extern crate rayon;
mod util;
mod color;
mod frame;
mod vec3;
mod ray;
mod shader;
mod camera;
mod geo;
mod scene;
mod material;
mod scenes;
mod config;
mod aabb;
mod texture;
mod noise;
use std::fs::File;
use std::io::Write;... | Rust | 0 |
lt(),
subsoundindex: Default::default(),
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FMOD_STUDIO_COMMAND_INFO {
pub commandname: *const c_char,
pub parentcommandindex: c_int,
pub framenumber: c_int,
pub frametime: c_float,
pub instancetype: FMOD_STUDIO_INSTANCE... | Rust | 0 |
file_content: str,
line_number: int,
column: Optional[int] = None,
cursor_tag: Optional[str] = "<cursor>",
) -> str:
"""Show a line and cursor position in a file.
Args:
file_content (str): The content of the file.
line_number (int): The line number (1-indexed).
column (Op... | Python | 1 |
r_map.add_child(pcfg_dma_header_rf)
# Pcfg broadcast mux ctrl
pcfg_broadcast_mux_r = Reg("pcfg_broadcast_mux")
west_f = Field("west", 2)
east_f = Field("east", 2)
south_f = Field("south", 2)
pcfg_broadcast_mux_r.add_children([west_f, east_f, south_f])
addr_map.add_child(pcfg_broadcast_mux_r... | Python | 1 |
# -*- coding: utf-8 -*-
"""
@Project :project_chatglm
@File :chatglm.py
@Author :ys
@Time :2023/11/10 18:55
"""
from flask import request, jsonify
from loguru import logger
from . import app
from tasks.main import Test
from tasks.chat import Chat
from instance.config import configs
from task... | Python | 1 |
from collections.abc import Callable
from functools import wraps
from typing import Any
try: # Optional dependency boundary
from flask import jsonify, request # type: ignore[import-not-found]
except Exception: # pragma: no cover
jsonify = None # type: ignore
request = None # type: ignore
from ..core.... | Python | 1 |
TI_EVENT_FRAME_POP = 61,
JVMTI_EVENT_BREAKPOINT = 62,
JVMTI_EVENT_FIELD_ACCESS = 63,
JVMTI_EVENT_FIELD_MODIFICATION = 64,
JVMTI_EVENT_METHOD_ENTRY = 65,
JVMTI_EVENT_METHOD_EXIT = 66,
JVMTI_EVENT_NATIVE_METHOD_BIND = 67,
JVMTI_EVENT_COMPILED_METHOD_LOAD = 68,
JVMTI_EVENT_COMPILED_METHOD_U... | Rust | 0 |
a reference to avoid garbage collection
return clear_btn
def load_login_data():
if login_info.exists():
with open(login_info, 'rb') as f:
return pickle.load(f)
return {}
window = initialize_window()
canvas = setup_canvas(window)
login_data = load_log... | Python | 1 |
from fastapi import APIRouter, HTTPException, Depends
from sqlalchemy.orm import Session
from app.core.database import get_db
from typing import List, Dict, Any
from pydantic import BaseModel
from agent.tools.written_test_generation_tool import generate_written_test_questions
from app.models.job import JobPost # 실제 공고... | Python | 1 |
if sub_walks_count > 0 {
debug!("copying {} walks", sub_walks_count)
}
}
let mut maybe_guesser = if opts.guess_ranges {
Some(view::SegmentRangeGuesser::new(
&txn,
"WHERE segment_id IN temp.sub_segments",
)?)
} else {
None
};
... | Rust | 0 |
# coding=utf-8
# Copyright 2025 The Google Research 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 applicab... | Python | 1 |
argument.
In MAMBA compiler this is also used to pass variables to functions."## & ""
RUN_TAPE & 0x19 & (thread: int, tape: int, argument: int, argument: int) & barrier & r##"RUN\_TAPE i j k n \newline
In thread i start tape k with argument... | Rust | 0 |
r<PREPARE_PAYMENT_SIMPLE_SIZE>;
/// Emit details buffer
pub type EmitDetails = Buffer<EMIT_DETAILS_SIZE>;
/// Currency code buffer
pub type CurrencyCode = Buffer<CURRENCY_CODE_SIZE>;
/// Transaction type
#[allow(missing_docs)]
#[derive(Clone, Copy)]
#[repr(u32)]
pub enum TxnType {
Payment = _c::ttPAYMENT,
Escr... | Rust | 0 |
instructions.get(computer.instruction_pointer as usize) {
if computer.detect_loop() {
return Err(computer.accumulator);
}
computer.step(instruction);
}
Ok(computer.accumulator)
}
fn step(&mut self, instruction: &Instruction) {
self.tra... | Rust | 0 |
256_unpackhi_ps(src_fc, src_lf),
_mm256_unpackhi_ps(src_sl, src_sr),
_mm256_unpackhi_ps(src_bl, src_br),
dst_base.offset(1),
);
src_fl_base = src_fl_base.offset(8);
src_fr_base = src_fr_base.offset(8);
src_fc_base = src_fc_base.offset(8);
src_... | Rust | 0 |
::messages::batch::BatchHeader;
use sawtooth_sdk::messages::batch::BatchList;
use sawtooth_sdk::messages::transaction::Transaction;
use sawtooth_sdk::messages::transaction::TransactionHeader;
use sawtooth_sdk::signing::Signer;
use crate::error::CliError;
/// The Sawtooth Sabre transaction family name (sabre)
const SA... | Rust | 0 |
from .materialize import get_vla_dataset_and_collator
| Python | 1 |
+ [1] * len(true_choice_history_list))
print(sum(y), len(y))
model.fit(X, y)
y_pred = model.predict(X)
print("Accuracy:", accuracy_score(y, y_pred))
print("\nClassification Report:\n", classification_report(y, y_pred))
if path_to_save is not None:
os.makedi... | Python | 1 |
ass(hass)
assert not await hass.config_entries.async_setup(entry.entry_id)
async def test_bluetooth_is_set_from_discovery(
hass: HomeAssistant,
mock_config_entry: MockConfigEntry,
mock_lamarzocco: MagicMock,
) -> None:
"""Check we can fill a device from discovery info."""
service_info = get_... | Python | 1 |
Bit {
// Populate table with all 4 bit combinations of XOR
pub fn new() -> Self {
// Define the bi-variate function for constructing the table using XOR
let func = |a: usize, b: usize| -> Fr {
let result = a ^ b;
Fr::from(result as u128)
};
let xor_bit_ta... | Rust | 0 |
import re
from setuptools import setup, Extension
with open("README.md", "rb") as f:
long_descr = f.read().decode("utf-8")
setup(
license="GPLv3",
name="blobbackup",
version="1.0.0.beta3",
author="Bimba Shrestha",
packages=["blobbackup"],
include_package_data=True,
long_description=lo... | Python | 1 |
sums_grad[node],
sums_hessian[node],
params,
)
};
// First pass: we loop over all the bins left to right.
let (best_gain, best_bin) = compute_gain(0, n_bins);
// Short path if there is no NAN
if n_... | Rust | 0 |
= " as the scratchpad buffers are not used concurrently by two primitive"]
#[doc = " executions."]
dnnl_scratchpad_mode_user = 1,
}
#[doc = " @struct dnnl_primitive_attr"]
#[doc = " @brief An opaque structure for primitive descriptor attributes."]
#[doc = ""]
#[doc = " Attributes may contain:"]
#[doc = " - out... | Rust | 0 |
wrap().usize();
MakeTerminalAccessorFn {
name,
id,
}
}
Instruction::MakeTerminalAccessorStruct { number } => {
Concat(number);
MakeTerminalAccessorStruct();
... | Rust | 0 |
output_file = output_prefix / "best_set.bcf"
else:
output_file = output_prefix / "best_set.bcf"
with pysam.VariantFile(
str(output_file), out_mode, header=header
) as outvcf:
for rec in invcf.f... | Python | 1 |
\nDownload file in "
f"{directory} not found. Skipping...\n")
continue
if time.time() - start_time > max_wait_time:
print(f"\nMax wait time reached. "
f"Download not completed in {directory}.\n")
return False, None
time.sl... | Python | 1 |
return {
"nodelist": nodes,
"username": user,
"password": passwd,
"database": dbase,
"collection": collection,
"options": options,
"fqdn": fqdn,
}
def _parse_kms_tls_options(kms_tls_options: Optional[Mapping[str, Any]]) -> dict[str, SSLContext]:
"""Parse... | Python | 1 |
mut stream::iter(0..cfg.repeat_count)
.for_each_concurrent(cfg.max_concurrency, apply_timeout!(cfg, test)),
)
}
}
}
impl MultithreadedTestResult for () {
fn run<F: 'static + Send + Fn(usize) -> Fut, Fut: 'static + Send + Future<Output = Self>>(
executor: &mut cra... | Rust | 0 |
overlay(&mut bg, &i, 0, 0);
}
image::imageops::overlay(&mut bg, &text_image, 0, 0);
}
Ok(bg)
}
use std::borrow::Cow;
use chrono::{DateTime, Utc};
use serenity::builder::CreateEmbed;
use super::prelude::*;
use utility::config::HoloBranch;
interaction_setup! {
name = "upcoming",
grou... | Rust | 0 |
h component_index {
Some(k) => Ok(self.sum_minus_component(k)),
None => match &self.sum {
Some(s) => Ok((*s).clone()),
None => Err("component sum is None".to_string()),
},
}
}
fn get_sum_minus_component_filepath(
file_prefix: &... | Rust | 0 |
eset.
#[no_mangle]
pub unsafe fn reset_handler() {
// Loads relocations and clears BSS
nrf52832::init();
// Create capabilities that the board needs to call certain protected kernel
// functions.
let process_management_capability =
create_capability!(capabilities::ProcessManagementCapabilit... | Rust | 0 |
(3, 4), (1, 4)]);
for b in B {
employees.entry(b).and_modify(|e| *e += 1).or_insert(1);
}
format!("{:?}", employees)
}
// ここから上を提出してください
// 以下テストコード
#[cfg(test)]
mod test {
use crate::solve;
macro_rules! test {
($($input:expr => $output:expr),* $(,)*) => {
#[test]
... | Rust | 0 |
s) supplied. See @ref ble_gap_scan_params_t."]
#[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED Unsupported parameters supplied. See @ref ble_gap_scan_params_t."]
#[doc = " @retval ::NRF_ERROR_INVALID_LENGTH The provided buffer length is invalid. See @ref BLE_GAP_SCAN_BUFFER_MIN."]
#[doc = " @retval ::NRF_ERROR_RESOURCES No... | Rust | 0 |
as usize } , 2usize , concat ! (
"Alignment of field: " , stringify ! ( tdTPM_DELEGATE_PUBLIC )
, "::" , stringify ! ( label ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const tdTPM_DELEGATE_PUBLIC ) ) . pcrInfo as *
const _ as usize } , 8usize , concat ... | Rust | 0 |
from enkaNetwork.types.base import StrEnum
class Cookie(StrEnum):
LTUID_V2 = "ltuid_v2"
LTMID_V2 = "ltmid_v2"
LTOKEN_V2 = "ltoken_v2" | Python | 1 |
(other.max).is_none()
{
result.increase_exponent_by(1);
other.increase_exponent_by(1);
}
result.min += other.min;
result.max += other.max;
result.minimize_exponent();
result
}
}
binary_operation_fill!(Range, Range, Add, add);
impl<'a> Sub for &'a Range {
type Output = Range;
... | Rust | 0 |
num(input);
cmd = Cmd::CharGiven;
}
Cmd::MathCharNum => {
let mut c;
if chr == 2 {
let val = scan_math_class_int(input);
c = set_class(val);
let val = scan_... | Rust | 0 |
import re
import requests
import asyncio
from aiogram import Bot, Dispatcher, types
from aiogram.types import Message
from aiogram.utils import executor
# === Для Selenium (если API не работает) ===
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by i... | Python | 1 |
#[allow(unused)]
pub(crate) fn into_native(self) -> nativeConfirmationTarget {
match self {
ConfirmationTarget::Background => nativeConfirmationTarget::Background,
ConfirmationTarget::Normal => nativeConfirmationTarget::Normal,
ConfirmationTarget::HighPriority => nativeConfirmationTarget::HighPriority,
}
... | Rust | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.