text string | label_name string | labels int64 |
|---|---|---|
ccessLevel.value
return template
@staticmethod
def deserialize(data, graph):
pinClass = findPinClassByType(data["dataType"])
varUid = uuid.UUID(data["uuid"])
var = graph.getApp().variablesWidget.createVariable(
dataType=data["dataType"],
accessLevel=Acce... | Python | 1 |
TxtCtl.Enter,
),
)
CloseMessageWindow()
NpcTalk(
0x001E,
'老人的声音',
(
'#0340111639V#4P你们……\n',
'这不是艾丝蒂尔和约修亚嘛!',
TxtCtl.Enter,
),
)
CloseMessageWindow()
OP_62(0x0101, 0x00000000, 2000, 0x02, 0x07, 0x00000050, 0x01)
... | Python | 1 |
, 'yrl': 'Yudãniya', 'yue': '約旦', 'yue-Hans': '约旦', 'yue-Hant': '約旦', 'zgh': 'ⵍⵓⵔⴷⵓⵏ', 'zh': '约旦', 'zh-Hans': '约旦', 'zh-Hant': '約旦', 'zu': 'i-Jordan'},
'JP': {'af': 'Japan', 'agq': 'Dzàkpân', 'ak': 'Gyapan', 'am': 'ጃፓን', 'ar': 'اليابان', 'as': 'জাপান', 'asa': 'Japani', 'ast': 'Xapón', 'az': 'Yaponiya', 'az-Cyrl': '... | Python | 1 |
import json
from .oauth import OAuth2Test
class SlackOAuth2Test(OAuth2Test):
backend_path = 'social_core.backends.slack.SlackOAuth2'
user_data_url = 'https://slack.com/api/users.identity'
access_token_body = json.dumps({
'access_token': 'foobar',
'token_type': 'bearer'
})
user_dat... | Python | 1 |
from itertools import permutations
graph = 'AF AE ED EH FD FC DB HB CG GB HG'.split()
matrix = '367 568 18 58 247 127 156 234'.split()
print(*range(1, 9))
for i in permutations('ABCDEFGH'):
if all(str(i.index(x) + 1) in matrix[i.index(y)] for x, y in graph):
print(*i)
| Python | 1 |
or_insert(0) += count;
}
}
pairs = next;
}
let mut counts = HashMap::new();
// first letter
counts.insert(input.to_vec()[0], 1);
for (s, value) in pairs.iter() {
let c = s.to_vec()[1];
*counts.entry(c).or_insert(0) += value;
}
let mut x = counts.... | Rust | 0 |
t(args.return_delay_time))
with DxlIOPort(serial_port, timeout=args.timeout) as io:
io.set_return_delay_time({args.id: args.return_delay_time})
time.sleep(.5)
check(io.get_return_delay_time([args.id])[0] == args.return_delay_time,
'Could not set return dela... | Python | 1 |
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError("""\
The first argument to the plotly.graph_objs.choroplethmap.marker.Line
constructor must be a dict or
... | Python | 1 |
<$type>::$init($token)
};
{
@init binary_op_impl, $type:ty, $token:ident, $init:ident
} => {
(<$type>::$init($token), <$type>::$init($token))
};
{
@init binary_scalar_op_impl, $type:ty, $token:ident, $init:ident
} => {
<$type>::$init($token)
};
{
... | Rust | 0 |
s.AVAILABLE)
print(f"Driver {ride.get_driver().get_name()} completed ride {ride.get_id()} and is now available.")
def cancel_ride(self, ride_id: str, cancelled_by: User) -> None:
with self.processing_lock:
self.ride_service.cancel_ride(ride_id, cancelled_by)
ride = self.... | Python | 1 |
class Solution:
def uncommonFromSentences(self, A: str, B: str) -> List[str]:
count = collections.Counter((A + ' ' + B).split())
return [word for word, freq in count.items() if freq == 1]
| Python | 1 |
tion': self.distribution_manager.get_distribution_metrics(),
'parallel_reporting': self.reporting_manager.get_reporting_status(),
'isolation_status': self.get_status_report()
}
def _setup_cleanup_hooks(self):
"""Setup cleanup hooks for proper resource management."""
... | Python | 1 |
"""Creates local .streamlit/secrets.toml from secret in Google Secret Manager
We can run this from our app code or standalone."""
import os
import streamlit as st
from utils import retrieve_secret
from config import logger
@st.cache_resource
def create_secrets_toml(google_project_id: str):
streamlit_dir = ".str... | Python | 1 |
test_conic_section(self):
"""Export a conic section. This tests a more "exotic" geometry
type."""
cone = Cone(8, 0, 16, align=None)
section_plane = Plane.XZ.offset(4)
conic_section = section_plane.to_local_coords(section(cone, section_plane))
ExportersTestCase.basic_comb... | Python | 1 |
he RL algorithm
if isinstance(env.unwrapped, DirectMARLEnv):
env = multi_agent_to_single_agent(env)
# wrap around environment for rsl-rl
env = RslRlVecEnvWrapper(env)
# create runner from rsl-rl
runner = OnPolicyRunner(env, agent_cfg.to_dict(), log_dir=log_dir, device=agent_cfg.device)
... | Python | 1 |
}
}
}
if range[0] < 0 {
0
} else {
range[1] - range[0] + 1
}
}
/// 剑指 Offer 53 - II. 0~n-1中缺失的数字 https://leetcode-cn.com/problems/que-shi-de-shu-zi-lcof/
/// 方法1:逐个遍历
pub fn missing_number(nums: Vec<i32>) -> i32 {
for (idx, val) in nums.iter().enumerate() {
... | Rust | 0 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import shelltools
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
major = ".".join... | Python | 1 |
103a} ဂျပန\u{103a} သင\u{103a}\u{1039}ကေတ",
],
},
#[cfg(feature = "nb")]
crate::Annotation {
lang: "nb",
tts: Some("japansk tegn for nybegynner"),
keywords: &[
"grønn og gul",
"grønt og gult blad",
"ja... | Rust | 0 |
led),
/// as to match behaviour with the [original implementation]. To prevent this,
/// use with the `ignore_garbage` option.
///
/// If the base65536 stream continues after a terminating padding character,
/// [`Error::InvalidLength`] is returned.
///
/// # Examples
///
/// ```rust
/// # fn test() -> Result<(), Box<s... | Rust | 0 |
let mut transcript = Transcript::new(b"Share Circuit");
let mut verifier = Verifier::new(&mut transcript);
//Verify expiry_ts range
let var_ts = verifier.commit(coms_vec[0][0]);
let quantity_ts = AllocatedQuantity{variable: var_ts, assignment: None};
let var_a = verifier.c... | Rust | 0 |
dd_argument(
"--weights", nargs="+", type=float,
help="concat weights; one for each dataset"
)
parser.add_argument(
"--topk", type=int, default=100,
help="top-k retrieval results will be saved in the output."
)
parser.add_argument(
"--pooling", type=str, default='... | Python | 1 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Word list originally created by dabura667 and released under The MIT License (MIT)
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to dea... | Python | 1 |
st_err,
order_dependent_trait_objects,
illegal_floating_point_literal_pattern,
improper_ctypes,
late_bound_lifetime_arguments,
non_camel_case_types,
non_shorthand_field_patterns,
non_snake_case,
non_upper_case_globals,
no_mangle_generic_items,
path_statements,
private_in_publ... | Rust | 0 |
import subprocess
from join_method_test import JoinMethodTest
from join_index_test import JoinIndexTest
from join_like_test import JoinLikeTest
from join_between_test import JoinBetweenTest
EMPLOYEES_NUMBER_LIST = [1000, 10000, 100000]
#EMPLOYEES_NUMBER_LIST = [10000]
NUM_OF_DEPARTMENTS = 100
if __name__ == "__main_... | Python | 1 |
=0.0,
expected_volumetric_dice=0.0)
def test_both_empty_masks(self):
mask_gt = np.zeros((128, 128, 128), np.bool)
mask_pred = np.zeros((128, 128, 128), np.bool)
surface_distances = surface_distance.compute_surface_distances(
mask_gt, mask_pred, spacing_mm=(3, 2, 1))
self._assert_metri... | Python | 1 |
list.sort();
}
CountTrips {
departures_per_mode,
}
}
fn count(&self, mode: TripMode, t1: Time, t2: Time) -> usize {
// TODO Could binary search or even have a cursor to remember the position between queries.
// Be careful with binary_search_by_key... | Rust | 0 |
# Copyright (C) 2015 KillerInstinct
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in... | Python | 1 |
offset = len(self)
for i, module in enumerate(modules):
self.add_module(str(offset + i), module)
return self
class ParameterList(Module):
r"""Holds parameters in a list.
ParameterList can be indexed like a regular Python list, but parameters it
contains are properly registered... | Python | 1 |
on a slice of bytes.
pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error> {
if bytes.len() != 65 {
return Err(Error::InvalidSignatureLength);
}
let r = Uint256::from_bytes_be(&bytes[0..32]).unwrap();
let s = Uint256::from_bytes_be(&bytes[32..64]).unwrap();
let... | Rust | 0 |
if 'emotion' not in client_modules and 'facial' not in client_modules:
return {"error": f"Emotion or facial module required for {display_name}"}
# Process image frame
result = server.process_image_frame(frame_data)
# Log the result
... | Python | 1 |
9 => (CodecMode::CELTOnly, Bandwidth::Full, FrameSizeMs::Five),
30 => (CodecMode::CELTOnly, Bandwidth::Full, FrameSizeMs::Ten),
31 => (CodecMode::CELTOnly, Bandwidth::Full, FrameSizeMs::Twenty),
_ => return Err(Error::InvalidCodecConfig),
};
Ok(CodecConfig { mode, ba... | Rust | 0 |
64 support (see `std::num::flt2dec`, maybe?)
/*!
Compile-time size optimization for numeric primitives.
Macros return smallest numeric type capable of fitting a static bounds.
For unsigned integers, macro input is a maximum.
For signed integers, macro input may be a maximum or a minimum.
* Can save memory at zero run... | Rust | 0 |