text
string
label_name
string
labels
int64
nput=( Template( INPUT_PROMPTS[gt_task["step_name"]] ).render( user_intent=user_intent, context=user_prompt,...
Python
1
ion (if not, then readonly) readonly: metadata .permissions .map(FilePermissions::is_readonly) .unwrap_or(true), accessed: metadata.accessed.map(u128::from), modified: metadata.modified.map(u128::from), created: None, }))) } async fn proc_run<F>( ...
Rust
0
, cmd); } lit_pixels(&screen) } fn part2(input: &str) -> String { let mut screen = new_screen(50, 6); for cmd in parse(input).iter() { execute(&mut screen, cmd); } screen_to_string(&screen) } fn main() { let mut input = String::new(); io::stdin().read_to_string(&mut input).unwr...
Rust
0
const G_VOLUME_MONITOR_EXTENSION_POINT_NAME: *const c_char = b"gio-volume-monitor\0" as *const u8 as *const c_char; // Flags pub type GAppInfoCreateFlags = c_uint; pub const G_APP_INFO_CREATE_NONE: GAppInfoCreateFlags = 0; pub const G_APP_INFO_CREATE_NEEDS_TERMINAL: GAppInfoCreateFlags = 1; pub const G_APP_INFO_C...
Rust
0
as *mut opj_j2k_t; if l_j2k.is_null() { return 0 as *mut opj_j2k_t; } (*l_j2k).m_is_decoder = 1 as libc::c_int; (*l_j2k) .m_cp .set_m_is_decoder(1 as libc::c_int as OPJ_BITFIELD); /* in the absence of JP2 boxes, consider different bit depth / sign */ /* per component is allowed */ (*l_j2k) ...
Rust
0
rapFS(MemoryFS()) fs.makedir('course') fs.makedir('course/static') # Video XBlock requires this directory to exists, to put srt files etc. old_export_fs = block.runtime.export_fs block.runtime.export_fs = fs if hasattr(block, 'export_to_file'): old_export_to_file = block.export_to_file ...
Python
1
import torch.nn as nn from machina.utils import get_device class BaseSAVfunc(nn.Module): """ Base function of State Action Value Function. It takes observations and actions and then output value. For example Q Func. Parameters ---------- observation_space : gym.Space action_space : g...
Python
1
code(1000, src); let src = looped.as_ref(); if is_profiling() { for _ in 0..10000 { runtime.execute("inner_loop", src).unwrap(); let future = runtime.run_event_loop(); tokio_runtime.block_on(future).unwrap(); } } else { b.iter(|| { runtime.execute("inner_loop", src).unwrap(); ...
Rust
0
ues() { let a = Matrix::new(2, 3, vec![1.0; 6]); let _ = a.eigenvalues(); } #[test] #[should_panic] fn test_non_square_eigendecomp() { let a = Matrix::new(2, 3, vec![1.0; 6]); let _ = a.eigendecomp(); } #[test] #[should_panic] fn test_non_square_lup_de...
Rust
0
""" UI vendor specific commands package. """ __all__ = []
Python
1
_left.len() + div_right.len() + 1) * words.len(); String::with_capacity((chars_src + chars_hl) * 4) }; let mut char_offset = 0; for (word_offset, word) in words.iter().enumerate() { match rmatches.iter().find(|m| m.offset == word_offset) { Some(rmatch) => { let m...
Rust
0
ACHMENT, format: surface.get_preferred_format(&adapter).unwrap(), width: size.width, height: size.height, present_mode: wgpu::PresentMode::Fifo, }; surface.configure(&device, &config); let (diffuse_bind_group, texture_bind_group_layout, diffuse_texture) = State::update_canvas...
Rust
0
w's"] if __name__ == "__main__": # train_sam_tok() # train_new_sam_tok() # tok = Tokenizer() # tok.load("SAM/model.pickle") # print(tok.vocab) # for special in specials_list: # tok.add(special) # tok.add(" [STOP]") # tok.save("SAM/model.pickle") # print(tok.vocab) # tr...
Python
1
import numpy as np from embetter.base import EmbetterBase class ColorHistogramEncoder(EmbetterBase): """ Encoder that generates an embedding based on the color histogram of the image. Arguments: n_buckets: number of buckets per color **Usage**: ```python import pandas as pd fro...
Python
1
:ctxt, method_map: typeck::method_map, expr_id: ast::NodeId, expr_span: Span, expr_ty: ty::t, def: ast::Def) -> cmt { let mcx = &mem_categorization_ctxt { tcx: tcx, method_map: method_map }; return mcx.cat_def(expr_id, expr_span, expr_ty, def); } pub trait ast_node { fn id(...
Rust
0
import requests import boto3 from gtts import gTTS # ID ID_desejado = "673fdd623daec7efa53aa673" api_url = "https://projeto-backend.fly.dev/noticias" response = requests.get(api_url) if response.status_code == 200: noticias = response.json() # ID especifico noticia_encontrada = None for noticia in...
Python
1
# Copyright (c) Meta Platforms, Inc. and affiliates. # This software may be used and distributed according to the terms of the Chameleon License Agreement. import hashlib import subprocess import sys from pathlib import Path def download_file(url: str, output_path: Path): print(f"Downloading {output_path}") ...
Python
1
f64, b: f64) { assert!((a - b).abs() < 1e-5); } pub fn assert_unsort_eq<T: Debug + Ord>(mut a: Vec<T>, mut b: Vec<T>) { a.sort(); b.sort(); assert_eq!(a, b); } #[macro_use] extern crate clap; extern crate git2; #[macro_use] extern crate text_io; use clap::{Arg, App, SubCommand}; use git2::Repository;...
Rust
0
reate_individual(ent.text.strip(), loc_class) triples.append((indiv, loc_class, { "hasName": ent.text.strip(), "hasLocationType": loc_class }, {})) elif ent.label_ == "DATE": date_data = {"hasLabelDate": ent.text} try: ...
Python
1
relic.com", "EU" => "insights-collector.eu01.nr-data.net", _ => return Err(anyhow!("invalid region: {}", region)), }; let endpoint = format!("https://{}/v1/accounts/{}/events", host, account); let endpoint = Url::parse(&endpoint)?; let mut headers = HeaderMap...
Rust
0
<save_latest_freq> iterations # print('saving the latest model (epoch %d, total_iters %d)' % (epoch, total_iters)) # save_suffix = 'iter_%d' % total_iters if opt.save_by_iter else 'latest' # model.save_networks(save_suffix) iter_data_time = time.time() ...
Python
1
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT """Sample code and test for adafruit_ina219""" import time import board from adafruit_ina219 import ADCResolution, BusVoltageRange, INA219 i2c_bus = board.I2C() ina219 = INA219(i2c_bus) print("ina219 test") # display so...
Python
1
# -*- coding: utf-8 -*- from typing import Optional from transformers.configuration_utils import PretrainedConfig class AlibiConfig(PretrainedConfig): model_type = 'transformer-project_fox' keys_to_ignore_at_inference = ['past_key_values'] def __init__( self, vocab_size: int = 32000, ...
Python
1
K_PIPELINE_VERTEX_INPUT_STATE_CREATE_FLAG_BITS_MAX_ENUM = 0x7fffffff; } } /// See [`VkPipelineVertexInputStateCreateFlags`](https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkPipelineVertexInputStateCreateFlags) pub type VkPipelineVertexInputStateCreateFlagBits = VkPipelineVertexInputS...
Rust
0
gnaw_lib::run(&args) .with_context(|| format!("\n\targs were: {:?}\n\ttest was: {:?}", &args, &test)) .expect("gnaw_lib::run should succeed"); let output = std::fs::read_to_string(&output) .with_context(|| format!("while reading tempfile: {}", output.display())) ....
Rust
0
int("Estudiante: Efren Bohorquez") print("=" * 50) # Conectar client, db = conectar_mongodb() if not client: return try: while True: # Mostrar resumen colecciones = mostrar_resumen(db) print(f"\n🔧 OPCIONES:") pri...
Python
1
ght 2012-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http...
Rust
0
from toee import * from combat_standard_routines import * def san_dialog( attachee, triggerer ): if ((not attachee.has_met(triggerer)) or (game.global_flags[129] == 1)): triggerer.begin_dialog( attachee, 1 ) else: triggerer.begin_dialog( attachee, 200 ) return SKIP_DEFAULT def san_first_heartbeat( attachee, ...
Python
1
WM_CLOSE => { DestroyWindow(hwnd); LRESULT(0) } WM_DESTROY => { PostQuitMessage(0); LRESULT(0) } _ => DefWindowProcW(hwnd, message, wparam, lparam), } } /// The actual work to be done on the clipboard. Note that this _will_ be...
Rust
0
- y); self.apply_paint(x, center_y + dist_y); self.apply_paint(x, center_y - dist_y); } } DLASymmetry::Both => { let center_x = self.map.width / 2; let center_y = self.map.height / 2; if x ==...
Rust
0
from .common import InfoExtractor from ..utils import ( clean_html, int_or_none, ) class TVCIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?tvc\.ru/video/iframe/id/(?P<id>\d+)' _EMBED_REGEX = [r'<iframe[^>]+?src=(["\'])(?P<url>(?:http:)?//(?:www\.)?tvc\.ru/video/iframe/id/[^"]+)\1'] _TEST = {...
Python
1
"""Code generation module.""" from langchain.chains import LLMChain from langchain.prompts import PromptTemplate class CodeGenerator: """Generator for code content.""" def __init__(self, llm_service): """Initialize code generator. Args: llm_service: LLM service instanc...
Python
1
], merch_escrow_pub_key: secp256k1::PublicKey, merch_dispute_key: secp256k1::PublicKey, merch_pub_key_hash: [u8; 20], merch_payout_pub_key: secp256k1::PublicKey, new_state: State, old_state: State, fee_cc: i64, pt_old: &[u8], cust_escrow_pub_key: secp256k1::PublicKey, cust_payout...
Rust
0
p) = pipes::stream(); let child = task::spawn(|move ch| start(ch) ); let c = p.recv(); } <reponame>wm5713/blogs // Copyright 2017-2019 Parity Technologies (UK) Ltd. // This file is part of Substrate. // Substrate is free software: you can redistribute it and/or modify // it under the terms of the GNU General ...
Rust
0
n been modified to function with PyDiGraph inputs instead of Graph. use fixedbitset::FixedBitSet; use std::iter::FromIterator; use std::marker; use hashbrown::{HashMap, HashSet}; use super::NodesRemoved; use pyo3::prelude::*; use petgraph::stable_graph::NodeIndex; use petgraph::stable_graph::StableGraph; use petgr...
Rust
0
import datetime import functools import os import subprocess import sys from django.utils.regex_helper import _lazy_re_compile # Private, stable API for detecting the Python version. PYXY means "Python X.Y # or later". So that third-party apps can use these values, each constant # should remain as long as the oldest ...
Python
1
m_tokens, dtype=torch.int32, device=device) # 步骤 5: 启动【新的 V3 优化内核】 grid = lambda META: (triton.cdiv(num_elements, META['BLOCK_SIZE_ROWS']),) # 调用新的内核,并传入新参数 permute_fused_gather_and_map_kernel_v3[grid]( input_tensor, sorted_row_id_result, permuted_output, row_id_map...
Python
1
import torch from TTS.api import TTS model='tts_models/en/ljspeech/fast_pitch' device = "cuda" if torch.cuda.is_available() else "cpu" def generate_audio(text="A journey of a thousand miles begins with a little single step"): tts = TTS(model_name=model).to(device) tts.tts_to_file(text=text, file_path='output...
Python
1
import time import requests import telebot ultimos_resultados = [] check_resultados = [] ultima_aposta = None # Variável para rastrear a última aposta token = '5597794728:AAGfwOg3RijfPrQ5S_Iw6NKAuYucNEdIsO8' #fox bot chat_id = '-1001808094144' texto4 = """ ⚠️ ANALISANDO ENTRADAS⚠️ 🎰 Roleta: Brasileira 🖥 Link ...
Python
1
CleaningTimedRotatingFileHandler seriallog_handler = CleaningTimedRotatingFileHandler( self._settings.get_plugin_logfile_path(postfix="serial"), when="D", backupCount=3, ) seriallog_handler.setFormatter(logging.Formatter("%(asctime)s %(message)s")) s...
Python
1
detailed_interpretation( buy_signals, sell_signals, confluences, current_price, trend, alma_window, alma_offset, alma_sigma ) # Display Interpretations st.markdown("##### 📄 指标解读") # Tabs for English and Chinese tab1, tab2 = st.tabs(["🇨🇳 中文", "🇺🇸 English"]) with tab1: ...
Python
1
ex) .expect("Failed to read line"); let index: usize = index .trim() .parse() .expect("Index entered was not a number"); let element = a[index]; println!( "The value of the element at index {} is: {}", index, element ); } fn five() -> i32 { 5 } fn...
Rust
0
pty(n_lags, float64) for i_lag in range(n_lags): lag = lags[i_lag] ii, jj = where(dist, lag, tol) if len(ii) > 0: cov[i_lag] = covxy(x[ii], y[jj]) else: cov[i_lag] = np.nan return cov # ---------------------------------------------------------- """ He...
Python
1
{"@href": "http://old-merge-url.com"}}], ): new_merge, details = handle_merge_check(service, env_alias, url_rss) assert new_merge #noqa: S101 assert details["url_last_merge"] == "http://old-merge-url.com" #noqa: S101 def test_get_entries_from_rss_key_error(rss_response: st...
Python
1
meta])* ($($vis:tt)*) struct $name:ident([$t:ty]); no default BitRange; impl Debug; $($rest:tt)*) => { impl<T: AsMut<[$t]> + AsRef<[$t]> + $crate::fmt::Debug> $crate::fmt::Debug for $name<T> { bitfield_debug!{struct $name; $($rest)*} } bitfield!{$(#[$attribute])* ($($vis)*) struct $...
Rust
0
import os from openai import OpenAI from dotenv import load_dotenv # ✅ Load .env file from root project directory load_dotenv(dotenv_path=os.path.join(os.path.dirname(__file__), "..", ".env")) client = OpenAI( api_key=os.getenv("AZURE_OPENAI_KEY"), base_url=os.getenv("AZURE_OPENAI_ENDPOINT"), default_head...
Python
1
mption_list(db, KEY_BOOK_EXEMPTIONS, book_exemptions) author_exemptions = library_config.get(KEY_AUTHOR_EXEMPTIONS, []) return book_exemptions, author_exemptions def set_exemption_list(db, config_key, exemptions_list): library_config = get_library_config(db) library_config[config_key] = exemptions_lis...
Python
1
from itertools import combinations def f(x): p = 25 <= x <= 73 q = 75 <= x <= 118 a = a1 <= x <= a2 return (a and (not q)) <= (p or q) ans = [] line = [x + eps for x in range(24, 119) for eps in (0, 0.1, 0.9)] for a1, a2 in combinations(line, 2): if all(f(x) for x in line): ans.append(a2...
Python
1
from __future__ import annotations import time, threading, statistics from dataclasses import dataclass from typing import Callable, Dict, Any, Optional, List from PySide6.QtCore import QObject, Signal @dataclass class BenchPlan: # 地址 mode: str # 'broadcast' | 'short' | 'group' addr_val: Op...
Python
1
() as f64; assert!(n > 0.0); v.iter().fold(1.0, |acc, x| acc * x).powf(1.0/n) } fn meadian(v: &Vec<f64>) -> f64 { let n = v.len(); assert!(n > 0); let h = (n + n % 2) / 2; let mut v2 = v.clone(); v2.sort_unstable_by(|a, b| a.partial_cmp(b).unwrap()); *v2.get(h-1).unwrap() } fn f(v: &Ve...
Rust
0
eModel.bn1(out) out = self.baseModel.relu(out) out = self.baseModel.maxpool(out) out = self.attention1(self.baseModel.layer1(out)) # Applying spatial attention to layer 1 out = self.attention2(self.baseModel.layer2(out)) # Applying spatial attention to layer 2 out = self.baseM...
Python
1
(exclusive). pub async fn truncate(&self, sequence: u64) -> Result<()> { self.inner.channel.on_truncate(sequence.into()).await? } } struct StreamInner { engine: Engine, stream_client: StreamClient, transport: Transport, channel: EventChannel, } #[derive(Debug)] pub struct EpochStateSt...
Rust
0
def proper_whitespaces(text): return re.sub('\\s([?.!"](?:\\s|$))', '\\1', text.strip())
Python
1
"""Coordinator for Daikin integration.""" from datetime import timedelta import logging from pydaikin.daikin_base import Appliance from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.update_coordinator import DataUpdateCoordinator from .const ...
Python
1
pub fn new() -> Self { Self::default() } } impl<State: Send + Sync + 'static> Middleware<State> for CookiesMiddleware { fn handle<'a>( &'a self, mut ctx: Request<State>, next: Next<'a, State>, ) -> BoxFuture<'a, Response> { Box::pin(async move { let ...
Rust
0
eleased() { return None; } let active_window = std::mem::take(&mut internal_state.active_drag_window)?; let drop_location = match std::mem::take(&mut internal_state.active_drop_location) { Some(drop_location) => drop_location, None => { let po...
Rust
0
_GROUP, ) -> ::std::os::raw::c_int; } extern "C" { pub fn EC_KEY_parse_parameters(cbs: *mut CBS) -> *mut EC_GROUP; } extern "C" { pub fn EC_KEY_get_ex_new_index( argl: ::std::os::raw::c_long, argp: *mut ::std::os::raw::c_void, unused: *mut CRYPTO_EX_unused, dup_unused: CRYPTO...
Rust
0
_eq!( Ufvk::parse_internal(Ufvk::MAINNET, &encoded[..]), Err(ParseError::DuplicateTypecode(Typecode::Sapling)) ); } #[test] fn only_transparent() { // Raw encoding of `Ufvk(vec![Fvk::P2pkh([0; 65])])`. let encoded = vec![ 0xc4, 0x70, 0xc8, 0x7a, 0...
Rust
0
float: """Generate a price using common pricing strategies. Returns: A price following common pricing strategies like .99 endings """ min_price = self._min_price max_price = self._max_price # Use different price points based on common retail pricing strategie...
Python
1
crate::Writable for AUDIO_STATUS {} #[doc = "DMIC and OD Status Register"] pub mod audio_status; #[doc = "DMIC Configuration Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::writ...
Rust
0
s), _ => None } } fn to_bytes(&self, mut v: &mut Vec<u8>) { v.push(*self as u8); } } #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum QuoteCancelType { CancelForSymbol = b'1' as isize, CancelForSecurityType = b'2' as isize, CancelForUnderlyingSymbol = b'3' as i...
Rust
0
{fixed_point::*, geometry::*}, }; use nalgebra::{Matrix4, Vector2, Vector4}; pub static mut TRIANGLE_MASK: bool = false; pub static mut COUNTER: i64 = 0; const MAX_ATTRIBUTES: usize = 12; const MAX_USED: usize = MAX_ATTRIBUTES / 3; const MAX_GLOBALS: usize = 4; ///Standard index values for certain common attributes ...
Rust
0
# -*- coding: utf-8 -*- """Submodule containing the implementation for the FingerprintAdapter. This file contains an implementation of a Transport Adapter that validates the fingerprints of SSL certificates presented upon connection. """ from thirdparty.requests.adapters import HTTPAdapter from .._compat import poolm...
Python
1
^2"); } #[test] fn units_30() { test_eval("1 lb^-1", "1 lb^-1"); } #[test] fn units_31() { test_eval("2 lb^-1", "2 lb^-1"); } #[test] fn units_32() { test_eval("2 lb^-1 kg^-1", "0.90718474 lb^-2"); } #[test] fn units_33() { test_eval("1 lb^-1 kg^-1", "0.45359237 lb^-2"); } #[test] fn units_34() { ...
Rust
0
liary", comp_subtype="Normal", depends_on={"n2o_waste_emissions_intensity": 1, "gdp_real_9r": 1}, ) def n2o_waste_emissions_by_gdp(): """ N2O_waste_emissions_by_GDP """ return n2o_waste_emissions_intensity() * gdp_real_9r() @component.add( name="N2O WASTE EMISSIONS HISTORICAL DATA", un...
Python
1
f = BufReader::new(f); for (i, line) in f.lines().enumerate() { if i % 10000 == 0 { eprint!("# of sentences: {}\r", i); stderr().flush()?; } let s = Sentence::from_partial_annotation(line?)?; let s = if args.no_norm { ...
Rust
0
"""In this example we plot a record's annotations on top of the curve of the local GC content in the record's sequence. """ import matplotlib.pyplot as plt from DnaPlotVisualization import BiopythonTranslator from Bio import SeqIO import numpy as np def plot_local_gc_content(record, window_size, ax): """Plot wind...
Python
1
(&inners) .map(|(n, inner)| { assert_eq!(n % inner, 0); let len = n / inner; lens.push(len); egraph.add(ENode::leaf(Cad::Num(len.into()))) }) .collect(); // println!("lens: {:?}, {:?}", lens, xs); assert_eq!(lens.iter().product::<usize>(), ...
Rust
0
181bc330; assert_eq!( decode_compact_bits(n_bits), BigInt::parse_bytes(b"1bc330000000000000000000000000000000000000000000", 16).unwrap() ); let n_bits = 0x01003456; assert_eq!( decode_compact_bits(n_bits), ToBigInt::to_bigint(&0x00).unwrap...
Rust
0
# -*- coding: utf-8 -*- from django.db import models, migrations from django.conf import settings import django.core.validators class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
Python
1
is `REF1_16VDD`"] #[inline(always)] pub fn is_ref1_16vdd(&self) -> bool { *self == REFSEL_A::REF1_16VDD } #[doc = "Checks if the value of the field is `REF3_16VDD`"] #[inline(always)] pub fn is_ref3_16vdd(&self) -> bool { *self == REFSEL_A::REF3_16VDD } #[doc = "Checks i...
Rust
0
its are being tested. The"] #[doc = " event group must have previously been created using a call to"] #[doc = " xEventGroupCreate()."] #[doc = ""] #[doc = " @param uxBitsToSet The bits to set in the event group before determining"] #[doc = " if, and possibly waiting for, all the bits specified by t...
Rust
0
n_ser::serialize_structure_crate_model_aws_s3_bucket_website_configuration_routing_rule(&mut object_2144, item_2143)?; object_2144.finish(); } } array_2142.finish(); } Ok(()) } pub fn serialize_structure_crate_model_aws_s3_bucket_notification_configuration( objec...
Rust
0
for j, faiss_idx in enumerate(indices[0]): if faiss_idx >= len(faiss_idx_to_node_idx): continue # 转换FAISS索引到原始节点索引 idx = faiss_idx_to_node_idx[faiss_idx] # 安全地获取item_id i...
Python
1
# Dictionary of movies movies = [ { "name": "Usual Suspects", "imdb": 7.0, "category": "Thriller" }, { "name": "Hitman", "imdb": 6.3, "category": "Action" }, { "name": "Dark Knight", "imdb": 9.0, "category": "Adventure" }, { "name": "The Help", "imdb": 8.0, "category": "Drama" }, { "name": "The Choice", "imdb": 6.2, ...
Python
1
notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ...
Rust
0
ta_ready() has been busy waiting for a long time... is there a device/driver problem? (status: {:?})", status); } continue; } if status.intersects(AtaStatus::DATA_REQUEST_READY) { return Ok(()); // ready to go! } } } /// Waits until this bus is finished transferring data (either read or write)...
Rust
0
either nonzero nonce, or nonempty code, then the creation /// throws immediately, with exactly the same behavior as would arise if the /// first byte in the init code were an invalid opcode. This applies /// retroactively starting from genesis. /// /// See: EIP 684 pub fn can_create<B: DB + 'static>( state_provider...
Rust
0
#[derive(Debug, PartialOrd, PartialEq, Eq, Clone, Hash)] pub enum KeyEvent { Backspace, Left, Right, Up, Down, Home, End, PageUp, PageDown, BackTab, Delete, Insert, F(u8), Char(char), Alt(char), Ctrl(char), Null, Esc, CtrlUp, CtrlDown, ...
Rust
0
ce_type, }); } #[derive(Clone)] pub struct AdditionalGameStateInformation { pub stm_incheck: bool, } pub const MAX_MOVES: usize = 128; pub struct MoveList { pub move_list: Vec<GradedMove>, } impl Default for MoveList { fn default() -> Self { let move_list = Vec::with_capacity(MAX_MOVES); ...
Rust
0
d - np.sum(u_hat_i)), ord=2) ** 2 ) BIC[l] = 2 * T * np.log(sigerror[l]) + (3 * (l + 1)) * np.log(2 * T) if l > 0: if BIC[l] > BIC[l - 1]: SC2 = 1 elif self.stopc == 4: ...
Python
1
tor_logger.info("✉️ No new findings in this cycle, skipping summary notification.") # Save state (notified_finding_ids) using the cycle's output directory (which is self.output_dir, updated) save_notified_finding_ids(str(self.output_dir), notified_finding_ids) sleep_for = max(10.0,...
Python
1
""" Classifies: CHEBI:36916 cation """ from rdkit import Chem def is_cation(smiles: str): """ Determines if a molecule is a cation based on its SMILES string. A cation is defined as a monoatomic or polyatomic species having one or more elementary charges of the proton. Args: smiles (str): SMIL...
Python
1
n, k = map(int, input().split()) if n >= k: exit(print(0)) arr = list(map(int, input().split())) tab = [0] * n cnt = maximum = 0 # 안 쓰는 걸 먼저 뽑음 while arr: i = arr[0] # 있으면 pass if i in tab: arr.remove(i) continue # 멀티탭이 비었으면 꽂아줌 elif 0 in tab: tab[tab.index(0)] = i ...
Python
1
xC05CFF01u32 as HRESULT; pub const ERROR_SVHDX_UNIT_ATTENTION_CAPACITY_DATA_CHANGED: HRESULT = 0xC05CFF02u32 as HRESULT; pub const ERROR_SVHDX_UNIT_ATTENTION_RESERVATIONS_PREEMPTED: HRESULT = 0xC05CFF03u32 as HRESULT; pub const ERROR_SVHDX_UNIT_ATTENTION_RESERVATIONS_RELEASED: HRESULT = 0xC05CFF04u32 as HRESULT; pub co...
Rust
0
e_4396.start_list(true, None); for item_4398 in var_4397 { #[allow(unused_mut)] let mut entry_4400 = list_4399.entry(); entry_4400.string(item_4398); } list_4399.finish(); } #[allow(unused_mut)] let mut scope_4401 = writer.prefix("TargetCapacity");...
Rust
0
: HRESULT = 0x80092022; pub const CRYPT_E_INVALID_X500_STRING: HRESULT = 0x80092023; pub const CRYPT_E_NOT_CHAR_STRING: HRESULT = 0x80092024; pub const CRYPT_E_FILERESIZED: HRESULT = 0x80092025; pub const CRYPT_E_SECURITY_SETTINGS: HRESULT = 0x80092026; pub const CRYPT_E_NO_VERIFY_USAGE_DLL: HRESULT = 0x80092027; pub c...
Rust
0
e=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) return pipeline_response return AsyncItemPaged( get_next, extract_data ...
Python
1
</div> <div class="board-row"> {render_square(3)} {render_square(4)} {render_square(5)} </div> <div class="board-row"> {render_square(6)} {render_square(7)} {render_square(8)} ...
Rust
0
ruct Detected { pub inputs: HashSet<res::Any>, pub outputs: HashSet<res::Any>, } impl Detected { pub fn new() -> Detected { Detected::default() } pub fn add_input(&mut self, r: res::Any) { self.inputs.insert(r); } #[allow(dead_code)] pub fn add_output(&mut self, r: res...
Rust
0
_card_values(): if player := self._players.get(spot): player.set_cards(cards) logger.debug( "Player Cards for spot: %s, were set successfully", spot, ) def set_winnings(self) -> None: ...
Python
1
eWaitParams>())).reserved as *const _ as usize }, 76usize, concat!( "Offset of field: ", stringify!(cudaExternalSemaphoreWaitParams), "::", stringify!(reserved) ) ); } #[doc = " CUDA Error types"] pub use self::cudaError...
Rust
0
nitial/final block") self.rewriter.insert_after(node, f"assert {node.expr} inside {node.items};") if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("source", help="The source Verilog/SystemVerilog file to transform") args = parser.parse_args() with open(args.sou...
Python
1
b + surfeit' <= CAPACITY - 2, /// `` /// where /// `` /// surfeit' = log(num_limbs^2 * (num_add(L)+1) + 1). /// `` pub fn mul_by_constant_without_prereduce<CS: ConstraintSystemAbstract<ConstraintF>>( &self, mut cs: CS, other: &SimulationF, ) -> Result<NonNativeFi...
Rust
0
self.source.get(self.pos..).unwrap_or("") } } impl<'a> Iterator for Subtags<'a> { type Item = Subtag<'a>; fn next(&mut self) -> Option<Self::Item> { let part = self.parts.next()?; let part_len = part.len(); let start = self.pos; loop { match self.stage { ...
Rust
0
""" Description: This module is used to update the health file for the health check.\ The health file is checked by the healthcheck. Author: Martin Altenburger """ from datetime import datetime, timedelta from typing import Union from loguru import logger async def update_health_file( time_cycle: int, timest...
Python
1
or when disconnecting speaker: {}", why) } } async fn check_cleanup(frontend: Arc<Frontend>, cache: Arc<serenity::cache::Cache>) { log::trace!("Disconnecting inactive speakers"); let work_start_time = Instant::now(); let futures = frontend.backend_brain.speakers .iter() .flat_map(|speak...
Rust
0
in6_addr, } extern "C" { pub fn ares_set_servers( channel: ares_channel, servers: *mut ares_addr_node, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ares_set_servers_ports( channel: ares_channel, servers: *mut ares_addr_port_node, ) -> ::std::os::raw::c_int; } extern ...
Rust
0
'info_dict': { 'id': 'lumymmd', 'title': 'Lumy MMD', }, 'playlist_mincount': 1, }] def _entries(self, playlist_id, user_id, page): videos = self._download_json( 'https://api.iwara.tv/videos', playlist_id, note=f'Downloading page {p...
Python
1
, ArgMatches, Error, ErrorKind}; use rpassword::prompt_password_stderr; use solana_remote_wallet::{ remote_keypair::generate_remote_keypair, remote_wallet::{RemoteWalletError, RemoteWalletManager}, }; use solana_sdk::{ pubkey::Pubkey, signature::{ keypair_from_seed, keypair_from_seed_phrase_and_...
Rust
0