text
string
label_name
string
labels
int64
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.functional import cached_property from django.utils.module_loading import import_string class InvalidStorageError(ImproperlyConfigured): pass class StorageHandler: def __init__(self, backends=None): ...
Python
1
# Created by MechAviv # ID :: [910142051] # Hidden Street : Harmony sm.curNodeEventEnd(True) sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(True, True, False, False) sm.forcedInput(1) sm.sendDelay(30) sm.forcedInput(4) OBJECT_1 = sm.sendNpcController(1032209, -15, -30) sm.showNpcSpecialActionByObjectId(OBJECT_...
Python
1
должить!', callback_data='continueafteremiind') markup.add(button1) if now - last_interaction_time > timedelta(minutes=3) and notified == 0: bot.send_photo(chat_id=user_id, photo='AgACAgIAAxkBAAICV2SIgoutZLFnVveTM' ...
Python
1
nate dimensions. * See Rectangular_Meshes.pdf document for the derivation. */ #[inline] pub fn fe_with_mesh_coords(&self, coords: &[MeshCoord]) -> FENum { FENum(range(1, self.space_dims).fold(*coords[0], |sum_coord_contrs, r| { sum_coord_contrs + *coords[r] * self.cumprods_mesh_ldims[r-1] })) ...
Rust
0
::new([0x11, 0x22, 0x33, 0x44]); assert_eq!(res, LiteralValue::BlobLiteral(test)); } #[test] fn test_literal_value_success_7() { let res = nom_value!(literal_value, "X'11223344'".as_bytes()); let test = Box::new([0x11, 0x22, 0x33, 0x44]); assert_eq!(res, LiteralValue...
Rust
0
value(&self, o: Vec3, v: Vec3) -> f32 { match self.hit(&Ray::new(o, v), 0.001, std::f32::MAX) { Some(_) => { let cos_theta_max = 1.0 - self.radius * self.radius / (self.center - o).squared_length(); let solid_angel = 2.0 * std::f32::consts::PI * (1...
Rust
0
)) }, outputs=["output_data"]) else: roi_align_op = OpConfig( type="roi_align", inputs={"X": ["input_data"], "ROIs": ["rois_data"]}, outputs={"Out": ["output_data"]}, attrs={ ...
Python
1
turn member_result elif album_result: return album_result elif song_result: return song_result return None # Global resolver instance _knowledge_resolver: Optional[KnowledgeResolver] = None def get_knowledge_resolver() -> KnowledgeResolv...
Python
1
2 ], [ 0, 13, 0, 2 ], [ 0, 12, 0, 2 ], [ 0, 12, 0, 2 ], [ 0, 12, 0, 2 ], [ 0, 12, 0, 2 ], [ 0, 12, 0, 2 ], [ 0, 11, 0, 2 ], [ 0, 11, 0, 2 ], [ 0, 10, 0, 2 ], [ 0, 10, 0, 1 ], [ 0, 10, 0, 1 ], [ 0, 10, 0, 1 ], [ 0, 10, 0, 1 ], [ 0, 9, 0, 1 ], [ 0, 9, 0, 1 ], [ 0, 9, 0, 1 ], [ 0, 8, 0, 1 ]...
Python
1
SR SUBROUTINE LDA #$0A JMP END SUBROUTINE: LDA #$AA RTS END: "; let mut cpu = rs6502::Cpu::new(); let mut assembler = rs6502::Assembler::new(); let segments = assembler.assemble_string(asm, 0xC000).unwrap(); cpu.load(&segments[0].code[..], None); cpu.re...
Rust
0
scr_id = ( int.from_bytes(pref, byteorder='little', signed=False) if pref else None ) assert scr_id is None or scr_id == gid return script_data, gid, entries def decompile_script(elem): script_data, gid, entries = get_elem_info(elem) yield from make_block_context(elem,...
Python
1
notice may not be copied, modified, or distributed // except according to those terms. use ctypes::c_float; use shared::basetsd::UINT32; use shared::guiddef::{GUID, LPCGUID}; use shared::minwindef::{BOOL, DWORD, UINT}; use um::unknwnbase::{IUnknown, IUnknownVtbl}; use um::winnt::HRESULT; STRUCT!{struct AUDIO_VOLUME_NOT...
Rust
0
(0..self.ring_buffer_view.len()) .for_each(|idx| { let position_xz = self.position_xz[idx].clone(); let position = { let position_y = config.wave_amplitude * (self.wave_speed[idx] * self.age[idx] - config.wave_phase_shift).sin() + self.height[idx...
Rust
0
"<=====================================>") elif ulangi == "N": clean() print("Kembali Ke Menu Utama") break else: clean() print("Input Salah, Pilihan Hanya (Y/N): ") if role: while True: ...
Python
1
one, Hash)] enum Tool { NONE, TORCH, CLIMB, } #[derive(Eq, PartialEq, Ord, PartialOrd, Clone)] struct Pt { x: usize, y: usize, } impl Pt { fn next(&self, max_x: usize, max_y: usize) -> Vec<Pt> { let mut res: Vec<Pt> = Vec::new(); if self.x > 0 { res.push(Pt { ...
Rust
0
}}")?; writeln!(w, " }}")?; writeln!(w, " }}")?; writeln!(w, " /// Match a path and method against this router.")?; writeln!(w, " ///")?; writeln!( w, " /// Accepts a byte slice for the request path and HTTP verb." )?; writeln!( w, " ...
Rust
0
test_json_print_parse_message("{stringRepeated: [\"\", \"\\u0000\", \"A\\nB\"]}", &m); } #[test] fn test_bytes() { let mut m = TestTypes::new(); m.set_bytes_singular(b"ab".to_vec()); test_json_print_parse_message("{bytesSingular: \"YWI=\"}", &m); let mut m = TestTypes::new(); m.set_bytes_repea...
Rust
0
import re import traceback from heimdall.lib.utils.logger import logTraceback from .logic import Logic def postProcess(_line, signatures, events, constantStorage): # cleaning up logic that doesn't actually do anything _line = re.sub(r'( << 1 - 1|\/ 1|0 + | + 0)', '', _line) # cleaning up EVM panics _lin...
Python
1
"""Predict.""" import json from ultralytics import YOLO from src.coordinate_conversion import dbref_to_wgs84, pixel_to_coordinates MODEL = "/Users/danielringler/git/3lh/rail-asset-detection/models/full_images_300_epoch/weights/best.pt" # "yolo11n.pt" # MODEL = "/Users/danielringler/git/3lh/rail-asset-detection/mode...
Python
1
ADMIN_CONFIG = { 'username': 'zhangmi', 'password': 'zhangmi', 'secret_key': 'zhangmi' # 用于Flask session加密 }
Python
1
""" Utility for adding idempotency to lambda functions """ from aws_lambda_powertools.utilities.idempotency.hook import ( IdempotentHookFunction, ) from aws_lambda_powertools.utilities.idempotency.persistence.base import ( BasePersistenceLayer, ) from aws_lambda_powertools.utilities.idempotency.persistence.dyn...
Python
1
path currently generated. EndPoint(Point<N>, Vector<N>), /// Used when the sampler does not have any other points to generate. EndOfSample, } /// A curve sampler. pub trait CurveSampler<N: Real> { /// Returns the next sample point. fn next(&mut self) -> PathSample<N>; } /// A pattern that is repl...
Rust
0
class_index = dict() class_dir = os.path.join(list_dir, 'classInd.txt') with open(class_dir) as fo: for line in fo: class_number, class_name = line.split() class_number = int(class_number) class_index[class_name] = class_number train_data = [] for i, clip ...
Python
1
""" $description Live TV channels and video on-demand service from ZDF, a German public, independent broadcaster. $url zdf.de $type live, vod $region Germany """ import logging import re from urllib.parse import urlparse, urlunparse from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import...
Python
1
cache_count = db_info.get('cache_count', 0) prediction_count = db_info.get('prediction_count', 0) db_size = db_info.get('db_size_formatted', 'N/A') self.db_info_label.setText(f"数据库: {prediction_count}条预测, {db_size}") self.cache_status_label.s...
Python
1
r#" #[rustc_builtin_macro] macro derive {} #[rustc_builtin_macro] macro Copy {} #[derive(Copy)] struct Foo; "#, expect![[r##" #[rustc_builtin_macro] macro derive {} #[rustc_builtin_macro] macro Copy {} #[derive(Copy)] struct Foo; impl < > crate ::marker::Copy for Foo< > {}"##]], ); } #[test] fn t...
Rust
0
able<'a> { fn hit<'b, 'c>(self: &'b Self, ray: &'c Ray, t_min: f64, t_max: f64) -> Option<HitRecord>; }// Copyright (c) 2018 <NAME> // [This program is licensed under the "MIT License"] // Please see the file LICENSE in the source // distribution of this software for license terms // Autogenerated by Diesel table!...
Rust
0
: Vote::new(1, 0), prev_log_id: Some(LogId::new(LeaderId::new(3, 0), 3)), entries: vec![], leader_commit: Some(LogId::new(LeaderId::new(1, 0), 2)), }; let resp = r0.append_entries(req).await?; assert!(!resp.is_success()); assert!(resp.is_conflict()); check_logs(&mut sto0, v...
Rust
0
nd.as_mut().unwrap().process_until_done(); l.transition_to(LooperMode::Playing); l.backend.as_mut().unwrap().process_until_done(); l }, |mut l| { l.process_output(FrameTime(128), &mut [&mut o_l, &mut o_r], false); }, ...
Rust
0
rev_x, prev_y) = rooms[rooms.len() - 1].center(); if rand::random() { create_h_tunnel(prev_x, new_x, prev_y, &mut map); create_v_tunnel(prev_y, new_y, new_x, &mut map); } else { create_v_tunnel(prev_y, new_y, prev_x, &mut map); ...
Rust
0
feature( object: &mut smithy_json::serialize::JsonObjectWriter, input: &crate::model::AwsRdsDbProcessorFeature, ) { if let Some(var_2176) = &input.name { object.key("Name").string(var_2176); } if let Some(var_2177) = &input.value { object.key("Value").string(var_2177); } } pub f...
Rust
0
pe_id: non_core_type_id, edge_type_id, })); } let graph_id: GraphId = vec[0].parse::<i64>()?.into(); let node_id: NodeId = vec[1].parse::<i64>()?.into(); let node_type: &str = vec[2].trim_end(); let non_core_type: Option<NodeTypeId>; if node_ty...
Rust
0
kQuery): caption=( f'<b>🤱👶Помощь детям с ограниченными возможностями, а также детям с серьезными врожденными заболеваниями🤱👶</b>\n\n' f'-Оплата лечения и реабилитации после операций\n\n' f'-Материальная поддержка семей в трудных условиях' ) photo_paths = ['app/media/hel...
Python
1
import random as r import time as t import BlackJackVARS print(BlackJackVARS.greeting) print("Welcome to my blackjack gambling simulator") cash = int(input("How much cash of your bank account do you wish to gamble? - ")) print("Alright. That is your starting cash amount.") while True: BettingAmount = int(input(...
Python
1
escription = 'XEP-0313: Message Archive Management' dependencies = set( ['xep_0004', 'xep_0030', 'xep_0050', 'xep_0059', 'xep_0297']) stanza = stanza def plugin_init(self): register_stanza_plugin(Iq, stanza.MAM) register_stanza_plugin(stanza.MAM, ...
Python
1
import os from datetime import datetime, timedelta, timezone from src.tasks.ranking import RankingConfig, RankingEngine def _make_issue(num: int, prio: str, days: int = 0): return { "number": num, "title": f"Issue {num}", "labels": [{"name": prio}], "created_at": (datetime.now(tim...
Python
1
wise of p->q pub fn clockwise(p: &TTFPoint, q: &TTFPoint, r: &TTFPoint) -> bool { ccw(p, q, r) == 1 } /// More efficient colinearity check when `p.at < q.at < r.at` through linear interpolation pub fn colinear_ordered(p: &TTFPoint, q: &TTFPoint, r: &TTFPoint) -> bool { debug_assert!(p.at.fuzzy_lt(q.at)); d...
Rust
0
) < 3: print("Usage: forms <url>") sys.exit(1) url = sys.argv[2] forms = scraper.scrape_forms(url) for i, form in enumerate(forms): print(f"Form {i+1}:") print(f"Action: {form['action']}") print(f"Method: {form['method...
Python
1
edge_is_finite(&self, edge_id: EdgeIndex) -> Result<bool, BvError> { self.edge_is_finite_(Some(edge_id)) .ok_or_else(|| BvError::IdError(format!("Edge id {} doesn't exists", edge_id.0))) } /// Returns true if the edge is infinite (ray, line). /// Returns false if the edge is finite (se...
Rust
0
).unwrap(); self.mmu = Some(self.step(mmu)); true } } /// Run the emulator with the given configuration. pub fn run<T: Hardware + 'static>(cfg: Config, rom: &[u8], hw: T) { run_inner(cfg, rom, hw, Debugger::empty()) } /// Run the emulator with the given configuration and debugger. pub fn run_...
Rust
0
_1434) @scena.Lambda('lambda_144C') def lambda_144C(): OP_67(0, 6030, -10000, 4500) ExitThread() DispatchAsync(0x0101, 0x0002, lambda_144C) OP_6F(0x0001, 500) OP_70(0x0001, 800) PlaySE(318, 0x00, 0x64) @scena.Lambda('lambda_1477') def lambda_1477(): ChrWalkTo...
Python
1
.normalize_or_zero() * Vec2::splat(CROSS_SIZE); lines.line_colored( grid::world_to_iso(start - cross_x) + Vec3::Z, grid::world_to_iso(start + cross_x) + Vec3::Z, 0.0, color.0, ); lines.line_co...
Rust
0
class Phone(): IMEI = None Producer = "A" def call_by_4g(self): print("4g") class Phone2022(Phone): face_id = "100111" def call_by_5g(self): print("5g") p = Phone2022() p.Producer p.call_by_4g() p.call_by_5g() class NFCReader: type = "5" def read_card(self): print(...
Python
1
) ); assert_eq!( unsafe { &(*(::std::ptr::null::<generic_asm>())).ticked as *const _ as usize }, 26usize, concat!( "Offset of field: ", stringify!(generic_asm), "::", stringify!(ticked) ) ); assert_eq!( unsafe { &(*(...
Rust
0
) -> Result<JObject<'a>, WasiErrno> where C: Desc<'a, JClass<'c>>, T: Copy, { let offset = ptr.offset() as usize; if offset + mem::size_of::<T>() >= memory.size().bytes().0 { return Err(WASI_ERRNO_FAULT); } let raw_ptr = align_pointer( ...
Rust
0
ContentVisitor; impl Visitor for ContentVisitor { type Value = Content; fn expecting(&self, fmt: &mut fmt::Formatter) -> fmt::Result { fmt.write_str("any value") } fn visit_bool<F>(self, value: bool) -> Result<Self::Value, F> where F: de::Error { Ok(Content::Bool(value)) ...
Rust
0
) => RelativePath::new(Prefix::Root, suffix), Err(..) => RelativePath::new(Prefix::Dummy, &path), } })) }); println!( "Collected {} filenames in {:?}", filenames.len(), time_taken ); Names::Filenames(file...
Rust
0
from openai import OpenAI from dotenv import load_dotenv import os # Load environment variables load_dotenv() # Get API key api_key = os.getenv("OPENAI_API_KEY") if not api_key: raise ValueError("OPENAI_API_KEY environment variable is not set") # Initialize OpenAI client client = OpenAI(api_key=api_key) # Test ...
Python
1
vector of length [number of features]. Sequence; `TIMES` is a vector of shape [series length], `VALUES` either has shape [series length] (univariate) or [series length x number of features] (multivariate). Batch of sequences; `TIMES` is a vector of shape [batch size x series ...
Python
1
""" HWP 변환 결과 확인 스크립트 """ from pathlib import Path import os from datetime import datetime def show_conversion_results(): """변환된 파일들을 보여주는 함수""" print("=" * 70) print("HWP 자동화 변환 결과") print("=" * 70) base_dir = Path(r"C:\projects\autoinput\data") # 1. pyhwpx로 변환된 파일들 print("...
Python
1
); flags.add(InsertFlag::NoValidate); assert_eq!(31, flags.flags()); } #[test] fn test_query_flags() { let mut flags = Flags::new(); assert_eq!(0, flags.flags()); flags.add(QueryFlag::TailableCursor); assert_eq!(2, flags.flags()); flags.add(QueryFlag::Partial); flags.add(QueryFlag::Pa...
Rust
0
rm: RangeInclusiveMap::new_with_step_fns(), } } /// Returns a reference to the range covering the given key, if any. pub fn get(&self, value: &T) -> Option<&RangeInclusive<T>> { self.rm.get_key_value(value).map(|(range, _)| range) } /// Returns `true` if any range in t...
Rust
0
import pandas as pd import re import random import ast item_fname = 'data/movies_final.csv' def get_weighted_rating_df(): def weighted_rating(x): v = x["rating_count"] R = x["rating_avg"] return ((v/(v+m) * R) + (m/(m+v) * C)) def get_year(x): title = x["title"][-6::] ...
Python
1
fn new() -> Machine { Machine { mask: Mask::new(), mem: Mem::new() } } fn run(&mut self, program: &str) { for line in program.lines() { let mut chunks = line.split(" = "); let lhs = chunks.next().unwrap(); let rhs = chunks.next().unwrap(); if lhs == "mask" { self.mask = Mask::parse(rhs); } ...
Rust
0
from course_themes import course_themes def create_course_themes_subparser(subparsers): parser = subparsers.add_parser("course-themes") parser.add_argument("--debug") parser.add_argument("--course_key", type=str, required=True) def process_course_themes(args): course_key = args.course_key course...
Python
1
pub const XCB_SELINUX_QUERY_VERSION: u8 = 0i32 as u8; /// The `SELinux::QueryVersion` request. #[derive(Copy, Clone, Debug)] #[repr(C)] pub struct xcb_selinux_query_version_request_t { pub major_opcode: u8, pub minor_opcode: u8, pub length: u16, pub client_major: u8, pub client_minor: u8, } impl ...
Rust
0
> None: delivered_directly: set[int] = set() def direct_handler(signo: int, frame: FrameType | None) -> None: delivered_directly.add(signo) print(1) # Test the version where the call_soon *doesn't* have a chance to run # before we exit the with block: with _signal_handler({signal.SIGIL...
Python
1
import pygame import sys pygame.init() # Farben RED = (255, 0, 0) GREEN = (0, 255, 0) BLUE = (0, 0, 255) WHITE = (255, 255, 255) BLACK = (0, 0, 0) GRAY = (200, 200, 200) # Fenstergröße win_width = 1000 win_height = 800 win = pygame.display.set_mode((win_width, win_height)) pygame.display.set_caption("ShapeCalc") # ...
Python
1
reams that have been closed" ), &["protocol"] )?, registry)?, notifications_streams_opened_total: register(CounterVec::new( Opts::new( "sub_libp2p_notifications_streams_opened_total", "Total number of notification substreams that have been opened" ), &["protocol"] )?, registry)?, ...
Rust
0
aving import save_detector, load_detector from alibi_detect.datasets import fetch_cifar10c, corruption_types_cifar10c # In[6]: (X_train, y_train), (X_test, y_test) = tf.keras.datasets.cifar10.load_data() X_train = X_train.astype('float32') / 255 X_test = X_test.astype('float32') / 255 y_train = y_train.astype('int6...
Python
1
- "d": Past day - "w" or "7d": Past week - "m" or "30d": Past month - "y" or "1y": Past year - None: All time (default) Returns: Search results or error message Note: Time range filtering requires the ddgs library (pip install ddgs). For ...
Python
1
st').index # time of hwm # only find those hwm followed by a drawdown df1 = df1[df1['hwm'] > df1['min']] if dollars: ## the series of dollar performance dd = df1['hwm'] - df1['min'] else: # the series of returns dd = 1 - df1['min'] / df1['hwm'] # find the duration of the hwm (Time u...
Python
1
© 2013 <NAME> /// Copyright © 2013 <NAME> /// Copyright © 2010-2013 Intel Corporation /// /// Permission is hereby granted, free of charge, to any person obtaining a /// copy of this software and associated documentation files (the "Software"), /// to deal in the Software without restriction, including withou...
Rust
0
original_rows = temp_df.shape[0] for col in columns_selected: Q1 = temp_df[col].quantile(0.25) Q3 = temp_df[col].quantile(0.75) IQR = Q3 - Q1 lower = Q1 - 1.5 * IQR upper = Q3 + 1.5 * IQR temp_df = temp_df[(...
Python
1
rns: cs (float tensor, (bs, v, *)): stylized content features. """ c, s = q, k shape = c.shape q, k = q.flatten(2), k.flatten(2) c, s = c.flatten(2), s.flatten(2) # QKV attention with projected content and style features q = self.q_embed(q).transpose...
Python
1
used to set (1D) histogram `bingroup` ybins :class:`plotly.graph_objects.histogram2d.YBins` instance or dict with compatible properties ycalendar Sets the calendar system to use with `y` date data. ygap ...
Python
1
gh_data).unwrap()); } else if hdr.dtype == MRI_SHORT { let mut mgh_data : Vec<i16> = Vec::with_capacity(num_voxels); for _ in 1..=num_voxels { mgh_data.push(file.read_i16()?); } data_mri_short = Some(Array::from_shape_vec(vol_dim, mgh_data).unwrap(...
Rust
0
#!/usr/bin/env python3 # Copyright (C) 2023 The Android Open Source Project # # 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 requ...
Python
1
_layer.weight.detach().clone().numpy() ) sufficient_desc_indices = np.where( np.abs(results["comp_corr_coeffs"]) > results["min_corrs"] )[0] if len(sufficient_desc_indices) == 0: sufficient_desc_indices = np.array([0]) reduced_gen_descs = results["auto_ge...
Python
1
headers, timeout=60 ) if retry_response.status_code == 200: print("[APIImageEdit] 简化参数重试成功") submission_json = retry_response.json() ...
Python
1
fout.write("element vertex %d\n" % num_pts) for f in fields: fout.write("property %s %s\n" % (types[data[f].dtype], f)) fout.write("end_header\n") def write_landmarks_ply(data, fout, fields=None): """Write a landmark points as vertices in an ASCII PLY format. """ if not fields: fie...
Python
1
lwn.net/Articles/773459/) for a description of the race); /// - thus it's possible to `waitpid()` on one thread and `kill()` on another without a race; /// - option to orphan a process, i.e. hand it off to init; /// - child processes are killed on parent termination; /// - and it works in the [Capsicum](https://wiki.fr...
Rust
0
"""Celery recordings tasks for the core app.""" import logging from lxml import html # nosec import requests from sentry_sdk import capture_exception from marsha.celery_app import app from marsha.core.defaults import ( ERROR, PROCESSING, RECORDING_SOURCE_ERROR, TMP_STORAGE_BASE_DIRECTORY, ) from mar...
Python
1
''' Here's how the Bubble Sort algorithm works: 1. We start by comparing the first two elements of the array. If the first element is greater than the second element, we swap them. 2. We then compare the second and third elements. If the second element is greater than the third element, we ...
Python
1
# Copyright (c) 2020 - present Vitor Oriel <https://github.com/VitorOriel> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to ...
Python
1
.i[0 as libc::c_int as usize] = tmp as libc::c_int; Some( (*(*cinfo).err) .emit_message .expect("non-null function pointer"), ) .expect("non-null function pointer")( cinfo as crate::jpeglib_h::j_common_ptr, 1 as libc::c_int ); (*cinfo).restart_interval = tmp; ...
Rust
0
'solar_exposure': self.calculator.calculate_solar_exposure( new_placement, garden_zones, environmental_data.get('sun_data', {}) ), 'growth_prediction': self.calculator.calculate_growth_prediction( new_placement.plant_specs, new_pla...
Python
1
# Function is a group of statement performing a specific task def avg(): a = int(input("Enter Number 1:")) b = int(input("Enter Number 2:")) c = int(input("Enter Number 3:")) average = (a+b+c)/3 print(average) def calculator(): operator = input("Enter Your Operator (+,-,*/):") num1 = int(...
Python
1
N : ErrorCode = ErrorCode::from_constant(8236); // ERROR_DS_UNAVAILABLE_CRIT_EXTENSION /// This request requires a secure connection. pub const CONFIDENTIALITY_REQUIRED : ErrorCode = ErrorCode::from_constant(8237); // ERROR_DS_CONFIDENTIALITY_REQUIRED /// Inappropriate matching. pub const INAPPROPRIATE_MATCHING : Err...
Rust
0
self) -> crate::error::ConflictException { crate::error::ConflictException { invalid_parameter: self.invalid_parameter, message: self.message, } } } } impl ConflictException { /// Creates a new builder-style object to manufacture [`ConflictExceptio...
Rust
0
"""Network configuration and utilities.""" from pydantic import BaseModel class Network(BaseModel): """Represents a blockchain network.""" protocol_family: str network_id: str | None = None chain_id: str | None = None
Python
1
See [examples](https://github.com/TimonPost/crossterm/blob/master/examples/) for more. /// /// ### Crossterm Type | [see more](https://github.com/TimonPost/crossterm/blob/master/examples/some_types/mod.rs) /// This is a wrapper for all the modules crossterm provides like terminal, cursor, styling and input. /// /// ``...
Rust
0
to_transition(&self) -> bool; fn get_duration(&self) -> gst::ClockTime; fn get_element(&self, name: &str) -> Option<TimelineElement>; fn get_groups(&self) -> Vec<Group>; fn get_layer(&self, priority: u32) -> Option<Layer>; fn get_layers(&self) -> Vec<Layer>; fn get_pad_for_track<P: IsA<Tra...
Rust
0
ne, Copy, enum_map::Enum)] pub enum Counter { /// An axis was deserialized. /// This typically runs ~100MB/s so it's modestly expensive. ReadAxis, /// An axis label was serialized. /// Axes store labels individually so the whole axis isn't serialized at once. /// Instead, we note the number of t...
Rust
0
; pub const DIDAL_BOTTOMALIGNED: DWORD = 0x00000008; STRUCT!{struct DIDEVICEIMAGEINFOA { tszImagePath: [CHAR; MAX_PATH], dwFlags: DWORD, dwViewID: DWORD, rcOverlay: RECT, dwObjID: DWORD, dwcValidPts: DWORD, rgptCalloutLine: [POINT; 5], rcCalloutRect: RECT, dwTextAlign: DWORD, }} pub ...
Rust
0
pass else: self.robot_busy = True self.sorter.set_speed(read_config(self)["robot"]["speed"]) if hasattr(self, "sorting_worker"): self.sorting_worker.stop() self.sorting_worker.wait() self.sorting_worker = SortingWorker(self) self.sorting_worker...
Python
1
n(start_logits, end_logits, start_positions, end_positions, **kwargs) return QuestionAnsweringModelOutput( loss=loss, start_logits=start_logits, end_logits=end_logits, hidden_states=outputs.hidden_states, attentions=outputs.attentions, ) __a...
Python
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import hashlib import os from subprocess import Popen, PIPE from jinja2 import Template def calculate_hash(src): m2 = hashlib.md5() m2.update(str(src).encode("utf8")) return m2.hexdigest() def render_gif(template_name, sentences): filename = template_na...
Python
1
t.device_id)); let future = request .options .with(&device) .delete_range(request.range) .then(Ok); Reply::future(future) } } // Copyright (C) 2019 <NAME> <<EMAIL>> // SPDX-License-Identifier: MIT use gio::SettingsExt; pub trait SessionHandler { ...
Rust
0
stable&mode=debug&edition=2018&gist=579199c02611a20cdbfc9928c00befe7 macro_rules! has_unsigned_version { ( $u:ty, $t:ty $(,)? ) => ( impl HasUnsignedVersion for $t { type Unsigned = $u; type LeBytes = [u8; mem::size_of::<Self>()]; #[inline(always)] ...
Rust
0
kip some uninteresting transactions if (pending_tx is None) or (pending_tx.get("to") is None): continue # Skip transactions already mined if pending_tx.get("blockNumber") is not None: continue if (pending_tx.get("t...
Python
1
cs.is_satisfied()); } { // custom gate with state width 4 let cs = &mut init_cs::<Bn256>(); let mut params = PoseidonParams::default(); params.use_custom_gate(CustomGate::QuinticWidth4); test_circuit_fixed_len_generic_cipher::<_, _, _, RATE, WIDTH>(4, cs, &params); ...
Rust
0
)) assert result.parent_metadata.parent_id == "my_crop" assert result.parent_metadata.origin_coordinates == OriginCoordinatesSystem( left_top_x=100, left_top_y=20, origin_width=168, origin_height=192, ) assert result.workflow_root_ancestor_metadata.parent_id == "root" ...
Python
1
from sqlalchemy.orm import DeclarativeBase, declared_attr, Mapped, mapped_column from sqlalchemy import Integer from sqlalchemy.ext.asyncio import AsyncAttrs from enum import StrEnum class GenderEnum(StrEnum): MALE = "мужчина" FEMALE = "женщина" class user_cat_name(StrEnum): SALE = "SALE" SUPP = "SU...
Python
1
pes. /// /// * **`Form<T>`, `LenientForm<T>`** _where_ **`T: FromUriParam + FromForm`** /// /// Uses the implementation of `UriDisplay` for `T::Target`. /// /// In general, when a type of `Form<T>` is to be displayed as part of a /// URI's query, it suffices to derive `UriDisplay` for `T`. Note that any /...
Rust
0
headings, and movements. seed = 111 # print("seed=",i) setup_environment(seed) sigma = 1.0 # Observation noise standard deviation T = 50 # Number of time steps # Simulate for both movement policies policies = ['random_walk', 'straight_until_obstacle'] results = {} # 2. Loop ...
Python
1
nst LAYER_UI: Layer = 10; use std::{ os::unix::net::UnixStream, path::{Path, PathBuf}, }; use secstr::SecUtf8; use crate::{packet::Packet, store::Credential}; pub struct Client { stream: UnixStream, } impl Client { /// Creates a new client instances. /// # Errors /// Can fail due to I/O erro...
Rust
0
 c@sddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z dZ dZ dZ dZdZdZdZd Zd Zed kreekre jdqndS( iNti386tx64tlevel3tlevel4texet sharedlib...
Python
1
] }; let cp1 = Mat4x1 { _val: [ 10f64, 16f64, 17f64, 18f64 ] }; { let mut interp = LinearInterp::init( 10, cp0, cp1 ); test_interpolate::test_interp_forward( & mut interp, & cp0, & cp1 ); } { let mut interp = LinearInterp::init( 10, cp0, cp1 ); test_interpolate::test_in...
Rust
0
writer.reset()?; write!(writer, "!")?; let term_output = writer.into_inner(); let mut new_writer = Ansi::new(vec![]); TermOutputParser::new(&mut new_writer).parse(&term_output)?; let new_term_output = new_writer.into_inner(); assert_eq_term_output(&new_term_output, &ter...
Rust
0