text
string
label_name
string
labels
int64
0, }; let fd4 = FileDesc { path: PathBuf::from("crate-D"), name: "crate-D".to_string(), size: 6, }; let fd5 = FileDesc { path: PathBuf::from("crate-E"), name: "crate-E".to_string(), size: 4, }; let li...
Rust
0
s : &[TypeCode] = if all_typecodes.contains(&typecode) { this_typecode } else { &all_typecodes }; let formula = grammar.parse_formula(&mut symbols.into_iter().skip(1), &typecodes, nset).map_err(|diag| format!("Could not parse formula: {:?} ({}) {}", diag, subst, as_str(nset.atom_name(typecode))))?; ...
Rust
0
# align with orignal github implementation task = v['task'] grade = v['grade'] subject = v['subject'] topic = v['topic'] category = v['category'] skill = v['skill'] lecture = v['lecture'] solution = v['solution'] split = v['split'] indexe...
Python
1
import torch import torch.nn as nn import torch.nn.functional as F from collections import defaultdict import numpy as np class sparseMoEWithMonitoring(nn.Module): def __init__(self, input_dim, hidden_dim, num_experts=8, top_k=2): super().__init__() self.num_experts = num_experts self.top_k...
Python
1
print('(1) Cilindro') print('(2) Carterciano') print('(3) Esferica') robot =input('Seleccione el robot que desea conocer:\n') if robot == '1': print ("Elegiste cilindrico: ") print("Este robot posee tres articulaciones una rotacional y dos prismaticas") elif robot == '2': print("Elejiste cartesiano: ") ...
Python
1
(); let go: Box<GameObject> = Box::new(GameObject{ tag: tag.to_string(), pos: graphics::Point2::new(0.0, 0.0), comp_to_add: HashMap::new(), //components: Vec::new(), }); //ecs.add_game_object(id, go) //GAME_OBJECTS.lock().unwrap(...
Rust
0
rate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [image_...
Rust
0
import types from copy import deepcopy def flat_generator(list_of_lists): list_copy = deepcopy(list_of_lists) list_ = list_copy while len(list_copy) > 0: if isinstance(list_[0], list): if len(list_[0]) == 0: list_.pop(0) ...
Python
1
'a> { /// Path is the URL path to use for the current proxy request to node. pub path_: Option<&'a str>, } // Generated from operation connectCoreV1GetNodeProxy impl Node { /// connect GET requests to proxy of Node /// /// # Arguments /// /// * `name` /// /// name of the NodePr...
Rust
0
posiadacza dowodu szczepienia, names: String, // pierwszaLiteraNazwiska – pierwsza litera nazwiska posiadacza dowodu szczepienia, first_surname_letter: char, // skroconaDataUrodzenia – skrócona data urodzenia posiadacza dowodu szczepienia, short_birthdate: NaiveDate, // dataWaznosciDowodu – dat...
Rust
0
5: FIX 1 ///| D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | ///| -- | -- | PWM | LED | MDT | EPF | pub fn color_control( CMD2: &Command2Selection, PWM: PWMPolarity, LED: LEDPolarity, MDT: PixelPinout, EPF...
Rust
0
s the subcrates to get a directory that we can serve. Returns an exit code. pub fn build(dir: PathBuf, prog_args: &[String]) -> Result<i32> { // TODO support watching files // If we should watch for file changes, do so let should_watch = prog_args.get(1); let dflt_watch_path = ".".to_string(); let _...
Rust
0
expressions::{call_expr::CallExpr, index_expr::IndexExpr, infix_expr::InfixExpr}, NodeRef, }, lexer::token::token_type::TokenType, parser::precedence::Precedence, }; use super::{error::ParseError, ParseResult, Parser}; use crate::precedence; pub(super) fn parse_infix_expression(parser: &mut Parse...
Rust
0
0b\xff\xa3f\xe1\xbf58\x05gO\xb8A\x1b\ *];\xca\x8c\xad\xf1\xbaIK\xae]\xed\xb4\xb5\xa7\ \xc7\xa0\xe9W\x00h\x18muxS\x0a\xbd80,\ \x1a8\xec\x19\x8f\xef\x19\xad\xf4\x7fq/\xa9\xcaE\xc9\ \x1bD\x02\x02\x9b\xea\x9d\xe2\xddq*5q\x9c\x04\x1c\ \x12\xc7\x13\xe8!<\x89\xb0*N\x18\xb3\xaf\x9a\x15\xff\ ~\x0d\x9c\xa8\x9a~po`A`\xad\x087\xc6...
Python
1
const CHOWN = np::ACL_CHANGE_OWNER; /// SYNCHRONIZE permission (unsupported). #[cfg(any(docsrs, target_os = "macos", target_os = "freebsd"))] #[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] const SYNC = np::ACL_SYNCHRONIZE; /// NFSv4 READ_DATA permission. #[cfg(an...
Rust
0
insert("test_db".into(), Value::Table(test_db_opts.clone())); test_db.insert("test_db_2".into(), Value::Table(test_db_opts)); let config = Config::build(Environment::Development) .extra("databases", Value::Table(test_db)) .finalize() .unwrap(); let mut rocket...
Rust
0
import glob from moviepy.editor import VideoFileClip, clips_array import os from pathlib import Path import time import tkinter as tk from tkinter import filedialog def main(): # Counter start = time.time() # Define working directory wdir = Path(os.getcwd()) # Create a tkinter root window (it won...
Python
1
M = int(input()) N = int(input()) if N == 0: print(0) else: os_list = [(i, tuple(map(int, input().split()))) for i in range(N)] os_list.sort(key=lambda x: (x[1][0], x[1][1])) res = set() curr_os = os_list[0] for os_i in range(1, N): if curr_os[1][1] < os_list[os_i][1][0]: r...
Python
1
from collections import deque n, k = map(int, input().split()) queue = deque() for i in range(1, n + 1): queue.append(i) res = [] while queue: for i in range(k - 1): queue.append(queue[0]) queue.popleft() res.append(queue.popleft()) print("<", end="") print(", ".join(map(str, res)), end=...
Python
1
md5::compute(&format_hash(&hash)); } hash } fn find_triplet(hash: &[u8; 16]) -> Option<u8> { // by byte halves // 12 34 // 2==3 and 2==1 or 2==4 for i in 1..hash.len() { if hash[i-1] & 0x0f == hash[i] >> 4 && // 2 == 3 and (hash[i-1] & 0x0f == hash[i-1] >> 4 || // (2 =...
Rust
0
#!/usr/bin/env python3 """ BDC Evaluation Tests Fix AI Orchestrator kullanarak evaluation testlerini düzeltir """ import os import sys import asyncio from pathlib import Path # AI Orchestrator'ı import et ai_orchestrator_path = Path("/Users/mikail/Desktop/ai_orchestrator_complete/ai_orchestrator") sys.path.append(str...
Python
1
hex_literal::hex!("62345ea3ebe299d523ad12da0d534b07306555684de3cadff5f76ef708c0bf6a")), // AccountId::from(hex_literal::hex!("9eabeb2d342c9ad86c79e28c2e8c5da0ff33c8e98071c5af8158b63f749b923f")), // AccountId::from(hex_literal::hex!("0eb2d1ddc3457cd45448b4900205b540c5340e8f87b01dc796d5170a4fb1b80b")), // Accoun...
Rust
0
} } Ok(Some(mem::replace(&mut self.message, String::new())).into()) } } <filename>paintcore/src/prelude.rs pub use crate::canvas::*; pub use crate::clear::*; pub use crate::draw::*; pub use crate::layer::*; pub use crate::pen::*; pub use crate::circle::*; pub use crate::point::*; pub use crate::affi...
Rust
0
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import pprint import sys import importlib.util class Util(object): @staticmethod def join_lists(*args): res = [] for l in args: if isinstance(l, list): res += l return res @staticmethod ...
Python
1
#!/usr/bin/env python3 """Quick Telegram test for live trading""" import asyncio import httpx import os async def test_telegram(): """Test Telegram notification""" telegram_token = "7372873616:AAGKKdOKhJJJJJJJJJJJJJJJJJJJJJJJJJJ" # Replace with actual token chat_id = "5135869709" message = ...
Python
1
import requests import json # prompt的路径 sys_prompt_path = "prompts/basic.txt" with open(sys_prompt_path, "r", encoding="utf-8") as f: sys_prompt = f.read() # 自定义chat History chat_history = [ { "role": "user", "content": sys_prompt }, { "role": "assistant", "content": "好...
Python
1
}, ); let flattened = flatten_with_opts(&env, &merge_opts); assert_eq!( flattened.get(&"mykey".to_string()).unwrap(), &"(Pvalue_1S,Pvalue_2S,Pvalue_3S,Pvalue_4S)".to_string() ); } #[test] fn test_assign_from_string_override() { l...
Rust
0
it_with_output(); assert!(status.success()); assert_eq!(output, Vec::new()); // FIXME #7224 if !running_on_valgrind() { assert_eq!(error, Vec::new()); } }) #[cfg(unix,not(target_os="android"))] pub fn run_pwd(dir: Option<&Path>) -> Process { Proc...
Rust
0
"""Handles conversion between raw audio and Protobuf frames.""" from typing import Optional import protobufs.frames_pb2 as frames_pb2 from meetingbaas_pipecat.utils.logger import logger class ProtobufConverter: """Handles conversion between raw audio and Protobuf frames.""" def __init__(self, logger=logger...
Python
1
int; } extern "C" { /// Get the current state of a button on a joystick. /// /// The button indices start at index 0. pub fn SDL_JoystickGetButton(joystick: *mut SDL_Joystick, button: ::std::os::raw::c_int) -> Uint8; } extern "C" { /// Close a joystick previously opened with...
Rust
0
@is_flaky def test_forward_no_control(self): unet = self.get_dummy_unet() controlnet = self.get_dummy_controlnet_from_unet(unet) model = UNetControlNetXSModel.from_unet(unet, controlnet) unet = unet.to(torch_device) model = model.to(torch_device) input_ = self.dummy_input control_specific_in...
Python
1
import unittest, time, sys, copy sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_glm, h2o_browse as h2b, h2o_import as h2i class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): h2o.init(3,java_heap_GB=4) ...
Python
1
n, k = map(int, input().split()) dp = [[1 for _ in range(i)] for i in range(1, n + 1)] for i in range(2, n): for j in range(1, i): dp[i][j] = dp[i - 1][j - 1] + dp[i - 1][j] print(dp[n - 1][k - 1])
Python
1
r AliasableString { #[inline] fn deref_mut(&mut self) -> &mut str { // SAFETY: `AliasableString` will only ever contain UTF-8. unsafe { str::from_utf8_unchecked_mut(&mut *self.0) } } } impl AsRef<str> for AliasableString { #[inline] fn as_ref(&self) -> &str { &*self } } ...
Rust
0
assert_eq!(part1(&input_generator(EXAMPLE)), 1656); } #[test] fn example_part2() { assert_eq!(part2(&input_generator(EXAMPLE)), 195); } } <gh_stars>0 #[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - CEC control register"] pub cec_cr: crate::Reg<cec_cr::CEC_CR_SPEC>, #...
Rust
0
from wagtail.core.models import Page from developerportal.apps.common.test_helpers import PatchedWagtailPageTests from ..models import ExternalArticle, ExternalEvent, ExternalVideo class ExternalArticleTests(PatchedWagtailPageTests): """Tests for the ExternalArticle model.""" def test_external_article_pare...
Python
1
on_auth("pro@example.com") data = {"ids": [rejected_template_offer.id, other_template_offer.id]} with patch(educational_testing.PATCH_CAN_CREATE_OFFER_PATH): # 1. authentication # 2. load current_user # 3. retrieve all collective_offer_template.ids to batch them in ...
Python
1
import pytest from chuk_virtual_shell.commands.system.whoami import WhoamiCommand from tests.dummy_shell import DummyShell @pytest.fixture def whoami_command(): # Setup a dummy shell. dummy_shell = DummyShell({}) # Set the USER environment variable. dummy_shell.environ = {"USER": "testuser"} retur...
Python
1
# holidays # -------- # A fast, efficient Python library for generating country, province and state # specific sets of holidays on the fly. It aims to make determining whether a # specific date is a holiday as fast and flexible as possible. # # Authors: Vacanza Team and individual contributors (see CONTRIBUTORS f...
Python
1
if let Some(name) = obj_name { format!("{}.{}", name, i) //Ident::new(&format!("{}.{}", name, i), proc_macro2::Span::call_site()) } else { format!("{}", i) //Ident::new(&format!("{}", i), proc_macro2::Span::call_site()) } ...
Rust
0
ol_a) Chem.Kekulize(mol_b) rand_smiles_a = Chem.MolToSmiles( mol_a, canonical=False, doRandom=True, isomericSmiles=False, kekuleSmiles=True, ) rand_smiles_b = Chem.MolToSmiles( mol_b, canonical=False, doRandom=True, isomericSmiles=...
Python
1
populate_fut_lifetimes_on_refs(args: &[Argument]) -> Vec<Argument> { let mut new_args = Vec::new(); for arg in args { let mut new_arg = (*arg).clone(); if let Type::Reference(reference) = &mut new_arg.kind { reference.lifetime = Some(Lifetime::new("'fut", Span::call_site())); ...
Rust
0
okenType", file_descriptor_proto()) }) } } } impl ::std::marker::Copy for MathTokenType { } impl ::std::default::Default for MathTokenType { fn default() -> Self { MathTokenType::TOKEN_ERROR } } impl ::protobuf::reflect::ProtobufValue for MathTokenType { fn as_ref(&self) -...
Rust
0
""" Commands for managing transfers on Put.IO. """ import click import yaml from putio_automator import date_handler from putio_automator.cli import cli @cli.group() def transfers(): pass @transfers.command() @click.pass_context @click.option('--statuses', help='Comma-separated list of statuses to be cancelled'...
Python
1
00, 2500, -2430, 45) ChrSetPos(0x0102, 41080, 2500, -1680, 45) ChrSetPos(0x0107, 40890, 2500, -2710, 45) FadeIn(1000, 0) CameraMove(40870, 2500, -2620, 5000) ChrTalk( 0x0101, ( '#0010080344V#501F哇~天色已经这么暗了。', TxtCtl.Enter, ), ) CloseMessageWi...
Python
1
ndFactor::SRC_ALPHA, dst_alpha_blend_factor: vk::BlendFactor::ONE_MINUS_SRC_ALPHA, alpha_blend_op: vk::BlendOp::ADD, color_write_mask: vk::ColorComponentFlags::R | vk::ColorComponentFlags::G | vk::ColorComponentFlags::B | vk::ColorComponentFlags::A, }; ...
Rust
0
"""辅助函数 """ import os import yaml import scipy import torch import numpy as np from itertools import groupby from scipy.sparse.coo import coo_matrix def create_dir(dir_path): # 生成文件夹 if not os.path.isdir(dir_path): os.makedirs(dir_path) return def load_config(config_file): """加载全局配置 ...
Python
1
R 5nUS:Xa [ S5e[ [R"U5*5S-n [R"USS2U4X&S:[R"USS2U4U 5[R"X&SU 5:H-...
Python
1
, T> { type Item = &'a T; fn next(&mut self) -> Option<Self::Item> { self.next.map(|rc_node| { self.next = rc_node.next.as_ref().map(|node| &**node); &rc_node.data }) } } impl<T: Clone + PartialEq> List<T> { pub fn iter<'a>(&'a self) -> Iter<'a, T> { Ite...
Rust
0
torch.stack( [acc.compute() for acc in self.multiclass_head_accuracy], ), ) if self.multilabel_accuracy is not None: multilabel_acc = self.multilabel_accuracy.compute() return (multiclass_accs + multilabel_acc) / 2 return multiclass_...
Python
1
import xml.etree.ElementTree as ET, os # Function for reading the Extended_Modelmatching.txt def lese_flugzeuge(dateiname): flugzeuge = {} with open(dateiname, 'r') as file: for line in file: split_line = line.strip().split() if len(split_line) == 2: flugzeug, e...
Python
1
:attr:`text` is an :class:`~kivy.properties.StringProperty` and defaults to `''`. """ bold = BooleanProperty(False) """ Should the text inside the badge be bold :attr:`bold` is an :class:`~kivy.properties.BooleanProperty` and defaults to `False`. """ offset = NumericProperty(...
Python
1
# 3 - Cálculo de IMC: # Crie um programa que calcule o Índice de Massa Corporal (IMC). # Peça ao usuário para digitar seu peso e altura, armazene em # variáveis e calcule o IMC. print('------------- IMC --------------') imc = 0 p = float(input('Digite o seu peso: ')) a = float(input('Digite a altura: ')) imc = p / (...
Python
1
import os import sys def make_resources_icons(qt_mode): with open('icons.qrc','w') as f: f.write("""<!DOCTYPE RCC><RCC version="1.0"> <qresource> """) for p, d, files in os.walk('./'): for filename in files: if filename.endswith('.png') or filename.endswith('.jpg') ...
Python
1
response else: logger.warning( f"Received unexpected item type from agent chat stream: {type(output_item)}" ) logger.debug(f"Unexpected item content: {output_item}") except Exception as e: logger.ex...
Python
1
8, pack=False, verbose=False, subtitle=False, api_nproc=4): dataset_name = dataset.dataset_name packstr = 'pack' if pack else 'nopack' rank, world_size = get_rank_and_world_size() result_file = osp.join(work_dir, f'{model_name}_{dataset_name}_{nframe}frame_{packstr}.xlsx...
Python
1
l::{Address, ObjectReference}; use mmtk::AllocationSemantics; use mmtk::Mutator; use mmtk::MMTK; use std::ffi::CStr; use JikesRVM; use JTOC_BASE; use SINGLETON; /// # Safety /// Caller needs to make sure the ptr is a valid vector pointer. #[no_mangle] pub unsafe extern "C" fn release_buffer(ptr: *mut Address) { le...
Rust
0
# https://www.kaggle.com/code/junkoda/limb-darkening import torch import math EPS = 1e-10 def area_torch(R, r, d): d = torch.abs(d) out = torch.zeros((len(d), len(R), len(r)), dtype=torch.float32, device=d.device) d = d[:, :, None] r = r[None, :, None] R = R[None, None, :] cos_alpha = (d *...
Python
1
romMeta for Result<T> { fn from_meta(item: &Meta) -> Result<Self> { Ok(FromMeta::from_meta(item)) } } /// Parses the meta-item, and in case of error preserves a copy of the input for /// later analysis. impl<T: FromMeta> FromMeta for ::std::result::Result<T, Meta> { fn from_meta(item: &Meta) -> Res...
Rust
0
er {{ transform: translateY(-2px); }} .warning {{ background-color: #fff3cd; border: 1px solid #ffeaa7; border-radius: 8px; padding: 16px; margin: 20px 0; ...
Python
1
lized_data.columns].apply( variation ) # Compute the RSD of the normalized target samples normalized_target_variation = normalized_target[ tempserrf.normalized_data.columns ].apply(variation) # Add the index to the RSD DataFrame raw_target_variatio...
Python
1
) print(self.talk[4]) def breath_fire(self): """ Special power of each dragon has :return None but print to program """ print("$@#$#@$") def main(): """:main function running the zoo notes: #line:until line - subquestion """ brownie = Dog("Brownie", 10) ...
Python
1
"cont_rotary_emb": cont_rotary_emb, } #TODO: check if we need to separate the condition_latents and the context_latents if use_condition else {} ), ) #TODO: check if we need to separate the ...
Python
1
from AXA.AXA_Liv_sheet import sheet_axa_liv # Importa la clase sheet_axa desde el archivo AXA_sheet.py, este inicia el sheet y el robot # from previsora.Prev_sheet import sheet_previ#importa la clase sheet_previ deesde el archivo. para iniciar el robot # #from Seguros_del_estado.Estado_Sheet import sheet_estado # from...
Python
1
w = csv.writer(f) w.writerow(["Feature", "Importance"]) for idx in feature_idxs: w.writerow([X.columns[idx], best_rf.feature_importances_[idx]]) # plot features for feature in best_features: fig, ax = plt.subplots(figsize=(5, 5)) sns.boxplot( data=X_g...
Python
1
shaderInt16: 0, shaderResourceResidency: 0, shaderResourceMinLod: 0, sparseBinding: 0, sparseResidencyBuffer: 0, sparseResidencyImage2D: 0, sparseResidencyImage3D: 0, sparseResidency2Samples: 0, ...
Rust
0
import json from scirex.models.clustering.clustering import do_clustering import tqdm import sys def predict(coreference_scores_file, output_file, coreference_threshold): ''' coreference_scores_file (jsonl) - { 'doc_id' : str, 'pairwise_coreference_scores' : List[(s_1, e_1), (s_2, e_2), fl...
Python
1
f32, pub f32, pub f32); #[repr(simd)] #[derive(Copy, Clone, PartialEq, Debug)] pub struct b8x4(pub i8, pub i8, pub i8, pub i8); extern "platform-intrinsic" { fn simd_select<T, U>(x: T, a: U, b: U) -> U; } // CHECK-LABEL: @select #[no_mangle] pub unsafe fn select(m: b8x4, a: f32x4, b: f32x4) -> f32x4 { // CH...
Rust
0
# Faça um programa que use um laço while para exibir os # primeiros 20 termos da sequência de Fibonacci. # 3 - Sequência de Fibonacci: a = 1 b = 1 while n < 20:
Python
1
import requests from bs4 import BeautifulSoup def get_novel_chapters(): root_url = "https://www.readnovel.com/book/12110374803718803" r = requests.get(root_url) # print(r.status_code) if r.status_code == 200: print("request success!!!") else: # 如果状态码不等于200,执行这里的代码 print(...
Python
1
(super) mod publish_jig; pub(super) mod state; <reponame>omnitrogen/beta-gouv-jobs-notif use atom_syndication::Feed; use std::error::Error; pub fn get_atom_feed(beta_gouv_jobs_feed: &str) -> Result<Feed, Box<dyn Error>> { let url = beta_gouv_jobs_feed; let res = reqwest::blocking::get(url)?.bytes()?; let...
Rust
0
_legend: plt.legend(linehandles, legendnames, loc='upper right', bbox_to_anchor=(1.1, 1), borderaxespad=0., numpoints=1 # remove extra m...
Python
1
n个Bottleneck :params shortcut: bool Bottleneck中是否有shortcut,默认True :params g: Bottleneck中的3x3卷积类型 =1普通卷积 >1深度可分离卷积 :params e: expansion ratio c2xe=中间其他所有层的卷积核个数/中间所有层的输入输出channel数 """ # ch_in, ch_out, number, shortcut, groups, expansion super(BottleneckCSP, self).__init_...
Python
1
free_symbol, value_suggestion) def get_memory_region_size( self, memory_region: MemoryRegion, use_symbolic_value: bool = False ) -> Tuple[Expr, Expr]: if memory_region not in self.__memory_region_sizes: self.__memory_region_sizes[memory_region] = 8 # assume 8 Bytes for unknown size...
Python
1
in video_llm_output and option_sent == video_llm_output.split(") ")[1]): video_llm_pred = option_sent for option_ind in option_inds: if option_ind == video_llm_output or option_ind == video_llm_output.replace(".", ""): video_llm_pred = option_ind if video_llm_pred is None: ...
Python
1
m; while right - left > 1 { let mid = left + (right - left) / 2; // 判定する let mut ok = true; let mut t = vec![0; n]; // 各風船を割るまでの制限時間 for i in 0..n { // そもそも mid が初期高度より低かったら false if mid < h[i] { ok = false; } else { ...
Rust
0
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for # the Earth and Planetary Sciences # Copyright (C) 2012 - 2024 by the BurnMan team, released under the GNU # GPL v2 or later. from burnman.eos.birch_murnaghan import BirchMurnaghanBase as BM3 from burnman.eos.mie_grueneisen_debye import MGD...
Python
1
# -*- coding: utf-8 -*- import numpy as np import cv2 from . import _transform_img from . import _transform_mask from . import _transform_label from . import _transform_label_tri from . import _transform_alpha def _create_seg_plus_input(img, mean_mask, mean_grid_x, mean_grid_y): # Input img = _transform_img(...
Python
1
e in self.clients: await self.clients[name].close() del self.clients[name] del self.tool_groups[name] def get_tool_group(self, name: str) -> MCPToolGroup | None: """获取指定的工具组""" return self.tool_groups.get(name) def get_all_tool_groups(self) -> list[MCPToolGr...
Python
1
erer':'','Accept-Language':'zh-Hans-CN;q=1 en-CN;q=0.9','Accept':'*/*'}#line:80 sign ({"url":f"{OO0OO0000O00O000O}","id":""},'isvObfuscator')#line:81 OOO0O0OO00O0O0O00 =s .post ('https://api.m.jd.com/client.action',verify =False ,timeout =30 )#line:82 if OOO0O0OO00O0O0O00 .status_cod...
Python
1
log::error!("failed to get repo config, {}", err); }, }; errors } pub struct Context { pub github: GithubClient, // pub db_conn: Connection, pub username: String, } pub async fn handle_pr_task( ctx: Arc<Context>, receiver: mpsc::Receiver<PullRequestEvent> , ) -> anyhow::Result<()>...
Rust
0
2177..=2208 => inplace!(2208), 2209..=2240 => inplace!(2240), 2241..=2272 => inplace!(2272), 2273..=2304 => inplace!(2304), 2305..=2336 => inplace!(2336), 2337..=2368 => inplace!(2368), 2369..=2400 => inplace!(2400), 2401..=2432 => inplace!(2432), 243...
Rust
0
/// (when is_first_handler is equal to 1) or append the handler to the handler chain. /// /// # Description /// /// The Intel(R) SGX SDK supports the registration of custom exception handler functions. You can write your own code to /// handle a limited set of hardware exceptions. For example, a CPUID instruction insid...
Rust
0
stance(cell_bw, core_rnn_cell.RNNCell): raise TypeError("cell_bw must be an instance of RNNCell") if not nest.is_sequence(inputs): raise TypeError("inputs must be a sequence") if not inputs: raise ValueError("inputs must not be empty") with vs.variable_scope(scope or "bidirectional_rnn"): # Forwa...
Python
1
''' You have observations of n + m 6-sided dice rolls with each face numbered from 1 to 6. n of the observations went missing, and you only have the observations of m rolls. Fortunately, you have also calculated the average value of the n + m rolls. You are given an integer array rolls of length m where rolls[i] is...
Python
1
from .model_configs import _cfg, default_cfgs from .model_utils import * from .build_models import identityformer_m36, identityformer_m48, identityformer_s12, identityformer_s24, \ identityformer_s36, randformer_s12, randformer_s24, randformer_s36, randformer_m36, randformer_m48, \ poolformerv2_s12, poolformerv...
Python
1
# Copyright 2023 The Qwen team, Alibaba Group. 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...
Python
1
LLAMA_520M_CONFIG_DICT = dict( # Arbitrary small number that won't cause problems when loading. # These param are unused due to custom input layers. vocab_size=8, # default params needed for loading most pretrained 1B weights max_position_embeddings=131072, hidden_size=1024, intermediate_siz...
Python
1
########################################################################### # concatmaps - Tool to concat evemaps # # Copyright (C) 2014-15 Sebastian Meyer (sparrow.242.de+eve@gmail.com ) # # # # This program is free software: you can redistribute it and/or modify # # it under the te...
Python
1
"""Benchmark suites for gpt with manual specifications.""" from collections import namedtuple from benchmark_parallel_utils import BenchmarkCase, UniformParallelArgs # B = batch_size, S = seq_len, H = hidden_size, L = num_layers, V = vocab_size # head = num_heads, # NB = num_micro_batches, PM = parallel_mode # 3D conf...
Python
1
#", "sharp", new_ll) new_ll = re.sub(r"[^a-z]", "", new_ll) #new_ll = re.sub(r"[0-9]", "", new_ll) if new_ll != ll: print(f" {ll} => {new_ll}" + Fore.YELLOW + " - Replaced" + Style.RESET_ALL) rc = re.search(name_filter, new_ll) if rc is not None: print(f...
Python
1
from sqlalchemy.orm import Session from db import models, schemas def get_authors(db: Session, skip: int = 0, limit: int = 50): return db.query(models.DBAuthor).offset(skip).limit(limit).all() def get_author(db: Session, author_id: int): return db.query(models.DBAuthor).filter(models.DBAuthor.id == author_id)...
Python
1
.position.y = display.size().height as i32 / 2; ball.speed_x *= -1; ball.speed_y = 0; score.player(2); } match score.winner() { 1 => { score.reset(); ...
Rust
0
# Copyright 2018 F5 Networks 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 to in writi...
Python
1
"""Pruners.""" # !/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2022 Intel Corporation # # 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/LIC...
Python
1
} const ERROR_INVALID_OPERAND: &str = "無効なオペランドです"; const ERROR_STMT_EXPR_VOID: &str = "voidを返すStatement Expressionはサポートしていません"; match kind { NodeKind::Defun(..) | NodeKind::Block(..) | NodeKind::Return(..) | NodeKind::If(..) | ...
Rust
0
from django.apps import AppConfig class PreguntasRespuestasConfig(AppConfig): default_auto_field = "django.db.models.BigAutoField" name = "src.preguntas_respuestas"
Python
1
l), InjectorInner::Multilevel(q) => q.push(task_cell), } } } /// Popped task cell from a task queue. pub struct Pop<T> { /// The task cell pub task_cell: T, /// When the task was pushed to the queue. pub schedule_time: Instant, /// Whether the task comes from the current [...
Rust
0
00_010, // UCVTF (64/32-bit) IntToFpuOp::U64ToF32 => 0b100_11110_00_1_00_011, // SCVTF (32/64-bit) IntToFpuOp::I32ToF64 => 0b000_11110_01_1_00_010, // UCVTF (32/64-bit) IntToFpuOp::U32ToF64 => 0b000_1...
Rust
0
, 1)): Inliers planes of the line in hessian normal form. line_type (int): Type of the line: 0 -> Discontinuity, 1 -> Planar, 2 -> Edge, 3 -> Intersection. distance (float): Distance of the virtual camera from the line (in meters). Returns: T (numpy array...
Python
1