text
string
label_name
string
labels
int64
lass="mZbhb _2SUA6 _33utW IFARr _1A5yJ">₽</span></div></span><div class="_3BUO3"><span aria-hidden="true">без:&nbsp;</span><div aria-hidden="true" data-auto="snippet-price-old" class="_3wPUS _2Edoi _2nNOb KG4nm _2SUA6 _33utW IFARr _1A5yJ _2j1X1"><div class="_24Evj">5 575</div> <span class="WNWa4 _2SUA6 _33utW IFARr _1A...
Python
1
gs.SQLALCHEMY_ENGINE: sql = f"ALTER TABLE {table_name} AUTO_INCREMENT = 1" elif 'postgresql' in settings.SQLALCHEMY_ENGINE: sql = f"ALTER SEQUENCE {table_name}_id_seq RESTART WITH 1;" # sql = f"select setval('{table_name}_id_seq', '1') from {table_name};" if sql: logger.info(f'执行...
Python
1
# 오류 로그 구성 if maestro_errors: error_log = "\n".join(maestro_errors[:10]) # 최대 10개 오류만 포함 else: error_log = f"테스트 실패 (returncode={result.returncode}) - 상세 오류 정보 없음" # Slack 실패 알림 전송 ...
Python
1
.table_root.get()).map(|x| x == 0) } } pub trait ReadableTable<'s, K: RedbKey + ?Sized, V: RedbValue + ?Sized> { fn get(&self, key: &K) -> Result<Option<AccessGuard<'s, V>>, Error>; fn get_range<'a, T: RangeBounds<KR> + 'a, KR: AsRef<K>>( &'a self, range: T, ) -> Result<RangeIter<T, KR...
Rust
0
where T: Gc, { const SUPPORT_GC: bool = T::SUPPORT_GC; fn gc(&mut self, ctx: &GcCtx) { if let Some(v) = self.as_mut() { v.gc(ctx); } } } impl<T> Gc for Rc<T> where T: Gc, { const SUPPORT_GC: bool = T::SUPPORT_GC; fn gc(&mut self, ctx: &GcCtx) { if let ...
Rust
0
, id: usize) -> Vec<Card> { let mut chosen = Vec::new(); assert!(id < self.players.len(), "Tried to get player cards with ID outside of bounds!"); if id < self.players.len() { chosen = self.players[id].get_chosen_cards(); } return chosen; } // Returns the ID of the current player pub fn get_current_...
Rust
0
} else { println!("6/1: Something went wrong."); } Ok(()) } pub fn problem2() -> Result<(), ParseError> { let groups = parse_input(); let number_of_answers: Option<usize> = groups.iter() .map(|g| reduce_answers(g, intersection)) .sum(); if let Some(v) = number_of_ans...
Rust
0
# Kullanıcı tarafından girilen degere göre elimizdeki sayıyla kıyaslama # yapalım num1 = 5 num2 = int(input("Bir sayı giriniz :")) if(num2>num1): print("Girilen sayı daha büyük") elif(num1==num2): print("Sayılar eşit") else: print("Girilen sayı daha küçük")
Python
1
check_mod(cx, &items); }, ItemKind::MacroDef(MacroDef { macro_rules: true, .. }) => { macros.push(item.ident.name); }, ItemKind::Use(use_tree) => { let segments = &use_tree.prefix.segments; let should_report = |name: &Symb...
Rust
0
progress poll_indexer_store(deps.storage, &PollStatus::InProgress) .save(&poll_id.to_be_bytes(), &true)?; // Update the governance state state_store(deps.storage).save(&state)?; let r = Response::new().add_attributes(vec![ attr("action", "create_poll"), attr("creator", sender_a...
Rust
0
PREPROCESSORS, "cleaners": [ConsecutiveDuplicates], "ignoring_filters": [Numeric, Punctuation], "scoring_filters": [ Or( NimiKuSuli, NimiKuLili, NimiLinkuUncommon, NimiLinkuObscure, NimiLinkuSandbox, ), And(LongSyllabic, Not...
Python
1
""" == load_FinancialPhraseBank-v1.0.py == Converts FinancialPhraseBank-v1.0 data, containing labeled financial sentences, into clean CSV files with two columns: Sentence and Label. Files: - Sentences_AllAgree.txt - Sentences_50Agree.txt - Sentences_66Agree.txt - Sentenc...
Python
1
test = { 'name': 'Python Basics', 'points': 0, 'suites': [ { 'cases': [ { 'code': r""" >>> x = 20 >>> x + 2 3d3ab69a0677d75a0ef4a99e0d2d1451 # locked >>> x e1ac00f801290865dd772310ea7c60e4 # locked >>> y = ...
Python
1
") .with_query(Write::<TestComp>::query()) .build(move |_, world, _, query| assert_eq!(1, query.iter(world).count())); let mut schedule = Schedule::builder() .add_system(system_one) .add_system(system_two) .flush() .add_system(system_three...
Rust
0
or=processor) # Now you can pass `final_dataset` and `data_collator` to the Trainer: # trainer = Trainer( # model=your_model, # Your loaded multi-modal model # args=training_args, # Your TrainingArguments # train_dataset=final_dataset, # # eval_dataset=processed_eval_dataset, ...
Python
1
K div 8. PCLK_peripheral = CCLK/8"] CCLK_DIV_8, } impl PCLK_DACW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> u8 { match *self { PCLK_DACW::CCLK_DIV_4 => 0, PCLK_DACW::CCLK => 1, PCLK_DACW::CCLK_DIV_2 => 2, PCLK_DACW...
Rust
0
WHERE table_name = 'historical_collect_operation_logs' ORDER BY ordinal_position; """)) columns = result.fetchall() logger.info("📋 historical_collect_operation_logs表结构:") for col in columns: logger.info(f" - {col[0]}: {col[1]} (nullable: {col[2]}, de...
Python
1
heck for code vulnerabilities in file content. Args: file_path: The path to the file being analyzed. content: The content of the file. vulnerabilities: The list to add detected vulnerabilities to. """ try: for name, pattern_info in self.pa...
Python
1
(1001, &mut request)?) // } // /// Create a session for the current user // /// // /// Client -- attach_user_request -> Server // /// Client <- attach_user_confirm -- Server // fn attach_user_request() -> u8 { // mcs_pdu_header(Some(DomainMCSPDU::AttachUserRequest), None) // } // /// Create a new domain for MCS l...
Rust
0
# Copyright 2024 Google LLC # # 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 writing, ...
Python
1
d_code', CodeHiliteExtension(), TableExtension(), 'nl2br' ] ) # 组合HTML和CSS return f"{css}{html}" def update_result(self, chunk): """实时更新分析结果""" try: # 将Markdown转换为HTML并显示 html_conten...
Python
1
utils::tests::Signal; } #[cfg(feature = "capi")] pub mod capi; <reponame>conorpp/lpc55-hal #![no_main] #![no_std] extern crate panic_semihosting; // extern crate panic_halt; use cortex_m_rt::entry; #[allow(unused_imports)] use hal::prelude::*; #[allow(unused_imports)] use lpc55_hal as hal; use usb_device::test_clas...
Rust
0
") .expect("Invalid use of function. Need to have {left_asset} on path."); let rasset = params.get("right_asset") .expect("Invalid use of function. Need to have {right_asset} on path."); let exchange = params.get("exchange") .expect("Invalid use of function. Need to have {exchange} on pa...
Rust
0
_value() { let (mut r, mut p) = test_data!(r#" <a attr="zzz;zzz" /> "#); expect_event!(r, p, Ok(XmlEvent::StartDocument { .. })); expect_event!(r, p, Ok(XmlEvent::StartElement { ref name, ref attributes, ref namespace }) => *name == OwnedName::local("a") && ...
Rust
0
initial(q(t("foo"))), vec![tt(""), tt("foo")], ); } #[test] fn pos() { assert_eq!( initial(e(vec![ z(t("foo")), t("foo"), ])), vec![tt("foo")], ); } #[test] fn neg() { assert_eq!( ...
Rust
0
struct Folder {} #[derive(Serialize)] struct Req<'a> { name: &'a str, folder: Folder, // https://docs.microsoft.com/en-us/graph/api/resources/driveitem?view=graph-rest-1.0#instance-attributes #[serde(rename = "@microsoft.graph.conflictBehavior")] ...
Rust
0
e: Verifiable Re-Encryption Mixnets (Haenni, Locher, Koenig, Dubuis) page 9 let g_pow_w4 = g.modpow(&w4, p); let inv_g_pow_w4 = g_pow_w4.invmod(p).ok_or(Error::InvModError)?; let vec_a_tilde: Vec<BigUint> = shuffled_encryptions .clone() .into_iter() .map(|c| ...
Rust
0
type of [`Zome`] because you no longer /// need to know if this is an integrity or coordinator def. pub fn erase_type(self) -> Zome { Zome { name: self.name, def: self.def.erase_type(), } } /// Add a dependency to this zome. pub fn set_dependency(&mut self, ...
Rust
0
e) => { write!(f, "Invalid encryption algorithm: {}", name) } CryptoError::InvalidEncoding(size) => { write!( f, "Expected {} encoded parts, and received {}", ENCODED_PART_COUNT, size ) ...
Rust
0
pe == (5, 5) values = data.df.to_numpy().tolist() assert values[0] == [ "LRL", "Buckhorn-Lake.Stage.Inst.5Minutes.0.USGS-raw", 6245109, "59905", 0, ] def test_get_multi_timeseries_default(requests_mock): requests_mock.get( f"{_MOCK_ROOT}" "/times...
Python
1
a = int(input("Enter your number: ")) print("The square of the number is", a**2) print("The square of the number is", a*a) # print("The square of the number is", a^2) # Incorrect for finding square of a number in Python
Python
1
xA3, 0x08,// 1059 = "vfnmsub132pd" // VEX_Vfnmsub132pd_ymm_ymm_ymmm256 0x03,// HasVPrefix, SameAsPrev // EVEX_Vfnmsub132ps_xmm_k1z_xmm_xmmm128b32 0x01,// HasVPrefix 0xA2, 0x08,// 1058 = "vfnmsub132ps" // EVEX_Vfnmsub132ps_ymm_k1z_ymm_ymmm256b32 0x03,// HasVPrefix, SameAsPrev // EVEX_Vfnmsub132ps_zmm_k1z_zmm...
Rust
0
xisting code signing configuration for Lambda functions to ensure code integrity and authenticity. For information about Lambda code signing configurations and how to use them, see [configuring code signing for Lambda functions](https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html). ## ...
Python
1
Range<u64>>) -> u64 { if let Some(range) = range { range.start } else { 0 } } BaseAddresses::default() .set_eh_frame(start_addr(&svma_info.eh_frame)) .set_eh_frame_hdr(start_addr(&svma_info.eh_frame_hdr)) .set_text(start_addr(&svma_info.tex...
Rust
0
et_tool.py -i iris_train_orig.data -o iris_normal -n") """throw this in a data structure""" def process_cl_args(): in_file = False out_file = False norm = False rand = False amt = 0 min_r = -1 max_r = 1 num_wav_ln = 0 try: opts, args = getopt.getopt(sys.argv[1:], 'hni:o:r:s:...
Python
1
from apriltags_eth import make_default_detector import numpy as np import open3d as o3d import math import yaml import open3d.visualization.gui as gui def non_zero_mean(np_arr): exist = (np_arr > 0) numer = np_arr.sum(axis=0) den = exist.sum(axis=0) return numer/den def np2string(nplist): line = s...
Python
1
optimizer.param_groups: pg['lr'] = current_lr if torch.isfinite(grad_norm): optimizer.step() optimizer.zero_grad(set_to_none=True) writer.add_scalar('Grad/grad_norm', float(grad_norm), global_step) global_step += 1 model.eval() ...
Python
1
#Controle de Acesso por faixa etária lugares = ['bar', 'museu', 'cinema'] age = int(input("Infome sua idade:")) if age < 16: print("Lugares para frequentar:", lugares) print("Permitido apenas com acompanhante. ") else: " "
Python
1
p1 = (int(math.floor(person_conf[pidx, kidx1, 0])), int(math.floor(person_conf[pidx, kidx1, 1]))) p2 = (int(math.floor(person_conf[pidx, kidx2, 0])), int(math.floor(person_conf[pidx, kidx2, 1]))) if check_point(p1[0], p1[1], minx, miny, maxx, maxy) and check_point(p2[0],...
Python
1
verser) { if let Some(set_reverser) = self.set_reverser { unsafe { set_reverser(handles.reverser); } } } self.last_input = Some(handles); if let Some(elapse) = self.elapse { let new_handles = unsafe { elapse...
Rust
0
import os import re import torch import numpy as np from modules import modelloader, paths, deepbooru_model, devices, images, shared re_special = re.compile(r'([\\()])') class DeepDanbooru: def __init__(self): self.model = None def load(self): if self.model is not None: return ...
Python
1
_mul_pd(re, b), _mm256_mul_pd(im, sh)) } // [(a.re * b.re + a.im * b.im) / (b.re * b.re + b.im * b.im)] + i [(a.im * b.re - a.re * b.im) / (b.re * b.re + b.im * b.im)] #[target_feature(enable = "avx")] #[inline] unsafe fn div_cf32x4(a: __m256, b: __m256) -> __m256 { let b_re = _mm256_moveldup_ps(b); let b_im =...
Rust
0
ut let timeout = tokio::time::timeout( time::Duration::from_secs(5), run_command(config.clone(), hostname, decoder, shutdown, tx), ); let timeout_result = crate::test_util::components::assert_source_compliance(&[], timeout).await; let exit_status = t...
Rust
0
_i64, |sz| sz as i64), ndim as usize) >> length: le_i64 >> data: take!(length) >> ( Tensor { data: Storage::from(data), ctx: ctx, dtype: dtype, size: shape.iter().product::<i64>() as usize, shape...
Rust
0
NearestRoundingContext>::from_bits(0x0c438d81c2bce2f6).to_bits())); // let x = Decimal::<u64, NearestRoundingContext>::parse_rounding("+234885.884424996e-295", Rounding::Nearest).unwrap(); // let y = Decimal::<u64, NearestRoundingContext>::parse_rounding("+99.998989899989988e-287", Rounding::Nearest).unwrap();...
Rust
0
# Scrapy settings for weibo project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://docs.scrapy.org/en/latest/topics/settings.html # https://docs.scrapy.org/en/latest/topics/downloader-middleware.h...
Python
1
# Quest: First Contact (57420) # Author: Tiger KINO_KONOKO = 9110002 if sm.hasQuestCompleted(57419) and chr.getLevel() >= 23: # Native Help sm.removeEscapeButton() sm.setSpeakerID(KINO_KONOKO) sm.setBoxChat() sm.sendNext("Where are you from? I like your clothes!") sm.flipSpeaker() sm.flipDi...
Python
1
import uuid from src.domain.constants.featureFlags import IS_ENABLED_BUCKET from src.domain.entity.BoxDetection import BoxDetection from src.domain.entity.Picture import Picture from src.domain.request.PictureDTO import BoxDTO, SavePictureDTO from src.domain.response.NewPictureResponse import NewPictureResponse from s...
Python
1
'wbr': {'en': 'Wagdi'}, 'wbs': {'en': 'West Bengal Sign Language'}, 'wbt': {'en': 'Warnman'}, 'wbv': {'en': 'Wajarri'}, 'wbw': {'en': 'Woi'}, 'wca': {'en': 'Yanomámi'}, 'wci': {'en': 'Waci Gbe'}, 'wdd': {'en': 'Wandji'}, 'wdg': {'en': 'Wadaginam'}, 'wdj': {'en': 'Wadjiginy'}, '...
Python
1
uest( f"{self.assetUrl}/api/facade/v1/charge-points/{charger.uuid}" ) as r: result = await r.json() if not result: raise DetailedChargePointEmptyError() try: if pydantic.version.VERSION.startswith("1"):...
Python
1
he handler can access required fields assert sample_sent_payload["entity_id"] == "session-123" assert sample_sent_payload["data"]["message_content"] == "Response from AI" @pytest.mark.asyncio async def test_handle_message_received_with_minimal_data( self, mock_webhook_processor: AsyncMo...
Python
1
import FWCore.ParameterSet.Config as cms # following thresholds are optimized using a sample of single muons # with flat pT (10 - 50 GeV) and eta (0.8 - 2.4) distributions SK_ME1234 = cms.PSet( dPhiFineMax = cms.double(0.025), verboseInfo = cms.untracked.bool(True), chi2Max = cms.double(99999.0), dPhi...
Python
1
import typing as tp from collage_retrieval.utils.retrieval_utils import RetrievalArgs from collage_retrieval.utils.constants import REPO_ROOT from copy import deepcopy from collage_retrieval.retrieval.retrieval_helper import run_retrieval, save_results import numpy as np import random import argparse def get_args(emb...
Python
1
import matplotlib.pyplot as pt import pandas as pd from maalingaar import Maalinger_aar def main(): data = {} maalinger = pd.read_csv("F:/IcyWorep/Øvelse 9/solflekkaktivitet_daglig.csv", header=None, sep=";") for _, maaling in maalinger.iterrows(): aar = int(maaling[0]) antall_solflekker = int(maaling...
Python
1
pages": False, "_testing": True, # Flag to indicate we're running tests } @pytest.fixture(scope="session") def cookiecutter_package_name(cookiecutter_json_contents: dict) -> str: """Return the cookiecutter.package_name.""" return cookiecutter_json_contents["package_name"] @pytest.fixture(scope=...
Python
1
not been found, the `value_len` is set to `u32::max_value`. /// - Otherwise, pointer to the value in memory. `value_len` contains the length of the value. fn ext_local_storage_get(kind: u32, key: *const u8, key_len: u32, value_len: *mut u32) -> *mut u8; /// Initiates a http request. /// /// `meta` is parity...
Rust
0
# edges. Each sample gradually takes on a soft label distribution that reflects # a weighted average of the labels of its neighbors until the process converges. # These per-sample distributions are stored in `label_distributions_`. # # `predict_proba` computes the class probabilities for a new point by taking a # weig...
Python
1
You should have received a copy of the GNU General Public License // // along with this program. If not, see <https://www.gnu.org/licenses/>. // //! Unit tests for the dex module. // #![cfg(test)] // use super::*; // use frame_support::{assert_noop, assert_ok}; // use mock::{ // SETUSDSERPPair, SETUSDDNARPair, DNA...
Rust
0
old_res = res; n += 1; } old_res } pub fn zeta_m1_directseries(s:r64) -> r64 { let terms = (2..).map(|n|r64((n as f64).powf(-s.0))); sumit(terms, 1e-16) } */ //////////////////////////////////////////////////////////////////////////////// pub mod impls_hurwitz { use super::*; use crate::traits::*; // TOD...
Rust
0
import os from collections import defaultdict from pkg_resources import resource_filename MODELS_FOLDER = resource_filename(__name__, "models") LANGUAGES = ("ru", "en") FILES = dict() FILES["build_config"] = "build_config.json" FILES["train_config"] = "train_config.json" FILES["train_model_config"] = "train_model.jso...
Python
1
# # This file is part of the Chemical Data Processing Toolkit # # Copyright (C) Thomas Seidel <thomas.seidel@univie.ac.at> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # versi...
Python
1
))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_44")))] glib::glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct AttrIterator(Boxed<ffi::PangoAttrIterator>); match fn { copy => |ptr| ffi::pango_attr_iterator_copy(mut_override(ptr)), free => |ptr| ffi::pa...
Rust
0
# 万宝楼需要登录,使用爱剑三作为替代数据源 from typing_extensions import Self from typing import Literal, Any from jinja2 import Template from src.const.path import ASSETS, TEMPLATES from src.utils.network import Request from src.utils.file import read from src.utils.time import Time from src.utils.generate import generate from src.temp...
Python
1
sync_bundles_to_db(self, *, session: Session = NEW_SESSION) -> None: self.log.debug("Syncing DAG bundles to the database") stored = {b.name: b for b in session.query(DagBundleModel).all()} for name in self._bundle_config.keys(): if bundle := stored.pop(name, None): b...
Python
1
Lock Fall"] #[inline(always)] pub fn dpll1lckf(&self) -> DPLL1LCKF_R { DPLL1LCKF_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - DPLL1 Timeout"] #[inline(always)] pub fn dpll1to(&self) -> DPLL1TO_R { DPLL1TO_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "B...
Rust
0
, AccountId> { /// Returns total values of supply, borrow, locked and protocol_interest. /// /// - `&self` : Self reference /// - `at` : Needed for runtime API use. Runtime API must always be called at a specific block. /// /// Return: /// - pool_total_supply_in_usd: total available liquidity in the protocol ...
Rust
0
ked_target = target # Prediction MSE loss pred_mse = F.mse_loss(masked_input, masked_target) # Self MSE loss for mean target target_mse = F.mse_loss(masked_target, torch.ones_like(masked_target) * torch.mean(masked_target)) return pred_mse / target_mse * 100 def relative_mae_loss(prediction: Te...
Python
1
= get_num_groups(0); for (size_t i = 0u; i < num_groups; ++i) { size_t lidx = i * lsize + lid; int value = work_group_scan_inclusive_add(values[lidx]); output[lidx] = sum + value; sum += work_group_broadcast(value, lsize - 1); } }"#; const PROGRAM_BUILD_OPTIONS: &str = "-c...
Rust
0
warning applies. """ if self._storage_writer: warning = warnings.AnalysisWarning( message=message, plugin_name=plugin_name) self._storage_writer.AddAttributeContainer(warning) self._number_of_warnings += 1 self.last_activity_timestamp = time.time() def ProduceEventTag...
Python
1
wrap_err(); assert_eq!((operand1, operand2), (a.to_string(), b.to_string())); } #[test] #[should_panic] fn uint256_add_overflow_panics() { let max = Uint256::new([255u8; 32]); let _ = max + Uint256::from(12u32); } #[test] #[should_panic] fn uint256_sub_overflow_...
Rust
0
import numpy as np import tensorflow as tf from dlp.data import window_dataset, naive_forecast_baseline from dlp.models import dense_forecast, lstm_forecast def test_window_dataset_shapes_single_step(): series = np.arange(50, dtype=np.float32) ds = window_dataset(series, input_width=10, label_width=1, horizon...
Python
1
castles: [[0; 2]; 2], en_passant_file: [0; 8], stm: 0, }; for pc in 0..12 { keys.pieces[pc] = rng.next_u64(); } for cr in 0..16 { keys.castling_rights[cr] = rng.next_u64(); } for ep in 0..8 { keys.en_p...
Rust
0
p = dict() p['picklefolder'] = 'pickles' # ----------------------------------- p['geocode'] = 'PLZ' p["file_lstations"] = "Ladesaeulenregister.csv" # p["file_buildings"] = "gebaeude.csv" p["file_residents"] = "plz_einwohner.csv" # p["file_amou...
Python
1
o(), text_style, Baseline::Top) .draw(&mut disp) .unwrap(); disp.flush().unwrap(); } } use sifc_bytecode::compiler::Compiler; use sifc_parse::{lex::Lexer, parser::Parser, symtab::SymTab}; use sifc_vm::{config::VMConfig, vm::VM}; use std::fs::File; const INPUT_PATH: &str = "./tests/e...
Rust
0
efaultCompareType=dominance, filterGroup=[{property=property, type=date}, {property=property, type=date}], exports=[{export=export}, {export=export}], icon=icon, defaultGranularity=defaultGranularity, defaultTool=search, defaultVisualization=areas, excludeDatasets=[excludeDatasets, excludeDatasets], mapOptions={maxZoom...
Python
1
unsafe impl<V: Send + 'static> Send for AsyncWaitResult<V> {} unsafe impl<V: Send + 'static> Sync for AsyncWaitResult<V> {} impl<V: Send + 'static> Clone for AsyncWaitResult<V> { fn clone(&self) -> Self { AsyncWaitResult(self.0.clone()) } } /// /// 等待异步任务运行的结果集 /// pub struct AsyncWaitR...
Rust
0
N, L = map(int, input().split()) graph = [list(map(int, input().split())) for _ in range(N)] result = 0 def simulation(): global result visited = [[False] * N for _ in range(N)] for x in range(N): is_road = True for y in range(N - 1): #현재와 다음 높이가 다른 경우 if graph[x][y]...
Python
1
BFuture> where AFuture: Future<Item = AInner>, BFuture: Future<Item = BInner>, { type Item = EitherOutput<AInner, BInner>; type Error = EitherError<AFuture::Error, BFuture::Error>; #[inline] fn poll(&mut self) -> Poll<Self::Item, Self::Error> { match self { EitherFuture::Fir...
Rust
0
#! /usr/bin/env python __author__ = 'heroico' import Tkinter import ttk import metax.MainScreen as MainScreen import metax.Logging as Logging class UI(object): def __init__(self, root): self.controller = MainScreen.MainScreen(root, self) #shamelessly stolen from the interwebz: http://stackoverflow.com/que...
Python
1
2 [get_ports { uut$data_bus[2] }]")); assert!(xdc.contains("set_property PACKAGE_PIN V4 [get_ports { uut$data_bus[3] }]")); assert!(xdc.contains("set_property PACKAGE_PIN AB5 [get_ports { uut$data_bus[4] }]")); assert!(xdc.contains("set_property PACKAGE_PIN AA5 [get_ports { uut$data_bus[5] }]")); assert...
Rust
0
y()); assert_eq!(Ssid::empty().to_string(), "<ssid->"); assert_eq!(Ssid::empty().to_string_not_redactable(), ""); } #[test] fn ssid_len() { assert_eq!(Ssid::empty().len(), 0); assert_eq!(SSID_FOO.len(), 3); assert_eq!(SSID_12345.len(), 5); } #[test] fn s...
Rust
0
# mypy: allow-untyped-defs # Owner(s): ["oncall: distributed"] import os import shutil import traceback import torch import torch.distributed as dist import torch.distributed.checkpoint as dcp import torch.multiprocessing as mp import torch.nn as nn import torch.nn.functional as F from torch.distributed._tensor.devic...
Python
1
stream = ollama.chat( model="llama3.2-vision", messages=[ { 'role': 'user', 'content': "Please answer the following question using only the information visible in the provided image" " Do ...
Python
1
self.to_ty, Some(Ty::Bool)) { return Err("ZConstLiteralRewriter: Bool type mismatch" .to_string() .into()); } walk_boolean_type(self, bty) } fn visit_u8_type(&mut self, u8ty: &mut ast::U8Type<'ast>) -> ZVisitorResult { if self.to_ty.is_some() ...
Rust
0
[doc = ""] #[doc = " @pointer_lifetime The returned string is allocated and freed by GLFW. You"] #[doc = " should not free it yourself. It is valid until the next call to @ref"] #[doc = " glfwGetKeyName, or until the library is terminated."] #[doc = ""] #[doc = " @thread_safety This function m...
Rust
0
from __future__ import print_function """ Created on Wed Apr 22 15:53:00 2015 Charging and discharging curves for passive membrane patch R Rao 2007 translated to Python by rkp 2015 """ import numpy as np import matplotlib.pyplot as plt def simulation(I, C, R, label='', color='r'): tau = R*C # = 0.1*100 nF-Mohms...
Python
1
erations"] = 20000 if not args["random_target"] and args["attack_type"] == "targeted": print("WARNING: You are trying to attack imagenet data with all (1000) labels.") if args["attack_single_img"] is not None: print("Imagenet targeting on one file:{}".format(args["attac...
Python
1
ckCount=1, typeId='ABILITY_CHARM', typePregenArgs=None, description='Dramatically increases the chance of a wild Pokémon having a Hidden Ability.', customName='特性护符', customType='PassiveBoost', maxStack=4, shortDescription='Wild pokemon hidden ability chance inc...
Python
1
.unwrap(), vec![8242321, 7535681, 4301677, 10786674, 730798] ]; } #[test] fn high_to_low_unaligned_big() { assert_eq![ Convert::new(300, 16) .convert::<u16, u8>(&vec![275, 166]) .unwrap(), vec![0xb, 0x9, 0x3, 0xc], "@300 => @16" ]; assert_eq![ Convert::new(500, 300) .convert::<u16, u16>(&vec![...
Rust
0
te reports") render_sidebar_config(st.session_state.get("config") or {}) tab_fetch, tab_chat, tab_report, tab_ocr = st.tabs( ["📁 Fetch & Index", "💬 Chat", "📊 Generate Report", "🖼️ OCR Preview"] ) with tab_fetch: st.markdown("### Fetch and Process SEC Filings") ( ...
Python
1
"i": "y", "u": "w", } if pinyin[0] in single_rep_map.keys(): pinyin = single_rep_map[pinyin[0]] + pinyin[1:] assert pinyin in pinyin_to_symbol_map.keys(), (pinyin, seg, r...
Python
1
''' Allmyvideos urlresolver plugin Copyright (C) 2013 Vinnydude 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, either version 3 of the License, or (at your option) any later version. This program i...
Python
1
""" Implementation of the Deep Temporal Clustering model Performance metric functions @author Florent Forest (FlorentF9) """ import numpy as np from sklearn import metrics from scipy.optimize import linear_sum_assignment from sklearn.preprocessing import label_binarize def cluster_acc(y_true, y_pred): """ C...
Python
1
}); let two_sec = time::Duration::from_secs(2); thread::sleep(two_sec); let mut test_servers = HashMap::new(); test_servers.insert(FromStr::from_str("127.0.0.1:9070").unwrap(), None); test_servers.insert(FromStr::from_str("127.0.0.1:9071").unwrap(), Some(100)); ...
Rust
0
ere(_selected_ref, rho_last - 1, rho_last) rho = torch.where(_selected_ref, rho_level + 1, rho) rho = torch.where(rho_last == 0, upper_bound, rho) selected_num += torch.sum(_selected_ref) # truncate to pop_size dif = selected_num - self.pop_size candi_idx = t...
Python
1
write-api).\n\nFor information about available fields see [input](index.html) module"] pub struct INPUT_SPEC; impl crate::RegisterSpec for INPUT_SPEC { type Ux = u32; } #[doc = "`read()` method returns [input::R](R) reader structure"] impl crate::Readable for INPUT_SPEC { type Reader = R; } #[doc = "`write(|w| ...
Rust
0
se std::cmp; use std::collections::HashSet; use std::ops::{Deref, DerefMut}; use super::env::Env; use super::error::{RedoError, RedoErrorKind}; use super::helpers::RedoPath; use super::state::{self, DepMode, File, ProcessTransaction, Stamp}; /// Determine if the given `File` needs to be built. pub fn is_dirty( pt...
Rust
0
for (dealer, dealing) in verified_dealings.iter() { let csp_dealing = CspNiDkgDealing::from(dealing.clone()); let dealer_index = index_provider(*dealer); csp_dealings.insert(dealer_index, csp_dealing); } csp_dealings } struct NiDkgDealings { dealing...
Rust
0
with open("hello.txt", "r") as file: contents = file.readlines() str1 = contents[0] print(contents) print(type(contents)) len_user = [] len_user.append([str1]) print(len_user)
Python
1
rte_eth_fec_mode_RTE_ETH_FEC_AUTO: rte_eth_fec_mode = 1; #[doc = "< FEC using common algorithm"] pub const rte_eth_fec_mode_RTE_ETH_FEC_BASER: rte_eth_fec_mode = 2; #[doc = "< FEC using RS algorithm"] pub const rte_eth_fec_mode_RTE_ETH_FEC_RS: rte_eth_fec_mode = 3; #[doc = " This enum indicates the possible Forward Er...
Rust
0