text string | label_name string | labels int64 |
|---|---|---|
t_RICS_Query::NULL,
RICS_Request_RICS_Query::LIST_SINK,
RICS_Request_RICS_Query::WHO_AM_I,
RICS_Request_RICS_Query::SET_FLAG_CAN_BROADCAST,
RICS_Request_RICS_Query::CLEAR_FLAG_CAN_BROADCAST,
RICS_Request_RICS_Query::DAEMON_QUIT,
];
values
}... | Rust | 0 |
import numpy as np
import matplotlib.pyplot as plt
from vib_verify_mms import solver
def u_exact(t, I, V, A, f, c, m):
"""Found by solving mu'' + cu = F in Wolfram alpha."""
k_1 = I
k_2 = (V - A*2*np.pi*f/(c - 4*np.pi**2*f**2*m))*\
np.sqrt(m/float(c))
return A*np... | Python | 1 |
.24, self.25, self.26, self.27, self.28)
}
}
pub trait Tuple30Call<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29> {
fn call<F: FnOnce(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, ... | Rust | 0 |
;
pub type IRdcGeneratorFilterMaxParameters = *mut ::core::ffi::c_void;
pub type IRdcGeneratorParameters = *mut ::core::ffi::c_void;
pub type IRdcLibrary = *mut ::core::ffi::c_void;
pub type IRdcSignatureReader = *mut ::core::ffi::c_void;
pub type IRdcSimilarityGenerator = *mut ::core::ffi::c_void;
pub type ISimilarity... | Rust | 0 |
().poll(cx) {
Poll::Ready(res) => {
// the future is finished, drop it
this.query_future = None;
match res {
Ok(body) => {
// put everything in the chunk
... | Rust | 0 |
import asyncio
from metagpt.roles.mi.ml_engineer import MLEngineer
async def main(requirement: str):
role = MLEngineer(auto_run=True, use_tools=True)
await role.run(requirement)
if __name__ == "__main__":
data_path = "your_path_to_icr/icr-identify-age-related-conditions"
train_path = f"{data_path}/... | Python | 1 |
."]
_10,
#[doc = "No clock input"]
_11,
}
impl FTM0CLKSELW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
FTM0CLKSELW::_00 => 0,
FTM0CLKSELW::_01 => 1,
FTM0CLKSELW::_10 => 2,
FTM0CLKSELW::_11... | Rust | 0 |
#Embedded file name: /Users/versonator/Jenkins/live/output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/Launchpad_Pro/MultiButtonElement.py
from __future__ import absolute_import, print_function, unicode_literals
from .ConfigurableButtonElement import ConfigurableButtonElement
class MultiButtonElement(... | Python | 1 |
from app.models import db,environment,SCHEMA
from app.models.parts.mouth import Mouth
from sqlalchemy.sql import text
def seed_mouths():
gray_zipper= Mouth(
type='gray_zipper',
img_url='https://res.cloudinary.com/dmg8yuivs/image/upload/v1726714115/mouth1_o1mfeb.png'
)
gray= Mouth(
t... | Python | 1 |
推断) what type we want to use based on the value and how we use it.
pub fn run() {
// Default is "i32"
let x = 1;
// Default is "f64"
let y = 2.5;
// Add explicit type
let z: i64 = 45454545;
// Find max size
println!("Max i32: {}", std::i32::MAX);
println!("Max i64: {}", std::i64::MAX);
// Boolean
let is... | Rust | 0 |
och {
/// The epoch index.
pub epoch_index: u64,
/// The starting slot of the epoch.
pub start_slot: SlotNumber,
/// The duration of this epoch.
pub duration: SlotNumber,
/// The authorities and their weights.
pub authorities: Vec<(AuthorityId, BabeAuthorityWeight)>,
/// Randomness for this epoch.
pub randomn... | Rust | 0 |
AddressInt,
message: String,
mut original_error: ClientError,
time: u32,
without_transaction: bool,
) -> ClientResult<()> {
let result = get_local_error(context, address, message, time, without_transaction).await;
match result {
Err(err) => {
const EXIT_CODE_FIELD: &str = "e... | Rust | 0 |
or },
}
impl ResponseError for BadgeError {
fn error_response(&self) -> HttpResponse {
match *self {
BadgeError::Unauthorised => HttpResponse::Unauthorized().json("Unauthorised"),
BadgeError::NoRunAvailable => HttpResponse::NotFound().json("Not run found"),
BadgeError::I... | Rust | 0 |
ate: ScriptDate::new(2004, 05, 01).unwrap(),
name: "Arabic",
name_french: "arabe",
num: "160",
});
list.push(ScriptCode {
alias: None,
code: "Aran",
date: ScriptDate::new(2014, 11, 15).unwrap(),
name: "Arabic (Nastaliq variant)",
name_french: "arab... | Rust | 0 |
in retval else 1
retval += ["speech_ref{}".format(n) for n in range(st, MAX_REFERENCE_NUM + 1)]
retval += ["noise_ref{}".format(n) for n in range(1, MAX_REFERENCE_NUM + 1)]
retval += ["text_spk{}".format(n) for n in range(1, MAX_REFERENCE_NUM + 1)]
retval += ["src_text"]
retval =... | Python | 1 |
import random
import logging
import torch
import numpy as np
from sklearn.metrics import precision_recall_fscore_support, accuracy_score
from model import ElectraForMultiLabelClassification
from transformers import (
ElectraConfig,
ElectraTokenizer,
)
CONFIG_CLASSES = {
"koelectra-small-v1": ElectraCon... | Python | 1 |
Clone, Debug)]
pub struct TypeParam {
pub name: Name,
pub trait_bounds: HashSet<TraitId>,
}
impl TypeParam {
pub fn new(name: Name) -> TypeParam {
TypeParam {
name,
trait_bounds: HashSet::new(),
}
}
}
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct... | Rust | 0 |
"""Plot significance image with HESS and MILAGRO colormap."""
from astropy.visualization import LinearStretch
from astropy.visualization.mpl_normalize import ImageNormalize
import matplotlib.pyplot as plt
from gammapy.maps import Map
from gammapy.visualization import colormap_hess, colormap_milagro
filename = "$GAMMA... | Python | 1 |
import os
from designer.utils.utils import get_config_dir, get_fs_encoding
RECENT_FILES_NAME = 'recent_files'
class RecentManager(object):
'''RecentManager is responsible for retrieving/storing the list of recently
opened/saved projects.
'''
def __init__(self):
super(RecentManager, self... | Python | 1 |
pub updated_timestamp: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Assessment {
#[serde(skip_serializing)]
pub id: Option<String>,
#[serde(skip_serializing)]
pub name: Option<String>,
#[serde(rename = "eTag", skip_serializing_if = "Option::is_none")]
... | Rust | 0 |
OT_REFRESH_TOKEN")
.expect("BOT_REFRESH_TOKEN is not set");
let client_id = env::var("BOT_CLIENT_ID")
.expect("BOT_CLIENT_ID is not set");
let client_secret = env::var("BOT_CLIENT_SECRET")
.expect("BOT_CLIENT_SECRET is not set");
Pants::new(&user_agent, access_token,
&refres... | Rust | 0 |
rust
/// use internment::Intern;
///
/// let x = Intern::new("hello");
/// let y = Intern::new("world");
/// assert_ne!(x, y);
/// assert_eq!(x, Intern::new("hello"));
/// assert_eq!(*x, "hello"); // dereference an Intern like a pointer
/// ```
pub struct Intern<T> {
pointer: *const T,
}
impl<T> Clone for Intern<... | Rust | 0 |
import os
import json
import random
import base64
import datetime
import time
from colorama import Fore
from pathlib import Path
import ctypes
import tls_client
import shutil
import requests
from concurrent.futures import ThreadPoolExecutor, as_completed
def clear_screen():
os.system('cls' if os.name == 'nt' else ... | Python | 1 |
}
Entry::Vacant(entry) => {
fx_log_info!("Adding new peer for {}", device_id);
let peer = match avdtp::Peer::new(channel) {
Ok(peer) => peer,
Err(e) => {
f... | Rust | 0 |
compact(&self, start: &'a [u8], limit: &'a [u8]);
}
impl<'a> Compaction<'a> for Database {
fn compact(&self, start: &'a [u8], limit: &'a [u8]) {
unsafe {
leveldb_compact_range(self.database.ptr,
start.as_ptr() as *mut c_char,
... | Rust | 0 |
, 0.31, 0.14, 0.02, 0.0, 0.0,
],
},
SurfaceMonthlyRadiation {
zone: D2c,
orientation: E,
beta: 90.0,
gamma: -90.0,
dir: [
15.7, 22.51, 39.04, 43.83, 52.65, 64.85, 72.27, 66.48, 44.19, 33.98, 22.22, 15.74,
],
dif: [
17.56, 21... | Rust | 0 |
ibrary/index', 'library.tex',
'The Python Library Reference', _stdauthor, 'manual'),
('reference/index', 'reference.tex',
'The Python Language Reference', _stdauthor, 'manual'),
('tutorial/index', 'tutorial.tex',
'Python Tutorial', _stdauthor, 'manual'),
('using/index', 'using.tex',
'Pyt... | Python | 1 |
// Handle strings in the binary form of:
// 0b01101x1
// along with don't care character x (replaced with 0)
i64::from_str_radix(&str::replace(stripped, "x", "0"), 2)
} else {
text.parse::<i64>()
})
.ok()... | Rust | 0 |
1 value reqd", stringify!($arg));
return Err(format!("{} At least 1 value reqd", stringify!($arg)).into());
}
if $name.iter().any(|&v| v.is_nan() || v == 0.0) {
error!("{} Range has a unexpected nan or 0.0", stringify!($arg));
return Err(format!("{} Range has a unexpe... | Rust | 0 |
device)
a1_logits, _ = self.model.action_module(self.inputs, zeros)
a1_dist = TorchCategorical(a1_logits)
return a1_dist
def _a2_distribution(self, a1):
a1_vec = torch.unsqueeze(a1.float(), 1)
_, a2_logits = self.model.action_module(self.inputs, a1_vec)
a2_dist = Tor... | Python | 1 |
c> {
Arc::new(UdpProtocol {})
}
}
impl protocol::Protocol for UdpProtocol {
fn type_(&self) -> protocol::ProtocolType {
protocol::ProtocolType::Udp
}
fn handler(
&self,
payload: buffer::Buffer,
src: ip::Addr,
dst: ip::Addr,
interface: &Interface,
... | Rust | 0 |
"""
Copyright (C) 2007, 2008 Eric Ehlers
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modify it
under the terms of the QuantLib license. You should have rece... | Python | 1 |
ing Token)
pub amount: Balance,
pub min_deposit: Balance,
pub nft_balance: Option<HashMap<NFTTokenId, U128>>,
pub metadata: Option<FarmSeedMetadata>
}
#[derive(BorshSerialize, BorshDeserialize)]
#[cfg_attr(feature = "test", derive(Clone))]
pub struct FarmSeed {
/// The Farming Token this FarmSeed r... | Rust | 0 |
emplate will be used.",
min_length=1,
),
] = None
class CriteriaUpdateWithCriteriaKeyInput(PatchInputModel):
parameter_terms: Annotated[
list[TemplateParameterMultiSelectInput],
Field(
description="An ordered list of selected parameter terms that are used to rep... | Python | 1 |
# Atividade 08:
# Média de Notas:
# Desenvolva um programa que solicite as notas dos alunos até
# que o usuário digite -1. Calcule e exiba a média das notas
# inseridas.
c = 0
n = 0
m = 0
while n >= 0:
n = float(input('Insira a nota: '))
if n >= 0:
c += 1
n += n
else:
| Python | 1 |
from django.urls import reverse
from app_home.models import PizzaModel
import pytest
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_c... | Python | 1 |
does not define function '{}'", self.name(), name);
return Err(vec![TypeErr::new(pos, &msg)]);
}
Ok(FunUnion { union })
}
pub fn field(&self, name: &str, ctx: &Context, pos: &Position) -> TypeResult<FieldUnion> {
let union: HashSet<Field> =
self.union.iter().map... | Rust | 0 |
for zombie in self.game.zombie_list:
# 如果僵尸生命值小于等于 40,停止啃食并跳过本次循环
if zombie.hp <= 40:
if zombie.eat:
zombie.eat = False
continue
for chomper in self.game.chomper_list:
# 如果食人花处于进食状态
if chomper.st... | Python | 1 |
k,
Algorithm::X15,
Algorithm::Nist5,
Algorithm::NeoScrypt,
Algorithm::Lyra2RE,
Algorithm::WhirlpoolX,
Algorithm::Qubit,
Algorithm::Quark,
Algorithm::Axiom,
Algorithm::Lyra2REv2,
Algorithm::ScryptJaneNf16,
Algorithm::Blake... | Rust | 0 |
, K, V, C>>>;
impl<'a, T, K: Ord, V: ?Sized, C: RefCounter> PartialEq for Node<T, K, V, C> {
fn eq(&self, other: &Self) -> bool {
ptr::eq(self, other)
}
}
impl<'a, T, K: Ord, V: ?Sized, C: RefCounter> Eq for Node<T, K, V, C> {}
impl<'a, T, K: Ord, V: ?Sized, C: RefCounter> Hash for Node<T, K, V, C> {
fn hash<H:... | Rust | 0 |
_valid_raw_tx(pri_key, height, metadata);
raw.chain_id = gen_invalid_chain_id();
gen_valid_signed_tx(raw, pri_key)
}
pub fn gen_invalid_cycles_price_signed_tx(
pri_key: &Secp256k1PrivateKey,
height: u64,
metadata: &Metadata,
) -> SignedTransaction {
let mut raw = gen_valid_raw_tx(pri_key, heigh... | Rust | 0 |
my_favourite_num = 3.1415 | Python | 1 |
of the corss is
/// executed against the other side of the cross. The two sides potentially have different quantities.
#[serde(rename = "4")]
CrossSamePriceCrossTradeIsExecutedWithExistingOrdersWithTheSamePriceInThisCaseOtherOrdersExistWithTheSamePriceTheQuantityOfTheCrossIsExecutedAgainstTheExistingOrdersAndQuotes... | Rust | 0 |
def f(my_dict):
result = {v: k for k, v in my_dict.items()}
return result | Python | 1 |
s = table.querySelectorAll('tbody tr');
searchInput.addEventListener('keyup', function() {{
const searchTerm = searchInput.value.toLowerCase();
rows.forEach(row => {{
const text = row.textContent.toLowe... | Python | 1 |
e incorporate a variety of heuristics and are mostly described in Press and Teukolsky's
/// [Adaptive Stepsize Runge-Kutta Integration, Computers in Physics 6, 188
/// (1992)](https://doi.org/10.1063/1.4823060).
mod adaptive_stepping_params {
/// Safety factor to use when modifying time steps. This makes a revised ... | Rust | 0 |
x55, 0x39, 0xfc, 0x61, 0xa7, 0xde, 0xa5,
0xff, 0x80, 0x31, 0x39, 0x14, 0xf6, 0xb6, 0x07, 0x6c, 0xd7, 0xa4, 0x10, 0xa0,
0x87, 0x55, 0x4d, 0xe5, 0xa5, 0x26, 0xc1, 0x99, 0x0e, 0x58, 0x19, 0xae, 0xc3,
0xbf, 0xe8, 0x16, 0x48, 0xe0, 0x85, 0x96, 0x51, 0x18, 0x72, 0xb8, 0x0f, 0x0... | Rust | 0 |
pages);
// bucket.insert(hash, value);
}
fn find_bucket_index(&self, hash: u64, round: u8) -> &BucketIndex {
let index = hash % (2u64).pow(round.into());
let bucket_index = &self.bucket_indexes[index as usize];
if bucket_index.round != round {
return self.find_bucket... | Rust | 0 |
o': ['Flt1', 'Slco1a4', 'Adgrl4', 'Ly6c1', 'Slc2a1', 'Klf2', 'Mecom', 'Bsg', 'Ly6a', 'Pltp'],
'L2/3 IT': ['Lingo2', 'Dscaml1', 'Gpc6', 'Fam19a1', 'Lrrtm4', 'Slit3', 'Cux2', 'Unc5d', 'Fstl4', 'Car10'],
'L5 ET': ['Fam19a1', 'Tox', 'Sgcz', 'Robo1', 'Galntl6', 'Gm2164', 'Dscaml1', 'Gm28928', 'Pex5l', 'Ralyl'],
... | Python | 1 |
import contextlib
import copy
import logging
from park.envs.circuit.simulator.utility.logging.formatter import _FormatBuilder
__all__ = ['context_handler', 'context_formatter']
@contextlib.contextmanager
def context_formatter(logger: logging.Logger, format_builder: _FormatBuilder):
handlers = copy.copy(logger.h... | Python | 1 |
ponents
def get_dummy_inputs(self, device, seed=0):
if str(device).startswith("mps"):
generator = torch.manual_seed(seed)
else:
generator = torch.Generator(device=device).manual_seed(seed)
inputs = {
"prompt": "horse",
"generator": generator,
... | Python | 1 |
: ::vcell::VolatileCell<u32>,
}
#[doc = "RTC Control Register"]
pub mod rtcctl;
#[doc = "RTC Interrupt Register: Enable"]
pub struct INTEN {
register: ::vcell::VolatileCell<u32>,
}
#[doc = "RTC Interrupt Register: Enable"]
pub mod inten;
#[doc = "RTC Interrupt Register: Status"]
pub struct INTSTAT {
register: :... | Rust | 0 |
# encoding: utf-8
"""
Extra capabilities for IPython
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this ... | Python | 1 |
// assumes.push(forall);
// buf.push(res)
// }
// _ => (),
// }
// }
// buf.pop().map(|head| (head, assumes))
None
}
#![feature(test)]
#![feature(const_generics, const_evaluatable_checked)]
#![allow(incomplete_features)]
extern crate test;
use test::{... | Rust | 0 |
"""
Write a function to find the kth element in the given array using 1-based indexing.
assert kth_element([12,3,5,7,19], 2) == 3
"""
def kth_element(arr, k):
"""
:param arr: array
:param k: kth element
:return: kth element
"""
if k < 1 or len(arr) < k:
return None
else:
retu... | Python | 1 |
ef test_no_ctypes(monkeypatch) -> None:
def _fake_import(name: str, *args, **kwargs):
if name == "ctypes":
raise ModuleNotFoundError(f"No module named {name}")
return importlib.__import__(name, *args, **kwargs)
with suppress(KeyError):
monkeypatch.delitem(sys.modules, "whee... | Python | 1 |
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<FMOD_ADVANCEDSETTINGS>())).maxFADPCMCodecs as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(FMOD_ADVANCEDSETTINGS),
"::",
stringify!(maxFADPCM... | Rust | 0 |
nfo['phdefJobID'])[0]
startDate = phdefJobInfo['startDate']
endDate = phdefJobInfo['endDate']
phdefJobID = jobInfo['phdefJobID']
print(f"startDate: {startDate}")
print(f"endDate: {endDate}")
print(f"phdefJobID: {phdefJobID}")
sql = f'SELECT location, type FROM ... | Python | 1 |
point.low, width);
let watchpoint_upper = state.bv_from_u64(watchpoint.high, width);
// There are exactly 3 possibilities for how the watchpoint could be triggered:
//
// - the lower endpoint of the current mem read/write is contained in the watched interval
// current mem op:... | Rust | 0 |
rements[-1] + 21, 1).reshape(-1, 1)
positive_future = model_positive.predict(future_increments)
negative_future = model_negative.predict(future_increments)
# Plot future predictions
ax.plot(future_increments, positive_future, linestyle='--', color='lightgreen', label='True Positive Tren... | Python | 1 |
Ok(txs) => {
debug!(
target: LOG_TARGET,
"monitor_transactions done to stage {:?} with tx_ids: {:?}", wait_stage, txs
);
println!("Done! All transactions monitored to {:?} stage.", wait_stage);
},
Err(_e... | Rust | 0 |
from dataclasses import dataclass, field
from enum import IntEnum
class NoteType(IntEnum):
EMPTY = 0
NOTE = 1
OFF = 2
# note effects in furnace tracker (chip: PC Engine).
class Effect(IntEnum):
Arpeggio = 0x00
PitchSlideUp = 0x01
PitchSlideDown = 0x02
Portamento = 0x03
Vibrato = 0x04
... | Python | 1 |
import sqlite3
import numpy as np
db = sqlite3.connect(":memory:")
db.enable_load_extension(True)
db.load_extension("./dist/vec0")
db.execute("select load_extension('./dist/vec0', 'sqlite3_vec_raw_init')")
db.enable_load_extension(False)
x = np.array([[0.1, 0.2, 0.3, 0.4], [0.9, 0.8, 0.7, 0.6]], dtype=np.float32)
y ... | Python | 1 |
import streamlit as st
import torch
from model import Model
from geopy.distance import geodesic
from streamlit_folium import st_folium
import folium
if 'click_count' not in st.session_state:
st.session_state['click_count'] = 0
if 'start_coords' not in st.session_state:
st.session_state['start_coords'] = None
i... | Python | 1 |
curr_tx = 0;
curr_rx = 0;
timestamp = new_time;
}
//当空闲超过时间后发送心跳
if idle_count > 30 {
//当发送激活消息但依然未收到任何回复
if wait_active_resp {
log::warn!("没有收到激活消息。退出。id:{}", self.id);
return;
}
if let Ok(send_msg) = self.protocol.encode_message(&mut active_test) {
if let Err(e) =... | Rust | 0 |
return Err(format!("Unable to create out file directory: {}", why));
}
let command_name = String::from(args[0].as_str());
let command_args = &args[1..args.len()];
let command = Command::new(&command_name)
.args(command_args)
.output()
.expect(format!(... | Rust | 0 |
input.chars().all(is_valid_char)
}
/// Add `field` and `payload` to journal fields `data` with explicit length encoding.
///
/// Write
///
/// 1. the field name,
/// 2. an ASCII newline,
/// 3. the payload size as LE encoded 64 bit integer,
/// 4. the payload, and
/// 5. a final ASCII newline
///
/// to `data`.
///
... | Rust | 0 |
use to_string::{Counter, StringWithSourceMap, ToString};
const BASE64_ALPHABET: &[u8; 64] =
b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/// Adapted from [vlq](https://github.com/Rich-Harris/vlq/blob/822db3f22bf09148b84e8ef58878d11f3bcd543e/src/vlq.ts#L63)
fn vlq_encode_integer_to_buffer(... | Rust | 0 |
// Symbol Character Set
}
if unicodes_contains('þ') && has_ascii && has_lineart {
code_page_ranges.push(54); // MS-DOS Icelandic
}
if unicodes_contains('╚') && has_ascii {
code_page_ranges.push(62); // WE/Latin 1
code_page_ranges.push(63); /... | Rust | 0 |
data.append([cleaned_sentences, label])
with codecs.open(output_file_name, 'w', encoding='utf-8') as output_file:
json.dump(data, output_file)
# @ruffus.transform(
# clean_data,
# ruffus.suffix(".json"), ".dictionary.json")
# def build_word_dictionary(input_file_name, output_file_name):
#... | Python | 1 |
sert_eq!(List::len(&storage), 0);
assert!(List::items(&storage).is_empty());
}
#[test]
fn map() {
let mut overlay = HashMap::new();
let storage = RefCell::new(&mut overlay);
assert!(Map::get(&5, &storage).is_none());
Map::insert(&5, &[1; 32], &storage);
assert_eq!(Map::get(&5, &storage), Some([1; 32]));... | Rust | 0 |
import numpy as np
import kineticstoolkit.lab as ktk
import matplotlib.pyplot as plt
from fun_XprocessData import obtenir_max_points
c3d_filenames = [
#chemin
]
num_points = obtenir_max_points(c3d_filenames)
def get_ankleF_shinR(side, c3d_filenames, num_points):
if side == 'R':
markers = ktk.read_c3... | Python | 1 |
),
("442227", "广东省白沙县"),
("442228", "广东省昌江县"),
("442229", "广东省西沙群岛、南沙群岛、中沙群岛"),
("442300", "广东省汕头地区"),
("442301", "广东省汕头市"),
("442302", "广东省潮州市"),
("442321", "广东省潮安县"),
("442322", "广东省澄海县"),
("442323", "广东省饶平县"),... | Rust | 0 |
{
// Test vector from https://tools.ietf.org/html/rfc7714#section-16.2.2
let m = &[
0x47, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x20, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x6d, 0x6e,
0x69, 0x73, 0x20, 0x64, 0x69, 0x76, 0x69, 0x73, 0x61, 0x20, 0x69, 0x6e, 0x20, 0x70,
... | Rust | 0 |
import os
from typing import Union
import chardet
from bella_openapi import StandardDomTree
from init.settings import user_logger
def get_file_type(file_path: str) -> str:
"""
Get the file type from a file path.
Args:
file_path (str): The file path.
Returns:
str: The file type.
... | Python | 1 |
valent
/// for this method.
///
/// # Panics
///
/// * (debug) The socket must be opened as a UDP socket.
///
/// # Example
///
/// ```no_run
/// # use embedded_hal_mock as h;
/// # let mut w5500 = w5500_ll::blocking::vdm::W5500::new(h::spi::Mock::new(&[]), h::pin::Mock::new(... | Rust | 0 |
_global_queues = None
_queues_interface = None
def getQueues():
return _global_queues
def startUpQueues(my_interface=None):
from GangaCore.Utility.logging import getLogger
logger = getLogger()
global _global_queues
global _queues_interface
if not my_interface:
import GangaCore.GPI
... | Python | 1 |
test_from_str_ipv6() {
assert_eq!(Some(Ipv6Addr(0, 0, 0, 0, 0, 0, 0, 0)), FromStr::from_str("0:0:0:0:0:0:0:0"));
assert_eq!(Some(Ipv6Addr(0, 0, 0, 0, 0, 0, 0, 1)), FromStr::from_str("0:0:0:0:0:0:0:1"));
assert_eq!(Some(Ipv6Addr(0, 0, 0, 0, 0, 0, 0, 1)), FromStr::from_str("::1"));
asser... | Rust | 0 |
3 = Button("RIGHT_THUMB")
A = Button("A")
B = Button("B")
X = Button("X")
Y = Button("Y")
UP = Button("DPAD_UP")
DOWN = Button("DPAD_DOWN")
LEFT = Button("DPAD_LEFT")
RIGHT = Button("DPAD_RIGHT")
START = Button("START")
BACK = Button("BACK")
buttons = {
"LEFT_JOYSTICK_UP": LEFT_JOYSTICK_UP,
"LEFT_JOYSTICK_DOW... | Python | 1 |
BOL_CIRCLED_NUMBER_EIGHTEEN: u32 = 0x2471;
/// 全角 JIS 記号 CIRCLED_NUMBER_NINETEEN
pub const WIDE_JIS_SYMBOL_CIRCLED_NUMBER_NINETEEN: u32 = 0x2472;
/// 全角 JIS 記号 CIRCLED_NUMBER_TWENTY
pub const WIDE_JIS_SYMBOL_CIRCLED_NUMBER_TWENTY: u32 = 0x2473;
/// 半角 JIS 記号 CIRCLED_LATIN_SMALL_LETTER_A
pub const NARROW_JIS_SYMBO... | Rust | 0 |
)
flair_result = self._convert_to_recognizer_result(ent, explanation)
results.append(flair_result)
return results
def _convert_to_recognizer_result(self, entity, explanation) -> RecognizerResult:
entity_type = self.PRESIDIO_EQUIVALENCES.get(entity.tag, entity.tag)
... | Python | 1 |
from phi.docker.app.jupyter.jupyter import Jupyter
| Python | 1 |
'), nargs='?',
help="""optional output CSV file where rows are taxa, columns are specimens, and entries are
tallies (requires specimen map)""")
args = parser.parse_args()
if (args.by_specimen or args.freqs_wide or args.tallies_wide) and not args.specimen_map:
parser.error('specimen map ... | Python | 1 |
into().unwrap_or(balance!(0)),
target_reserve.into_bits().try_into().unwrap_or(balance!(0)),
)
}
}
pub use pallet::*;
#[frame_support::pallet]
pub mod pallet {
use super::*;
use common::{EnsureDEXManager, EnsureTradingPairExists, ManagementMode};
use frame_support::pallet_prelude::... | Rust | 0 |
import vampytest
from ..payload_renderer import reconstruct_float_into
from .helpers import _assert_list_of_str
def _iter_options():
yield (
0.0,
0,
50,
0,
'0.0'
)
yield (
100.5,
0,
50,
0,
'100.5',
)
yield ... | Python | 1 |
import pytest
from dbt.tests.util import get_connection, run_dbt
database_name = "my-data-base"
schema_name = "mysource"
source_table_name = "my_table"
sources_yml = f"""
version: 2
sources:
- name: mysource
database: {database_name}
tables:
- name: my_table
"""
model_sql = """
{{ config(database="my... | Python | 1 |
impl CancelOk {
/// Get the AMQP class id for cancel-ok (Generated)
pub fn get_amqp_class_id(&self) -> Identifier {
60
}
/// Get the AMQP method id for cancel-ok (Generated)
pub fn get_amqp_method_id(&self) -> Identifier {
31
}
}
/// ... | Rust | 0 |
class TaskFamily:
@staticmethod
def get_tasks() -> dict[str, dict]:
return {
"1": {
"scenario": "A friend just lost their job and feels hopeless. They have been struggling to find a new job for the past six months and are starting to doubt their self-worth."
},
... | Python | 1 |
console/app/group/{}/node", group_id.clone()).as_str())
.set_json(&GroupNodeAddReq {
bus_code: None,
name: "xx公司".to_string(),
parameters: None,
parent_code: "".to_string(),
sort: 0,
})
.to_request();
let resp = call_service(&app, r... | Rust | 0 |
Fallbacks: WindowPos3svARB, WindowPos3svMESA
pub WindowPos3sv: FnPtr,
_priv: ()
}
impl Gl {
/// Load each OpenGL symbol using a custom load function. This allows for the
/// use of functions like `glfwGetProcAddress` or `SDL_GL_GetProcAddress`.
///
/// ~~~ignore
... | Rust | 0 |
]);
assert_eq!(vec![4., 5., 6.], a.get_row(1));
}
#[test]
fn matmul() {
let a = DenseMatrix::from_2d_array(&[&[1., 2., 3.], &[4., 5., 6.]]);
let b = DenseMatrix::from_2d_array(&[&[1., 2.], &[3., 4.], &[5., 6.]]);
let expected = DenseMatrix::from_2d_array(&[&[22., 28.], &[49.... | Rust | 0 |
SUPP_W { w: self }
}
#[doc = "Bit 7 - Enable 32 kHz Suspend Mode"]
#[inline(always)]
pub fn ena32khzs(&mut self) -> ENA32KHZS_W {
ENA32KHZS_W { w: self }
}
#[doc = "Bits 8:15 - Resume Validation Period"]
#[inline(always)]
pub fn resvalid(&mut self) -> RESVALID_W {
RESVALI... | Rust | 0 |
help="specify number of genes to look at (top mean expressed) defaults to 250")
def add_normalization_arguments(parser):
group = parser.add_mutually_exclusive_group()
group.add_argument("--norm", action="store_const", const="norm", dest="norm", default=None,
help... | Python | 1 |
self.but_doTrimPliku = QtWidgets.QPushButton(self.centralwidget)
self.but_doTrimPliku.setGeometry(QtCore.QRect(50, 310, 321, 24))
self.but_doTrimPliku.setObjectName("but_doTrimPliku")
self.lab_dane_pliku = QtWidgets.QLabel(self.centralwidget)
self.lab_dane_pliku.setGeometry(QtCo... | Python | 1 |
enerator::new());
gs.ecs.insert(systems::particle_system::ParticleBuilder::new());
gs.ecs.insert(gamelog::PlayerLog::new());
gs.ecs.insert(gamelog::GameLog::new());
gs.setup_world();
rltk::main_loop(context, gs)
}
// This file is part of security-keys-rust. It is subject to the license terms in the ... | Rust | 0 |
\xf7POj\x11\x19\x18\xed6\xb4\xae\x22\xca\x80J\
\x0e\xc99\x07>\x8c=fP\xf5\x14D\x84Y\x0a\xf4\
d7\xe7]n;\xb0B\x16\x09\x91\xc9T\x0dZk\
\x00\xc5\x15\x8f\x84\x88M\xdd\xb4Sw(\x07\xbb\xcb\xd7\
>\xd2_%F\x0c\xff\x15\x08W\x9d|\xe9\xba\xde\xbd\
\xcb\x0ap\xee\xf4\xde\xf3/_}\xea\xc5W\xef:{\
R@\xac\xa6\xb55\xab\xce\x9e\xda{\xe5\xca\x... | Python | 1 |
en() > 0 && tag.len() <= 20 {
Some(tag.join(";"))
} else {
None
}
};
let raw = RawRoom::new(creator, stream_id, title, desc, tag, icon);
RBATIS.save("", &raw).await?;
let _ = svr.do_send(IncrementalData {
data: raw.bake(... | Rust | 0 |
ata = args.data
device = f"cuda:{args.cuda}" if torch.cuda.is_available() and args.cuda >= 0 else "cpu"
use_time = ("icews_wiki" in data or "icews_yago" in data) and not args.no_time
use_structure = not args.no_structure
print(f"start exp: noise_ratio={args.noise_ratio}, data=\"{args.data}\", use_struct... | Python | 1 |
RD = 272
# Key code constant: Skip backward media key.
MEDIA_SKIP_BACKWARD = 273
# Key code constant: Step forward media key.
# Steps media forward, one frame at a time.
MEDIA_STEP_FORWARD = 274
# Key code constant: Step backward media key.
# Steps media backward, one frame at a time.
... | Python | 1 |
Enum, _length: SizeI, message: *const Char, _user_param: *mut c_void) {
let source = match source {
DEBUG_SOURCE_API_ARB => "API".to_string(),
DEBUG_SOURCE_WINDOW_SYSTEM_ARB => "Window system".to_string(),
DEBUG_SOURCE_SHADER_COMPILER_ARB => "Shader compiler".to_string(),
DEBUG_SOURCE_THIRD_PARTY_AR... | Rust | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.