text
string
label_name
string
labels
int64
ent is not None: currentStatus = 1 else: if itemlist_searchable[0]["data"]["yesterday"] is not None: yesterdayFlag = True currentStatus = 1 current = itemlist_searchable[0]["data"]["yesterday"] else:...
Python
1
["b"]), ], ), ); } } use criterion::{black_box, criterion_group, criterion_main, Criterion}; use std::arch::x86_64::*; const A: [f32; 8] = [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0]; const B: [f32; 8] = [7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0]; fn double_load() -> __m256 { un...
Rust
0
erate() { window[idx] = b; } } // Insert Spans { let mut window = &mut out[spans_offset..spans_offset + spans_len]; for hunk in hunks.into_iter() { let base = hunk.org; for (offset, &(_, span)) in hunk.instructions.into_iter().enumerate() { ...
Rust
0
#[structopt(long, env = "GH_ORG")] org: String, } fn main() -> Result<(), failure::Error> { let cli = Cli::from_args(); let mut table = prettytable::Table::new(); table.add_row(row!(b => "repo", "archived", "vulns")); for repo in repo_vulns(&cli.org, &cli.oauth_token)? { if !repo.vulns....
Rust
0
import tkinter as tk from tkinter import ttk def button_func(): print(stringVar.get()) window = tk.Tk() window.title("Tkinter Variable") # String variable stringVar = tk.StringVar(value = 'start value') label = ttk.Label(master = window, text = 'label', textvariable = stringVar) label.pack() entry = ttk.Entry(...
Python
1
# for faster extraction, use ThreadPoolExecutor import tarfile from pathlib import Path from tqdm import tqdm from concurrent.futures import ThreadPoolExecutor TRAIN_SRC_DIR = '/data1/linkdom/archive/ImageNet/ILSVRC2012/ILSVRC2012_img_train.tar' TRAIN_DEST_DIR = '/data1/linkdom/data/imagenet1/train' def extract_trai...
Python
1
0x58, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ]; let magic = get_str_from_bytes(&bytes, 0, 4); let droid_version = get_u32_from_bytes(&bytes, 4); let num_droids = get_u32_...
Rust
0
from odoo import fields, models class EstatePropertyOffer(models.Model): _name = 'estate.property.offer' _description = 'Estate Property Offer' price = fields.Float(string='Price') status = fields.Selection([ ('accepted', 'Accepted'), ('refused', 'Refused'), ]) partner_id = fi...
Python
1
import numpy as np from itertools import permutations def is_valid(grid): for row in grid: if 'x' in row: continue if not (row[0] < row[1] < row[2] or row[0] > row[1] > row[2]): return False for col in grid.T: if 'x' in col: continue if not (...
Python
1
pub proposer_factory: PF, /// The sync oracle that can give us the current sync status. pub sync_oracle: SO, /// The inherent data providers to create the inherent data. pub inherent_data_providers: InherentDataProviders, /// Should we force the authoring of blocks? pub force_authoring: bool, /// The backoff s...
Rust
0
from tests.example_queries import GetArrayQuery, GetArrayQuery1, QueryWithTypedResponse, SomeQueryResponseModel from mediatr import Mediator from typing import Callable async def get_array_handler(request: GetArrayQuery): items = list() for i in range(0, request.items_count): items.append(i) retu...
Python
1
from .common import InfoExtractor from ..utils import ( int_or_none, try_get, update_url_query, url_or_none, ) class XinpianchangIE(InfoExtractor): _VALID_URL = r'https?://www\.xinpianchang\.com/(?P<id>[^/]+?)(?:\D|$)' IE_NAME = 'xinpianchang' IE_DESC = 'xinpianchang.com' _TESTS = [{ ...
Python
1
import json import logging import pathlib from argparse import ArgumentParser import matplotlib.pyplot as plt logging.basicConfig( format='%(levelname)s : %(asctime)s : %(message)s', level=logging.INFO, ) parser = ArgumentParser( description='Plot the durations of a callable measured by perfmon.', ) pars...
Python
1
element: Some(element::Element::String(self.clone())), }); Ok(idx) } } } } #[derive(Debug)] pub struct Modal { pub show: bool, pub location: String, // or Option<String> ? // pub type: String, "iamge", "video" } impl Default for Modal { fn default...
Rust
0
// SPDX-License-Identifier: MIT OR Apache-2.0 // // Copyright (c) 2018-2020 <NAME> <<EMAIL>> //! BSP Memory Management Unit. use super::map as memory_map; use crate::memory::mmu::*; use core::ops::RangeInclusive; //-------------------------------------------------------------------------------------------------- //...
Rust
0
r, score: int, timestamp: datetime, technical_evidences: List[TechnicalIndicatorEvidence], daily_extra_indicators: Dict, market_trend: TrendType, ...
Python
1
{ 'name': 'Israel - Accounting Reports', 'version': '1.0', 'category': 'Accounting/Localizations/Reporting', 'description': """ Accounting reports for Israel """, 'depends': [ 'l10n_il', 'account_reports' ], 'data': [ 'data/account_return_data.xml', ], 'installabl...
Python
1
B2testDestructionListenerDefault { base: Rc::downgrade(&base), })), contact_listener: Rc::new(RefCell::new(B2testContactListenerDefault { base: Rc::downgrade(&base), })), m_bodies: Vec::new(), m_bullet: None, })); { let mut self_ = result_ptr.borrow_mut(); let mut base = base.borrow_mu...
Rust
0
rom(200), recipient: ParaId::from(300), }) .unwrap() .msg_count = 0; }, _ => unreachable!(), } }) .add_with_post_test( 1, || { send_message(ParaId::from(300), b"1".to_vec()); send_message(ParaId::from(400), b"2".to_vec()); }, || {}, ) .add_with_post_test( ...
Rust
0
ty_score " f"FROM {self.table_name} {where_clause} " f"ORDER BY similarity_score DESC LIMIT {similarity_top_k}", (formatted_vector, *tuple(where_clause_values)), ) results = cur.fetchall() fin...
Python
1
ything) and enables OUT interrupts /// (for reception from host). // // A SETUP packet is less than 64 bytes, so only one OUT // descriptor is needed. This function sets the max size of the // packet to 64 bytes the Last and Interrupt-on-completion bits // and max size to 64 bytes. fn expect...
Rust
0
4) | ($Function << 2) | $Method } } macro_rules! HID_CTL_CODE { ($id:expr) => { CTL_CODE!(::FILE_DEVICE_KEYBOARD, $id, ::METHOD_NEITHER, ::FILE_ANY_ACCESS) } } macro_rules! HID_BUFFER_CTL_CODE { ($id:expr) => { CTL_CODE!(::FILE_DEVICE_KEYBOARD, $id, ::METHOD_BUFFERED, ::FILE_ANY_ACCESS) ...
Rust
0
Lb:Rb3RscKr33J3cTfI|^A/ҜT"VfFF 0(PKݪ'X%΄ server/schemas/team/team_base.pymOjA k4v!>`ݻ61/F(xHZTG'ԉmizq!:G_2(ʕ\!1u%("׿-,5=k+;T^}ɋ8=vK}&3f\w'6wPKݪ'X*`˃%server/schemas/team/team_id_schema.py]N10 +N٘ˎLJ lߓ-YξYb<Y3PFXBbd)9Z4TK8m];#0p"! s|XDh<3mߏj,...
Python
1
conditionals::{builtin_contains, builtin_ends_with, builtin_starts_with}, echo::builtin_echo, exists::builtin_exists, functions::builtin_fn_, helpers::Status, is::builtin_is, man_pages::check_help, math::builtin_math, set::builtin_set, source::builtin_source, status::builtin...
Rust
0
champions, Err(e) => { error!("Failed to parse champions.json: {}", e); return; } }; let champion_count = champions.len(); let mut champion_quote_data = HashMap::with_capacity(champion_count); for (idx, champion) in champions.into_iter().enumerate() { i...
Rust
0
} } #[doc = "Write proxy for field `ETMTCLKLOC`"] pub struct ETMTCLKLOC_W<'a> { w: &'a mut W, } impl<'a> ETMTCLKLOC_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: ETMTCLKLOC_A) -> &'a mut W { unsafe { self.bits(variant.into()) } } #...
Rust
0
_level, BGZF_BLOCK_SIZE) } pub fn with_capacity(writer: W, compression_level: Compression, blocksize: usize) -> Self { assert!(blocksize <= BGZF_BLOCK_SIZE); #[cfg(feature = "libdeflate")] let compressor = libdeflater::Compressor::new( libdeflater::CompressionLvl::new(compre...
Rust
0
else None, min_null_score=min_null_score, top_k=top_k, handle_impossible_answer=handle_impossible_answer, max_answer_len=max_answer_len, ) word_ids = output["word_ids"] for start, end, score in zip(starts, ends,...
Python
1
.process_array(data.as_bytes()); let digest = hash256.hash(); G2::mapit(&digest) } pub fn reduce(x: &BigInt, m: &BigInt) -> BigInt { let mut y = x % m; if y.sign() == Sign::Minus { y += m; } y } use std::ops::Add; pub fn baby_step_giant_step(h: &Gt, g: &Gt, bound: &BigNum) -> Option<B...
Rust
0
import math # funcao geral de controle levando em conta o epson passado def controle(f, a, b, epson, tipo): delta = 0 Xi = 0 erro = 0 resultado_anterior = 0 resultado = 0 interacoes = 0 N = 2 while True: interacoes += 1 delta = (b-a)/N integral = 0 for i...
Python
1
= self.get_painter_obj_funcs(); unsafe { ((*funcs).begin_native_painting)(obj_data); } self } /// /// Restores the painter after manually issuing native painting commands. Lets /// the painter restore any native state that it relies on before calling any /// other...
Rust
0
derivatives], } } /// Constructs a reshaped version of the given grid, with the same bounds and periodicity. pub fn reshaped(&self, new_shape: In3D<usize>) -> Self { RegularGrid3::from_bounds( new_shape, self.lower_bounds.clone(), self.upper_bounds.clone...
Rust
0
(u32, u32); 1] { [(self.display_width, self.display_height)] } /// Processes the internal `display` events and returns `true` if the main display was closed. pub fn process_display(&mut self) -> bool { let mut display = self.display.borrow_mut(); display.dispatch_events(); s...
Rust
0
zphisher() elif socng.strip() == "10": evilginx() elif socng.strip() == "11": ghostphisher() elif socng.strip() == "00" or socng.strip() == "0": restart_program() else: print("\nERROR: Wrong Input");timeout(1);restart_program() if readStatus(): writeS...
Python
1
fn encode_message( &self, response: AuthenticatePasswordProxyResponse, ) -> Result<AuthenticatePasswordProxyMessageEncoded, MessageError> { match response { AuthenticatePasswordProxyResponse::InvalidPassword => { let message = AuthenticatePasswordApiResponsePb {...
Rust
0
mention_everyone move_members mute_members priority_speaker read_message_history read_messages send_messages send_tts_messages speak stream use_external_emojis use_slash_commands use_voice_activation value view_channel """ async def convert(self, ctx...
Python
1
let file = proctry!(File::open(self.root.join("maps"))); let reader = BufReader::new(file); ProcResult::Ok( reader .lines() .filter_map(|line| { let line = line.unwrap(); let mut s = line.splitn(6, ' '); ...
Rust
0
# # Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # NVIDIA CORPORATION, its affiliates and licensors retain all intellectual # property and proprietary rights in and to this material, related # documentation and any modifications thereto. Any use, reproduction, # disclosure or distribution ...
Python
1
pub type Vector = na::Vector2<f32>; pub type Point = na::Point2<f32>; pub type Matrix = na::Matrix2<f32>; #[derive(Debug, Clone)] pub enum Error { InvalidEntityId(EntityId), UnexpectedEntityType, } pub type Result<T> = std::result::Result<T, Error>; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct...
Rust
0
et_i_size, rec_i_size, _)) = cands_bytes_pair pairs_lists = tuple([] for _ in range(split)) rng = random.Random(RANDOM_SEED) for pair in all_pairs_list: rng.choice(pairs_lists).append(pair) with contextlib.ExitStack() as stack: files = tuple(stack.enter_context(...
Python
1
Rustic interface to the xdvipdfmx translator. // Copyright 2017 the Tectonic Project // Licensed under the MIT License. use super::{ExecutionState, IoEventBackend, TectonicBridgeApi}; use crate::errors::{ErrorKind, Result}; use crate::io::IoStack; use crate::status::StatusBackend; use crate::unstable_opts::UnstableOp...
Rust
0
T}; use sys::{O_RDONLY, O_RDWR, O_WRONLY}; use bindings::Windows::Win32::Foundation::{BOOLEAN, HANDLE, INVALID_HANDLE_VALUE}; use bindings::Windows::Win32::System::SystemServices::RTL_SRWLOCK; use bindings::Windows::Win32::System::Threading::{ AcquireSRWLockExclusive, GetExitCodeProcess, InitializeSRWLock, Registe...
Rust
0
s64ByteFrames, "rxOverLengthFrames": rxOverLengthFrames, "rx64BytePackets": rx64BytePackets, "rx65-127BytePackets": rx65_127BytePackets, "rx128-255BytePackets": rx128_255BytePackets, "rx256-511BytePackets": rx256_511BytePackets, "rx512-1023BytePackets": rx512_1023BytePackets, ...
Python
1
e Flask Backend\Models\test.txt", "w", encoding="utf-8") as f: # f.write(content_corrected) # predict() # with open(r"Simple Flask Backend\Models\res.txt", "r") as f: # content_corrected_2 = f.read() # content_corrected_2 = content_corrected_2.replace(" ", "") response = getMatched(erro...
Python
1
utils::write_normal_file(&mut tree_builder, &file_path, "contents"); let tree_id = tree_builder.write_tree(); let commit = CommitBuilder::for_new_commit(&settings, repo.store(), tree_id) .set_open(true) .set_description("add ignored file".to_string()) .write_to_repo(tx.mut_repo()); l...
Rust
0
base_url(endpoint, &name, path_style); Some(Self { base_url, name, region: region.into(), }) } /// Get the base url of this s3 `Bucket` pub fn base_url(&self) -> &Url { &self.base_url } /// Get the name of this `Bucket` pub fn name(...
Rust
0
ffer(capacity: usize) -> Self { RiaKV { f: io::Cursor::new(vec![0; capacity]), index: HashMap::new(), } } } impl<F> RiaKV<F> where F: Read + Write + Seek, { /// Processes a record from the current position in the underlying storage file. /// Every record (key val...
Rust
0
{ return Err(io::Error::new(io::ErrorKind::InvalidData, "input too long")); } let words = (size / 4) as usize; let mut result = Vec::<u32>::with_capacity(words); x.seek(io::SeekFrom::Start(0))?; unsafe { // Writing all bytes through a pointer with less strict alignment when our type ...
Rust
0
based on e.g. breaking vs non-breaking spaces // and whether they're zero-width or not. match ch { //'\u{1680}' | // Ogham Space Mark (here for completeness, but usually displayed as a dash, not as whitespace) '\u{0009}' | // Character Tabulation '\u{0020}' | // Space '\u{00A0}'...
Rust
0
<'de> for CachedRegex { fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: serde::Deserializer<'de>, { use serde::de::Error; let s = String::deserialize(deserializer)?; Self::new(&s).map_err(|err| D::Error::custom(err.to_string())) } } impl Serialize...
Rust
0
def cbin(n, k): if k > n // 2: k = n - k top = 1 bot = 1 for i in range(2, k + 1): bot *= i for i in range(n - k + 1, n + 1): top *= i return top // bot def rec(t, b): res = 1 if b > 1: dif = t // b if dif == 1: for i in range(2, b + 1...
Python
1
e_but_underscores(self, df): res = df.eval("C_C + `C C`") expect = df["C_C"] + df["C C"] tm.assert_series_equal(res, expect) def test_mixed_underscores_and_spaces(self, df): res = df.eval("A + `D_D D`") expect = df["A"] + df["D_D D"] tm.assert_series_equal(res, expec...
Python
1
from telegram import Update from telegram.constants import ParseMode from telegram.ext import ContextTypes, CommandHandler from handlers.base_handler import BaseHandler class MarkdownPythonHandler(BaseHandler): @classmethod def register(cls, app): app.add_handler(CommandHandler('python', cls.callback...
Python
1
).lower() platform_params = query.get_platform_params() if system == "darwin": cmd = ["mdfind"] if platform_params: if platform_params.live_updates: cmd.append("-live") if platform_params.search_directory: cmd.extend(["-onlyin", platfo...
Python
1
# Copyright 2020 ForgeFlow S.L. (https://forgeflow.com) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). from odoo import fields, models class MaintenanceEquipment(models.Model): _inherit = "maintenance.equipment" status_id = fields.Many2one( string="Status", comodel_name="mai...
Python
1
pr(C)] #[derive(Default, Debug, Clone, Copy)] pub struct VkExtent2D { pub width: u32, pub height: u32, } #[repr(C)] #[derive(Default, Debug, Clone)] pub struct VkExtent3D { pub width: u32, pub height: u32, pub depth: u32, } #[repr(C)] #[derive(Debug, Default)] pub struct VkRect2D { pub offset:...
Rust
0
) } else { Ok(if b.signum() != r.signum() { r + b } else { r }) } }) } fn div(&self, other: Value) -> ValueResult { self.floor_div(other) } fn floor_div(&self, other: Value) -> ValueResult { i64_arith_bin_op(*self, other, "//", |a, b| { ...
Rust
0
local_metric[2])) metric.append([result_all1] + local_metric) fold += 1 print(metric) file_out = ( "..\\results\\results_revision\\ratio_{}_DrIGCL_layers_{}_dropout_{}_embedding_{}_epochs{}_lw{}_cl{}_mp{}.txt". format(args.split_ratio[0], args.n_layers, args.drop_out_...
Python
1
}; let s = this.s; // NB: Forget to avoid drop impl from being called. mem::forget(this); Ok(RwLockMappedWriteGuard { s, data, marker: marker::PhantomData, }) } } impl<T: ?Sized> ops::Deref for RwLockMappedWriteGuard<'_, T> { ...
Rust
0
255., 211. / 255., 211. / 255., 1.); /// Equivalent to the [CSS color keywords](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value) of the same name. pub const LIGHTPINK: Self = Self::new(1., 182. / 255., 193. / 255., 1.); /// Equivalent to the [CSS color keywords](https://developer.mozilla.org/e...
Rust
0
/ cs.BitsInteger(16), "mtxDstIdx" / cs.BitsInteger(16), ) DISPLAY_STATE_DICT = { 1 : displayObjectStateTexture, 2 : displayObjectStateVCD, 3 : displayObjectMtxLoad, } displayObjectDisplayState = cs.Struct( retrieve_base_pointer(), "stateID" / GECKO_U8, cs.Padding(3), "setting" / cs.Swi...
Python
1
f2) } /// Process a block with the SHA-256 algorithm. pub fn sha256_digest_block_u32(state: &mut [u32; 8], block: &[u32; 16]) { let k = &K32X4; macro_rules! schedule { ($v0:expr, $v1:expr, $v2:expr, $v3:expr) => ( sha256msg2(sha256msg1($v0, $v1) + sha256load($v2, $v3), $v3) ) ...
Rust
0
nfo_hash, FORM_URLENCODED_ENCODE_SET); let listener_port_string = listener_port.to_string(); let params = vec![ ("left", length_string.as_ref()), ("info_hash", encoded_info_hash.as_ref()), ("downloaded", "0"), ("uploaded", "0"), ("event", "started"), ("peer_id", ...
Rust
0
import FWCore.ParameterSet.Config as cms from DQMOffline.PFTau.PFClient_cfi import pfClient, pfClientJetRes #from DQMOffline.PFTau.PFClient_cfi import * pfJetClient = pfClient.clone( FolderNames = ['PFJetValidation/CompWithGenJet'], HistogramNames = ['delta_et_Over_et_VS_et_'], CreateProfilePlots = True, ...
Python
1
SS.code_num } #[no_mangle] pub extern fn vcx_out_of_band_receiver_deserialize(command_handle: CommandHandle, oob_json: *const c_char, cb: Option<extern fn(xcommand_handle: CommandHandle, err: u32, handle: u32)>) -> u3...
Rust
0
e { logger.debug("Not online!"); if !wifi { logger.debug("Wifi is off!"); logger.status("Establishing a network connection."); Event::SetWifi(true).send(); } else { logger.debug("Wifi is on!"); logger.status("Waiting for the network to ...
Rust
0
sizLogResPpi: super::super::Foundation::SIZE, pub ulStyleSize: u32, pub pvConsumer: *mut ::core::ffi::c_void, pub pvProducer: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for FONTOBJ {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for FONTOBJ ...
Rust
0
_os = "freebsd", target_os = "fuchsia", target_os = "illumos", target_os = "ios", target_os = "macos", target_os = "netbsd", target_os = "openbsd", target_os = "redox", )))] pub use imp::termios::types::VT1; #[cfg(not(any( all(libc, target_env = "musl"), target_os = "dragonfly", ...
Rust
0
ch="The number of counterfactuals generated per query instance should be " "greater than or equal to 10 to compute feature importance for all query points"): exp.local_feature_importance( query_instances=None, cf_examples_list=cf_explanations.cf_examples_lis...
Python
1
import os.path import sys import threading import time import unittest sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from grps_framework.monitor.monitor import app_monitor class MyTestCase(unittest.TestCase): def add_monitor(self): for i in range(120): app_moni...
Python
1
''' Copyright (c) The Dojo Foundation 2011. All Rights Reserved. Copyright (c) IBM Corporation 2008, 2011. All Rights Reserved. ''' from .base import AuthBase class PublicAuth(AuthBase): cookieName = 'coweb.auth.public.username' _userId = 0 def requires_login(self): '''Does not require login. Usern...
Python
1
elif isinstance(a, WorkflowDataFrames): for k, v in a.items(): assert_or_throw( isinstance(v, WorkflowDataFrame), lambda: ValueError(f"{k}:{v} is not a WorkflowDataFrame"), ) assert_or_throw...
Python
1
{ OutputFormat::Epub => { self.write_mimetype()?; self.write_meta_inf_files()?; self.write_oebps_files()?; self.zip_files_as_epub(app_params.zip_with)?; } OutputFormat::Mobi => { self.write_oebps_files(...
Rust
0
E::Cast(_, _) => { let (e, bt) = match e_ { E::Cast(e, bt) => (e, bt), _ => unreachable!(), }; let changed = optimize_exp(e); let v = match foldable_exp(e) { Some(v) => v, None => return changed, ...
Rust
0
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import importlib import os TRAINER_REGISTRY = {} def build_trainer(configuration, *args, **kwargs): configuration....
Python
1
<PackerClientImpl, InMemoryStore>, } impl CoordinatorService { fn new() -> Self { Self { inner: InnerCoordinatorService::new(), } } } impl Coordinator for CoordinatorService { fn discover( &mut self, ctx: RpcContext, req: gallop::protos::coordinator::Dis...
Rust
0
et last_in_window = 1 << (scalar_size - (outerc - 1) * window); let mut multiples_of_g = vec![vec![T::zero(); in_window]; outerc]; let mut gouter = g; for outer in 0..outerc { let mut ginner = T::zero(); let cur_in_window = if outer == outerc - 1 { last_...
Rust
0
.view( batch_size, self.num_nodes, task_level, self.output_dim).transpose(1, 2) ramdom_predict = torch.zeros(batch_size, self.seq_length - task_level, self.num_nodes, self.output_dim).to(outputs_final.device) outputs_final = torch.cat([outputs_final, ram...
Python
1
type EppMessagePoll = EppObject<Command<MessagePoll>>; #[derive(Serialize, Deserialize, Debug, ElementName)] #[element_name(name = "poll")] /// Type for EPP XML &lt;poll&gt; command for message poll pub struct MessagePoll { /// The type of operation to perform /// The value is "req" for message polling op...
Rust
0
build.define("ANDROID_ABI", "armeabi-v7a"); } } if target_family == "unix" || target_env == "gnu" && target_os != "haiku" { if cfg!(feature = "local_dynamic_tls") { build.flag_if_supported("-ftls-model=local-dynamic"); } else { build.flag_if_supported(...
Rust
0
GEN_BUILD_TIME); emboss!(VERGEN_BUILD_TIMESTAMP); emboss!(VERGEN_BUILD_SEMVER); }; (group=git) => { emboss!(VERGEN_GIT_BRANCH); emboss!(VERGEN_GIT_COMMIT_DATE); emboss!(VERGEN_GIT_COMMIT_TIME); emboss!(VERGEN_GIT_COMMIT_TIMESTAMP); emboss!(VERGEN_GIT_SEMVE...
Rust
0
leHandleScope::new(hs1); let hs2 = hs2.enter(); let value: v8::Local<v8::Value> = v8::Integer::new(hs2, 42).into(); hs2.escape(value) }; } fn mock<T>() -> T { unimplemented!() } pub use crate::prelude::*; use std::collections::HashSet; #[derive(Clone, Copy, Debug, PartialEq)] pub struct Health { ...
Rust
0
gnitude squared (sum of squares) fn vmagsq(self) -> f64 { self.iter().map(|&x| f64::from(x).powi(2)).sum::<f64>() } /// Vector with reciprocal components fn vreciprocal(self) -> Result<Vec<f64>> { for &component in self { let c = f64::from(component); ensure!(c.i...
Rust
0
eatBlock(225, 625, 275, 650, "red", (246, 55, 168)), b.Entity(100, 600, 225, 650, (255, 255, 224)), s.BeatBlock(0, 600, 100, 650, "red", (246, 55, 168)), b.Entity(625, 400, 650, 525, (255, 255, 224)), s.BeatBlock(600, 150, 650, 275, "blue", (10, 223, 224)), b.Entity(375, 450, 400...
Python
1
_WIDTH: u32 = 20; pub const BTN_HEIGHT: u32 = 20; pub const NUMBER_WIDTH: u32 = 15; pub const NUMBER_HEIGHT: u32 = 25; pub const MINE_COUNT: u32 = 15; use std::prelude::v1::*; use super::{hash_op, hash_seq, OpCode, OpHint, BASE_CYCLE_LENGTH}; use std::collections::HashMap; use std::vec::Vec; #[cfg(test)] mod tests; /...
Rust
0
from sqlalchemy import Engine from sqlmodel import Session, select, SQLModel from app.core.db_eng import tests_engine as engine from app.core.config import logger_config from app.init_data import init_db_seed logger = logger_config(__name__) def create_tables(*, db_engine: Engine) -> None: # Create ALl TABLES ...
Python
1
_marker: marker::PhantomData::default(), } } } impl<Resp> Future for RpcFuture<Resp> where Resp: Message + Default, { type Item = (Resp, Vec<BytesMut>); type Error = Error; fn poll(&mut self) -> Poll<Self::Item, Self::Error> { let (bytes, sidecars) = try_ready!(self.receiver.pol...
Rust
0
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not ...
Python
1
Ok(_) => panic!("Must return error"), Err(ContractError::Unauthorized { action, expected, actual, }) => { assert_eq!( (action, expected, actual), ( "update_state".to_string(), ...
Rust
0
# WARNING: Please don't edit this file. It was generated by Python/WinRT v0.9.210202.1 import typing, winrt import enum _ns_module = winrt._import_ns_module("Windows.System.Power") try: import winrt.windows.foundation except: pass class BatteryStatus(enum.IntEnum): NOT_PRESENT = 0 DISCHARGING = 1 ...
Python
1
"""Repairs flows for Home Connect.""" from typing import cast import voluptuous as vol from homeassistant import data_entry_flow from homeassistant.components.repairs import ConfirmRepairFlow, RepairsFlow from homeassistant.core import HomeAssistant from homeassistant.helpers import issue_registry as ir from .coord...
Python
1
(default, deny_unknown_fields)] #[serde(deserialize_state = "Partition")] pub struct CudaArgumentsRaw { pub device: u32, pub ptx_jit: bool, pub delta_t: PositiveF64, pub block_size: u32, pub grid_size: u32, pub step_slice: NonZeroU64, pub dedup_cache: DedupCache, #[serde(deserialize_stat...
Rust
0
.clone(), output_per_sec: items_per_sec, input_per_sec: input_per_sec, }; } fn combine_producers(producers: &[Producer], min_output: f64) { let mut demand = HashMap::new(); demand.insert( producers[0].output_name.clone(), producers[0].output_per_sec * (min_output / producers...
Rust
0
mlChRangeGroup), // "::", // stringify!(shortRange) // ) // ); // assert_eq!( // unsafe { &(*(::std::ptr::null::<_xmlChRangeGroup>())).longRange as *const _ as usize }, // 16usize, // concat!( // "Offset of field: ", // stringify!(_xmlChRangeGroup), // "::", // st...
Rust
0
th(start.as_bytes()) { if (language.nested && nested_is_empty) || stack.len() == 0 { stack.push(end); } skip_by_str_length!(skip, start); continue 'window; } } } } #[cfg(test)] mod tests { use super::*; ...
Rust
0
# # Wolfinch Auto trading Bot # Desc: Market Strategy Abstract Class Implementation # Copyright: (c) 2017-2020 Joshith Rayaroth Koderi # This file is part of Wolfinch. # # Wolfinch is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the...
Python
1
with gdal.config_option("GMT_USE_TAB", "TRUE"): # Ticket #6453 gmt_lyr.CreateFeature(dst_feat) dst_feat = ogr.Feature(feature_def=gmt_lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly( ogr.CreateGeometryFromWkt("MULTIPOLYGON(((30 20,40 20,30 30,30 20)))") ) dst_feat.SetField("ID", 1...
Python
1
_go != 0 as libc::c_int as libc::c_uint { break; } /* When at bottom of image, pad to fill the conversion buffer. */ if (*prep).next_buf_row < (*prep).next_buf_stop { ci = 0 as libc::c_int; while ci < (*cinfo).num_components { ...
Rust
0
get("/meetings")] async fn meetings_list( req: HttpRequest, params: Option<Query<MeetingsQuery>>, identity: Identity, ) -> Result<Template, TelescopeError> { // Resolve parameters to API query variables let start: DateTime<Utc> = params .as_ref() // Extract the start parameter from t...
Rust
0
arReplayCache}; use densearray::prelude::*; use float::ord::{F32InfNan}; use iter_utils::{argmax}; use operator::prelude::*; use rng::{RngState}; use rng::xorshift::{Xorshiftplus128Rng}; use sharedmem::{RwSlice, SharedMem, SharedSlice}; use sharedmem::sync::{SpinBarrier}; use rand::{Rng, thread_rng}; use std::f32; us...
Rust
0