text
string
label_name
string
labels
int64
; extern crate byteorder; extern crate bytes; extern crate chan_signal; extern crate futures; extern crate futures_cpupool; extern crate hyper; extern crate itertools; extern crate positioned_io; extern crate rayon; extern crate rmp_serde as rmps; extern crate serde; extern crate simple_logger; extern crate tokio_core;...
Rust
0
wrap().ring_staking_lock.unbondings.len(), 2); }) } // #[deprecated] // #[test] // fn rebond_works() {} // #[deprecated] // #[test] // fn rebond_is_fifo() {} #[test] fn reward_to_stake_works() { ExtBuilder::default() .nominate(false) .fair(false) .build() .execute_with(|| { // Confirm validator count is...
Rust
0
} else { key = None; } let server = TcpServer::new_with_key("0.0.0.0:40788", key.as_deref()).unwrap(); if key.is_none() { let mut key_file = File::create(key_file).unwrap(); key_file.write_all(&server.key()).unwrap(); } println!("ready"); loop { match server.accep...
Rust
0
s( &self, access: &str, data: &mut dyn Read, ) -> Result<UnpaddedBytesAmount, SectorManagerErr> { OpenOptions::new() .read(true) .write(true) .open(access) .map_err(|err| SectorManagerErr::CallerError(format!("{:?}", err))) ...
Rust
0
*/ pub fn get_texture(&self, path: &str) -> Option<&Texture2D> { self.resources.get_texture(path) } pub fn load_ogg(&mut self, name: &str, data: &[u8], looped: bool) { self.resources.load_ogg(name, data, looped); } pub fn play_sound(&mut self, name: &st...
Rust
0
as u32; current_task.mm.write_object(UserRef::new(response_address), &response) } virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_MAP_BUFFER_GPU => { let (control, mut response): ( virtio_magma_map_buffer_gpu_ctrl_t, virtio_magma_ma...
Rust
0
# Koşullu ifadeler """ örn: Eğer hava yağmurlu ise: ceketimi giyeceğim Eğer hava güneşli ise: güneş gözlüğümü takacağım bunların hiçbiri değilse: normal bir şekilde dışarı çıkacağım """ yagmurlu = True; gunuseli= True; if yagmurlu and gunuseli==False: print("Ceketini giy") elif yagmurlu== False and ...
Python
1
import numpy as np from ..sequence.position_weight_matrix import PWM def parse_jaspar_line(line): letter, rest = line.split(maxsplit=1) rest = rest.strip()[1:-1].split() counts = [float(n) for n in rest] return letter.strip(), counts def read_jaspar_matrix(filename): f = open(filename) _ = f...
Python
1
#!/usr/bin/python # coding: utf-8 # ------------------------------------------------------------------- # aapanel # ------------------------------------------------------------------- # Copyright (c) 2015-2099 宝塔软件(http://www.aapanel.com) All rights reserved. # ----------------------------------------------------------...
Python
1
# Write a Python program to solve quadratic equation. import math a = float(input("Enter the coefficient of x^2: ")) b = float(input("Enter the coefficient of x: ")) c = float(input("Enter the coefficient of x^0: ")) # Check the equation quadratic or not if a == 0: print("Coefficient of x^2 cannot be 0") else: ...
Python
1
7_R(crate::FieldReader::new(bits)) } #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> PTDPE7_A { match self.bits { false => PTDPE7_A::_0, true => PTDPE7_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] ...
Rust
0
from dataclasses import dataclass, field from typing import List, Optional @dataclass class Panel: """Represents a single comic panel with description, dialogue, and scene details.""" panel_number: int scene_description: str dialogue: List[str] narration: Optional[str] = None image_path: ...
Python
1
rite_bytes(&**&self.rows))?; if let Some(ref s) = self.next_start_primary_key { w.write_with_tag(26, |w| w.write_bytes(&**s))?; } if let Some(ref s) = self.next_token { w.write_with_tag(34, |w| w.write_bytes(&**s))?; } Ok(()) } } #[derive(Debug, Default, PartialEq, Clone)] pub struct Comput...
Rust
0
Arc; use http::StatusCode; use tokio::sync::RwLock; use crate::db::DbPool; use crate::error::{Result}; use crate::fetch; use crate::model::song_like::SourceMetadataDetermination; mod song_like_handler; type Dissects = Arc<Vec<SourceMetadataDetermination>>; type Spotify = Arc<RwLock<super::model::spotify::Spotify>>;...
Rust
0
tains: # # - key_type: hash, set, list, sorted_set, etc. # # - key_tpl: Key generation rule. # # - field_tpl: Field generation rule, if any. # # - ttl: 10(unit:seconds). # # - backend: "queue", "service", "log", etc. # # - label: Desc...
Python
1
import uuid from django.db import models from django.urls import reverse from django.contrib.auth import get_user_model # new class Book(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) title = models.CharField(max_length=200) author = models.CharField(max_length...
Python
1
expected = "<div> <label for=\"username\">Username</label> <input id=\"username\" value=\"Ada Lovelace\"> </input> <button>Print Username</button> <div data-testid=\"printed-username\">Ada Lovelace</div> </div>"; assert_eq!(container_html, expected); } } use std::fmt::{Debug, Formatter}; use ...
Rust
0
ptr(ffi::NM_SETTING_CONNECTION_ZONE) .to_str() .unwrap() }); #[doc(alias = "NM_SETTING_DCB_APP_FCOE_FLAGS")] pub static SETTING_DCB_APP_FCOE_FLAGS: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(ffi::NM_SETTING_DCB_APP_FCOE_FLAGS) ...
Rust
0
class Config: """Contains all configuration parameters.""" def __init__(self, config_dict): # general config self.seed: int = config_dict.get('seed', 1) self.max_epochs: int = config_dict.get('max_epochs', 100) self.save_path: str = config_dict.get('save_path', None) ...
Python
1
import numpy as np from keras.preprocessing.text import one_hot import pdb def encode(X,seq_len, vocab_size): x = np.zeros((len(X),seq_len, vocab_size), dtype=np.float32) for ind,batch in enumerate(X): for j, elem in enumerate(batch): x[ind, j, elem] = 1 return x def batch_gen(batch_...
Python
1
im.Adam(params, **kwargs) def loss(pred, tgt): return -si_snr(pred, tgt).mean() def metrics(mixed, output, gt): """ Function to compute metrics """ metrics = {} def metric_i(metric, src, pred, tgt): _vals = [] for s, t, p in zip(src, tgt, pred): _vals.append((metric(p, t) ...
Python
1
#초병 상호작용 데이터 멀티 프로세스에 넘기기 위해 저장 Sentry_Communication.value = RF_R.S_Check #초병 권한 요청할 때 if (RF_R.S_Check & 0x0002) == 0x0002: #초병 권한 요청 변수에 저장 request_access.value = 1 ...
Python
1
_bindgen_wasmtime::BorrowChecker::new(mem); let host = get(data); let ptr0 = arg0; let len0 = arg1; let ptr1 = arg2; let len1 = arg3; let param0 = _bc.slice_str(ptr0, len0)?; let param1 = ResourceParam{repr:_bc.slice(ptr1, len1)?, }; let result2 = host.init_resource(param...
Rust
0
<TripEndpoint>) -> BuiltRoute { RouteDetails::new_route( ctx, app, waypoints, Color::RED, None, app.session.routing_preferences, ) } pub fn alt_route( ctx: &mut EventCtx, app: &App, waypoints: Vec<Tr...
Rust
0
M3.5.0/3,M10.5.0/4"), ("Europe/Rome", "CET-1CEST,M3.5.0,M10.5.0/3"), ("Europe/Samara", "SAMT-3SAMST,M3.5.0,M10.5.0/3"), ("Europe/San Marino", "CET-1CEST,M3.5.0,M10.5.0/3"), ("Europe/Sarajevo", "CET-1CEST,M3.5.0,M10.5.0/3"), ("Europe/Saratov", "<+04>-4"), ("Europe/Simferop...
Python
1
connected to the SPI1 bus via the pins PA5, PA6, PA7 and PE3 pub type L3gd20 = l3gd20::L3gd20<Spi<SPI1, (PA5<Alternate<AF5>>, PA6<Alternate<AF5>>, PA7<Alternate<AF5>>)>, OldOutputPin<PE3<Output<PushPull>>>>; /// On board LSM303DLHC connected to the I2C1 bus via the PB6 and PB9 pins pub type Lsm303dlhc = lsm303dlhc::Ls...
Rust
0
concat!( "Offset of field: ", stringify!(rte_epoll_event), "::", stringify!(epdata) ) ); } impl Default for rte_epoll_event { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Copy, Clone)] pub struct rte_i...
Rust
0
# SPDX-FileCopyrightText: 2025 Christian Winger <https://github.com/wingechr> © Öko-Institut e.V. # SPDX-FileCopyrightText: 2025 Martin Glauer <https://github.com/MGlauer> © Otto-von-Guericke-Universität Magdeburg # SPDX-FileCopyrightText: 2025 Martin Glauer <https://github.com/MGlauer> © Otto-von-Guericke-Universität ...
Python
1
<'a>(&'a self, _: &mut dyn FnMut(&'a dyn DeviceConsumable) -> Result<(), Error>) -> Result<(), Error> { Ok(()) } } unsafe impl Deps for DeviceSingleQueue { fn iter_deps<'a>(&'a self, _: &mut dyn FnMut(&'a dyn DeviceConsumable) -> Result<(), Error>) -> Result<(), Error> { Ok(()) } } unsafe impl...
Rust
0
= generate_amt(avg_txn_amts[tag]) txn_amt = "%.02f" % amount merchant = random.choice(top_merchants[tag]) stmt.add_transaction(date=date, amount=txn_amt, payee=merchant, type=type) return amount stmt = ofx.Generator(fid="9789789", org="FAKEOFX", acctid=acctid, accttype=accttype, ...
Python
1
await bot.send_message(message.chat_id, "⚠️ No query provided.") else: await interface_to_llm(bot.send_message, chat_id=message.chat_id, text="⚠️ No query provided.") return # Include interface in the query for the LLM interface = prompt.get("inpu...
Python
1
let dkg_id = config.dkg_id(); // Check if we have a transcript in the previous summary for this config, and // if we do, move it to the new summary. if let Some((id, transcript)) = previous_transcripts .iter() .find(|(id, _)| eq_sans_height(id, &dkg_id...
Rust
0
### type error x = input_int() while x != 0: x = x - 1 y = x print(y)
Python
1
= 7, U64 = 8, F32 = 9, F64 = 10, Isize = 11, Usize = 12, StringU8 = 13, } impl From<u8> for DataType { fn from(v: u8) -> Self { match v { 0 => DataType::Unknown, 1 => DataType::I8, 2 => DataType::U8, 3 => DataType::I16, 4 ...
Rust
0
ket_batch = r.recv_timeout(timer)?; if let Some(stats) = stats { packet_batch.packets.iter().for_each(|p| stats.record(p)); } let packets = packet_batch.packets.iter().filter_map(|pkt| { let addr = pkt.meta.addr(); socket_addr_space .check(&addr) .then(|| (&pk...
Rust
0
self.user_id, BlockUsageLocator( course_key=self.split_course_key, block_type=parent_category, block_id=parent_name ), category, block_id=name, ...
Python
1
#!/usr/bin/env python3 import os import ast import stat import subprocess fouts = {x.decode('utf-8') for x in subprocess.check_output(['git', 'ls-files']).strip().split()} pyf = [] for d in ["cereal", "common", "scripts", "selfdrive", "tools"]: for root, _, files in os.walk(d): for f in files: if f.endswi...
Python
1
f) -> &Vec<LayerInfo> { &self.layers } } //! Map arbitrary nonvolatile reads and writes to page operations. //! //! This splits non-page-aligned reads and writes into a series of page level //! reads and writes. While it is handling a read or write it returns `BUSY` to //! all additional requests. //! //! T...
Rust
0
ide a purpose for this instance of TrackingLock") self._purpose = purpose @property def acquired_by(self): return self._acquired_by @property def purpose(self): return self._purpose def locked(self): return self._lock.locked() async def acquire(self): ...
Python
1
import os import logging import base64 import argparse import asyncio import sys # Import server.anchor from the path relative to where the scripts are being executed. sys.path.insert(1, './server') from anchor import AnchorHandle logging.getLogger().setLevel(logging.ERROR) async def generate_did(seed): TRUST_ANC...
Python
1
pub field: String, runner: Box<dyn Fn(&mut T) + 'static>, } impl<T> Modifier<T> where T: Clone + for<'de> Deserialize<'de>, { /// Construct the new custom modifier pub fn new<F>(field_name: &str, runner: F) -> Self where F: Fn(&mut T) + 'static, { Modifier::<T> { ...
Rust
0
from datetime import datetime, timezone from typing import Optional, NewType, List UnixTime = NewType("UnixTime", int) ISO8601Time = NewType("ISO8601Time", str) def get_publish_times( amount: int, #Количество видео interval: int, start_time: Optional[UnixTime]= 0, #Время публикации первого в...
Python
1
import argparse parser = argparse.ArgumentParser(prog='PROG') parser.add_argument('--foo', required=True, help='foo help') subparsers = parser.add_subparsers(help='sub-command help') # create the parser for the "bar" command parser_a = subparsers.add_parser('bar', help='a help') parser_a.add_argument('bar', type=int, ...
Python
1
use acme_lib::persist::{Persist, PersistKey, PersistKind}; use futures_util::TryStreamExt; use sqlx::{Pool, Postgres}; use sqlx::{Row, Transaction}; use std::sync::Arc; use tokio::runtime::Runtime; use tracing::Instrument; use crate::util::{error, to_i64}; #[derive(Clone)] pub struct DatabasePersist { pool: Pool...
Rust
0
depth(0)); } if let Some(EntityTile { entity: _, tile }) = tile_layers.feature { render_tile(tile, view_context.add_depth(1)); } if let Some(EntityTile { entity: _, tile }) = tile_layers.item { render_tile(tile, view_context.add_depth(2)); } if let Some(EntityTile { entity: _, ti...
Rust
0
.bit_ls_files(opts.into()), BitSubCmd::Merge(opts) => opts.exec(repo), BitSubCmd::MergeBase(opts) => opts.exec(repo), BitSubCmd::Reflog(opts) => opts.exec(repo), BitSubCmd::Remote(opts) => opts.exec(repo), BitSubCmd::Reset(opts) => opts.exec(repo), BitSubCmd::RevList(opts...
Rust
0
rn R.from_quat(transform[3:]).apply(points) + transform[:3] @wp.kernel def transform_points_kernel( points: wp.array(dtype=wp.vec3), xform: wp.transform, out_points: wp.array(dtype=wp.vec3), ): tid = wp.tid() out_points[tid] = wp.transform_point(xform, points[tid]) def transform_points_wp(wp_tra...
Python
1
), ( "API_THROTTLE_REPEATED_REQUEST_RATE_ORG", "API: Repeated request throttle rate for organization api-keys", ), ( "API_THROTTLE_REPEATED_REQUEST_ENABLED_ORG", ...
Python
1
string() } }) .collect::<Vec<_>>(), ); let parse_trait = crate::util::get_parse_trait(); // The original block of the function let b = &block; // Modify the block to parse arguments *block = parse2(quote::quote! {{ let (#(#names),*) = { ...
Rust
0
et my_vec = vec![("band".to_string(), "arctic monkeys".to_string()), ("band".to_string(), "temper trap".to_string()), ("color".to_string(),"green".to_string())]; let answer = combine_duplicates(my_vec); let mut control = HashMap::new(); control.insert("band".to_st...
Rust
0
nfo[:2] >= (3, 7): self._executor = ProcessPoolExecutor( mp_context=multiprocessing.get_context("spawn"), max_workers=processpool_max_workers, ) else: raise MetaflowException( msg="Cannot use ProcessP...
Python
1
import matplotlib.pyplot as plt from nova.design.inverse import Inverse from nova.frame.coilgeom import ITERcoilset build_coilset = True source = "PCR_PF3PF4" source = "PCR" pmag = Inverse() if build_coilset: ITER = ITERcoilset( coils="pf vv trs dir", dCoil=-1, n=1e4, dPlasma=0.1,...
Python
1
n let mut input = PlayerInput::new(); let winit::dpi::PhysicalSize { width: win_w, height: win_h } = window.inner_size(); let win_center_x = win_w / 2; let win_center_y = win_h / 2; window.set_cursor_position(winit::dpi::LogicalPosition::new( win_center_x, win_center_y, )).expect("set c...
Rust
0
verse; /// pub mod from_offsets; /// An item stored within the [`Tree`] pub struct Item<T> { /// The offset into the pack file at which the pack entry's data is located. pub offset: u64, /// If true, this object may have children but is not a child itself. It's thus the root of a tree. is_root: bool, ...
Rust
0
utils::*; asn_to_rust!( r"DENM-PDU-Descriptions {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) en (302637) denm (1) version (2) } DEFINITIONS AUTOMATIC TAGS ::= BEGIN ValidityDuration ::= INTEGER { timeOfDetection(0), oneSecondAfterDetection(1) } (0..86400) ManagementContainer :...
Rust
0
} #[test] fn test_tokenize69() { let comp = vec!["10", ".", "09", ".", "03"]; tokenize_assert("10.09.03", comp); } #[test] fn test_tokenize70() { let comp = vec!["2003", "/", "09", "/", "25"]; tokenize_assert("2003/09/25", comp); } #[test] fn test_tokenize71() { let comp = vec!["09", "/", "25", ...
Rust
0
ing_player_completed(owl, captured); if captured { game_info.player_captured(); } } fn tractor_beam_closed(tractor_beam: &TractorBeam) -> bool { tractor_beam.state == TractorBeamState::Closed } fn start_capturing(tractor_beam: &mut TractorBeam, player_entity: Entity) { tractor_beam.capturing_p...
Rust
0
0x1b, 0xc2, 0x85, 0xe0, 0xb9, 0x08, 0x40, 0x55, 0xae, 0x13, 0x6f, 0x6b, 0x63, 0x62, 0x4c, 0x87, 0x4f, 0x5a, 0x1e, 0x1d, 0x8b, 0xe7, 0xb0, 0xb7, 0x22, 0x7a, 0x17, 0x1d, 0x2d, 0x7e, 0xd5, 0x78, 0xd8, 0x8b, 0xfd, 0xcf, 0x18, 0x32, 0x31, 0x98, 0x96...
Rust
0
_get_type()) } } } impl glib::value::ValueType for _80211Mode { type Type = Self; } unsafe impl<'a> FromValue<'a> for _80211Mode { type Checker = glib::value::GenericValueTypeChecker<Self>; unsafe fn from_value(value: &'a glib::Value) -> Self { from_glib(glib::gobject_ffi::g_value_get_enum(va...
Rust
0
.unwrap(); let signal = FeatureMap::nhwc(signal.view().insert_axis(Axis(0))); let cl_output = convolution .compute(signal, &filter) .unwrap() .index_axis_move(Axis(0), 0); let diff = (cpu_output - cl_output).mapv(f32::abs); let max_diff = diff.fold(0.0, |acc, &val| if val...
Rust
0
, 'upwards', 'ridden', 'Firsy', 'PONDERS', 'calf', 'four-run', 'FAIR', 'stillborn', 'vessels', 'milligrams', 'volcano-hit', 'eighth-ranked', 'baseline', 'HUF', '+@-@-@-@', 'rainstorm', 'Profit-taking', 'Defiant', 'abetting', 'all-share', 'short-covering', 'CRR', 'hyperbole', 'nitrofuran', 'composite', 'big-capitalised'...
Python
1
def strStr(haystack: str, needle: str) -> int: l = len(haystack) l1 = len(needle) for i in range(l): if haystack[i:i+l1] == needle: return i return -1 haystack = 'sadbutsad' needle = '' print(strStr(haystack, needle))
Python
1
) -> fmt::Result { f.write_str(match self { Error::Decode => "PKCS#1 decoding error", Error::Encode => "PKCS#1 encoding error", Error::Version => "PKCS#1 version error", }) } } #[cfg(feature = "std")] impl std::error::Error for Error {} impl From<der::Error> for...
Rust
0
class JaxLayer: pass
Python
1
= unsafe { &mut *(image_handle as *mut ImageData) }; // Calculate progress 0..1000. // We use this in the artisan render loop to // report back to Ae. image.finished_pixels += ((x_max_plus_one - x_min) * (y_max_plus_one - y_min)) as usize; //eprintln!("[r-display] {}", (100 * image.finished_pixels)...
Rust
0
# Sanity checks assert set(tb_ucdp_countries["conflict_type"]) - set(tb_prio_countries["conflict_type"]) == { "one-sided violence" }, "Missmatch in conflict_type between UCDP and PRIO (country) not as expected!" assert set(tb_prio_countries["conflict_type"]) - set(tb_ucdp_countries["conflict_type"])...
Python
1
urce::Remote(RemoteResource::from_pretrained( MobileBertVocabResources::MOBILEBERT_UNCASED, )); let config_path = config_resource.get_local_path()?; let vocab_path = vocab_resource.get_local_path()?; // Set-up model let device = Device::cuda_if_available(); let vs = nn::VarStore::new...
Rust
0
evt.write(1).unwrap(); assert_eq!(net.interrupt_evt.read().unwrap(), count + 1); } #[cfg(test)] pub(crate) fn inject_tap_tx_frame(net: &Net, len: usize) -> Vec<u8> { assert!(len >= vnet_hdr_len()); let tap_traffic_simulator = TapTrafficSimulator::new(if_index(&net.tap)); let mut frame = utils::rand::ra...
Rust
0
"""Ruckus DataUpdateCoordinator.""" from datetime import timedelta import logging from aioruckus import AjaxSession from aioruckus.exceptions import AuthenticationError, SchemaError from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.exceptions import ...
Python
1
fn img_to_depth_map( img: &HtmlImageElement, w: u32, h: u32, margin: u32, inverted: bool, ) -> DepthMap { let document = web_sys::window().unwrap().document().unwrap(); let canvas = document .create_element("canvas") .unwrap() .dyn_into::<web_sys::HtmlCanvasElement>...
Rust
0
name = 'anthracene' category = 'fused 6+6+6 member rings' atoms = [ ("C", (-0.64423, -3.34712, 7.74723)), ("H", (0.296112, -3.89188, 7.74706)), ("C", (-1.85374, -4.04384, 7.74702)), ("H", (-1.83312, -5.1314, 7.74692)), ("C", (-3.07938, -3.3572, 7.74572)), ("C", (-4.30469, -4.04455, 7.74328)), ("H", (-4.30462, -5...
Python
1
let mut grid = [0; BOARD_SIZE * BOARD_SIZE]; for (i, num) in group .trim() .split_whitespace() .map(|x| x.parse::<i32>().unwrap()) .enumerate() { grid[i] = num; } boards.push(Board { grid, chosen...
Rust
0
t GST_BASE_SRC_FLAG_LAST: GstBaseSrcFlags = 1048576; pub type GstCollectPadsStateFlags = c_uint; pub const GST_COLLECT_PADS_STATE_EOS: GstCollectPadsStateFlags = 1; pub const GST_COLLECT_PADS_STATE_FLUSHING: GstCollectPadsStateFlags = 2; pub const GST_COLLECT_PADS_STATE_NEW_SEGMENT: GstCollectPadsStateFlags = 4; pub c...
Rust
0
ize/float(maxSize))) if nSplit==1: files.append(filePath) return files (base, ext) = os.path.splitext(filePath) #check if we have already done this splitting for i in range(nSplit): fiPath=base+'_'+str(i)+ext splitReq=False if not os.path.exists(fiPath): splitReq=True break fps = [] for i in range...
Python
1
from checkIn import checkIn class checkInUI: def addCheckIn(): TCIGid = int(input("\nenter the transaction id of the guest..")) TCIname = input("\nenter the name of the guest...") TCIaddres = input("\nenter the address of guest... ") TCIcontact = input("\nenter the ...
Python
1
user_id -> Int8, index -> Text, query -> Text, created_at -> Timestamptz, } } table! { sessions (id) { id -> Text, data -> Bytea, created_at -> Timestamptz, updated_at -> Timestamptz, } } table! { users (id) { id -> Int8, name ...
Rust
0
s rrzUserList.append r%c<|jj||yr)r~insertrs rrzUserList.inserts D!r%c8|jj|Sr)r~rL...
Python
1
t MI_FLAG_RESTRICTED: u32 = 512u32; #[doc = "*Required features: 'Win32_System_Wmi'*"] pub const MI_FLAG_STATIC: u32 = 65536u32; #[doc = "*Required features: 'Win32_System_Wmi'*"] pub const MI_FLAG_STREAM: u32 = 1048576u32; #[doc = "*Required features: 'Win32_System_Wmi'*"] pub const MI_FLAG_TERMINAL: u32 = 262144u32; ...
Rust
0
in an unresolved method error prints the // generics for a generic associated type. #![feature(generic_associated_types)] trait X { type Y<T>; } trait M { fn f(&self) {} } impl<T: X<Y<i32> = i32>> M for T {} struct S; //~^ NOTE method `f` not found for this //~| NOTE doesn't satisfy `<S as X>::Y<i32> = i3...
Rust
0
anta_monica | CA | 65.2 | 2021-04-01 14:10:24 |", "+----------------+--------------+-------+-----------------+---------------------+", ]; assert_batches_eq!(expected, &batches); } #[tokio::test] async fn test_write_metrics() { let (metrics_registry, config)...
Rust
0
erialize = "@extra"))] extra: Option<String>, #[serde(rename(serialize = "@client_id", deserialize = "@client_id"))] client_id: Option<i32>, } impl RObject for JsonValueNull { #[doc(hidden)] fn extra(&self) -> Option<&str> { self.extra.as_deref() } #[doc(hidden)] fn client_id(&s...
Rust
0
8> = None; for (idx, byte) in input.into_iter().enumerate() { match (padding_start, detected_pad_byte) { (Some(_start), Some(pad_byte)) => { if *byte != pad_byte { return Err(CliError(format!("Invalid padding: {:?}", input)).into()); } ...
Rust
0
t; use std::hash::BuildHasherDefault; type FnvHash = BuildHasherDefault<FnvHasher>; #[derive(Clone)] pub struct Acl { pub src_ip: Option<Ipv4Prefix>, pub dst_ip: Option<Ipv4Prefix>, pub src_port: Option<u16>, pub dst_port: Option<u16>, pub established: Option<bool>, // Related not done pub...
Rust
0
response = model.generate_content(prompt) # Parse the response content = response.text files = parse_response(content) if not files: print("No file creation indication found in the response.") return None # Create .cicd folder os.makedirs('.cicd', exist_ok=True) # Create...
Python
1
8(val: u8) -> Result<PacketType, PacketTypeError> { let type_val = val >> 4; let flags = val & 0x0F; let control_type = get_control_type(type_val).ok_or_else(|| PacketTypeError::ReservedType(type_val, flags))?; Ok(PacketType::new(control_type, flags)?) } #[inline] pub fn co...
Rust
0
derive(Clone, Copy, Debug, PartialEq)] pub enum EXTIPSEL9R { #[doc = "Port A pin 9 selected for external interrupt 9"] PORTA, #[doc = "Port B pin 9 selected for external interrupt 9"] PORTB, #[doc = "Port C pin 9 selected for external interrupt 9"] PORTC, #[doc = "Port D pin 9 selected for e...
Rust
0
from gluon import XML def button(merchant_id="123456789012345", products=[dict(name="shoes", quantity=1, price=23.5, currency='USD', description="running shoes black")]): t = '<input name="item_%(key)...
Python
1
#Embedded file name: /Users/versonator/Jenkins/live/output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/MPK_mini/config.py from __future__ import absolute_import, print_function, unicode_literals from .consts import * TRANSPORT_CONTROLS = {u'STOP': -1, u'PLAY': -1, u'REC': -1, u'LOOP': -1, u'RWD': -...
Python
1
ssm(filter_type='hnscc', no_internet=self.no_internet) clinical_df = mssmclin.get_df('clinical') patient_ids = clinical_df.index.to_list() df = df.loc[df.index.isin(patient_ids)] # save df in self._data self.save_df(df_type, df) def load_...
Python
1
a=10 b=9 print(a+b)
Python
1
8, default 0 #[argh(option, short = 'p', default = "0")] padding: u8, /// the input to obfuscate #[argh(positional, default = "String::new()")] input: String, } fn main() { let args: Args = argh::from_env(); if args.padding > 8 { println!("Padding cannot exceed 8."); return;...
Rust
0
._get_systems(): # Get the FQDN for the host and add it to the right groups hostname = host['hostname'] # None interfaces = host['interfaces'] if host['profile'] in self.exclude_profiles: self.display.vvvv('Excluding host %s in profile %s\n' % (host['nam...
Python
1
# -*- coding: utf-8 -*- """ Created on Wed Feb 15 16:57:19 2023 @author: Administrator """ import kis_auth as kis import time, copy import requests import json import pandas as pd from collections import namedtuple from datetime import datetime from pandas import DataFrame #====| [해외주식] 주문/계좌 |=================...
Python
1
class Solution: def answerString(self, word: str, numFriends: int) -> str: #numFriends 를 위한 게임을 준비했다. 멀티플 라운드 게임 #각각 라운드는, word가 numfriends(공백없이)로 찢어진다, 전 라운드와 같은것은 안됨 #찢어진 단어를 박스에 넣기 #min(a.len, b.len) 이 같으면 사전순으로 앞에 오는게 더 작은 수, ㄱ길익가 다르면 짧은쪽이 작은수 #모든 라운드가 끝난 후 사전순으로 가장 큰 lex...
Python
1
from celery import Celery from celery.schedules import crontab app = Celery('bot') app.config_from_object('django.conf:settings', namespace='CELERY') # Регистрируем задачи app.autodiscover_tasks(['bot.tasks']) # Настройки периодических задач app.conf.beat_schedule = { 'generate-daily-report': { 'task': ...
Python
1
'a mut W { self.variant(WUPE12_A::WUPE12_3) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x03 << 24)) | (((value as u32) & 0x03) << 24); self.w } } #[doc = "Wakeup pin enable for LLWU_Pn\n\nValue on reset: 0...
Rust
0
_rules! reduce_complex { ($t:ty) => { impl ArrayInstanceReduce<Complex<$t>> for ArrayExt<Complex<$t>> { type Product = Complex<$t>; type Sum = Complex<$t>; fn product(&self) -> Self::Product { let product = af::product_all(self); Complex::...
Rust
0
import sys sys.stdin = open("input.txt", "r") from collections import deque import heapq def start_parking(n, costs, weights, entry_order): """ 주차장 시뮬레이션을 실행하여 총 수입을 계산한다. Args: n: 주차 공간 수 costs: 각 주차 공간의 단위 무게당 요금 weights: 각 자동차의 무게 entry_order: 입/출차 순서 (양수: 입차, 음수: ...
Python
1
Regex = Regex::new( r#"/// The `(\S+)` intrinsic\.\s*#\[link_name = "llvm\.aarch64\S+"\]\s*pub fn (\S+)\(([\s\S]*?)\) -> (\S+);"# ).unwrap(); static ref LLVMINTarm: Regex = Regex::new( r#"/// The `(\S+)` intrinsic\.\s*#\[link_name = "llvm\.arm\.neon\S+"\]\s*pub fn neon_(\S+)\(([\s\S]*?)\) -> (\S+);"# ).unw...
Rust
0
.. [3] T. Saramaki, "Finite Impulse Response Filter Design," in Handbook for Digital Signal Processing, chapter 4, New York: Wiley-Interscience, 1993. .. [4] J. S. Lim, Advanced Topics in Signal Processing. Englewood Cliffs, N.J.: Prentice Hall, 1988. .. [5] A. V. Oppenheim,...
Python
1