text
string
label_name
string
labels
int64
::fs::write("default_world.json", &serialized_world).unwrap(); serialized_world } } fn main() { let opts: Opts = Opts::parse(); let mut camera = Camera::new(opts.hsize, opts.vsize, PI / 4.0); camera.transform = Transformation::view_transform( Point::new(0.0, 1.5, -8.0), Point:...
Rust
0
from textual.app import App, ComposeResult from textual.widgets import Static TEXT = """I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past, I will turn the inner eye to see i...
Python
1
tr } //! Define traits and instances for dealing with trust thresholds. use core::fmt::{self, Debug, Display}; use crate::error::Error; use crate::prelude::*; use crate::serializers; use core::convert::TryFrom; use serde::{de::DeserializeOwned, Deserialize, Serialize}; /// TrustThreshold defines how much of the tota...
Rust
0
a more detailed error message. sftp.close().await?; std::unreachable!("Error must have occurred in either read_task or flush_task") } res => res?, } Ok(sftp) } } impl<W: AsyncWrite + Unpin> Sftp<W> { async fn set_limits( &self, ...
Rust
0
a K2Tree. pub fn new(tree: &'a K2Tree) -> Self { Self { leaves: &tree.leaves, pos: 0, } } }use std::fmt; use std::fs::File; use std::io::{BufRead, BufReader}; #[derive(Debug, PartialEq, Clone)] enum Square { Empty, Tree, OpenVisisted, TreeVisisted, } impl Square { fn from_...
Rust
0
if uchu.ky.exists_pc(from) { break; } } } } else { // 西東 if dx + 1 < FILE_10 { let from = file_rank_to_sq(dx + 1, dy); ...
Rust
0
(); //! ``` //! //! ### Set frequency registers 0 and 1 and alternate between them //! //! With a 25 MHz clock this alternates between A4 and D5 tones. //! //! ```no_run //! use ad983x::{Ad983x, FrequencyRegister}; //! use linux_embedded_hal::{Pin, Spidev}; //! //! let spi = Spidev::open("/dev/spidev0.0").unwrap(); //!...
Rust
0
{ Some(d) => { let s = format!("{}", d.format(NAIVE_FORMAT)); serializer.serialize_str(&s) } None => { let s = getdefaultnaivedatetime().to_string(); serializer.serialize_str(&s) } } } pub fn deserialize<'de, D>(deserializer: D) -> Re...
Rust
0
&::std::env::temp_dir(), include_bytes!(concat!("../../res/", $path, ".json")) as &[u8] ).expect(concat!("Chain spec ", $path, " is invalid.")) } )* } } macro_rules! bundle_test_machine { ($($path: expr => $name: ident), *) => { $( /// Bundled test spec pub fn $name() -> machine::Machine { ...
Rust
0
8\x01\ \x20\x01(\x04R\x0bdefaultGate\x129\n\x05rules\x18\x02\x20\x03(\x0b2#.bes\ s.pb.WildcardMatchCommandAddArgR\x05rules\"<\n\x0fArpResponderArg\x12\ \x0e\n\x02ip\x18\x01\x20\x01(\tR\x02ip\x12\x19\n\x08mac_addr\x18\x02\x20\ \x01(\tR\x07macAddr\"\\\n\nMplsPopArg\x12*\n\x11remove_eth_header\x18\ \x0...
Rust
0
ights.iter().collect::<Vec<_>>(); let (output, h, c) = input.lstm( &[h, c], &flat_weights, self.config.has_biases, self.config.num_layers, self.config.dropout, self.config.train, self.config.bidirectional, self.confi...
Rust
0
alue: int) -> None: """Set the id4 property.""" self._cards[0].set_value("id4", value) @property def id5(self) -> typing.Optional[int]: """Get or set the ID of the fifth solid element. """ # nopep8 return self._cards[0].get_value("id5") @id5.setter def id5(self,...
Python
1
i64 { #[inline] fn into_datum(self) -> Option<pg_sys::Datum> { Some(self as pg_sys::Datum) } fn type_oid() -> u32 { pg_sys::INT8OID } } /// for real impl IntoDatum for f32 { #[inline] fn into_datum(self) -> Option<pg_sys::Datum> { Some(self.to_bits() as pg_sys::Dat...
Rust
0
thors parsed the texts. Since the annotations contain start&end offsets and the entities texts, for every entity we create a different part that so spans the whole entity. Format: 9724744 Mutation 31035 31062 Asp 450 Ala D450 is replaced by alanine 9724744 Mutation 38528 38541 Asp...
Python
1
.rs #[cfg(test)] mod tests; mod io; mod shardindex; mod shardworker; mod memtable; /* * The Jira Cloud platform REST API * * Jira Cloud platform REST API documentation * * The version of the OpenAPI document: 1001.0.0-SNAPSHOT * Contact: <EMAIL> * Generated by: https://openapi-generator.tech */ use super::...
Rust
0
rels.append((int(rel_len), rel_ang)) left_most = sorted(rels, key=lambda x: x[1])[0] right_most = sorted(rels, key=lambda x: x[1])[-1] farest = sorted(rels, key=lambda x: x[0])[-1] nearest = sorted(rels, key=lambda x: x[0])[0] return left_most, right_most, farest, ...
Python
1
ult", "all_blue", "only_visible_elements"], move_cursor: bool = True, ): if demo_mode == "off": return """Adds visual effects to the target element""" box = elem.bounding_box() # box = extract_bounds_cdp(page, bid) if box: center_x, center_y = box["x"] + box["width"] / 2, box["y...
Python
1
jbxxq/aws-sdk-rust<filename>sdk/dataexchange/src/model.rs // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. #[allow(missing_docs)] // documentation missing in model #[non_exhaustive] #[derive( std::clone::Clone, std::cmp::Eq, std::cmp::Ord, std::cmp::PartialEq, std::cm...
Rust
0
# Flags for microcode "IsMacroop", # Is a macroop containing microops "IsMicroop", # Is a microop "IsDelayedCommit", # This microop doesn't commit right away "IsLastMicroop", # This microop ends a microop sequence "IsFirstMicroop", # This microop begins a microop sequence ...
Python
1
import os import torch from flask import Flask, jsonify, request from predict import NER os.makedirs('temp/', exist_ok=True) app = Flask('Full-text Extractor for Administrative Documents') pretrain_dir = "pretrains/baseline/models" max_seq_length = 256 batch_size = 4 device = torch.device("cuda" if torch.cuda.is_avai...
Python
1
edTask, autoretry_for=(MeilisearchError, ConnectionError)) @set_code_owner_attribute def update_library_containers_collections(collection_key_str: str) -> None: """ Celery task to update the "collections" field for containers in the given content library collection. """ collection_key = LibraryCollectio...
Python
1
pray::{Construct, Graph}; trait Foo { fn foo(&self) -> u8; } #[implements(Foo)] struct Bar; impl Foo for Bar { fn foo(&self) -> u8 { 10 } } impl<'d> Construct<'d> for Bar { type Dep = (); fn __construct(_: ()) -> Bar { Bar } } #[bind(Foo = "Bar#Prototype")] pub trait Module { } #[test] fn test() { let m ...
Rust
0
_base_ = './maploss_r50_fpn_1x_coco.py' work_dir = 'work_dirs/maploss_r50_fpn_2x_coco' max_epochs = 24 param_scheduler = [ dict(type='LinearLR', start_factor=0.1, by_epoch=False, begin=0, end=500), dict( type='MultiStepLR', begin=0, end=max_epochs, by_epoch=True, mile...
Python
1
0b1000_0000) { return false; } i += 2; } 3 => { // width = 3 if v[i + 1] & 0b1100_0000 != 0b1000_0000 || v[i + 2] & 0b1100_0000 != 0b1000_0000 { return false; ...
Rust
0
t = self.knn_algorithm.find(&x, self.k)?; let mut result = T::zero(); let weights = self .weight .calc_weights(search_result.iter().map(|v| v.1).collect()); let w_sum = weights.iter().map(|w| *w).sum(); for (r, w) in search_result.iter().zip(weights.iter()) { ...
Rust
0
p::new(ptr::read(cell.as_ptr())) }; With { cell, value } } } impl<'a, T> Drop for With<'a, T> { #[inline] fn drop(&mut self) { // Carefully write the value back in the cell unsafe { ptr::write(self.cell.as_ptr(), ptr::read(self.value.deref())); } } } impl<'a, T> Deref for With<'a, T> { type Target = T; ...
Rust
0
off, just in // case running the task takes a long time. self.global.notify(); // Bump the ticker. let ticks = self.ticks.get(); self.ticks.set(ticks.wrapping_add(1)); // Steal tasks from the global...
Rust
0
json_file: iii = json.load(json_file) return iii def check_if_exp_id_exists_from_reading_json_then_create_one_if_not( input_cols, input_path, nation): json_file_name = input_path + f"/x_data_aux/{nation}/experiment_ids.json" try: with open(json_file_name, "r") as json_file: ...
Python
1
from .flag2d import FLAG2DTrainDatasetGenerator, FLAG2DValDatasetGenerator, FLAG2DTestDatasetGenerator from .flag3d import FLAG3DTrainDatasetGenerator, FLAG3DValDatasetGenerator, FLAG3DTestDatasetGenerator from .flag2d_posec3d import FLAG2DPoseC3DTrainDatasetGenerator, FLAG2DPoseC3DValDatasetGenerator, FLAG2DPoseC3DTes...
Python
1
your seed let addresses = iota .find_addresses(&seed) .with_account_index(0) .with_range(0..4) .finish() .unwrap(); println!("List of generated public addresses: {:?}", addresses); let all_addresses = iota .find_addresses(&seed) .with_account_index(0...
Rust
0
IdleTimeoutSeconds: u32, pub perIPRateLimitQueueIdleTimeoutSeconds: u32, pub ipV6IPsecUnauthDscp: u8, pub ipV6IPsecUnauthRateLimitBytesPerSec: u32, pub ipV6IPsecUnauthPerIPRateLimitBytesPerSec: u32, pub ipV6IPsecAuthDscp: u8, pub ipV6IPsecAuthRateLimitBytesPerSec: u32, pub icmpV6Dscp: u8, ...
Rust
0
""" URL configuration for ImageProject project. The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/5.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name=...
Python
1
from sqlalchemy import Column, Integer, String, Float, Date, ForeignKey from sqlalchemy.orm import relationship from app.core.database import Base class Pagamento(Base): __tablename__ = "pagamento" id = Column(Integer, primary_key=True, index=True) ano_referencia = Column(Integer) processo = Column(St...
Python
1
#!/bin/python2 from __future__ import division import cv2 import numpy as np import math MAX_DISTANCE_PIXEL = math.sqrt(3*math.pow(255,2)) MIN_SCENE_LENGTH = 10 THRESHOLD = 0.1 def get_key_frames(video_capture): """Yields the key frames of the video.""" sucess, previous_frame = video_capture.read() frame...
Python
1
class StateChange: VFX = 'vfx_state' VFX_STATE = 'vfx_state_state' AUDIO_STATE = 'audio_state' AUDIO_EFFECT_STATE = 'audio_effect_state' AUTONOMY_MODIFIERS = 'autonomy_modifiers' AWARENESS = 'awareness' BROADCASTER = 'broadcaster' ENVIRONMENT_SCORE = 'environment_score' PAINTING_REV...
Python
1
sicmeta global last_masterdata_update_ts, last_musicmetas_update_ts if last_masterdata_update_ts.get(region) != masterdata_update_ts: log(f"更新 {region} MasterData: {datetime.fromtimestamp(masterdata_update_ts).strftime('%Y-%m-%d %H:%M:%S')}") recommender.update_masterdata(masterd...
Python
1
tchWriter<'a, Ctx, TableSwitchWriterState::Jumps> { type Context = &'a mut InstructionWriter<Ctx>; fn finish(self) -> Result<Self::Context, EncodeError> { if self.remaining == 0 { Ok(self.context) } else { Err(EncodeError::with_context(EncodeErrorKind::ValuesMissing, Con...
Rust
0
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'E8_Vinicultores.ui' # # Created by: PyQt5 UI code generator 5.15.9 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCo...
Python
1
#coding=utf-8 # Copyright (C) 2015, Alibaba Cloud Computing #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
Python
1
#encoding: utf-8 import copy def blending(result_lists, max_len=5, max_weight=-1): ''' result_lists: [(list<path, weight>, list_weight)] ''' mixed_dict = {} for result_list, list_weight in result_lists: for path, weight in result_list: if path not in mixed_dict: ...
Python
1
from __future__ import annotations class TuyaBLEError(Exception): """Base class for Tuya BLE errors.""" class TuyaBLEEnumValueError(TuyaBLEError): """Raised when value assigned to DP_ENUM datapoint has unexpected type.""" def __init__(self) -> None: super().__init__("Value of DP_ENUM datapoint ...
Python
1
chArgument( "use_rviz", default_value="True", description="Whether to start RVIZ" ) declare_map_yaml_cmd = DeclareLaunchArgument( "map", default_value=os.path.join( sm_nav2_test_4_dir, "maps", "improved_carter_warehouse_navigation.yaml" ), # default_value=os....
Python
1
# 13. Crie uma aplicação que implemente uma matriz quadrada com n números inteiros, os # quais devem ser fornecidos aleatoriamente pelo usuário. Implemente um menu com # duas opções: # a. Colocar os elementos em ordem crescente (use o insertionSort). # b. Colocar os elementos em ordem decrescente (use o selectionSort)...
Python
1
''' Задание 2. В некоторой школе решили набрать три новых математических класса и оборудовать кабинеты для них новыми партами. За каждой партой может сидеть два учащихся. Известно количество учащихся в каждом из трех классов. Выведите наименьшее число парт, которое нужно приобрести для них. Input: 20 21 22(ввод чисел...
Python
1
foo::baz=trace,foo=info,baz=off,quux=error"); let modules = &[ ("foo::bar", log::LevelFilter::Off), ("foo::baz", log::LevelFilter::Trace), ("foo", log::LevelFilter::Info), ("baz", log::LevelFilter::Off), ("quux", log::LevelFilter::Error), ...
Rust
0
""" 权限模型模块 @author: pgao @date: 2024-03-16 """ from sqlalchemy import Column, Integer, String, Text, DateTime from sqlalchemy.orm import relationship from datetime import datetime from app.database import Base class Permission(Base): """ 权限模型,定义系统权限 Attributes: id (int): 权限ID code (st...
Python
1
"Activate controller before attempting to force the acquisition of measurements")) if not messages["error"]: control = DaemonControl() status = control.input_force_measurements(unique_id) if status[0]: messages["error"].append(f"Force Input Measure...
Python
1
, Err(e) => { eprintln!("CSV::read() - {:?}",e); return false; }, }; let mut lines = contents.lines(); let mut row = 0; let mut column = 0; loop { match lines.next() { None => break, Some(line) => { if row > C...
Rust
0
import sympy as sp import torch from mist.sym_torch import SymbolicTensor, SymbolicOp, SymbolicOpContext from mist.sym_torch.registry import register_symbolic_op from mist.sym_torch.impl._shape_prop import get_matmul_shape def _matmul(op, outputs, mat1, mat2): ret = SymbolicTensor( outputs, symbo...
Python
1
import numpy as np import json import re import os from collections import defaultdict from sklearn.metrics.pairwise import cosine_similarity import logging def judge_string_exact_match(pred_string_list, golds_string_list): '''判断pred_string_list中的每个字符串是否与golds_string_list中的字符串完全匹配''' # 创建一个空列表,用于存储每个pred_strin...
Python
1
last = Some(value.clone()); let old_last = std::mem::replace(&mut self.last, new_last); (old_last, value) }) } } /// A trait for wrapping in caching iterator. /// /// It is implemented for each iterator over cloneable items. pub trait IntoCachingIterator { type Item : Clone; ...
Rust
0
keys and values for each key specified in the `LabelSet`. /// /// If the labels do not contain a value for the key specified in the /// `LabelSet`, then the missing value will be treated as unspecified. fn acquire_handle(&self, labels: &LS) -> Self::Handle; /// Assigns the passed value to the valu...
Rust
0
import matplotlib.pyplot as plt import numpy as np programlama_notlari = [46, 42, 38, 16, 35, 10, 42, 54, 23, 23, 31, 65, 76, 24, 76, 23, 54, 12, 23, 65, 46, 32, 83, 43, 14, 15, 24, 45, 32, 32, 13, 66, 66, 54, 36, 23, 64, 82, 73, 25, 43, 40, 100, 94, 99, 91, 72, 76, 12, 56...
Python
1
buffer.read_u16::<LittleEndian>()?; let _desktop_save_y_granularity = buffer.read_u16::<LittleEndian>()?; let _padding = buffer.read_u16::<LittleEndian>()?; let _max_order_level = buffer.read_u16::<LittleEndian>()?; let _num_fonts = buffer.read_u16::<LittleEndian>()?; let order...
Rust
0
_token, max_age=691200, path="/", samesite="lax", httponly=True, secure=False) # refresh token expires in 7 days encrypted_refresh_token = Hash.bcrypt(refresh_token) encrypyted_session_id = Hash.bcrypt(session_id) encrypyted_device_fingerprint = Hash.bcrypt(device_fingerprint) ...
Python
1
# Copyright 2020 Xanadu Quantum Technologies 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 agre...
Python
1
import numpy as np from typing import List, Union def get_cumulative_sum(arr: List[Union[float, int]]) -> List[float]: """ Returns cumulative sum of a list. Given an array arr, it returns an array cum_sum_arr, such that cum_sum[i] = sum_{j = 0}^i arr[i] (i follows 0 based indexing) Input: ...
Python
1
# -*- coding: utf-8 -*- ''' Test the getTangentVectorAtVertices method for the simplest case (only two vertices).''' __author__= "Luis C. Pérez Tato (LCPT) and Ana Ortega (AO_O)" __copyright__= "Copyright 2025, LCPT and AO_O" __license__= "GPL" __version__= "3.0" __email__= "l.pereztato@ciccp.es ana.ortega@ciccp.e...
Python
1
count for the fact that `P: S` must hold. // This may create an error. fn assign_scc_value( &mut self, scc: LeakCheckScc, placeholder: ty::PlaceholderRegion, ) -> RelateResult<'tcx, ()> { match self.scc_placeholders[scc] { Some(p) => { assert_ne!(p...
Rust
0
ge_menu, 'ratings', 'Manage this file\'s ratings.', self._ManageRatings ) num_notes = self._current_media.GetNotesManager().GetNumNotes() notes_str = 'notes' if num_notes > 0: notes_str = '{} ({}...
Python
1
""" ОСНОВНЫЕ ФОРМУЛЫ КОМБИНАТОРИКИ 1. Пусть слово состоит из k символов и n1, n2, n3, … nk – количество вариантов для первой, второй, третьей … k-й букв, Тогда количество возможных комбинаций составит: S = n1 * n2 * n3 * … * nk 2. Пусть слово состоит из k символов и n – количество вариантов для каждой буквы, Тогда к...
Python
1
[0.30332, -0.29915, 0.39289], [0.46819, -0.29947, 0.17377], [-0.46304, -0.60518, 0.18765], [-0.27450, -0.59918, ...
Python
1
kind, pid, lsn, crc32: 0, len: u32::try_from(sz).unwrap(), }; LogRead::Blob(header, buf, blob_ptr) }) } } /// returns the current stable offset written to disk pub fn stable_...
Rust
0
[i, j] + rho[i+1, j]) rhow = 0.5 * (rho[i, j] + rho[i-1, j]) rhon = 0.5 * (rho[i, j] + rho[i, j+1]) rhos = 0.5 * (rho[i, j] + rho[i, j-1]) um = dy[i, j] * (rhoe * u_new[i+1, j] - rhow * u_new[i, j]) vm = dx[i, j] * (rhon * v_new[i, j+1] - rhos * v_new[i, j]) ...
Python
1
/// This method exploits both the SIMD instructions and the Out of Order Execution. /// /// This is the method has a lower throughtput than the `xorshift_avx_ss4` because the /// Decoder which can only fetch 16 bytes per clock cycle and most of avx instruction /// are 4 bytes wide. /// /// Example: /// /// ``` ///...
Rust
0
nce', None) if job_reference is None and ( total_rows is not None and int(total_rows) == 0 ): # Handle the case when jobs.query requests with JOB_CREATION_OPTIONAL # return empty results. This will avoid a call to getQueryResults. schema = self._results.get('schema', None) rows =...
Python
1
test_task.goal_holds, max_num_steps=CFG.horizon) assert "Option plan exhausted" in str(e) # Test that shooting does not infinitely hang in the case where the # option model noops. approach._option_model = _MockOptionModel3(...
Python
1
t.file_uploader(texts[language]["fasta_label"], type=["fasta", "fa", "txt"]) if fasta_file: sequences = list(SeqIO.parse(io.TextIOWrapper(fasta_file, encoding="utf-8"), "fasta")) for record in sequences: raw_seq = str(record.seq) cleaned_seq = clean_sequence(raw_seq) st.markdown(f"**ID...
Python
1
API/WebGL2RenderingContext/depthRange)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGl2RenderingContext`*"] pub fn depth_range(this: &WebGl2RenderingContext, z_near: f32, z_far: f32); #[cfg(all(feature = "WebGlProgram", feature = "WebGlShader",))] # [wa...
Rust
0
c_size_t(self.digest_size)) if result: raise ValueError("Error %d while making SHA384 digest" % result) return get_raw_buffer(bfr) def hexdigest(self): """Return the **printable** digest of the message that has been hashed so far. :ret...
Python
1
exit(1) spotify_response_json = spotify_request.json() title = spotify_response_json["name"] artist = spotify_response_json["artists"][0]["name"] album = spotify_response_json["album"]["name"] thumbnail_url = spotify_response_json["album"]["images"][0]["url"] frame_image_url = generate(spo...
Python
1
, 3); queue.push(HashWithValue { hash: 1, value: 2 }); queue.push(HashWithValue { hash: 2, value: 4 }); queue.push(HashWithValue { hash: 4, value: 8 }); assert_eq!( queue.heap.peek(), Some(&Reverse(HashWithValue { hash: 1, value: 2 })) ); } #[test...
Rust
0
t(), Some(&2)); assert_eq!(iter.next(), Some(&1)); assert_eq!(iter.next(), Some(&0)); assert_eq!(iter.next(), None); } assert_eq!(set.remove(&1), true); { let mut iter = set.iter(); assert_eq!(iter.next(), Some(&2)); assert...
Rust
0
from Classes import * def main(page: ft.Page): page.title = 'DNS Changer' page.window.width, page.window.height = 650, 450 page.window.min_width, page.window.min_height = 650, 450 page.window.opacity = 0.95 #page.window.frameless = True page.theme_mode = ft.ThemeMode.SYSTEM page.window....
Python
1
self.current_file .as_ref() .map(|(_, file)| file.path()) .flatten() } pub fn len(&self) -> usize { self.file_list.len() } fn enumerate_files(folder: &gio::File) -> Result<Vec<gio::FileInfo>> { Ok(folder .enumerate_children::<Can...
Rust
0
as t: for images, labels in t: x_buf = bb.FrameBuffer.from_numpy(np.array(images).astype(np.float32)) t_buf = bb.FrameBuffer.from_numpy(np.identity(10)[np.array(labels)].astype(np.float32)) y_buf = net.forward(x_buf, train=True) dy_buf = loss...
Python
1
import win32api import win32con import win32pipe import win32file import json import threading import time import win32gui import win32process import pygame # Constants PIPE_NAME = r'\\.\pipe\gsi_pipe' CS2_WINDOW_NAME = "Counter-Strike 2" KILLSOUND_PATH_FLAG = 'killsound_path.flag' KILLSOUND_VOLUME_FLAG = 'killsound_v...
Python
1
ual to the number of datapoints ({self.npt}).") # Passband indices # ---------------- # The passband a light curve belongs to. self.pbids = asarray(pbids) if pbids is not None else zeros(self.nlc, 'int') self.npb = unique(self.pbids).size if not issubdtype(self.pbids...
Python
1
and a block. /// It allows conversion from a string, and also from a `(&Field, &Block)` and /// bridges the gap between these two components. /// /// This is stored in `(y, x)` index order to make some operations easier. This /// is only an internal detail, but care needs to be taken when interfacing /// with any othe...
Rust
0
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. """ Userbot module for having some fun with people. """ import os import urllib from asyncio import sleep from collectio...
Python
1
"runtime": runtime, "rate": rate, "rate_count": rate_count, "director": director, "writer": writer, "interest": interest, "star": star, "video_url": video_url, "video_location": video_loc...
Python
1
# This Python file uses the following encoding: utf-8 from PySide6.QtWidgets import QLabel, QWidget, QFormLayout from ui_showCards import Ui_centralWidget # if __name__ == "__main__": # pass class showCards(): def __init__(self): ''' Preciso contar a quantidade de Blocos que existem. ...
Python
1
# id 17672 ([Commerci Republic] Claire Tremier: Ace Attorney), field 865000002 sm.setSpeakerID(9390203) # Gilberto Daniella sm.setParam(56) sm.setColor(1) sm.sendNext("Sir, I have something to tell you.") sm.setParam(36) sm.setInnerOverrideSpeakerTemplateID(9390206) # Vaughn Tremier sm.sendSay("How DARE you come back h...
Python
1
> Result<AttestationObject>; fn get_assertions(&mut self, params: &GetAssertionParameters) -> Result<AssertionResponses>; fn reset(&mut self) -> Result<()>; } trait Wink { fn wink(&self); } pub type Result<T> = core::result::Result<T, Error>; #[derive(Clone,Copy,Debug,Eq,PartialEq)] pub enum Er...
Rust
0
::style::Color; use std::cmp::{Ord, Ordering, PartialOrd}; #[derive(Clone, Debug)] struct Edge { epoch: u32, total_epoch: u32, slave_begin: i32, slave_end: i32, } impl Edge { fn horizental_sweep(mut from: BackendCoord, mut to: BackendCoord) -> Option<Edge> { if from.0 == to.0 { ...
Rust
0
#### Verify that Append Datasets produces polydata output when inputs are polydata from paraview.simple import * from vtkmodules.util import vtkConstants # create a new 'Sphere' sphere1 = Sphere() sphere2 = Sphere() sphere2.Center = [1.0, 0.0, 0.0] # create a new 'Append Datasets' appendDatasets = AppendDatasets(Inpu...
Python
1
from cluster import * from . import utils class Tests(utils.ComponentTestCase): def setUp(self): super(Tests, self).setUp() self.cb_args = None self.slot = 10 self.proposal = Proposal(caller='cli', client_id=123, input='inc') self.ballot_num = Ballot(91, 82) self.c...
Python
1
- min_height; for vertex in mesh.vertices.iter_mut() { vertex.uvs.y = vertex.uvs.y / scale; } } /* float mesh_surface_area(mesh* m) { float total = 0.0; int i = 0; while( i < m->num_triangles * 3) { int t_i1 = m->triangles[i]; int t_i2 = m->triangles[i+1]; int t_i3 = m->triangles[...
Rust
0
..Default::default() }; let shader_module = unsafe { device .logical_device .create_shader_module(&create_info, None) .context("unable to create shader module")? }; device.name_vulkan_object( name, ...
Rust
0
pd.to_datetime(df_norm["date"], errors="coerce") df_norm["units"] = pd.to_numeric(df_norm["units"], errors="coerce") df_norm = df_norm.dropna(subset=["date","units"]) frames.append(df_norm) df_all = pd.concat(frames, ignore_index=True, sort=False) df_week = _aggregate_to_week(df_all) ...
Python
1
from tkinter import Entry, END, messagebox from tkinter.ttk import Combobox class GUIComponents: @staticmethod def clear_entries(*entries): for entry in entries: if isinstance(entry, Entry): entry.delete(0, END) elif isinstance(entry, Combobox): e...
Python
1
me: time::Duration::from_millis(1_045_112_400_000), time_zone: 0 } ); decode_unexpected_eof!("amf0-date-partial.bin"); assert_eq!( decode!("amf0-date-minus.bin"), Err(DecodeError::InvalidDate { millis: -1.0 }) ); assert_eq!( ...
Rust
0
writer handle is required, /// use `Writer::as_reader()` instead. #[derive(Debug, Derivative)] #[derivative(Clone)] pub struct Store<K: 'static + Resource> { store: Arc<DashMap<ObjectRef<K>, K>>, } impl<K: 'static + Clone + Resource> Store<K> { /// Retrieve a `clone()` of the entry referred to by `key`, if it...
Rust
0
import customtkinter as ctk from backend.storage import get_items_by_type from components.frames.items_frames.components.login_item import LoginItem class LoginItemsFrame(ctk.CTkFrame): def __init__(self, master, controllers, **kwargs): super().__init__(master, **kwargs) self.controllers = contr...
Python
1
setup(); let config_file = String::from("./run_config.toml"); let mut config_file = ::std::fs::read_to_string(config_file).expect("Failed to read configuration file"); let mut config: ServiceConfig = toml::from_str(&config_file).expect("Failed to parse service configurati...
Rust
0
import os os.system("python src/download_models.py") os.system("python src/covergen.py True")
Python
1
from nodo_simple import Nodo import os, sys class Lista_simplemente_enlazada: # Constructor def __init__(self): self.head = None # Puntero al primer nodo de la lista, inicialmente None porque la lista está vacía # Método para agregar un nodo al final de la lista def append(self, dato): ...
Python
1
e5}', '\u{e6}', '\u{e7}', '\u{e8}', '\u{e9}', '\u{ea}', '\u{eb}', '\u{ec}', '\u{ed}', '\u{ee}', '\u{ef}', '\u{11f}', '\u{f1}', '\u{f2}', '\u{f3}', '\u{f4}', '\u{f5}', '\u{f6}', '\u{f7}', '\u{f8}', '\u{f9}', '\u{fa}', '\u{fb}', '\u{fc}', '\u{131}', '\u{15f}', '\u{ff}', ]; static CP1255: &[char] = &[ '\u...
Rust
0
GET_AUDIO_MIXING_CURRENT_POSITION: API_TYPE_AUDIO_EFFECT = 56; pub const API_TYPE_AUDIO_EFFECT_SET_AUDIO_MIXING_POSITION: API_TYPE_AUDIO_EFFECT = 57; pub const API_TYPE_AUDIO_EFFECT_SET_AUDIO_MIXING_PITCH: API_TYPE_AUDIO_EFFECT = 58; pub const API_TYPE_AUDIO_EFFECT_GET_EFFECTS_VOLUME: API_TYPE_AUDIO_EFFECT = 59; pub co...
Rust
0
"Emilio Wuerges", "Emmanuel Jarri", "Frank Harper", "Gregor Skumavc", "Guillem Palau Salvà", "H. Mijail", "Henrik Enggaard Hansen", "Houssam Salem", "Ian Lewis", "Immanuel Asmus", "Iroiro", ...
Python
1