text
string
label_name
string
labels
int64
paths are \\n"] #[doc = "engaged to inject high noise at RX IFA input. The fault can be used to cause \\n"] #[doc = "significant RX noise floor elevation. \\n"] #[doc = "This fault can be seen in RX_GAIN_PHASE_MONITOR and RX_NOISE_FIGURE_MONITOR. \\n"] #[doc = "Bit RX Channel \\n"] #[doc = "0 RX...
Rust
0
s.""" firstarr, secondarr, seglen = series_data f_s = 0.001 first = TimeSeries(firstarr, sample_rate=f_s) second = TimeSeries(secondarr, sample_rate=f_s * 2.32) with pytest.warns( UserWarning, match="Sampling frequencies are unequal", ): coh1 = spectral.coherence(first,...
Python
1
crate::Emoji { glyph: "👩🏽\u{200d}❤\u{fe0f}\u{200d}💋\u{200d}👩🏾", codepoint: "1F469 1F3FD 200D 2764 FE0F 200D 1F48B 200D 1F469 1F3FE", status: crate::Status::FullyQualified, introduction_version: 13.1f32, name: "kiss: woman, woman, medium skin tone, medium-dark skin tone", group: "People & Bo...
Rust
0
sb:%04x/%04x:libusb-1.0:%d:%d:%d", idVendor, idProduct, bus_number, device_address, interface)`. /// /// An example might be `usb:08e6/3437:libusb-1.0:7:99:0` under Linux (this may be different for Mac OS X). /// /// /// #### `libudev` /// /// If using `libudev`, the string may be generated by the C code `printf...
Rust
0
, vmax=1.4, s=marker_size, ) ax.scatter( range(len(X)), [split_idx + 1.5] * len(X), c=groups, marker="_", lw=lw, cmap=cmap_data, s=marker_size, ) yticklabels = list(range(1, n_splits + 1)) + ["group"] ax.set( ...
Python
1
def _scale_timesteps(self, t): # Scaling is done by the wrapped model. return t class _WrappedModel: def __init__(self, model, timestep_map, rescale_timesteps, original_num_steps): self.model = model self.timestep_map = timestep_map self.rescale_timesteps = rescale_tim...
Python
1
OnlyIoc, limit: 10, client_id: 0u64, } .data(), program_id: program.id(), }; Ok(close_ix) } //! time-based authentication. The client send the current time (must be monotonic and unique) together with MAC code for verification use std::sync::atomic::{AtomicU64, ...
Rust
0
ger.warning( f"SIGTERM received. {signum=} {frame=}. Draining requests and shutting down..." ) self.tokenizer_manager.gracefully_exit = True def running_phase_sigquit_handler(self, signum=None, frame=None): logger.error( "Received sigquit from a child process. It usu...
Python
1
import json import bs4 from typing import List from utils import FileUtils from core.parser_module import YomitanParser from config import DictionaryConfig class ShinjigenParser(YomitanParser): def __init__(self, config: DictionaryConfig): super().__init__(config) self.dict_data = FileUtils.load...
Python
1
ListWidget::item { border-bottom: 1px solid #eee; height: 80px; } QListWidget::item:selected { background-color: #e3f2fd; } """) self.accountListWidget.setAlternatingRowColors(True) # 添加滚动条 scroll_area =...
Python
1
# -*- coding: utf8 -*- # This file is part of PYBOSSA. # # Copyright (C) 2015 Scifabric LTD. # # PYBOSSA is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
Python
1
..Default::default() }; pps.dependent_slice_segments_enabled_flag = bs.get()?; pps.output_flag_present_flag = bs.get()?; pps.num_extra_slice_header_bits = bs.get_n(3); pps.sign_data_hiding_flag = bs.get()?; pps.cabac_init_present_flag = bs.get()?; pps.num_...
Rust
0
Variable(s) => format!("var {}", s), Assign { name, value } => format!("assignment {} = {}", name, print_ast(value)), Logic { lh, op, rh } => parenthesize(&format!("{}", op), &[lh, rh]), Call { callee, args } => format!("call {}({})", ...
Rust
0
# Python Security Project (PySec) and its related class files. # # PySec is a set of tools for secure application development under Linux # # Copyright 2014 PySec development team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You...
Python
1
<[u8]> + Display>( db: &sled::Db, tree_name: N, sync: bool, ) -> common_exception::Result<Self> { let t = db .open_tree(&tree_name) .map_err_to_code(ErrorCode::MetaStoreDamaged, || { format!("open tree: {}", tree_name) })?; ...
Rust
0
# -*- coding: utf-8 -*- # Copyright (C) 2012-2018 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed ...
Python
1
# 1052. Grumpy Bookstore Owner # There is a bookstore owner that has a store open for n minutes. Every minute, some number of customers enter the store. You are given an integer array customers of length n where customers[i] is the number of the customer that enters the store at the start of the ith minute and all thos...
Python
1
AT_FDCWD); pub fn from_raw(n: i32) -> FdNumber { FdNumber(n) } pub fn raw(&self) -> i32 { self.0 } } impl fmt::Display for FdNumber { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "fd({})", self.0) } } pub enum SeekOrigin { SET, CUR, ...
Rust
0
from scapy.all import * from ccsds_base import CCSDSPacket class DS_HK_TLM_PKT_TlmPkt(Packet): """DS application housekeeping packet app = DS command = HK_TLM_PKT msg_id = DS_HK_TLM_MID = 0x08b8 = 0x0800 + 0x0b8 """ name = "DS_HK_TLM_PKT_TlmPkt" fields_desc = [ # APPEND_ITEM CMD_V...
Python
1
default_initial_settings = { "name": "Lotmaxx SC-20", "manufacturer": "Lotmaxx", "start_gcode": "; SC-20 Custom Start G-code\nG28 ; Home all axes\nG92 E0 ; Reset Extruder\nG1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed\nG1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position\nG1 X0.1 Y200...
Python
1
handler pub(crate) fn handle_cmd(matches: &ArgMatches) -> Result<()> { match matches.subcommand() { ("create", Some(matches)) => commands::create::handle_cmd(matches), ("read", Some(matches)) => commands::read::handle_cmd(matches), ("update", Some(matches)) => commands::update::handle_cmd(m...
Rust
0
lues = StatTestModel.objects.aggregate(regrsxx=RegrSXX(y="int2", x="int1")) self.assertEqual(values, {"regrsxx": 2.0}) def test_regr_sxy_general(self): values = StatTestModel.objects.aggregate(regrsxy=RegrSXY(y="int2", x="int1")) self.assertEqual(values, {"regrsxy": -2.0}) def test_reg...
Python
1
########################################################################## # # Copyright (c) 2018, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistribu...
Python
1
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-LOG 蓝鲸日志平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-LOG 蓝鲸日志平台 is licensed under the MIT License. License for BK-LOG 蓝鲸日志平台: ------------------------------------------------...
Python
1
_0); move_and_assert_list_state!(app, Movement::Forward(1), POS_3_BEGIN); move_and_assert_list_state!(app, Movement::Forward(1), POS_3_MATCH_0_0); move_and_assert_list_state!(app, Movement::Forward(1), POS_3_MATCH_1_0); move_and_assert_list_state!(app, Movement::Forward(1), POS_4_BEGIN);...
Rust
0
from typing import Optional, Union, Dict, Any, List from reflex import Component, Var from ..base import AntdComponent, ContainVar, JsValue, ReactNode class Card(AntdComponent): tag = 'Card' actions: Var[ContainVar] active_tab_key: Var[str] bordered: Var[bool] cover: Var[ReactNode] default_...
Python
1
import unittest from tests import TEST_CLIENT from feldera import PipelineBuilder class TestPipelineBuilder(unittest.TestCase): def test_connector_orchestration(self): sql = """ CREATE TABLE numbers ( num INT ) WITH ( 'connectors' = '[ { ...
Python
1
def run_money_prediction(self, website_news="null"): today = get_today() # 资金侧预测 for char in MONEY_PREDICTON_HEADER.render(today=today): yield char # step 1: get screenshots directory = self.gs_obj.get_all_screenshots("money") ocr_response_list = [] ...
Python
1
, f_y + f_h), vector: Vector2D { x: 0., y: -f_h }, }, Segment { point: (f_x + f_w, f_y), vector: Vector2D { x: -f_w, y: 0. }, }, ] } fn collision_from_side(&self, id: usize) -> Option<CollisionSide> { match id {...
Rust
0
le_positions(sim, height, meters_per_pixel) xyz_local = transform_points(xyz, np.array(T.inverted())) xz_local = xyz_local[:, [0, 2]] mask = np.ones([xyz.shape[0]], dtype=bool) if region is not None: mask2 = np.logical_and(xz_local >= region.min, xz_local <= region.max) mask2 = np.all(ma...
Python
1
import re import streamlit as st from config.country_code import COUNTRIES from config.analysis_options import ANALYSIS_OPTIONS from config.country_code import country_to_country_code from utils.loading import loading_wait from streamlit_echarts import st_echarts from streamlit_lottie import st_lottie_spinner def d...
Python
1
from textual.app import App, ComposeResult from textual.widgets import DirectoryTree class DirectoryTreeApp(App): def compose(self) -> ComposeResult: yield DirectoryTree("./") if __name__ == "__main__": app = DirectoryTreeApp() app.run()
Python
1
stringify!(ClearValue__bindgen_ty_1), "::", stringify!(b) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<ClearValue__bindgen_ty_1>())).a as *const _ as usize }, 12usize, concat!( "Offset of field: ", stringify!(ClearValue__bindgen...
Rust
0
print(f"Training steps: {BASE_CONFIG['steps']}") print(f"Device: {BASE_CONFIG['device']}") all_results = [] for seq_len in SEQUENCE_LENGTHS: result = run_for_sequence_length(seq_len) all_results.append(result) # Create comparison plot plot_comparison(all_results) ...
Python
1
wdur_target = paddle.zeros(shape=shape, dtype=pdur_target.dtype).put_along_axis( axis=1, indices=ph2word, values=pdur_target, reduce="add" )[:, 1:] pdur_align = self.rr(pdur_pred, ph2word=ph2word, word_dur=wdur_target) accurate = paddle.abs(x=pdur_align - pdur_target) <= pdur...
Python
1
Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudnnBackendAttributeType_t { CUDNN_TYPE_HANDLE = 0, CUDNN_TYPE_DATA_TYPE = 1, CUDNN_TYPE_BOOLEAN = 2, CUDNN_TYPE_INT64 = 3, CUDNN_TYPE_FLOAT = 4, CUDNN_TYPE_DOUBLE = 5, CUDNN_TYPE_VOID_PTR = 6, CUDNN_TYPE_CONVOLUTION_MODE = 7, CUDNN...
Rust
0
#!/usr/bin/env python3 """ Test sprawdzający, czy AI z fog of war poprawnie wykrywa tylko widoczne jednostki. """ import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) from engine.engine import GameEngine from engine.player import Player from engine.token import Token from main_ai_vs_h...
Python
1
9-advanced-features/listing-19-19/src/main.rs trait Animal { fn nom_bebe() -> String; } struct Chien; impl Chien { fn nom_bebe() -> String { String::from("Spot") } } impl Animal for Chien { fn nom_bebe() -> String { String::from("chiot") } } fn main() { println!("Un bébé chie...
Rust
0
t log = slog::Logger::root(drain, o!("version" => doxidize_version)); // skip the program name let args: Vec<String> = env::args().skip(1).collect(); let config = Config::default(); if args.len() == 0 { doxidize::ops::init(&config, &log).expect("could not init docs"); } else if args[0] ==...
Rust
0
.map_err_as_cause(|| SshErrorDetail::SocketDir) }); done_rx.await.unwrap()?; Ok(()) } pub async fn get(&mut self, dest: &SshDest) -> SshResult<SshSessionRef> { let key = dest.to_id_string(); if let Some(s) = self.cache.get_mut(&key) { return Ok(s.clone()); ...
Rust
0
requires texture updates to be aligned to 4x4 texel /// boundaries (e.g. WebGL), this should be set to `true`. /// /// Defaults to `false` /// /// See rusttype docs for `rusttype::gpu_cache::Cache` pub fn gpu_cache_align_4x4(mut self, b: bool) -> Self { self.$...
Rust
0
label_widget.setText(_("controller_tab.adjust_step") + ":") # 更新命令控制复选框文本 self.enable_gui_commands_checkbox.setText(_("controller_tab.enable_gui_control")) self.enable_panel_commands_checkbox.setText(_("controller_tab.enable_soundpad")) # 更新当前通道显示 ...
Python
1
spawn_handle_local( self, actor: A, exec: & dyn LocalSpawnHandle< MailboxEnd<A> > ) -> Result< (Addr<A>, JoinHandle< MailboxEnd<A> >), ThesErr > { let (addr, mb) = self.build(); let fut = mb.start_local( actor ); let handle = exec.spawn_handle_local( fut ) .map_err( |src| ThesErr::Spawn{ info: addr.inf...
Rust
0
lonky2_field::extension_field::algebra::ExtensionAlgebra; use plonky2_field::extension_field::{Extendable, FieldExtension}; use plonky2_field::field_types::Field; use plonky2_field::packed_field::PackedField; use crate::hash::hash_types::{HashOut, HashOutTarget, RichField}; use crate::iop::ext_target::{ExtensionAlgebr...
Rust
0
''' The only purpose of this script is comparing with the original ImageNet-C and CIFAR-C corruptions and making sure that the images look similar and accuracies look similar. ''' # Format: old_name: (new_name, cfg_sev_1, cfg_sev_2, ... cfg_sev_5) _snow_params = [ (0.1, 0.2, 1, 0.6, 7, 0.95), (0.1, 0.2, 1,...
Python
1
c = "0x210 - Device Endpoint Transfer Size Register \\[ISO\\]"] #[inline(always)] pub fn doeptsiz_iso(&self) -> &DOEPTSIZ_ISO { unsafe { &*(((self as *const Self) as *const u8).add(528usize) as *const DOEPTSIZ_ISO) } } #[doc = "0x210 - Device Endpoint Transfer Size Register \\[ISO\\]"] #[inl...
Rust
0
def reverse_string(s): return s[::-1] def capitalize_string(s): return s.capitalize
Python
1
from collections import defaultdict, deque def potion_mixing_simulation(): test_cases = int(input()) results_list = [] for case in range(test_cases): num_potions, num_available = map(int, input().split()) potion_costs = list(map(int, input().split())) final_costs = [0] * num_potion...
Python
1
# Copyright (c) Owkin, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """Standard MLP module implementation for MIL aggregation models.""" from typing import Optional, List import torch class MLP(torch.nn.Sequent...
Python
1
i_commit::BitCommitCliOpts; use cli_commit_tree::BitCommitTreeCliOpts; use cli_config::BitConfigCliOpts; use cli_log::BitLogCliOpts; use cli_ls_files::BitLsFilesCliOpts; use cli_merge::BitMergeCliOpts; use cli_merge_base::BitMergeBaseCliOpts; use cli_reflog::BitReflogCliOpts; use cli_reset::BitResetCliOpts; use cli_rev...
Rust
0
specific buckets, there is a chance our node doesn't // exist if the first few buckets asked for. println!( "Query with found {} peers. Total peers were: {}", found_nodes.len(), expected_node_ids.len() ); assert!(found_nodes.len() <= expected_node_ids.len()); } #[tokio::test] as...
Rust
0
bits(location) }); flash.cr.write(|w| { w.per().set_bit(); w.strt().set_bit() //w.bits(0x42) }); asm::nop(); while flash.sr.read().bsy().bit_is_set() {} if flash.sr.read().eop().bit_is_set() { flash.sr.write(|w| { ...
Rust
0
Hctsiz7 { register: VolatileCell<u32>, } #[doc = "OTG_FS host channel-7 transfer size register"] pub mod fs_hctsiz7; <reponame>krampenschiesser/ragnar pub mod todo; pub mod app; pub mod filter; pub mod input;<gh_stars>0 use crate::{uDebug, uWrite, Formatter}; macro_rules! tuple { ($($T:ident),*; $($i:tt),*) =>...
Rust
0
return backbone class _BaseSettings(BaseSettings): model_config = SettingsConfigDict(env_file='.env', extra='ignore') class InferenceSettings(_BaseSettings, ModelArgs): output_path: str = Field(description='directory to save inference results') input_path: str = Field(description='dcm file or direc...
Python
1
= CONST_DEPRECATED; } } bitflags! { /// Represents the result of a function. pub struct ZendResult: i32 { const Success = 0; const Failure = -1; } } /// Valid data types for PHP. #[repr(C, u8)] #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub enum DataType { Undef...
Rust
0
ate: None, country: None, lat: 12.34, lon: 56.78, }; let text = "City: Monteiro Coordinates: Latitude: 12.34 Longitude: 56.78"; assert_eq!(location.to_string(), text); } #[test] fn location_query_responses_display() { let json = "[ ...
Rust
0
ldren_sorted); } } } fn sort_children_by_position<'a>( parent: NodeId, node_hierarchy: &NodeHierarchy, rectangles: &NodeDataContainer<DisplayRectangle<'a>>, ) -> Vec<NodeId> { use azul_css::LayoutPosition::*; let mut not_absolute_children = parent .children(node_hierarchy) ...
Rust
0
Quote>; type ExtraInfo = (); fn walk_var(n: Name, _: &LazyWalkReses<Self>) -> Result<Value, ()> { let n_sp = &n.sp(); Ok(val!(ast (vr n_sp))) } fn walk_atom(n: Name, _: &LazyWalkReses<Self>) -> Result<Value, ()> { let n_sp = &n.sp(); Ok(val!(ast n_sp)) } fn get_w...
Rust
0
1_1` VK_FORMAT_G16_B16R16_2PLANE_420_UNORM = 1000156030, /// Provided by `VK_VERSION_1_1` VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM = 1000156031, /// Provided by `VK_VERSION_1_1` VK_FORMAT_G16_B16R16_2PLANE_422_UNORM = 1000156032, /// Provided by `VK_VERSION_1_1` VK_FORMAT_G16_B16_R16_3PLANE_44...
Rust
0
else { }; }*/ unimplemented!(); } fn world_to_body_q(body: &Body, position: &Vector3, rotation: &Quaternion) -> SpatialVector { unimplemented!() } fn world_to_body_qd(body: &Body, velocity: &Vector3, angular_velocity: &Vector3) -> SpatialVector { unimpleme...
Rust
0
# # Copyright (c) 2024 Airbyte, Inc., all rights reserved. # from source_chargebee import SourceChargebee def test_source(): assert SourceChargebee()
Python
1
=> (transactions.len() - (n as usize)).., }; for transaction in transactions.get(range).unwrap() { // ledger-cli journal format: https://www.ledger-cli.org/3.0/doc/ledger3.html#Journal-Format println!( r#" {} * {} {:76}{} CAD ??? "#, transaction.date.format("%Y...
Rust
0
from matplotlib_venn import venn2 from matplotlib import pyplot as plt # depict venn diagram venn2(subsets = (50, 10, 7), set_labels = ('Group A', 'Group B')) plt.title("Venn Diagram") plt.show() # depict venn diagram without disproportionate sizes """from matplotlib_venn import venn2_unweighted venn2_unweig...
Python
1
# 아래와 같은 재귀 방식은 시간복잡도가 2^n 이라서 시간 초과.. class Solution: def wordBreak(self, s, wordDict): def recurse(start): if start == len(s): return True for end in range(start + 1, len(s) + 1): if s[start:end] in wordDict and recurse(end): retu...
Python
1
# Copyright 2023 Google # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
Python
1
(), None); assert_eq!(*level.state(), 1); assert!(level.sublevels().is_empty()); let lod = LOD::new(2, 1, 4); let root = lod.root(); let level = lod.level(root).clone(); assert_eq!(level.sublevels().len(), 4); for root2 in level.sublevels() { let level2 = lod.level(*root2).clone(); ...
Rust
0
from django.urls import path from . import views urlpatterns =[ path('', views.index, name='index'), path('daraja/stk_push', views.stk_push_callback, name='stk_push_callback'), ]
Python
1
#Q1 Write a program to create a dictionary of Hindi words with values as their English # translation. Provide user with an option to look it up! dict={"panni":"water", "keli":"banana", "dhud":"milk"} a = input("enter the hindi word:") print(dict.get(a, "Word not found in dictionary.")) #Q2 Write a progra...
Python
1
def foo(e): f""" {'.'.join(e)}""" def bar(e): f"{'.'.join(e)}" def baz(e): F""" {'.'.join(e)}"""
Python
1
ut time = winnt::LARGE_INTEGER::default(); unsafe { check_bool!(QueryPerformanceCounter(&mut time)); *time.QuadPart() as f64 / *frequency.QuadPart() as f64 } } interfaces! { #[uuid("06152247-6f50-465a-9245-118bfd3b6007")] unsafe interface ID2D1Factory: IUnknown { fn ReloadSystem...
Rust
0
import torch def calculate_l1_error(x: torch.Tensor, full_x: torch.Tensor) -> float: return torch.abs(x - full_x).mean().item() def calculate_l2_error(x: torch.Tensor, full_x: torch.Tensor) -> float: return torch.sqrt(torch.mean((x - full_x) ** 2)).item() def calculate_relative_l1_error(x: torch.Tensor, f...
Python
1
{ #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, LFXOMODE_A> { use crate::Variant::*; match self.bits { 0 => Val(LFXOMODE_A::XTAL), 1 => Val(LFXOMODE_A::BUFEXTCLK), 2 => Val(LFXOMODE_A::DIGEXTCLK), ...
Rust
0
nal logic were added to the frontend DictPlugin to spy on # marimoValueUpdateEvents of children), and in any case will not # trigger cells that ref the dictionary to run, leading to confusion elements = {key: element._clone() for key, element in elements.items()} self._label = label ...
Python
1
import sys sys.stdin = open('input18311.txt') def DFS(s, V): #시작하는 정점의 값, 노드의 개수 -> 내가 원하는 정점들이 방문했는지 확인 필요 visited = [False] * (V+1) stack = [] visited[s] = True #방문 함 now = s #현재의 값 구별 global result #될라나 result = [] result.append(now) while True:# 다음 노드 for next in adjL[no...
Python
1
import role import event import random import llm ''' 开发方向: 属性:AI、用户的印象及其属性 ====可能需要固定属性和可变属性,比如:地点、心情、时间等等 记忆:需要做好总结模块 判断:应该需要专门微调 思维链:逻辑先后行为的专门微调 ====不用微调也有一点样子的,但是需要形成链条,影响决策还是任重道远,或许可以加入”上一刻、上几刻想法“之类的 系统、用户交互:作为行为、描述等设定的内容,需要剧本、节点等设定 ''' # 资源载入 user_role = role.character_list[0] ai_role = role.character_list[1] # ...
Python
1
4,// MVEX_Vloadunpackhd_zmm_k1_mt 0x4644_00D4,// MVEX_Vloadunpackhq_zmm_k1_mt 0x4614_00D4,// MVEX_Vpackstorehd_mt_k1_zmm 0x4654_00D4,// MVEX_Vpackstorehq_mt_k1_zmm 0x4604_00D5,// MVEX_Vloadunpackhps_zmm_k1_mt 0x4644_00D5,// MVEX_Vloadunpackhpd_zmm_k1_mt 0x4614_00D5,// MVEX_Vpackstorehps_mt_k1_zmm 0x4654_00D5,// ...
Rust
0
from llmebench.datasets.dataset_base import DatasetBase from llmebench.tasks import TaskType class ArSASDataset(DatasetBase): def __init__(self, **kwargs): super(ArSASDataset, self).__init__(**kwargs) @staticmethod def metadata(): return { "language": "ar", "citati...
Python
1
task in cfg.TASKS.TASKS) else: tasks = all(task in annotation for task in cfg.TASKS.TASKS) if not cfg.REGIONS.ENABLE: return tasks elif cfg.REGIONS.LEVEL == 'detection': return tasks and ('bbox' in annotation) elif cfg.REGIONS.LEVEL == 'segmentation': return tasks and ('...
Python
1
y, marker='$' + str(i) + '$', color='black') plt.title("User Locations -- 3 Bottom-Up Clusters, Min") plt.xlabel("blocks east of city center") plt.ylabel("blocks north of city center") # plt.show() plt.savefig('im/bottom_up_clusters_min.png') plt.gca().clear() plt.close(...
Python
1
other: XYZ<f32>) -> XYZ<f32> { self.x_axis .mul_scalar(other.x) .add(self.y_axis.mul_scalar(other.y)) .add(self.z_axis.mul_scalar(other.z)) .into() } #[inline] fn transform_float4_as_point3(&self, other: __m128) -> __m128 { let mut res = self...
Rust
0
async fn test_accept() -> Result<(), Error> { let mut cqrs = setup_cqrs().await?; let command = Accept { id: mock::DISPATCHID.to_string(), dispatcher: mock::DISPATCHER.to_string(), _query: None, }; let result = cqrs.execute(command, HashMap::new()...
Rust
0
###################################################################### # MITTELMAN PDLP ablate improvements (JOIN DEFAULT) df_default_mittelmann = pd.read_csv( os.path.join(CSV_DIR, "mittelmann_pdhg_enhanced_100k.csv") ) df_default_mittelmann = fill_in_missing_problems( df_default_mittelmann, mittelmann_insta...
Python
1
#!/usr/bin/env python """ Simple test script to verify Celery tasks are working. Run this from the Django project directory. """ import os import sys import django # Add the project directory to the Python path sys.path.append(os.path.dirname(os.path.abspath(__file__))) # Set up Django os.environ.setdefault("DJANGO_...
Python
1
ANCE1_EXTENSION_NAME: &'static [u8; 20usize] = b"VK_KHR_maintenance1\0"; pub const VK_KHR_device_group_creation: u32 = 1; pub const VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION: u32 = 1; pub const VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME: &'static [u8; 29usize] = b"VK_KHR_device_group_creation\0"; pub const VK_MAX_...
Rust
0
print('Done.') else: annotation_train_path = f'{src}/ade20k_instance_train' annotation_val_path = f'{src}/ade20k_instance_val' print('Preparing ADE20K instance annotations ...') print( f'Creating instance annotations to {annotation_train_path} and {annotation_val_pat...
Python
1
14, super::get_score(938, "COLIN")); } } //! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_713" #[allow(unused)] use super::rsass; // From "sass-spec/spec/libsass-closed-issues/issue_713/and.hrx" // Ignoring "and", error tests are not supported yet. // From "sass-spec/spec/libsass-closed-...
Rust
0
} } async fn run(mut self) -> Result<LoopExit, Error> { let (mut refresh_preempt, mut refresh) = crate::util::preemptible_interval(self.cfg.refresh_interval); let (mut rescan_preempt, mut rescan) = crate::util::preemptible_interval(self.cfg.rescan_interval); refr...
Rust
0
""" Qick code for noise experiments """ from qick import asm_v2, QickConfig from spinqick.models import dcs_model from spinqick.core.qick_utils import Mode, Waveform def grab_noise( soccfg: QickConfig, config: dcs_model.DcsConfig, demodulate: bool | None = None, readout_tone: bool | None = None, ...
Python
1
@property def output_module_weight(self) ->Tensor: return self.net.fc.weight.detach()
Python
1
""" Write a python function to count the number of non-empty substrings of a given string. assert number_of_substrings("abc") == 6 """ def number_of_substrings(string): """ :param string: string to find substrings of :return: number of non-empty substrings of the given string """ if len(string) == 0...
Python
1
def edit_distance_with_actions(str1, str2): m = len(str1) n = len(str2) # Create a 2D table to store the distance values table = [[0] * (n + 1) for _ in range(m + 1)] # Initialize the first row and the first column for i in range(m + 1): table[i][0] = i # Deleting all characters from ...
Python
1
rn: """ add_article_dict = add_in.dict() add_article_dict['create_time'] = int(time.time()) add_article_dict['update_time'] = int(time.time()) query = article_table.insert().values(**add_article_dict) return await db.execute(query) async def edit(self, edit_in: Artic...
Python
1
ser(id: Union[int, str]) -> MessageSegment: """推荐好友""" return MessageSegment( type=MessageSegmentType.CONTACT, data={ "type": "qq", "id": str(id) } ) @staticmethod def contact_group(id: Union[int, str]) -> MessageSe...
Python
1
GS: nlopt_algorithm = 11; pub const nlopt_algorithm_NLOPT_LN_PRAXIS: nlopt_algorithm = 12; pub const nlopt_algorithm_NLOPT_LD_VAR1: nlopt_algorithm = 13; pub const nlopt_algorithm_NLOPT_LD_VAR2: nlopt_algorithm = 14; pub const nlopt_algorithm_NLOPT_LD_TNEWTON: nlopt_algorithm = 15; pub const nlopt_algorithm_NLOPT_LD_TN...
Rust
0
me, Local}; use async_trait::async_trait; use gurufocus_api as gfapi; use super::{MarketQuoteError, MarketQuoteProvider}; use finql_data::{CashFlow, Currency, Quote, Ticker, date_time_helper::{ date_time_from_str_american, date_from_str, unix_to_date_time, naive_date_to_date_tim...
Rust
0
_level_need_days_list[user_datas["user_datas"]["level"]] back["level"] = user_datas["user_datas"]['level'] back["check_in_days"] = user_datas["user_datas"]['check_in_days'] back["next_level_need_days"] = next_level_need_days return back @api.route("/praise_user", methods=['POST']) @log...
Python
1
13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, ] .into(), }), Attribute::DataArray(DataArray { name: String::from("vectors"), ...
Rust
0
} // sort the values for (_key, values) in &mut map { values.sort(); } if !normalize { return keys.into_iter() .map(|key| { let (median, error) = compute_median_and_error(&map[&key]); Measurement { commit: key.0, ...
Rust
0
from aiogram import types from bot.dispatcher import dp, bot from bot.inline_buttons.categories import category_button, subcategory_button async def category_list_handler(message: types.Message): await message.answer("Kategorialar 📂", reply_markup=category_button()) async def back_to_categories(query: types.C...
Python
1
#[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebglDepthTexture`*"] pub type WebglDepthTexture; } impl WebglDepthTexture { #[doc = "The `WEBGL_depth_texture.UNSIGNED_INT_24_8_WEBGL` const."] #[doc = ""] #[doc = "*This API requires the following crate feat...
Rust
0