text string | label_name string | labels int64 |
|---|---|---|
x, y = self.node_positions.get(node, (0, 0))
self.canvas.create_oval(x - 20, y - 20, x + 20, y + 20, fill="orange", outline="black")
self.canvas.create_text(x, y, text=str(node.value), font=("Arial", 12, "bold"))
self.window.update()
time.sleep(0.5)
... | Python | 1 |
t(input("Enter QA record ID to delete: "))
delete_qa_record(qa_id)
elif choice == '4':
manage_quality_issues()
elif choice == '5':
resolve_quality_issue()
elif choice == '6':
log_quality_checks()
elif choice == '7':
display_reco... | Python | 1 |
_responder.join().expect("join");
t_window.join().expect("join");
Blocktree::destroy(&blocktree_path).expect("Expected successful database destruction");
let _ignored = remove_dir_all(&blocktree_path);
}
fn make_test_window(
packet_receiver: Receiver<Packets>,
exit: Arc<... | Rust | 0 |
mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new(... | Rust | 0 |
tion::rotate(&mut matrix);
assert_eq!(matrix, result);
}
#[test]
fn test_0048_example_4() {
let mut matrix = vec![vec![1, 2], vec![3, 4]];
let result = vec![vec![3, 1], vec![4, 2]];
Solution::rotate(&mut matrix);
assert_eq!(matrix, result);
}
}
<gh_stars>0
use... | Rust | 0 |
lexivity
&& m_outer[outer_idx].different_to_all(m_inner)
&& m_inner[inner_idx].different_to_all(m_outer))
|| (!global_reflexivity
&& m_outer[outer_idx].different_to(&m_inner[inner_... | Rust | 0 |
qv(qv).unwrap()
}
pub fn d(&self) -> NullOr<&String>{
let qv = citem::get_immutable_str(self.ptr, "d").unwrap();
NullOr::from_qv(qv).unwrap()
}
pub fn run(&self) -> CListConst<RunCItem>{
CListConst::new(citem::get_cil(self.ptr, "run").unwrap(), self)
}
}
#[derive(Debug, PartialEq, Clone, Copy)]
pub struct ... | Rust | 0 |
ffi::safe::lua_pushrclosure(state, userdata_destructor::<T>, 0)?;
ffi::safe::lua_rawsetfield(state, -2, "__gc")?;
ffi::lua_pushboolean(state, 0);
ffi::safe::lua_rawsetfield(state, -2, "__metatable")?;
if let Some(f) = customize_fn {
f(state)?;
}
ffi::safe::lua_rawsetp(state, ffi::LU... | Rust | 0 |
class Solution:
def findCheapestPrice(self, n: int, flights: List[List[int]], src: int, dst: int, k: int) -> int:
graph = [[] for _ in range(n)]
minHeap = [(0, src, k + 1)] # (d, u, stops)
dist = [[math.inf] * (k + 2) for _ in range(n)]
for u, v, w in flights:
graph[u].append((v, w))
whil... | Python | 1 |
/// disabled interrupts for the concrete core is dropped.
#[inline(always)]
#[link_section = ".iram1.interrupt_csg_drop"]
fn drop(&mut self) {
#[cfg(any(esp32c3, esp32s2))]
unsafe {
vPortExitCritical()
};
#[cfg(not(any(esp32c3, esp32s2)))]
unsafe {
... | Rust | 0 |
import rospy
from std_msgs.msg import Float64MultiArray
from sensor_msgs.msg import JointState
import copy
def main():
rospy.init_node('shadow_moveit_demo')
joint_pub = rospy.Publisher('joint_states', JointState, queue_size=10)
while not rospy.is_shutdown():
joints_msg = rospy.wait_for_message("/t... | Python | 1 |
-literal.rs
// compile-flags: -Z parse-only -Z continue-parse-after-error
fn main() {
0b121; //~ ERROR invalid digit for a base 2 literal
0b10_10301; //~ ERROR invalid digit for a base 2 literal
0b30; //~ ERROR invalid digit for a base 2 literal
0b41; //~ ERROR invalid digit for a base 2 literal
0b... | Rust | 0 |
];
// please note we force each `ptrace::write` to be exactly ptrace_poke (8 bytes a time)
// instead of using `process_vm_writev`, because this function can be called in
// PTRACE_EXEC_EVENT, the process seems not fully loaded by ld-linux.so
// call process_vm_{readv, writev} would 100% fail.
for ... | Rust | 0 |
'],
['e', 'i', ' ', ' '], ['a', 'o', ' ', ' '], ['o', 'u', ' ', ' '],
['a', 'n', ' ', ' '], ['e', 'n', ' ', ' '], ['a', 'n', 'g', ' '],
['e', 'n', 'g', ' '], ['o', 'n', 'g', ' '],
];
// ["i", "ia", "ie", "iao", "iou", "ian", "in", "iang", "ing", "iong"]
pub const RHYME_TABLE_COLUMN_I : [[char; 4]; 10] = [... | Rust | 0 |
, 0, 0, 0),
command_names::WATCH => (-2, fr | NOSCRIPT, 1, -1, 1),
command_names::UNWATCH => (1, fr | NOSCRIPT, 0, 0, 0),
command_names::CLUSTER => (-2, ADMIN | READONLY, 0, 0, 0),
command_names::RESTORE => (-4, wm, 1, 1, 1),
command_names::RESTORE_ASKING => (-4, wm | ASKING, 1, ... | Rust | 0 |
# coding: utf-8
"""
codebeamer swagger API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 3.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # no... | Python | 1 |
Tag,
Other,
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
enum Minor {
This(u8),
Next1([u8; 1]),
Next2([u8; 2]),
Next4([u8; 4]),
Next8([u8; 8]),
More,
}
impl AsRef<[u8]> for Minor {
#[inline]
fn as_ref(&self) -> &[u8] {
match self {
Self::More => &[],
... | Rust | 0 |
hoices[0].delta.content}
# 添加助手响应到历史
return Message(
role="assistant",
content={
"content":full_response,
"reasoning":reasoning,
"elapsed":reasoning_elapsed
}
)
if __name__ == "__main__":
... | Python | 1 |
holder engagement")
return summary
def _define_engagement_next_steps(self, feedback_analysis: Dict[str, Any]) -> List[Dict[str, Any]]:
"""Define next steps for stakeholder engagement"""
next_steps = []
# Address low engagement
low_engagement_gr... | Python | 1 |
let cipher = vec_u8_from_hex_string(&input[2]);
let mut res: Vec<u8> = Vec::with_capacity(in1.len());
for (i, &c) in cipher.iter().enumerate() {
res.push(c ^ in1[i] ^ in2[i]);
}
println!("{:?}\n{:?}\n{:?}\n{:?}", in1, in2, cipher, hex_string_from_vec(&res));
}
use crate::bulma::ImageRati... | Rust | 0 |
us: 0;
position: relative;
top: 3px;
cursor: pointer;
}}
div[role=radiogroup] label p {{
font-weight: 500;
}}
div[role=radiogroup] label:nth-child({selected}) {{
border-bottom: 3px solid {cor};
}}
div[role=radiog... | Python | 1 |
from django.db import transaction
from rest_framework.serializers import ValidationError
from .db_service import get_my_reading_lists, delete_reading_list_book_instance, rotate_reading_list_order_by_deducting, \
does_book_belongs_to_reading_list, rotate_reading_list_order_by_adding
from common.base_db_service impor... | Python | 1 |
def expand_range(number_range_str: str) -> tuple[int, ...]:
"""Expand ranges like 2-5,8,22-45."""
numbers: list[int] = []
for number_range in number_range_str.split(","):
start_stop = number_range.split("-")
if len(start_stop) == 2:
start = int(start_stop[0])
stop = i... | Python | 1 |
]
fn test_get_zone_offset() {
// winter time in Warsaw, offset = +01:00
assert_eq!(Some(SECONDS_IN_HOUR), get_zone_offset("Europe/Warsaw", (2020, 10, 29), (9, 12, 3, 0)));
// summer time in Warsaw, offset = +02:00
assert_eq!(Some(2 * SECONDS_IN_HOUR), get_zone_offset("Europe/Warsaw", (2020, 6, 21), (1... | Rust | 0 |
ed features: `\"Win32_Networking_Clustering\"`*"]
pub const CLUS_RESTYPE_NAME_DFS: &str = "Distributed File System";
#[doc = "*Required features: `\"Win32_Networking_Clustering\"`*"]
pub const CLUS_RESTYPE_NAME_DFSR: &str = "DFS Replicated Folder";
#[doc = "*Required features: `\"Win32_Networking_Clustering\"`*"]
pub c... | Rust | 0 |
from ultralytics import YOLO
if __name__ == '__main__':
model = YOLO('yolov8.yaml') # build from YAML and transfer weights
# Train the model
results = model.train(data='coco.yaml', epochs=300, imgsz=640, batch=8,)
# # Load a model
# model = YOLO('F:/yolov8/ultralytics/runs/detect/train32/weight... | Python | 1 |
#!/usr/bin/env python
"""
Copyright (c) 2006-2024 sqlmap developers (https://sqlmap.org/)
See the file 'LICENSE' for copying permission
"""
from lib.core.data import logger
from plugins.generic.enumeration import Enumeration as GenericEnumeration
class Enumeration(GenericEnumeration):
def getBanner(self):
... | Python | 1 |
gs.parameter_xml, "rb")
bytes = f.read()
desc['parameter_xml_size'] = len(bytes)
desc['parameter_xml'] = base64.b64encode(zlib.compress(bytes,9)).decode('utf-8')
desc['mav_autopilot'] = 12 # 12 = MAV_AUTOPILOT_PX4
if args.airframe_xml != None:
f = open(args.airframe_xml, "rb")
bytes = f.read()
desc['airframe_xml... | Python | 1 |
if let ChildNumber::Normal { index } = path[0] {
path_found = Some(index)
}
}
Some(path) if xpub.wildcard == Wildcard::None && path.is_empty() => {
path_found = Some(0)
... | Rust | 0 |
Some(ImefCallback::Drop) => {
break; // this exits the loop and kills the thread
}
None => (),
}
}
}<reponame>robert-chiniquy/rust-aws-iam
use crate::model::{ConditionValue, QString};
use crate::offline::request::Environment;
use crate::offline::EvaluationError... | Rust | 0 |
from typing import Optional
from pydantic import BaseModel, Field
from sqlalchemy import Column, Integer, String, Boolean, DateTime, func
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class CompanyTable(Base):
__tablename__ = "company"
id = Column(Integer, primary_key=Tru... | Python | 1 |
import datetime
import math
import multiprocessing
def do_map(start=0, num=10):
# print(f'start: {start}----- ---- num: {num}')
postion = start
random_number = 1000 * 1000
mean = 0
while postion < num:
postion += 1
result = math.sqrt((postion - random_number) ** 2)
mean ... | Python | 1 |
by Syn.
Verbatim(Literal),
}
}
ast_struct! {
/// A UTF-8 string literal: `"foo"`.
pub struct LitStr {
repr: Box<LitRepr>,
}
}
ast_struct! {
/// A byte string literal: `b"foo"`.
pub struct LitByteStr {
repr: Box<LitRepr>,
}
}
ast_struct! {
/// A byte literal: `... | Rust | 0 |
import json
import logging
import boto3
from list_tasks import list_tasks
from error_handler import error_handler
# DynamoDBテーブルの初期化
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('TasksTable')
# ロガーの設定
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
def lambda_handler(event, contex... | Python | 1 |
failed");
assert_eq!(SyncPayload::GetHeaders, msg.payload_type());
info!("Send malformed message to node0 twice");
net.send(
NetworkProtocol::SYNC.into(),
peer_id,
vec![0, 0, 0, 0].into(),
);
sleep(3);
net.send(
NetworkProt... | Rust | 0 |
nt(tm[2] * 1000000000 % 1000000000),
))
pyFmt += "%s"
i += 2
continue
elif c1 == "p":
funcs.append(lambda cell, calType, tm: _(
"AM" if tm[0] < 12 else "PM",
))
pyFmt += "%s"
i += 2
continue
elif c1 == "P":
funcs.append(lambda cell, calType, tm: _(
"AM" if tm[0] <... | Python | 1 |
any chosen size by using the split_window opcode.
# Styles
Sets the text style to: Roman (if 0), Reverse Video (if 1), Bold (if 2), Italic (4), Fixed Pitch (8). In some interpreters (though this is not required) a combination of styles is possible (such as reverse video and bold). In these, changing to Roman should t... | Rust | 0 |
utc).isoformat(),
"direction": "inbound",
"channel_id": channel.id,
"channel_name": channel.name,
"author_id": message.author.id,
"author_name": message.author.display_name,
"src_lang": src,
"to_lang": PREFER... | Python | 1 |
with_types: bool,
}
/// Generates a label for a graphviz graph.
#[derive(Debug)]
enum DotLabel<'a> {
/// Plain label
SingleRow(&'a str),
/// A single-column table that has a row for each string in the array.
MultiRow(&'a [String]),
}
/// Generates a string that escapes characters that would problem... | Rust | 0 |
_COMMAND,
fullTest: TPMI_YES_NO,
rspAuthsArray: *mut TSS2L_SYS_AUTH_RESPONSE,
) -> TSS2_RC;
}
extern "C" {
pub fn Tss2_Sys_IncrementalSelfTest_Prepare(
sysContext: *mut TSS2_SYS_CONTEXT,
toTest: *const TPML_ALG,
) -> TSS2_RC;
}
extern "C" {
pub fn Tss2_Sys_IncrementalSelf... | Rust | 0 |
/// that resembles a linked list.
///
/// To pack a tree, use the pack method.
///
/// 
pub fn extend_unpacked<I, V>(&self, tree: &mut StreamBuilder<T, V>, from: I) -> Result<()... | Rust | 0 |
Labels for supervised model"
g = open(args.output_supervised,'w')
for cnt, (x,y) in enumerate(zip(test_chunks,list_max)):
print "Top "+args.num_sup_labels+" labels for topic "+str(cnt)+" are:"
g.write( "Top "+args.num_sup_labels+" labels for topic "+str(cnt)+" are:" +"\n")
for i2 in y:
... | Python | 1 |
from scapy.all import rdpcap, IP, TCP, Raw, DNS, DNSQR
PCAP_FILE = "sample-http-dns.pcap"
packets = rdpcap(PCAP_FILE)
dns_queries = []
http_requests = []
for pkt in packets:
# DNS Query
if pkt.haslayer(DNS) and pkt.haslayer(DNSQR):
try:
query = pkt[DNSQR].qname.decode()
dns_qu... | Python | 1 |
`], likely mutating its state.
fn cycle(&mut self);
}
<filename>spectrum-audio/src/config.rs<gh_stars>1-10
use std::io::Read;
use serde::de::DeserializeOwned;
use serde::{Deserialize, Serialize};
use serde_yaml;
pub trait ValidatedConfig {
fn validate(&self) -> Result<(), String>;
}
#[derive(Copy, Clone, Deb... | Rust | 0 |
flags.push(flag);
if flag & NEXT_FLAG == 0 {
next_flag = false
}
k = i;
}
Ok((k, flags))
}
fn parse_abstract_message<'a>(i: &'a [u8], amf3: &mut AMF3Decoder) -> AMFResult<'a, Vec<Element>> {
let (i, flags) = parse_abstract_message_flags(i)?;
let mut elements = Vec:... | Rust | 0 |
ceived and our settings.
Parity,
/// Triggered when the received character didn't have a valid stop bit.
Framing,
}
#[cfg(feature = "eh1_0_alpha")]
impl eh1_0_alpha::serial::Error for ReadErrorType {
fn kind(&self) -> eh1_0_alpha::serial::ErrorKind {
match self {
ReadErrorType::Ove... | Rust | 0 |
Icon::CalendarEventFill => '\u{f1d5}',
Icon::CalendarFill => '\u{f1d7}',
Icon::CalendarMinus => '\u{f1d9}',
Icon::CalendarMinusFill => '\u{f1d8}',
Icon::CalendarMonth => '\u{f1db}',
Icon::CalendarMonthFill => '\u{f1da}',
Icon::CalendarPlus => '\u{f1dd}',
... | Rust | 0 |
tcher::sources::{read_sources_file, Sources};
use std::{collections::HashMap, net::SocketAddr, path::Path};
use tracing_subscriber::prelude::*;
use tracing_subscriber::{fmt, EnvFilter};
static SERVICE_NAME: &str = "kubewarden-policy-server";
lazy_static! {
static ref VERSION_AND_BUILTINS: String = {
let b... | Rust | 0 |
'''
Bài 1: Sử dụng cây nhị phân tìm kiếm để giải bài toán (thống kê) số lượng ký tự có trong văn bản (không dấu)
1. Xây dựng cây cho biết nỗi ký tự có trong văn bản xuất hiện mấy lần
2. Nhập vào 1 ký tự. Kiểm tra ký tự đó xuất hiện bao nhiêu lần trong văn bản
'''
import os
class Node:
def __init__(self,key):
... | Python | 1 |
import zipfile
import shutil
import os
from modules.configs.MyConfig import config
import subprocess
from pathlib import Path
import nicegui
import time
import pponnxcr
import platform
import requests
import tarfile
def package_download_adb(platformstr = None):
target_adb_path = os.path.join(os.getcwd(), "too... | Python | 1 |
from datasets import load_dataset
from trl import GRPOTrainer, GRPOConfig
from transformers import AutoModelForCausalLM, AutoTokenizer
import os
dataset = load_dataset("trl-lib/tldr", split="train")
def reward_func(completions, **kwargs):
# Dummy reward function that rewards completions with more unique letters.
... | Python | 1 |
.fee_receiver = fee_receiver_keypair.pubkey();
assert_eq!(
TestReserve::init(
"sol".to_owned(),
&mut banks_client,
&lending_market,
&all_null_oracles,
RESERVE_AMOUNT,
config,
spl_token::native_mint::id(),
sol_us... | Rust | 0 |
R = ();
};
}
/// Internal macro. Do not use.
#[macro_export]
#[doc(hidden)]
macro_rules! _implement_register_field {
// Read without 'as' convert
(@R, $register_bit_order:ty, $(#[$field_doc:meta])* $field_name:ident: $field_type:ty $(:$field_bit_order:ident)? = RO $field_bit_range:expr) => {
$(#[$... | Rust | 0 |
#!/data/venv/hdp-env/bin python
# -*- coding: utf8 -*-
'''
@Author: xiangfu shi
@Contact: xfu_shi@163.com
@Time: 2019/12/22 9:20 PM
'''
import tensorflow as tf
from model_brain import BaseModel
class xDeepFM(BaseModel):
'''
DeepFM model
model feature 中
wide配置直接使用正常wide and deep 方式配置
deep配置只能配置embedd... | Python | 1 |
ameters(self) -> List[Dict[str, Any]]:
"""PaddleOCRの調整可能パラメータ"""
return [
{
"name": "lang",
"label": "認識言語",
"type": "select",
"default": "japan",
"options": [
{"value": "japan", "label": "日本語... | Python | 1 |
Borrowed(_))));
assert!(result
.languages_c2s
.iter()
.all(|s| matches!(s, Cow::Borrowed(_))));
assert!(result
.languages_s2c
.iter()
.all(|s| matches!(s, Cow::Borrowed(_))));
}
#[test]
fn example_channel_open_packet() {
const SSH_MSG_CHANNEL_OPEN: u8 = 90;
... | Rust | 0 |
-aware interventions: 4")
print(f"\n{self.ui.colors['bold']}Key Insights:{self.ui.colors['reset']}")
print(f" 🔍 Browser history reveals true pattern context")
print(f" 📧 Gmail is the #1 time sink (21k visits!)")
print(f" 💻 Heavy localhost usage confirms productive coding")... | Python | 1 |
ict={H_out_true: y_train_data[j], L: in_L, is_train: True})
total_train_loss = total_train_loss + train_loss
# print('this single train cost: {:.7f}'.format(train_loss))
print("train cost :" + str(i) + " " + str(j) + " finished.")
for j in range(x_valid_data.shape[0]):
... | Python | 1 |
# LICENSE HEADER MANAGED BY add-license-header
#
# Copyright 2024-2025 Syntropix
#
# 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 ... | Python | 1 |
handle(&response_rx);
unsafe { resh.add(); }
loop {
let id = sel.wait();
if id == reqh.id() {
match reqh.recv() {
Ok(Request::SendMessage(msg)) =>
match msg.as_str_vec().as_slice() {
["!d"] => return state.quit(false),
... | Rust | 0 |
ALID_FAX_FILE: "Invalid fax file",
ERROR_FAX_FILE_NOT_FOUND: "Fax file not found",
ERROR_INTERNAL : 'Unknown internal error',
}
class Error(Exception):
def __init__(self, opt=ERROR_INTERNAL):
self.opt = opt
self.msg = ERROR_STRINGS.get(opt, ERROR_STRI... | Python | 1 |
AddList` together specify files that are to be packed into
/// `PackedFile`. Each string in `AddList` is zero-delimited (ends in zero), and the `AddList` string ends with an extra zero
/// byte, i.e. there are two zero bytes at the end of `AddList`.
///
/// `Flags` can contain a combination of the following values refl... | Rust | 0 |
ptr(),
enc,
C,
LM,
1i32,
max_decay,
lfe,
)
}
if 0 == intra {
let intra_buf: *mut c_uchar;
let mut enc_intra_state: ec_enc;
let tell_intra: opus_int32;
let nstart_bytes: opus_uint32;
let nintra_bytes: opus_uint32;
let mut save_bytes: opus_uint32;
let badness2: c_int;
tell_intra = ec... | Rust | 0 |
path, bg);
let mut path = Path::new();
path.circle(x + (pos * w).floor(), cy, kr - 0.5);
canvas.stroke_path(&mut path, Paint::color(Color::rgba(0, 0, 0, 92)));
canvas.restore();
}
fn draw_thumbnails<T: Renderer>(canvas: &mut Canvas<T>, x: f32, y: f32, w: f32, h: f32, images: &[ImageId], t: f32) {
... | Rust | 0 |
j = int(input())
a = int(input())
jerseys = ['']*j
for i in range(j):
jeans = input()
jerseys[i] += str(jeans)
cnt = 0
for s in range(a):
order = input().split()
if order[0] == 'S' and jerseys[int(order[1]) - 1] != '*':
cnt += 1
jerseys[int(order[1]) - 1] = '*'
elif order[0] == 'M... | Python | 1 |
R {
type Target = crate::FieldReader<bool, LEDPOL_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `LEDPOL` writer - LED output pin polarity."]
pub struct LEDPOL_W<'a> {
w: &'a mut W,
}
impl<'a> LEDPOL_W<'a> {
#[doc = r"Writes `variant` to the field"]
... | Rust | 0 |
# This script takes csvs produced by parse_logs.py and combines them
# into a single CSV file
import ast
import csv
import sys
from collections import defaultdict
assert len(sys.argv) == 3
RESULTS = defaultdict(dict)
for side, f in zip(["static", "dynamic"], sys.argv[1:]):
with open(f) as f:
reader = c... | Python | 1 |
) -> Self {
/// use ::ensogl_core::application::command::*;
/// let source = FrpOutputsSource::new(network);
/// let mut status_map: HashMap<String, frp::Sampler<bool>> = default();
/// let mut command_map: HashMap<String, Command> = default();
/// frp::extend... | Rust | 0 |
16usize,
concat!(
"Offset of field: ",
stringify!(__va_list_tag),
"::",
stringify!(reg_save_area)
)
);
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum GuiControlState {
GUI_STATE_NORMAL = 0,
GUI_STATE_FOCUSED = 1,
... | Rust | 0 |
4, 3, 4, 0, 0, 0, 0,
9, 8, 5, 8, 11, 11, 11, 11, 5, 2, 5, 2, 1, 1, 1, 1,
0, 6, 5, 6, 10, 10, 10, 10, 5, 4, 3, 4, 0, 0, 0, 0,
9, 8, 5, 8, 11, 11, 11, 11, 5, 2, 5, 2, 1, 1, 1, 1,
5, 6, 5, 6, 10, 10, 10, 10, 5, 4, 3, 4, 0, 0, 0, 0,
9, 8, 5, 8, 11, 11, 11, 11, 5, 2, 5, 2, 1, 1, 1, 1,
5, 6, 5, 6, 10, 10, 10, 10, 5, 4,... | Rust | 0 |
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | Python | 1 |
proxy for field `UDE`"]
pub struct UDE_W<'a> {
w: &'a mut W,
}
impl<'a> UDE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
... | Rust | 0 |
Some(protocol) = protocol {
let protocol_value = match protocol {
OptionValue::String(s) => {
s.to_string()
}
_ => {
// TODO: return error here
"".to_string()
}
};
... | Rust | 0 |
),
&mut internal_walls,
rng,
);
let mut grid = grid.clone();
for wall in internal_walls {
wall.draw(&mut grid);
}
grid
}
<reponame>tomasvdw/bitcrust<gh_stars>10-100
//! Transaction parsing and verification
//!
//!
use std::fmt;
use std::time::{Instant,Duration};
use itertoo... | Rust | 0 |
npUint8ImageData = self._percentileStretch(npImageData, dblPercentile)
npUint8ImageData = np.stack((npUint8ImageData,) * 3, axis=-1)
return ProcessedImageData(strImgName, npUint8ImageData, objImageData.tupleOriginalShape, "converted",
objI... | Python | 1 |
_bounds();
if let Some(p) = pb {
if p.len() != 4 {
error!("Expected four values for \"pixelbounds\" parameter. Got {}.", np);
} else {
let b = Bounds2i::from_points(
&Point2i::new(p[0], p[2]),
&Point2i::new(p[1], p[3]));
pbounds = ... | Rust | 0 |
dWorkflowOptionsBase.validateAndSanitizeOptions(self,options)
if options.excludedRegions is not None :
for excludeIndex in range(len(options.excludedRegions)) :
options.excludedRegions[excludeIndex] = \
checkFixTabixIndexedFileOption(options.excludedRegions[exclu... | Python | 1 |
2.9059, -3.9017]]],
dtype=config.param_dtype,
device=activation_device,
)
elif case_key == "case3":
logits_ref = torch.tensor(
[[[-5.7833e+00, -4.1559e+00, -7.2531e-01, -1.2458e+00, 5.3105e+00,
-1.1368e+00, 2.0874e+00, 3.9418e-01, -3.1351e+00, -1.59... | Python | 1 |