text
string
label_name
string
labels
int64
# # Copyright OpenEmbedded Contributors # # SPDX-License-Identifier: MIT # import glob import os import shutil import tempfile from oeqa.selftest.case import OESelftestTestCase from oeqa.utils.commands import runCmd, bitbake, get_bb_vars class oeGoToolchainSelfTest(OESelftestTestCase): """ Test cases for OE'...
Python
1
) else: model.fit(X_train, y_train) y_pred = model.predict(X_test) y_pred_proba = model.predict_proba(X_test)[:, 1] mcc = matthews_corrcoef(y_test, y_pred) f1 = f1_score(y_test, y_pred, pos_label=1, zero_division=0) roc_auc = roc_auc_score(y_test,...
Python
1
# 'sub_br': (sub_br, xs, 2, 2, bits), # 'mul_wide': (mul_wide, xs, 2, 2, bits), # 'sqr_wide': (sqr_wide, xs, 1, 2, bits), # 'modexp': (modexp, xs, 3, 1, bits), # 'paillier_encrypt' : (paillier_encrypt, ps, 4, 1, bits) } test_names = ops.keys() & tests if len(tests) > 0 e...
Python
1
_conv_filter(state_dict, patch_size=16): """ convert patch embedding weight from manual patchify + linear proj to conv""" out_dict = {} for k, v in state_dict.items(): if 'patch_embed.proj.weight' in k: v = v.reshape((v.shape[0], 3, patch_size, patch_size)) out_dict[k] = v r...
Python
1
"initialized": self.is_initialized, "model_info": model_info, "config": { "model_name": self.config.model_name, "temperature": self.config.temperature, "max_tokens": self.config.max_tokens } ...
Python
1
import os from dataclasses import dataclass from typing import TYPE_CHECKING from urllib.error import URLError from urllib.request import Request, urlopen import pytest from minio.api import Minio from pytest_databases.docker import TRUE_VALUES from pytest_databases.helpers import get_xdist_worker_num from pytest_dat...
Python
1
rt, } pub struct Tunnel { id: u32, senders: SubSenders<TunnelMsg>, main_sender: MainSender<TunnelMsg>, } pub struct TcpTunnel; pub struct UcpTunnel; pub struct TunnelWritePort { id: u32, tx: Sender<TunnelMsg>, } pub struct TunnelReadPort { id: u32, tx: Sender<TunnelMsg>, rx: Option<R...
Rust
0
# # HiddenEye Copyright (C) 2020 DarkSec https://dark-sec-official.com # This program comes with ABSOLUTELY NO WARRANTY; for details read LICENSE. # This is free software, and you are welcome to redistribute it # under certain conditions; you can read LICENSE for details. # import Defs.ThemeManager.theme ...
Python
1
if not parent_has_same_examples: if len(examples) == 1: out.append("#### Example\n") out.append("```json\n") out.append( json.dumps(examples[0], indent=2, cls...
Python
1
derOptions, ) -> Result<(), Box<dyn error::Error + 'static>> { assert_eq!(pixels.len(), (opts.width * opts.height) as usize); let pool = rayon::ThreadPoolBuilder::new() .num_threads(opts.threads as usize) .build()?; let cam = Camera::new(&opts.camera_options, opts.width, opts.height); ...
Rust
0
ks but lower 16k powered down."] #[inline(always)] pub fn allbutlower16k(self) -> &'a mut W { self.variant(SRAMSLEEPPOWERDOWN_A::ALLBUTLOWER16K) } #[doc = "All banks but lower 24k powered down."] #[inline(always)] pub fn allbutlower24k(self) -> &'a mut W { self.variant(SRAMSLEEPP...
Rust
0
_A { #[doc = "0: Disables Bank7 of the SRAM"] BNK7_EN_0 = 0, #[doc = "1: Enables Bank7 of the SRAM"] BNK7_EN_1 = 1, } impl From<BNK7_EN_A> for bool { #[inline(always)] fn from(variant: BNK7_EN_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `BNK7_EN`"] pub type BNK7_EN_R...
Rust
0
import pyspark.sql.types as T INPUT_DATA_PATH = 'rides.csv' BOOTSTRAP_SERVERS = '172.19.0.6:29092' TOPIC_WINDOWED_VENDOR_ID_COUNT = 'vendor_counts_windowed' PRODUCE_TOPIC_RIDES_CSV = CONSUME_TOPIC_RIDES_CSV = 'rides_csv' RIDE_SCHEMA = T.StructType( [T.StructField("vendor_id", T.IntegerType()), T.StructFiel...
Python
1
er) fn insert_url_params(extensions: &mut Extensions, params: Params) { let current_params = extensions.get_mut(); if let Some(UrlParams::InvalidUtf8InPathParam { .. }) = current_params { // nothing to do here since an error was stored earlier return; } let params = params .ite...
Rust
0
::c_uint>() as libc::socklen_t, ) } }; if ret == -1 { return Err(io::Error::last_os_error()); } trace!("socket bind {}", iface); ...
Rust
0
; pub fn Edit_SetDragCursor(AObj: usize, AValue: TCursor); pub fn Edit_GetDragKind(AObj: usize) -> TDragKind; pub fn Edit_SetDragKind(AObj: usize, AValue: TDragKind); pub fn Edit_GetDragMode(AObj: usize) -> TDragMode; pub fn Edit_SetDragMode(AObj: usize, AValue: TDragMode); pub fn Edit_GetEnabled(AObj: usiz...
Rust
0
from telethon import events from consts import PROCESSING, ALBUM_HAS_SENT_SUCCESSFULLY from spotify.album import Album from spotify.song import Song from telegram import CLIENT, BOT_ID @CLIENT.on(events.CallbackQuery(pattern='download_album_songs')) async def download_album_songs_callback_query(event: events.Callbac...
Python
1
b fn _bits(&self) -> bool { match *self { BURSTEVENW::EN => true, BURSTEVENW::DIS => false, } } } #[doc = r" Proxy"] pub struct _BURSTEVENW<'a> { w: &'a mut W, } impl<'a> _BURSTEVENW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(sel...
Rust
0
# Generated by Django 5.0.4 on 2024-10-21 17:45 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('djangoGraduateApp', '0013_existedclient'), ] operations = [ migrations.RenameField( model_name='existedclient', old_name='ex...
Python
1
from fastapi import APIRouter, HTTPException, Depends from app import depends from app.config import appSettings from app.db.redis_db import get_redis_pool from app.models.response import response system_router = APIRouter(prefix="/system", tags=["系统接口"]) system_router.get("/system/params") DIC = {"a": "a1", "c": "...
Python
1
log.logger.get_canvas().abs_rotate(90 - operand.value) return Undefined @global_attr("setposition") @global_attr("setpos") @global_attr("goto") class SetPosition(BuiltIn): def execute_evaluated(self, operands: List[Expression], frame: Frame): verify_exact_callable_length(self, 2, len(operands...
Python
1
x14, 0x0C, 0x54, 0x53, 0x54, 0x31, 0x01, 0x54, 0x53, 0x54, 0x32, 0x01, 0x01, 0x14, 0x0B, 0x54, 0x53, 0x54, 0x32, 0x02, 0x54, 0x53, 0x54, 0x31, 0x01, ]; let mut methods = Vec::new(); Method::new( "TST1".into(), 1, false, vec![&MethodCal...
Rust
0
#[test] fn test_insn_flags() { let insn = InsnFlags::ENABLE_TICK_EVENTS; let raw: pt_conf_flags = insn.into(); unsafe { assert_eq!(raw.variant.insn.enable_tick_events(), 1); assert_eq!(raw.variant.insn.keep_tcal_on_ovf(), 0); } let insn = InsnFlag...
Rust
0
ACT_2H_IRONGAUNTLETS_HELL"), (854, "T4_ARTEFACT_2H_LONGBOW_UNDEAD"), (855, "T4_ARTEFACT_2H_MACE_MORGANA"), (856, "T4_ARTEFACT_2H_NATURESTAFF_HELL"), (857, "T4_ARTEFACT_2H_NATURESTAFF_KEEPER"), (858, "T4_ARTEFACT_2H_RAM_KEEPER"), (859, "T4_ARTEFACT_2H_REPEATINGCROSSBOW_UND...
Rust
0
# # Copyright (c) 2009-2016, Jack Poulson # All rights reserved. # # This file is part of Elemental and is under the BSD 2-Clause License, # which can be found in the LICENSE file in the root directory, or at # http://opensource.org/licenses/BSD-2-Clause # import math, time, El if El.havePyPlot: El.plt.set_cma...
Python
1
# Imports from beet import BlockTag, Context from beet.core.utils import JsonDict from stouputils.decorators import measure_time from stouputils.io import super_json_dump from stouputils.print import progress from ....core.__memory__ import Mem from ....core.constants import VANILLA_BLOCK, VANILLA_BLOCK_FOR_ORES # ...
Python
1
t_dir.join(replace(&placeholder_map, cwd))) .or_else(|| Some(std::env::current_dir().unwrap())); // Replace STDOUT and STDERR placeholder_map.insert( "%{CWD}", program.cwd.as_ref().unwrap().to_str().unwrap().to_string(), ); program.stdout = std::mem::take(&mut program.stdout) ...
Rust
0
from paddleocr import PaddleOCR, draw_ocr from datetime import datetime ocr = PaddleOCR() import mss.tools import pygetwindow as gw import pyautogui import mss import cv2 import keyboard import time import asyncio import numpy as np from PIL import Image import io from ctypes import * import os cur_path = os.path.abspa...
Python
1
assert_ulps_eq!(coords[0][0].1, 5.6); assert_ulps_eq!(coords[1][1].0, 2.1); assert_ulps_eq!(coords[1][1].1, 3.5); assert_ulps_eq!(coords[2][0].0, 1.1); assert_ulps_eq!(coords[2][0].1, 4.8); } else { panic!("Unexpected coordinates when converting from S...
Rust
0
import sys from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], [ "._tickwidth.TickwidthValidator", "._tickvalssrc.TickvalssrcValidator", "._tickvals.TickvalsValidator", "._ticks.TicksValidator", "._tickmo...
Python
1
(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for RTSPHeaderField { unsafe fn set_value(value: &mut Value, this: &Self) { gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone,...
Rust
0
# Copyright 2004 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import code_creator class namespace_alias_t(code_creator.code_creator_t): def __init__( self, alias, full_namespace_name ): ...
Python
1
""" Простая морфология для псевдонимов Оптимизировано для простого Telegram-бота без внешних зависимостей """ import logging logger = logging.getLogger(__name__) # Простое правило склонения прилагательных для псевдонимов ADJECTIVE_DECLENSION = { # Мужской род -> Женский род "ый": "ая", "ий": "яя", "о...
Python
1
_generation { self.max_generation = agent.generation; println!( "[{}] new generation record: {}", self.time.floor(), self.max_generation ); } ...
Rust
0
assert a_bad_trials.mean() == 0.5 assert b_good_trials.mean() < 1.5 assert b_bad_trials.mean() > 1.5 best_ratios = [] best_samples = [] for i, dist in enumerate(divided_distributions): best_ratio = 0 best_hp_sample = None for _ in range(100): hp_sample, rat...
Python
1
""" 方法五: 堆 heapq 模块 解题思路: 假设每个链表的最长的长度是 n,方法四是一次性将 k 个有序链表的 kn 个节点构建一个巨大的小顶堆,堆化过程效率低 我们只维护当前每个链表没有被合并的元素的最前面一个,构建 k 个元素的小顶堆,每次弹出顶堆元素 有两个问题: 1. 无法直接使用 LeetCode 提供的 ListNode 类实例对象构建小顶堆,因为该对象不支持大小比较操作,而你又没办法修改 ListNode 类定义,添加重载 __lt__ 和 __eq__ 魔术方法 2. 如果使用 ListNode 实例对象的 val 值来构建小顶堆,那么弹出堆顶元素后,不知道它属于哪个原链表,也就无法把它的下一个节点值加入...
Python
1
#!/usr/bin/python3 """ Python file that contains the class definition of a State and an instance """ from sqlalchemy import Column, Integer, String from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class State(Base): """ State class that inherits from Base Attributes: ...
Python
1
Q =[] cap=5 rare = 0 front=0 def enqueue(num): global rare global Q if rare == cap: print("Queue is full") return Q.append(num) rare +=1 def dequeue(): global front global rare if front == rare: if (rare == cap): front = 0 rare = 0 print("Queue is empty") return p...
Python
1
<SinkItem=Frame, SinkError=RedisError> + 'static { pub fn set_centralized_sink(&self, sink: SplitSink<T>) { if let Sinks::Centralized(ref old_sink) = *self { let mut sink_ref = old_sink.borrow_mut(); *sink_ref = Some(sink); } } pub fn set_clustered_sink(&self, key: String, sink: SplitSink<T>...
Rust
0
); shader.set_view(view); color_image.clear_rgba(black()); depth_image.clear_depth(depth()); pipeline.triangles(&shader, &attributes, &mut color_image, &mut depth_image); // minifb buffer expects BGRA, our image is RGBA; do some shuffling let pixel_iter = color...
Rust
0
message) { count += 1; } } count } /// Parses a rule given a string slice fn parse_rule(s: &str) -> Rule { // Multiple if s.contains('|') { Rule::Multiple(s.split('|').map(s_to_vec).collect()) // Character } else if s.contains('"') { Rule::Character( ...
Rust
0
class Solution: def countSubarrays(self, nums: List[int], k: int) -> int: n = len(nums) val = max(nums) l, r, count, ans = 0,0,0,0 while r < n: if nums[r] == val: count += 1 if count >= k: while count >= k: ...
Python
1
"""訊號產生模組 此模組負責根據不同的策略生成交易訊號, 包括基本面、動量、均值回歸和新聞情緒等策略。 主要功能: - 基本面策略訊號生成 - 動量策略訊號生成 - 均值回歸策略訊號生成 - 新聞情緒策略訊號生成 - AI 模型策略訊號生成 - 多策略訊號合併 - 訊號輸出與回測整合 - 技術指標整合 """ import logging import warnings import matplotlib.pyplot as plt import numpy as np import pandas as pd # 嘗試導入 indicators 模組 try: from src.core.indicators i...
Python
1
"or a 4-element list, got {}".format(inverted_residual_setting)) # building first layer input_channel = _make_divisible(input_channel * width_mult, round_nearest) self.last_channel = _make_divisible(last_channel * max(1.0, width_mult), round_nearest) features = [ConvBNReLU(3,...
Python
1
orm) X2 = dct(X1.transpose(-1, -2), norm=norm) X3 = dct(X2.transpose(-1, -3), norm=norm) return X3.transpose(-1, -3).transpose(-1, -2) def idct_3d(X, norm=None): """ The inverse to 3D DCT-II, which is a scaled Discrete Cosine Transform, Type III Our definition of idct is that idct_3d(dct_3d(x...
Python
1
from collections import Counter class Solution: def isAnagram(self, s: str, t: str) -> bool: # Hashmap for counting string letters counter_s = Counter(s) counter_t = Counter(t) # Check if they have the same values return counter_s == counter_t # Example usage: sol = Solu...
Python
1
索成功確率で補正をかける pub fn comp_suc_rate(self, rate: f64) -> ActionVal { const PARTIRION_RATE: f64 = 0.3; let val = *self * PARTIRION_RATE + *self * (1.0 - PARTIRION_RATE) * rate; ActionVal(val) } // ActionValに対し探索の深さで補正をかける pub fn comp_search_depth(self, turn: usize) -> ActionVal { ...
Rust
0
E: u16 = 4; pub const VERSION: u16 = 5; pub const POST_SCRIPT_NAME: u16 = 6; pub const TRADEMARK: u16 = 7; pub const MANUFACTURER: u16 = 8; pub const DESIGNER: u16 ...
Rust
0
import multiprocessing.pool class NoDaemonProcess(multiprocessing.Process): """ A process with the daemon property set to false """ @property def daemon(self) -> bool: """ The deamon property :return: True if the process is a Deamon, else false """ return ...
Python
1
mAt(pos) if not item: return menu = QMenu(self) # 获取笔记数据 note_path = item.data(Qt.ItemDataRole.UserRole) # 打开笔记 open_action = menu.addAction("打开笔记") open_action.triggered.connect(lambda: self.open_note(item)) ...
Python
1
ec<u8> = vec![<PASSWORD>, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64]; let pbkdf_exp: Vec<u8> = vec![ 0x4b, 0x0, 0x79, 0x1, 0xb7, 0x65, 0x48, 0x9a, 0xbe, 0xad, 0x49, 0xd9, 0x26, 0xf7, 0x21, 0xd0, 0x65, 0xa4, 0x29, 0xc1, ]; const LOOPS: u32 = 4096; let out = match c...
Rust
0
from moccasin.boa_tools import VyperContract from moccasin.config import get_active_network from contracts import zkTitans def deploy_zktitans(metadata_uri: str) -> VyperContract: """ Deploy the zkTitans contract @param metadata_uri: Base URI for token metadata """ print("Using metadata URI:", met...
Python
1
log in logging_outputs)) fp_sum = float(sum(log.get("fp", 0) for log in logging_outputs)) fn_sum = float(sum(log.get("fn", 0) for log in logging_outputs)) tn_sum = float(sum(log.get("tn", 0) for log in logging_outputs)) if tp_sum + fp_sum + fn_sum + tn_sum > 0: ...
Python
1
ls; pub fn subcommand(str_subcommand: &str) -> clap::App { clap::SubCommand::with_name(str_subcommand) .about("Analyze played games and spot suboptimal decisions") .arg(clap::Arg::with_name("sauspiel-files") .required(true) .takes_value(true) .multiple(true) ...
Rust
0
mer( MetricId::new("client.response") .with_tag("service-name", service.to_string()), ), io_error_meter: m.meter( MetricId::new("client.response.error") .with_tag("service-name...
Rust
0
* RFC 7230, Page 14 */ #[derive(Debug)] pub struct HTTPVersion { pub major: u32, pub minor: u32, } #[derive(Debug)] pub struct AbsolutePath { pub segments: Vec<Segment>, } #[derive(Debug)] pub struct Query { pub lexeme: String, } #[derive(Debug)] pub struct Segment { pub lexeme: String, } <gh_st...
Rust
0
strings: $hello = "Hello" $world = "World" condition: true } "#, ) .unwrap(); assert_eq!(rule[0].strings[0].0.as_str(), "$hello"); assert_eq!(rule[0].strings[0].1.as_str(), "Hello"); assert_eq!(rule[0].strings[1].0.as_str(), "$world"); ...
Rust
0
newline(list), test_list, write_list, "fixtures/parsers/list.ron", ), ( repeat_newline(tuple), test_tuple, write_tuple, "fixtures/parsers/tuple.ron", ), ( repeat_newline(group), test_group, write_group, "fixtures/par...
Rust
0
()[0],self.z1_dim,self.z2_dim]).to(device) cp_z = ut.conditional_sample_gaussian(cp_m.to(device), cp_v.to(device)) kl = torch.zeros(1).to(device) kl = alpha*ut.kl_normal(q_m.view(-1,self.z_dim).to(device), q_v.view(-1,self.z_dim).to(device), p_m.view(-1,self.z_dim).to(device), p_v.view(-1,self.z...
Python
1
basket.setDisabled(True) bestelBtn = QPushButton('Retour') bestelBtn.clicked.connect(lambda: verwerkArtikel(martnr,retstat, m_email, mhoev, self, klmail)) else: basket.setDisabled(False) ...
Python
1
}; Ok(base.split('/').map(|s| s.to_string()).collect()) } fn parse_hda_keys(read: &mut dyn Read) -> Result<Vec<(String, String)>, WeechatError> { let keys = match parse_str_std(read)? { WeechatString::Str(e) => e, WeechatString::Null => { return Err(WeechatError::new( ...
Rust
0
= "W0_17 register accessor: an alias for `Reg<W0_17_SPEC>`"] pub type W0_17 = crate::Reg<w0_17::W0_17_SPEC>; #[doc = "Word pin registers for all port GPIO pins"] pub mod w0_17; #[doc = "W0_18 register accessor: an alias for `Reg<W0_18_SPEC>`"] pub type W0_18 = crate::Reg<w0_18::W0_18_SPEC>; #[doc = "Word pin registers ...
Rust
0
) = &input.activity_stream_status { object.key("ActivityStreamStatus").string(var_1656.as_str()); } if input.copy_tags_to_snapshot { object .key("CopyTagsToSnapshot") .boolean(input.copy_tags_to_snapshot); } if input.cross_account_clone { object ...
Rust
0
args_get_str, VaultConfig, WrappedVault}; use emerald_vault::{ convert::json::keyfile::EthereumJsonV3File, storage::error::VaultError, EthereumAddress, EthereumPrivateKey, }; use json::StatusResult; use emerald_vault::structs::book::AddressRef; use wallets::CurrentAddressJson; use emerald_vault::structs::wallet...
Rust
0
fault_dir_meaning})") new_book_directory = input("Enter the new book directory path (leave blank to use default): ").strip() if new_book_directory: updated_dir = update_directory(script, new_book_directory) if updated_dir: updated_directories[s...
Python
1
let dt = 1.0 / 60.0; timecur = current_time(); timeacc += timecur - timeprv; timeprv = timecur; while timeacc >= dt { timeacc -= dt; // remove inactive bullets let mut i = 0; while i < state.bullets.len() { if !stat...
Rust
0
n.get('AUTO_UPDATE') == '1': updater = AutoUpdater(logger=bt.logging) asyncio.create_task(updater.start_update_loop()) bt.logging.info(f"Auto-updater enabled, checking for updates every {updater.UPDATE_INTERVAL} seconds") else: bt.logging.info("Auto-updater disabled. Set AUTO_UPDATE=...
Python
1
:W) writer structure"] impl crate::Writable for SYSCTRL_DSS_LOOP_CACHE_CFG {} #[doc = "DSS Loop Cache Configuration"] pub mod sysctrl_dss_loop_cache_cfg; #[doc = "Memory Access Error Flags\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg:...
Rust
0
ConnectionConfig, ) -> Result<()> { let l2cap_connection_config = ble_l2cap_conn_cfg_t { rx_mps: config.rx_mps, tx_mps: config.tx_mps, rx_queue_size: config.rx_queue_size, tx_queue_size: config.tx_queue_size, ch_count: config.ch_count, }; let ble_config = ble_cfg_t { ...
Rust
0
// /// # Example /// /// ```rust /// use rocket_lamb::{RocketExt, ResponseType}; /// /// let builder = rocket::ignite() /// .lambda() /// .response_type("TEXT/PLAIN", ResponseType::Text); /// assert_eq!(builder.get_response_type("text/plain"), ResponseType::Text); /// ass...
Rust
0
rypt(salt: &[u8], log_n: u8, password: &str) -> Result<[u8; 32], InvalidParams> { let params = ScryptParams::new(log_n, 8, 1)?; let mut output = [0; 32]; scrypt_inner(password.as_bytes(), salt, &params, &mut output) .expect("output is the correct length"); Ok(output) } <reponame>rapzo/prisma-en...
Rust
0
ssert_eq!(parsed.name, "a cat is an A+ pet"); /// assert_eq!(parsed.value, ""); /// /// let parsed = ValueField::parse("cat.food=yum?"); /// assert_eq!(parsed.name, "cat"); /// assert_eq!(parsed.name.source(), "cat.food"); /// assert_eq!(parsed.value, "yum?"); /// ``` pub fn parse(field:...
Rust
0
t_ratios) <= i else args.control_net_ratios[i] ctrl_unet, ctrl_net = original_control_net.load_control_net(args.v2, unet, model) prep = original_control_net.load_preprocess(prep_type) control_nets.append(ControlNetInfo(ctrl_unet, ctrl_net, prep, weight, ratio)) if args.opt_chan...
Python
1
AGS: u32 = 1879048195; pub const PF_MIPS_LOCAL: u32 = 268435456; pub const DT_MIPS_RLD_VERSION: u32 = 1879048193; pub const DT_MIPS_TIME_STAMP: u32 = 1879048194; pub const DT_MIPS_ICHECKSUM: u32 = 1879048195; pub const DT_MIPS_IVERSION: u32 = 1879048196; pub const DT_MIPS_FLAGS: u32 = 1879048197; pub const DT_MIPS_BASE...
Rust
0
step(async move { send_value(builder().await, rest) }) )) } fn read_queue() -> Session<ReceiveChannel<StringQueue, End>> { receive_channel(|queue| { unfix_session( queue, case! { queue ; Left => { wait ( queue, terminate () ) } Right => { receive_val...
Rust
0
max_width: maximum size of bars as fraction of sample width [default: 0.02] noise_dBFS & noise_color: see Audio.noise() `dBFS` and `color` args Returns: augmented Audio object """ # convert max_width from fraction of sample to seconds max_width_seconds = audio.duration * max_widt...
Python
1
as fb: write_macrocells(fb, device_name, device, block_name) fd.write(f"<li><a href='pt{block_name}.html'>" f"Block {block_name} Product Terms</a></li>\n") with open(os.path.join(dev_docs_dir, f"pt{block_name}.html"), "w") as fb: ...
Python
1
(D3DTOP_MODULATEINVALPHA_ADDCOLOR); pub const ModulateInvColorAddAlpha : TextureOp = TextureOp(D3DTOP_MODULATEINVCOLOR_ADDALPHA); pub const BumpEnvMap : TextureOp = TextureOp(D3DTOP_BUMPENVMAP); pub const BumpEnvMapLuminance : TextureOp = TextureOp(D3DTOP_BUMPENVMAPLUMINANCE); pub ...
Rust
0
tadata()?; let current_timestamp = metadata.modified()?; if timestamp != current_timestamp { // Close enough return Err(io::Error::from(io::ErrorKind::InvalidData)); } } let inner = Arc::new(if mmap { let file = std::fs::Fil...
Rust
0
, f: F) -> SignalHandlerId { unsafe { let f: Box_<Box_<Fn(&Self, &ListBoxRow) + 'static>> = Box_::new(Box_::new(f)); connect(self.to_glib_none().0, "row-activated", transmute(row_activated_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _) } } #[c...
Rust
0
main() {} <filename>src/frontend/controllers.rs use actix_web::{get, HttpRequest, HttpResponse}; use crate::error::request_error::RequestError; use std::fs::read_to_string; use std::path::Path; #[get("/")] pub async fn index(_r: HttpRequest) -> Result<HttpResponse, RequestError> { let result1 = read_to_string(P...
Rust
0
# Copyright (c) 2023 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 app...
Python
1
_fast_change", request, is_digital_human=False) except Exception as e: error_res = {"error": str(e), "function_name": "clothes_fast_change"} return format_response(error_res, mode="sync", error_type="general_exception") return await handle_async_endpoint(request, process, "clothes_f...
Python
1
raise ValueError(f'Missing inject for `type` style.') _type = str(_k['type']) if _type not in global_cfg: raise ValueError(f'Missing {_type} in inspect stage.') # TODO _cfg: dict = global_cfg[_type] # clean args _keys = [k ...
Python
1
"⚠️ Installing NumPy for Bazel TensorFlow configuration...", flush=True) subprocess.run([sys.executable, '-m', 'pip', 'install', 'numpy'], check=True, env=env) import numpy print(f"✅ NumPy installed: {numpy.__version__}", flush=True) # Clean corrupted Bazel cache if ...
Python
1
import os from typing import Callable from eth.utils.module_loading import ( import_string, ) def get_gas_estimator() -> Callable: import_path = os.environ.get( 'GAS_ESTIMATOR_BACKEND_FUNC', 'eth.estimators.gas.binary_gas_search_intrinsic_tolerance', ) return import_string(import_path...
Python
1
a = set([1, 2, 3, 4]) b = set([1, 2]) print(a ^ b)
Python
1
.stderr.write(err) @classmethod def close(cls): if std_silent.dest_stdout is not None: std_silent.dest_stdout.close() if prefs["logging.delete_log_on_exit"]: try: os.remove(std_silent.dest_fname_stdout) except OSError: ...
Python
1
# 49 - El almacén de papá noel import random class WorkshopAccess: def __init__(self): self.letters = "abc" self.numbers = "123" self.valid_characters = self.letters + self.numbers self.access_code = self.generate_code(self.valid_characters) def generate_code(self,text): ...
Python
1
{ // layout is in [7-8] assert!((mode_bits & 0x40) == 0); if (mode_bits & 0x20) != 0 { layout = 8; } else { layout = 7; } } else { layout = 9; } } else...
Rust
0
MONG CLAN SIGN VWJ 0x16F00..=0x16F44, // Lo [69] MIAO LETTER PA..MIAO LETTER HHA 0x16F50..=0x16F50, // Lo MIAO LETTER NASALIZATION 0x16F93..=0x16F9F, // Lm [13] MIAO LETTER TONE-2..MIAO LETTER REFORMED TONE-8 0x16FE0..=0x16FE0, // Lm TANGUT ITERATION MARK ...
Rust
0
_group_width / n_series - chart_config.bar_gap * (n_series - 1.0); let x = chart_rect.x + (box_group_gap + (box_group_gap + box_group_width) * point_index.to_f64().unwrap()) + (box_gap + box_width) * series_index.to_f64().unwrap(); let whisker_tip_width = box_width / 10.0; let line_width = 2.0; let value_to_pi...
Rust
0
# # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # from .source import SourceNasa __all__ = ["SourceNasa"]
Python
1
es)?; Ok(file) } } /// The Meme Struct #[derive(Debug)] pub struct Meme { pub image : Image, pub subreddit : String, pub score : u64, pub id : String, pub self_text : String, pub is_nsfw : bool } impl Meme { pub fn get(topic : &str) -> Result<Meme, Error> { let...
Rust
0
let ans = if has_error == 1 { Err(LoadAccessFault) } else { Ok(ans) }; recover_trap_vector(saved_mtvec_address); return ans; } extern "C" fn memory_fault_catch_handler() { let cause = mcause::read().cause(); if cause == Trap::Exception(Exception::LoadFault) { unsafe...
Rust
0
ator //! instance by reducing the cost of populating its cache via an additional caching layer that //! lives closer to symbolicator. Expensive computations related to the computation of derived //! caches may also be saved via this shared cache. use std::convert::TryInto; use std::fmt; use std::io::SeekFrom; use std:...
Rust
0
33..34 PATH_SEGMENT@33..34 NAME_REF@33..34 IDENT@33..34 "a" WHITESPACE@34..35 " " PIPEPIPE@35..37 "||" WHITESPACE@37..38 " " PATH_EXPR@38..39 PATH@38..39 PATH_SEGMENT@38....
Rust
0
import unittest import io from svgelements import * class TestSVGCSS(unittest.TestCase): def test_issue_103(self): """Testing Issue 103 css class parsing This test is based on an Illustrator file, where the styling relies more on CSS. """ q = io.StringIO(u'''<svg xmlns="http://w...
Python
1
mm_mmm32 0x200A_0060,// Punpcklbw_xmm_xmmm128 0x224A_0060,// VEX_Vpunpcklbw_xmm_xmm_xmmm128 0x22CA_0060,// VEX_Vpunpcklbw_ymm_ymm_ymmm256 0x224A_0060,// EVEX_Vpunpcklbw_xmm_k1z_xmm_xmmm128 0x22CA_0060,// EVEX_Vpunpcklbw_ymm_k1z_ymm_ymmm256 0x234A_0060,// EVEX_Vpunpcklbw_zmm_k1z_zmm_zmmm512 0x2002_0061,// Punpckl...
Rust
0
} } if let Some(s) = matches.opt_str("l") { match s.parse::<usize>() { Ok(n) => { if n == 0 { eprintln!("--query-len: query length must be non-zero"); process::exit(1); } ...
Rust
0