text
string
label_name
string
labels
int64
# SPDX-License-Identifier: MIT # Copyright (c) 2020 The Authors. # Authors: Sherif Abdelwahab <@zasherif> # Phu Tran <@phudtran> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Sof...
Python
1
nces([ ('u1', wav_file, 0, 1), ('u2', wav_file, 1, 1.2), ('u3', wav_file, 0.5, 1.4)]) ubm_config = DiagUbmProcessor(8).get_params() ubm_config['vad']['energy_threshold'] = 0 ubm_config['num_iters_init'] = 1 ubm_config['num_iters'] = 1 vtln_config = {} vtln_config['ubm']...
Python
1
# Atividade 08: # Média de Notas: # Desenvolva um programa que solicite as notas dos alunos até # que o usuário digite -1. Calcule e exiba a média das notas # inseridas. c = 0 n = 0 m = 0 while n >= 0: n = float(input('Insira a nota: ')) if n >= 0: c += 1 n += n else: print
Python
1
et (s11, s12) = n1.share(&mut rng); let (s21, s22) = n2.share(&mut rng); let s31 = s11 + s21; let s32 = s12 + s22; assert_eq!( s31.combine(&s32), n3, "test failed with f1 = {:?}, f2 = {:?}, f3 = {:?}", f1, ...
Rust
0
minimale et maximale si besoin. assert!(colonne < self.largeur); assert!(ligne < self.hauteur); let index = ligne * self.largeur + colonne; self.altitudes[index] = altitude; if altitude < self.altitude_min { self.altitude_min = altitude; } if altitu...
Rust
0
for k in set(current.keys()).union(set(rhs.keys())): if k not in current: current[k] = rhs[k] continue elif k not in rhs: continue else: current[k]["lines"] = current[k]["lines"].union(rhs[k]["lines"]) ...
Python
1
rSrSS/rSSKJr SSKrSSKJrJrJ r J r J r J r J r JrJrJrJrJr SSKJr SS KJr SS KJr SS KJr SS KJr SS KJr SSKJ r SSK!J"r" SSK#J$r$ SSK%J&r& SSK'J(r(J)r)J*r*J+r+J,r,J-r-J.r.J/r/ SSK0J1r1 /SQr2/SQr3/SQ...
Python
1
e=f"DATE value '{value}' is not recognized." ) def _timestamp_converter( value: str, datatype: DataType, format: str, field_optionally_enclosed_by: str = None, null_if: Optional[List[str]] = None, ) -> Optional[datetime.datetime]: if value is None or value == "" or null_if is not None ...
Python
1
drawCar(x[k], y[k], yaw[k]) # plt.arrow(x[k], y[k], 1*math.cos(yaw[k]), 1*math.sin(yaw[k]), width=.1) # plt.title("Hybrid A*") # Draw Animated Car for k in range(len(x)): plt.cla() # plt.xlim(min(obstacleX), max(obstacleX)) # plt.ylim(min(obstacleY), max(obstacleY)) ...
Python
1
def searchMatrix(matrix, target): if not matrix or not matrix[0]: return False rows, cols = len(matrix), len(matrix[0]) left, right = 0, rows * cols - 1 while left <= right: mid = (left + right) // 2 mid_value = matrix[mid // cols][mid % cols] if mid_value == target: ...
Python
1
t, arg3: u32, ) -> *mut jl_value_t, >; extern "C" { pub fn jl_fptr_const_return( arg1: *mut jl_value_t, arg2: *mut *mut jl_value_t, arg3: u32, arg4: *mut _jl_code_instance_t, ) -> *mut jl_value_t; } extern "C" { pub fn jl_fptr_sparam( arg1: *mut jl_value_t...
Rust
0
res = [] # generate stateful lambda that will store result in `res` def gen_f(): s = Item(3) return lambda j: res.append(s.value + j) # do some work async work = [1, 2, 3, 4] m.test_async_callback(gen_f(), work) # wait until work is done from time import sleep slee...
Python
1
pub fn flash_fcris_progris(&self) -> FLASH_FCRIS_PROGRISR { let bits = ((self.bits >> 13) & 1) != 0; FLASH_FCRIS_PROGRISR { bits } } } impl W { #[doc = r"Writes raw bits to the register"] #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.bits = bi...
Rust
0
mongo_type)) } fn introspect_native_type( &self, _native_type: serde_json::Value, ) -> Result<dml::native_type_instance::NativeTypeInstance> { // Out of scope for MVP todo!() } fn scalar_type_for_native_type(&self, _native_type: serde_json::Value) -> dml::scalars::S...
Rust
0
ment(shape=[1, self.model_config.input_size], keyword="tensor")]) @property def transformer_block_info(self) -> list[TransformerBlockInfo]: return [] @staticmethod def get_nncf_modules_in_transformer_block_order(compressed_model: NNCFNetwork) -> list[DictInTransformerBlockOrder]: retur...
Python
1
, BehaviorTreeBuildingError::CouldNotFindChildDefinitionWithId(1)); }<gh_stars>10-100 // // gal_builder.rs: GAL constructor // // Given a Blueprint, this module constructs an appropriate GAL // structure, which can then be written out. // use crate::{ blueprint::{Active, Blueprint, Pi...
Rust
0
enum Primitive { /// A plain string (ex: `"a string"`) Str, /// A true-false value Boolean, /// An integer numeric type Integer, /// A floating-point value Float, /// Arrays Array(Box<Self>), /// A hash map HashMap(Box<Self>), /// A btreemap BTreeMap(Box<Self>), ...
Rust
0
""" custom-portfolio-analyzer - A tool to model, back-test, and compare the performance of your own custom portfolios. Copyright (C) 2025 Fevzi Babaoğlu This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Fo...
Python
1
line(always)] #[target_feature = "+avx"] #[cfg_attr(test, assert_instr(vperm2f128, imm8 = 0x31))] pub unsafe fn _mm256_permute2f128_pd(a: f64x4, b: f64x4, imm8: i8) -> f64x4 { macro_rules! call { ($imm8:expr) => { vperm2f128pd256(a, b, $imm8) } } constify_imm8!(imm8, call) } /// Shuffle 258-bits (c...
Rust
0
from dotenv import load_dotenv import requests import os import json load_dotenv() url = "https://data.alpaca.markets/v2/stocks/bars" params = { "symbols": "TSLA", "timeframe": "1Min", "start": "2023-07-01", "end": "2023-07-31", "limit": 1000, "adjustment": "raw", "feed": "sip", "sort...
Python
1
self.add_faq(faq) def _update_search_index(self, document: HelpDocument) -> None: """ 更新搜尋索引 Args: document: 文檔 """ # 提取關鍵字 text = f"{document.title} {document.content} {' '.join(document.tags)}" keywords = self._tokenize(text.lowe...
Python
1
fn max_input_len(block_len: usize, overhead_blocks_per_nonce: usize) -> u64 { // Each of our AEADs use a 32-bit block counter so the maximum is the // largest input that will not overflow the counter. ((1u64 << 32) - polyfill::u64_from_usize(overhead_blocks_per_nonce)) * polyfill::u64_from_usize(bl...
Rust
0
in_matches: if let Some(x) = query.min_matches { x } else { 1 }, mode: if let Some(x) = query.mode { x } else { 0 }, wiki: if let Some(x) = query.wiki { x } else { "en".to_string() }, }; // Check query validity. ...
Rust
0
from cms.api import add_plugin from cms.test_utils.testcases import CMSTestCase from djangocms_frontend.contrib.badge.cms_plugins import BadgePlugin from djangocms_frontend.contrib.badge.forms import BadgeForm from ..fixtures import TestFixture class BadgePluginTestCase(TestFixture, CMSTestCase): def test_plugi...
Python
1
# Copyright (C) 2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # Copyright (c) OpenMMLab. All rights reserved. """Implementation of KLDiscretLoss.""" from __future__ import annotations import torch from torch import Tensor, nn from torch.nn import functional class KLDiscretLoss(nn.Module): """Di...
Python
1
;' : ['android.permission.WRITE_CONTACTS', 'android.permission.READ_CONTACTS'], 'Lcom/android/internal/telephony/HbpcdLookup$NanpAreaCode;-CONTENT_URI-Landroid/net/Uri;' : ['android.permission.MODIFY_PHONE_STATE'], 'Landroid/provider/CalendarContract$CalendarCache;-URI-Landroid/net/Uri;' : ['android.permission.READ_C...
Python
1
_::String(s) => { let ty = env.bld().string(env.bld().mk_rwitness(pos)); let e = tast::Expr_::String(s.clone()); (ty, e) } ast::Expr_::Call(x) => { // TODO(hrust) pseudo functions, might_throw let (call_type, e, explicit_targs, el, unpacked_ele...
Rust
0
as_ref().map(|x| x.handle()), }; // the GRANDPA voter task is considered infallible, i.e. // if it fails we take down the service with it. task_manager .spawn_essential_handle() .spawn_blocking("grandpa-voter", sc_finality_grandpa::run_grandpa_voter(grandpa_config)?); } network_starter.start_network()...
Rust
0
}(", uniqueness = if self.is_unique { "UNIQUE " } else { "" }, index_name = self.index_name, table_reference = self.table_reference, using = using, )?; self.columns .iter() .map(|c| { let mut rendered = Ident(&c.nam...
Rust
0
completion while let Some(disp) = self.batch.next() { match disp { Disposition::Act(packet) => transmit_q.push(packet.reset()), Disposition::Drop(mbuf) => drop_q.push(mbuf), Disposition::Emit => emitted += 1, Disposition::Abort(_) => a...
Rust
0
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. # # This source code is licensed under the BSD license found in the # LICENSE file in the root directory of this source tree. # Copyright 2019 Kakao Brain # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this f...
Python
1
from models.params import HtmlExtractionParams extraction_configs = [ { "params": HtmlExtractionParams( post_num_pattern=r'<div class="pagination">.*?(\d+)\s+posts.*?</div>', content_regex=r'<div class="content">.*?(?=<div id=|$)', datetime_regex=r'<time[^>]*datetime=[\'...
Python
1
"mul": "multiplier", "prec": "precision", "cng": "change", "nc": "net_change_percentage", "tk": "instrument_token", "e": "exchange_segment" } MarketDepthResp = {'depth': {}} MarketDepthResp['depth']['buy'] = [{"price": "", "quantity": "", "orders": ""}, {"pric...
Python
1
import requests import unittest import importlib utils = importlib.import_module( 'extensions.sd-webui-controlnet.tests.utils', 'utils') utils.setup_test_env() class TestDetectEndpointWorking(unittest.TestCase): def setUp(self): self.base_detect_args = { "controlnet_module": "canny", ...
Python
1
-0𝔽, return n. // 3. If n is +∞𝔽 or n is -∞𝔽, return NaN. // 4. Return an implementation-approximated value representing the result of the sine of ℝ(n). .sin() .into()) } /// Get the hyperbolic sine of a number. /// /// More information: /// - [E...
Rust
0
[pygame.K_LEFT]: paddle.move_left() if keys[pygame.K_RIGHT]: paddle.move_right() if not ball.move(): lives -= 1 ball.reset() if lives <= 0: game_over_screen() break if check_collision(ball, paddle, bric...
Python
1
pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { ...
Rust
0
") } ReflogPortion { display("A ref must not contain '@{{' which is a part of a ref-log") } Asterisk { display("A ref must not contain '*' character") } StartsWithDot { display("A ref must not start with a '.'") } EndsWi...
Rust
0
file_name().into_string().unwrap(), file.metadata().unwrap().len() as usize, ); response.push(obj); } Response::builder() .status(200) .header("Content-Type", "application/vnd.x.restic.rest.v2") ....
Rust
0
makes the required size even smaller. fn main() { let iterations = 10000; let mut correct = 0; for _ in 0..iterations { let enc = if rand::random() { ECB } else { CBC }; let mut blackbox = |plain| encryption_oracle(plain, enc); let is_ecb = detect_ecb(&mut blackbox, 16); if ...
Rust
0
"this will be dark red", Color::DarkRed, Styles::empty() )] ); } #[test] fn multiple_styles() { let s = "&1&e&d&lthis will be light purple and bold &o&a&e&a&mand this \ will be green and strikethrough"; assert_...
Rust
0
::++::/. -+oo+- ./o: `:///+- `./ooo+:` .++- `` /-` -:/+oooo+:` .:+/:`` `-:ooooooo++- ./+o+//:...../+oooooooo++:` `:/++ooooooooooooo++/-` `.-//++++++//:-.` ``````"#; // "artix_small"* // artixsmall // Colors: [6, 6, 7, 1] pub const ARTIXSMA...
Rust
0
print!(" "); capitalize = true; } _ => match capitalize { true => { print!("{}", character.to_uppercase()); capitalize = false; } false => print!("{}", character), }, } ...
Rust
0
erialize}; pub mod c; pub mod cmd; pub mod go; pub mod health; pub mod python; #[derive(Debug, Serialize, Deserialize)] pub struct RunRes { message: String, stdout: String, stderr: String, exec_duration: i64, } #[derive(Debug, Serialize, Deserialize)] pub struct RunCodeReq { id: String, code:...
Rust
0
class Solution: def maxProfit(self, prices: List[int]) -> int: profit = 0 for i in range(1,len(prices)): if prices[i] > prices[i-1]: profit += (prices[i] - prices[i-1]) return profit
Python
1
execute process: {}", e)); } //! Argument parsing utilities. #![allow(clippy::missing_docs_in_private_items)] use crate::asm::Style; use crate::build::Type; use lazy_static::lazy_static; use structopt::StructOpt; lazy_static! { pub static ref opts: ::parking_lot::RwLock<Options> = { ::parking_lot::RwLock...
Rust
0
import psycopg2 from psycopg2 import sql from decouple import config def create_era_syncswap_swaps(): # .env DATABASE = config('DATABASE') USER = config('USER') PASSWORD = config('PASSWORD') HOST = config('HOST') PORT = config('PORT') # Connect to your PostgreSQL database conn = psycopg2.connect( ...
Python
1
e::{Deserialize, Serialize}; use std::{iter::IntoIterator, ops::Deref, vec}; static DISCOVERY_SET_MODULE_NAME: Lazy<Identifier> = Lazy::new(|| Identifier::new("LibraSystem").unwrap()); static DISCOVERY_SET_STRUCT_NAME: Lazy<Identifier> = Lazy::new(|| Identifier::new("DiscoverySet").unwrap()); pub fn discover...
Rust
0
dataset = list(problems.values()) except ImportError: print("=" * 80) print("run 'pip install humaneval'") print("=" * 80) return [], [] except Exception as e: print(f" 'humaneval' loading error: {e}") return [], [] text_corpus = "\n\n".join([sample['prompt'...
Python
1
active_symlink) .or_else(|error| return Err(format!("Failed to process existing apps: {}", error)))? { match entry { Ok(file) => { let uuid = file.file_name(); match self.start_app(&uuid.to_string_lossy(), RunLevel::OnBoot) { ...
Rust
0
import sys import os sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../src/aica_vlm"))) from adaptation import ConfigLoader config_file_path = "examples/adaptation/qwen2.5VL.yaml" def test_config_loader(): """ Test the ConfigLoader by loading a configuration file and printing the re...
Python
1
MessageType::ChannelOpen => self.channel_open(packet), MessageType::ChannelRequest => self.channel_request(packet), MessageType::ChannelData => self.channel_data(packet), MessageType::KeyExchange(_) => self.key_exchange(packet), _ => { error!("Un...
Rust
0
import jax import jax.numpy as jnp def cloob_loss(image_features, text_features, inv_tau, scale_hopfield): """Computes the CLOOB loss (negative mean log odds assigned to positive pairs after Hopfield retrieval). Note: this loss has been rescaled from the original CLOOB loss for interpretability, ...
Python
1
# 更新地圖 self.robot2.op_map = self.robot1.op_map.copy() # Robot 2 移動 next_state2, r2, d2 = self.robot2.move_to_frontier(frontiers[robot2_action]) robot2_reward = r2 ...
Python
1
unwrap_or_else(|| "none".to_string())) .unwrap_or_else(|| "none".to_string()), width = match config.decorations_width { cli::Width::Fixed(width) => width.to_string(), cli::Width::Variable => "variable".to_string(), }, tab_width = config.tab_width, toke...
Rust
0
def trimline(line, maxlen=124): """string -> string[] Recursively shorten string if it is longer than maxlen. Return list of shortened lines If a line cannot be shortened an exception will be thrown. Default maxlen comes from the max line length in the original english helpx.txt: for f in \#...
Python
1
_SNAPSHOT, move |ctx, req, resp| { instance.update_snapshot(ctx, req, resp) }); let mut instance = s.clone(); builder = builder.add_unary_handler(&METHOD_SUBSCRIBER_DELETE_SNAPSHOT, move |ctx, req, resp| { instance.delete_snapshot(ctx, req, resp) }); let mut instance = s; builder...
Rust
0
", endpoint)) .await .expect("unable to send request") .text() .await; assert!(text_res.is_ok(), "{} failed", endpoint); assert_eq!(text_res.unwrap(), "passed".to_string()); } let processes = psutil::process::processes().unwrap(); for proces...
Rust
0
binop; pub mod count; pub mod disjoint_set; pub mod elastic_slice; pub mod find_nth; pub mod fold; pub mod fold_bisect; pub mod get_mut; pub mod max; pub mod min; pub mod multiplicative; pub mod potential_function; pub mod push_pop; pub mod quantile; pub mod range_bounds; pub mod set_value; pub mod stateful_predicate;...
Rust
0
from pathlib import Path import pytest from dnnv.properties.expressions import Expression, Forall, get_context from dnnv.properties.parser.dnnp import DNNPParserError, parse, parse_str artifacts_dir = Path(__file__).parent / "test_parse_artifacts" def test_true(): phi = parse(artifacts_dir / "true.dnnp") a...
Python
1
or ElemId {} use anyhow::{bail, Result}; use clap::Clap; // use toml::to_string; use std::os::unix::io::{AsRawFd, FromRawFd}; use std::path::PathBuf; use std::process::{Command, Stdio}; use std::sync::mpsc; use std::sync::{Arc, Mutex}; use std::thread; use std::time::{Duration, Instant}; mod fileio; mod print_console;...
Rust
0
as isize, last_y_pos as isize)); } } res.into_iter().fold(0usize, |acc, x| acc * 10 + x as usize) } #[aoc(day24, part2)] fn part2(input: &Program) -> usize { let mut res = [0; 14]; let mut buf: VecDeque<(isize, isize)> = VecDeque::new(); for (i, sub) in input.subroutines.iter().skip(1).enu...
Rust
0
e { &xdg_toplevel_interface } } fn interface_name() -> &'static str { "xdg_toplevel" } fn supported_version() -> u32 { 1 } fn version(&self) -> u32 { unsafe { ffi_dispatch!(WAYLAND_CLIENT_HANDLE, wl_proxy_get_version, self.ptr()) } } fn status(&self) -> Liveness { if let So...
Rust
0
of the same name /// already exists, this fairing replaces it. /// /// # Example /// /// ```rust,no_run /// # #[macro_use] extern crate rocket; /// use rocket::Rocket; /// use rocket::fairing::AdHoc; /// /// #[launch] /// fn rocket() -> _ { /// rocket::build() //...
Rust
0
"-Wall", "-Wcast-qual", "-Wdate-time", "-Wendif-labels", "-Wextra", "-Wextra-semi", "-Wformat=2", "-Winit-self", "-Wlogical-op", "-Wmissing-declarations", "-Wmissing-include-dirs", "-Wmissing-prototypes", "-Wmissing-variable-declarations", "-Wnested-externs", ...
Rust
0
Graphics_Gdi"))] impl ::core::clone::Clone for DDRAWI_DDRAWCLIPPER_LCL { fn clone(&self) -> Self { *self } } #[doc = "*Required features: `\"Win32_Graphics_DirectDraw\"`*"] pub const DDRAWI_DDRAWDATANOTFETCHED: i32 = 67108864i32; #[repr(C)] #[doc = "*Required features: `\"Win32_Graphics_DirectDraw\"`, `...
Rust
0
Query, can_paginate: bool, } /// A detailed query to flavor list. #[derive(Clone, Debug)] pub struct DetailedFlavorQuery { inner: FlavorQuery, } impl Flavor { /// Create a flavor object. pub(crate) fn new(session: Rc<Session>, mut inner: protocol::Flavor) -> Result<Flavor> { let extra_specs =...
Rust
0
mError }; use bytes::BytesMut; use std::str; use std::num::ParseIntError; const NULL_LEN: isize = -1; fn to_isize(s: &str) -> Result<isize, ParseIntError> { s.parse::<isize>() } fn to_i64(s: &str) -> Result<i64, ParseIntError> { s.parse::<i64>() } fn map_error(s: &str) -> Frame { utils::read_cluster_error(s...
Rust
0
#! /usr/bin/env python # Author: Yunlong Feng <ylfeng@ir.hit.edu.cn> import numpy as np def cycle(iterable): while True: yield from iterable class MultiTaskDataloader: def __init__(self, tau=1.0, **dataloaders): self.dataloaders = dataloaders Z = sum(pow(v, tau) for v in self.datal...
Python
1
# coding: utf-8 """ codebeamer swagger API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: 3.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # no...
Python
1
#[cfg(not(feature = "std"))] let guess = BigUint::one() << max_bits; fixpoint(guess, max_bits, move |s| { let q = self / (s * s); let t = (s << 1) + q; t / 3u32 }) } } fn high_bits_to_u64(v: &BigUint) -> u64 { match v.data.len() { 0 =...
Rust
0
# Copyright (c) 2017-present, Facebook, Inc. # # 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...
Python
1
); } #[wasm_bindgen] pub struct StaticAABB2DIndex(cavc::StaticAABB2DIndex<f64>); #[wasm_bindgen] impl StaticAABB2DIndex { #[wasm_bindgen(constructor)] pub fn new(aabb_data: &[f64], node_size: usize) -> StaticAABB2DIndex { let mut builder = cavc::StaticAABB2DIndexBuilder::new_with_node_size...
Rust
0
")? { // The type has a `MetaSpec`. It is assumed that the provided `MetaSpec` overwrites the // inherited one. Some(m) => m, None => { if let Some(m) = info.inherited_meta { // The type doesn't have a `MetaSpec` but it inherits one. return...
Rust
0
import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn import preprocessing import xgboost as xgb train = pd.read_csv('../208_home/data/train.csv') test = pd.read_csv('../208_home/data/test.csv') for i in ['year', 'month', 'day']: train[i] = np.nan test[i] = ...
Python
1
"ROOT", optional: true, handler: None, sub: Some(&[ // Create default IEEE488 mandated commands Node {name: b"*IDN", optional: false, handler: Some(&IdnCommand{ manufacturer: b"GPA-Robotics", model: b"ash-power", serial: b"0", f...
Rust
0
get_button_pressed(&self, button: Button) -> bool { let b = self.get_button(button); b.pressed && !b.pressed_last_frame } pub fn get_button_released(&self, button: Button) -> bool { let b = self.get_button(button); !b.pressed && b.pressed_last_frame } pub fn reset_input...
Rust
0
a/rust-bindgen<filename>tests/expectations/tests/doggo-or-null.rs #![allow( dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals )] #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialEq)] pub struct Doggo { pub x: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout...
Rust
0
expected_output = { "cache_type": "Normal (Platform cache)", "cache_size": 10000, "current_entries": 101, "flows_added": 106, "flows_aged": {"total": 5, "inactive_timeout": 5, "inactive_timeout_secs": 60}, "entries": { 1: { "ipv6_src_addr": "2012:AA:1::20", "ipv6_...
Python
1
re for each of the sequences. optimise_binder( fasta_path=FLAGS.receptor_fasta_path, fasta_name=fasta_name, receptor_if_residues=FLAGS.receptor_if_residues, peptide_length=FLAGS.peptide_length, output_dir=FLAGS.output_dir, data_pipeline=data_pipeline, model_runn...
Python
1
FORM_GBM_MESA: types::GLenum = 0x31D7; #[allow(dead_code, non_upper_case_globals)] pub const PLATFORM_WAYLAND_EXT: types::GLenum = 0x31D8; #[allow(dead_code, non_upper_case_globals)] pub const PLATFORM_WAYLAND_KHR: types::GLenum = 0x31D8; #[allow(dead_code, non_upper_case_globals)] pub const PLATFORM_X11_EXT: types::GL...
Rust
0
from config import create_app from controllers.atividade_controller import atividade_bp app = create_app() app.register_blueprint(atividade_bp, url_prefix='/atividades') if __name__ == '__main__': app.run(host='localhost', port=5002)
Python
1
{ self.inner.alpha() } #[setter] fn set_alpha(&mut self, alpha: f32) { self.inner.set_alpha(alpha); } fn has_transparency(&self) -> bool { self.inner.has_transparency() } fn $with_valu...
Rust
0
) << 6 | (s[index + 3] as u32 & 0x3f); index += 4; } else { ["Invalid literal provided."][(always_true() as usize)]; }; length += [1, 2][(chr >= 0x10000) as usize]; } length } #[doc(hidden)] #[macro_export] macro_rules! length { ($arg:expr) =>...
Rust
0
5.0), 4.0).to_path::<SimpleBezierPath>(); // Combine them let combined_circles = path_add::<_, _, SimpleBezierPath>(&vec![circle1], &vec![circle2], 0.1); println!("{:?}", combined_circles); assert!(combined_circles.len() == 2); } #[test] fn add_two_doughnuts() { // Two overlapping circles le...
Rust
0
rofiler; use scopeguard::defer; use scopetime::scope_time; use simplelog::{Config, LevelFilter, WriteLogger}; use spinner::Spinner; use std::{ env, fs, fs::File, io::{self, Write}, panic, path::PathBuf, process, time::{Duration, Instant}, }; use tui::{ backend::{Backend, CrosstermBackend...
Rust
0
_average.append("%.5f" % (sum(_temp_hit)/len(_temp_hit))) _temp_ndcg = [] for item in ndcg_k_score: _temp_ndcg.append(float(item[i])) ndcg_average.append("%.5f" % (sum(_temp_ndcg)/len(_temp_ndcg))) print("hit score:", hit_average) print("ndcg score:", ndcg_avera...
Python
1
# Copyright (c) Saga Inc. # Distributed under the terms of the GNU Affero General Public License v3.0 License. import os from typing import cast from .schema import UJ_MITOSHEET_ENTERPRISE, UJ_MITOSHEET_PRO from .db import get_user_field # Check if helper packages are installed try: import mitosheet_helper_pro ...
Python
1
# Calcula precio venta articulo """ Elaborar un algoritmo que calcule e imprima el precio de venta de un artículo. Se tiene los datos descripción de artículo y el costo de producción. El precio de venta se calcula añadiéndole al costo 120% como utilidad y el 15% de impuesto. """ articulo = input("Ingrese la descr...
Python
1
Material::default(), ); let i = Intersection::new(&o, 5.0); let c = i.prepare_computations(&r); assert!(c.over_point.z < -(FLOAT_EPSILON / 2.0)); assert!(c.point.z > c.over_point.z); } #[test] fn intersection_list_new() { let o = Object::default_sphere(); ...
Rust
0
# Unit test expand_index # ============================================================================== import re import pytest import pandas as pd from skforecast.utils import expand_index def test_TypeError_expand_index_when_steps_is_not_int(): """ Test TypeError is raised when `steps` is not a int. "...
Python
1
%22%3A%221dd96cac4e826abdbbe261dc4f3a08292%22%2C%22audioTriangle%22%3A%221dd96cac4e826abdbbe261dc4f3a08292%22%2C%22nativeFunc%22%3A%221973dcbb27a04c3a2ee240d9d2549e105%22%2C%22key1%22%3A%22web_7721346c62c20a0b%22%2C%22key2%22%3A1673853459961%2C%22key3%22%3A%22Mozilla%2F5.0%20%28Windows%20NT%2010.0%3B%20Win64%3B%20x64%2...
Python
1
ck_id].tracked = False self.tracks[track_id].obs.append(None) bboxes = torch.cat((match_det_bboxes, unmatch_det_bboxes), dim=0) labels = torch.cat((match_det_labels, unmatch_det_labels), dim=0) scores = torch.cat((match_det_scores, unmatch_det_scores), dim=0) ...
Python
1
_sky'], state['shortwave_optical_thickness_due_to_aerosol'], state['single_scattering_albedo_due_to_aerosol'], state['aerosol_asymmetry_parameter'], state['aerosol_optical_depth_at_55_micron'], state['shortwave_optical_thickness_due_to_clou...
Python
1
); connection .pg_connection .transaction::<Response, Error, _>(|| { Ok(routes(request, &connection)) }) .unwrap() }); } fn routes(request: &Request, connection: &DalConnection) -> Response { router!( request, (GE...
Rust
0
_window_size)): docs = collection.get( limit=docs_window_size, offset=offset, include=["metadatas"] ) doc_ids, metadata = docs["ids"], docs["metadatas"] objects = [json.loads(d["json_string"]) for d in metadata] extracted_texts = [extraction_f...
Python
1
[copy.deepcopy(c2_node), copy.deepcopy(a2)]) else: seq2 = copy.deepcopy(child.children[1]) # 如果动作还是一样的 # if isinstance(last_child.children[1], Leaf) and isinstance(child.children[1], Leaf) \ # ...
Python
1
warf::R8, dwarf::R9, dwarf::R10, dwarf::R11, dwarf::R12, dwarf::R13, dwarf::R14, dwarf::R15, dwarf::R16, dwarf::R17, dwarf::R18, dwarf::R19, dwarf::R20, dwarf::R21, dwarf::R22, dwarf::R23, dwarf::R24, dwarf::R25, dwarf::R26, dwarf::R27, dwa...
Rust
0
Commands:"); println!("- pokerus"); println!(" Launches the GUI. (WIP)"); println!("- pokerus tileset <primary/secondary> <output_folder> <metatile_definitions> <input_images...>"); println!(" Merges tilesets and their palettes into one image."); println!(" Useful for importing into Poryma...
Rust
0
_ng_str_t) -> bool { s.is_null() } /// @brief 字符串列表 /// @details 封装一个 C 字符串列表 /// @note /// * 当 SDK 的 API 返回字符串列表实例后,调用 `qiniu_ng_str_list_len()` 获取字符串列表长度。 /// * 逐一调用 `qiniu_ng_str_list_get()` 获取字符串列表中每个字符串实例的地址。 /// * 当 `qiniu_ng_str_list_t` 使用完毕后,请务必调用 `qiniu_ng_str_list_free()` 方法释放内存。 /// @note 该结构体内部状态...
Rust
0