text
string
label_name
string
labels
int64
ode(min=1, max=1), ArgChoice(min=1, max=1, choices=_REPAIRABLE_STORAGE_TYPES), ArgFile(min=1, max=1)], [IGNORE_CONSIST_OPT, DRY_RUN_OPT, PRIORITY_OPT] + SUBMIT_OPTS, "<node-name> <storage-type> <volume-name>", "Repairs a storage volume on a node"), "list-tags": ( ListTags, ARGS_ONE_NODE, [],...
Python
1
''' Reference: https://github.com/alibaba-damo-academy/FunASR pip install funasr pip install modelscope pip install -U rotary_embedding_torch ''' try: from funasr import AutoModel except: print("如果想使用FunASR,请先安装funasr,若使用Whisper,请忽略此条信息") import os import sys sys.path.append('./') from src.cost_time import calc...
Python
1
mem_cost, time_cost, lanes, threads, secret, secret_len, ad, ad_len, hash_len, ) { Ok(val) => val, Err(err) => return err as i32, }; match argon2::hash_encoded(pwd, salt, &config) { Ok(string) => { let b...
Rust
0
static TCP_BUFFER_SIZE: usize = 1024; pub async fn bind(addr: String, sender: Sender<Metric>) -> Result<(), io::Error> { let mut listener = TcpListener::bind(&addr).await?; info!( "Reciever listening; proto={} addr={}", "tcp", listener.local_addr().unwrap() ); loop { l...
Rust
0
; public Triple(int a, int b, int c) { super(a, b); this.c = c; } @Override public int sum() { return super.sum() + c; } } public static int pairHash(int a, int b) { Pair pair = new Pair(a, b); return pair.hash(); } pu...
Rust
0
import math import random import datetime print(math.sqrt(25)) print(math.factorial(4)) print(math.pi) print(random.randint(1,10)) print(random.choice(["Elma","Armut","Muz"])) simdi = datetime.datetime.now() print("Şu an:",simdi)
Python
1
KeyCode::MouseLeft && ee.down_widget.is(self.id()) && l.is_hovered() && !self.locked { let new = !self.state.get(l.ctx); (self.trigger)(l.reference(),new); Self::set(l,new); return true; } } else if let Some(ee) = e.event.is_kbd_press()...
Rust
0
alue_states, attention_mask=attention_mask, position_ids=position_ids, cos=cos, sin=sin, ) if past_key_value is not None: cache_kwargs = {"sin": sin, "cos": cos} # Specific to RoPE models _ = past_k...
Python
1
s(): if value is None: null_items += 1 if null_items == 3: raise KeyError("No valid attributes provided to update") if value is not None: setattr(user, key, value) try: DB.session.commit() except SQ...
Python
1
manually decoding a C bitfield. In practice, this /// works well on common little-endian architectures such as x86_64, where the bitfield has a /// common representation (even if it is not part of the C spec). The PyO3 CI tests this API on /// x86_64 platforms. /// /// By using this API, you accept...
Rust
0
from openai import OpenAI def final_grade(feedback, client, criterion, subject): # Prompt for GPT-4 with strict JSON output prompt = f""" You are part of an important IB MYP grading committee responsible for grading students' work based on specific evidence. Here is the given feedback per strand: {...
Python
1
import pytest from app.api.stores.models import Store from app.api.stores.schemas import StoreSchemaCreate, StoreSchemaUpdatePartial from app.db.test_data.test_data_scripts import open_json @pytest.fixture() async def stores(): return open_json(Store.__tablename__) @pytest.fixture() async def store_add_data() ...
Python
1
# Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com) # -*- coding: utf-8 -*- """ mapillary.utils.extract ======================= This module deals with extracting multiple fields nested within a GeoJSON packet. - Copyright: (c) 2021 Facebook - License: MIT LICENSE """ def extract_properties...
Python
1
nerate": events = Counter(sum((t["events"] for t in cases), [])) if events: lines.append(" - Events:") lines += [ f" * {100 * v / len(cases):.2f}%, {k}" for k, v in sorted(events.items(), key=lambda x: (-x[1], x[0]))...
Python
1
) -> str | None: """Return icon.""" if self.entity_description.icon_fn is not None: return self.entity_description.icon_fn(self._attr_native_value) return self.entity_description.icon def update(self) -> None: """Fetch data for sensors.""" self._attr_native_val...
Python
1
#!/usr/bin/env python3 from subprocess import call from tqdm import tqdm from multiprocessing import Pool from functools import partial from autorecon.lib import enumWeb from autorecon.lib import enumWebSSL from autorecon.utils import config_parser import psutil from sty import fg import os import signal import loggin...
Python
1
#!/usr/bin/env python3 """ Basic usage test for the GxP Python Toolkit. This script demonstrates basic functionality of both the soft delete and audit trail modules. """ import asyncio from datetime import datetime from sqlalchemy import Column, Integer, String, create_engine from sqlalchemy.ext.declarative import d...
Python
1
hls_configuration: Option<HlsConfiguration>, /// <p>The identifier for the configuration.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>The URL that the player accesses to get a manifest from AWS Elemental MediaTailor. This session ...
Rust
0
solana_sdk::signature::Keypair; use solana_sdk::timing::duration_as_us; use std::time::Duration; #[derive(Default)] struct BroadcastStats { // Per-slot elapsed time shredding_elapsed: u64, insert_shreds_elapsed: u64, broadcast_elapsed: u64, receive_elapsed: u64, clone_and_seed_elapsed: u64, } ...
Rust
0
TBD: samples must not be mutated // TBD: each element of samples must be properly initialized // SAFETY: this is safe because samples are checked for null, alignment and size let samples = unsafe { core::slice::from_raw_parts(samples, sample_count) }; info!("about to schedule a total of {} samples", sam...
Rust
0
} #[derive(Deserialize)] pub struct FromParam { from: i32, } pub fn date_of_img(db: &PgConnection, photo_id: i32) -> Option<NaiveDateTime> { use crate::schema::photos::dsl::{date, photos}; photos.find(photo_id).select(date).first(db).unwrap_or(None) } pub fn monthname(n: u32) -> &'static str { match ...
Rust
0
, NonTerminal(alias)) yield make_recons_rule_to_term(origin, origin) def match_tree(self, tree, rulename): """Match the elements of `tree` to the symbols of rule `rulename`. Parameters: tree (Tree): the tree node to match rulename (str): The expected full rule n...
Python
1
self ) -> Poll<(), Self::Error> { self.service.poll_ready() } fn call( &mut self, svc_req: ServiceRequest ) -> Self::Future { let total_timer = Stopwatch::start_new(); let sel = labels!{ "method" => svc_req.method().as_str(), }; let total_histogram = self.family.total.with( &...
Rust
0
es = self._make_features(expr.get('features'), info) if isinstance(data, OrderedDict): data = self._make_implicit_object_type( name, info, ifcond, 'arg', self._make_members(data, info)) if isinstance(rets, list): assert len(rets) == 1 r...
Python
1
.pden_pll0_sscg().poweredoff() ); syscon.raw.pll0ctrl.write(|w| unsafe { w .clken().enable() .seli().bits(pll.seli) .selp().bits(pll.selp) }); syscon.raw.pll0ndec.write(|w| unsafe { w .ndiv().bits(pll.n) }); s...
Rust
0
her = XxHash::with_seed(XX_SEED1); x.hash(&mut hasher); hasher.finish() } pub fn std_hash128<T: Hash>(x: &T) -> u128 { let mut hasher = XxHash::with_seed(XX_SEED1); x.hash(&mut hasher); let w1 = hasher.finish(); let mut hasher = XxHash::with_seed(XX_SEED2); x.hash(&mut hasher); let w2 =...
Rust
0
last_command = LastCmd::Quadratic; path.push(PathCommand::QuadraticBezierTo(ctl, pos)); } } Command::CubicCurve(pos, params) => { for cmd in params.chunks_exact(6) { let ctl1 = process_relative(Vec2::new(cmd[0] as Coord, cmd...
Rust
0
et(copy_all_btn) self.tabs.addTab(tab, "常用命令") def update_common_commands_text(self): """更新常用命令文本内容""" content = "# 渗透测试常用命令参考\n\n" # Windows命令 content += "## Windows 常用命令\n\n" for cmd, desc in self.get_windows_commands().items(): content += f"### {cmd}...
Python
1
crate::v1_15::apimachinery::pkg::apis::meta::v1::MicroTime> = None; while let Some(key) = serde::de::MapAccess::next_key::<Field>(&mut map)? { match key { Field::Key_acquire_time => value_acquire_time = serde::de::MapAccess::next_value(&mut map)?, ...
Rust
0
et("task_id") if not task_id: raise Exception("创建任务失败,未获取到task_id") print(f"✅ 任务创建成功: {task_id}") print("⏳ 等待试衣任务完成...") final_result = handler._wait_for_task(task_id, max_wait_time=600) print(final_result) image_url = final_result.get("output", {}).get("image_url", '') print(f"🎉 ...
Python
1
"府県": td[4].text.strip(), "級班": td[6].text.strip(), "着差": td[7].text.strip(), "上り": td[8].text.strip() if len(td) > 8 else "", "決まり手": td[9].text.strip() if len(td) > 9 else "", "S": "S" if "S" in sb_text else "", ...
Python
1
, offset: u32, size: u32) -> WasmEdgeResult<&mut u8> { let ptr = unsafe { wasmedge::WasmEdge_MemoryInstanceGetPointer(self.ctx, offset, size) }; match ptr.is_null() { true => Err(Error::OperationError(String::from( "fail to get the data pointer in the memory instance", ...
Rust
0
ards_own_fields(arg1: *const FaissIndexShards) -> ::std::os::raw::c_int; } extern "C" { pub fn faiss_IndexShards_set_own_fields( arg1: *mut FaissIndexShards, arg2: ::std::os::raw::c_int, ); } extern "C" { pub fn faiss_IndexShards_threaded(arg1: *const FaissIndexShards) -> ::std::os::raw::c_i...
Rust
0
#, if let ThmKind::Axiom = fe.env.thms[tid].kind {"ax"} else {"thm"}, mangled, thm))?, LineKind::Conv(defs) => { write!(w, "<i>conv</i>")?; let mut first = true; for &def in &*defs { if !mem::take(&mut first) { write!(w, ",")? } write!(w, " <a class=\"def\" href...
Rust
0
e_path): # Process video frames features = get_feature(audio_file_path) for frame_file in os.listdir(video_folder_path): if frame_file.endswith(".jpg"): img_path = os.path.join(video_folder_path, frame_file) ...
Python
1
rn the same type let n = 5; if n < 0 { print!("{} is negative", n); } else if n > 0 { print!("{} is positive", n); } else { print!("{} is zero", n); } let big_n = if n < 10 && n > -10 { println!(", and is a small number, increase ten-fold"); 10 * n ...
Rust
0
ess::from_inner_unchecked( WotsSpongePrivateKeyGeneratorBuilder::<Kerl>::default() .with_security_level(WotsSecurityLevel::Low) .build() .unwrap() .generate_from_seed(&seed, 0) .unwrap() .generate_public_key() ...
Rust
0
ter_than_1(): batch_dim = 0 old_max_bs, new_max_bs = 16, 32 ref_profile = TensorRTProfile({ "input__0": ShapeTuple((1, 2), (2, 3), (old_max_bs, 4)), "input__1": ShapeTuple((1, 3), (1, 4), (old_max_bs, 5)), }) old_profile = TensorRTProfile({ "input__0": ShapeTuple((1, 2), (2, ...
Python
1
// ===== impl Handle ===== impl<F: 'static> Handle<F> { pub fn reload<N>(&self, new_filter: impl Into<F>) -> Result<(), Error> where F: Filter<N>, { self.modify(|filter| { *filter = new_filter.into(); }) } /// Invokes a closure with a mutable reference to the ...
Rust
0
from typing import Annotated, Literal from dash import dcc, html from pydantic import AfterValidator, Field, field_validator from pydantic.json_schema import SkipJsonSchema from vizro.managers import data_manager from vizro.models import VizroBaseModel from vizro.models._components._components_utils import _process_c...
Python
1
ly] Set the given wait flags on the given test instance pub fn set_wait_flags(ti_id: usize, flags: Vec<String>, meta: Option<Meta>) -> Result<()> { let n = node!(PGMIGXLSetWaitFlags, ti_id, flags; meta); FLOW.push(n) } /// Used to model flow groups, IG-XL test instance groups, etc. pub fn start_group( name...
Rust
0
/* Normalize the subnormal number. */ bits <<= 1; while (bits & 0x0010000000000000) == 0 { exp-= 1; bits <<= 1; } } if (exp == -1 || exp == 0) && x < 1.01 && x > 0.99 && want_hi_prec { /* The normal method doesn't work well ...
Rust
0
# -*- coding: utf-8 -*- import sys reload(sys) sys.setdefaultencoding('utf8') #最终输出:x1=question_representation,x2=topic_representation,y=0(or 1)--->(x1,x2,y) import codecs #1.将问题ID和TOPIC对应关系保持到字典里.################################################################################ print("process question_topic_train_set.t...
Python
1
have at least one level of nesting for flattening to make sense. """ arg: Value[dt.Array[dt.Array]] shape = rlz.shape_like("arg") @property def dtype(self): return self.arg.dtype.value_type class Range(Value): """Base class for range-generating operations.""" shape = rlz.sh...
Python
1
} } impl<T> Spans<T> { /// Create a new [`Spans`] object. The `stmt` and `decl` fields are initially /// uninitialized. #[must_use] pub fn new() -> Spans<T> { Spans { stmt: MaybeUninit::uninit(), decl: MaybeUninit::uninit(), lc: None, data: BTreeMap::new() } } /// Initialize...
Rust
0
DebugHudStereo_QuadWithCrosshair = 2, ovrDebugHudStereo_CrosshairAtInfinity = 3, ovrDebugHudStereo_Count = 4, ovrDebugHudStereo_EnumSize = 2147483647, } pub type ovrDebugHudStereoMode = Enum_ovrDebugHudStereoMode_; pub type compileTimeAssert0 = [::std::os::raw::c_char; 1usize]; pub type compileTimeAssert1 =...
Rust
0
} pub fn files(&self) -> &Vec<String> { &self.params } pub fn emoji(&self) -> bool { self.emoji } pub fn default() -> Self { Self { mode: Mode::Commit, params: vec![], config_filename: String::new(), emoji: false } } fn cli() -> App<'static, 'static> { App::new(NAME).version(VERSION).author(AUTHOR).a...
Rust
0
resources = os.path.expanduser("~/resources/") corenlp_dir = os.path.join(resources, "stanford-corenlp-4.5.8/") os.environ["CORENLP_HOME"] = corenlp_dir with open("examples.conllu", "r", encoding="utf-8") as f: parsed_corpus = [b for b in f.read().split("\n\n\n") if b.strip()] for sent...
Python
1
import heapq import numpy as np def heuristic(puzzle, goal): return np.sum(puzzle != goal) def solve(puzzle, goal): start = (heuristic(puzzle, goal), 0, puzzle, [], None) heap = [start] while heap: (h, g, puzzle, path, prev_move) = heapq.heappop(heap) if np.array_equal(puzzle, goal): ...
Python
1
import numpy as np matrix = np.zeros((3, 3)) #for i in range(len(matrix)): #for j in range(len(matrix[i])): # matrix[i][j] = int(input(f"Enter an integer in matrix [{i}][{j}] position: ")) [[1, 2, 3], [4, 5, 6], [7, 8, 9]] ls = [[None for _ in range(3)] for _ in range(3)] for i in range(len(ls)): for j in ra...
Python
1
test] fn test_vec_i32(u in vec(any::<i32>(), 1..100)) { assert!(test_serialization_roundtrip(&u)); } #[test] fn test_vec_vec_u8(u in vec(vec(any::<u8>(), 1..100), 10)) { assert!(test_serialization_roundtrip(&u)); } #[test] fn test_uref_map(m in uref_map_arb(20)) { a...
Rust
0
s closest! # D1 = scipy.spatial.distance.cdist(np.array([U_point, V_point])[np.newaxis, :], P_0[:, 0:2]).squeeze() D2 = scipy.spatial.distance.cdist(np.array([U_point, V_point])[np.newaxis, :], P_1[:, 0:2]).squeeze() D3 = scipy.spatial.distance.cdist(np.array([U_point, V_point])[np.newax...
Python
1
<[Value<'v>; 2]> { Ok([v, v]) } } impl InstrNoFlowImpl for InstrPopImpl { type Pop<'v> = Value<'v>; type Push<'v> = (); type Arg = (); #[inline(always)] fn run_with_args<'v>( _eval: &mut Evaluator<'v, '_>, _stack: &mut BcStackPtr<'v, '_>, _ip: BcPtrAddr, ...
Rust
0
ate = md5_instance.update for f in md5_source: filehandle = open(f, "rb") md5_update(filehandle.read()) filehandle.close() md5_new = md5_instance.hexdigest() else: print(" Invalid --md5_method=%s argument is not a valid source") sys.exit(1) ...
Python
1
, "msgId": 912, "msg": { "LastUpdated": "2021-02-22T12:45:52.979000Z", "Quote": { "Ask": 0.92462, "Bid": 0.92382, "Mid": 0.92422 } } }, ...
Python
1
let (stop_tx, stop_rx) = promise::promise(); let (remote_tx, remote_rx) = mpsc::channel(8); let connections = RemoteConnections::new( ws, config, OpenEndedFutures::new(), fake_connections.clone(), Some(FakeListener::new(incoming)), router.clone(), RemoteC...
Rust
0
ode, DHCP_SERVER_IDENTIFIER_OPTION) .and_then( |v| { v.iter().nth(0) // There's only one DHCP server for a given DHCP msg .map(|ip| *ip) }); let gateway_addrs = Self::extract_ip_addrs(mode, ROUTER_OPTION).unwrap_or(Vec::new()); let dns_server_addrs...
Rust
0
.collateral, collateral_balance.safe_sub(&amount)?)?; let borrower_after_withdrawal = BorrowerData::new( collateral_balance_after_withdrawal_value, borrow_balance_value, market.collateral_factor, market.under_collaterized_warn_percent, ); ensure!( !borrower_after_withdrawal.should_liquida...
Rust
0
-> FG_COMMAND_STARTED_R { FG_COMMAND_STARTED_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - 12:12\\] Interrupt flag 12. A radio operation command has gone into active state."] #[inline(always)] pub fn command_started(&self) -> COMMAND_STARTED_R { COMMAND_STARTED_R::new(((sel...
Rust
0
False]) @pytest.mark.parametrize("input_dtype", ['float32', 'int32', 'int64', 'float64']) @pytest.mark.precommit @pytest.mark.precommit_torch_export @pytest.mark.precommit_fx_backend def test_amin_amax(self, op_type, input_dtype, axis, keep_dims, out, ie_device, precision, ir_version): self....
Python
1
(similar to lambda) in Rust // to compile and run, execute: // rustc closure.rs // ./closure fn main() { let doubler = |x| x * 2; // define a callable object inside main function let value = 5; // initialize some random variable /* Call closure with int 4 */ let twice = doubler(value); ...
Rust
0
)) } else { self.next() } } _ => None, } } } fn adj(i: usize, j: usize, width: usize, height: usize) -> AdjacentIterator { AdjacentIterator::new(i, j, width, height) } fn get_cost(costs: &CostMap, p: &(usize, usize)) -> usize ...
Rust
0
ive(Clone)] pub struct SheetWorker<F> { client: SheetClient, spreadsheet_management: Spreadsheet, spreadsheet_backup: Spreadsheet, interval: Duration, _field: PhantomData<F>, } #[async_trait] impl<F> AsyncWorker for SheetWorker<F> where F: FieldController + Sync, { const NAMESPACE: &'static...
Rust
0
let term_b = instr.arg().get_term(2)?; let expr_y: Vec<vl::Expr> = vec_expr_try_from_term(term_y)?; let expr_s: Vec<vl::Expr> = vec_expr_try_from_term(term_s)?; let expr_a: Vec<vl::Expr> = vec_expr_try_from_term(term_a)?; let expr_b: Vec<vl::Expr> = vec_expr_...
Rust
0
from datetime import date, datetime, timedelta from typing import Optional, List, Dict, Any from calendar import monthrange from sqlalchemy.ext.asyncio import AsyncSession from event import repositories as event_repo from event.dto import ( EventTimelineDTO, EventSearchDTO, EventSearchResultDTO, MonthlyCalend...
Python
1
th = django_filters.BooleanFilter(method='filter_this_month') last_7_days = django_filters.BooleanFilter(method='filter_last_7_days') # ✅ New custom filter for unpaid + partially paid unpaid_or_partial = django_filters.BooleanFilter(method='filter_unpaid_or_partial') class Meta: model = Bill ...
Python
1
_id(&mut self) { self.id = None; } pub fn set_title(&mut self, title: String) { self.title = Some(title); } pub fn with_title(mut self, title: String) -> PipelineBranchesitempullRequest { self.title = Some(title); self } pub fn title(&self) -> Option<&String> { self.title.as_ref() }...
Rust
0
"40.71277496, -74.00597306, 5.5km", "-33.85598011, 151.20666526, 12m", ], } ) prophet_df = DataFrame( { "__timestamp": [ datetime(2018, 12, 31), datetime(2019, 12, 31), datetime(2020, 12, 31), datetime(2021, 12, 31), ...
Python
1
# Copyright(C) 2016 Phyks # # This file is part of a woob module. # # This woob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
Python
1
} } pub struct AcceptorService { acceptor: SslAcceptor, conns: Counter, } impl<T> Service<T> for AcceptorService where T: AsyncRead + AsyncWrite + Unpin + 'static, { type Response = SslStream<T>; type Error = SslError; type Future = AcceptorServiceResponse<T>; fn poll_ready(&self, ctx...
Rust
0
)] pub enum RecordContentType { Intro(String), } #[derive(Clone, Debug, Deserialize, Serialize, CandidType)] pub struct RecordDetail{ pub content_type: RecordContentType, pub content: Vec<u8> } <reponame>bsundsrud/hpg use error::HpgError; use lazy_static::lazy_static; use lua::LuaState; use output::Structur...
Rust
0
# Copyright (c) 2010-2022 openpyxl from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( Typed, Alias, ) from openpyxl.descriptors.excel import ExtensionList from openpyxl.descriptors.nested import NestedBool from .text import Text, RichText from .layout import Layout ...
Python
1
{ msr::rdmsr(msr::IA32_APIC_BASE) }; // If the EXD bit is set, the EN bit must be set as well and // there is no need to flip it again. if raw_base & IA32_APIC_BASE_EXD == 0 { unsafe { msr::wrmsr( msr::IA32_APIC_BASE, raw_base...
Rust
0
, b, c, c] // after resize: [_, a, b, c] (the second c is not dropped, per the implementation of `set_len`) let dst_ptr = &mut self.segments[seg_idx][seg_offset] as *mut T; let src_ptr = dst_ptr.add(1); std::ptr::copy(src_ptr, dst_ptr, orig_len - seg_offset - 1); ...
Rust
0
>()); } <gh_stars>0 use actix::prelude::*; use actix::{Actor, SyncContext}; use diesel::pg::PgConnection; use diesel::prelude::*; use diesel::r2d2::{ConnectionManager, Pool}; use diesel::result::{Error as DieselError}; use diesel::result::DatabaseErrorKind::SerializationFailure; use diesel; use filetime; use serde_json...
Rust
0
Instruction, InstructionError}, keyed_account::KeyedAccount, message::Message, pubkey::Pubkey, }; use std::{cell::RefCell, fmt::Debug, rc::Rc, sync::Arc}; pub type ProcessInstructionWithContext = fn(usize, &[u8], &mut dyn InvokeContext) -> Result<(), InstructionError>; /// Invocation context passed t...
Rust
0
; use test_utils; /// Helper function to create a procedure with a given name and crate name fn create_procedure_with_name( name: String, crate_name: String, is_panic: bool, ) -> Procedure<RDPProcedureMetaData> { let capstone = Capstone::new() .x86() ...
Rust
0
inner { n.step(&us.variants()[index]) } else { unreachable!("Avro value out of sync with schema") }; (*inner, next) } _ => bail!("unsupported avro value: {:?}", v), }; extract_row(v, extra, n) } pub fn extract_row<'a, I>(v: Val...
Rust
0
system view V$SESSION * - OCI_TRC_DETAIL : Client application additional information. * It's recorded in the column CLIENT_INFO of the * system view V$SESSION * * @warning * The system view V$SESSION is updated on Oracle versions >= 10g * * @warning * O...
Rust
0
"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9", vec![ 185, 77, 39, 185, 147, 77, 62, 8, 165, 46, 82, 215, 218, 125, 171, 250, 196, 132, 239, 227, 122, 83, 128, 238, 144, 136, 247, 172, 226, 239, 205, 233 ], "<KEY>", "<...
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 u...
Python
1
from project.formula_teams.mercedes_team import MercedesTeam from project.formula_teams.red_bull_team import RedBullTeam class F1SeasonApp: def __init__(self): self.red_bull_team = None self.mercedes_team = None @staticmethod def valid_team(team_name): return f"{team_name} has jo...
Python
1
are nonzero, 3 digits of fractional seconds are added pub fn format(instant: &Instant) -> String { let structured = instant.to_chrono(); let weekday = match structured.weekday() { Weekday::Mon => "Mon", Weekday::Tue => "Tue", Weekday::Wed => "Wed", We...
Rust
0
: u64 = 309; pub const CKM_DES3_CBC_PAD: u64 = 310; pub const CKM_DES3_CMAC_GENERAL: u64 = 311; pub const CKM_DES3_CMAC: u64 = 312; pub const CKM_CDMF_KEY_GEN: u64 = 320; pub const CKM_CDMF_ECB: u64 = 321; pub const CKM_CDMF_CBC: u64 = 322; pub const CKM_CDMF_MAC: u64 = 323; pub const CKM_CDMF_MAC_GENERAL: u64 = 324; p...
Rust
0
rl.draw_text("TAB - next coordinate", gui_x , gui_y+20, 20, rl.DARKGRAY) rl.draw_text("L_ALT - close GUI", gui_x, gui_y + 40, 20, rl.DARKGRAY) rl.draw_text("RIGHT_ALT - set to object position", gui_x, gui_y + 60, 20, rl.DARKGRAY) rl.draw_text(self.message, gui_x, gui_y + 80, 20, rl.RED) ...
Python
1
rg3: usize, arg4: *const ::libc::c_void, ) -> cl_int; } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum CLBlastStatusCode_ { CLBlastSuccess = 0, CLBlastOpenCLCompilerNotAvailable = -3, CLBlastTempBufferAllocFailure = -4, CLBlastOpenCLOutOfResources = -5, CLBlastO...
Rust
0
latest_version } } }; let archive_data = download_package( &compose_url_to_exec(&install_version)?, client, &install_version, ) .await?; let old_exe_path = std::env::current_exe()?; let new_exe_path = unpack(archive_data)?; let permissions = fs::metadata(&old_exe_path)?.per...
Rust
0
while x * x + y * y > self.radius * self.radius { x = self.rng.gen_range(-self.radius..self.radius); y = self.rng.gen_range(-self.radius..self.radius); } vec![x + self.x_center, y + self.y_center] } } /** * Your Solution object will be instantiated and called as such: ...
Rust
0
f forget_all(chan, db): """- Remove all factoids in the current channel""" del_factoid(db, chan) return "Facts cleared." @hook.command() def info(text, chan, notice): """<factoid> - shows the source of a factoid""" text = text.strip().lower() if text in factoid_cache[chan]: notice(fa...
Python
1
ing_active_parameter_manager(components_2, ["1", "2"]) assert scaling_apm.constant_g_values is None # Check that one can't initialise with an unequal number of reflections, # either within the selection or overall. with pytest.raises(AssertionError): components_2 = {"1": mock_scaling_component(...
Python
1
Embed; use warp::{filters::BoxedFilter, http::header::HeaderValue, path::Tail, reply::Response, Filter}; #[tokio::main] async fn main() { let routes = warp::path!("api" / ..) .and(warp::path::tail()) .map(|_| "Please pretend there's an API here.") .or(ui_routes()); warp::serve(routes)....
Rust
0
from fastapi import APIRouter router = APIRouter(prefix='/user', tags=['user']) @router.get('/') async def all_users(): pass @router.get('/user_id') async def user_by_id(): pass @router.post('/create') async def create_user(): pass @router.put('/update') async def update_user(): pass @router....
Python
1
# -*- coding: utf-8 -*- # # Copyright 2023 Google LLC. All Rights Reserved. # # 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 requir...
Python
1
st DAQmx_Dev_AO_SupportedOutputTypes: ::std::os::raw::c_ushort = 12243; pub const DAQmx_Dev_AO_SampClkSupported: ::std::os::raw::c_ushort = 10646; pub const DAQmx_Dev_AO_SampModes: ::std::os::raw::c_ushort = 12253; pub const DAQmx_Dev_AO_MaxRate: ::std::os::raw::c_ushort = 10647; pub const DAQmx_Dev_AO_MinRate: ::std::...
Rust
0
n")) def get_context_data(self, **kwargs): context = super(BaseMenuListView, self).get_context_data(**kwargs) context["create_form"] = MenuCreateForm() context["batch_delete_uri"] = reverse("menus:delete") return context class MenuCreateView(JSONResponseMixin, View): def post(...
Python
1
""" 自定义异常类定义 统一管理项目中的异常类型 """ class RAGException(Exception): """RAG系统基础异常类""" def __init__(self, message: str, error_code: str = None): self.message = message self.error_code = error_code super().__init__(self.message) class LLMException(RAGException): """LLM相关异常""" pass c...
Python
1
import json import os import sys from absl import app from mlir_synth.dialects.func import * from mlir_synth.ir import * import target.hlo_target as hlo_target import target.numpy_target as numpy_target from array_helpers import * from common_helpers import * from mlir_helpers import * from synthesis import * FLAG...
Python
1
""" ## When to use AutoModels and AutoTokenizers? Pipelines and AutoModels with AutoTokenizers are two approaches to working with Hugging Face models, each suited for different use cases. Pipelines offer simplicity, while AutoModels and AutoTokenizers provide more control and customization. """ from transformers impo...
Python
1
er)?) } /// Access the current latency value for tap interrupts. fn tap_latency(&self) -> AdxlResult<u8> { let register = 0x22; Ok(self.access(register)?) } /// Access the current threshold value for tap interrupts. fn tap_threshold(&self) -> AdxlResult<u8> { let register...
Rust
0
", "New Orleans", 29.9546482, -90.0750732, 1.0), City::new(317, "United States", "Long Beach", 33.7669623, -118.1892319, 1.0), City::new(318, "United States", "Las Vegas", 36.1749705, -115.1372223, 609.0), City::new(319, "United States", "Sacramento", 38.5815719, -121.4944000, 5.0), City::new(320, "United States", ...
Rust
0