text string | label_name string | labels int64 |
|---|---|---|
)
# Create debug data dict for read traffic
read_debug = {}
# print(f"[DEBUG] all_factors_eff[{lname}] = {all_factors_eff[lname]}")
detailed_read = self.calculate_inter_level_read_traffic(
dims, all_factors_eff[lname],
... | Python | 1 |
axed);
MONITOR_LEN.store(len, Ordering::Relaxed);
MONITOR.store(max_occurs, Ordering::Release);
}
StdinCmd::Stats(_) => {
println!(
"delayed: {}, nondelaye... | Rust | 0 |
}
}
#[test]
fn tokenize_testcase_1() {
let input = "魔神の御稚児。 ";
let tokenizer = yoin::ipadic::tokenizer();
for token in tokenizer.tokenize(input) {
print!("{} ", token.surface());
for feat in token.features() {
print!("{},", feat);
}
println!();
}
prin... | Rust | 0 |
(i).value();
let tgimg_coords = input_tgimg_to_vecs(&tgimg, ctx);
for j in 0..tgimg_coords.len() {
// clusters have the following form:
// [x, y, h, w, tag_id1, tag_id2, tag_id3, ... ],
// where x, y, h and w are the center coordinates of the cluster
let m... | Rust | 0 |
fn encode_2d_u32(b: &mut Bencher) {
b.iter(|| Runner::run_u32(&Encode2D {}));
}
fn encode_2d_u64(b: &mut Bencher) {
b.iter(|| Runner::run_u64(&Encode2D {}));
}
struct BMI2Decode2D;
impl RunnerFn for BMI2Decode2D {
fn run<T: Word + Debug>(&self, v: T) {
bencher::black_box(morton::bmi2::decode_2d::<... | Rust | 0 |
import os
import shutil # Nuevo módulo para copiar archivos
import pandas as pd
import tkinter as tk
from tkinter import filedialog, messagebox
from PIL import Image, ImageTk
# Función para seleccionar el directorio de salida
def select_output_directory():
output_directory = filedialog.askdirectory()
if outpu... | Python | 1 |
HTTP_2 {
if let Some(orig_proto) = req.headers_mut().remove(L5D_ORIG_PROTO) {
debug!("translating HTTP2 to orig-proto: {:?}", orig_proto);
let val: &[u8] = orig_proto.as_bytes();
if val.starts_with(b"HTTP/1.1") {
*req.version_mut() = http... | Rust | 0 |
tools = get_tools()
# Iterate through the tools to generate the system messages.
for tool in tools:
# Set our variables to be used in the system messages.
function = tool['function']
tool_name = function['name']
tool_descr = function['description']
tool_descr2 = functi... | Python | 1 |
import numpy as np
import logging
class FedAvg2:
def __init__(self):
self.name = "FedAvg2"
def aggregate(self, weights_list, sample_sizes, client_losses=None):
logger = logging.getLogger()
if client_losses is None:
# Log uniform weighting when no losses provide... | Python | 1 |
es
assert!(k.is_empty() || output.contains(format!("{}={}", *k, *v)));
}
}
#[test]
#[cfg(target_os="android")]
fn test_inherit_env() {
if running_on_valgrind() { return; }
let mut prog = run_env(None);
let output = str::from_utf8_owned(prog.finish_with_output... | Rust | 0 |
name=item.get("name"),
px=item.get("px"),
py=item.get("py"),
address=item.get("address"),
category_name=item.get("mcidName"),
available=bool(item.get("available")),
)
bookmarks.append(
{
"bookmarkId": bookmar... | Python | 1 |
rect = cv2.minAreaRect(areaMaxContour) # 最小外接矩形
angle = rect[2]
box = np.int0(cv2.boxPoints(rect)) # 最小外接矩形的四个顶点
for j in range(4):
box[j, 0] = int(misc.val_map(box[j, 0], 0, resize_image[0], 0, img_w))
box[j, 1] = int(misc.v... | Python | 1 |
LPFNPSPCALLBACKW,
pub pcRefParent: *mut u32,
pub pszHeaderTitle: ::windows_sys::core::PCWSTR,
pub pszHeaderSubTitle: ::windows_sys::core::PCWSTR,
pub hActCtx: super::super::Foundation::HANDLE,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessag... | Rust | 0 |
impl std::convert::From<&str> for ArtifactType {
fn from(s: &str) -> Self {
match s {
"APPIUM_JAVA_OUTPUT" => ArtifactType::AppiumJavaOutput,
"APPIUM_JAVA_XML_OUTPUT" => ArtifactType::AppiumJavaXmlOutput,
"APPIUM_PYTHON_OUTPUT" => ArtifactType::AppiumPythonOutput,
... | Rust | 0 |
addr("10.0.0", Ipv4Addr::new(10, 0, 0, 0));
test_addr("10.0.0.0", Ipv4Addr::new(10, 0, 0, 0));
}
#[test]
fn short_192_168() {
test_addr("192.168", Ipv4Addr::new(192, 168, 0, 0));
test_addr("192.168.0", Ipv4Addr::new(192, 168, 0, 0));
test_addr("192.168.0.0", Ipv4Addr::new(192, 168, 0, 0));
}
#[test]
fn ... | Rust | 0 |
entialHelperState {
Initialized,
Default,
SshAgent,
SshKey,
UserPass,
}
use CredentialHelperState::*;
impl CredentialHelper {
pub fn new() -> CredentialHelper {
CredentialHelper {
state: CredentialHelperState::Initialized,
}
}
pub fn credentials<Conf>(
... | Rust | 0 |
**
* Conversions from Analysis to MongoDB object.
*/
impl From<&Analysis> for Value {
fn from(item: &Analysis) -> Self {
let mut d = json!({
KEY_ID: item.id.as_ref().map_or(Value::Null,
|s| Value::from(s.as_str())),
KEY_NAME: Value::from(... | Rust | 0 |
ccount_id(), amount)?;
OnAddLiquidity::<T>::happened(&(who.clone(), lp_currency_id, amount.unique_saturated_into()));
Self::deposit_event(RawEvent::DepositEXCHANGEShare(
who,
lp_currency_id,
amount,
));
Ok(())
})?;
}
#[weight = <T as Trait>::WeightInfo::withdraw_exchange_share()]... | Rust | 0 |
# Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer
# (similar to C/C++'s atoi function).
# The algorithm for myAtoi(string s) is as follows:
# Read in and ignore any leading whitespace.
# Check if the next character (if not already at the end of the string) is '-' or '+'.
# Re... | Python | 1 |
) % self.shaders.size() as u64;
let next_shader = self.shaders.get(idx as usize).unwrap();
if next_shader.wifi_only || next_shader.disabled {
return self.get_next_shader();
} else {
return next_shader;
}
}
}
// Returns a ra... | Rust | 0 |
r"""
==============================
Single Markov transition field
==============================
A Markov transition field is an image obtained from a time series, representing
a field of transition probabilities for a discretized time series.
Different strategies can be used to bin time series.
It is implemented as ... | Python | 1 |
(lineno, line)
try:
lineno, line = lineno+1, next(f)
except StopIteration:
pass
else:
assert 0, (lineno, line)
def finish_off(self):
"""Create additional useful structures. (Internal)."""
self.keywords = {} # map from keyword strings to a... | Python | 1 |
#!/usr/bin/env python
from setuptools import find_packages, setup
from djangocms_video import __version__
REQUIREMENTS = [
'django-cms>=3.7',
'django-filer>=1.7',
'djangocms-attributes-field>=1',
]
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
... | Python | 1 |
pub fn process_input_event(&mut self, event: &Event<()>) {
self.process_dispatched_event(event);
if let Event::WindowEvent { event, .. } = event {
if let WindowEvent::KeyboardInput { input, .. } = event {
if let ElementState::Pressed = input.state {
if ... | Rust | 0 |
t)]
mod tests {
use lazy_static::lazy_static;
use serial_test::serial;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
use std::thread;
use std::time::Duration;
lazy_static! {
static ref LOCK: Arc<AtomicUsize> = Arc::new(AtomicUsize::new(0));
}
fn init()... | Rust | 0 |
or Sudo {
fn drop(&mut self) {
if let Some(_child) = self.child.take() {
log::info!("Stopping Sudo");
// Regular threads don't have any way to kill them, but this
// will exit when the program does.
// child.abort();
}
}
}
use oauth2::basic::BasicC... | Rust | 0 |
"""
Solutions for Monkey Market part 2 puzzle.
"""
import sys
from typing import List, Tuple, Optional, Dict
from collections import defaultdict
def mix_number(secret: int, value: int) -> int:
"""Mix a value into the secret number using XOR."""
return secret ^ value
def prune_number(secret: int) -> int:
"... | Python | 1 |
import importlib
import os
class EnvSettings:
def __init__(self):
pytracking_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
self.results_path = '{}/tracking_results/'.format(pytracking_path)
self.segmentation_path = '{}/segmentation_results/'.format(pytracking_path)... | Python | 1 |
char = src.utils.sample_logits(out, pos, temperature=1.0, top_p=top_p)
x = np.append(x, char)
real_len += 1
completion = ''.join([train_dataset.itos[int(i)]
for i in x[print_begin:real_len]])
out_txt += com... | Python | 1 |
import struct
import binascii
BIG = ">"
LITTLE = "<"
def pd(d, o):
print("%04x: %s" % (o, binascii.hexlify(d[o:o+10])))
def get2l(d, o):
return struct.unpack("<H", d[o:o+2])[0]
def get4l(d, o):
return struct.unpack("<I", d[o:o+4])[0]
def get8l(d, o):
return struct.unpack("<Q", d[o:o+8])[0]
def get2b(d, o)... | Python | 1 |
, 0xEC, 0xBA, 0xAB);
assert_opcode!(CALL(SignPositive, 0x878B), 3, 0xF4, 0x8B, 0x87);
assert_opcode!(CALL(SignNegative, 0xABBA), 3, 0xFC, 0xBA, 0xAB);
}
#[test]
fn ret() {
assert_opcode!(RET(Unconditional), 1, 0xC9, 0x7A, 0xD3);
assert_opcode!(RET(NonZero), 1, 0xC0);
assert_opcode!(RET(Zero), 1, 0... | Rust | 0 |
{
'name': 'German Intrastat Declaration',
'icon': '/account/static/description/l10n.png',
'category': 'Accounting/Localizations/Reporting',
'version': '1.0',
'description': "Generates Intrastat XML report for declaration.",
'depends': ['l10n_de', 'account_intrastat'],
'data': [
'data... | Python | 1 |
=> y.data.dits,
Gate::Z(z) => z.data.dits,
Gate::XZXZ(x) => x.data.dits,
Gate::Kronecker(k) => k.data.dits,
Gate::Product(p) => p.data.dits,
Gate::ConstantUnitary(pl) => pl.data.dits,
Gate::SingleQutrit(sq) => sq.data.dits,
}
}
}
#[de... | Rust | 0 |
on top of", "with a view to", "with the exception of",
"à la", "a la", "as soon as", "as well as", "close to", "due to", "far from", "in case", "other than", "prior to", "pursuant to",
"regardless of", "subsequent to", "as long as", "as much as", "as far as", "by the time", "in as much as", "inasmuch", ... | Python | 1 |
p();
assert!(heap.is_heap());
assert_ne!(last.cmp(¤t), Ordering::Less);
last = current;
}
passed();
}
fn test_func<I: HeapIndexer>(idxer: &I, idx_type: &str, func: fn(&I, idx_type: &str, usize)) {
for i in 1..12 {
func(idxer, idx_type, i);
}
func(idxer, idx_ty... | Rust | 0 |
return self._metadata
@metadata.setter
def metadata(self, metadata):
"""Sets the metadata of this V1Deployment.
:param metadata: The metadata of this V1Deployment. # noqa: E501
:type: V1ObjectMeta
"""
self._metadata = metadata
@property
def spec(self):
... | Python | 1 |
# Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Any, Dict, TYPE_CHECKING
from . import VersionUpgrade411to412
if TYPE_CHECKING:
from UM.Application import Application
upgrade = VersionUpgrade411to412.VersionUpgrade411to412()
def getMetaData() ... | Python | 1 |
= 80,
CEE_STIND_REF = 81,
CEE_STIND_I1 = 82,
CEE_STIND_I2 = 83,
CEE_STIND_I4 = 84,
CEE_STIND_I8 = 85,
CEE_STIND_R4 = 86,
CEE_STIND_R8 = 87,
CEE_ADD = 88,
CEE_SUB = 89,
CEE_MUL = 90,
CEE_DIV = 91,
CEE_DIV_UN = 92,
CEE_REM = 93,
CEE_REM_UN = 94,
CEE_AND = 95,
... | Rust | 0 |
)) => {
Message::Num(ni * db, nb * di, -1)
},
_ => Message::Empty, // default/failure value
}
}
struct RationalDiv;
impl Behavior for RationalDiv {
fn react(&self, event: Event) -> Result<Effect, Error> {
let mut effect = Effect::new();
... | Rust | 0 |
import logging
import math
import numpy as np
import scipy
import scipy.fftpack
import torch
from torch import nn
logger = logging.getLogger(__name__)
class SobelTorch(nn.Module):
"""Sobel operator for pytorch, for divergence calculation.
This is equivalent implementation of
```
sobelx =... | Python | 1 |
pend('std')
metrics_lists = [[my_round(x) for x in metric_list] for metric_list in metrics_lists]
for j, metric_list in enumerate(metrics_lists):
metric_list.insert(0, Method)
if i == 0:
write_excel(metric_save_name, ['EN','MI','SF','AG','SD','VIF','CC', 'SCD', ... | Python | 1 |
year of maturity. Required if <a href="tag_205_MaturityDay.html" target="bottom">MaturityDay (205)</a> is specified.
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(rename = "200")]
pub maturity_month_year: Option<fix_common::MonthYear>,
/// Can be used in conjunction with <a href="tag_200_MaturityM... | Rust | 0 |
let posts = web::block(move || {
let parent = post_by_id(*path,&conn)?;
if parent.is_some() {
let replies = post_thread_full(*path,&conn)?;
Ok::<_,diesel::result::Error>(Some(replies))
}else{
Ok(None)
}
})
.await
.map_err(|e| {
... | Rust | 0 |
(
G: *mut mp_int,
X: *mut mp_int,
P: *mut mp_int,
Y: *mut mp_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mp_count_bits(a: *mut mp_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mp_leading_bit(a: *mut mp_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn... | Rust | 0 |
{demo_camera_plugin::Page, MultishapeTag, WINDOW_WIDTH};
#[allow(clippy::suboptimal_flops)] // can't use mul_add in consts.
const X_OFFSET: f32 = 3.0 * WINDOW_WIDTH + WINDOW_WIDTH / 5.0;
/// Tags the regular polygon entity.
pub struct PolygonTag;
#[derive(Debug)]
struct PolygonInspector {
pos_x: f32,
pos_y: ... | Rust | 0 |
= T> + PartialOrd + Copy,
{
let (q, r) = (x / y, x % y);
if r != T::zero() && (x >= T::zero()) == (y >= T::zero()) {
q + T::one()
} else {
q
}
}
pub fn round_up<T>(x: T, y: T) -> T
where
T: One
+ Zero
+ Div<Output = T>
+ Rem<Output = T>
+ Add<Output ... | Rust | 0 |
ush(StackItem::Float64(*v)),
ByteCode::Call2(ident, return_type, arg_type_0, arg_type_1) => {
call_function_2_gen(
ident,
return_type,
arg_type_0,
arg_type_1,
&mut register_counter,
... | Rust | 0 |
err);
return Err(FetchError::Reqwest(err));
}
};
// Parse json
let leaderboard: ParseLeaderboard = match serde_json::from_str(&json) {
Ok(lb) => lb,
Err(err) => {
println!("{:?}", err);
return Err(FetchError::JsonParse(err));
}
};
... | Rust | 0 |
# -*- coding: utf-8 -*-
"""Controller for the Abstraction of Jimmy.
Units: cm, kg, s.
"""
__authors__ = ("emenager")
__contact__ = ("etienne.menager@ens-rennes.fr")
__version__ = "1.0.0"
__copyright__ = "(c) 2021, Inria"
__date__ = "March 8 2021"
import Sofa
import json
import numpy as np
class ControllerStemPendu... | Python | 1 |
self,
c: *mut xcb_connection_t,
context: xcb_glx_context_t,
fbconfig: xcb_glx_fbconfig_t,
screen: u32,
render_type: u32,
share_list: xcb_glx_context_t,
is_direct: u8,
) -> xcb_void_cookie_t {
sym!(self, xcb_glx_create_new_context)(
c,
... | Rust | 0 |
.to_request(),
)
.await;
assert_eq!(auth_resp.status(), StatusCode::OK);
auth_resp
}
struct Routes {
signin: &'static str,
authenticated_route: &'static str,
}
impl Routes {
const fn new() -> Self {
let signin = "/siginin";
... | Rust | 0 |
rack_id is None:
# 创建新轨迹
best_track_id = self.track_id_counter
self.track_id_counter += 1
# 更新轨迹信息,保存检测时的ROI用于后续对比
roi_x1 = max(0, center[0] - self.roi_size // 2)
roi_y1 = max(0, center[1] - self.roi_size // 2)
... | Python | 1 |
and directories at that path and
// below will be monitored for changes.
if let Err(e) = watcher.watch(config_path_root(), RecursiveMode::Recursive) {
return Err(format!(
"Unable to set file event configuration options {:?}",
e
));
}
let sharedinfo = match (
... | Rust | 0 |
u32 = 0;
pub const TTF_HINTING_LIGHT: u32 = 1;
pub const TTF_HINTING_MONO: u32 = 2;
pub const TTF_HINTING_NONE: u32 = 3;
extern "C" {
// pub fn TTF_Linked_Version() -> *const SDL_version;
// pub fn TTF_ByteSwappedUNICODE(swapped: ::std::os::raw::c_int);
pub fn TTF_Init() -> ::std::os::raw::c_int;
... | Rust | 0 |
rem, parsed2) = response(&serialized).unwrap();
assert!(rem.is_empty());
assert_eq!(parsed, parsed2);
println!()
}
}
}
}
#[test]
fn test_from_capability() {
let trace = b"C: abcd CAPABILITY
S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=GSSAPI LOGIND... | Rust | 0 |
ec<IoTDevice> = (0..len).map(new_device_with_id).collect();
let g = build_graph(graph::InternetOfThings::new(), &items);
assert_eq!(g.edges(), 20);
assert_eq!(g.nodes(), len as usize);
assert_eq!(
g.shortest_path(items[0].numerical_id, items[9].numerical_id),
S... | Rust | 0 |
Item = A>>,
) -> Box<dyn Iterator<Item = Vec<A>>> {
let entries: Vec<_> = entries.collect();
if entries.is_empty() {
return empty();
}
let mut shrinkers: Vec<Vec<_>> = vec![];
let mut i = entries.len();
loop {
shrinkers.push(entries.iter().take(i).map(&f).collect());
i /... | Rust | 0 |
ure download command fails when metadata has expired
fn download_command_expired_repo_fail() {
let outdir = TempDir::new().unwrap();
let repo_dir = TempDir::new().unwrap();
// Create a expired repo using tuftool
test_utils::create_expired_repo(repo_dir.path());
// assert failure for download command... | Rust | 0 |
of padded_frame should match index (448, 0) of the source
// frame, have 2 cols/rows from the source frame left and below, 2
// cols/rows of padding value right and above, and have a size of (64, 64)
assert_eq!(padded_frame.planes[0].cfg.width, 64);
assert_eq!(padded_frame.planes[0].cfg.height, 64);
... | Rust | 0 |
2, &[1, 2, 1]);
assert_binomial(3, &[1, 3, 3, 1]);
assert_binomial(4, &[1, 4, 6, 4, 1]);
assert_binomial(5, &[1, 5, 10, 10, 5, 1]);
}
fn assert_binomial(n: u32, expect: &[u64]) {
let v: Vec<u64> = Binomial::new(n).collect();
assert_eq!(v, expect);
}
}
//! Board file ... | Rust | 0 |
minigames/bosses/etc.
println!("Minigames");
let mut table = Table::new();
table.set_format(
*prettytable::format::consts::FORMAT_NO_LINESEP_WITH_TITLE,
);
table.set_titles(row!["Minigame", r->"Rank", r->"Score"]);
for minigame in player.minigames() {
... | Rust | 0 |
}
if ts.root.is_none() {
return
}
let pidns = ts.root.clone().unwrap();
let threads : Vec<_> = pidns.lock().tids.keys().cloned().collect();
for t in &threads {
{
let tg = t.lock().tg.clone();
let lock = tg.lock().sig... | Rust | 0 |
)
}
pub unsafe fn get_type_list(
&self,
source_window: ffi::xcb_window_t,
) -> Result<Vec<ffi::xcb_atom_t>, XcbGetPropertyError> {
self.xconn
.get_property(source_window, self.atoms.type_list, ffi::XCB_ATOM_ATOM)
}
pub unsafe fn convert_selection(&self, window: ... | Rust | 0 |
count,get_chat_member,
set_chat_sticker_set, delete_chat_sticker_set, answer_callback_query,
set_my_commands, get_my_commands, answer_inline_query, edit_message_text,
edit_message_text_inline, edit_message_caption, edit_message_caption_inline,
edit_message_media, edit_mes... | Rust | 0 |
}
"http://www.w3.org/2001/XMLSchema#short" => {return self.as_object_generic::<i16>();}
"http://www.w3.org/2001/XMLSchema#int" => {return self.as_object_generic::<i32>();}
"http://www.w3.org/2001/XMLSchema#long" => {return self.as_object_generic::<i64>();}
"http://www.... | Rust | 0 |
Reader of field `LOCK`"]
pub type LOCK_R = crate::R<bool, bool>;
#[doc = "Reader of field `CLKRDY`"]
pub type CLKRDY_R = crate::R<bool, bool>;
#[doc = "Reader of field `ENABLE`"]
pub type ENABLE_R = crate::R<bool, bool>;
#[doc = "Reader of field `DIV`"]
pub type DIV_R = crate::R<bool, bool>;
impl R {
#[doc = "Bit 0... | Rust | 0 |
, next_group.num_filters,
[1, 1], [1, 1, 1, 1],
bias=False,
padding='SAME')
except IndexError:
pass
net_shape = net.get_shape().as_list()
net = tf.nn.avg_pool(net,
ksize=[1, net_shape[1], n... | Python | 1 |
from playwright.sync_api import Page, expect
from pages.search_page import SearchPage
def test_price_filter_menu(search_page: SearchPage, setup_search_page):
"""Click the Price filter button and verify menu options"""
exp_price_options = list(search_page.PRICE_FILTER_OPTIONS)
expect(search_page.priceButto... | Python | 1 |
round2_errors = (0 if pd.isna(row['二轮读音错误']) else row['二轮读音错误']) + \
(0 if pd.isna(row['二轮中文错误']) else row['二轮中文错误']) + \
(0 if pd.isna(row['二轮拼写错误']) else row['二轮拼写错误'])
round3_errors = (0 if pd.isna(row['三轮读音错误']) else row['三轮读音错误']) + \... | Python | 1 |
b struct AvailableMonitorsIter {
data: VecDequeIter<platform::MonitorId>,
}
impl Iterator for AvailableMonitorsIter {
type Item = MonitorId;
#[inline]
fn next(&mut self) -> Option<MonitorId> {
self.data.next().map(|id| MonitorId(id))
}
#[inline]
fn size_hint(&self) -> (usize, Opti... | Rust | 0 |
from typing_extensions import override
import comfy.utils
from comfy_api.latest import ComfyExtension, io
class PatchModelAddDownscale(io.ComfyNode):
UPSCALE_METHODS = ["bicubic", "nearest-exact", "bilinear", "area", "bislerp"]
@classmethod
def define_schema(cls):
return io.Schema(
nod... | Python | 1 |
, 133, 13, 232] };
#[doc = "*Required features: `\"Win32_UI_Shell\"`*"]
pub type FOLDERVIEWMODE = i32;
#[doc = "*Required features: `\"Win32_UI_Shell\"`*"]
pub const FVM_AUTO: FOLDERVIEWMODE = -1i32;
#[doc = "*Required features: `\"Win32_UI_Shell\"`*"]
pub const FVM_FIRST: FOLDERVIEWMODE = 1i32;
#[doc = "*Required feat... | Rust | 0 |
use crate::inflector::Inflector;
use crate::parser::client_resource::ResourceParsingInfo;
use crate::parser::ParserSettings;
use bytes::{BufMut, BytesMut};
use from_as::*;
use graph_core::resource::ResourceIdentity;
use graph_http::iotools::create_dir;
use std::collections::{BTreeMap, BTreeSet, HashSet, VecDeque};
use ... | Rust | 0 |
# Code generated by Lark OpenAPI.
from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.model import BaseRequest
from lark_oapi.core.enum import HttpMethod, AccessTokenType
from .patch_message_request_body import PatchMessageRequestBody
class PatchMessageRequest(BaseRequest... | Python | 1 |
"""
Test _regexp-break command which uses regular expression matching to dispatch to other built in breakpoint commands.
"""
import os
import lldb
from lldbsuite.test.lldbtest import *
import lldbsuite.test.lldbutil as lldbutil
class RegexpBreakCommandTestCase(TestBase):
mydir = TestBase.compute_mydir(__file_... | Python | 1 |
import openpyxl
import pytest
from Utilities.HomePageUtilities import HomePage_Utilities
from Utilities.Mobile_Phone_Utilities import mobile_phone_searchpage
from Utilities.Login_Page_Utilities import login_page_utilities
@pytest.mark.usefixtures("driver_initialization")
class TestLogin:
def test_validate_success... | Python | 1 |
(h, 50);
/// assert!(!p.is_null());
///
/// // use p...
/// mi::mi_free(p);
///
/// // Clean up the heap. Note that pointers allocated from `h`
/// // are *not* invalided by `mi_heap_delete`. You would have
/// // to use (the very dangerous) `mi_heap_destroy` for that
/// // behavior
/// ... | Rust | 0 |
for tc in range(1, int(input())+1): # 테스트 케이스의 수
N = int(input())
d = 1
while True:
# 세제곱 값 계산
ddd = pow(d, 3)
# 같다면 출력
if ddd == N: print(f'#{tc}', d); break;
# 더 크다면 중지
elif ddd > N: print(f'#{tc} -1'); break;
# d값 1 증가
d = d+1 | Python | 1 |
mem::Shared<dyn sf::IObject>> {
ipc_cmif_client_send_request_command!([self.session.object_info; 1] (mode) => (display_service: mem::Shared<ApplicationDisplayService>))
}
}
impl service::cmif::IService for SystemRootService {
fn get_name() -> &'static str {
nul!("vi:s")
}
fn as_domain(... | Rust | 0 |
the rolling view (if one was to reshape the view for example) would
be 8*(100-3+1)**3*3**3 which is about 203 MB! The scaling becomes
even worse as the dimension of the input array becomes larger.
References
----------
.. [1] http://en.wikipedia.org/wiki/Hyperrectangle
Examples
--------
... | Python | 1 |
ion()
self.prbEntity.doLeadershipNotificationShown()
self.as_hideWaitingS()
def _loadView(self):
entity = self.prbEntity
unitMgrID = entity.getID()
prbType = entity.getEntityType()
funcFlags = entity.getFunctionalFlags()
if unitMgrID > 0:
self._lo... | Python | 1 |
)
.is_none()
{
core.run(
client
.create_container()
.with_container_name(container_name)
.with_public_access(PublicAccess::Blob)
.finalize(),
)
.unwrap();
}
// calculate md5 too!
let digest = md5... | Rust | 0 |
type ForSlice = for<'a> [u32];
type ForForFn = for<'a> for<'b> fn(&'a i32, &'b i32);
fn for_for_for<T>()
where
for<'a> for<'b> for<'c> fn(&'a T, &'b T, &'c T): Copy,
{
}
use crate::graph::Graph;
use itertools::Itertools;
use std::ffi::OsStr;
use std::fmt::Debug;
use std::io;
use std::io::Write;
use std::process::{... | Rust | 0 |
Ex, Fb, En, Hi>],
pub constraints: &'a [(oxidized::ast_defs::ConstraintKind, &'a Hint<'a>)],
pub reified: oxidized::aast::ReifyKind,
pub user_attributes: &'a [&'a UserAttribute<'a, Ex, Fb, En, Hi>],
}
impl<'a, Ex: TrivialDrop, Fb: TrivialDrop, En: TrivialDrop, Hi: TrivialDrop> TrivialDrop
for Tparam<'a,... | Rust | 0 |
2), vec![(key, 1000)]));
assert_ok!(ModuleOracle::feed_values(Origin::signed(3), vec![(key, 1200)]));
let expected = Some(TimestampedValue {
value: 1200,
timestamp: 12345,
});
assert_eq!(ModuleOracle::get(&key), expected);
Timestamp::set_timestamp(23456... | Rust | 0 |
.mix_key(ee.as_bytes());
}
Token::ES => {
let es = match self.role {
Role::Initiator => self.e.dh(&self.rs),
Role::Responder => self.s.dh(&self.re),
};
self.symmetric_state.mix_ke... | Rust | 0 |
% S r SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK r SSK
r
SSKrSSKJ
rJrJrJrJrJrJrJr SSKJr \( a SSKJ r S\RB 4S jr"SS K#J$r%J&r&J'r' SS
K(J)r)J*r*J+r+J,r, \"" 5 ( a! Sr-\( ... | Python | 1 |
# app/main.py
import logging
from fastapi import FastAPI, Request
from fastapi.middleware.cors import CORSMiddleware
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates
from settings import settings
from api import router, lifespan
# set up logging
logging.basicConfig(level=log... | Python | 1 |
run(self):
# This is a daemon thread. Since the global namespace is going to
# vanish on interpreter shutdown, redefine everything from the global
# namespace here.
_sleep = time.sleep
_exception = Exception
_event = self._start_countdown
_set_msg = self._set_msg_... | Python | 1 |
m: u32 = 0x05e5;
pub const XK_Arabic_noon: u32 = 0x05e6;
pub const XK_Arabic_ha: u32 = 0x05e7;
pub const XK_Arabic_heh: u32 = 0x05e7;
pub const XK_Arabic_waw: u32 = 0x05e8;
pub const XK_Arabic_alefmaksura: u32 = 0x05e9;
pub const XK_Arabic_yeh: u32 = 0x05ea;
pub const XK_Arabic_fathatan: u32 = 0x05eb;
pub const XK_Arab... | Rust | 0 |
"""
Run multiple experiments on a single machine.
"""
import subprocess
import numpy as np
ALGOS = ["sac"]
ENVS = ["MountainCarContinuous-v0"]
N_SEEDS = 10
EVAL_FREQ = 5000
N_EVAL_EPISODES = 10
LOG_STD_INIT = [-6, -5, -4, -3, -2, -1, 0, 1]
for algo in ALGOS:
for env_id in ENVS:
for log_std_init in LOG_S... | Python | 1 |
#
# Copyright 2018-2025 the orix developers
#
# This file is part of orix.
#
# orix 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.
#
#... | Python | 1 |
"agent_configs": agent_configs,
"coding": coding,
"default_llm_config": default_llm_config,
"code_execution_config": kwargs["code_execution_config"],
}
)
del kwargs["code_execution_config"]
... | Python | 1 |
Some(callback),
Box_::into_raw(user_data) as *mut _,
);
}
}
fn open_readwrite_async_future(
&self,
io_priority: glib::Priority,
) -> Pin<Box_<dyn std::future::Future<Output = Result<FileIOStream, glib::Error>> + 'static>>
{
Box_::pin(cr... | Rust | 0 |
ph<H>) -> usize {
let parents_cache_lock = zigzag_graph.parents_cache.read().unwrap();
(*parents_cache_lock)[zigzag_graph.get_cache_index()].len()
}
}
<reponame>jmacdonald/fragment
pub mod matching;
#[doc = "Register `tzc_rom1_r0` reader"]
pub struct R(crate::R<TZC_ROM1_R0_SPEC>);
impl core::ops::De... | Rust | 0 |
.assertEqual(assembly.zivid_prim.prim_path, "/World/Franka/Zivid")
self.assertEqual(assembly.mount_prim.prim_path, f"/World/Franka/{mount.name}")
self.assertIn("Zivid", self.franka._prim_view.body_names) # pylint: disable=protected-access
self.assertIn(mount.name, self.franka._prim_view.body_na... | Python | 1 |
# -*- coding:utf-8 -*-
# author : gfjiangly
# time : 2019/6/30 15:32
# e-mail : jgf0719@foxmail.com
# software : PyCharm
import json
import numpy as np
from cvtools.file_io.read import read_files_to_list
from cvtools.file_io.read import readlines
# 读取虹软不完全格式化数据进list,测试通过
def read_arcsoft_txt_format(file):
... | Python | 1 |
_field(&down, i)?;
let val = op_to_const(&ecx, &field_op);
Ok(mir::ConstantKind::Val(val, field_op.layout.ty))
})
.collect::<InterpResult<'tcx, Vec<_>>>()?;
let fields = tcx.arena.alloc_from_iter(fields_iter);
Ok(mir::DestructuredMirConstant { variant, fields })
}
#[ins... | Rust | 0 |
executor::block_on(async {
/// use futures::executor::ThreadPool;
/// use futures::task::SpawnExt;
///
/// let mut executor = ThreadPool::new().unwrap();
///
/// let future = async { /* ... */ };
/// executor.spawn(future).unwrap();
/// # });
/// ```
#[cfg(feature = "std")]
f... | Rust | 0 |
trie with a given maximum `depth`.
///
/// ```
/// # use bintrie::BinTrie;
/// let trie = BinTrie::new_depth(128);
/// ```
pub fn new_depth(depth: u32) -> Self {
assert!(depth > 0);
Self {
internals: vec![Internal::default()],
depth,
}
}
/... | Rust | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.