text
string
label_name
string
labels
int64
type=float, default=1.0, help='variance for gaussian distribution that places individual numbers') parser.add_argument('--enlarge', action='store_true', default=False, help='indicates that you want to enlarge the already existing dataset') args = parser.parse_args() with open(args.svhn_gt) as gt_file: ...
Python
1
ID_1, min_size: TEST_POLICY_MIN_SIZE_NULL, max_size: TEST_POLICY_MAX_SIZE_NULL, attr_cant_have: TEST_POLICY_ATTRIBUTES_NULL, attr_must_have: TEST_POLICY_ATTRIBUTES_NULL, lock_policy_type: LockPolicyType::NoLock, name: Some(String::from(TEST_VAR_NAME_1)), }); // Set a bad siz...
Rust
0
<filename>httpbis/src/futures_misc/mod.rs mod shutdown_signal; pub(crate) mod select_lite; pub use self::shutdown_signal::*; mod game_client; mod login_client; mod world_client; pub use game_client::{GameClient, GameClientError}; pub use login_client::{LoginClient, LoginClientError}; pub use world_client::{WorldCli...
Rust
0
parsing //! purposes in different contexts. Switch between these state machines //! usually performed by the tree construction stage depending on the //! state of the stack of open elements (HTML is a context-sensitive grammar). //! //! Luckily, in the majority of cases this tree construction stage feedback //! can be...
Rust
0
#Identificar o que falta na função e arrumar ela. #O esperado é que a função que recebe um parâmetro, deverá utilizar este parâmetro para fazer um calculo. #exemplo, se receber a palavra "SOMA" no parametro operacao, ela vai fazer a soma dos parametros a e b, caso ela receba "SUB" #vai fazer a subração. def funcOpe...
Python
1
.map(|(_, wave)| *wave); match (start, end) { (None, Some(end)) => Some(Wave::Initial { end }), (Some(start), Some(end)) => Some(Wave::General { start, end }), (Some(start), None) => Some(Wave::Last { start }), _ => None, } } pub fn update_ready...
Rust
0
{}@{}:~/push_scripts/{}/", SSH.custom_args, deployment_name, vm_summary.username, vm_summary.hostname, deployment_name), &SHELL.shell).panic_on_failure(); let data_str = format!("push_scripts/{}/data", deployment_name); let data_path = std::path::Path::new(&data_str); if data_path.is_d...
Rust
0
Body::Reader(..) => self .header("Content-Length") .unwrap_or("0") .parse() .unwrap_or(0), _ => 0, } } pub fn is_empty(&self) -> bool { self.len() == 0 } pub fn redirect_to<U: AsRef<str>>(url: U) -...
Rust
0
d only ever be used internally inside an Option<T> such that it can be initialized before it is ready. struct InternalGfxMachinery { factory: gfx_device_gl::Factory, device: gfx_device_gl::Device, encoder: gfx::Encoder<gfx_device_gl::Resources, gfx_device_gl::CommandBuffer>, target: gfx::handle::RenderT...
Rust
0
: br_block_cbcenc_class; } extern "C" { pub static br_aes_pwr8_cbcdec_vtable: br_block_cbcdec_class; } extern "C" { pub static br_aes_pwr8_ctr_vtable: br_block_ctr_class; } extern "C" { pub static br_aes_pwr8_ctrcbc_vtable: br_block_ctrcbc_class; } extern "C" { #[doc = " \\brief Context initialisation (...
Rust
0
est_val_acc = 0 patience_counter = 0 print("\nStarting training...") print(f"{'Epoch':^6} | {'Train Loss':^10} | {'Train Acc':^9} | {'Val Acc':^8}") print("-" * 50) for epoch in range(EPOCHS): model.train() running_loss = 0.0 ...
Python
1
UlJMUlpID0gYmFzZTY0IC4gYjY0ZGVjb2RlCmV4ZWMgKCBpaUlpaWlJSUkxSWkgKCBvTzBvT28wTzAwTzBvICggSUlJICkgKSAuIGRlY29kZSAoICkgKQppZiBpMTExSWlJMUlpaTFJIC0gaTFJMUlpSUlpSWkxIDogSWkgKCAnJyAuIGpvaW4gKCBJMSAoIG8wMG8wT08wME8gKCBvTzBvT28wTzAwTzBvICkgXiBPb28gKSBmb3Igb08wb09vME8wME8wbyBpbiBpSUlpaUlJaWlpMSApICkKaWYgOTEgLSA5MSA6IGlJIC4gSUlpM...
Python
1
fn is_same_node<P: IsA<DOMNode>>(&self, other: &P) -> bool; #[cfg_attr(feature = "v2_22", deprecated)] fn is_supported(&self, feature: &str, version: &str) -> bool; #[cfg_attr(feature = "v2_22", deprecated)] fn lookup_namespace_uri(&self, prefix: &str) -> Option<GString>; #[cfg_attr(feature = "v2...
Rust
0
import dagster as dg import dagster_and_etl.completed.lesson_6.defs as defs defs = dg.Definitions.merge( dg.components.load_defs(defs), )
Python
1
rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None, }, &[102, 15, 56, 4, 229], OperandSize::Qword, ) } #[test] fn pmaddubsw_8() { run_test( &Instruction { mnemonic: Mnemonic::PMADDUBSW, ...
Rust
0
from jnius import autoclass from plyer.facades.audio import Audio # Recorder Classes MediaRecorder = autoclass('android.media.MediaRecorder') AudioSource = autoclass('android.media.MediaRecorder$AudioSource') OutputFormat = autoclass('android.media.MediaRecorder$OutputFormat') AudioEncoder = autoclass('android.media....
Python
1
p_ = All( None, Uses::Many, String::from("A"), Box::new(Typ(None)), Box::new(Var(None, String::from("A"), 0)), ); let term = Lam(None, String::from("x"), Box::new(Var(None, String::from("x"), 0))); let def = Def { pos: None, name: String::from("id"), doc...
Rust
0
import matplotlib.pyplot as plt import numpy as np import seaborn as sns from matplotlib.gridspec import GridSpec print("Đang tạo Mẫu 1: AI Classification Analysis (4 subplots)...") # --- Dữ liệu giả định --- # (a) Training History epochs = np.arange(1, 31) acc = 0.95 - 0.3 * np.exp(-epochs/5) loss = 0.5 * np.exp(-ep...
Python
1
cluster_status(). let mut poller = Poller::new().unwrap(); let (test_tx, test_rx) = poller.get_registrar().unwrap().channel().unwrap(); register_test_as_service(&mut poller, &nodes, &test_tx, &test_rx); // join node1 to node2 // Wait for the cluster status of both nodes to show they are connected ...
Rust
0
# starting point from book import Book from electronic import Electronic from clothing import Clothing def main(): book = Book("20,000 Leagues Under the Sea", 20, "Jules Verne") electronic = Electronic("Tablet", 399, "A2342DF") clothing = Clothing("Pants", 40, "L") print(book.show_details()) print...
Python
1
ute = 3, InvalidTag = 4, MissingPropertyValue = 5, InvalidValue = 6, VersionMismatch = 7, DuplicateId = 8, ObjectTypeRefused = 9, TemplateMismatch = 10, InvalidProperty = 11, InvalidSignal = 12, } pub const GTK_BUILDER_ERROR_INVALID_TYPE_FUNCTION: GtkBuilderError = GtkBuilderError::I...
Rust
0
c(); error!("Failed to trigger i8042 reset event: {:?}", e); } else { self.metrics.write_count.inc(); } } } #[cfg(test)] mod tests { use std::os::unix::prelude::FromRawFd; use vmm_sys_util::eventfd::EventFd; use super::*; const COMMAND_OFFSET: u8 = 4; ...
Rust
0
wndPointId, } impl MsgSend for ParentNotify { type RetType = (); fn convert_ret(&self, _: isize) -> Self::RetType { () } fn as_generic_wm(&self) -> WndMsg { WndMsg { msg_id: co::WM::PARENTNOTIFY, wparam: MAKEDWORD(self.event.0, self.child_id) as usize, lparam: self.data.as_isize(), ...
Rust
0
ive(Object, Debug)] #[ref_name = "Let"] #[type_key = "relay.Let"] pub struct LetNode { pub base: ExprNode, pub var: Var, pub value: Expr, pub body: Expr, } impl Let { pub fn new(var: Var, value: Expr, body: Expr, span: Span) -> Let { let node = LetNode { base: ExprNode::base::<L...
Rust
0
.column('#1', stretch=NO, minwidth=0, width=0) tree.column('#2', stretch=NO, minwidth=0, width=80) tree.column('#3', stretch=NO, minwidth=0, width=120) tree.column('#4', stretch=NO, minwidth=0, width=90) tree.column('#5', stretch=NO, minwidth=0, width=80) tree.column('#6', stretch=NO, minwidth=0, width=30) tree.column(...
Python
1
= player.paused pos = player.position or 1 dur = getattr(player.current, "length", player.position or 1) sections = 12 loc_time = round((pos / dur if dur != 0 else pos) * sections) bar = "\N{BOX DRAWINGS HEAVY HORIZONTAL}" seek = "\N{RADIO BUTTON}" if paused: ...
Python
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 New Dream Network, LLC (DreamHost) # # 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/li...
Python
1
.data.iter() } } impl From<PcrData> for TPML_DIGEST { fn from(pcr_data: PcrData) -> Self { let mut tpml_digest: TPML_DIGEST = Default::default(); for (_hash_algo, pcr_bank) in pcr_data.into_iter() { for (_pcr_slot, pcr_value) in pcr_bank.into_iter() { let i = tpml_d...
Rust
0
# Copyright (c) OpenMMLab. All rights reserved. import torch from mmdet.models.task_modules import BaseBBoxCoder from mmdet3d.registry import TASK_UTILS @TASK_UTILS.register_module() class DeltaXYZWLHRBBoxCoder(BaseBBoxCoder): """Bbox Coder for 3D boxes. Args: code_size (int): The dimension of boxes...
Python
1
= {} for tag in repo.tags: tags[tag.commit.hexsha] = tag for commit in commits: if cur_ver.parse_message(commit.message): modified = True if commit.hexsha in tags: modified = True # Tag changeset with release date and ve...
Python
1
tabase_zh.json'),excluded_disease_id=excluded_ids) # English Retriever retriever_en = self.load_retrieval(os.path.join(model_dir,'retriever/en/encoder') , os.path.join(model_dir,'retriever/en/index') , os.path.join(model_dir,'retriever/en/disease_databa...
Python
1
"""Test parameters description file""" import pytest @pytest.fixture(scope='function') def args_array_ref(): args_array_ref = [ret_args(1e-10, shape=(21, 21, 21), dgrid=(1e-3, 1e-3, None), power_rms=(0.1e-3, 0.1e-3, 0.01e-6), power_center=(0, 0, None), ...
Python
1
# uncompyle6 version 2.11.5 # Python bytecode 2.7 (62211) # Decompiled from: Python 2.7.18 (default, Apr 20 2020, 20:30:41) # [GCC 9.3.0] # Embedded file name: Exploits\CVE_2015_4455_gravityformsindex.py import requests from Exploits import printModule r = '\x1b[31m' g = '\x1b[32m' y = '\x1b[33m' b = '\x1b[34m' m = '\...
Python
1
MockWeightEstimator: def predict(self, features): return features.get('area', 1000) / 10.0 return MockWeightEstimator() def _mock_behavior_classifier(self): class MockBehaviorClassifier: def predict(...
Python
1
from statistics import variance import torch import torch.nn.functional as F config=dict( dataset=dict( dataset_name='Places', # choose from ['Places', 'ImageNet', 'iNat2018', 'CIFAR'] data_root='', open_root = '' ), visual=dict( name ='resnet18', freeze=False, ...
Python
1
", err_msg!()).into(), )), }; (ret, tokens) })} <filename>src/lib.rs /*! This is a binary memcached protocol implemented only in rust with support of traits to send and receive `T` and consistent hashing to select connections from a pool to distribute data. # Example ```rust! use async_std::sync::Arc; ...
Rust
0
value would be "*". headers["Access-Control-Allow-Origin"] = requested_origin else: failures.append("origin") if requested_method not in self.allow_methods: failures.append("method") # If we allow all headers, then we have to mirror back any requested ...
Python
1
(); gst_info!( CAT, "flexhlssink_video_pipeline: waiting for {} buffers", BUFFER_NB ); for _idx in 0..BUFFER_NB { receiver.recv().unwrap(); //gst_info!(CAT, "flexhlssink_video_pipeline: received buffer #{}", idx); } pipeline.set_state(gst::State::Null).unwra...
Rust
0
#!/usr/bin/env python # encoding: utf-8 import ctypes from ops.base.Instruction import NoOperandsInstruction # int左位移 class ISHL(NoOperandsInstruction): def execute(self, frame): stack = frame.operand_stack v2 = stack.pop_numeric() v1 = stack.pop_numeric() s = v2 & 0x1f r...
Python
1
spec : DatasetSpec Specify all the parameters of the dataset seed: int (optional) Randomstate seed Notes ----- This API is still experimental, and will likely change in the future Examples -------- >>> from dask.dataframe.io.demo import ColumnSpec, DatasetSpec, with_spe...
Python
1
s://{accountName}.{environment}.com.br/api/catalog_system/pvt/sku/stockkeepingunitbyid/{skuId}?sc=1" .replace("{accountName}", account_name) .replace("{environment}", environment); let mut urls: Vec<String> = Vec::with_capacity(sku_ids.len()); for sku_id in sku_ids { let url = ur...
Rust
0
"""Integration tests for the WeMo CrockPot.""" from unittest.mock import patch import pytest from hypothesis import HealthCheck, example, given, settings from hypothesis import strategies as st from pywemo.ouimeaux_device.crockpot import CrockPot, CrockPotMode @pytest.fixture def crockpot(vcr): with vcr.use_ca...
Python
1
sher = HasherConfig::new() .hash_alg(HashAlg::DoubleGradient) .hash_size(10, 8) .preproc_dct() .to_hasher(); let h1 = hasher.hash_image(&img); let mut sha_hasher = Sha3::sha3_256(); sha_hasher.input(&buf); Ok(Self { path: path.a...
Rust
0
import jax import jax.numpy as jnp from .grid_partion import num_devices def exchange_halo(device_grid): _, grid_nx, _ = device_grid.shape halo_size = 3 send_right = device_grid[:,-halo_size:,:] #向右发送的数据 recv_left = jax.lax.ppermute(send_right,'x',[(i,(i+1)%num_devices) for i in range(num_devices)]) ...
Python
1
visits.setdefault(cid, []).append(v_meth) vcids.add(cid) elif member.startswith('leave_'): l_meth = getattr(checker, member) # don't use leave_methods with no activated message: if hasattr(l_meth, 'checks_msgs'): ...
Python
1
_1934, 0xBAB5_9F3E), (r"textures\magicitem\caust11.dds", 0x6015_1934, 0xBAB5_AF0E), (r"textures\magicitem\caust01.dds", 0x6015_1934, 0xBAB5_AF1E), (r"textures\magicitem\caust31.dds", 0x6015_1934, 0xBAB5_AF2E), (r"textures\magicitem\caust21.dds", 0x6015_1934, 0xBAB5_AF3E), (r"textures\magicitem\...
Rust
0
.save_transactions(&req)) } }; Ok(output?) } fn get_account_state_with_proof_by_version( &self, req: &storage_interface::GetStateValueWithProofByVersionRequest, ) -> Result<(Option<StateValue>, SparseMerkleProof<StateValue>), Error> { Ok(self ...
Rust
0
`16/32/64-bit` EVEX_Vpcmpeqq_kr_k1_ymm_ymmm256b64 = 2823, /// `VPCMPEQQ k1 {k2}, zmm2, zmm3/m512/m64bcst` /// /// `EVEX.512.66.0F38.W1 29 /r` /// /// `AVX512F` /// /// `16/32/64-bit` EVEX_Vpcmpeqq_kr_k1_zmm_zmmm512b64 = 2824, /// `VPMOVB2M k1, xmm1` /// /// `EVEX.128.F3.0F38.W0 29 /r` /// /// `AVX512VL a...
Rust
0
til.conv2d(net, num_out_channel, [1,1], padding='VALID', stride=[1,1], bn=True, is_training=is_training, scope='conv%d'%(i), bn_decay=bn_decay) if pooling=='max': feat1_new = tf.reduce_max(net, axis=[2...
Python
1
"(letrec ((quicksand quicksand)) quicksand)", Datum::Ext(RuntimeData::Undefined) ); } #[test] fn letrec_value_test() { assert_evaluates_to!(" (+ (letrec ((fact4 (lambda (n) (if (= n 0) 1 (* n (f...
Rust
0
import pymysql from collections import deque def BFS(v, id_list): visited = [False] * v queue = deque() queue.append(id_list[0][0]) visited[queue[0]] = True parent = [[-1, -1, ""]] * v # In order parentId, movieId, selfname findP = False # finding person2 with BFS wh...
Python
1
# -*- coding: utf-8 -*- import RPi.GPIO as GPIO from DTAF.interfaces.interfaces import InterfaceBase from DTAF.interfaces.gpio_pin import Pin class GPIOException(Exception): """Exception class for Bluetooth communication errors""" pass class GPIOInterface(InterfaceBase): """ A class to handle GPIO in...
Python
1
empty, /// it will return list of files (and dirs) for root directory. req_path must be a /// directory or empty for root directory. fn from_path(conn: &mut Client, name: &str, version: &str, req_path: &str) -> Option<FileList> { let rows = conn .query( "SELECT crates.na...
Rust
0
(String), } /// A structure representing an ID3 frame. /// /// The [`Content`] must be accompanied by a matching ID. Although this struct allows for invalid /// combinations to exist, attempting to encode them will yield an error. #[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct Frame { id:...
Rust
0
"Test search, coverage 69%." from idlelib import search import unittest from test.support import requires requires('gui') from tkinter import Tk, Text, BooleanVar from idlelib import searchengine # Does not currently test the event handler wrappers. # A usage test should simulate clicks and check highlighting. # Test...
Python
1
def get_dyld_finder(): import ctypes import ctypes.util _libdyld = ctypes.CDLL(ctypes.util.find_library("libdyld.dylib")) _libdyld._dyld_image_count.restype = ctypes.c_uint _libdyld._dyld_get_image_name.restype = ctypes.c_char_p def wrapped(): count = _libdyld._dyld_image_count() ...
Python
1
fans or followers """ if html == '': return list() pattern = re.compile(r'FM.view\((.*)\)') soup = BeautifulSoup(html, "html.parser") scripts = soup.find_all('script') user_ids = list() relations = list() for script in scripts: m = re.search(pattern, script.string) ...
Python
1
, 2 inner walls down return true; } false } fn normal(&self, x:i64, y:i64, z:i64)->Normal{ let p = Vector::new(x as f64, y as f64, z as f64); let cp = p.subtract_point(&self.center).negate(); let normal = Normal::from_vector(&cp); normal } ...
Rust
0
clone(&self) -> Self { *self } } impl ::std::default::Default for Struct_ifla_vf_link_state { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } pub type Enum_Unnamed18 = ::libc::c_uint; pub const IFLA_VF_PORT_UNSPEC: ::libc::c_uint = 0; pub const IFLA_VF_PORT: ::libc::c_uint = 1; pub const __IFLA_VF_PORT_...
Rust
0
Graphviz for visualization.") parser.add_argument("target", type=str, help="The destination IP address or domain name.") parser.add_argument("--max-hops", type=int, default=30, help="The maximum number of hops.") parser.add_argument("--timeout", type=int, default=2, help="Timeout in seconds for each hop.")...
Python
1
is responsible for ensuring the output is fully initialised unsafe { assume_array_init(&md.array) } } #[inline(always)] pub unsafe fn pop_front_unchecked(&mut self) -> T { debug_assert!(!self.alive.is_empty()); debug_assert!(self.alive.start < N); unsafe { let ...
Rust
0
//address is derived from decryption key //also decryption key is using for decrypting the data of notes let eta = c_derive_key_eta(&s.eddsa_a, params); let eta_bits = c_into_bits_le_strict(&eta); //check ownership (&s.tx.input.0.p_d - c_derive_key_p_d(&s.tx.input.0.d.as_num(), &eta_bits, par...
Rust
0
if at_end { x += glyph.unpositioned().h_metrics().advance_width / hidpi; } } let mut y = pos.y; if editing.use_block_cursor && !blink_o...
Rust
0
""" 🚧 NOT FUNCTIONAL YET - Workflow Template Open source intelligence gathering workflow """ from abi.workflow.workflow import Workflow, WorkflowConfiguration from typing import Dict, Any, Optional from abi import logger from dataclasses import dataclass @dataclass class InformationGatheringWorkflowConfiguration(Wor...
Python
1
ights(self, pretrained=None): if isinstance(pretrained, str): logger = get_root_logger() load_checkpoint(self, pretrained, map_location="cpu", strict=False, logger=logger) def forward_features(self, x): x, H, W = self.patch_embed(x) cls_token = self.cls_token.expand(...
Python
1
ntityType: def __repr__(self): return (self.id, self.label, self.type, self._links) def getRelationshiptypesLink(self): return self._links['relationshiptypes']['href'] def getSelfLink(self): return self._links['self']['href'] def upload_monitor(monitor): print(round(monitor....
Python
1
Only")]` NestedMeta::Meta(NameValue(nv)) if nv.path == ACCESS_CONTROL => { if let Ok(path) = parse_lit_into_path(ctx, ACCESS_CONTROL, &nv.lit) { access_control.set(&nv.path, quote! { #path }); } } // Parse `#...
Rust
0
str(" | LOCK_TIME: "); if self.lock_time >= 0.0 { buf.push_str(&self.lock_time.to_string()); } else { buf.push_str("?"); } buf.push_str(&format!(" | COUNT: {}", count.to_string())); buf.push_str(&format!("\n{}\n", self.query)); buf } } // Co...
Rust
0
ter 22"] pub mod pcr22; #[doc = "Pin Control Register 23\n\nThis register you can [`read`](crate::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....
Rust
0
# coding: utf8 __metaclass__ = type import web from models.model import * from models.comment_model import * from models.post_thanks_model import * from config.config import * class post_model(model): def __init__(self): super(post_model, self).__init__('post') self.form = web.form.Form( ...
Python
1
from datasets import load_dataset import torch import re from tqdm import tqdm import numpy as np import torch.nn.functional as F import clap.encoders def Google_Command_Eval(speech_encoder, phone_encoder, tokenizer, processor, text=False): G = load_dataset("speech_commands", "v0.01", split='test',cache_dir='...
Python
1
s authenticated", "user_email": current_user.get("email"), "user_id": current_user.get("id") } else: return { "status": "anonymous", "message": "No authentication provided", "user": None } @router.post("/supabase/manual-token-test...
Python
1
sigdecode_strings(rs_strings, order): (r_str, s_str) = rs_strings l = orderlen(order) assert len(r_str) == l, (len(r_str), l) assert len(s_str) == l, (len(s_str), l) r = string_to_number_fixedlen(r_str, order) s = string_to_number_fixedlen(s_str, order) return r, s def sigdecode_der(sig_de...
Python
1
perf_maps: bool, polling_delay: u64, polling_thread_policy: Option<SchedulingPolicy>, } impl<'a> Clone for ProgramVersion<'a> { fn clone(&self) -> Self { Self { programs: self.programs.clone(), ev_names: self.ev_names.clone(), array_maps: self.array_maps.clone(),...
Rust
0
# Test copying transmitter over through the receivers # Create a workspace new_workspace = Workspace.create(Path(tmp_path) / r"testGTEM_copy.geoh5") receivers_rec = receivers.copy(new_workspace) receivers_rec.tx_id_property compare_entities( receivers, receivers_re...
Python
1
st_bounds = Bounds { row_offset: 2, max_row: 3, .. bounds }; gal.add_term_opt(&olmc.arst, &arst_bounds)?; let aprst_bounds = Bounds { row_offset: 3, max_row: 4, .. bounds }; gal.add_term_opt(&olmc.aprst, &aprst_bounds)?; if olmc.clock.is_none() { return ...
Rust
0
pessoa = ('zero', 'um', 'dois', 'três', 'quatro', 'cinco', 'seis', 'sete', 'oito', 'nove', 'dez', 'onze', 'doze', 'treze', 'quatorze', 'quinze', 'dezesseis', 'dezessete', 'dezoito', 'dezenove', 'vinte') while True: n = int(input('Digite um número entre 0 e 20: ')) if 0 <= n <=20: print(f'{pesso...
Python
1
o", (0, 0)), ("to", (0, 0)), ("prod", (0, 0)), ("NotLeft", (0, 0)), ("orig", (0, 0)), ("frac15", (0, 0)), ("xv", (0, 0)), ("DoubleCont", (0, 0)), ("LeftUpVecto", (0, 0)), ("imath;", (305, 0)), ("uHa", (0, 0)), ("Uacute;", (218, 0)),...
Rust
0
color: $blip;\n }\n}\n\ /* last comment, top level again --\n \ compare the indentation! */\n\n\ div {\n\n\ f: g;\n \ empty {\n span {\n a: b;\n }\n }\n \ empty_with_comment {\n /* hey now */\n \ span {\n c: ...
Rust
0
ec2::new(x as f32, y as f32) / (self.resolution as f32 - 1.0); let point_on_unit_cube: Vec3 = local_up + (percent.x - 0.5) * 2.0 * axis_a + (percent.y - 0.5) * 2.0 * axis_b; let point_on_unit_sphere = point_on_unit_cube.normalize()...
Rust
0
ert {node.simplex.elements for node in trie.cofaces((1,))} == { (1,), (1, 2), (1, 3), (1, 4), (1, 2, 3), (1, 2, 4), } assert {node.simplex.elements for node in trie.cofaces((2,))} == { (2,), (1, 2), ...
Python
1
/// The path where configuration and db files will be generated. #[structopt(long, short = "a")] pub artifacts_dir: PathBuf, } impl RunDev { fn artifact_path(&self, artifact_name: &str) -> PathBuf { let mut path = self.artifacts_dir.clone(); path.push(artifact_name); path } ...
Rust
0
ValKind::ILLEGAL { return v; } } self.nil } /// Get the global at position `i`: if it has not been set (i.e. is `ValKind::ILLEGAL`) this /// will return `Err(...)`. pub fn get_legal_global(&self, i: usize) -> Result<Val, Box<VMError>> { let v = self.g...
Rust
0
import os from PIL import Image import webdataset as wds from thinkdiff.datasets.datasets.base_dataset import BaseDataset import random from torch.utils.data import DataLoader, DistributedSampler import wids import json import tqdm llava_brief_instructions = [ "Describe the image concisely.", "Provide a brief ...
Python
1
1.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor informat...
Rust
0
pred._leaves] ) debug_logical_expr("reducing ", pred, evaluation) ensure_logical_algebraic_rules() pred = pred.evaluate(evaluation) debug_logical_expr("-> ", pred, evaluation) cc = True while cc: pred, cc = pred.apply_rules(logical_algebraic_rules, evaluation) debug_lo...
Python
1
for ((x, y), _) in &flashed_this_step { self.inner[*x as usize][*y as usize] = 0; } self.flash_count += flashed_this_step.len(); break flashed_this_step.len() } } } pub fn flashes(&self) -> usize { se...
Rust
0
from collections import defaultdict T=raw_input() T=int(T) def find(point,lookup): if point not in lookup: lookup[point]=point return point it=point while lookup[it]!=it: it=lookup[it] lookup[point]=it return it def union(a,b,lookup,rank): p1=find(a,lookup) p2=find(...
Python
1
num = int(input("Enter the Number :")) for i in range (1,num+1): for j in range (1,num+1): print("*", end="") print() # **** # **** # **** # ****
Python
1
B3BA693823175002F10F400811363D26BBB33633AC8BAD", res.unwrap().to_hex().unwrap()); } } // Wrap the MIG (Memory Interface Generator) into a RustHDL object use rust_hdl_core::direction::Direction; use rust_hdl_core::prelude::*; use rust_hdl_synth::TopWrap; #[derive(Clone, LogicInterface, Default)] pub struct MCBInter...
Rust
0
from fastapi import APIRouter, Depends, HTTPException from sqlalchemy.orm import Session from app.config.database import get_db from app.services.question_service import ( add_question, fetch_question, fetch_questions_by_quiz, modify_question, remove_question ) from app.schemas.quiz_schema import QuestionCreate, Qu...
Python
1
:expr)) => { assert_eq!($f($e), $e as f64) }; } #[wasm_bindgen_test] fn limits_correct() { t_roundtrip!(roundtrip_i8(i8::min_value())); t_roundtrip!(roundtrip_i8(0)); t_roundtrip!(roundtrip_i8(i8::max_value())); t_roundtrip!(roundtrip_i16(i16::min_value())); t_roundtrip!(roundtrip_i16(0...
Rust
0
from src.wakatime import WakaTimeClient from datetime import datetime, timedelta from src.graph import create_language_usage_chart, create_weekly_summary_chart from src.badge import create_wakatime_badges import json import os with open("config.json", "r") as config_file: config = json.load(config_file) # Wakatim...
Python
1
edia_title(self): """Title of current playing media.""" return self._source_na_var("songname") @property def media_artist(self): """Artist of current playing media, music track only.""" return self._source_na_var("artistname") @property def media_album_name(self): ...
Python
1
py.File(session_fullfname, 'r') except OSError: Logger().logger.spacer() Logger().logger.error(f"Session file {session_fullfname} not found") session_file = None return session_file def _load_cam_frames(session_file, key, columns): L = Logger() frames_stack = [] if columns i...
Python
1
let uri: Uri = Uri::try_from(input).unwrap(); // let expect_uri = "http://"; // assert_eq!(&uri.normalize(), expect_uri); // } // // // #[test] // fn test_20() { // let input = "http://[2001::192.168.0.1.]/"; // let uri: Uri = Uri::try_from(input).unwrap(); // let expect_uri = "http://"; // ...
Rust
0
es) = matches.subcommand_matches("environments") { process_environment_command(matches, &rest_cfg)?; process::exit(0) } if let Some(matches) = matches.subcommand_matches("projects") { process_project_command(matches, &rest_cfg)?; process::exit(0) } if let Some(matches) ...
Rust
0
", &rcv_buffer.to_string(), "h-beat", &heartbeat.as_secs().to_string(), "dev", "rust", ], ); self.send(msg.serialize()).await } async fn ping(&mut self) -> Result<()> { let msg = Message::new(Me...
Rust
0
) self.assertIsNotNone(self.mbox.next()) self.assertIsNotNone(self.mbox.next()) self.assertIsNone(self.mbox.next()) self.assertIsNone(self.mbox.next()) ## End: tests from the original module (for backward compatibility). _sample_message = """\ Return-Path: <gkj@gregorykjohnson.com> X-...
Python
1
def solution(cap, n, deliveries, pickups): answer = 0 deliveries = deliveries[::-1] pickups = pickups[::-1] deli_num = 0 pickup_num = 0 for i in range(n): deli_num += deliveries[i] pickup_num += pickups[i] while deli_num > 0 or pickup_num > 0: ...
Python
1