text
string
label_name
string
labels
int64
import sys import pathlib import importlib.util import types ROOT = pathlib.Path(__file__).resolve().parents[1] SRC = ROOT / "MCPForUnity" / "UnityMcpServer~" / "src" sys.path.insert(0, str(SRC)) # stub mcp.server.fastmcp similar to test_get_sha mcp_pkg = types.ModuleType("mcp") server_pkg = types.ModuleType("mcp.ser...
Python
1
bean.is_err() { //if json decode fail,return '*' return " * ".to_string(); } let v = json!(&bean.unwrap()); if !v.is_object() { //if json decode fail,return '*' return " * ".to_string(); } let m = v.as_object().unwrap(); le...
Rust
0
inline] fn idr_period(&self) -> i32 { let ret = unsafe { sys::cv_cudacodec_EncoderParams_getPropIDR_Period_const(self.as_raw_EncoderParams()) }; ret } /// NVVE_DYNAMIC_GOP, #[inline] fn dynamic_gop(&self) -> i32 { let ret = unsafe { sys::cv_cudacodec_EncoderParams_getPropDynamicGOP_const(self.as_raw_Encode...
Rust
0
_changes_since_as_transport_records(latest_version.get()) .await .unwrap_or_else(throw_err) } else { throw_err(err) } .0 } }; let changelog = records.iter().fold(Changelog::default(), |mut cl, r| { let r...
Rust
0
msg="Label count should have gone up") self.assertEqual( self.get_label('C').verified, False, msg="Verified param should have been ignored") def test_duplicate_requires_permission(self): # Must verify B to make it a candidate for a duplicate pointer label_B = self....
Python
1
,30 Dimension (L, N, d_l) # l_with_v = self.trans_l_with_v(text, visual, visual) # 50,32,30 Dimension (L, N, d_l) # 初级融合 la = self.t2a(text, acoustic, acoustic) lv = self.t2a(text, visual, visual) al = self.a2l(acoustic, text, text) av = self.a2l(acoustic, visual, visua...
Python
1
deserialize(data).expect("can't deserialize an agent message") } } /// Serializable messages to worker #[derive(Serialize, Deserialize, Debug)] enum ToWorker<T> { /// Client is connected Connected(HandlerId), /// Incoming message to Worker ProcessInput(HandlerId, T), /// Client is disconnected ...
Rust
0
). use crate::{DesktopEnv, Platform}; use std::convert::TryInto; use std::ffi::OsString; use std::os::raw::{c_char, c_int, c_uchar, c_ulong, c_ushort}; use std::os::windows::ffi::OsStringExt; use std::ptr; #[repr(C)] struct OsVersionInfoEx { os_version_info_size: c_ulong, major_version: c_ulong, minor_ve...
Rust
0
writeln!(f)?; } writeln!( f, "/// A macro that emits a `match` expr with the given test expression and arms." )?; writeln!(f, "/// The match arms can be annotated with the other conditional compilation macros in this crate so that they're only emitted")?; writeln!(f, "/// i...
Rust
0
a = metadata_anonymization.anonymization(metadata, Anon) clean_data.to_csv(metadata_anonymization_values['anon_metadata_path'], index=False) logging.info('Completed Metadata Anonymization') if __name__=="__main__": log_format = '%(levelname)s %(asctime)s - %(message)s' logging.basicConfig(filename='wo...
Python
1
, similarly to calling `cast()` on it, /// while verifying that the layout of the pointee stays the same after the cast. macro_rules! checked_cast { ($ptr:ident) => {{ let target_ptr = $ptr.cast(); let target = crate::use_libc::Pad::new(core::ptr::read(target_ptr)); // Uses the fact that th...
Rust
0
esh_proxy_state() def on_disable_http_proxy(systray): disable_x_proxy('http') def on_disable_https_proxy(systray): disable_x_proxy('https') def on_disable_ftp_proxy(systray): disable_x_proxy('ftp') def on_disable_socks_proxy(systray): disable_x_proxy('socks') def enable_proxy(ProxyServer): prox...
Python
1
doc.sha_method, value: doc.sha_value, filepath: None, }; Ok(product::ProductMatch::new(the_prod, the_sha)) } // converts the response of product endpoint into ProductMatch struct #[derive(Serialize, Deserialize, Debug)] struct ProductItem { name: String, language: String, prod_key...
Rust
0
n=int(input("inscerisci un numero: ")) l=input("inserisci una lettera: ") for i in range(0,n): print(" "*(n-i) + l*(1+i*2))
Python
1
eval::{eval_as_assignment, RedirectEval, WordEval}; use std::borrow::Borrow; use std::error::Error; /// Represents a redirect or a defined environment variable at the start of a /// command. /// /// Because the order in which redirects are defined may be significant for /// execution (i.e. due to side effects), we wil...
Rust
0
batch_size = clean_features.shape[0] # 添加噪声 noise = torch.randn_like(clean_features) timesteps = torch.randint(0, self.train_scheduler.num_train_timesteps, (batch_size,), device=self.device) timesteps = timesteps.long() noisy_features = self.train_scheduler.a...
Python
1
: debugserver_client_t, enabled: ::std::os::raw::c_int, ) -> debugserver_error_t; } extern "C" { #[doc = " Sets the argv which launches an app."] #[doc = ""] #[doc = " @param client The debugserver client"] #[doc = " @param argc Number of arguments"] #[doc = " @param argv Array starting ...
Rust
0
import os import time from selenium import webdriver if not os.path.exists("ogp"): os.mkdir("ogp") PATHS = { "/?dummy": (959, 500), "/cards/details-of-confirmed-cases": (959, 500), "/cards/number-of-confirmed-cases": (959, 500), "/cards/attributes-of-confirmed-cases": (959, 480), "/cards/numb...
Python
1
ult<&T, SynthesisError> { match self { Some(ref v) => Ok(&v.0), None => Err(SynthesisError::AssignmentMissing), } } fn grab(self) -> Result<T, SynthesisError> { match self { Some(v) => Ok(v.into_inner()), None => Err(SynthesisError::Assign...
Rust
0
ni5, f2g6j4rtpgp as k2d_bt433fv, i8l6o8q22v6, ju2sg1chua9 as gl_lmv6g4rl, qdpgc209opf @False @{zd6laashr2w for c_xrin1k4lo in b'' if gw3b676sc4b if 0} @0.0 is not otl5j4fa4qh def euzewpul7lu(rmlp9fomeuy, kf_g3im3w0n: za5a3ueuxip, ldiqecl4gf7, ybk_zl7w4js, g098kscy_1m: ct47fmt2e4g, clu81nn5q2u: e3uijqj8onf): """# do...
Python
1
const UNIFORM_BUFFER_OFFSET_ALIGNMENT: types::GLenum = 0x8A34; #[allow(dead_code, non_upper_case_globals)] pub const UNIFORM_BUFFER_SIZE: types::GLenum = 0x8A2A; #[allow(dead_code, non_upper_case_globals)] pub const UNIFORM_BUFFER_START: types::GLenum = 0x8A29; #[allow(dead_code, non_upper_case_globals)] pub const UNI...
Rust
0
], ] elif market == 'SE3': select_inputs_list = [ ['Wind_onshore', 'Load', 'Temp', 'Hum'], ['Wind_onshore', 'Load', 'Temp', 'Hum', 'Price_AT_15min'], ['Wind_onshore', 'Load', 'Temp', 'Hum', 'Price_AT_15min', 'Price_DE_LU_15min'], ['Wind_onshore', 'Load', 'Temp', 'Hum', 'Price_AT_...
Python
1
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json class Component: DESCRIPTION = "Assigns a license to a given user" class Input: SKU_ID = "sku_id" USER_PRINCIPAL_NAME = "user_principal_name" class Output: SUCCESS = "success" class AssignLicenseToUserInput(komand.Input): ...
Python
1
_values.index.union(techs)) for tech in techs: links = valid_links[n.links.loc[valid_links, "carrier"] == tech] try: dispatch = ( n.links_t["p" + i][links] .T.groupby(n.links.loc[links, "bus" + i]) .sum() ...
Python
1
result['data'] = arr result['type'] = self.GetType(None) return result #GetPHPV def GetPv(self,versions,update): versions = versions.split(',') update = update.split(',') updates = [] for up in update: if up[:3] in versions: updates.append(up) ...
Python
1
was_down) => Some(!down && was_down), None => None, } } None => None, } } } #[derive(Clone)] struct ButtonState(u16); impl ButtonState { fn new() -> Self { ButtonState(0) } fn activate(&mut self, button: Button) { sel...
Rust
0
ead. line = '' keyboard_interrupt = False def in_thread(): nonlocal line, keyboard_interrupt try: line = self.pt_app.prompt() except EOFError: ...
Python
1
alse, then this example will be the same as the official AutoGen repo # (https://github.com/microsoft/autogen/blob/main/notebook/agentchat_groupchat.ipynb) # If USE_MEMGPT is True, then we swap out the "coder" agent with a MemGPT agent USE_MEMGPT = True # Set to True if you want to print MemGPT's inner workings. # DEB...
Python
1
} pub fn flows(self: &Self, project: &str) -> Result<Flows, AzkabanError> { let session_id = try!(self.session_id.clone().ok_or(AzkabanError::UnauthenticatedError)); let mut url = self.base_url.clone(); url.set_path("/manager"); url.query_pairs_mut().append_pair("ajax", "fetchproje...
Rust
0
ent_banner, get_banner_info, ACTIVE_BANNER_CONFIG ) if not ACTIVE_BANNER_CONFIG["enabled"]: embed = EmbedBuilder.create_base_embed( title="⚠️ Banner đã được tắt", description="Hiện không có banner nào đang hoạt...
Python
1
} min_doc = min_doc.min(s.doc_id()); } sq.curr_doc = min_doc; Ok(sq.curr_doc) } SubScorers::DPQ(dbq) => { loop { dbq.peek_mut().approximate_advance(target)?; if dbq.p...
Rust
0
import numpy as np #from vtk import vtkUnstructuredGridReader from vtk import vtkDataSetReader #import vtk def triple_point(vtkData,dataset,infileDimension,timeItretion,Scalar_name): overall_tp = np.empty(len(timeItretion) , dtype = object) for t in range(len(timeItretion)): if(dataset == "UNST...
Python
1
try: from pydantic.v1.dataclasses import * # noqa: F403 except ImportError: from pydantic.dataclasses import * # type: ignore # noqa: F403
Python
1
} Ok(results) } } <gh_stars>1-10 #![no_std] #![no_main] mod hoverboard; mod protocol; mod systick; mod util; #[cfg(feature = "primary")] use messages::Command; use messages::SpeedLimits; #[cfg(feature = "secondary")] use messages::{Note, Response, SideResponse}; // pick a panicking behavior use p...
Rust
0
o [a@sDdZddlZddlmZddlmZddlmZGdddeZdS)zudistutils.command.install_scripts Implements the Distutils 'install_scripts' command, for installing Python scripts.N)Command)log)ST_MODEc@sHeZdZdZgdZddgZd...
Python
1
sh_str(&r2r_msg_gen::generate_rust_msg(module, prefix, &msgname)); println!("cargo:rustc-cfg=r2r__{}__{}__{}", module, prefix, msg); } codegen.push_str(" }\n"); } } else if prefix == &"msg" { codegen.push_str(...
Rust
0
import torch import torch.nn as nn from bioeq.polymer import PolymerDataset, GeometricPolymer from bioeq.geom import Repr from bioeq.modules import EquivariantTransformer # Create a PolymerDataset class, and request that it load the 'elements' # and 'residues' features too file = 'polymers.nc' dataset = PolymerDataset...
Python
1
, 15, 225, 175, 156, 200, 107, 48], OperandSize::Dword) } fn psraw_11() { run_test(&Instruction { mnemonic: Mnemonic::PSRAW, operand1: Some(Direct(XMM4)), operand2: Some(Direct(XMM5)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[1...
Rust
0
Python files) for dir_name in INCLUDE_NON_RECURSIVE: dir_path = SRC_ROOT / dir_name if not dir_path.exists(): continue # Create directory index dir_doc_path = Path("reference", "api", dir_name, "index.md") with mkdocs_gen_files.open(dir_doc_path, "w") as f: print(f"# {dir_name.rep...
Python
1
t_grant_retry_default( mock_token_endpoint_request, mock_jwt_decode ): _ = await _client.id_token_jwt_grant(mock.Mock(), mock.Mock(), mock.Mock()) mock_token_endpoint_request.assert_called_with( mock.ANY, mock.ANY, mock.ANY, can_retry=True ) @pytest.mark.asyncio @pytest.mark.parametrize("can_r...
Python
1
# Copyright 2015, Pinterest, 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 writ...
Python
1
from django.contrib import admin from .models import Service, Review, Purchase # ======================================================= # ADMIN DISPLAY FOR SERVICE MODEL # ======================================================= # Handles admin display of digital services @admin.register(Service) class ServiceAdmin(...
Python
1
node.inventory.credits += credits.amount; credits.delete(); } } if controller.should_pick_up_items { for item in scene::find_nodes_by_type::<Item>() { if collider.contains(item.position) { node.inventory.pick_up(it...
Rust
0
'time': time.time() - start_time, 'segmentation': init_info_split[obj_id].get('init_mask')} out = self._set_defaults(out, init_default) out_all[obj_id] = out # Merge results out_merged = self.merge_outputs(out_all) se...
Python
1
harlie": 78} # Loop through the dictionary using the items() method. for name, score in student_scores.items(): print(f"{name}: {score}") # Output: # Alice: 85 # Bob: 92 # Charlie: 78 # Use case: Calculate average score of students total_score = 0 for name, score in student_scores.items(): total_score += scor...
Python
1
# Day 1 - Python Print Function # The function is declared like this: # print('what to print') # Variant 1 print("Day 1 - Python Print Function") print("The function is declared like this:") print("print('what to print')") # Variant 2 print("Day 1 - Python Print Function\nThe function is declared like this:\nprint('w...
Python
1
ntities[i+1:]: relation_type = self._infer_relation_type(head_entity['type'], tail_entity['type']) if relation_type: relation = { 'head_entity': head_entity, 'tail_entity': tail_entity, ...
Python
1
def prime(n): if n%2==0: print(" prime") else: print("not prime") n=int(input("enter the no")) prime(n)
Python
1
te: Option<String>, #[serde(rename = "enumDefinition", skip_serializing_if = "Option::is_none")] pub enum_definition: Option<Vec<String>>, #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option<String>, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] ...
Rust
0
# This Code is adapted from https://github.com/LuPro/SlabelFish import base64 import gzip import sys from talespire.exceptions import * def create_header(unique_asset_count): header = b'\xCE\xFA\xCE\xD1\x02\x00' header += unique_asset_count.to_bytes(4, byteorder='little') return header def encode_asse...
Python
1
service key {:?} created successfully!", api_service_key ); Ok(()) } /*pub async fn create_api_service_key( service_id: String, service_key: String, service_secret: String, ) -> Result<()> { let database_url = std::env::var("DATABASE_URL") .context("The DATABASE_URL environment...
Rust
0
test( Some(|entity| SequenceUpdateEvent::SequenceEnd { entity, frame_index: 0, }), 0, ) } #[test] fn does_not_spawn_entity_when_no_sequence_update_event() -> Result<(), Error> { run_test(None, 0) } fn run_test( ...
Rust
0
L_IS_LEAP_MONTH = 22, UCAL_FIELD_COUNT = 23, } #[derive(Copy, Clone)] #[repr(u32)] #[derive(Debug)] #[derive(PartialEq,Eq,PartialOrd,Ord,Hash)] pub enum UCalendarDaysOfWeek { UCAL_SUNDAY = 1, UCAL_MONDAY = 2, UCAL_TUESDAY = 3, UCAL_WEDNESDAY = 4, UCAL_THURSDAY = 5, UCAL_FRIDAY = 6, UCAL_...
Rust
0
am_mailbox_id=target_mailbox_id) # Показываем меню антиспама для выбранного ящика await show_antispam_menu(m, state, db, target_mailbox_id) async def show_mailbox_selection(m: types.Message, state: FSMContext, db, owned_mailboxes: list): """Показать выбор ящика для антиспама""" from aiogram.types ...
Python
1
:Error for TextError { fn description(&self) -> &str { &self.text } fn cause(&self) -> Option<&std::error::Error> { None } } fn main() -> CliResult { let args = Cli::from_args(); args.verbosity.setup_env_logger("rtlsdr")?; let devices = get_devices(); if devices.len() ...
Rust
0
EAM0 + 1u32, D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1 = D3D11_QUERY_SO_STATISTICS_STREAM1 + 1u32, D3D11_QUERY_SO_STATISTICS_STREAM2 = D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1 + 1u32, D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2 = D3D11_QUERY_SO_STATISTICS_STREAM2 + 1u32, D3D11_QUERY_SO_STATISTICS_STREAM3...
Rust
0
ation) ├── prtf (Porfolio theory) │   └── boltzmann.py [boltz] ├── rates (Fixed Income) │   ├── credit.py │   └── fedfunds.py ├── tsa (Time Series Analysis) │   └── holtwinters.py [hw] ├── util (Utilities) │   ├── group.py │   └── system.py └── visual └── ...
Python
1
coin, inner_done, ) ( cur_index, num_accepted_tokens, last_accepted_retrieve_idx, cur_prob_offset, prob_acc, coin, inner_done, ) = inner_loop...
Python
1
) vcomp140_dll_filename = op.basename(VCOMP140_SRC_PATH) vcruntime140_dll_filename = op.basename(VCRUNTIME140_SRC_PATH) vcruntime140_1_dll_filename = op.basename(VCRUNTIME140_1_SRC_PATH) target_folder = op.join(wheel_dirname, TARGET_FOLDER) distributor_init = op.join(wheel_dirname, DISTRIBUTOR_INI...
Python
1
78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 95} DEFINE_DEVPROPKEY! {DEVPKEY_DeviceContainer_PrimaryCategory, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 97} DEFINE_DEVPROPKEY! {DEVPKEY_DeviceContainer_UnpairUninstall, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, ...
Rust
0
r'] flip = img_meta[0]['flip'] flip_direction = img_meta[0]['flip_direction'] _bboxes = bbox_mapping(det_bboxes[:, :4], img_shape, scale_factor, flip, flip_direction) mask_rois = bbox2roi([_bboxes]...
Python
1
"foo {\ \n box-shadow: inset -1.5em 0 1.5em -0.75em rgba(0, 0, 0, 0.25);\ \n box-shadow: inset -1.5em 0 1.5em - 0.75em rgba(0, 0, 0, 0.25);\ \n box-shadow: inset -1.5em 0 1.5em- 0.75em rgba(0, 0, 0, 0.25);\ \n box-shadow: inset -1.5em 0 1.5em-0.75em r...
Rust
0
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Julien Veyssier # # This file is part of a weboob module. # # This weboob module 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 Foundation, either version 3 of the...
Python
1
coding=encoding ) if self.body: msg.attach(body_msg) for alternative in self.alternatives: msg.attach( self._create_mime_attachment( alternative.content, alternative.mimetype ) ...
Python
1
on::v0_0_1::config; use crate::version::v0_0_1::generic; pub type Info = generic::config::Info<Key,Address,Kind>; pub type PortalKind = config::PortalKind; pub type Config = config::Config; pub type SchemaRef = config::SchemaRef; pub type BindConfig = config::BindConfig; pub type PortConfig...
Rust
0
import importlib.util import sys from itertools import chain, combinations import pytest from click.testing import CliRunner from pytest_missing_modules.plugin import MissingModulesContextGenerator from manim_slides.__version__ import __version__ from manim_slides.checkhealth import checkhealth MANIM_NOT_INSTALLED =...
Python
1
""" Copyright 2018 The Matrix Authors This file is part of the Matrix library. The Matrix library 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 Foundation, either version 3 of the License, or (at your option) any la...
Python
1
), (&[0xbb, 0xbb][..], &[0xbb][..]), (&[0xbb, 0xcc][..], &[0xbc][..]), ]; check_equivalent(&input); check_iteration(&input); } #[test] fn single_long_leaf_is_equivalent() { let input: Vec<(&[u8], &[u8])> = vec![(&[0xaa][..], &b"ABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABC"[...
Rust
0
# get the features by backbone features = self.features(data_dict) # get the core_feat for loss core_feat = nn.ReLU(inplace=False)(features) core_feat= F.adaptive_avg_pool2d(core_feat, (1, 1)) core_feat = core_feat.view(core_feat.size(0), -1) # get the prediction by class...
Python
1
ed') if intersect > union: raise TrackEvalException("Intersection value > union value. Are the box values corrupted?") return intersect / union if union > 0 else 0 @staticmethod def _compute_mask_track_iou(dt_track, gt_track): """ Calculates the track IoU for one det...
Python
1
""" Pacote app principal aplicação restaurante """
Python
1
# Copyright 2022 The Nerfstudio Team. 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 applicable...
Python
1
<$short, $base<$short>> { fn nanoda_dbg(self, ctx : &impl IsCtx<$short>) -> String { self.read(ctx).nanoda_dbg(ctx) } } }; } #[macro_export] macro_rules! arrow { ( [$dom:expr, $body:expr], $ctx:expr ) => { { <ExprPtr>::new_pi(Anon.a...
Rust
0
workers = gpu * 20 print("pathfinder lr: ", lr) time.sleep(10) pid = os.fork() if pid == 0: os.system( f"sh {PREFIX}/train_lra.sh {task} {arch} {total_batch} {lr} {n_layers} {d_model} {norm} {prenorm} {use_softmax} {act_fun} {ex...
Python
1
import sys from typing import TYPE_CHECKING if sys.version_info < (3, 7) or TYPE_CHECKING: from ._ordering import OrderingValidator from ._easing import EasingValidator from ._duration import DurationValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ ...
Python
1
plot_dir=learning_curves_from_base_dir, plot_title=f"prismatic_{metric[5:]}_log_vs_gradient_step_log_cols=eval_models_rows=attack_models={idx}_model_type={model_type}", ) # plt.show() idx += 1 for model_type, df_by_model_type in to_base_df.groupby("Attack Model Type"): i...
Python
1
} else { for i in 0..ashape { let aindex = abase + (i as isize) * astride; let bindex = bbase + (i as isize) * bstride; map_binary_operator_rec( env, buffer, a, aindex, adata, b,...
Rust
0
room. Each part (color scheme, font scheme, format scheme) is defined elsewhere /// within DrawingML. pub theme_elements: Box<BaseStyles>, /// This element allows for the definition of default shape, line, and textbox formatting properties. An application /// can use this information to format a shape...
Rust
0
i), "m_sign" => Some(&crate::flat::ATM_SIGN as &crate::Emoji), "om_symbol" => Some(&crate::flat::ATOM_SYMBOL as &crate::Emoji), _ => None, }, b'u' => match rest { "stralia" => Some(&crate::flat::FLAG_AUSTRALIA as &crate::Emoji), "stria" => Some(&crate::flat::FLAG_AUSTRIA as &crate::Emoj...
Rust
0
import datetime import traceback from CTFd.utils import get_config from .db import DBContainer, db from .docker import DockerUtils from .routers import Router class ControlUtil: @staticmethod def try_add_container(user_id, challenge_id): container = DBContainer.create_container_record(user_id, challe...
Python
1
sa ve öz bir kod kalitesi raporu oluştur. """ task = Task( id="code_quality_analysis", type=TaskType.ANALYSIS, prompt=prompt, priority=Priority.HIGH ) result = await self.engine.process_task(task) self.results['cod...
Python
1
or ); return; } }; let is_elf = File::open( &path ).and_then( |mut fp| { let mut buffer = [0; 4]; fp.read_exact( &mut buffer )?; Ok( buffer ) }).map( |buffer| { &buffer == b"\x7FELF" ...
Rust
0
print("AmirMohammad Pirzadeh") print("Poole highschool") from mutil import Combine, TSet two_counter = 0 counter = 1 while (True): if (Combine(TSet, TSet)(counter) == 2): two_counter += 1 if (Combine(TSet, TSet)(counter) == 3): print(two_counter) break counter += 1
Python
1
----------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'hpfeeds', 'hpfeeds Documentation', author, 'hpfeeds', 'One line description of project.', 'Miscellane...
Python
1
ta return weight, bias def fold_bn_into_conv(conv_module, bn_module): w, b = _fold_bn(conv_module, bn_module) if conv_module.bias is None: conv_module.bias = nn.Parameter(b) else: conv_module.bias.data = b conv_module.weight.data = w # set bn running stats bn_module.running...
Python
1
orders.effects.push_back(routing_msg.into()); } } UrlHandling::None => (), }; self.patch_window_event_handlers(); // Update the state on page load, based // on the starting URL. Must be set up on the server as well. let rou...
Rust
0
how_config(downloader, str(cfg)) assert result == 0 downloader.logger.info.assert_any_call(f"Configuration file: {cfg}") downloader.logger.info.assert_any_call("\nCurrent configuration:") downloader.logger.info.assert_any_call(content) @pytest.mark.asyncio async def test_convert_json_to_txt_function(...
Python
1
][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DestroyCryptoKeyVersionRequest { /// Required. The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. #[prost(string, tag = "1")] pub name: ::p...
Rust
0
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::SerializationError> { let mut out = String::new(); #[allow(unused_mut)] let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "AttachLoadBalancers", "2011-01-01"); #[allow(unused_mut)] let mut scope_8 = writer.p...
Rust
0
y.contains(&self.data[offset]) { samples.push(self.data[offset].clone()); } break; } Some((left, right)) => { let left_count = left.end - left.start; let ri...
Rust
0
argument", ); } #[test] fn it_converts_to_tokens() { let binding = CosmosDbTrigger { name: Cow::from("name"), connection: Cow::from("connection"), database_name: Cow::from("database"), collection_name: Cow::from("collection"), lea...
Rust
0
import cv2 import numpy as np # Görüntüyü yükleme img = cv2.imread("hand90.png") # Gri tonlamalı görüntü oluşturma gray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # Kenarları algılama edges = cv2.Canny(gray_img, 30, 200) # Konturları bulma contours, _ = cv2.findContours(edges, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_S...
Python
1
Object :return: ssj tracker object ''' if phase != 'test' and phase != 'train': print('Error: Phase not recognized') return if size != 900: print('Error: Sorry only SST{} is supported currently!'.format(size)) return base = config['base_net'] extras = config['ex...
Python
1
# Copyright 2009-2017 Ram Rachum. # This program is distributed under the MIT license. '''Testing module for `cute_iter_tools.iter_with`.''' from __future__ import generator_stop import itertools from python_toolbox import nifty_collections from python_toolbox import context_management from python_toolbox.cute_ite...
Python
1
01", "也是拥有卓越能力的一位……\x01", "但他也同样无法逃过病魔的侵袭。\x02\x03", "他很干脆地放弃了抗争,\x01", "也没有接受可以延续生命的手术……\x02\x03", "某一天,他把我叫去,并下达了命令——\x02\x03", "让我杀死他,继承『银』这个身份。\x02", ) ) CloseMessageWindow() OP_57(0x0) OP_5A() OP_CB(0x2, 0x3, 0xFFF...
Python
1
data_by_id, parent); data_by_id[id].parent = parent; } parent } fn build_sets<'a>(&'a mut self) -> HashMap<usize, Vec<&'a T>> { let mut map : HashMap<usize, Vec<&'a T>> = HashMap::new(); for (ref key, ref val) in self.ids.iter(){ let root = Self::find_wit...
Rust
0
MPU_TABLE_HINF_SPEC>, #[doc = "0x358 - "] pub ahblite_mpu_table_uhci1: crate::Reg<ahblite_mpu_table_uhci1::AHBLITE_MPU_TABLE_UHCI1_SPEC>, #[doc = "0x35c - "] pub ahblite_mpu_table_misc: crate::Reg<ahblite_mpu_table_misc::AHBLITE_MPU_TABLE_MISC_SPEC>, #[doc = "0x360 - "] pub ahblite_mpu_table_i2c...
Rust
0
ial_message(self, other_clique): """ NOT SURE IF THIS IS NEEDED. Send the first message to another clique. Arguments --------- *other_clique* : a different Clique object """ psi_copy = copy(self.psi) sepset = self.sepset(other_clique) su...
Python
1
} fn with_increased_prio(&self, prio: &VGameAnnouncementPriority, ebid: EBid) -> Option<Box<dyn TActivelyPlayableRules>> { self.payoutdecider.with_increased_prio(prio, ebid) .map(|payoutdecider| Box::new(Self{ payoutdecider, trumpfdecider: self.trumpfdecider.c...
Rust
0
# Copyright 2023 The KerasCV Authors # # 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 ...
Python
1