text
string
label_name
string
labels
int64
{ let chars = "-a123".chars().peekable(); let mut pos = Loc::default(); let (tok, _) = lex_head(chars, &mut pos); assert_eq!(tok.tok_type, TokenType::Op); } #[test] fn lex_num_and_newline_linux() { let chars = "\n12".chars().peekable(); let mut pos = Loc::de...
Rust
0
field=models.CharField(max_length=256, verbose_name='Описание типа путешествия'), ), migrations.AlterField( model_name='typejourney', name='j_type_name', field=models.CharField(max_length=32, verbose_name='Тип путешествия'), ), migrations.AddFiel...
Python
1
が、再生時に若干CPUの処理を必要とします。 //! //! 基本的に、**再生時間が長いBGMは圧縮したまま、音が短くたくさん鳴らすSEは事前に解凍**して読み込みます。 //! //! ### ループ再生 //! - [`Sound::set_is_looping_mode`](../../core/struct.Sound.html#method.set_is_looping_mode) //! //! を利用します。 //! //! ### ループ範囲を指定する //! - [`Sound::set_loop_starting_point`](../../core/struct.Sound.html#method.set_l...
Rust
0
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2010 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ from sleekxmpp.xmlstream import ElementBase, ET class Version(ElementBase): """ XMPP allows for an agent to advertise the name and ver...
Python
1
(_x: *mut f32, _n: ::std::os::raw::c_uint, _y: *mut f32); } extern "C" { pub fn liquid_vectorcf_init( _c: liquid_float_complex, _x: *mut liquid_float_complex, _n: ::std::os::raw::c_uint, ); } extern "C" { pub fn liquid_vectorcf_add( _x: *mut liquid_float_complex, _y: ...
Rust
0
# ill out the get_name() function to return your name as a string! We've written a main() function for you which calls your function to retrieve your name and then prints it in a greeting with icons. def get_name(): return "Syeda Farheen Zehra" def main(): name = get_name() print("Hello", name, "👋👋👋") if __n...
Python
1
r: {}", e), WrongUniqueIdLength => write!(f, "Wrong unique-ID length"), NonDecryptableCookie(_) => write!(f, "Non-decryptable cookie"), WrongNonceLength => write!(f, "Wrong nonce length"), NonDecryptableCiphertext(_) => write!(f, "Non-decryptable ciphertext"), ...
Rust
0
_BYTES: types::GLenum = 0x0CF0; #[allow(dead_code, non_upper_case_globals)] pub const UNSIGNALED: types::GLenum = 0x9118; #[allow(dead_code, non_upper_case_globals)] pub const UNSIGNED_BYTE: types::GLenum = 0x1401; #[allow(dead_code, non_upper_case_globals)] pub const UNSIGNED_BYTE_2_3_3_REV: types::GLenum = 0x8362; #[...
Rust
0
# Copyright 2015 The TensorFlow 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 applica...
Python
1
merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K4), broadcast: None }, &[98, 241, 254, 204, 111, 226], OperandSize::Dword) } #[test] fn vmovdqu64_22() { run_test(&Instruction { mnemonic: Mnemonic::VMOVDQU64, operand1: Some(IndirectScaledDisplaced(EAX, Two, 1355826966, Some(OperandSize::Zmmword...
Rust
0
Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: <code>arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE</code>.</p> /// </li> /// <li> /// <p>Lambda provisioned concurrency - The resource ty...
Rust
0
import numpy as np import matplotlib.pyplot as plt import scipy.signal as signal # Constants N = 100 d = 1e-9 #Spacing between tape and head g = 2e-6 #Head gap width delta = 35e-6 #Tape thickness v = 7.5 * 0.0254 #f = np.linspace (0, 24000, N/2) f = np.linspace (0, 48000, N) n = np.linspace (0, N, N) #n = np.linspace...
Python
1
return self.counters_all = state self.window.core.config.set("ctx.counters.all", state) self.window.core.config.save() self.window.controller.calendar.update_ctx_counters() def append_text(self, text: str): """ Append text to note :param text: text to ...
Python
1
import time import random from selenium import webdriver from selenium.webdriver import Keys from selenium.webdriver.common.by import By flag = True while flag: request = input("Введите запрос для Википедии: ") browser = webdriver.Chrome() browser.get("https://ru.wikipedia.org/wiki/%D0%97%D0%B0%D0%B3%D...
Python
1
: def __init__(self, type_, step, input_, output, net, net_id, frames): assert type_ in [ "forward", "backward", ], f"type can only be one of ['forward', 'backward'], but{type_}" self.type = type_ # fwd or bwd self.step = step # report order self.inp...
Python
1
_record_range_8_t, pub errors: xcb_record_range_8_t, pub client_started: u8, pub client_died: u8, } impl Default for xcb_record_range_t { fn default() -> Self { unsafe { std::mem::MaybeUninit::zeroed().assume_init() } } } /// An iterator over `Record::Range` objects. #[derive(Copy, Clone, ...
Rust
0
lender_scenes_label_list: middle = gridspec.GridSpecFromSubplotSpec(1, 2, subplot_spec=outer[type_of_blender_scenes_label_list.index(type_of_blender_scene)], wspace=0.2, hspace=0.2, width_ratios=[5/8, 3/8]) for i in range(2): inner = gridspec.GridSpecFromSubplotSpec(len(material_...
Python
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ データベース統合リファクタリングスクリプト v4.0 - スキーマ統一(places vs place_masters) - メソッド整合性確保 - SQLAlchemyモデルと実際のDBの統一 """ import sqlite3 import sys import os from datetime import datetime from typing import Dict, List, Any class DatabaseRefactoring: """データベースリファクタリング管理""" d...
Python
1
import FWCore.ParameterSet.Config as cms process = cms.Process("Ana") process.load("FWCore.MessageService.MessageLogger_cfi") ############# Set the number of events ############# process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1000) ) ############# Define the source file ############### pro...
Python
1
r() .add_source( "Foo", r#" // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.10; contract Demo { event log_string(string); function run() external { emit log_string("script ran"); } } "#, ) .unwrap(); cmd.arg("script").arg(script); ...
Rust
0
nd the slider. prefix When currentvalue.visible is true, this sets the prefix of the label. suffix When currentvalue.visible is true, this sets the suffix of the label. visible Shows the currently-selected value above the slider. ...
Python
1
import re import numpy as np import matplotlib.pyplot as plt import seaborn as sns from itertools import chain import scipy.spatial.distance as ssd from collections import defaultdict import scipy.cluster.hierarchy as hc AA_INDEX_FEATURES = ['ANDN920101', 'ARGP820101', 'ARGP820102', 'BEGF750103', 'BIGC670101', 'BIOV8...
Python
1
sparse = df.to_sparse() assert repr(sparse) == repr(df) with option_context("display.max_rows", 3): assert repr(sparse) == repr(df) def test_sparse_repr_after_set(self): # GH 15488 sdf = pd.SparseDataFrame([[np.nan, 1], [2, np.nan]]) res = sdf.copy() ...
Python
1
""" Link : https://www.geeksforgeeks.org/batch/gfg-160-problems/track/two-pointer-technique-gfg-160/problem/count-distinct-elements-in-every-window Given an integer array arr[] and a number k. Find the count of distinct elements in every window of size k in the array. Examples: Input: arr[] = [1, 2, 1, 3, 4, 2, 3], ...
Python
1
_array(&self, _: &JSONSchema, _: &Value, _: &[Value]) -> bool { false } #[inline] fn is_valid_boolean(&self, _: &JSONSchema, _: &Value, _: bool) -> bool { false } #[inline] fn is_valid_null(&self, _: &JSONSchema, _: &Value, _: ()) -> bool { true } #[inline] fn...
Rust
0
r(BlazeSplitAdjustedEstimatesLoader, self).__init__( expr, columns, **kwargs ) def load_adjusted_array(self, domain, columns, dates, sids, mask): # Only load requested columns. requested_column_names = [self._columns[column.name] ...
Python
1
import unittest, os from time import sleep from stravaupload import ProgressDialog, StravaUpload class StravaUploadTest(unittest.TestCase): """ nose-compatible test to drive the class that wraps up zenity. Ensures the zenity process is closed correctly. Not part of the larger test cases ...
Python
1
cDim] } /// Draws a high-resolution gradient using upper blocks and synced backgrounds. /// /// Returns the number of cells filled on success, /// or [`NcIntResult::ERR`][NcIntResult#associatedconstant.ERR] on error. /// /// This doubles the number of vertical gradations, but restricts you ...
Rust
0
] addr: [sockaddr_in { sin_len: 0, sin_family: AF_INET as u8, sin_port: hton(port), sin_addr: in_addr { s_addr: hton(INADDR_LOOPBACK), }, sin_zero: [0; 8], }], } } ...
Rust
0
1, "stage_session": "Automne", "stage_year": 2025, "group_name": "0020"}, {"program": "Intelligence artificielle en informatique", "stage_number": 1, "stage_session": "Automne", "stage_year": 2025, "group_name": "0120"}, {"program": "Intelligence artificielle en informatique", "stage_number": 1...
Python
1
byte_slice())) .build(); assert_eq!(expected_string_data, arr.column(0).data()); // TODO: implement equality for ArrayData assert_eq!(expected_int_data.len(), arr.column(1).data().len()); assert_eq!( expected_int_data.null_count(), arr.column(1).data...
Rust
0
continue if color not in COLOR_MAP: print(f"Неизвестный цвет: {color}") time.sleep(0.5) continue hwnd = find_cs2_window() if hwnd: print("Окно CS2 найдено, отправляю ESC...") send_esc_to_window(hwnd) time.sleep(0.2) ...
Python
1
completion handler to allow user to # check if a group of circuits has been completed and report on results. # Return when there are no more active circuits. # This is used as a way to complete all groups of circuits and report results. def finalize_execution(completion_handler=metrics.finalize_group, report_end=True...
Python
1
assert_eq!(block_store.len(), 4); println!("{:?}", block_store); // The body of $add_one. let expected_block = CodeBlock::from(vec![ OperatorSymbol::LocalGet, OperatorSymbol::I32Const, OperatorSymbol::I32Add, ]); let block = block_stor...
Rust
0
# Databricks notebook source # MAGIC %run /awoygeekcoder/utility # COMMAND ---------- df=spark.readStream.format("cloudFiles")\ .option("cloudFiles.format","csv")\ .option("cloudFiles.schemalocation","/dbfs/mnt/FileStore/tables/schema/plane")\ .load('/mnt/raw_datalake/PLANE/') # COMMAND ---------- # db...
Python
1
input == "".to_string() { let res = TestOpaResponse { status: "parse input failed".as_bytes().to_vec() }; return Ok(Response::new(res)) } let msg = opa::opa_engine::make_decision_ext( &policyname, &policycontent, ...
Rust
0
rate) type Exact<T> = exact::Exact<T>; #[derive(Debug)] pub(crate) enum RangeBound<T> { None, Open(T), Closed(T), } impl<T: fmt::Display + fmt::Debug + 'static> RangeBound<T> { fn into_dyn(self) -> RangeBound<Box<dyn crate::format::DisplayDebug>> { match self { Self::None => RangeB...
Rust
0
) = stmt { labels.insert(label.clone(), ip); } debug!("loc: {} {:?}", ip, stmt); ip += stmt.num_ops(); } labels } pub fn extract_constants(stmts: &Vec<Stmt>, c: &mut Vec<i64>) { for stmt in stmts { match stmt { Stmt::PushInline(v) if *v > 0xFFFFFF => ...
Rust
0
"hex": "BFBAAF", "rgb": [191, 186, 175], "hsl": [29, 28, 183], "shade": "Yellow" }, { "name": "<NAME>", "hex": "1B4B35", "rgb": [27, 75, 53], "hsl": [108, 120, 51], "shade": "Green" }, { "name": "Cowboy", "hex": "443736", "rgb": [68, 55, 54], "hsl": [3, 29, 6...
Rust
0
param _RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 :type RequestId: str """ self._RDBAsset = None self._TopAsset = None self._RDBDetail = None self._RequestId = None @property def RDBAsset(self): return self._RDBAsset @RDBAsset.setter d...
Python
1
ors /// /// Returns an `EncodingError` if any of the keys are not strings. pub fn encode_map<V: Serialize>(input: &BTreeMap<String, V>) -> Result<String, EncodingError> { encode_key_value(input, &[], "=", " ", true) } /// Serialize the input value into a logfmt string. If the value is not an object, /// it is trea...
Rust
0
)?Return a copy of this array/matrix with sorted indices rDrO)roAs rxsorted_indices_cs_matrix.sorted_indices IIK rcUR(dU[R"[UR5S- UR...
Python
1
#!/usr/bin/env python3 """Main module for yt2logseq. yt2logseq is an experiment to generate logseq notes from youtube videos. It relies on: * yt-dlp to download yt videos * ffmpeg to extract the audio * openai whisper to generate subtitles * transformers to summarize the video and assign it to predefined topics. """ ...
Python
1
from django.contrib import admin # Register your models here.
Python
1
=> Ok(raw_type(ctx, "c_uint")), IntKind::Long => Ok(raw_type(ctx, "c_long")), IntKind::ULong => Ok(raw_type(ctx, "c_ulong")), IntKind::LongLong => Ok(raw_type(ctx, "c_longlong")), IntKind::ULongLong => Ok(raw_type(ctx, "c_ulonglong")), ...
Rust
0
#!/usr/bin/env python # -*- coding: utf-8 -*- #! 强制默认编码为utf-8 import sys reload(sys) sys.setdefaultencoding('utf8') import os, time import json, urllib, urllib2 import subprocess import base64 from pprint import pprint from pdb import set_trace import alfred from dslib import * import util __version__ = (1, 0, 0) ...
Python
1
ntext, 'get_router_conntrack_helper', self.target) def test_update_router_conntrack_helper(self): self.assertRaises( base_policy.PolicyNotAuthorized, policy.enforce, self.context, 'update_router_conntrack_helper', self.target) def test_delete_router_conntrack_helper...
Python
1
::Value = serde_json::from_slice(&cloned_body_raw)?; info!( "REQ {:?} {} {} <=\n{}", parts.version, parts.method, parts.uri.path(), serde_json::to_string_pretty(&json_value)?, ); ...
Rust
0
>, { let (mailbox, condvar) = &STUB_MAILER_OUTBOX; let outbox_size = { mailbox.lock().len() }; let result: T = run().await; let mut mailbox = mailbox.lock(); if mailbox.len() == outbox_size { let wait_result = condvar.wait_for(&mut mailbox, Duration::from_secs(1)); assert!( !wait_result.timed_out(), ...
Rust
0
_base_ = [ '../_base_/models/retinanet_r50_fpn.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] pretrained = 'https://github.com/SwinTransformer/storage/releases/download/v1.0.0/swin_tiny_patch4_window7_224.pth' # noqa model = dict( bac...
Python
1
# modelos/cardapio/prato.py from modelos.cardapio.item_cardapio import ItemCardapio class Prato(ItemCardapio): ''' Representa um prato do cardápio, herdando funcionalidades de ItemCardapio. Attributes: _nome (str): Nome do prato. _preco (float): Preço do prato. descricao (str...
Python
1
ING_LIVES, score: 0, play_space, player: Player::new(player_spawn_x, player_spawn_y), projectiles: vec![], enemies: vec![], particals: vec![] } } } pub struct GameEventHandler { last_update: Instant, last_draw: Instant, ass...
Rust
0
// ``` /// # extern crate arrow; /// # use arrow::datatypes::{Field, DataType, Schema}; /// # use std::collections::HashMap; /// let field_a = Field::new("a", DataType::Int64, false); /// let field_b = Field::new("b", DataType::Boolean, false); /// /// let mut metadata: HashMap<String, Strin...
Rust
0
from flask import Flask, request, redirect, render_template import sqlite3, string, random, os app = Flask(__name__) DB_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'urls.db') def init_db(): conn = sqlite3.connect(DB_PATH) c = conn.cursor() c.execute('''CREATE TABLE IF NOT EXISTS urls (...
Python
1
transliteration_rules = { 'ru': { 'а': 'a', 'б': 'b', 'в': 'v', 'г': 'g', 'д': 'd', 'е': 'e', 'ё': 'yo', 'ж': 'zh', 'з': 'z', 'и': 'i', 'й': 'y', 'к': 'k', 'л': 'l', 'м': 'm', 'н': 'n', 'о': 'o', 'п': 'p', 'р': 'r', 'с': 's', 'т': 't', 'у': 'u', 'ф': 'f', 'х': 'kh', 'ц': 'ts', 'ч': 'ch', 'ш'...
Python
1
font_awesome, loading, paging}, extensions::*, generated::css_classes::C, route::{Route, RouteId}, sleep::sleep_with_handle, GMsg, }; use futures::channel::oneshot; use iml_graphql_queries::{ log::{self, logs}, Response, }; use iml_wire_types::{warp_drive::ArcCache, Host, LogMessage, LogSeve...
Rust
0
ar(final_total_mass_H2O_ad - self.total_mass_H2O_ad, 0.0, (1.0E-16 + tolerance * self.total_mass_H2O_ad), " Nodes 0-3 Adsorbed mass H2O error fraction ::") self.testNear(final_total_mass_CO2_ad - self.total_mass_CO2_ad, 0.0, (1.0E-16 + tolerance * self.total_mass_CO2_ad), " Nodes 0-3 Adsorbed mass CO2 erro...
Python
1
(d, coef) in self.elements.iter().enumerate().rev() { match d { 0 => write!(f, "{:?}", coef)?, 1 => write!(f, "{:?} x +", coef)?, _ => write!(f, "{:?} x^{} +", coef, d)?, } } Ok(()) } } impl<S: Scalar> Polynomial<S> { /// ...
Rust
0
def calculate_metric(self, preds: Sequence[str], targets: Sequence[str] ) ->Dict[str, Any]: correct = 0 failed = 0 target_failed = 0 for pred, target in zip(preds, targets): extract_pred = self.extract_ans(pred) extract_target = self.extract_ans(target) if extract_target is N...
Python
1
L extensions which don't have external (OpenGL, D3D) dependencies. // /******************************************************************************* // * Copyright (c) 2008-2015 The Khronos Group Inc. // * // * Permission is hereby granted, free of charge, to any person obtaining a // * copy of this software and...
Rust
0
', # Windows Calibri # 最后尝试:macOS字体(需要特殊处理) '/System/Library/Fonts/Helvetica.ttc', # macOS Helvetica '/System/Library/Fonts/Arial.ttf', # macOS Arial(如果存在) ] chinese_font_registered = Fal...
Python
1
, etc. This structure is not simply a /// `String` due to the fact that some fingerprints cannot be calculated lazily. /// /// Path sources, for example, use the mtime of the corresponding dep-info file /// as a fingerprint (all source files must be modified *before* this mtime). /// This dep-info file is not generated...
Rust
0
elif mat[i,j]<Causal_thrs[k]: Causal_Net[i,j]=0 else: Causal_Net=Net_causal CauNet_diff8[f"X{k}"]=Causal_Net #2 AUC if k > 0: Net=torch.from_numpy(mat) Net=Net.masked_fill(torch.isinf(Net)....
Python
1
s = vec!["", "[]", "[:]", ":"]; for valid in valid_addr_strs { let parsed_std = valid.parse::<Ipv6Addr>().unwrap(); let parsed_host = valid.parse::<Host>().unwrap(); if let Host::Ipv6(parsed_host) = &parsed_host { // Check that both are structurally the same ...
Rust
0
from ash import * #Dipole Z-value taken from ASH output or individual QM-program outputs dipole_dict={ 'RHF':-0.09421, 'ORCA_MP2-unrelax':-0.03678, 'ORCA_MP2-relax':0.14881, 'ORCA_OOMP2':0.15152, 'ORCA_CCSD-lin':0.15610, 'ORCA_CCSD-unrelax':0.09793, 'ORCA_CCSD-orbopt':0.06531, 'pySCF-CCSD-unrelax':0.09794, 'pySCF-BCCD...
Python
1
#!/usr/bin/env python # Dexter Industries # Initial Date: April 9, 2015 # Updated: Oct 28, 2016 Shoban # # These files have been made available online through a Creative Commons Attribution-ShareAlike 3.0 license. # (http://creativecommons.org/licenses/by-sa/3.0/) # # This code is for testing the BrickPi with a ...
Python
1
rename = "6")] AverageBlendedMarket, /// Average blended highest #[serde(rename = "7")] AverageBlendedHighest, } impl Default for LegCashSettlValuationMethod { fn default() -> Self { LegCashSettlValuationMethod::Market } } <filename>src/bin/rotate_matrix_90deg.rs fn rot_90deg(mut matrix: &mut Vec<Vec<i32>>) ->...
Rust
0
SerializationError> { let len = self.len() as u64; len.serialize_uncompressed(&mut writer)?; for elem in self.iter() { elem.serialize_uncompressed(&mut writer)?; } Ok(()) } fn serialize_unchecked<W: Write>(&self, mut writer: W) -> Result<(), SerializationErr...
Rust
0
import allure from methods.base_methods import BaseMethods class MainPage(BaseMethods): # Создали класс главной страницы cервиса def __init__(self, driver): self.driver = driver @allure.step('Метод отображения главной страницы сервиса') def wait_main_page(self: BaseMethods, locator): re...
Python
1
: "/sys/bus/i2c/devices/i2c-%d/%d-0050/dev_class", "optoe_driver_key": list(range(32, 88)), "txdis_cpld": { "dev_id": { 3: { "offset": { 0x60: "1-8", 0x61: "9-16", 0x62: "17-24", ...
Python
1
username, ref): data = await self.api_request( ctx, {"method": "user.getrecenttracks", "user": username, "limit": 1}, True, ) song = None if data: tracks = data["recenttracks"]["track"] if type(tracks) == list: ...
Python
1
# Copyright 2025 the LlamaFactory team. # # 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 applicable law or agreed to i...
Python
1
load data. This may be because of issues with your internet connection or the datasets may have moved. Please check your internet connection and make sure you're using the latest version of progpy. """ if isinstance(batt_id, int): # Convert to string batt_id = "RW" + str(batt_id) if not isin...
Python
1
"""Wrapper de compatibilidade para config_manager.pyPRESERVA 100% DAS FUNCIONALIDADES ANTIGAS"""# Importar sistema unificadofrom ...config.super_config import ( SuperConfigManager as ConfigManager, SuperAppConfig as AppConfig, super_config_manager)# Aliases para compatibilidadeConfigManager = SuperConfigManage...
Python
1
output[13] = step[2]; output[14] = step[15]; output[15] = step[0]; } fn av1_fidentity4_c( input: &[i32], output: &mut [i32], _cos_bit: usize, stage_range: &[i8] ) { for i in 0..4 { output[i] = round_shift(input[i] * SQRT2, SQRT2_BITS); } assert!(stage_range[0] + SQRT2_BITS as i8 <= 32); } fn av1_fi...
Rust
0
], "spinner"), ] } else { let mut ctx = Context { steps_view: &model.steps_view, select: &model.select, cancelling_jobs: &model.cancelling_jobs, }; let dag_nodes = traverse_graph( &model.jobs_graphs[&parent_cid], &job_item_v...
Rust
0
zierPainter::default().into(), CirclePainter::default().into(), PolygonPainter::default().into(), ], active: PainterKind::Line, mouse: MousePositionTracker::default(), } } } impl PaintService { pub fn show(&mut self, ui: &mut Ui) { ui.label("Select Paint Mode…"); let mut painter_kind = self.a...
Rust
0
tialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum OutputType { Address = 0, Xpub = 1, } } #[derive(Clone, PartialEq, ::prost::Message)] pub struct EthSignRequest { #[prost(enumeration="EthCoin", tag="1")] pub coin: i32, #[prost(uint32, repeated, tag="2")] pub keypath...
Rust
0
} // Macro to generate exports. // This ensures exported functions are registered with R. // See corresponding C code in `entrypoint.c`. extendr_module! { mod fcl; impl RFixedBond; impl RRtn; } use crate::base::*; pub struct Downmixer { active_channels: PerChannel<bool>, } impl Downmixer { pub fn...
Rust
0
lowInterventionSpecList": [ { "workflowType": "BackupRun", "intervention": "Cancel" } ], "activationTime...
Python
1
fuzzysearch._common import count_differences_with_maximum_byteslike except ImportError: pass else: _count_differences_with_maximum = count_differences_with_maximum @wraps(_count_differences_with_maximum) def count_differences_with_maximum(sequence1, sequence2, max_differences): try: ...
Python
1
0.5,(0,0,0),1) frame = cv2.putText(frame,f'yaw(deg):{round(np.degrees(yaw),5)}',(450,100),cv2.FONT_HERSHEY_SIMPLEX,0.5,(0,0,0),1) video.write(frame) video.release() # # save image cv2.imwrite(os.path.join(DATA_PATH, 'image', image_name), track_map) # save plot ...
Python
1
lumns = bpy.props.StringProperty() bpy.types.Scene.survey_columns = bpy.props.StringProperty() bpy.types.Scene.collar_columns = bpy.props.StringProperty() def unregister(): bpy.utils.unregister_class(ContinuousDesurveyCalcPanel) bpy.utils.unregister_class(UploadDrillDataOperator) bpy.utils.unregis...
Python
1
xdg_runtime_dir: Value) -> Config { Config { xdg_data_home: xdg_data_home, xdg_config_home: xdg_config_home, xdg_data_dirs: xdg_data_dirs, xdg_config_dirs: xdg_config_dirs, xdg_cache_home: xdg_cache_home, xdg_runtime_dir: xdg_runt...
Rust
0
from math import pi def degrees(n): rad = n*(pi/180) return rad degr = degrees(int(input("Input degree: "))) res = degr print(f"Output radian: {res}")
Python
1
import json import copy from PIL import Image, ImageDraw import numpy as np from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval from .distributed_utils import all_gather, is_main_process from dataset.transforms import affine_points def merge(img_ids, eval_results): """将多个进程之间的数据汇总在一起""" ...
Python
1
pi_version}/schedules/{schedule_identifier}/on-calls?flat=true" return (await self._get_single_resource(url))["data"] async def get_team_members(self, team_identifier: str) -> dict[str, Any]: logger.info(f"Fetching members for team {team_identifier}") api_version = await self.get_resource_...
Python
1
tasets/DF2K/DF2K_HR_sub", help="Output folder" ) parser.add_argument("--crop_size", type=int, default=480, help="Crop size") parser.add_argument( "--step", type=int, default=240, help="Step for overlapped sliding window" ) parser.add_argument( "--thresh_size", type=int, ...
Python
1
macro_rules! f_var { ( $graph: expr, ( $( $dim:expr ),* ) ) => {{ use $crate::primitives::FundamentalType; var!($graph, FundamentalType::Float, ( $($dim),* )) }}; ( $graph: expr, ( $( $dim: expr ),* ), $name: expr ) => {{ use $crate::primitives::FundamentalType; var!($graph, ...
Rust
0
# Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import json from enum import EnumMeta from dataclasses import dataclass, asdict import uuid """ Pipeline Definition Dataclasses """ class PipelineStatus(EnumMeta): PENDING = "PENDING" STARTING = "S...
Python
1
""" Aim: Printing all the shapes using turtle class. Author: Mehdiali Date: 21 / June / 2024 - 06:39 PM """ from turtle import Turtle, Screen from random import randint myTurtle = Turtle() myTurtle2 = Turtle() myTurtle3 = Turtle() myScreen = Screen() myTurtle.speed("fastest") myTurtle2.speed("fastest") myTurtle3.spe...
Python
1
, size.try_into()?)) } pub fn keybound(&self, keycode: KeyBinding, count: i32) -> Option<String> { ncursesw::keybound_sp(self.handle, keycode, count) } pub fn key_defined(&self, definition: &str) -> result!(Option<KeyBinding>) { Ok(ncursesw::key_defined_sp(self.handle, definition)?) ...
Rust
0
g(&f: &Self::F, &x: &ModInt) -> ModInt { x * f } fn composition(f: &Self::F, g: &Self::F) -> Self::F { f * g } } #[test] fn test_additive_mul_mod() { let mut rng = thread_rng(); let mut seq: Vec<ModInt> = (0..1000) .map(|_| rng.gen...
Rust
0
rint("Time to startup:", startup_end - startup_start) for doc, bytes_processed in encoded_docs_batch: for sentence in doc: # import pdb; pdb.set_trace() if len(sentence) != args.group_size: print(f" > warning sentence length = {len(sentence)} != {args.group_size}") ...
Python
1
ment}; use fenris::geometry::polymesh::PolyMesh3d; use fenris::geometry::procedural::{create_rectangular_uniform_hex_mesh, create_unit_square_uniform_quad_mesh_2d}; use fenris::mesh::Tet4Mesh; use std::convert::TryFrom; #[derive(Debug, Copy, Clone)] struct MockIdentityMaterial; impl<T> ElasticMaterialModel<T, U2> for...
Rust
0
rent.futures.ProcessPoolExecutor(max_workers=36) as executor: futures = [executor.submit(video_to_images, video, video_folder, val_img_folder, int(short_side)) for video in val_videos] total_videos = len(futures) curr_idx = 0 for future in concurrent.futures.as_complet...
Python
1
if content.is_empty() { let fv = FrozenValue::new_repr(&VALUE_EMPTY_FROZEN_LIST); AValueHeader::overwrite_with_forward::<Self>(me, fv.0.ptr_value()); return Ok(fv); } let (fv, r, extra) = freezer.reserve_with_extra::<AValueImpl<Direct, ListGen<FrozenList>...
Rust
0
put_opt(p); } Some(m.complete(p, SyntaxKind::PutItem)) } fn put_opt(p: &mut Parser) -> Option<CompletedMarker> { if !p.at(TokenKind::Colon) { return None; } let m = p.start(); p.bump(); expr::expect_expr(p); Some(m.complete(p, SyntaxKind::PutOpt)) } fn get_stmt(p: &mut ...
Rust
0
""" Solve IK for a single finger and send the result to ROS/ROS2. Can be used together with the ROS nodes in dexrobot_mujoco or pyzlg_dexhand to control either the hardware or a simulation. """ import numpy as np import time from ros_compat import ROSNode from sensor_msgs.msg import JointState from dexrobot_kinematic...
Python
1
th.user.username) expires = datetime.timedelta(days=105) _create_access_token(d, expires=expires) # This function is basically copied from the fastapi_login plugin # see `their github repo <https://github.com/MushroomMaula/fastapi_login>`_ # def _create_access_token(data: dict, expires=None, scopes=None) -> b...
Python
1