text string | label_name string | labels int64 |
|---|---|---|
ack["EarlyFraudWarning.ListParams"]
) -> ListObject["EarlyFraudWarning"]:
"""
Returns a list of early fraud warnings.
"""
result = cls._static_request(
"get",
cls.class_url(),
params=params,
)
if not isinstance(result, ListObject):
... | Python | 1 |
*self == BEEVTR::CLEAR
}
#[doc = "Checks if the value of the field is `TOGGLE`"]
#[inline]
pub fn is_toggle(&self) -> bool {
*self == BEEVTR::TOGGLE
}
}
#[doc = "Possible values of the field `BSWTRG`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BSWTRGR {
#[doc = "none"]
... | Rust | 0 |
oken.
v['d&a'] = b(get_da(v['w']))
# Digits and '-'.
v['d&-'] = b(get_dand(v['w'], '-'))
# Digits and '/'.
v['d&/'] = b(get_dand(v['w'], '/'))
# Digits and ','.
v['d&,'] = b(get_dand(v['w'], ','))
# Digits and '.'.
v['d&.'] = b(get_dand(v['w'], '.'))
# A uppercase letter followed... | Python | 1 |
id(&self) -> ChainId {
ChainId::new(self.chain_id)
}
}
impl MoveStructType for ChainIdResource {
const MODULE_NAME: &'static IdentStr = ident_str!("ChainId");
const STRUCT_NAME: &'static IdentStr = ident_str!("ChainId");
}
impl MoveResource for ChainIdResource {}
<reponame>vadixidav/itertools
use ... | Rust | 0 |
pub comment: String,
pub created: String,
pub last_altered: String,
}
impl AsTuple for FuncMetadata {}
#[derive(Clone, Debug, Serialize)]
pub struct Privilege {
pub grantor: u32,
pub grantee: u32,
pub object_type: String,
pub object_id: u32,
pub privilege: u32,
}
impl AsTuple for Privil... | Rust | 0 |
OM SOUNDING MODEL TO REGULAR
# temp_model = sounding_models.reshape(mesh2D.vnC, order='C')
# temp_model = np.fliplr(temp_model)
# temp_model = mkvc(temp_model)
chi = np.zeros_like(sounding_models)
fig = plt.figure(figsize=(9, 3))
ax1 = fig.add_axes([0.1, 0.12, 0.73, 0.78])
log_mod = np.log10(model)
# log_mod = np.lo... | Python | 1 |
from tkinter import *
from tkinter import messagebox
from Database import Database
from Prices.PriceInsert import PriceInsert
from Prices.PriceUpdate import PriceUpdate
from generalQueries import *
class Prices:
def __init__(self):
self.main()
def goInsert(self, tk):
insert = PriceInsert()
... | Python | 1 |
# License: BSD 3 clause
from tick.base_model import ModelGeneralizedLinear
__author__ = 'Stephane Gaiffas'
class ModelGeneralizedLinearWithIntercepts(ModelGeneralizedLinear):
"""An abstract base class for a generalized linear model (one-class
supervised learning) with individual intercepts
Parameters
... | Python | 1 |
for x in range(1, 1000):
if x != 7 and x!= 77 and x!= 777:
print(x, x**2-1000)
print("----")
for x in range(1, 1000):
if x == 7 and x== 77 and x== 777:
continue
print(x, x**2-1000)
suma = 0
while True:
napis = input("podaj tekst: ")
if napis == "wyjdz" or napis == "zakacz" or ... | Python | 1 |
State {}
/// States in which command buffer can de reset.
pub trait Resettable: Droppable {}
impl<U> Resettable for RecordingState<U> {}
impl<U> Resettable for ExecutableState<U> {}
impl Resettable for InvalidState {}
/// Buffer with this usage flag will move to invalid state after execution.
/// Resubmitting will re... | Rust | 0 |
': pd.Series(
data = series_diff['l2'].to_numpy(),
index = pd.date_range(start='2000-01-01', periods=len(series_2), freq='D'),
name = 'l2'
),
}
expected_exog_dict = {
'l1': pd.DataFrame(
data = np.vstack((
... | Python | 1 |
receive_name: receive_name.to_string(),
amount,
parameter: parameter.to_vec(),
}
}
fn and_then(self, then: Self) -> Self {
ActionsTree::AndThen {
left: Box::new(self),
right: Box::new(then),
}
}
fn or_else(self, el: Self) -> Self... | Rust | 0 |
[derive(Debug, PartialEq, Deserialize, Serialize, Default)]
pub struct GeneratorRequest {
#[serde(rename = "guid")]
pub guid: bool,
#[serde(rename = "sequence")]
pub sequence: bool,
#[serde(rename = "random")]
pub random: bool,
#[serde(rename = "min")]
pub min: u32,
#[serde(rename = ... | Rust | 0 |
antized dx.
dy (ndarray): Quantized dy.
max_val (float): Maximum value used when quantizing.
denorm (bool): Whether to multiply flow values with width/height.
Returns:
ndarray: Dequantized flow.
"""
assert dx.shape == dy.shape
assert dx.ndim == 2 or (dx.ndim == 3 and dx.... | Python | 1 |
ification Authority (CA) certificates.
use rasn::prelude::*;
/// The identifier of the secret key to be used by the server to encrypt the
/// private key.
pub type AsymmetricDecryptKeyIdentifier = rasn::types::OctetString;
/// The main body of a CSR attribute request.
pub type CsrAttrs = SequenceOf<AttrOrOid>;
/// T... | Rust | 0 |
from fastapi import APIRouter, HTTPException
from pydantic import BaseModel
from ..controllers.auth_controller import register
from services.logging_service import LoggingService
from dotenv import load_dotenv
import os
load_dotenv()
router = APIRouter()
# admin credentials
ADMIN_USERNAME = os.getenv("ADMIN_USERNAME"... | Python | 1 |
by us.
if header_maxval < max_sample && !image.all_smaller(header_maxval) {
return Err(io::Error::new(
io::ErrorKind::InvalidInput,
"Sample value greater than allowed for chosen header",
));
}
let encoding = image.encoding_for(&self.dimens... | Rust | 0 |
8192
self.assertEqual(buffer.getvalue(), orig)
def test_dictionary(self):
samples = []
for i in range(128):
samples.append(b"foo" * 64)
samples.append(b"bar" * 64)
samples.append(b"foobar" * 64)
d = zstd.train_dictionary(8192, samples)
... | Python | 1 |
from rest_framework import serializers
from ..models import ItemsServices
class ItemsServicesSerializer(serializers.ModelSerializer):
sub_library_name = serializers.CharField(source='sub_library_id.name', read_only=True)
library_name = serializers.CharField(source='sub_library_id.library.name', read_only=True... | Python | 1 |
}
Ok(header_map)
}
#[rustfmt::skip]
#[cfg(test)]
mod tests {
use super::*;
use rstest::rstest;
use pretty_assertions::assert_eq;
/// Helper function that creates a `RequiredAuth` structure
fn create_required_auth(username: &str, password: &str, encrypt: &str) -> auth::RequiredAuth {
... | Rust | 0 |
": "@id"},
"characterIn": {"@id": "ex:characterIn", "@type": "@id"},
"playsCharacter": {"@id": "ex:playsCharacter", "@type": "@id"}
}
graph.serialize(destination=jsonld_file_path, format="json-ld",
context=context, indent=2, auto_compact=True)
print(f"JSON-LD file saved ... | Python | 1 |
// .arg(format!("Dir::Etc::sourcelist={}", list_path))
// .arg("-o").arg("Dir::Etc::sourceparts=-")
));
operations.push(Operation::PrivilegedCmd(
Command::new("apt-get")
.arg("install")
.arg("-y")
// TODO(tailhook) vers... | Rust | 0 |
from sympy import *
print(sqrt(50)) # 5*sqrt(2)
print(latex(sqrt(50))) # 5\sqrt{2}
x, y, z = symbols("x y z")
eqn = parse_expr('2x-y+2z-5=0', transformations='all')
print(eqn.lhs)
point = "M(1;2;5)"
point_name = point[0]
point_coor = point[2:-1].split(';')
point_coor = (int(point_coor[0]), in... | Python | 1 |
import numpy as np
import cv2
def decolourise(image, col_dict):
image_col = np.zeros((image.shape[0], image.shape[1]), dtype='uint8')
for _, col in col_dict.items():
image_col[np.where(np.all(image == col[1], axis=-1))] = col[0]
return image_col
def colourise(image, col_dict):
image_col = np.z... | Python | 1 |
# Global Variables
#Variables that are created outside of a function are known as global variables.
#Global variables can be used by everyone, both inside of functions and outside.
x = "Awesome"
def myfunc():
print("python is " + x)
myfunc()
#If ... | Python | 1 |
FormatDataReq(NowClipboardFormatDataReqMsg),
FormatDataRsp(NowClipboardFormatDataRspMsg<'a>),
#[fallback]
Custom(&'a [u8]),
#[decode_ignore]
FormatDataRspOwned(NowClipboardFormatDataRspMsgOwned),
}
impl From<NowClipboardCapabilitiesReqMsg> for NowClipboardMsg<'_> {
fn from(msg: NowClipboar... | Rust | 0 |
"""Utility to run shell commands asynchronously with a timeout."""
import asyncio
TRUNCATED_MESSAGE: str = "<response clipped><NOTE>To save on context only part of this file has been shown to you. You should retry this tool after you have searched inside the file with `grep -n` in order to find the line numbers of wh... | Python | 1 |
# -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | Python | 1 |
Takes each element in the `Iterator`: if it is a `None`, no further
elements are taken, and the `None` is returned. Should no `None` occur,
the sum of all elements is returned.
# Examples
This sums up the position of the character 'a' in a vector of strings,
if a wo... | Rust | 0 |
2))
pygame.display.flip()
def welcome_screen(username, score, level):
waiting = True
while waiting:
screen.fill(BLACK)
t1 = font.render(f"Welcome, {username}!", True, WHITE)
t2 = font.render(f"Score: {score} | Level: {level}", True, WHITE)
t3 = font.render("Press SPACE ... | Python | 1 |
ok_or(ConnectionError::UnsupportedExtension)?;
let length_so_far = 0;
let fence_bytes = self.fence.serialize();
let mut request0 = vec![
extension_information.major_opcode,
DESTROY_FENCE_REQUEST,
0,
0,
fence_bytes[0],
fence_... | Rust | 0 |
buffer_ref(&mut buf)?;
eprintln!("{:?}", Message::from(unbuffered));
}
}
<gh_stars>0
use super::*;
use crate::{
action::{Add, ColumnValueStat, Stats},
time_utils::timestamp_to_delta_stats_string,
DeltaDataTypeLong,
};
use arrow::{
array::{
as_boolean_array, as_primitive_array, as_str... | Rust | 0 |
b1100_0000 == 0b1100_0000 {
let b2 = trycvt!(src.read_u8());
let offset = ((len as usize & 0b0011_1111) << 8) | (b2 as usize);
if start.len() < offset {
Err(())
} else {
let mut tmp = &start[offset..];
... | Rust | 0 |
// Use condition provided
.map(|m| m.into())
// Use the selector of parent context
.or_else(|| self.selector.clone())
// Use class name of scope context
.or_else(|| self.class_name.map(|m| format!(".{}", m).into()))
// Use html
.or_els... | Rust | 0 |
shuffle(map: &mut Vec<Vec<Location>>) -> bool {
use crate::Location::*;
let mut map_clone = map.clone();
let mut shuffled = false;
let row_count = map.len();
let col_count = map[0].len();
// Move East
for (row_no, row) in map.iter().enumerate() {
for (col_no, loc) in row.iter().en... | Rust | 0 |
wrap_or_else(|_e| {
println!("Unable to connect to website. Exiting...");
error!("Unable to connect to website. Nyaadle closed.");
std::process::exit(0)
});
let items = channel.into_items();
// Execute the main logic
nyaadle_logic(items, watch_list, false);
}
pub fn feed_check(... | Rust | 0 |
scopes", counter);
}
counter = counter + 1;
let pause = rng.gen_range(0, 10);
if pause >= 5 {
std::thread::sleep(std::time::Duration::from_millis(pause));
} else if pause > 2 {
std::thread::yield_now();
}
}... | Rust | 0 |
ynthesisError::AssignmentMissing),
)?;
let rhs_value = self.rhs;
let rhs = cs.alloc(
|| "B",
|| rhs_value.ok_or(SynthesisError::AssignmentMissing),
)?;
let twon_value = Some(F::from(2u32).pow(&[n]));
let twon = cs.alloc_input(
|| "2^n... | Rust | 0 |
import re
url = """
https://www.google.com/search?h/petsexpert/siamese-cat-price-in-india/blog/macaws-prices-purchase-cost-supplies-food-and-more/mynextpet.in/macaw-parrot-price-in-india/?result.aspx
"""
while(re.search("/", url)):
res = re.search("/", url)
print(url[:res.start()])
url = url[res.end():]
... | Python | 1 |
se", "sse2"]),
)
.unwrap();
let x86_64_windows =
Platform::new("x86_64-pc-windows-msvc", TargetFeatures::Unknown).unwrap();
let mut link_details = HashMap::new();
use EnabledTernary::*;
// testcrate -> lazy_static 1.
LinkDetails::new(
pa... | Rust | 0 |
compatible sink.
///
/// Among other things, this adapter maintains backpressure through the sink, as
/// it'll only go as fast as `streaming_sink` is able to poll items, without any
/// buffering.
pub fn adapt_to_topology(mut streaming_sink: impl StreamingSink + 'static) -> sinks::RouterSink {
let (stream, sink) =... | Rust | 0 |
import json
from pathlib import Path
from pyhap.loader import get_loader
loader = get_loader()
path = Path(__file__).parent / 'contrib'
def merge(existing, new):
for key, value in new.items():
if key in existing:
# Check the UUID matches. If not, throw an exception?
assert exist... | Python | 1 |
# coding: UTF-8
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from sklearn import metrics
import time
from datetime import timedelta
def get_time_dif(start_time):
"""获取已使用时间"""
end_time = time.time()
time_dif = end_time - start_time
return timedelta(seconds=int(... | Python | 1 |
opose_set_balance_and_note(1, 2, 2));
assert_ok!(propose_set_balance_and_note(1, 4, 4));
assert_noop!(Democracy::blacklist(Origin::signed(1), hash.clone(), None), BadOrigin);
assert_ok!(Democracy::blacklist(Origin::root(), hash, None));
assert_eq!(Democracy::backing_for(0), None);
assert_eq!(Democracy::back... | Rust | 0 |
test]
fn test_batch_item_vendor_extensions() {
let fragment_hex = concat!(
"42000F 01 00000048", // Batch Item (0x42000F) with a failed result status (0x42007F, enum type 0x05), all other
" 42007F 05 00000004 00000001 00000000", // optional fields missing except the message extension structure (0x4... | Rust | 0 |
oken = parser.next();
if next_token == LexToken::OpBraceClose {
break;
} else if next_token != LexToken::OpComma {
panic!("Expected ',' or '}}', found {:?}.",next_token);
}
}
Expr::Match(Box::new(in_expr),ma... | Rust | 0 |
[`StreamKey`](crate::stream::StreamKey) is needed for decryption of the lockbox.
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum LockboxRecipient {
LockId(LockId),
StreamId(StreamId),
}
#![feature(never_type)]
#[cfg_attr(crux, crux_test)]
fn crux_test() -> i32 {
let x: Result<i32, fn()> = Ok(1);
match ... | Rust | 0 |
aseenviron['pylons.routes_dict']['action'] = 'use_redirect'
resp = self.app.get('/', status=301)
def test_nothing(self):
self.baseenviron['pylons.routes_dict']['action'] = 'nothing'
resp = self.app.get('/')
assert '' == resp.body
assert resp.response.headers['Cache-Control']... | Python | 1 |
_same_hashmap(black_box(big_vec))),
);
group.finish();
}
criterion_group!(benches, bench_all_same);
criterion_main!(benches);
<reponame>nchlswhttkr/bookmark
use super::schema::*;
use chrono::NaiveDateTime;
#[derive(Identifiable, Queryable)]
#[table_name = "bookmark"]
pub struct Bookmark {
pub id: i32,
... | Rust | 0 |
# needs a second to ensure non-zero values are returned on initial read
print("++++++++++++++++++++")
while True:
voltage = ups.get_voltage()
charge = ups.get_charge()
is_plugged = ups.get_is_plugged()
print("Voltage:%5.2fV" % voltage)
print("Battery:%5i... | Python | 1 |
_buffer_new(table.0))
}
}
pub fn new_with_language(language: &Language) -> Buffer {
unsafe {
from_glib_full(ffi::gtk_source_buffer_new_with_language(language.to_glib_none().0))
}
}
}
pub trait BufferExt {
//fn backward_iter_to_source_mark<'a, P: Into<Option<&'a str>... | Rust | 0 |
Ordering::Equal => "not equal to",
Ordering::Greater => "at most",
}
} else {
match self.ordering {
Ordering::Less => "less than",
Ordering::Equal => "equal to",
Ordering::Greater => "greater than",
... | Rust | 0 |
_base_ = "./ss_mlBCE_MaskFull_PredDouble_PBR05_woCenter_edgeLower_refinePM10_01_02MasterChefCan.py"
OUTPUT_DIR = "output/Depth6DPose/ssYCBV/ss_mlBCE_MaskFull_PredDouble_PBR05_woCenter_edgeLower_refinePM10/07_08PuddingBox"
DATASETS = dict(
TRAIN=("ycbv_008_pudding_box_train_real_aligned_Kuw",),
TRAIN2=("ycbv_008... | Python | 1 |
, "failed to permute");
assert!(p <= *n, "output number is too big");
}
}
}
#[test]
#[ignore]
fn test_feistel_valid_permutation() {
let n = (1u64 << 30) as Index;
let mut flags = vec![false; n as usize];
let precomputed = precompute(n);
... | Rust | 0 |
cted_group_frames, actual_group_frames,
"Expected:\n{:#?}\nActual:\n{:#?}",
expected_group_frames, actual_group_frames,
);
}
// Standalone test that all the pipes are hooked up for read window aggregate
#[tokio::test]
pub async fn read_window_aggregate_test() {
let fixture = ServerFixture::crea... | Rust | 0 |
bsdf_socket = bsdf_link.from_socket
mat.node_tree.links.remove(displacement_link)
mat.node_tree.links.new(
displace_socket, nodes["Material Output"].inputs["Surface"]
)
displaced_materials[mat] = bsdf_socket
if len(displaced_materials) != 0:
... | Python | 1 |
Result(
{
'index': 1,
'address': 'fc00::1',
'family': AF_INET6,
'prefixlen': 48,
}
),
),
(
Request(
{
'index': 1,
... | Python | 1 |
import os
from pathlib import Path
import pytest
from playwright.sync_api import Page
from shiny.playwright.controller import InputRadioButtons, OutputCode
from shiny.run import ShinyAppProc, run_shiny_app
@pytest.mark.parametrize(
"app_name,mod0_key,mod1_key",
[
# Express mode
("app-express... | Python | 1 |
from datasets import load_dataset
from .base import BaseDataset
class AiRiskDataset(BaseDataset):
@staticmethod
def load(path: str):
"""Load dataset."""
dataset = load_dataset('json', data_files=path)
def choices_process(example):
# the original answer format is ` (A)`,... | Python | 1 |
::AAAA,
0x001D => RRType::LOC,
0x001E => RRType::NXT,
0x001F => RRType::EID,
0x0020 => RRType::NIMLOC,
0x0021 => RRType::SRV,
0x0022 => RRType::ATMA,
0x0023 => RRType::NAPTR,
0x0024 => RRType::KX,
0x0025 => RRType::CERT,
0x0026 => RRType::DNAME,
0x0027 => RRType::SINK,
0x... | Rust | 0 |
let party_keys_vec = (0..n.clone())
.map(|i| Keys::phase1_create(parties[i]))
.collect::<Vec<Keys>>();
let mut bc1_vec = Vec::new();
let mut blind_vec = Vec::new();
for i in 0..n.clone() {
let (bc1, blind) = party_keys_vec[i].phase1_broadcast();
bc1_vec.push(bc1);
... | Rust | 0 |
import requests, os
import socket
os.system("clear")
from time import sleep
ip=socket.gethostbyname(socket.gethostname())
import os,sys
import pywifi
from requests import session
from colorama import Fore, Style
import requests, random, re
from random import randint
import requests,pystyle
from pystyle import Add, Cent... | Python | 1 |
API also states that the filename must
// be in "permanent memory", so we copy it to a static and then use the
// static as the pointer.
//
// FIXME: We also call self_exe_name() on DragonFly BSD. I haven't
// tested if this is required or not.
unsafe fn init_state() -> *mut backtrace_sta... | Rust | 0 |
KeySym::XK_Clear => 0xff0b,
XKeySym::XK_Return => 0xff0d,
XKeySym::XK_Pause => 0xff13,
XKeySym::XK_Scroll_Lock => 0xff14,
XKeySym::XK_Sys_Req => 0xff15,
XKeySym::XK_Escape => 0xff1b,
XKeySym::XK_Delete => 0xffff,
... | Rust | 0 |
class Car:
# declared outside of the constructor at the class level
wheels = 4 # class variable
# creating object of car
def __init__(self, make, model, year, color):
# instance variable is declared inside the constructor
self.make = make # instance variables
self.model = mo... | Python | 1 |
#!/usr/bin/python3
Square = __import__('2-square').Square
my_square_1 = Square(3)
print(type(my_square_1))
print(my_square_1.__dict__)
my_square_2 = Square()
print(type(my_square_2))
print(my_square_2.__dict__)
try:
print(my_square_1.size)
except Exception as e:
print(e)
try:
print(my_square_1.__size)
e... | Python | 1 |
from email.message import Message
from app.email.checks import check_recipient_limit
from app.email import headers
from tests.utils import random_email
def _email_list(size: int) -> str:
emails = []
for i in range(size):
emails.append(random_email())
return ", ".join(emails)
def _create_messag... | Python | 1 |
v = tl.load(old_a_location + old_start + i + old_offset, mask=old_offset < length)
tl.store(new_a_location + new_start + i + new_offset, v, mask=new_offset < length)
def launch_var_len_copy_triton(old_a_start, old_a_len, old_location, new_a_start, new_a_location):
BLOCK_SIZE = 256
grid_size = (l... | Python | 1 |
# Copyright 2021 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | Python | 1 |
er.prefer_binary:
args.append('--prefer-binary')
args.append('--')
args.extend(requirements)
extra_environ = {"_PIP_STANDALONE_CERT": where()}
with open_spinner(message) as spinner:
call_subprocess(args, spinner=spinner, extra_environ=extra_environ)
class NoOpBu... | Python | 1 |
count = min;
let mut range_vec = Vec::new();
range_vec.push(min);
while cur_count != max {
cur_count += step;
if cur_count > max {
break;
} else {
range_vec.push(cur_count);
}
println!("boolean ... | Rust | 0 |
struct FreelistNode {
size: ByteSize,
addr: Address,
}
#[repr(u8)]
#[derive(Copy, Clone, Debug, PartialEq)]
#[allow(dead_code)] // we do not explicitly use Free, but we zero the page marks
pub enum PageMark {
Free = 0,
Live,
}
<reponame>kowaalczyk/latte<filename>src/build.rs
extern crate lalrpop;
///... | Rust | 0 |
or values array is missing.");
}
let fields = &field_list[0];
let values = &field_list[1];
if fields.len() != values.len() {
panic!("The configuration data is invalid the fields and values array are not the same length.");
}
}
fn create_fields(
field_list: &Vec<Vec<String>>,
defi... | Rust | 0 |
'frame_{}_loss_giou'.format(i): args.giou_loss_coef,
})
# TODO this is a hack
if args.aux_loss:
for i in range(num_frames_per_batch):
for j in range(args.dec_layers - 1):
weight_dict.update({"frame_{}_aux{}_loss_ce".form... | Python | 1 |
crate::on_chain_config::OnChainConfig;
use crate::on_chain_resource::dao::ProposalAction;
use serde::{Deserialize, Deserializer, Serialize};
use starcoin_crypto::HashValue;
/// A Rust representation of a UpgradeModule resource.
#[derive(Debug, Serialize, Deserialize)]
pub struct UpgradeModule {
pub module_address... | Rust | 0 |
# -*- coding: utf-8 -*-
import factory
import datetime
from koalixcrm.crm.models import Agreement
from koalixcrm.crm.factories.factory_resource import StandardResourceFactory
from koalixcrm.crm.factories.factory_human_resource import StandardHumanResourceFactory
from koalixcrm.crm.factories.factory_task import Standar... | Python | 1 |
with_increment_value(self, increment_value, title=None):
"""Update progressbar with the value of the increment instead of the
current value of process as in update().
Parameters
----------
increment_value : int
Value of the increment of process. The percent of the p... | Python | 1 |
"""Helpers to check recorder."""
import asyncio
from dataclasses import dataclass, field
from typing import Any
from homeassistant.core import HomeAssistant, callback
DOMAIN = "recorder"
@dataclass(slots=True)
class RecorderData:
"""Recorder data stored in hass.data."""
recorder_platforms: dict[str, Any] ... | Python | 1 |
"""fix: remove not-null to content tables
Revision ID: fee587860c1e
Revises: 1a9d62fd2684
Create Date: 2025-07-27 13:25:57.819992
"""
from collections.abc import Sequence
from typing import Union
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision: str = 'fee587860c1e'
d... | Python | 1 |
expected_output = {
"index": {
1: {
"source": "TRAP",
"name": "IP Options(v4) Rx ",
"asic": 0,
"priority": 5,
"tc": 3,
"policy": "system-cpp-police-sw-forward",
"cir_sw": 2000,
"cir_hw": 1907,
... | Python | 1 |
ěn".to_string());
d.insert(24364, "yi".to_string());
d.insert(24365, "mǐ".to_string());
d.insert(24366, "juàn,quān".to_string());
d.insert(24367, "wān".to_string());
d.insert(24368, "shāo".to_string());
d.insert(24369, "ruò".to_string());
d.insert(24370, "xuān,yuān".to_string());
d.insert(24371, "jìng".... | Rust | 0 |
################
### Import file button section ###
##################################
FILE_NAME = tk.StringVar()
import_file_label = ttk.Label(root, textvariable = FILE_NAME,
foreground = "#ffffff",
background = "#131113")
import_file_label.place... | Python | 1 |
t_border_width)
def get_coordinates(self):
""" return shape coordinates in percentages (left, top, right, bottom) """
(x1, y1), (x2, y2) = self.coordinates
drawing_width = pixels_to_EMU(self._chart.drawing.width)
drawing_height = pixels_to_EMU(self._chart.drawing.h... | Python | 1 |
import os
import sys
import pytest
import asyncio
from datetime import datetime
# Add the parent directory to Python path
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from main.local_llm_graphiti import doSearch
from graphiti_core import Graphiti
from graphiti_core.nodes import Episode... | Python | 1 |
import yaml
import os
import discord
from discord import Option, OptionChoice
from discord.ext import commands, tasks
from utility.config import config
from cogs.function_in import function_in
from cogs.function_in_in import function_in_in
class Shop(discord.Cog, name="商店"):
def __init__(self, bot):
self... | Python | 1 |
set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w... | Rust | 0 |
_display_skip: placeholdertype = 4;
pub const GLUE_PAR__above_display_short_skip: placeholdertype = 5;
pub const GLUE_PAR__below_display_short_skip: placeholdertype = 6;
pub const GLUE_PAR__left_skip: placeholdertype = 7;
pub const GLUE_PAR__right_skip: placeholdertype = 8;
pub const GLUE_PAR__top_skip: placeholdertype... | Rust | 0 |
collect::<Vec<String>>();
Ok(res)
}
/// Parse and return the output of the replay step.
pub fn get_replay_output(&self) -> RecoveryResult<(Height, String)> {
replay_helper::read_output(self.work_dir.join(replay_helper::OUTPUT_FILE_NAME))
}
pub fn get_recovery_height(replay_height: ... | Rust | 0 |
x = ("Bebra","Navodchik Kantuzhen", False, 1)
ch = all(x)
print(ch) | Python | 1 |
);
assert_eq!(ser_msg_json["headers"]["timelimit"][0], 30);
assert_eq!(ser_msg_json["headers"]["timelimit"][1], 60);
assert_eq!(ser_msg_json["headers"]["argsrepr"], "(1)");
assert_eq!(ser_msg_json["headers"]["kwargsrepr"], "{'y': 2}");
assert_eq!(ser_msg_json["headers"]["origin"], "gen123@piper");
... | Rust | 0 |
@staticmethod
def _observation_model_pytorch(dG_over_KT, standard_conc=1, **kwargs):
return -(dG_over_KT + np.log(standard_conc)) / LN10
# implementation does not rely on any torch.* methods so we can just reuse it
# for other backends via aliases
_observation_model_numpy = _observation_mo... | Python | 1 |
debug_log_enabled {
() => { false };
}
macro_rules! debug_log {
($format:literal) => {
enabled_debug_print!(false, "types", $format);
};
($format:literal, $($args:expr),*) => {
enabled_debug_print!(false, "types", $format, $($args),*);
};
}
use std::collections::{HashMap, HashSet}... | Rust | 0 |
T>, Error>;
async fn forkchoice_updated_v1(
&self,
forkchoice_state: ForkChoiceState,
payload_attributes: Option<PayloadAttributes>,
) -> Result<ForkchoiceUpdatedResponse, Error>;
async fn exchange_transition_configuration_v1(
&self,
transition_configuration: Transi... | Rust | 0 |
ck;
/// can_fly(duck); // 静态分发
/// let duck = Duck;
/// dyn_can_fly(duck); // 动态分发
/// ```
///
/// Base usage: 错误示范
///
/// ```
/// use std::ops::Add;
/// // 以下多个参数的情况,虽然同时指定了impl Add<T, Output=T>类型,
/// // 但是它们并不是同一个类型,因为这是抽象类型。
/// // 所以编译会出错: mismatched types
/// fn sum<T>(a: impl Add<T, Output=T>, b: impl Ad... | Rust | 0 |
}
}
#[doc = "no description available"]
#[inline(always)]
pub fn invisible(self) -> &'a mut W {
self.variant(FLEXCOMM7_IRQ_A::INVISIBLE)
}
#[doc = "no description available"]
#[inline(always)]
pub fn visible(self) -> &'a mut W {
self.variant(FLEXCOMM7_IRQ_A::VISIBLE)
... | Rust | 0 |
o propose your new task based on the content starting with "User:" in the previous round of the contextual dialogue information(do not repeat this sentence).
"""
[Requirements]="""
1. The reply must start with "User:".
{{{example}}}
3. {{{action_type_info}}}
"""
{{{all_tool_required_info}}}
[Tool List]="""
{{{tools}... | Python | 1 |
ow debug info, repeat for more debug info.",
)
args = parser.parse_args()
if args.cache_dir is None or (
not args.remove_duplicated and not args.stamps_dir and not args.remove_orphans
):
parser.print_usage()
sys.exit(1)
return args
def main():
args = parse_arguments()... | Python | 1 |
=> { return-49; },
(4, 0, 2, 0) => { return-40; }
_ => {}
}
}
let b = self.is_endgame();
let mut ret = p.value_at(&m.to, b) - p.value_at(&m.from, b);
if let Some(t) = self.get_reference_at(m.to.x, m.to.y){
ret -= t.combined_value_at(&m.to, b);
}
if let Some(q) = m.promote{
ret -... | Rust | 0 |
_ERROR: f64 = 1e-9;
const MAX_ITERATIONS: u32 = 50;
pub fn newton_raphson<Func, Deriv>(start: f64, f: Func, d: Deriv) -> f64
where
Func: Fn(f64) -> f64,
Deriv: Fn(f64) -> f64,
{
// x[n + 1] = x[n] - f(x[n])/f'(x[n])
let mut x = start;
for _ in 0..MAX_ITERATIONS {
let res = f(x);
... | Rust | 0 |
"""
return self.enable_reasoning and self.reasoning_parser is not None
def _should_check_for_unstreamed_tool_arg_tokens(
self,
delta_message: Optional[DeltaMessage],
output: CompletionOutput,
) -> bool:
"""
Check to see if we should check for unstreamed too... | Python | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.