text
string
label_name
string
labels
int64
dcasting( fx_test_client: FlaskClient, fx_user: User, fx_private_key: PrivateKey, fx_session: scoped_session, ): with unittest.mock.patch('nekoyume.game.multicast') as m: fx_test_client.post('/login', data={ 'private_key': fx_private_key.to_hex(), 'name': 'test_user',...
Python
1
''' Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. Example 1: Input: s1 = "aabcc", s2 = "dbbca", s3 = "aadbbcbcac" Output: true Example 2: Input: s1 = "aabcc", s2 = "dbbca", s3 = "aadbbbaccc" Output: false ''' class Solution(object): def isInterleave(self, s1, s2, s3): ...
Python
1
's implementation of `File::sync_data` calls `fcntl` with // `F_FULLFSYNC` on Mac OS, which means Nebari is performing the // strongest guarantees that Apple provides that bits are fully // persisted to disk before reporting a succesful result. SQLite does // not enable this by default, ...
Rust
0
S() @pytest.mark.parametrize( ("code", "expected", "raw_rule"), [ (code, True, raw_rule) for code in CHECKER_CLASS.codes for raw_rule, expected in RULES.items() if code in expected["should_raise"] ], ) def test_rule_bad(self, code, exp...
Python
1
_list } => { if config_list.len() > u16::MAX as usize { return Err(EncodeError::Length(config_list.len())); } // Note the RFC does not explicitly state that the length is two octets // "In wire format, the value of the parameter is an E...
Rust
0
h).sum() / float(output.numel()) return acc def greedy_decode(id2w, pred, seq_len, sep=' '): prev_found_word = '' prev = '' decoded_labels = '' for i in range(seq_len): # current label temp = str(id2w[pred[i]]) if (temp != 'blank'): # remove blanks ...
Python
1
Result<Amount, Error> { Self::new(AmountKind::Positive, s) } fn negative(s: &str) -> Result<Amount, Error> { Self::new(AmountKind::Negative, s) } fn valid_inner() -> Regex { Regex::new(r"^\$?(?P<dollars>[\d,]*)\.?(?P<cents>\d*$)").unwrap() } fn mk_string(m: Option<Mat...
Rust
0
"""EJERCICIOS: 1. Defina una clase que contiene el objeto Persona con un solo atributo nombre. Luego, se crean dos subclases: Maratonista y Ciclista, que pertenecen a la clase Persona. 2. Cada Clase contiene un método que se llama movimiento. Para el caso de la Persona, el estado de movimiento es “caminando”, para el c...
Python
1
AGE_URL.captures_iter(s).filter_map(|c| { c.get(1) .and_then(|s| s.as_str().parse::<i32>().ok()) .and_then(|n| DB.query_gallery(n).ok()) .map(InputGallery::Gallery) }); let i2 = EXHENTAI_URL.captures_iter(s).filter_map(|c| { c.get(0) .map(|s| Input...
Rust
0
lities { let mut caps = DeviceCapabilities::default(); caps.max_transmission_unit = DEFAULT_MTU; caps } fn receive(&mut self) -> Option<(Self::RxToken, Self::TxToken)> { // According to the smoltcp code, AFAICT, this function should poll the ethernet driver // to see if ...
Rust
0
age/IntrinsicsGuide/#text=_mm_slli_epi16) #[inline] #[target_feature(enable = "sse2")] #[cfg_attr(test, assert_instr(psllw, imm8 = 7))] #[rustc_args_required_const(1)] #[stable(feature = "simd_x86", since = "1.27.0")] pub unsafe fn _mm_slli_epi16(a: __m128i, imm8: i32) -> __m128i { transmute(pslliw(a.as_i16x8(), im...
Rust
0
Default)] #[serde(deny_unknown_fields)] pub struct Reset { /// If true, the reset was triggered by a guest request (such as /// a guest-initiated ACPI reboot request or other hardware-specific action /// ) rather than a host request (such as the QMP command system_reset). #[serde(rename = "guest")] ...
Rust
0
import asyncio import base64 import json MAX_CHUNK_SIZE = 4000 async def upload_metadata_song(server, song_metadata): metadata_json = json.dumps(song_metadata) await server.set(f"metadata_{song_metadata['title']}", metadata_json) print('Subidos los metadatos a la red de metadatos') async def upload_...
Python
1
fn filter( &self, func: Option<&mut dyn (FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult)>, ) -> Vec<RTSPSessionMedia>; #[doc(alias = "gst_rtsp_session_get_header")] #[doc(alias = "get_header")] fn header(&self) -> Option<glib::GString>; #[doc(alias = "gst_rtsp_session_...
Rust
0
# Copyright 2015 OpenStack Foundation # # 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 ...
Python
1
= "6.0V" else "speed_4v8" # Encontrar servos adequados suitable_servos = [] for servo in self.servo_database: # Verificar se atende aos requisitos mínimos de torque if servo[torque_column] >= required_torque: suitable_servos.append(servo) ...
Python
1
import os import tempfile import numpy as np import pandas as pd import pytest from pandas.testing import assert_frame_equal from autogluon.eda.analysis import ShapAnalysis from autogluon.eda.auto import analyze, quick_fit RESOURCE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "resources")) ...
Python
1
import asyncio import logging import multiprocessing import signal import sys from mitmproxy import log from gfl2logger.proxy.master import ProxyMaster async def run() -> None: logging.getLogger().setLevel(log.ALERT) m = ProxyMaster() loop = asyncio.get_running_loop() def _sigint(*_): loop....
Python
1
id'" and fname in pks: pks.pop(pks.index(fname)) print " Field('%s', %s)," % (fname, ', '.join(["%s=%s" % (k, fdef[k]) for k in KWARGS if k in fdef and fdef[k]])) if pks: print " primarykey=[...
Python
1
fore trying again.") return if response.status != 200: print(f"❌ HTTP Error {response.status}") return try: data = json.loads(raw_response) status_code = data['message']['header']['statu...
Python
1
查找ETF etf_count = collection.count_documents({'sec': 'etf_cn'}) print(f" ETF基金总数: {etf_count:,}") # 查找指数 index_count = collection.count_documents({'sec': 'index_cn'}) print(f" 指数总数: {index_count:,}") def main(): """主函数""" print("🔍 正在验证MongoDB中的A股基础信息...") # 连接MongoDB c...
Python
1
("error,no child") if self.type =='?':#选择结点,即或结点 ticks += 1 for child in self.children: ticks+=1 val,obj,cost,ticks,cond=child.cost_tick_cond(state,cost,ticks,cond) if val=='success': return val,obj,cost,ticks,cond ...
Python
1
from lambda_functions.event_bridge import tweet_monitor_batch class MockTweet: def __init__(self, id, like, retweet): self.id = id self.public_metrics = {"like_count": like, "retweet_count": retweet} def test_filter_tweets_by_thresholds(): tweets = [ MockTweet("1", 5, 2), # 閾値未満 ...
Python
1
filters.push("archived = 0".to_string()); filters.push("json_extract(events.source, '$.alert.signature_id') = ?".to_string()); params.push(Box::new(alert_group.signature_id as i64)); filters.push("json_extract(events.source, '$.src_ip') = ?".to_string()); params.push(Box::new(a...
Rust
0
�� | Medium | //! | [`RodeoResolver`] | ✅ | ❌ | ❌ | ✅ | ✅ | Least | //! //! ## Cargo Features //! //! //! By default `lasso` has zero dependencies and only [`Rodeo`] is exposed. To make use of [`ThreadedRodeo`], you must enable the `multi-threade...
Rust
0
napshot = snapshot::download(url).await?; // Unpack the snapshot. let data = snapshot::unpack(snapshot).await?; // Install the snapshot. snapshot::install(&data).await?; Ok(()) } <gh_stars>1-10 use rug::Float; use sha2::{Sha512, Digest}; pub fn hash_512(inword: &str) -> Vec<u8> { let mut hash...
Rust
0
rate) mod needinit; pub(crate) mod checkgm; pub(crate) mod arraydemo; pub(crate) mod groupdemo; pub(crate) mod structdemo; <reponame>EverCrawl/server<filename>src/net/mod.rs pub mod acceptor; pub mod auth; pub mod message; pub mod session; pub mod socket; pub use acceptor::Acceptor; pub use auth::Credentials; pub use ...
Rust
0
shim(data: *mut raw::c_void) { let a: *mut Box<dyn FnMut()> = data as *mut Box<dyn FnMut()>; let f: &mut (dyn FnMut()) = &mut **a; let _ = panic::catch_unwind(panic::AssertUnwindSafe(|| f())); } let a: *mut Box<dyn FnMut()> = Box::into_raw(Box::new(Box::new(cb))); ...
Rust
0
, 1, None), Among("\u{0561}\u{0576}\u{0564}", 15, 1, None), Among("\u{0578}\u{0582}\u{0569}\u{0575}\u{0561}\u{0576}\u{0564}", 19, 1, None), Among("\u{057E}\u{0561}\u{0576}\u{0564}", 19, 1, None), Among("\u{0578}\u{057B}\u{0564}", 15, 1, None), Among("\u{0568}", -1, 1, None), Among("\u{0565}\u{05...
Rust
0
ColorPrintState::<BasicColors>::default(); /// # fn compute_time_left() -> usize { 10 } /// let seconds_left = compute_time_left(); /// /// tcprint!(state, /// {colors, { /// if seconds_left < 5 { &colors.red } else { &colors.hl } /// }: "{}", seconds_left}, (" seconds left to abort") /// ); /// ``` #...
Rust
0
nts={"console_scripts": ["wstest = autobahntestsuite.wstest:run"]}, ## http://pypi.python.org/pypi?%3Aaction=list_classifiers ## classifiers=[ "License :: OSI Approved :: Apache Software License", "Development Status :: 5 - Production/Stable", "Environment :: Console", "Frame...
Python
1
OperandSize::Xmmword), None)), operand2: Some(Direct(YMM3)), operand3: Some(Literal8(43)), operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[196, 227, 125, 57, 152, 160, 250, 15, 4, 43], OperandSize::Dword) } fn vextracti128_3() { run_test(&Instruction...
Rust
0
E_START_ADDR_1_7_R { #[inline(always)] pub(crate) fn new(bits: u32) -> Self { FRAME_START_ADDR_1_7_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for FRAME_START_ADDR_1_7_R { type Target = crate::FieldReader<u32, u32>; #[inline(always)] fn deref(&self) -> &Self::Target { ...
Rust
0
me/chrono/ThaiBuddhistEra.html) /// /// Required feature: java-time-chrono-ThaiBuddhistEra public enum ThaiBuddhistEra ("java/time/chrono/ThaiBuddhistEra") extends crate::java::lang::Enum, implements crate::java::time::chrono::Era { /// [values](https://developer.android.com/reference/java/time/chr...
Rust
0
import pickle import re import threading from collections import defaultdict from concurrent.futures import ThreadPoolExecutor, as_completed from time import time from requests import get from tqdm.asyncio import tqdm_asyncio import updates.fofa.fofa_map as fofa_map import utils.constants as constants from utils.chan...
Python
1
# Copyright 2021 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
self.norm4(self.conv4(secret))) # secret = self.relu(self.upnorm1(self.upsample1(secret))) # secret = self.relu(self.upnorm2(self.upsample2(secret))) # secret = self.relu(self.upnorm3(self.upsample3(secret))) # secret = self.relu(self.norm5(self.conv5(secret))) # secret = self.re...
Python
1
from PyQt5 import QtWidgets import sys from _radiobuttonForm import Ui_MainWindow class Window(QtWidgets.QMainWindow): def __init__(self): super(Window, self).__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self) self.ui.radioTurkiye.setChecked(True) self.ui.radio...
Python
1
from matplotlib import pyplot as plt from figure_1 import figure_1, figure_1_d_auc_prc, figure_1_e_confusion_matrix from figure_2 import figure_2, figure_2_a_pnet_vs_dense, figure_2_b_external_validation, figure_2_c_survival from figure_3 import prepare_data, figure_3_sankey, figure3_b_gene_importance, figure3_c_activ...
Python
1
uint = 32768; /* * 8.1 sctp_bindx() * * The flags parameter is formed from the bitwise OR of zero or more of the * following currently defined flags: */ pub const SCTP_BINDX_ADD_ADDR: ::libc::c_uint = 0x01; pub const SCTP_BINDX_REM_ADDR: ::libc::c_uint = 0x02; /* This is the structure that is passed as an argume...
Rust
0
println!(); } for x in 0..self.size { for y in 0..self.size { self.do_print_tile(x,y); } } std::io::stdout().flush().unwrap(); } fn print_clear(&self) { if !VERBOSE {return} for _ in 0..self.size*TILE_HALF { up(...
Rust
0
"""Stackup spec.""" from dataclasses import dataclass from typing import Any, Literal @dataclass(frozen=True) class StackupSpec: """The test parameters of interest.""" robot_type: Literal["OT-2"] | Literal["Flex"] module_load_name: str | None adapter_load_info: tuple[str, int] | None labware_loa...
Python
1
from __future__ import annotations from typing import Any from fastapi import APIRouter, Depends, HTTPException, Query, Security, status from sqlalchemy.exc import IntegrityError from sqlalchemy.ext.asyncio import AsyncSession from app.database.crud.campaign import ( create_campaign, delete_campaign, get...
Python
1
Builder::new() .build() .map_err(|err| GameInitError::ThreadPoolCreation { err })?, ); // event channel let (send, recv) = channel::unbounded(); // Resources let resources = resources(ResourceBuilder { res: Arc::new(RwLock::new(Resour...
Rust
0
import sys from pathlib import Path # Add the project root to sys.path sys.path.append(str(Path(__file__).resolve().parents[1])) import pytest from modules import trr_module as tm # Define test data and expected results test_data = [ (6, [("P0", 0, 12), ("P1", 0, 34), ("P2", 0, 8), ("P3", 0, 19)], (51.0, 32.75))...
Python
1
ppend({ "question": j["question"], "answer": j["answer"]["answer"], "analysis": j["answer"]["analysis"], "difficulty": "1_hop", "triples": [ f"{sample['entita1']} {sample['relation']} {sample['entita2']} - {sample['source']}" ] ...
Python
1
n: u32, chars: &str, n_chars: i32) -> u32; /// Sets the maximum allowed length of the contents of the buffer. If /// the current contents are longer than the given length, then they /// will be truncated to fit. /// ## `max_length` /// the maximum length of the entry buffer, or 0 for no maximum. ...
Rust
0
Show = f"❊⟱ 𝐃𝐨𝐰𝐧𝐥𝐨𝐚𝐝𝐢𝐧𝐠 ⟱❊ »\n\n📄 Title:- `{name}\n\n⌨ 𝐐𝐮𝐥𝐢𝐭𝐲 » {raw_text2}`\n\n**🔗 𝐔𝐑𝐋 »** `{url}`" prog = await m.reply_text(f"**Downloading:-**\n\n**📄 Title:-** `{name}\n\nQuality - {raw_text2}`\n\n**Link:**`{url}`\n\n**Bot Made By NIKHIL SAINI **") ...
Python
1
} else { number_of_elems / RATE }; for _ in 0..number_of_iters { out.extend_from_slice(&self.state[..RATE]); generic_round_function_gadget(cs, self.params, &mut s...
Rust
0
clone(), Ordering::Relaxed); // wakes up on any activity let rndx : u16 = rand::thread_rng().gen_range(0, 3); if rndx != 1 { ctx.set_activity(Activity::listening(&msg.author.name)).await; ctx.online().await; } else { let activity ...
Rust
0
return syn::Error::new( attr.span(), "expected `builder(each = \"...\")`") .to_compile_error().into(); } } NestedMeta::Lit(_) => unrea...
Rust
0
as OPJ_UINT32; while compno < (*p_image).numcomps { (*(*p_image).comps.offset(compno as isize)).resno_decoded = (*(*(*p_j2k).m_output_image).comps.offset(compno as isize)).resno_decoded; opj_image_data_free((*(*p_image).comps.offset(compno as isize)).data as *mut libc::c_void); let ref mu...
Rust
0
January 2003 """ seg = seg.astype(np.bool) seg[seg > 0] = 1 assert np.atleast_3d(seg).shape[2] == 1 width = seg.shape[1] if width is None else width height = seg.shape[0] if height is None else height h, w = seg.shape[:2] ar1 = float(width) / float(height) ar2 = float(w) / float(h)...
Python
1
; } Get(k) => { let res1 = tree.get(&*vec![k]).unwrap().map(|v| bytes_to_u16(&*v)); let res2 = reference.get(&k).cloned(); assert_eq!(res1, res2); } Del(k) => { tree.del(&*vec![k]).unwrap(...
Rust
0
= "fix_common::workarounds::from_opt_str")]// https://github.com/serde-rs/serde/issues/1183 #[serde(default)] #[serde(rename = "40785")] pub payment_stream_fixed_amount: Option<f64>, /// PaymentStreamRateOrAmountCurrency #[serde(skip_serializing_if = "Option::is_none")] #[serde(rename = "40786")] pub payment_st...
Rust
0
PARATOR.bits | Self::TRAILING_DIGIT_SEPARATOR.bits | Self::CONSECUTIVE_DIGIT_SEPARATOR.bits ); // MATLAB LITERAL [013456789ABDFGHIJKMN-_] /// Float format for an Matlab literal floating-point number. // Note: Matlab accepts both NaN and na...
Rust
0
CRYPT_ACQUIRE_CACHE_FLAG: DWORD = 0x00000001; pub const CRYPT_ACQUIRE_USE_PROV_INFO_FLAG: DWORD = 0x00000002; pub const CRYPT_ACQUIRE_COMPARE_KEY_FLAG: DWORD = 0x00000004; pub const CRYPT_ACQUIRE_NO_HEALING: DWORD = 0x00000008; pub const CRYPT_ACQUIRE_SILENT_FLAG: DWORD = 0x00000040; pub const CRYPT_ACQUIRE_WINDOW_HAN...
Rust
0
ow snow_ratio = max(0, min(1, (2 - temp_min) / 4)) snow = rain * snow_ratio rain = rain * (1 - snow_ratio) # Generate the data point day_data = { 'timestamp': timestamp, 'date': current_date, ...
Python
1
lear(&mut self) { self.wait_sec = ::std::option::Option::None; self.weight = ::std::option::Option::None; self.unknown_fields.clear(); } } impl ::std::fmt::Debug for EosTxActionAck_EosAuthorizationWait { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::...
Rust
0
dists) if sum_dists == 0: prob = np.full_like(dists, 1 / len(dists)) else: prob = dists / sum_dists next_center = features[np.random.choice(n_samples, p=prob)] centers.append(next_center) centers = np.array(centers) # --- 一...
Python
1
# -*- encoding: utf-8 -*- """ Copyright (c) 2019 - present AppSeed.us """ from apps.home import blueprint from flask import render_template, request from flask_login import login_required from jinja2 import TemplateNotFound @blueprint.route('/index') def index(): return render_template('home/index.html', segment...
Python
1
env.set_named_property(exports, "Token", tk)?; Ok(()) } <gh_stars>1-10 use thiserror::Error; #[derive(Error, Debug)] pub enum StorageError { #[error("Path must be a directory")] PathIsNotDirectory, #[error("Object could not be serialized")] SerializationError, #[error("File creation failed")...
Rust
0
import gzip import os from whoosh import analysis, fields from whoosh.support.bench import Bench, Spec class VulgarTongue(Spec): name = "dictionary" filename = "dcvgr10.txt.gz" headline_field = "head" def documents(self): path = os.path.join(self.options.dir, self.filename) f = gzip....
Python
1
for ProxyPOSTNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { http::StatusCode::OK => { if buf.is_empty() { return Err(crate::ResponseError::NeedMoreData); ...
Rust
0
roundtrip_parquet_spark_to_dask_extension_dtypes(spark_session, tmpdir): tmpdir = str(tmpdir) npartitions = 5 size = 20 pdf = pd.DataFrame( { "a": range(size), "b": np.random.random(size=size), "c": [True, False] * (size // 2), "d": ["alice", "bob...
Python
1
{"Key": "key1", "Value": "value1"}, {"Key": "key2", "Value": "value2"}, ], "NextToken": "next_token", } context_outputs = [ [ {"Key": "key1", "Value": "value1", "ResourceId": "resource_id"}, {"Key": "key2", "Value": "value2", "ResourceId": "re...
Python
1
from collections import deque def orangesRotting(grid): q = deque() n = len(grid) m = len(grid[0]) minutes = 0 fresh_oranges = 0 # First, find all the rotten oranges and count fresh ones for i in range(n): for j in range(m): if grid[i][j] == 2: # Rotten orange ...
Python
1
## Copyright 2015-2019 Ilgar Lunin, Pedro Cabrera ## 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...
Python
1
orages)?, parents: AllStoragesBorrow::try_borrow(all_storages)?, children: AllStoragesBorrow::try_borrow(all_storages)?, translations: AllStoragesBorrow::try_borrow(all_storages)?, rotations: AllStoragesBorrow::try_borrow(all_storages)?, scales: AllStoragesBor...
Rust
0
ptr = unsafe { ISharedPointer::into_ptr(rc) }; let rc_clone: Arc<u32> = unsafe { ISharedPointer::clone_from_ptr(ptr) }; assert_eq!(Arc::strong_count(&rc_clone), 2); unsafe { <Arc<u32> as ISharedPointer>::drop_from_ptr(ptr); } assert_eq!(Arc::strong_count(&rc_clon...
Rust
0
ment='center') #, fontdict=font) ax = axes[2] ax.plot(global_machine_times, gdd['CTRL.omega_syn'], label=r'$\omega_{\rm syn}$') ax.plot(global_machine_times, gdd['CTRL.omega_slip'], label=r'$\hat\omega_{\rm syn}$') ax.set_ylabel(r'$i_q$ [A]', multialignment='center') #, fontdict=font) ...
Python
1
und(2) array([[[ 0. ], [ 0. ], [ 0. ], [ 0. ]], [[ 0. ], [ 54.46], [ 24.02], [-43.37]], [[-55.83], [-12.32], [ 50.4 ], [-35.16]]...
Python
1
dayOfWeek = input("Bitte geben Sie den Wochentag ein: ") time = int(input("Bitte geben Sie die Uhrzeit ein (als ganze Zahl): ")) if dayOfWeek == "Montag": print("Heute ist Montag!") if time < 9: print("Guten Morgen!") elif time < 15: print("Frohes arbeiten!") elif time < 20: pri...
Python
1
WHERE t.teamID = p.team AND pg.batter_id = p.id AND p.team = 'NYN' """, conn) df.head() ########### # LIMIT/TOP ########### # SELECT * # FROM player # LIMIT 5 # SELECT TOP 5 * # FROM player df = pd.read_sql( """ SELECT DISTINCT umpire_1B, umpire_2B, umpire_3B, umpire_HP F...
Python
1
has children entries and whether the children are visible. mode must be one of open, close or none. If mode is set to open, a (+) indicator is drawn next the entry. If mode is set to close, a (-) indicator is drawn next the entry. If mode is set to none, no indicators will be drawn for this entry. T...
Python
1
2025-09-18T19:40:40Z", "tags": ["dns", "reconnaissance", "data-tunneling"], "severity": "High", "reference": "主机FIN-WKS-JDOE-05发起大量异常DNS查询", "description": "主机 FIN-WKS-JDOE-05 在短时间内发起大量异常 DNS 查询。该行为可能与 DNS 隧道通信或侦察活动有关。", "artifacts": [ {"type": "hostname", "value": "F...
Python
1
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
Python
1
from entities.item_base import ItemBase class Ingredient(ItemBase): def __init__(self, id, model): super().__init__(id, model) self.finished = False
Python
1
2)'].sum() circle_area_sum = df_areas['Área do Círculo (m^2)'].sum() new_row = { 'Área da Bounding Box (m^2)': bounding_box_sum, 'Área do Círculo (m^2)': circle_area_sum } # Crie um DataFrame com a nova linha new_row_df = pd.DataFrame([new_row]) # Use pd.concat para adicionar ...
Python
1
} #[test] fn poly_eval_0_check() { //Arrange assert!(init(CurveType::BLS12_381)); let mut coefficients = Vec::new(); let n: i32 = 7; let a: i32 = 597; for i in 0..n { coefficients.push(i + a); } let p = Polynomial::from_i32(&coefficients); let expected = Fr::from_int(a); ...
Rust
0
("오크모스", "earthy", 6.0, 9.0, "base", -0.1), ScentNote("베티버", "woody", 7.5, 9.5, "base", -0.3), # 기타 ScentNote("통카빈", "gourmand", 8.0, 8.5, "base", 0.4), ScentNote("스모키", "smoky", 9.0, 9.0, "base", -0.4), ScentNote("레더", "le...
Python
1
: usize, } #[derive(Debug, Clone, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct CoverageSegment { line: usize, col: usize, count: usize, has_count: bool, is_region_entry: usize, is_gap_region: usize, } #[derive(Debug, Clone, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct FunctionRecordH...
Rust
0
# Generated by Django 4.2.3 on 2023-10-15 09:01 from django.db import migrations, models import pyclist.indexes class Migration(migrations.Migration): dependencies = [ ('ranking', '0097_alter_accountrenaming_unique_together_and_more'), ] operations = [ migrations.AddIndex( m...
Python
1
SSL_SESSIONS_CONFIG = { 'store_id': 'paper65f00bf09d8e0', 'store_pass': 'paper65f00bf09d8e0@ssl', 'issandbox': True, }
Python
1
Check if the value type is correct. match map.value_type_raw_unchecked(&key)? { $value_type => {} _ => return Err(Error::WrongValueType), }; let count = map.value_count_raw_unchecked(&key)? as i32; Ok(Self { ...
Rust
0
global_bttv { match bttv_emote_data.get_global_bttv_emotes() { Ok(_) => download_bttv = true, Err(e) => println!("Error({})", e), } } if !config.ttv_channels.is_empty() { match emote_data.update_sub_emote_data() { Ok(_) => { for channe...
Rust
0
; } } // /// Machine-independent exception behaviors. Possible values for [`et::exception_behavior_t`]. // /// // /// `exception_types.h` // #[repr(i32)] // pub enum ExceptionBehaviors { // /// Send a `catch_exception_raise` message including the identity. // Default = 1, // /// Send a `catch_exception...
Rust
0
let mut b = minivec::mini_vec![0_u8; size]; { let mut rgb_iter = crate::rgb::make_iter_mut(&mut r, &mut g, &mut b); while let Some(row) = png_reader.next_row()? { row .chunks_exact(num_channels) .zip(&mut rgb_iter) .for_each(|(chunk, [r, g, b])| { *r = chunk[0]; ...
Rust
0
omparison_and_multiple_aggregates(self) -> None: with pytest.raises( IncompatibleMetricsQuery, match="The comparison query for metrics supports only one aggregate.", ): timeseries_query( selected_columns=["avg(transaction.duration)", "sum(transaction.d...
Python
1
ic::{Instance, TCBoxTryFuture, TCBoxTryStream}; use super::sparse::{DenseToSparse, SparseTensor}; use super::stream::{Read, ReadValueAt}; use super::{ Bounds, Coord, Phantom, Schema, Shape, Tensor, TensorAccess, TensorBoolean, TensorBooleanConst, TensorCompare, TensorCompareConst, TensorDualIO, TensorIO, Tenso...
Rust
0
un_magic_cookie_); buf->WriteString(transaction_id_); for (const auto& attr : attrs_) { buf->WriteUInt16(attr->type()); buf->WriteUInt16(static_cast<uint16_t>(attr->length())); if (!attr->Write(buf)) { return false; } } return true; } fn main() -> Result<(), Box<...
Rust
0
# config.py import os from dotenv import load_dotenv load_dotenv() OPENROUTER_API_KEY = os.getenv("OPENROUTER_API_KEY") LANGSMITH_API_KEY = os.getenv("LANGSMITH_API_KEY")
Python
1
Kern.__init__  r`c SUR-$)Nk%.02frE)rqs rGr Kern.__repr__$**$$r`c~>[TU]5 UR[:aU=R[ -slgg)...
Python
1
.window().get_inner_size().unwrap(); self.gaze.replace(DeviceGaze { x: position.x as f32, y: (window_size.height - position.y) as f32, }); } } ...
Rust
0
crate::cs::Circuit; use crate::pairing::bn256::Bn256; use super::test_assembly::*; // use crate::plonk::plonk::generator::*; // use crate::plonk::plonk::prover::*; let c = XORDemo::<Bn256> { a: None, b: None, _marker: PhantomData }; let mut transpiler = Transpiler:...
Rust
0
from . import test_project_task_related
Python
1
impl From<InotifyInit> for InotifyInit1 { /// If flags is 0, then inotify_init1 is the same as inotify_init. /// Note that inotify_init was introduced in 2.6.13 and inotify_init1 /// was added in 2.6.27. fn from(inotify_init: InotifyInit) -> Self { let InotifyInit { mut raw } = inotify_init; ...
Rust
0
;\ \n}\n" ); } //! Describes all meta data possible in an exr file. //! Contains functionality to read and write meta data from bytes. //! Browse the `exr::image` module to get started with the high-level interface. pub mod attribute; pub mod header; use crate::io::*; use ::smallvec::SmallVec; use self...
Rust
0
# t = torch.from_numpy(np.linspace(0,1,self.n)).to(device) x0, y0, x1, y1, x2, y2, x3, y3 = torch.split(cpts,1,dim=1) bezier_x = (1 - t) * ((1 - t) * ((1 - t) * x0 + t * x1) + t * ((1 - t) * x1 + t * x2)) + t * ( (1 - t) * ((1 - t) * x1 + t * x2) + t * ((1 - t) * x2 + t * x3)) ...
Python
1
DAWAKECFG {} #[doc = "`write(|w| ..)` method takes [pdawakecfg::W](pdawakecfg::W) writer structure"] impl crate::Writable for PDAWAKECFG {} #[doc = "Power-down states after wake-up from Deep-sleep mode"] pub mod pdawakecfg; #[doc = "Power-down configuration register\n\nThis register you can [`read`](crate::generic::Reg...
Rust
0