text string | label_name string | labels int64 |
|---|---|---|
les_directory(settings::SETTINGS.collectors.tg.files_directory.clone())
.log_verbosity_level(settings::SETTINGS.collectors.tg.log_verbosity_level)
.max_download_queue_size(settings::SETTINGS.collectors.tg.max_download_queue_size)
.encryption_key(settings::SETTINGS.collectors.tg.encryption_key.cl... | Rust | 0 |
let mut handler = MockHandlerHolder::new();
handler.memory[0x0000] = opcode;
let mut cpu = Cpu::new(Box::new(handler));
reset_all_registers(&mut cpu);
cpu.set_A_reg(a);
cpu.set_B_reg(b);
cpu.next_instruction();
assert_eq!(cpu.get_H_flag(), expected);
assert_eq!(cpu.get_A_reg(),... | Rust | 0 |
lue(&tag));
}
let temp = std::env::temp_dir();
nu_dict.insert_value("temp-dir", UntaggedValue::path(temp).into_value(&tag));
let config = nu_data::config::default_path()?;
nu_dict.insert_value("config-path", UntaggedValue::path(config).into_value(&tag));
let keybinding_path = crate::keybindin... | Rust | 0 |
ackhide__ = True
cls.raise_if(
val=not val,
resource_name=resource_name,
field_value=field_value,
field_name=field_name,
msg=msg,
)
class ValidationException(MDRApiBaseException):
"""
An exception raised when a submitted form or docu... | Python | 1 |
Determines how bars at the same location
coordinate are displayed on the graph. With
"group", the bars are plotted next to one
another centered around the shared location.
With "overlay", the bars are plotted over one
anoth... | Python | 1 |
{
continue;
} else {
word_counter.increment(word);
}
}
}
word_counter.display();
}
use std::io;
use std::sync::Arc;
use async_trait::async_trait;
use crate::proxy::InboundHandler;
use crate::proxy::{InboundTransport, TcpInboundHandler};
pub st... | Rust | 0 |
nal[RequestOptions]
Request-specific configuration.
Returns
-------
Tool
Successful Response
Examples
--------
from letta_client import Letta
client = Letta(
token="YOUR_TOKEN",
)
class InventoryItem(BaseMode... | Python | 1 |
w(Arc::new(|| { $body; }));
$b.iter(|| { $body; });
drop(t);
};
($b:ident, $pre:expr, $body:expr) => {
reset();
$pre;
let t = LThreads::new(Arc::new(|| { $body; }));
$b.iter(|| { $body; });
drop(t);
};
}
... | Rust | 0 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pwnpwnpwn import *
from pwn import *
#host = "10.211.55.28"
#port = 8888
host = "chat.pwn.seccon.jp"
port = 26895
r = remote(host,port)
def signup(name):
r.recvuntil("menu >")
r.sendline("1")
r.recvuntil("name >")
r.sendline(name)
def signin(name)... | Python | 1 |
from unittest import TestCase
import responses
from requests import Session
from ...controllers import SpansController
from ...models import Project, ProjectTypes
from ...utils.response import DoccanoAPIError
from .mock_api_responses import bad
from .mock_api_responses import spans as mocks
class SpansControllerTes... | Python | 1 |
(f, 50, 1000).await;
run_test_async(f, 100, 1000).await;
}
#[tokio::test]
async fn encoding_storage_new_without_not_default_incarnation_find_without_incarnation() {
let db = kv::new_mem_database().unwrap();
let tx = db.begin_mutable().await.unwrap();
let tx = &tx;
l... | Rust | 0 |
can_author_with: Default::default(),
}
}
/// Calls in transactions.
#[derive(Clone, PartialEq, Eq, Encode, Decode)]
#[cfg_attr(feature = "std", derive(Debug))]
pub struct Transfer {
pub from: AccountId,
pub to: AccountId,
pub amount: u64,
pub nonce: u64,
}
impl Transfer {
/// Convert into a signed extrinsic.
... | Rust | 0 |
ag="2")]
pub message: ::prost::alloc::string::String,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InsertOneResult {
#[prost(string, tag="1")]
#[serde(skip_serializing_if = "String::is_empty")]
pub id: :... | Rust | 0 |
from tests.pipeline.utils import assert_load_info
def intro_snippet() -> None:
# @@@DLT_SNIPPET_START api
import dlt
from dlt.sources.helpers import requests
# Create a dlt pipeline that will load
# chess player data to the DuckDB destination
pipeline = dlt.pipeline(
pipeline_name="ch... | Python | 1 |
# -*- coding: utf-8 -*-
from odoo.exceptions import UserError
from odoo import models, api, _, fields
class ProductAttrValueInstance(models.Model):
_name = 'product.attr.value.instance.exp'
_description = 'Product Attribute Value Export'
woo_instance_id = fields.Many2one('woo.instance')
def product... | Python | 1 |
/// Leone
#[serde(rename = "694")]
N694,
/// Leu
#[serde(rename = "642")]
N642,
/// Lev
#[serde(rename = "100")]
N100,
/// Liberian Dollar
#[serde(rename = "430")]
N430,
/// <NAME>
#[serde(rename = "434")]
N434,
/// Lilangeni
#[serde(rename = "748")]
N748,
/// Lithuanian Litas
#[serde(rename = "440... | Rust | 0 |
mistake_count >= 1:
status += '│ '
if mistake_count >= max_mistake_count:
status += '╱ ╲ '
elif mistake_count >= 1:
status += ' ' * len('╱ ╲ ')
if mistake_count >= max_mistake_count:
status += 'You have made too many incorrect guesses'
... | Python | 1 |
from odoo import fields, models, api
from odoo.exceptions import ValidationError
class AccountPayment(models.Model):
_inherit = 'account.payment'
l10n_ar_partner_vat = fields.Char(related='partner_id.l10n_ar_vat', string='CUIT del destinatario')
| Python | 1 |
eck_var: self.update_generate_option(
name, var
),
)
def update_generate_option(self, name, var):
self.config["generate"][name] = var.get()
def save_changes(self):
with open("config.json", "w") as f:
json.dump(self.config, f, indent=4... | Python | 1 |
from examples.benchmarks import solveSudoku
import time
import copy
# sudoku
def py_solve_sudoku(board):
empty = find_empty(board)
if not empty:
return True
row, col = empty
for i in range(1, 10):
if valid(board, i, (row, col)):
board[row][col] = i
if py_solve_s... | Python | 1 |
s > RESCHEDULE_TOKENS or
(
not shortlived and
cumulative_time > RESCHEDULE_SECONDS
)
)
):
print("******** pov producer getting a sibling")
launched_sub_worker = True
... | Python | 1 |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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 applicable law or... | Python | 1 |
"""
*********************************************************************
You should write a function that will receive a positive integer and return: "Fizz" if the number is divisible
by 3 (3, 6, 9 ...) otherwise convert the given number to a string (2 -> "2").
*********************************************************... | Python | 1 |
# ean.py - functions for handling EANs
#
# Copyright (C) 2011-2017 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option... | Python | 1 |
,
'š': 's',
'Ţ': 'T',
'ţ': 't',
'Ť': 'T',
'ť': 't',
'Ŧ': 'T',
'ŧ': 't',
'Ũ': 'U',
'ũ': 'u',
'Ū': 'U',
'ū': 'u',
'Ŭ': 'U',
'ŭ': 'u',
'Ů': 'U',
'ů': 'u',
'Ű': 'U',
'ű': 'u',
'Ŵ': 'W',
'ŵ': 'w',
'Ŷ': 'Y',
'ŷ': 'y',
'Ÿ': 'Y',
'Ź': '... | Python | 1 |
let src = [h0, h1, h2, h3];
let dst = merkle_compress_all_leaves(&src, 2);
assert_eq!(dst, h6);
}
#[test]
fn test_merkle_gen_auth_0() {
let h0 = hash::tests::HASH_ELEMENT;
let h1 = hash::hash_n_to_n_ret(&h0);
let h2 = hash::hash_n_to_n_ret(&h1);
let h3... | Rust | 0 |
x = torch.cat([corr, feats], dim=-1)
if self.update_edge:
h, edge_attr = layer(x, edge_index, edge_attr, batch) # [N,hidden_dim]
else:
h = layer(x, edge_index, edge_attr, batch) # [N,hidden_dim]
corr, feats = h[:, 0:3], h[:, 3:]
... | Python | 1 |
for r in &mut result[..] {
*r = 0;
}
// XXX: Questionable as far as constant-timedness is concerned.
// TODO: Improve this.
input.read_all(error::Unspecified, |input| {
for i in 0..num_encoded_limbs {
let mut limb: Limb = 0;
for _ in 0..bytes_in_current_limb {
... | Rust | 0 |
from django.core.management import BaseCommand, call_command
from django.utils import timezone
from config.utils.sms import BaseSMS
from employee.models import Employee
class Command(BaseCommand):
def handle(self, *args, **options):
employees = Employee.objects.filter(active=True,
... | Python | 1 |
` < 2^`n`.
///
/// This proof uses a [`merlin`] transcript to generate a challenge
/// scalar for use as a non-interactive proof protocol.
///
/// This function returns the bit commitment, `B`, its assosciated
/// [`BitProof`], and the challenge scalar `x`.
///
/// ```
/// # use rand... | Rust | 0 |
}
}
fn test_set_style(){
for i in tbl::TextStyle::iterator(){
tbl::set_colour(tbl::UC::Std, tbl::XG::FG);
tbl::set_style(*i);
println!("haha yes");
}
}
fn test_set_colours(){
for fg in tbl::UC::iterator(){
for bg in tbl::UC::iterator(){
tbl::set_colours(*fg,... | Rust | 0 |
).to(cls_preds.device)
xs = xs.view(batch, -1, 1) + batch_reg[:, :, 0:1]
ys = ys.view(batch, -1, 1) + batch_reg[:, :, 1:2]
xs = xs * self.out_size_factor * self.voxel_size[0] + self.cav_lidar_range[0] ## 基于feature_map 的size求解真实的坐标
ys = ys * self.out_size_factor * self.voxel_size[1] +... | Python | 1 |
# -*- coding: utf-8 -*-
import pygcb
def CreateDBObject():
dbObj=pygcb.tcWeaponDamage()
dbObj.databaseClass='BlastFragAir130kg'
dbObj.maxRange_m=4073.230225
dbObj.probDetonate=0.850000
dbObj.blastCharge_kg=23.393738
dbObj.fragCharge_kg=59.804176
dbObj.radCharge_kg=2.339374
dbObj.fragMeta... | Python | 1 |
message instance using numpy for array types
:param str: byte array of serialized message, ``str``
:param numpy: numpy python module
i i s utf-8N( R# R$ R R% R R R R R R& |