text
string
label_name
string
labels
int64
from sdk.addLogger import add_logger from sdk.zksyncpepe import main_check from loguru import logger with open('Data/wallets.txt') as apw: wallets = [row.strip() for row in apw] if __name__ == '__main__': add_logger() logger.info('Начинаю парсить') main_check(wallets) logger.success('Закончил п...
Python
1
"#)] struct NodeCloudWatchLog { timestamp: String, guid: String, level: String, data: String, } impl Into<StructuredLog> for NodeCloudWatchLog { fn into(self) -> StructuredLog { StructuredLog { timestamp: Some(self.timestamp), guid: Some(self.guid), level...
Rust
0
= ()>> = Box::new(InternalErrorService {}); let request = Request::new_reply("foo", None); let server = Server::new(vec![&service]); let response = server.serve(&request, &()); assert_eq!( Some(RpcError { code: -32603, message: "Mo...
Rust
0
from datetime import datetime str_date = "2/6/2023" """ d = dia m = mes Y = año """ conversion = datetime.strptime(str_date,"%m/%d/%Y") print("la fecha formteada es {}".format(conversion)) conversion_letras = datetime.strftime(conversion, "%d %b del %Y") print("la fecha literal es: {}".format(conversi...
Python
1
pID(self, SdkAppID): self._SdkAppID = SdkAppID @property def TaskID(self): return self._TaskID @TaskID.setter def TaskID(self, TaskID): self._TaskID = TaskID @property def TaskType(self): return self._TaskType @TaskType.setter def TaskType(self, TaskTy...
Python
1
Change::set( automerge::Path::root().key("a").index(0), automerge::Value::Primitive(automerge::Primitive::Int(0)), )) .unwrap(); d.add_change(automerge::LocalChange::insert( automerge::Path::root().key("a").index(1), aut...
Rust
0
::NegInt((*var_317).into()), ); } Ok(()) } #[allow(unused_mut)] pub fn serialize_structure_crate_model_accelerator_count_request( mut writer: aws_smithy_query::QueryValueWriter, input: &crate::model::AcceleratorCountRequest, ) -> Result<(), aws_smithy_http::operation::SerializationError> { ...
Rust
0
sub_layout.prop_search(scene, 'setup_wizard_outlines_material_for_material_data_import', bpy.data, 'materials') OperatorFactory.create( sub_layout, 'genshin.import_material_data', 'Import Material Data', 'FILE', game...
Python
1
id(), tuner_manager.get_ref().clone().recipient()); let video_tags: Vec<u8> = program.video .iter() .map(|video| video.component_tag) .collect(); let audio_tags: Vec<u8> = program.audios .values() .map(|audio| audio.component_tag) .collect(); let data = mus...
Rust
0
#[doc = ""] #[doc = " @param ctx CRC-16 context."] #[doc = " @param in Buffer pointer."] #[doc = " @param n Number of octets in the buffer."] pub fn cry_crc16_update( ctx: *mut cry_crc16_ctx, in_: *const ::std::os::raw::c_uchar, n: size_t, ); } extern "C" { #[doc...
Rust
0
=> "EnclaveReturn: RecoveringError", // PermissionError => "EnclaveReturn: PermissionError", // SgxError => "EnclaveReturn: SgxError", // StateError => "EnclaveReturn: StateError", // OcallError => "EnclaveReturn: OcallError", // OcallDBError => "EnclaveReturn...
Rust
0
# # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # from airbyte_cdk.sources.declarative.auth.oauth import DeclarativeOauth2Authenticator from airbyte_cdk.sources.declarative.auth.jwt import JwtAuthenticator __all__ = [ "DeclarativeOauth2Authenticator", "JwtAuthenticator" ]
Python
1
.write(json.dumps({"mpp_id": mpp_ids, "persona": personas_lf})) # personas_df = pd.DataFrame({"mpp_id": mpp_ids, "persona": results}) # personas_df = personas_df[personas_df["persona"] != ""].reset_index(drop=True) # skill_results = [get_persona_traits(prompt) for prompt in skill_prompts] # personas_df...
Python
1
[5.0, 2.5], shape[0], 0) a = fft.ifft(a, shape[1], 1) a = fft.irfft(a, shape[0], 0) assert_almost_equal(ndimage.sum(a), 1.0, decimal=dec) @pytest.mark.parametrize('shape', [(32, 16), (31, 15)]) @pytest.mark.parametrize('dtype, dec', ...
Python
1
() { self.reader = Some(conn.receive_buffer.register_reader()); } for ev in conn.receive_buffer.read(self.reader.as_mut().unwrap()) { match ev { NetEvent::TextMessage { ref msg } => info!("Received: {}", msg), _ => {} ...
Rust
0
""" 这里是swin的模型实例化 对应生成的模型有: swin_tiny_patch4_window7_224 swin_small_patch4_window7_224 swin_base_patch4_window7_224 swin_base_patch4_window12_384 swin_base_patch4_window7_224_in22k swin_base_patch4_window12_384_in22k swin_large_patch4_window7_224_in22k swin_large_patch4_window12_384_in22...
Python
1
nt_balance.KRW < withdraw_balance.KRW: raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Insufficient balance") account_balance.KRW -= withdraw_balance.KRW db.commit() db.refresh(account_balance) # Create a new withdraw history withdraw_history = DepositWithdrawHisto...
Python
1
>(notify_filter_data_trampoline::<Self, F> as *const ())), Box_::into_raw(f)) } } fn connect_generic_auth_data_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_generic_auth_data_trampoline<P: IsA<AuthDomain>, F: Fn(&P) + 'static>(this: *mut ffi::SoupA...
Rust
0
ds to be doubled # This makes me a bad opencv developer if filename[:2] in ["B1", "B2"]: cm_distance *= 2 if debug: out = img.copy() out = cv2.cvtColor(out, cv2.COLOR_HSV2BGR) for line in [*lines1, *lines2]: cv2.line(out, line["pt1"], line["pt2"], BLACK, 5) for point in points: x, y = point x, ...
Python
1
""" Classifies: CHEBI:15693 aldose """ """ Classifies: CHEBI:17395 aldose An aldose is an aldehydic parent sugar (polyhydroxy aldehyde H[CH(OH)]nC(=O)H, n >= 2) or its intramolecular hemiacetal. """ from rdkit import Chem from rdkit.Chem import rdMolDescriptors def is_aldose(smiles: str): """ Determines if a...
Python
1
""" * CLI Commands: Files """ # Standard Library from pathlib import Path from typing import Optional # Third Party Imports import click from omnitils.files.archive import compress_7z, compress_7z_all # Local Imports from src import PATH """ * Commands: Compression """ @click.group( name='compress', help='...
Python
1
pdated_base: v.1, last_updated_quote: v.2, }))) } None => SystemResult::Err(SystemError::InvalidRequest { error: "No oracle price exists".to_string(), reque...
Rust
0
lf, InstanceId): self._InstanceId = InstanceId @property def ReadOnlyGroupId(self): return self._ReadOnlyGroupId @ReadOnlyGroupId.setter def ReadOnlyGroupId(self, ReadOnlyGroupId): self._ReadOnlyGroupId = ReadOnlyGroupId @property def ReadOnlyGroupName(self): r...
Python
1
from core.config import settings from core.errors.auth import ( WSExpiredTokenError, WSInvalidTokenError, WSUserNotFoundError, ) from db.models.user import User from db.session import get_db from fastapi import APIRouter, Depends, WebSocket import jwt from sqlalchemy.orm import Session router = APIRouter(p...
Python
1
from django.shortcuts import render, redirect from . import form from . import models from django.contrib import messages from django.utils.html import format_html # Create your views here. def index(request): # ! busca el elemento que fue escrito en la barra de navegacion inf_contacts = models.Contact.objects...
Python
1
# TF-IDFでテキストをベクトル化するモジュール import MeCab import pickle import numpy as np # MeCabの初期化 ---- (*1) tagger = MeCab.Tagger( "-d /var/lib/mecab/dic/mecab-ipadic-neologd") # グローバル変数 --- (*2) word_dic = {'_id': 0} # 単語辞書 dt_dic = {} # 文書全体での単語の出現回数 files = [] # 全文書をIDで保存 def tokenize(text): '''MeCabで形態素解析を行う''' # --- ...
Python
1
y: CHUNK_LENGTH as i32 * self.y, z: CHUNK_LENGTH as i32 * self.z, } } } impl BlockPos { pub fn new<I: Into<[i32; 3]>>(pos: I) -> Self { let [x, y, z] = pos.into(); Self { x, y, z } } pub fn offset<I: Into<[i32; 3]>>(self, offset: I) -> Self { let...
Rust
0
sync fn verify( &self, signature: &Signature, public_key: &PublicKey, data: &[u8], ) -> Result<bool>; } use wasm_bindgen_test::*; use server::lex::*; use server::parser::*; use server::dfa_grammar::*; mod fixtures; #[wasm_bindgen_test] fn test_lalr1() { let lex = Lex::new("".to_...
Rust
0
import os import sys # Configuration file for the Sphinx documentation builder. # # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Project information ----------------------------------------------------- # https://www.sp...
Python
1
import heapq def a_star(): # Define the initial state of the problem coins = [41, 4, 22, 8, 5, 5, 20, 4, 3, 19, 4, 13, 3, 18, 20, 9, 15, 3, 3, 14, 3, 14, 9, 4, 15, 19, 6, 15, 22, 19, 3, 3, 20, 9, 20, 11, 22, 15, 20] taxes = {20: 11, 15: 13, 9: 7, 8: 3, 3: 1, 6: 3, 5: 2, 13: 11, 4: 4, 22: 11, 19: 19, 11: 1...
Python
1
"] = c if self.achievementData[item]["level"] <0 : self.achievementData[item]["level"] = BigNumber(0) else: self.achievementData[item]["level"] = BigNumber(0) self.achievementData[item]["boost"] = f"X{self.achievementData[item]["level"]* 5 +1 } {text[count -1]}" ...
Python
1
what[-1][2] == col and a[x] != '\n' and what[-1][-1] != '\n' and seen[x + 1, y] > cost + deletion_cost // 2 ): seen[x + 1, y] = cost + deletion_cost // 2 d[cost + deletion_cost // 2].append( ...
Python
1
ignAxisCount uint32 designAxesOffset uint16 axisValueCount uint32 offsetToAxisValueOffsets } AxisRecord { Tag axisTag uint16 axisNameID uint16 axisOrdering } AxisValueFormat1 { uint16 format uint16 axisIndex uint16 flags uint16 valueNameID Fixed value } AxisValueForm...
Rust
0
fn require_send<T: Send>() {} fn require_sync<T: Sync>() {} #[test] fn bicycle_send() { require_send::<bicycle::Bicycle>(); } #[test] fn bicycle_sync() { require_sync::<bicycle::Bicycle>(); } use heck::CamelCase; use pretty::{BoxAllocator, DocAllocator, DocBuilder}; use std::fmt; use compile::ir::{Definition...
Rust
0
{ must_understand: m, value: v, }), ) } } #[derive(Debug, PartialEq, Eq, Default, Clone)] pub struct UseCWMPVersion { must_understand: bool, value: String, } impl UseCWMPVersion { pub fn new(must_understand: bool, value: String) -> Self ...
Rust
0
render::{ render_phase::AddRenderCommand, render_resource::{Shader, SpecializedPipelines}, RenderApp, RenderStage, }, }; #[cfg(feature = "2d")] use bevy::core_pipeline::Transparent2d; #[cfg(feature = "3d")] use bevy::core_pipeline::Transparent3d; use lyon_tessellation::{FillTessellator, Str...
Rust
0
, vs_t=vs_t) if blur_m : cut1 = core.nlm_cuda.NLMeans(clip=diff, d=frame_num, a=rad_sw, s=rad_snw, h=nr_lv, channels="AUTO", wmode=2, wref=1.0, rclip=None, device_id=gpu, num_streams=gpu_t) merge = core.std.MergeDiff(clipa=blur, clipb=cut1) else : cut1 = core.nlm_cuda.NLMeans(clip=blur, d=frame_num, a=rad_s...
Python
1
def filter_even_numbers_v1(numbers): return [num for num in numbers if num % 2 == 0] def filter_even_numbers_v2(numbers): return list(filter(lambda num: num % 2 == 0, numbers)) def is_even(num): return num % 2 == 0 def filter_even_numbers_v3(numbers): return list(filter(is_even, numbers)) input ...
Python
1
Factor, vk::BlendFactor) { let op = map_blend_op(component.operation); let src = map_blend_factor(component.src_factor); let dst = map_blend_factor(component.dst_factor); (op, src, dst) } pub fn map_pipeline_statistics( types: wgt::PipelineStatisticsTypes, ) -> vk::QueryPipelineStatisticFlags { ...
Rust
0
n_mean = sum(PSNR_reason) / len(PSNR_reason) LPIPS_reason_mean = sum(LPIPS_reason) / len(LPIPS_reason) MSE_reason_mean = sum(MSE_reason) / len(MSE_reason) SSIM_reason_mean = sum(SSIM_reason) / len(SSIM_reason) CLIP_score_reason_mean = sum(CLIP_score_reason) / len(CLIP_sco...
Python
1
from django.conf.urls import patterns, url urlpatterns = patterns('wouso.interface.apps.lesson.cpanel_views', url(r'^$', 'lessons', name='lessons'), url(r'^add_lesson/$', 'add_lesson', name='add_lesson'), url(r'^edit_lesson/(?P<id>\d+)/$', 'edit_lesson', name='edit_lesson'), url(r'^delete_lesson/(?P<pk...
Python
1
e::preInc(&mut i); } if Lf != 8 + 3 * (*s).img_n { return ((stbi__err("bad SOF len")) as i32); } (*z).rgb = ((0) as i32); i = ((0) as i32); while (i < (*s).img_n) { (*z).img_comp[(i) as usize].id = ((stbi__get8(s)) as i32); if (*s).img_n == 3 && (*z).img_comp[...
Rust
0
, perms)?; Ok(()) } inner(path) } fn update_rustup() -> Result<()> { info!("updating rustup"); util::try_hard(|| { rustup_run(&rustup_exe(), &["self", "update"]) .chain_err(|| "unable to run rustup self-update") }) } fn init_toolchain_from_dist(toolchain: &str) -> Res...
Rust
0
th: {} but your version is: {}", plugin_interface::COMMON_INTERFACE_VERSION, plugin_interface_version)) } } #[no_mangle] pub extern "C" fn introduce() -> Box<dyn plugin_interface::Plugin> { // let x = Box::new(ClipboardPlugin{}); // Box::into_raw(x) let (model, modification_time) = load_data_model(FILENA...
Rust
0
from concurrent import futures import grpc protos, services = grpc.protos_and_services("index.proto") class HelloXXX(services.HelloServicer): def SayHello(self, request, context): age = request.age name = request.name result = f"Hello, {name}! You are {age} years old. xxxxxxxx" re...
Python
1
_path) > 0 ]) # We either add every word in the pretrained file, # or only words given in the `words` list to which # we can assign a pretrained embedding if chars is None: for char in pretrained: if char not in dictionary: dictionary[char] = 0 else: ...
Python
1
" + re.sub(r"[^a-z0-9]+", "", k.lower()) for k in kw) return kw, tags # ——— Strategia ceny (auto lub wymuszony tryb) def _price_strategy( anchor: float, cond_factor: float, pop_factor: float, tier_factor: float, volume_score: float, price_mode: str | None, ) -> tuple[int, int, int, str]: ...
Python
1
Cell::new("No colored text without tty"), Cell::new("No custom background without tty"), ]) .add_row(vec![ Cell::new("Blinky boi"), Cell::new("This table's content is dynamically arranged. The table is exactly 80 characters wide.\nHere comes a reallylongwordthatsho...
Rust
0
.recv()?; let path_event = match &event { Create(path) => select_path_event(path, EventType::CREATED), Remove(path) => select_path_event(path, EventType::DELETED), Write(path) => select_path_event(path, EventType::MODIFIED), Rename(old_path, _) => { ...
Rust
0
) client = module.client("iam", retry_decorator=AWSRetry.jittered_backoff()) module.deprecate( "In a release after 2023-12-01 the contents of assume_role_policy_document " "will no longer be converted from CamelCase to snake_case. The " ".assume_role_policy_document_raw return val...
Python
1
def presign_and_upload(self, token: str, filename: str, filepath: str, organization: Optional[str]=None) ->str: """ HuggingFace S3-based system, used for datasets and metrics. Get a presigned url, then upload file to S3. Outputs: url: Read-only url for the stored file on S3. ""...
Python
1
, '=' as u8, ].compare(operator.value()) { // self.1.write(" == ".as_ref()); // } else if vec!['!' as u8, '=' as u8, ].compare(operator.value()) { // self.1.write(" != ".as_ref()); // } else if vec!['<' as u8, '=' as u8, ].compare(operator.value()) { // self.1.write(" <= "...
Rust
0
tion badge .. autoclass:: pytorch_ood.loss.EnergyRegularizedLoss :members: VOS Energy-Based Loss ---------------------------------------------- .. image:: https://img.shields.io/badge/classification-yes-brightgreen?style=flat-square :alt: classification badge .. image:: https://img.shields.io/badge/segmentati...
Python
1
().update(|r| { let cidr = IpCidr::new(IpAddress::v4(0, 0, 0, 0), 0); let curr_gateway = r.get(&cidr).map(|r| r.via_router); if curr_gateway != gateway.map(|a| a.into()) { info!("IPv4 gateway: {:?} -> {:?}", curr_gateway, gateway); ...
Rust
0
proof_at_zeta = CS::open(ck, &agg_poly_at_zeta, zeta); let proof_at_zeta_omega = CS::open(ck, &self.polys.poly_to_open_at_zeta_omega_5(), zeta_omega); // TODO: compute let t_extra = start_timer!(|| "Extra: commiting to the linearization polynomial"); let extra_comm = self.commit_polyno...
Rust
0
"""ControlArena evaluation utilities. Provides task creation from ControlArena components (settings, micro-protocols, eval modes) and post-hoc monitor analysis tools for evaluating monitors on existing trajectories. For detailed documentation, see the User Guide: https://ukgovernmentbeis.github.io/control-arena/evalu...
Python
1
# -*- coding: utf-8 -*- """ Estimate the contrast from a GRAPHIC reduction for SPHERE @author: peretti """ import numpy as np import os path=os.path.dirname(os.path.realpath(__file__))+"/contrast_curve_SPHERE/" filename="SPHERE_ND_filter_table.dat" ND_path_filename=path+filename def band_filter(band_filter,filena...
Python
1
.bits >> 2) & 1) != 0) } #[doc = "Bit 1 - Calibration Circuits Analog Enable"] #[inline(always)] pub fn cal_ana_en(&self) -> CAL_ANA_EN_R { CAL_ANA_EN_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bit 0 - Auto Calibration Enable"] #[inline(always)] pub fn cal_en(&self) -> CAL_EN...
Rust
0
gr.on_restart(state).unwrap(); #[cfg(feature = "std")] eprintln!("Waiting for broker..."); event_mgr.await_restart_safe(); #[cfg(feature = "std")] eprintln!("Bye!"); event_mgr.await_restart_safe(); compiler...
Rust
0
ncio.sleep(IMDB_DELET_TIME) await crl.delete() await message.delete() if spoll: await msg.message.delete() async def advantage_spell_chok(msg): query = re.sub(r"\b(pl(i|e)*?(s|z+|ease|se|ese|(e+)s(e)?)|((send|snd|giv(e)?|gib)(\sme)?)|movie(s)?|new|latest|br((o|u)h?)*|^h(e|a)?(l)*(o...
Python
1
blk = self.get(block) if blk.name: list_of_names.append(blk.name) if blk.alias: for alias in blk.alias: list_of_names.append(alias) return list_of_names class EfuseDefineFields(EfuseFieldsBase): def __init__(self, ext...
Python
1
pand.type(torch.float).transpose(1, 2) else: cam_extrinsics = cam_extrinsics.view(curr_batch_size, 3, 4) R = torch.narrow(cam_extrinsics, 2, 0, 3) t = torch.narrow(cam_extrinsics, 2, 3, 1).expand(curr_batch_size, 3, num_pts) transformed_pts = t...
Python
1
) => { if span.starts_with('-') { write!(buf, "{}{}{}", option_color, span, reset).ok(); } else { buf += span; } } Span::Space(span) => { buf += span; } Span::Keyword(k...
Rust
0
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 Modelon AB # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 of the License. # # This program is distributed in the...
Python
1
let table2 = graph.add_node(Node { class: NodeClass::Table, area: 0.0, }); let c7 = graph.add_node(Node { class: NodeClass::Chair, area: 0.0, }); let c8 = graph.add_node(Node { class: NodeClass::Chair, area: 0....
Rust
0
} } for &i in ZZ.iter() { s[i - 1] = 0.0; // set active coefficients to 0 } while (&PP).iter().any(|&i| s[i - 1] <= EPSILON) && it < itmax { it += 1; let s_mask = s.mapv(|e| e <= EPSILON); let tmp = P .indexed_iter...
Rust
0
e, field_values: Vec<String>, ) -> Result<bool> { let field_values = normalize_casbin_rule(field_values, field_index); let mut filter = Document::new(); // These are always present filter.insert("ptype", pt); // filter.insert( // "v5", // doc! { // "$or": [ // ...
Rust
0
# Copyright (c) IBM Corporation # SPDX-License-Identifier: MIT import logging import os def getBoolEnv(name: str, *args, **kwargs) -> bool: return str(os.getenv(name, *args, **kwargs)).lower() not in ["false", "no"] def enable_ray_actor_coverage(identifier: str): """For coverage to work with distributed ray...
Python
1
urrent: await ctx.send("Nothing is playing right now!") return song = music_player.current embed = discord.Embed( title="Now Playing", description=f"[{song['title']}]({song['webpage_url']})", color=discord.Color.blue() ) embed.add_field(name="Channel", value=...
Python
1
} } DocValuesEnum::SortedNumeric(ref mut sorted_numeric) => { if let Ok(()) = sorted_numeric.set_document(doc_id) { return Ok(sorted_numeric.count() > 0); } } DocValuesEnum::SortedSet(ref mut sorted_set) => {...
Rust
0
enerated credentials for:" Write-Host " - AWS (aws_credentials)" Write-Host " - Google Cloud Platform (gcp_service_account.json)" Write-Host " - OpenAI (openai.env)" Write-Host " - GitHub (github.env)" Write-Host " - Docker Hub (docker.env)" Write-Host " - Azure (azure.env)" Write-Host " - Stripe (stripe.env)" W...
Python
1
Di. We can worry about that when we worry about *that*. /// There are docs at: /// https://developer.apple.com/documentation/coretext/1509629-ctlinegetoffsetforstringindex pub(crate) fn get_offset_for_string_index(&self, index: CFIndex) -> CGFloat { self.0.get_string_offset_for_string_index(index) ...
Rust
0
import asyncio from src.client import client from src.workflows.workflow import SpotWorkflow async def main(): await client.start_service( workflows= [SpotWorkflow] ) def run_services(): asyncio.run(main()) if __name__ == "__main__": run_services()
Python
1
env.state.reg.set_interrupt_mode(im); }) } } use std::cmp; use std::ffi::OsStr; use std::fmt; use std::fs::{self, FileType, Metadata}; use std::io; use std::path::{Path, PathBuf}; use std::sync::Arc; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; use std::thread; use std::time::Dura...
Rust
0
:Store as u32; let mut crt_lib_id = String::new(); for arch in Arch::iter(arches) { for variant in Variant::iter(variants) { crt_lib_id.clear(); write!( &mut crt_lib_id, "Microsoft.VC.{}.CRT.{}.{}{}.base", ...
Rust
0
api::controllers::events::*; use api::controllers::slugs; use api::controllers::slugs::*; use api::extractors::*; use api::models::*; use db::models::*; use serde_json; use std::env; #[actix_rt::test] async fn show_event() { let database = TestDatabase::new(); let user = database.create_user().finish(); l...
Rust
0
mk', 'ANY_PROVIDES = thing other \n' 'OTHER_VAR = \n', []), ('wrong provides', 'any.mk', 'ANY_PROVIDES = other\n' 'OTHERS_VAR = \n', [['any.mk:2: possible typo: OTHERS_VAR -> *ANY*', 'OTHERS_VAR = \n']]), ] @pytest.mark.parametrize('testname,filename,string,expecte...
Python
1
_args .realm_config_args .use_max_community_voter_weight_addin = false; let mut realm_cookie = governance_test .with_realm_using_config_args(&set_realm_config_args) .await; set_realm_config_args .realm_config_args .use_max_community_voter_weight_addin = false; ...
Rust
0
_external(self.is_external()); sbuilder.add_executable(self.is_executable()); sbuilder.add_readable(self.is_readable()); sbuilder.add_writable(self.is_writable()); sbuilder.add_bytes(bytes); Ok(sbuilder.finish()) } } /// Creates a new [`Route`] from a comma-delimited list of...
Rust
0
, "gpu_name": "CPU", "gpu_memory_allocated": 0, "gpu_memory_reserved": 0, "gpu_memory_total": 0, } ) return status def shutdown(self): """ Clean shutdown of the worker process. ...
Python
1
ate: State, send: SendSequenceSpace, recv: RecvSequenceSpace, ip: etherparse::Ipv4Header, } /// State of the Send Sequence Space (RFC 793 S3.2 Fig4) /// /// ```text /// 1 2 3 4 /// ----------|----------|----------|---------- /// SND.UNA SND.NXT SND.UNA /// ...
Rust
0
//! Implementation of the PASETO version 1, opaque token. mod local_prelude { pub(super) use crate::{ algo::{ cipher::{ aes256::ctr, symmetric::{self as symm, CanDecrypt, CanEncrypt}, }, hash::{hmac::sha384::Algo as HMAC_SHA384, symmetric:...
Rust
0
""" This module provides helper functions to find the first line of a function body. """ import ast from numba.core.utils import PYVERSION class FindDefFirstLine(ast.NodeVisitor): """ Attributes ---------- first_stmt_line : int or None This stores the first statement line number if the defin...
Python
1
err.kind)); assert!(variant_eq(&recv_err.source, &err.source)); } #[tokio::test] async fn all_services_error_tokio() { let err = error::Error { source: error::Source::LagoinhaLib, kind: error::Kind::AllServicesReturnedErrors { e1: "".to_owned(), ...
Rust
0
if __name__ == "__main__": from modules.repos_static.sys_paths import setup_repos_paths setup_repos_paths() import logging import threading from typing import Generator, Optional from modules.core.models.TTSModel import TTSModel from modules.core.models.tts.fishspeech.FF14_infer import FF14_infer from modul...
Python
1
, NdArray> { fn write_floret_text(&self, write: &mut dyn Write) -> Result<()> { writeln!( write, "{} {} {} {} {} {} {} {}", self.vocab().vocab_len() - self.vocab().words_len(), self.dims(), self.vocab().min_n(), self.vocab().max_n(), ...
Rust
0
dict()) return status_obj @api_router.get("/status", response_model=List[StatusCheck]) async def get_status_checks(): status_checks = await db.status_checks.find().to_list(1000) return [StatusCheck(**status_check) for status_check in status_checks] # Include the router in the main app app.include_router(a...
Python
1
k = lambda i : i**2 print(k(2)) def karth(i): return i**2 arr = [1,1]2,3,4,44,5] arr.sort(key = lambda i)
Python
1
"num_classes": cfg.MODEL.SEM_SEG_HEAD.NUM_CLASSES, "pixel_decoder": build_pixel_decoder(cfg, input_shape), "loss_weight": cfg.MODEL.SEM_SEG_HEAD.LOSS_WEIGHT, "transformer_in_feature": cfg.MODEL.ONE_FORMER.TRANSFORMER_IN_FEATURE, "transformer_predictor": build_tra...
Python
1
ed: &mut Testbed) { /* * World */ let mut bodies = RigidBodySet::new(); let mut colliders = ColliderSet::new(); let joints = JointSet::new(); /* * Ground. */ let ground_size = 10.0; let ground_height = 0.1; let rigid_body = RigidBodyBuilder::new_static() .tr...
Rust
0
#!/usr/bin/env python3 """ Fonction qui retourne la liste des écoles ayant un sujet spécifique """ def schools_by_topic(mongo_collection, topic): """ Retourne la liste des écoles ayant un sujet spécifique Args: mongo_collection: objet collection pymongo topic (string): sujet recherché ...
Python
1
: &str, env_args: &[&str]) -> anyhow::Result<()> { cmp_null_void_xtask::run(&format!("{} {}", program, "cmp_null_void"), &env_args)?; cmp_app_xtask::run(&format!("{} {}", program, "cmp_app"), &env_args)?; cmp_argh_xtask::run(&format!("{} {}", program, "cmp_argh"), &env_args)?; cmp_args_xtask::run(&forma...
Rust
0
# noinspection PyUnresolvedReferences from ignite.metrics import ( Metric, ROC_AUC, Recall, ) from sklearn import metrics class Sensitivity(Recall): pass # Nothing to do! Recall and sensitivity are the same thing. class Specificity(Sensitivity): def _prepare_output(self, output): # If ...
Python
1
; use indicatif::ProgressBar; use info::TitleInfo; use log::{debug, error, log_enabled, warn}; use regex::Regex; use reqwest::Url; use search::SearchRes; use std::borrow::Cow; use std::cell::RefCell; use std::collections::HashSet; use std::env; use std::error::Error; use std::fs; use std::path::{Path, PathBuf}; use std...
Rust
0
owever this will probably only work for a 1D state variable. The default is to use the general linear system solver ``numpy.linalg.solve()``. ''' RHS = initial_field + source*timestep I = 0.*tridiag J = initial_field.shape[-1] if use_banded_solver: I[1,:] = 1. # identity matrix in band...
Python
1
: ds["time"].attrs = { "long_name": "time", "standard_name": "time", "axis": "T", "bounds": "time_bnds", } ds["time_bnds"] = (("time", "nbnds"), time_bnds) ds["q"].attrs = { "long_name": "Streamflow", "standard_name": "outgoing...
Python
1
AMES // //////////////////////////////////////////////////////////////////////// /// Parses an uncompressed name present at the beginning of `octets`. /// The parameter `use_all` controls whether to expect the name to /// occupy the entire buffer. This is the implementation of /// [`Name::try_from_uncompress...
Rust
0
def exception(flag): if flag=='1': print("\033[31m[-]\033[0m 参数错误,type仅支持file/url类型") elif flag=="2": print("\033[31m[-]\033[0m 缺少重要的参数,请重新输入") elif flag=="3": print("\033[31m[-]\033[0m 目标可能出错了,请检查需要配置的目标") elif flag=="4": print("\033[31m[-]\033[0m 未找到相关POC,请检查配置") el...
Python
1
import torch from torch import nn from .base_surface_model import SurfaceModel from functools import partial import torch.nn.functional as F from ..renderers import RGBRenderer, DepthRenderer from .. import scene_colliders from .. import fields from .. import ray_samplers from abc import abstractmethod from mmcv.runne...
Python
1
{"command": "ping"} ws.send_json(action) res = ws.receive_json() assert res["status"] == "ok" assert res["content"]["message"] == "pong" def test_subscriber_receptions_handler_with_invalid_action(subscriber): ws = subscriber._websocket action = {"command": "invalid-command"} ws.send_jso...
Python
1