text
string
label_name
string
labels
int64
pub const MISSING_INDEX_QUEUE: &str = "Missing an index!"; pub const NO_SONG_ON_INDEX: &str = "There is no queued song on that index!"; /* * Copyright 2021 Fluence Labs Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * ...
Rust
0
shader program, you have to provide code to declare its *uniform semantics*. //! //! The *uniform semantics* represent a mapping between the variables declared in your shader //! sources and variables you have access in your host code in Rust. Typically, you declare your //! variable – `Uniform` – in Rust as `const` a...
Rust
0
import hashlib import time from typing import Optional, Union from nonebot import on_message from nonebot.adapters.minecraft import Bot, Event from nonebot.adapters.minecraft.event.base import ( BaseChatEvent, BaseDeathEvent, BasePlayerCommandEvent, ) from nonebot.matcher import Matcher from nekro_agent.a...
Python
1
import unittest from ..strategy import calculate_rsi, execute_trade, should_buy, should_sell class TestStrategyFunctions(unittest.TestCase): def test_calculate_rsi_valid_input(self): data = [100, 105, 102, 108, 110] period = 14 result = calculate_rsi(data, period) self.assertIsNo...
Python
1
Power`]), /// if any (otherwise empty vector). /// /// [`StarPower`]: ./struct.StarPower.html #[serde(default)] pub star_powers: Vec<StarPower>, /// The brawler's id (an arbitrary number). #[serde(default)] // zero pub id: usize, /// The brawler's rank. #[serde(default = "one_...
Rust
0
default_initial_settings = { "name": "Weedo X40", "manufacturer": "Weedo", "start_gcode": "; x40-community.org configuration Rev. 08\n;(**** start.gcode for WEEDO X40 DUAL****)\nT{data['extruder_number']} S ; Selected start extruder\nM140 S{data['bed_temp']} ; Preheat bed\nM109 S{data['nozzle_temp']}; Prehe...
Python
1
/ Format using display_graphviz /// let graphviz_string = format!("{}", plan.display_graphviz()); /// ``` /// /// If graphviz string is saved to a file such as `/tmp/example.dot`, the following /// commands can be used to render it as a pdf: /// /// ```bash /// dot -Tpdf < /tmp/example...
Rust
0
return { audio: new AudioContext() }; }; let signal0 = sample::signal::rate(SAMPLE_HZ).const_hz(300.0).square().scale_amp(0.05); let signal1 = sample::signal::rate(SAMPLE_HZ).const_hz(400.0).square().scale_amp(0.05); let signal2 = sample::signal::rate(SAMPLE...
Rust
0
# -*- coding:utf-8 -*- ''' Reference Paper ---------- Luxburg U V. A tutorial on spectral clustering[J]. Statistics and Computing, 2007, 17(4): 395-416 Blog ---------- https://blog.csdn.net/waleking/article/details/7584084 Example ---------- > filepath = r'.\LoadData.gml' > G = nx.read_gml(filepath) > k = 9 > a ...
Python
1
import tensorflow as tf from tensorflow.contrib import slim from scipy import misc import os, random import numpy as np # https://people.eecs.berkeley.edu/~taesung_park/CycleGAN/datasets/ # https://people.eecs.berkeley.edu/~tinghuiz/projects/pix2pix/datasets/ class ImageData: def __init__(self, load_size, channe...
Python
1
}; use um::winbase::LocalFree; use um::winnt::{HANDLE, LONG, LPSTR, LPWSTR, PVOID, SID}; #[inline] pub unsafe fn AccFree(p: PVOID) -> PVOID { LocalFree(p) } ENUM!{enum SE_OBJECT_TYPE { SE_UNKNOWN_OBJECT_TYPE = 0, SE_FILE_OBJECT, SE_SERVICE, SE_PRINTER, SE_REGISTRY_KEY, SE_LMSHARE, SE_KER...
Rust
0
maxUInt32 return } for i._first <= limit && len(i.blob) > 0 { delta, sz := binary.Uvarint(i.blob) i._first += uint32(delta) i.blob = i.blob[sz:] } if i._first <= limit && len(i.blob) == 0 { i._first = maxUInt32 } } func (i *compressedPostingIterator) updateStats(s *Stats) { s.IndexBytesLoaded += int6...
Rust
0
cfg_attr(feature = "v3_14", deprecated)] fn connect_property_rules_hint_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_search_column_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_show_expanders_notify<F: Fn(&Self) + 'static>(&self,...
Rust
0
_0001_0000) >> 4; let b2 = (num & 0b0_0000_0000_1000) >> 3; let d2 = (num & 0b0_0000_0000_0100) >> 2; let b4 = (num & 0b0_0000_0000_0010) >> 1; let d4 = num & 0b0_0000_0000_0001; let a = a4 << 2 | a2 << 1 | a1; let b = b4 << 2 | b2 << 1 | b1; let c = c4 << 2 | c2...
Rust
0
.long("band") .help("Sakoe Chiba band for DTW computation DEFAULT 1.0") .takes_value(true)) .arg(Arg::with_name("in1") .long("in1") .help("First input file") .required(true) .takes_value(true)) .arg(Arg::with_name("in2") .long("in2") .help("Second input file") ...
Rust
0
(&read.seq(), 5)); assert!(is_homo_polymer(&read.seq(), 4)); } #[test] fn test_log_likelihood() { /* use super::{Coverage, HaplotypeLogLikelihoods}; use ndarray::prelude::*; let count_a = vec![100 as u32, 0, 0, 100, 25]; let count_c = vec![0 as u32, 200, 0, 0...
Rust
0
ff_by_one(x: &str, y: &str) -> Option<String> { // Compute String of common letters let candidate: String = x .chars() .zip(y.chars()) .filter_map(|(x, y)| if x == y { Some(x) } else { None }) .collect(); // Return the candidate if it is one shorter than the original if ...
Rust
0
Text { .. } => {} } None } pub fn process_window_event(event: winit::event::WindowEvent) -> Option<InputEvent> { match event { WindowEvent::Resized(_) => None, WindowEvent::Moved(_) => None, WindowEvent::CloseRequested => None, WindowEvent::Destroyed => None, WindowE...
Rust
0
release" }; println!("{}", cmd); Command::new("bash") .arg("-c") .arg(format!( "{prefix}target/{build}/{cmd}", prefix = prefix.unwrap_or(""), cmd = cmd, build = build )) .spawn() .unwrap() .wait() .unwr...
Rust
0
pend(ResizeShortestEdge(min_size, max_size, sample_style, clip_frame_cnt=clip_frame_cnt)) # Flip aug_list.append( # NOTE using RandomFlip modified for the support of flip maintenance RandomFlip( horizontal=(cfg.INPUT.RANDOM_FLIP == "horizontal...
Python
1
., ]; let diff = matrix.iter().zip(expected.iter()).fold(0.0, |acc, (&m, &e)| acc+(m-e)*(m-e)); assert!(diff < 1e-6, "{:?} {:?}", matrix, expected); } { let matrix = upscale_matrix(&vec![2]); let expected = vec![ // col major 0.75, 0.25, 0.25, 0.75, ]; let diff = matrix.iter().zip(expected.ite...
Rust
0
et_mut(aon_ent).expect("where did it go?"); score.set(crate::evaluators::clamp(sum, 0.0, 1.0)); } } #[derive(Debug, Clone)] pub struct AllOrNothingBuilder { threshold: f32, scorers: Vec<Arc<dyn ScorerBuilder>>, } impl AllOrNothingBuilder { /** Add another Scorer to this [`ScorerBuilder`]. ...
Rust
0
le", rate_limited: false, authentication: ServerSignatures, added: 1.0, } request: { /// User ID to query. #[ruma_api(query)] pub user_id: &'a UserId, /// Profile field to query. #[serde(skip_serializing_if...
Rust
0
1 => write!(f, "{:>8}/(N{}ᴺ) ", per_iter, self.exponential), 2 => write!(f, "{:>8}/(N²{}ᴺ) ", per_iter, self.exponential), 3 => write!(f, "{:>8}/(N³{}ᴺ) ", per_iter, self.exponential), 4 => write!(f, "{:>8}/(N⁴{}ᴺ) ", per_iter, self.exponential), ...
Rust
0
st_id, subnet_test_id, NODE_1, NODE_2, NODE_3, NODE_4, SUBNET_0, SUBNET_1, SUBNET_2, SUBNET_3, SUBNET_4, SUBNET_5, }, messages::RequestBuilder, }, }; use ic_types::{ messages::CallbackId, xnet::{CertifiedStreamSlice, StreamIndex, StreamIndexedQueue}, Height, NumBytes, Registr...
Rust
0
ody(mockito::Matcher::Json(json!({ "offset": poll_id, "count": 1, "discard_previous": true, }))) .with_header("content-type", "text/json") .with_body( json!({ "offset": poll_id, "e...
Rust
0
#!/usr/bin/python3 -B # Copyright 2023 mjbots Robotic Systems, LLC. info@mjbots.com # # 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 # # Un...
Python
1
&TStructIdentifier::new("foo"))); assert_success!(o_prot.write_field_begin(&TFieldIdentifier::new("foo", TType::Bool, 1))); o_prot.write_struct_end().unwrap(); } #[test] #[should_panic] fn must_fail_if_write_struct_end_without_any_fields() { let (_, mut o_prot) = test_objects();...
Rust
0
from aiogram import Bot from aiogram.types import BotCommand async def set_default_commands(bot: Bot): user_commands = [ BotCommand(command='start', description='Запустить бота') ] await bot.set_my_commands(user_commands)
Python
1
ifier)) => ExprKind::QualifiedMultiPartIdentifier { qualifier, parts: callee_parts, }, (false, None) => ExprKind::MultiPartIdentifier { parts: callee_parts, }, }; Some(CallNode { pos: (callee_start, call_end), callee: Box::new(ExprNode { pos: (callee_start, callee_end), kind: cal...
Rust
0
crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pre_fir0_coef](pre_fir0_coef) module"] pub type PRE_FIR0_COEF = crate::Reg<u32, _P...
Rust
0
#!/usr/bin/env python3 import json from PIL import Image, ImageDraw, ImageFont def hex_rgb(hex): hex = hex.lstrip("#") return tuple(int(hex[i : i + 2], 16) for i in (0, 2, 4)) def relative_luminance(rgb): def channel_lum(c): c = c / 255.0 return c / 12.92 if c <= 0.03928 else ((c + 0.05...
Python
1
/// assert_eq!(expect, buf); /// ``` /// pub fn parse_real_row(s: &str, buf: &mut Vec<f64>) -> Result<usize, ReadError> { let mut tmp = String::new(); parse_real_row_buf(s, buf, &mut tmp) } /// Parse real list with using a scratch buffer pub fn parse_real_row_buf(mut s: &str, buf: &mut Vec<f64>, tmp: &mut...
Rust
0
and * limitations under the License. */ //! Implementation of `record` function. use crate as starlark; use crate::{ collections::SmallMap, environment::GlobalsBuilder, values::{ record::{Field, RecordType}, Value, }, }; use gazebo::prelude::*; #[starlark_module] pub fn global(build...
Rust
0
import os import sys here = os.path.dirname(__file__) ext_files = ["src/mmapbitarray.c", "src/bloomfilter.c", "src/md5.c", "src/primetester.c", "src/MurmurHash3.c", ] kwargs = {} try: if '--no-cython' in sys.argv: raise ImportError() i...
Python
1
import Brick11_unit1 as U1 print(U1.__doc__) print(U1.f.__doc__) a = 2 b = U1.f(a) print(f"{a=} {b=}")
Python
1
import configparser import pandas as pd import math def profitAndLossChanges(): config = configparser.ConfigParser() config.read('config.ini', encoding='GB18030') pred_data = pd.read_csv(config.get('config', 'filename')) actual_data = pd.read_csv("6m.csv") date = pred_data["Unnamed: 0"].values ...
Python
1
>::build(); let socket = UdpManager::bind(pool.deref().deref().clone(), config.local_ip).unwrap(); let peer = socket.connect(UdpConnectionConfig::unbounded(config.remote_ip)); commands.insert_resource(socket); for player_number in 0..2 { if player_number == config.local_player_number { ...
Rust
0
import time from RkSDK import RkSDK from RkSDK import Rk初始化软件入参类 from RkSDK import Rk通讯加密方式枚举类 from RkSDK import Rk禁用还是删除枚举类 from RkSDK import Rk结果心跳失败类 global rksdk rksdk = RkSDK() rk初始化软件入参 = Rk初始化软件入参类() def 接收心跳失败的函数(rk结果心跳失败: Rk结果心跳失败类): print("错误编码:" + str(rk结果心跳失败.错误编码)) print("错误消息:" + rk结果心跳失败.错误消息) ...
Python
1
impl fmt::Debug for ObjectIdentifier { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "ObjectIdentifier({})", self) } } impl fmt::Display for ObjectIdentifier { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let len = self.arcs().count(); for (i, a...
Rust
0
3163715853577792682171512256175572576556222994111693720356524.5634327"), qd!(-140).cosh(); ); test_all_exact!( cosh_zero: Quad::ONE, Quad::ZERO.cosh(); cosh_neg_zero: Quad::ONE, Quad::NEG_ZERO.cosh(); cosh_inf: Quad:...
Rust
0
#!/usr/bin/env python3 # Copyright 2021, Collabora, Ltd. # SPDX-License-Identifier: Apache-2.0 # import xml.etree.ElementTree as ET from lxml import etree as ET from pathlib import Path from typing import List, Tuple _REG_FILE = Path(__file__).resolve().parent.parent / "registry" / "xr.xml" def get_codes(cmd: ET....
Python
1
row: usize, n_cols: usize) -> Self { assert!(Self::_dims_ok(n_per_row, n_cols)); let pc = <Ft as FieldFFT>::precomp_fft(n_cols).unwrap(); assert_eq!(n_cols, 1 << pc.get_log_len()); Self { n_per_row, n_cols, pc, _p: std::marker::PhantomData:...
Rust
0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models from odoo.fields import Domain class ApprovalProductLine(models.Model): _inherit = 'approval.product.line' def _default_warehouse_id(self): company_id = self.env.context.get('default_company_id...
Python
1
match rng.gen_range(0..3) { // union 0 => { let (u, v) = rng.sample(DistinctTwo(0..n)); let orig_u = u; let orig_v = v; uf.union(u, v); let u = parent[...
Rust
0
from pydantic import BaseModel class AdapterConfig(BaseModel): dropout: float d_model: int down_size: int scalar: float layernorm_option: str # none | in | out class AttentionConfig(BaseModel): num_heads: int qkv_bias: bool attn_drop: float proj_drop: float class BlockConfig(B...
Python
1
11; // number of points along edge (to handle nonlinear edges) let (ksi_min, ksi_del) = (-1.0, 2.0); // all Lin shapes go from -1 to +1 let space_ndim = edge_pad.xmax.len(); let mut x = Vector::new(space_ndim); canvas.set_face_color("None").set_line_width(3.0); if edge_color != "" { canvas.s...
Rust
0
""" Factlist related tests """ # pylint: disable=invalid-name import pytest def test_factlist_is_ordereddict(): """ Fact list on FactList object is an OrderedDict """ from pyknow.factlist import FactList from collections import OrderedDict assert issubclass(FactList, OrderedDict) def test_factlist_...
Python
1
collections::{HashMap, VecDeque}, io, mem, path::{Path, PathBuf}, sync::Arc, }; use abi_stable::{ external_types::crossbeam_channel::{self, RReceiver, RSender}, library::{lib_header_from_path, LibraryError, LibrarySuffix, RawLibrary}, sabi_trait::prelude::TD_Opaque, std_types::{RErr, RO...
Rust
0
= gain(denoised, 0.004, 'agc', 0.05, 1) show(x,denoised,np.sqrt(sigma2),x_max) # showsigma(sigma2) # from seis_util.localsimi import localsimi # simi = localsimi(x-denoised, denoised, rect=[5, 5, 1], niter=20, eps=0.0, verb=1) # energy_simi = np.sum(simi ** 2)/simi.size ...
Python
1
running tests, so at least tests run in // debug-mode won't spew output. NOTE: `cfg(test)` alone isn't sufficient: the // crate is compiled normally for integration tests. #[cfg(not(any(debug_assertions, test, doctest)))] macro_rules! write_out { ($($arg:tt)*) => ({ use std::io::{Write, stdout, stderr}; ...
Rust
0
import serial import pandas as pd import matplotlib.pyplot as plt from datetime import datetime from collections import deque # Establish serial connection with Arduino ser = serial.Serial('COM3', 9600) # Change 'COM3' to the correct serial port ser.flushInput() # Initialize empty lists to store data timestamps = []...
Python
1
match decipher(CIPHERED_MESSAGE, TEST_KEY, TEST_CHARSET) { Ok(deciphered_text) => { assert_eq!(ORIGINAL_MESSAGE, deciphered_text, "Deciphered message was not the one we were expecting") }, Err(E) => { assert!(false, format!("Error happened: {}", E)) ...
Rust
0
file) }}; (xml => $file:tt) => {{ embed!(@internal => "application/xml", "xml", $file) }}; (match $param:expr => { $( [ $token:tt ] => $file:tt , )+ $rest:ident => $body:block, }) => {{ match $param { $( concat!($file, ".", stringify!($token)) => embed!($token...
Rust
0
import torch import whisper import numpy as np import sounddevice as sd from TTS.api import TTS def get_stt_model(model_name: str = 'tiny'): return whisper.load_model(model_name) def get_tts_model(model_name: str = 'tts_models/multilingual/multi-dataset/xtts_v2'): gpu_available = torch.cuda.is_available()...
Python
1
// already normalized let cost = ray.d.dot(&normal); trace(ray, scene, depth + 1, &mut tmp); *clr += (tmp * obj.cl).scale(cost * 0.1 * rr_factor); } // Specular BRDF - this is a singularity in the rendering equation that follows // delta distribution, therefo...
Rust
0
e.graphics ~~~~~~~~~~~~~ This module defines graphic-related constants, mostly taken from :manpage:`console_codes(4)` and http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html. :copyright: (c) 2011-2013 by Selectel, see AUTHORS for details. :license: LGPL, see ...
Python
1
from hyperot.events import GroupMessageEvent from ModuleClass import ModuleInfo, ModuleRegister, Module from hyperot.segments import * from hyperot.common import Message from hyperot.utils.logic import Downloader from pyncm import apis import os import hashlib def distance(s1: str, s2: str) -> int: if s2 > s1: ...
Python
1
def count_vowels(str): vowels="aeiouAEIOU" return sum(1 for char in str if char in vowels) word="AnkushSrivastava" result=count_vowels(word) print(result)
Python
1
.api_token, channel, timestamp, "x")?; self.help(user_id, channel, timestamp, false)?; } Some(name) => { if self.hosts.iter().find(|&x| x == name).is_none() { post_message( &self.api_token, ...
Rust
0
#!/usr/bin/env python # # Copyright 2017 Google Inc. 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
from blackbot.core.utils import get_path_in_package from blackbot.core.wss.atomic import Atomic from terminaltables import SingleTable import os import json class Atomic(Atomic): def __init__(self): self.name = 'Collection/T1123-1' self.controller_type = '' self.external_id = 'T1123' ...
Python
1
nder, opt_typ) => LError::variant_payload( opt_binder, opt_typ, &scrut_type, *constr, pattern.span, ...
Rust
0
6574495034888535765114961879601130"); /// /// let diff = (x - expected).abs(); /// assert!(diff < qd!(1e-60)); /// ``` #[inline] fn mul(self, other: &Quad) -> Quad { (*self).mul(*other) } } impl Mul<&Quad> for Quad { type Output = Quad; /// Multiplies this `Quad` by a refer...
Rust
0
elbow_chart(data, k_range) # Find the "elbow point" using simple heuristic sse_decrease = [sse_values[i - 1] - sse_values[i] for i in range(1, len(sse_values))] decreases = np.array(sse_decrease) normalized_decreases = decreases / decreases[0] # Find where the rate of decrease slows down optim...
Python
1
bit` Cmovns_r32_rm32 = 1197, /// `CMOVNS r64, r/m64` /// /// `o64 0F 49 /r` /// /// `CMOV` /// /// `64-bit` Cmovns_r64_rm64 = 1198, /// `CMOVP r16, r/m16` /// /// `o16 0F 4A /r` /// /// `CMOV` /// /// `16/32/64-bit` Cmovp_r16_rm16 = 1199, /// `CMOVP r32, r/m32` /// /// `o32 0F 4A /r` /// /// `CMOV...
Rust
0
to_cache_prepared(&self) -> bool { true } } impl<T: QueryId, U> QueryId for Bound<T, U> { type QueryId = Bound<T::QueryId, ()>; fn has_static_query_id() -> bool { T::has_static_query_id() } } impl<T, U, QS> SelectableExpression<QS> for Bound<T, U> where Bound<T, U>: AppearsOnTable...
Rust
0
d `OpVec` type /// aliases. #[derive(Debug, Clone)] pub enum ScalarOrVector<T> { Scalar(T), Vector(Vec<T>), } impl<T: fmt::Display> fmt::Display for ScalarOrVector<T> { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { match self { ScalarOrVector::Scalar(scalar) => fmt::Displ...
Rust
0
', {'cost': 1}) private_delete_spot_order = privateDeleteSpotOrder = Entry('spot/order', 'private', 'DELETE', {'cost': 1}) private_delete_spot_order_client_order_id = privateDeleteSpotOrderClientOrderId = Entry('spot/order/{client_order_id}', 'private', 'DELETE', {'cost': 1}) private_delete_margin_position ...
Python
1
"https://netflix.com/idfl/wsmi/gkybuiu/kcnikt", #0 "https://cdn.shopify.com/ulwt/tamksdg/fotaubzv.woff2", #0 "https://wikipedia.org/mhubmuxn/doycsh/ourssv?utm_473=zvflkp&ref=805=keliur&utm_666=fybpbe/ads?/", #1 "https://youtube.com/waxwvp?ref=223=dqjrhh/ads?/" #1 # ...
Python
1
def barbacue(skewers): non_only = 0 only = 0 for skewer in skewers: if "x" in skewer: non_only +=1 else: only +=1 return [only, non_only] print(barbacue(["--xo--x--ox--", "--xx--x--xx--", "--oo--o--oo--", "--xx--x--ox--", "--xx--x--ox--", "--oooo-ooo--", "-...
Python
1
t be called right when the surface is created pub unsafe fn init(region: &wl_region::WlRegion) { region.set_user_data( Box::into_raw(Box::new(Mutex::new(RegionData::default()))) as *mut _, ) } /// Cleans the user_data of that surface, must be called when it is destroyed pub ...
Rust
0
imeFilterYenc")] pub struct FilterYenc(Object<ffi::GMimeFilterYenc, ffi::GMimeFilterYencClass>) @extends Filter; match fn { type_ => || ffi::g_mime_filter_yenc_get_type(), } } impl FilterYenc { #[doc(alias = "g_mime_filter_yenc_new")] pub fn new(encode: bool) -> FilterYenc { assert...
Rust
0
][a] = 0 gtmp[a][b] = 1; gtmp[b][a] = 0 break time_end = time.time() time_cost = time_end - time_start print('running time is:', time_cost, 's') return pDAG, ind_test ''' matrix = [[[]]*5 for i in range(5)] print(matrix[4][1]) s=[4,5] t=[1,2,3...
Python
1
u32, params: *mut f64); #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`*"] pub fn glGetTexGenfv(coord: u32, pname: u32, params: *mut f32); #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`*"] pub fn glGetTexGeniv(coord: u32, pname: u32, params: *mut i32); #[doc = "*Required features...
Rust
0
== 'r9, qword ptr [r9]': if not r9_isptr: r9_isptr = True print(f'r9 = _stackslot{r9_value}_; //') result.append((0, 0, 0, 'mov', f'r9, _stackslot{r9_value}_')) continue else: ...
Python
1
iacr.org/2020/499 #[cfg(feature = "ipa-pc-as")] #[cfg_attr(docsrs, doc(cfg(feature = "ipa-pc-as")))] pub mod ipa_pc_as; /// An accumulation scheme for a NARK for R1CS. /// The construction is described in detail in [\[BCLMS20\]][bclms20]. /// /// [bclms20]: https://eprint.iacr.org/2020/1618 #[cfg(feature = "r1cs-nark-...
Rust
0
r more /// information, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/acm-bestpractices.html#best-practices-transparency"> Opting Out of /// Certificate Transparency Logging</a>. </p> #[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)] pub struct UpdateCertificateOptions { _private:...
Rust
0
class Solution: def sortTransformedArray(self, nums: List[int], a: int, b: int, c: int) -> List[int]: ''' a,b,c f(x) = ax2 + bx + c num[i] nums = [-4,-2,2,4] a = 1, b = 3, c = 5 f(-4) = 1(-4)** 2 + 3(-4) + 5 = -16 + (-12) + 5 = -16 -12 + 5 = -23 ...
Python
1
ed::to_owned) }) .unwrap_or_else(|| "target".to_owned()) ); Ok(branch.clone()) } fn git_prune_development( repo: &mut git_stack::git::GitRepo, branches: &[&str], dry_run: bool, ) -> eyre::Result<()> { if branches.is_empty() { return Ok(()); } let remote ...
Rust
0
from . import ( register_cityscapes_panoptic, register_cityscapes_depth_panoptic, register_cityscapes_depth_panoptic_multi_pass, register_kitti, )
Python
1
), i32x2_to_i32(0, YB_601FR - SHORT_HALF), FIX16_HALF, 1, ], [ i32x2_to_i32(XG_709FR - SHORT_HALF, XR_709FR), i32x2_to_i32(SHORT_HALF, XB_709FR), i32x2_to_i32(ZG_709FR, ZR_709FR - SHORT_HALF), i32x2_to_i32(YG_709FR, YR_709FR), i32x2_to_i32(0, ZB_70...
Rust
0
from app.models import db,environment,SCHEMA from app.models.parts.eye import Eye from sqlalchemy.sql import text def seed_eyes(): pink= Eye( type='pink', img_url='https://res.cloudinary.com/dmg8yuivs/image/upload/v1726714097/eyes1_he7ugr.png' ) yellow= Eye( type='yellow', i...
Python
1
let context = extract_context_with_account(&req)?; let id: String = req.match_info().get("id").unwrap().parse()?; if !BIOSFuns::reldb() .exists( &Query::select() .columns(vec![IamGroup::Id]) .from(IamGroup::Table) .and_where(Expr::col(IamG...
Rust
0
de(unascii(message), secret) == data assert decode(encode(data, secret), secret) == data assert message2 == ascii(encode(data, secret2, salt)) assert decode(unascii(message2), secret2) == data assert decode(encode(data, secret2), secret2) == data test() def main(sys): progname = sy...
Python
1
okie('id',secret=secret) for key in param_keys: nid = request.forms.getunicode(key) cmstools.check_news(nid,uid,user_type) redirect('/ctxmgr/' + lid) @route('/delctx/<nid>') def delctx(nid): uid = request.get_cookie('id',secret=secret) if nid and uid: cmstools.del_news(nid,uid) ...
Python
1
sion, resource_prefix, model_folder, copy_resources) def add_inertial(self, mass): """Initialize mass and moments of inertia for box model. > *Input arguments* * `mass` (*type:* `float`): Mass in kilograms """ assert isinstance(mass, float) or is...
Python
1
key, Some(faucet_addr)); let rpc_client = RpcClient::new_with_commitment(test_validator.rpc_url(), CommitmentConfig::processed()); let mut file = File::open(pathbuf.to_str().unwrap()).unwrap(); let mut program_data = Vec::new(); file.read_to_end(&mut program_data).unwrap(); let max_len = p...
Rust
0
_base_ = [ '../_base_/models/twins_pcpvt-s_upernet.py', '../_base_/datasets/ade20k.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_160k.py' ] checkpoint = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/twins/alt_gvt_small_20220308-7e1c3695.pth' # noqa model = dict( ba...
Python
1
syn(ISS_2, WindowSize::DEFAULT) => ListenOnSegmentDisposition::SendSynAckAndEnterSynRcvd( Segment::syn_ack(ISS_1, ISS_2 + 1, WindowSize::DEFAULT), SynRcvd { iss: ISS_1, irs: ISS_2, timestamp: Some(DummyInstant::default()), r...
Rust
0
use crate::data::{Point, PointId, PointLocation, Polygon, TriangleView}; use crate::Orientation; use crate::PolygonScalar; // use rand::rngs::mock::StepRng; use rand::rngs::SmallRng; use rand::Rng; use rand::SeedableRng; /// $O(n^2)$ Polygon triangulation. Ears are selected in a pseudo-random manner. pub fn earclip<...
Rust
0
pub name: ast::Ident, /// The equals token. pub eq: T![=], /// The optional body of the module declaration. pub expr: ast::Expr, } impl ItemConst { /// Get the descriptive span of this item, e.g. `const ITEM` instead of the /// span for the whole expression. pub fn descriptive_span(&sel...
Rust
0
# -*- coding: utf-8 -*- # TencentBlueKing is pleased to support the open source community by making # 蓝鲸智云 - 用户管理 (bk-user) available. # Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. # Licensed under the MIT License (the "License"); you may not use this file except # in compliance with the...
Python
1
pub const VT_ANY_UNIQUE_TYPE: flatbuffers::VOffsetT = 90; pub const VT_ANY_UNIQUE: flatbuffers::VOffsetT = 92; pub const VT_ANY_AMBIGUOUS_TYPE: flatbuffers::VOffsetT = 94; pub const VT_ANY_AMBIGUOUS: flatbuffers::VOffsetT = 96; pub const VT_VECTOR_OF_ENUMS: flatbuffers::VOffsetT = 98; pub const VT_SIGNED_ENUM...
Rust
0
a, T, SignalMessages>, ::subxt::Error> { self.client.storage().iter(hash).await } pub async fn queue_config( &self, hash: ::core::option::Option<T::Hash>, ) -> ::core::result::Result< runtime_types::cumulus_pallet_xcmp_queue::QueueConfigData, ::subxt::Error, > { let ent...
Rust
0
# Copyright (c) 2022 PaddlePaddle Authors. 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 required by appli...
Python
1
parse(&url.into()).unwrap(); let (ws_stream, res) = connect_async(url).await?; Ok(WebSocketFeed { inner: ws_stream, response: res, auth: None }) } /// # Example /// /// ```no_run /// use cbpro::websocket::{WebSocketFeed, SANDBOX_F...
Rust
0
params().map(|param| param.to_string())) .collect(); // Useful to inline parameters format_to!(buf, "({})", params.join(", ")); } if let Some(ret_type) = node.ret_type() { if ret_type.ty().is_some() { format_to!(buf, " {}", ret_type); } } if let So...
Rust
0
quest<TearDownPluginRequestProto>, ) -> Result<Response<TearDownPluginResponseProto>, Status> { todo!() } #[tracing::instrument(skip(self, request), err)] async fn get_generators_for_event_source( &self, request: Request<GetGeneratorsForEventSourceRequestProto>, ) -> Result<...
Rust
0
reponame>zackangelo/trust-dns //! Reserved Zone and related information use proto::rr::domain::{Label, Name}; pub use proto::rr::domain::usage::*; use proto::serialize::binary::BinEncodable; use radix_trie::{Trie, TrieKey}; // Reserved reverse IPs // // [Special-Use Domain Names](https://tools.ietf.org/html/rfc6761)...
Rust
0