text string | label_name string | labels int64 |
|---|---|---|
# Generated by Django 3.2.11 on 2022-01-28 02:46
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("api", "0033_auto_20220127_0654"),
]
operations = [
migrations.SeparateDatabaseAndState(
state_operations=[
migrations.R... | Python | 1 |
ODING, "deflate")
.body(Body::from(body.clone().to_vec()))
.unwrap())
}
/// Pass string through to bytes_handler
pub async fn string_handler(
body: &str,
content_type: &str,
status: Option<StatusCode>,
) -> Result<Response<Body>> {
bytes_handler(body.as_bytes(), content_type, status).aw... | Rust | 0 |
);
let test_cases = vec![
(vec![], None),
(
vec![DateTime::parse_datetime(&mut ctx, "1000-01-01 00:00:00", 0, false).unwrap()],
Some(DateTime::parse_datetime(&mut ctx, "1000-01-01 00:00:00", 0, false).unwrap()),
),
(
... | Rust | 0 |
#!/usr/bin/env python3
"""
Setup script for the Chatbot Project
This script installs dependencies and sets up the environment
"""
import subprocess
import sys
import os
def install_package(package):
"""Install a package using pip"""
try:
subprocess.check_call([sys.executable, "-m", "pip", "install", p... | Python | 1 |
arts[0]
# ground_truth_score = label_parts[1] if len(label_parts) > 1 else label
# else:
# ground_truth_content = label
# ground_truth_score = label
ground_truth_content, ground_truth_score = label.split("||DIV REVIEW SCORE||")
... | Python | 1 |
with open(params_folder + paramsFilename, 'r') as file:
for line in file:
line = line.strip()
line = ast.literal_eval(line)
cointPairsparams.append(line)
logging.info(f"{line['asset 1']}-{line['asset 2']} Pair. Hedge ratio: {line['hedge rat... | Python | 1 |
#[cfg(target_family = "unix")]
mod unix;
#[cfg(target_family = "unix")]
pub use self::unix::ifaces;
<filename>game/src/ltn/select_boundary.rs
use std::collections::{BTreeMap, BTreeSet};
use geom::Distance;
use map_model::{Block, Perimeter};
use widgetry::mapspace::ToggleZoomed;
use widgetry::mapspace::{ObjectID, Wor... | Rust | 0 |
}
}
/// A `MessageFileWriter` writes a stream of [`SymExpr`] to any [`Write`]. For each written expression, it returns
/// a [`SymExprRef`] which should be used to refer back to it.
pub struct MessageFileWriter<W: Write> {
id_counter: usize,
writer: W,
writer_start_position: u64,
serialization_options:... | Rust | 0 |
misagent_copy(client: misagent_client_t, profiles: *mut plist_t) -> misagent_error_t;
}
extern "C" {
#[doc = " Retrieves all installed provisioning profiles (iOS 9.3 or higher)."]
#[doc = ""]
#[doc = " @param client The connected misagent to use."]
#[doc = " @param profiles Pointer to a plist_t that wi... | Rust | 0 |
mpl_c_drop_for!(i16);
impl_c_drop_for!(u16);
impl_c_drop_for!(i32);
impl_c_drop_for!(u32);
impl_c_drop_for!(i64);
impl_c_drop_for!(u64);
impl_c_drop_for!(f32);
impl_c_drop_for!(f64);
impl_c_drop_for!(bool);
impl_c_drop_for!(std::ffi::CString);
impl_c_repr_of_for!(usize);
impl_c_repr_of_for!(i8);
impl_c_repr_of_for!(u8... | Rust | 0 |
this only covers `&T` and `Option<&T>` (where T is a `Feature`), but this may be
/// extended in the future.
pub trait FromResolvedFeature<F: Feature>: Sized {
fn from_resolved_feature(feature: Option<F>) -> Result<Self, MissingFeatureError>;
}
impl<F: Feature> FromResolvedFeature<F> for F {
fn from_resolved_... | Rust | 0 |
.POLICY_TYPE,
descr="policy type in T-SPSA"),
constants.T_SPSA.OBJECTIVE_TYPE: HParam(
value=ObjectiveType.MAX, name=constants.T_SPSA.OBJECTIVE_TYPE,
descr="Objective type")
},
player_type=PlayerType.ATTACKER, player_idx=1
)
simulation_... | Python | 1 |
[5.0, 6.0, 7.0, 8.0],
[9.0, 10.0, 11.0, 12.0],
[13.0, 14.0, 15.0, 16.0],
]);
assert_eq!(expects, matrix[2], "Did not return correct row");
}
#[test]
fn index_mut_updates_correct_row() {
let expects = Matrix4([
[1.0, 2.0, 3.0, 4.0],
... | Rust | 0 |
{
eku.client_auth = true;
} else if asn1 == oid!(raw 1.3.6.1.5.5.7.3.3) {
eku.code_signing = true;
} else if asn1 == oid!(raw 1.3.6.1.5.5.7.3.4) {
eku.email_protection = true;
} else if asn1 == oid!(raw 1.3.6.1.5.5.7.3.8) {
eku.time_stamping = tru... | Rust | 0 |
c1 = self.up(c2) + c1
if self.add_vit_feature:
x3 = x.transpose(1, 2).view(bs, dim, H, W).contiguous()
x1 = F.interpolate(x3, scale_factor=4, mode='bilinear', align_corners=False)
x2 = F.interpolate(x3, scale_factor=2, mode='bilinear', align_corners=False)
x... | Python | 1 |
If the path contains non-UTF 8 characters, a `ConnectParams`
/// struct should be created manually and passed in. Note that Postgres
/// does not support SSL over Unix sockets.
///
/// ## Examples
///
/// ```rust,no_run
/// # use postgres::{Connection, SslMode};
/// # fn f() -> Result<(... | Rust | 0 |
from PyQt6 import QtWidgets
class _QProgressBar(QtWidgets.QProgressBar):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._customState = False
self._checkRange()
def setMaximum(self, maximum: int) -> None:
super().setMaximum(maximum)
self._ch... | Python | 1 |
unused = toml.get("keep-unused", False)
if options.keep_unused_type_checking is NOT_SET:
options.keep_unused_type_checking = toml.get(
"keep-unused-type-checking", False
)
if options.heuristic_unused is NOT_SET:
options.heuristic_unused = toml.get("heuristic-unused", None)
... | Python | 1 |
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Test HTTP',
'version': '1.0',
'category': 'Hidden/Tests',
'description': """A module to test HTTP""",
'depends': ['base', 'web', 'web_tour'],
'installable': True,
'data': [
'data.xml',
'ir.m... | Python | 1 |
ory, AUDIO DMA, M4 SRAMs,M4 Bus Matrix , M4 Trace block, Debug controller, SDMA,I2S module Inside A1, AHB2APB Bridge /CFG DMA Bridge inside A1 , FFE, Packet FIFO,SDMA,A0, Voice APB interface, PIF, FB). Note: Firmware Should NOT program this bit to 0.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub e... | Rust | 0 |
vice_client.create_container(_CONTAINER_NAME)
except ResourceExistsError:
pass
# encrypt local file and upload to blob storage via blobxfer
rsapfxfile, sha1_cert_tp = encrypt_localfile_to_blob_storage(
storage_account_name,
storage_account_key,
_C... | Python | 1 |
TaskView(AbstractModel):
r"""任务视图信息
"""
def __init__(self):
r"""
:param _TaskName: 任务名称
:type TaskName: str
:param _TaskState: 任务状态:
- PENDING:等待中;
- RUNNABLE:可运行;
- STARTING:启动中;
- RUNNING:运行中;
- SUCCEED:成功;
- FAILED:失败;
- FAILED_INTERRUPTED:失败后保留实例。
:type TaskStat... | Python | 1 |
oseack = Message::MProposeAck {
dot,
clock,
deps,
ok,
};
let from = dot.source();
let target = singleton![from];
// save new action
to_processes.push(Action::ToSend {
target,
msg: mproposeack,
});
... | Rust | 0 |
et cd_len = GetCurrentDirectoryW(0, ptr::null_mut());
// Allocate enough memory for the native path
let mut native_path = vec![0; 3 + cd_len as usize + SLASH_CAPCOM_SYS.len()].into_boxed_slice();
// Write the NT path prefix \??\
native_path[0] = b'\\' as u16;
native_path[1] = b'?' as u16;
native_path[... | Rust | 0 |
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Union
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["SupervisedHyperparameters"]
class SupervisedHyperparameters(BaseModel):
batch_size: Union[Literal["auto"], int, None]... | Python | 1 |
unwind(|| {
pact_mock_server::shutdown_mock_server(mock_server_port)
});
match result {
Ok(val) => val,
Err(cause) => {
log::error!("Caught a general panic: {:?}", cause);
false
}
}
}
/// External interface to trigger a mock server to write out its pact file. This function should
///... | Rust | 0 |
import sys
import os
import warnings
import shutil
import findspark
import time
from datetime import datetime
from colorama import Fore, Back, Style, init
from tqdm import tqdm
from pyspark.sql import SparkSession
from pyspark.ml.feature import VectorAssembler
from pyspark.ml.classification import LogisticRegression
fr... | Python | 1 |
clone().to_bytes());
let ra: &B = dbg!(unsafe { ua.read_back() });
assert_eq!(ra, &a);
}
#[to_bytes(asis)]
#[derive(Debug, Clone, Ord, PartialOrd, Eq, PartialEq, Default)]
struct B2(u8, u16, u32);
impl Drop for B2 {
fn drop(&mut self) {
println!("drop B2");
}
}
#[test]
fn test_b2() {
let a... | Rust | 0 |
"Z": "2"}
# NIE must must start with X Y or Z
if value and value[0] in number_by_letter:
return _nif_nie_validation(value, number_by_letter, {"X0000000T"})
return False
@validator
def es_doi(value: str, /):
"""Validate a Spanish DOI.
A DOI in spain is all NIF / CIF / NIE / DNI -- a digita... | Python | 1 |
.to_vec()),
lookup_map: LookupMap::new(b"l".to_vec()),
last_line_added: 0
}
}
// This functions changes state, so 1st param uses `&mut self`
/// Add data to TreeMap
pub fn add_tree_map(&mut self, key: String, value: String) {
self.tree_map.insert(&key, &value);
... | Rust | 0 |
'd(dRbar)', 'd(dV)', 'd(dseeing)', 'd(flux)/flux'))
out = '{0:8} {1:8.5f} {2:8.5f} {3:8.5f} {4:8.5f}'
print(out.format('full', dDCR[0], dDCR[1], dseeing, flux))
for rel_err in rel_errs:
band1 = band.thin(rel_err=rel_err)
dDCR_t... | Python | 1 |
.person(witness3)
.person(officiator)
.relationship(marriage_relationship)
.event(marriage_event)
.document(analysis)
.person(sam_conclusion)
.build();
common::assert_matching_json(&gx, "marriage");
common::assert_matching_xml(&gx, "marriage");
}
<gh_sta... | Rust | 0 |
($k:expr) => {{
let w0: f32 = w[0];
increment_by(&mut w, 1);
let w1: f32 = w[1];
increment_by(&mut w, 1);
let vz = &zlin[4 * i - $k * 64..];
let vy = &zlin[4 * i - (15 - $k) * 64..];
... | Rust | 0 |
}
}
impl Component<Msg> for App {
fn view(&self) -> Node<Msg> {
div(
vec![on_mount(|me| Msg::Mount(me.target_node))],
vec![
input(
vec![
r#type("button"),
value("+"),
key(... | Rust | 0 |
ule = "Rule::quote")]
pub struct Quote<'i> {
pub span: Span<'i>,
pub inner: Box<Obj<'i>>,
}
#[derive(Debug, FromPest)]
#[pest(rule = "Rule::quasiquote")]
pub struct Quasiquote<'i> {
pub span: Span<'i>,
pub inner: Box<Obj<'i>>,
}
#[derive(Debug, FromPest)]
... | Rust | 0 |
script {}", unsafe { str::from_utf8_unchecked(path) });
return Err(Error::new(ENOEXEC));
}
} else {
break;
}
}
// Set UID and GID are determined after resolving any hashbangs
let setuid = if stat.st_mode & syscall::flag::MODE_SETUID == syscall::flag:... | Rust | 0 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | Python | 1 |
# -*- coding: utf-8 -*-
"""
utils.py:
auxiliary functions, temporarily collected here, probably moving to other modules later.
"""
__author__ = "Zhi Zi"
__email__ = "x@zzi.io"
__version__ = "20221115"
import requests
import ast
import operator as op
import numpy as np
"""
Safely evaluate input formula to float or ... | Python | 1 |
: ExifByteOrder, value: ExifShort);
}
extern "C" {
pub fn exif_set_sshort(
b: *mut ::std::os::raw::c_uchar,
order: ExifByteOrder,
value: ExifSShort,
);
}
extern "C" {
pub fn exif_set_long(b: *mut ::std::os::raw::c_uchar, order: ExifByteOrder, value: ExifLong);
}
extern "C" {
pub ... | Rust | 0 |
path().to_str().unwrap(),
];
let (tx, _rx) = channel();
let mut test_watcher = watcher(tx, Duration::from_secs(10)).unwrap();
setup_watches(&mut test_watcher, &test_config)?;
// If it has correctly watched the path, it should be able to unwatch it. Wish
// I could check ... | Rust | 0 |
Range {
oldest_unpruned_block: 0,
oldest_block_to_keep: 10,
},
);
});
}
#[test]
fn blocks_are_pruned_if_limit_is_non_zero() {
with_headers_to_prune(|storage| {
// try to prune blocks [0; 10)
storage.prune_blocks(7, 10, 10);
// 1 headers with number = 0 is pruned (1 total)
assert!(He... | Rust | 0 |
u64, result: &mut [u8], sew: u64, lmul: i64, avl: u64) {
vop_vx(lhs, x, result, sew, avl, lmul, |x: u64| unsafe {
rvv_asm!("mv t0, {}",
"vsll.vx v24, v8, t0",
in (reg) x);
});
}
run_vop_vx(
sew,
lmul,
avl,
ex... | Rust | 0 |
"""
具身多轮对话 GQA
点餐(order)的对话,咖啡厅服务员可以为客人(NPC)完成点餐基本对话
场景对话(GQA)结合场景:询问卫生间、附近娱乐场所(数据来源自主定义)
开始条件:顾客NPC发出点餐指令
结束条件:顾客NPC发出指令,表示不再需要服务
"""
# todo: 使用大模型进行对话,获得指令信息,适时结束对话
# order = {...}
from robowaiter.scene.scene import Scene
class SceneGQA(Scene):
def __init__(self, robot):
super().__init__(robot)
... | Python | 1 |
def _update_card(self, card: dict[str, Any] | None = None) -> None:
"""Update the card metadata for this entry on the Bailo server.
:param card: Metadata dictionary to update, defaults to None to use existing card.
"""
if card is None:
card = self._card
res = ... | Python | 1 |
]
fn test_eval_votes() {
let expr = create_get_header_property_expr(sheader::VOTES_PROPERTY.clone());
let ctx = Rc::new(force_any_val::<Context>());
let expected = ctx.headers[HEADER_INDEX].votes.clone();
let actual = {
let votes_bytes = eval_out::<Vec<i8>>(&expr, ctx).as... | Rust | 0 |
x9f~\xf0\xbf\xd9\xff\xf3\
\xcf\xbe\xca\x1e\xf2\x90G0\x06\x17\xe0\x90g\x5cH\xe0\
^\xf4\xbd<\xe7>@JTt\x9c\x88\xdc\xbe1\xee\
>n\xf0\x1d\xe3\xb2\x7f\xde\x85\xeb\x1c\x95\xff\xeb\xf2\xd7\
\x92\xf8}8EdD\x06\xac2\x16=LBt\x0d\
=\xf8\x87\x8b\xbe\x93\xe1\xeaS\x9e\xf2\x94\xbf\x11\xfcL\
E\xc7_|\xefK}\xa7\xf2\xc1\x8e=x\x97\xab\xb3\
... | Python | 1 |
stringify!(VR_IVRDebug_FnTable),
"::",
stringify!(DriverDebugRequest)
)
);
}
extern "C" {
pub fn VR_InitInternal(peError: *mut EVRInitError, eType: EVRApplicationType) -> isize;
}
extern "C" {
pub fn VR_ShutdownInternal();
}
extern "C" {
pub fn VR_IsHmdPresent() -> bo... | Rust | 0 |
import gradio as gr
from learnathon.diy4youth_students.diy4youth_student_api import call_api
from PIL import Image
chat_history = []
diy4youth_student_api_key = "H2-v0wkwn72djgy"
def display_image(image):
# Just return the image as is
return image
def chat(question, system_message, prompt_template1, welcome_... | Python | 1 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def load_store_amenities_from_sql():
from django.conf import settings
import os
sql_statements = open(os.path.join(settings.PROJECT_DIR,'stores/sql/store_amenities.sql'), 'r').read()
return sql_statements
... | Python | 1 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
机器人设备接口模块
此模块提供了从端与各类机器人(多自由度机械臂、水下机器人等)的接口。
支持设备自动识别、参数配置和命令执行。
"""
import sys
import os
import time
import threading
import json
import logging
from enum import Enum
from PyQt5.QtCore import QObject, pyqtSignal
# 设置日志
logging.basicConfig(
level=logging.INFO,
... | Python | 1 |
elf, pred_dir):
print('Running full pointcloud evaluation.')
eval_path = os.path.join(pred_dir, 'fulleval')
os.makedirs(eval_path, exist_ok=True)
# Join room by their area and room id.
# Test independently for each room.
sys.setrecursionlimit(100000) # Increase recursion limit for k-d tree.
... | Python | 1 |
#!/usr/bin/env python3
#
# Functional test that boots known good tuxboot images the same way
# that tuxrun (www.tuxrun.org) does. This tool is used by things like
# the LKFT project to run regression tests on kernels.
#
# Copyright (c) 2023 Linaro Ltd.
#
# Author:
# Alex Bennée <alex.bennee@linaro.org>
#
# SPDX-Licens... | Python | 1 |
component(t2);
let t_min = vec_min.component_max();
let t_max = vec_max.component_min();
if t_min > t_max {
return None;
}
let t = if ray.contains(t_min) {
t_min
} else if ray.contains(t_max) {
t_max
} else {
retu... | Rust | 0 |
self.map.tile_map.update(ctx.context, t);
self.shop_map.move_with_func(t);
self.shop_command_palette.effect(ctx, t);
// 時刻の更新
self.update_shop_clock_regular(ctx, t);
self.check_shop_clock_regular(ctx, t);
ctx.process_utility.redraw();
}... | Rust | 0 |
z4", Box{24.4210624695, 24.4211053848, 42.1666431427, 42.166686058}},
{"bje9d2n0", Box{76.201171875, 76.2013435364, -174.971008301, -174.970664978}},
{"y943", Box{50.80078125, 50.9765625, 115.6640625, 116.015625}},
{"3", Box{-45.0, 0.0, -135.0, -90.0}},
{"gmn", Box{73.125, 74.53125, -25.3125, -23.90625}},
{"1djwe5... | Rust | 0 |
0;
let mut user_keys = [false, false, false, false];
let program = glium::Program::from_source(&display, vertex_shader_src, fragment_shader_src, None).unwrap();
let mut map: Array2d = Array2d::new(50, 50);
map.set_random_elements(60, 1);
loop {
let mut target = display.draw();
... | Rust | 0 |
import re
from datetime import datetime
template_functions = {
"timestamp": lambda data: str(int(datetime.now().timestamp())),
"i": lambda data: data.get("index", False),
"file": lambda data: data.get("file", False),
"date": lambda data: datetime.now().strftime("%Y-%m-%d"),
"time": lambda data: dat... | Python | 1 |
b_sigma1_512(word: u64) -> u64 {
rotr(14, word) ^ rotr(18, word) ^ rotr(41, word)
}
fn b_sigma0_512(word: u64) -> u64 {
rotr(28, word) ^ rotr(34, word) ^ rotr(39, word)
}
pub fn hash(msg: &[u8]) -> Option<[u64; 8]> {
if msg.is_empty() {
None
} else {
let padded_message = pad_message(m... | Rust | 0 |
/// `Instance` itself dereferences to a `RegisterBlock`, which
/// provides access to the peripheral's registers.
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if TIM15_TAKEN {
None
... | Rust | 0 |
.height() - self.height()) // 2)
self.setMinimumSize(400, 300)
self.setWindowTitle('Sleepy Client')
self.setWindowIcon(QIcon('assets/images/favicon.png'))
self.navigationInterface.setExpandWidth(150)
self.navigationInterface.setMinimumExpandWidth(200)
self.navigationInter... | Python | 1 |
_uring_sqe__bindgen_ty_3 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union io_uring_sqe__bindgen_ty_4 {
pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_4__bindgen_ty_1,
pub __pad2: [__u64; 3usize],
_bindgen_union_align: [u64; 3usize],
}
... | Rust | 0 |
from model_mommy import mommy
from projects.models import ProjectType
def make_label(project, **kwargs):
if project.project_type.endswith("Classification") or project.project_type in {
ProjectType.BOUNDING_BOX,
ProjectType.SEGMENTATION,
}:
return mommy.make("CategoryType", project=pro... | Python | 1 |
ht])<float(parcel[c.OrderWeight]):
CancelledOrders.append(parcel)
continue
else:
right_drone = possible3
else:
right_drone = possible2
else:
right_drone = possible1
# updating the de... | Python | 1 |
_rgb8().into_raw().as_slice(),
image_size,
image_size,
image::ColorType::Rgb8,
)
.map_err(|_| error::IdenticonError::EncodeImageError)?;
Ok(buffer)
}
}
#[cfg(test)]
mod tests {
use crate::Identicon;
#[test]
fn trim_of_inpu... | Rust | 0 |
dipijat_warna_kulit_gelap-sedang:',
'zh': ':女生按摩_中等深肤色:',
'ru': ':женщине_массируют_лицо_темныи_тон_кожи:'
},
'\U0001F486\U0001F3FE\U0000200D\U00002640': { # 💆🏾♀
'en': ':woman_getting_massage_medium-dark_skin_tone:',
'status': minimally_qualified,
'E': 4,
'de'... | Python | 1 |
"AOUT test signal selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum TEST_AOUT_A {
#[doc = "0: AOUT grounded"]
AOUT_VSSA = 0,
#[doc = "1: AOUT high / VCC connected on AOUT (can be sensed for 4 wires measurement of the load regulation)"]
AOUT_VCC_SENSE = 1,
... | Rust | 0 |
er_step)
model_name += '.'+args.loss_type+'_loss'
args.num_labels = 112+200
args.attr_group_dict = {0: [0, 1, 2, 3], 1: [4, 5, 6, 7, 8, 9], 2: [10, 11, 12, 13, 14, 15], 3: [16, 17, 18, 19, 20, 21], 4: [22, 23, 24], 5: [25, 26, 27, 28, 29, 30], 6: [31], 7: [32, 33, 34, 35, 36], 8: [37, 38], 9: ... | Python | 1 |
[test]
fn vertical_roads_center() {
let city = example_city();
let answer = [
[(10.0, 270.0), (530.0, 270.0), (1050.0, 270.0)],
[(10.0, 790.0), (530.0, 790.0), (1050.0, 790.0)],
];
for (i, j) in city.board.vertical_roads.indices() {
let Position { ... | Rust | 0 |
assert pd.NaT in obj
assert np.datetime64("NaT") in obj
assert np.timedelta64("NaT") not in obj
obj2 = CategoricalIndex(tdi)
if unwrap:
obj2 = obj2._data
assert np.nan in obj2
assert None in obj2
assert pd.NaT in obj2
assert np.datetime64(... | Python | 1 |
"""
LibreOffice 최신 버전 HWP 변환 테스트
업데이트 후 HWP 파일 지원 개선 여부 확인
"""
import subprocess
from pathlib import Path
import sys
import time
def check_libreoffice_version():
"""LibreOffice 버전 확인"""
soffice_path = r"C:\Program Files (x86)\LibreOffice\program\soffice.exe"
# 64비트 경로도 확인
if not Path(soffice_path... | Python | 1 |
000000001, 0.000001, 1, 1000000],
/* ps */[0.000000000001, 0.000000001, 0.000001, 1]
];
const RECHARTS_DATAMIN: string = 'dataMin';
const RECHARTS_DATAMAX: string = 'dataMax';
const SELECTION_BOUNDARY_UNSET: number = -1;
const REFERENCE_AREA_BOUNDARY_UNSET: string = '';
class CriterionLineChart extends PureComp... | Rust | 0 |
options,
LogMessage("Flushed wallet.dat"),
vec![],
)
.await
.context("unable to start bitcoind docker image")?;
let http_endpoint = BitcoindHttpEndpoint {
port: HTTP_PORT,
ip: docker_daemon_ip()?,
};
let http_wallet_endpoint = create_wallet(http_endpoint).awai... | Rust | 0 |
# Reverse Words
s = "i.like.this.program.very.much"
b = ".".join(s.split(".")[::-1])
print(b)
| Python | 1 |
# Copyright (C) 2017-2024 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
from odoo import api, fields, models
class CrmLead(models.Model):
_inherit = "crm.lead"
lead_line_ids = fields.One2many(
comodel_name="crm.lead.line", inverse_nam... | Python | 1 |
import textwrap
from prettytable import PrettyTable
from ..log import log_to_client
from ..compiler.spec_assembler import get_specs
from ..compiler.compose import container_code_path
from . import utils
from ..systems.docker import get_dusty_container_name
from ..command_file import dusty_command_file_name
from .. im... | Python | 1 |
bytes, 448);
bytes.append(&mut Vec::from_iter(l.to_le_bytes().iter().cloned()));
let mut message = Vec::new();
let mut buf = [0u8; 4];
for i in bytes.chunks(4) {
buf.clone_from_slice(i);
message.push(u32::from_le_bytes(buf));
}
let T = vec![0xd76aa478, 0xe8c7b756, 0x24207... | Rust | 0 |
awiająca Ameryki",
],
},
#[cfg(feature = "ps")]
crate::Annotation {
lang: "ps",
tts: Some("نړۍ ښيي امریکا"),
keywords: &["امريکا", "زمکه", "نړۍ", "نړۍ ښيي امریکا"],
},
#[cfg(feature = "pt")]
crate::Annotation {
l... | Rust | 0 |
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeNotebookSessionStatements(self, request):
"""本接口(DescribeNotebookSessionStateme... | Python | 1 |
n<'a> {
timestamp: DateTime<Utc>,
plugin: &'a str,
plugin_instance: Option<&'a str>,
type_: &'a str,
type_instance: Option<&'a str>,
host: &'a str,
metric: &'a str,
value: Value,
}
pub struct PgCollectd {
inserter: AssertUnwindSafe<Mutex<PgInserter>>,
store_rates: bool,
}
impl ... | Rust | 0 |
"""Load model(s) from disk
"""
self.opt.load_weights_folder = os.path.expanduser(self.opt.load_weights_folder)
assert os.path.isdir(self.opt.load_weights_folder), \
"Cannot find folder {}".format(self.opt.load_weights_folder)
print("loading model from folder {}".form... | Python | 1 |
'''rgb/hsv'''
import math
import threading
import serial
import time
import cv2
import numpy as np
import sys
cap = None
start,end = 0.0,0.0
def nothing(x):
pass
WindowName = 'result'
cv2.namedWindow(WindowName, cv2.WINDOW_KEEPRATIO) # 建立空窗口
cv2.resizeWindow(WindowName, 200, 160) # 调整窗口大小
cv2.createTrackbar('... | Python | 1 |
import numpy as np
import tools
from tools import get_array, dags, results_prompt, get_custom_array
import matplotlib.pyplot as plt
#import seaborn as sns
path = results_prompt("memory")
# Styling
plt.style.use("seaborn")
#plt.rc("font", family="serif", size=56)
#plt.rc("axes", labelsize=18)
#plt.rc("legend", fonts... | Python | 1 |
Direct(ZMM2)),
operand2: Some(Direct(ZMM1)),
operand3: None,
operand4: None,
lock: false,
rounding_mode: None,
merge_mode: Some(MergeMode::Zero),
sae: false,
mask: Some(MaskReg::K5),
broadcast: None,
},
... | Rust | 0 |
></p></body></html>", None))
self.label_rowcol.setText(QCoreApplication.translate("NedRowcolDialogWindow", u"<html><head/><body><p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 ...</p></body></html>", None))
self.lineedit_rowcoltitle.setText("")
self.label_placement.setText(QCoreApplication.t... | Python | 1 |
"""Python 2/3 compat layer leftovers."""
import decimal as _decimal
import math as _math
import warnings
from contextlib import redirect_stderr, redirect_stdout
from io import BytesIO
from io import StringIO as UnicodeIO
from types import SimpleNamespace
from .textTools import Tag, bytechr, byteord, bytesjoin, strjoi... | Python | 1 |
s=labels, attention_mask=attention_mask)
forget_loss_current = self.get_batch_loss(outputs.logits, labels)
with torch.no_grad():
forget_outputs_oracle = self.ref_model(forget_inputs['input_ids'], labels=forget_inputs['labels'], attention_mask=forget_inputs['attention_mask'])
... | Python | 1 |
) => state.full_move_number = fmn,
Err(err) => return Err(err.to_string()),
}
}
Ok((grid, state))
}
pub fn to_fen(grid: &[Piece; 64], state: &State) -> String {
let mut fen = String::new();
for row in 0..8 {
let mut empties = 0;
for col in 0..8 {
let pi... | Rust | 0 |
let mut pc = 0u;
let mut labels: HashMap<uint, uint> = HashMap::new();
while pc < code.len() - 1 {
let card = code[pc];
pc += 1;
if card.rank == QUEEN {
let mut queen = card.suit as uint;
while pc < code.len() && code[pc].rank == QUEEN... | Rust | 0 |
}
if false {
{
let mut t = r64(0.0);
let st = Instant::now();
for n in 0..1000000 {
let x = r64((n % 1000) as f64 / 1000.0);
t += exp::impls::exp_power_series(x, 0);
}
let en = Instant::now();
println!("{}\t{}", en.duration_since(st).as_micros(), t.0);
}
... | Rust | 0 |
,
out: mpsc::Sender<Event>,
) -> crate::Result<Source> {
// Kubernetes source uses 'file source' and various transforms to implement
// gathering of logs over Kubernetes CRI supported container runtimes.
// Side goal is to make kubernetes source behave as simillarly to docker source... | Rust | 0 |
train_pipeline += BalanceLabels(
gt_affs,
gt_affs_scale)
train_pipeline += IntensityScaleShift(raw, 2,-1)
train_pipeline += Normalize(gt_affs)
train_pipeline += Unsqueeze([raw, gt_affs])
train_pipeline += Unsqueeze([raw])
train_pipeline += PreCache(
cache_... | Python | 1 |
d(&self) -> bool {
has_sym!(self, xcb_randr_refresh_rates_end)
}
/// Sends a `RandR::QueryVersion` request (checked).
///
/// This request generates a reply. You must either discard it with
/// [`discard_reply`] or retrieve it with [`xcb_randr_query_version_reply`].
///
/// [`discar... | Rust | 0 |
for _ in range(repeat):
result, model = MF_optmize(trainset, validset, testset, config=config, debiasing=config.get('debiasing', 'none'), use_wandb=use_wandb)
results.append(result)
print(results[-1], flush=True)
# if (config['mode'] == 'ce') and (task == 'ratingPrediction'):
# post_processing(... | Python | 1 |
runner = init_runner.tauri_path(tauri_path);
}
if let Some(app_name) = app_name {
init_runner = init_runner.app_name(app_name);
}
if let Some(window_title) = window_title {
init_runner = init_runner.window_title(window_title);
}
if let Some(dist_dir) = dist_dir {
init_runner = init_runner.dist_d... | Rust | 0 |
"Offset of field: ",
stringify!(OctaveNoise),
"::",
stringify!(octaves)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DoublePerlinNoise {
pub amplitude: f64,
pub octA: OctaveNoise,
pub octB: OctaveNoise,
}
#[test]
fn bindgen_test_layout... | Rust | 0 |
# # # a="harsha"
# # # b="bhumi"
# # # print(a==b)
# # word="abcdefghij"
# # print(word[0:7:2])
# def main():
# string=input("enter the string")
# while string!=0:
# if string==string[::-1]:
# print("string is palandrom")
# else:
# print("string is not palandro... | Python | 1 |
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalett... | Python | 1 |
, max_depth=3)
return hierarchy
def down(self, worktree_id: str):
worktree_path = self.worktrees[worktree_id]
shutil.rmtree(worktree_path)
del self.worktrees[worktree_id]
if __name__ == "__main__":
# Example usage
codebase_path = os.getenv("CAL_COM_REPO_PATH")
if ... | Python | 1 |
await exists(table="glitches", to_match={"match_name": glitch['match_name'], "reference" : glitch['reference']})
if glitch_record_exists:
response = await update(table="glitches", info={"markets" : glitch["markets"]}, to_match={"match_name": glitch['match_name'], "reference" : glitch['reference']})
... | Python | 1 |
" | j | j
fd | _ y )Nz%owned_by_manager skipped INCREF of %rr rm z INCREF %r
r )r] r r rZ r) r r( r rI r[ rY addr\ r r r _decrefrX _close)r+ r r2 s r r^ zBaseProxy._increfL s ... | Python | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.