text string | label_name string | labels int64 |
|---|---|---|
(self.bot.get_me())
}
type SendMessage = AutoRequest<B::SendMessage>;
fn send_message<C, T>(&self, chat_id: C, text: T) -> Self::SendMessage
where
C: Into<ChatId>,
T: Into<String>,
{
AutoRequest::new(self.bot.send_message(chat_id, text))
}
}
#[pin_project::pin_project]... | Rust | 0 |
{
let hue = s.get("hue")?;
let sat = s.get("saturation")?;
let lig = s.get("lightness")?;
if let (Ok(hue), Ok(sat), Ok(lig)) = (
to_rational(&hue),
to_rational_percent(&sat),
to_rational_percent(&lig),
) {
Ok(Value::hsla(hue, sat, ... | Rust | 0 |
_init(ThreadedRodeo::new);
#[cfg(feature = "calypso_interns")]
{
kw::init();
}
special::init();
int
}
macro_rules! intern_static {
($mod:ident, $mod_doc:expr, $name:ident => {$($enum_ident:ident; $static_ident:ident: $str:expr; $doc:expr),*$(,)?}) => {
#[doc = $mod_doc]
... | Rust | 0 |
.48+28.13+28.86"),
Some(-122.72 - 245.44 - 68.27 - 27.85 - 27.48 + 28.13 + 28.86)
);
}
#[cfg(test)]
mod tests {
use crate::{Config, DisplayColor, Driver, PathOrInline, RelativePathBuf};
use std::io::Cursor;
/// Compile passed source code and return all compilation errors
fn compilation_erro... | Rust | 0 |
_base_ = [
'../_base_/models/upernet_convnext.py',
'../_base_/datasets/ade20k_640x640.py', '../_base_/default_runtime.py',
'../_base_/schedules/schedule_160k.py'
]
crop_size = (640, 640)
checkpoint_file = 'https://download.openmmlab.com/mmclassification/v0/convnext/downstream/convnext-xlarge_3rdparty_in21k_... | Python | 1 |
import asyncio
import os
import random
import re
import time
import requests
import xlwt
from bs4 import BeautifulSoup
from pyppeteer import launch
async def get_html(url, num):
img = re.compile(r'<img alt="(.*)" data-original="(.*)" data-realurl="')
data = []
# 启动浏览器
browser = await launch({'headles... | Python | 1 |
fn read_multi_frame_multi_packet_wait() {
let io = FramedRead::new(
mock! {
data(b"\x00\x00"),
Pending,
data(b"\x00\x09abc"),
Pending,
data(b"defghi"),
Pending,
data(b"\x00\x00\x00\x0312"),
Pending,
... | Rust | 0 |
import sqlite3
from models.denuncia import Denuncia
from sql.denuncia import *
from util.util import criar_conexao
def criar_tabela_denuncia():
try:
with criar_conexao() as conexao:
cursor = conexao.cursor()
cursor.execute(SQL_CREATE_DENUNCIA)
except sqlite3.Error as e:
... | Python | 1 |
();
let url = UrlBuilder::new(&base_url, USER_ID)
.tweet_fields(vec!["a", "b", "c"])
.max_results(100);
assert_eq!(
"tweet.fields=a%2Cb%2Cc&max_results=100",
url.0.query().unwrap()
);
}
#[test]
fn test_parse_timeline() {
let t... | Rust | 0 |
ze // payload_len < 127
}
}
}
mod test {
use std::io::Cursor;
use super::*;
use StatusCode;
#[test]
fn opcode_numbers() {
assert!(OpCode::from(1).is_some());
assert!(OpCode::from(2).is_some());
assert_eq!(OpCode::from(128), None);
}
#[test]
fn dete... | Rust | 0 |
("MINCUT", "OPTIMAL"):
graph_module = layout_partitioners.min_cut.partition(graph_module)
elif partitioner == "GREEDY":
graph_module = layout_partitioners.greedy.partition(graph_module)
else:
# By default use min cut partitioner if possible
if layout_partitioners.min_cut.can_partition(g... | Python | 1 |
(Ee), S, Dh(Es)], &[Dh(Se)]],
),
IX1 => (
static_slice![Token: ],
static_slice![Token: ],
message_vec![&[E, S], &[E, Dh(Ee), Dh(Se), S], &[Dh(Es)]],
),
I1X1 => (
static_slice![Token: ],
static... | Rust | 0 |
import pandas as pd
import sys
sys.path.append("../")
from project_Info import *
encoding = 'utf-8-sig'
# arr1 = [0, 0, 1, 1]
# arr2 = [1, 0, 0, 0]
# arr3 = [1, 1, 0, 0]
# arr = [1, 0, 0, 0]
def vote(arr1, arr2, arr3):
arr = []
assert len(arr1) == len(arr2) and len(arr2) == len(arr3)
for i in range(len(ar... | Python | 1 |
al structure, and create potential interaction pairs in the interaction graph.
/// A `pair_filters` can be provided to filter out pairs of object that should not be considered.
pub fn perform_broad_phase<N: RealField, Objects>(
objects: &Objects,
broad_phase: &mut (impl BroadPhase<N, AABB<N>, Objects::Collision... | Rust | 0 |
from typing import List
from pyrep.objects.proximity_sensor import ProximitySensor
from pyrep.objects.shape import Shape
from rlbench.backend.task import Task
from rlbench.backend.conditions import DetectedCondition, NothingGrasped
from rlbench.backend.spawn_boundary import SpawnBoundary
class PlaceHangerOnRack(Task)... | Python | 1 |
#
# This file is part of pyasn1 software.
#
# Copyright (c) 2005-2020, Ilya Etingof <etingof@gmail.com>
# License: https://pyasn1.readthedocs.io/en/latest/license.html
#
import warnings
from pyasn1 import error
from pyasn1.codec.cer import encoder
from pyasn1.type import univ
__all__ = ['Encoder', 'encode']
class S... | Python | 1 |
", empty cells are represented as JSON's null. All other values
//! are stringified via the Display trait from calamine's internal types, found
//! in the `DataType` enum. There may be changes in the future with regard to
//! actual values vs spreadsheet formatting, and representing those actual
//! values correctly ... | Rust | 0 |
, S::Error> {
let mut state = serializer.serialize_struct("HapService", 5)?;
state.serialize_field("iid", &self.get_id())?;
state.serialize_field("type", &self.get_type())?;
state.serialize_field("hidden", &self.get_hidden())?;
state.serialize_field("primary", &self.get_primary()... | Rust | 0 |
b enum Op {
/// Projection node.
Proj(Proj),
/// Filter node.
Filt(Filt),
/// Aggregation node.
Aggr(Box<Aggr>),
/// Join node.
Join(Box<Join>),
/// Sort node.
Sort(Sort),
/// Limit node.
Limit(Limit),
/// Row represent a single select without source. e.g. "SELECT 1"
... | Rust | 0 |
in self.ipSubnetMask)
port = str(self.bacnetIPUDPPort)
return IPv4Address(addr + "/" + mask + ":" + port)
elif self.networkType == NetworkType.ipv6:
if _debug:
NetworkPortObject._debug(" - IPv6")
raise NotImplementedError("no IPv6 yet")
... | Python | 1 |
com/vectorclass/version2/blob/master/vectormath_trig.h
const_f32_as_f32x4!(DP1F, 0.78515625_f32 * 2.0);
const_f32_as_f32x4!(DP2F, 2.4187564849853515625E-4_f32 * 2.0);
const_f32_as_f32x4!(DP3F, 3.77489497744594108E-8_f32 * 2.0);
const_f32_as_f32x4!(P0sinf, -1.6666654611E-1);
const_f32_as_f32x4!(P1s... | Rust | 0 |
\x02\x8b\xde\xd6\
\xaa\xd8Ql2\xb1\xb8gbI\xe6i\x8b\x08\xf1\xe5\
\xf1IeF\xd0\x13\xa5\x11`\xcc\x06[\x0e\x5c\xa8@\
|\xb2\x0c\xb2\x8c\xc2\xd6\xb9\x1a\x8a\xa4\x9e<8\xaf\xb3\
)\x04\x16\xb0\xb8\xd3\xde\xae\xb5\x81\xb7>\x82\xab\xe3\xd5\
\xef\x0c\xab\xa1\x0d\x97\xde\xb3L\x1b\x95\x0f\xa6]\x09+\
~T\x82\xc4\x9b \xbd\xb75bE\x01\x99@... | Python | 1 |
import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Era_Run3_cff import Run3
process = cms.Process("PROPAGATORTEST",Run3)
#####################################################
# Message Logger
#####################################################
process.load("FWCore.MessageService.MessageLogger_cfi")
p... | Python | 1 |
er you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about availab... | Rust | 0 |
t_handle) = agent_entry.1;
abort_handle.abort();
self.stopped_agents.insert(agent_entry.0, agent);
}
}
Result::Ok(())
}
}
#[derive(Serialize, Deserialize, Eq, Hash, PartialEq, PartialOrd, Debug, Clone)]
pub enum AgentServiceError {
AgentAlreadyStar... | Rust | 0 |
label="🎵 Include voice narration",
value=True
)
voice_poem_btn = gr.Button("🎭 CREATE VOICE POEM! 🎭", variant="primary")
with gr.Column():
poem_audio_output = gr.Audio(
... | Python | 1 |
mentOf, SeedOf, StorageKey, TopicOf};
/// Information needed for rent calculations that can be requested by a contract.
#[derive(codec::Encode, DefaultNoBound)]
#[cfg_attr(test, derive(Debug, PartialEq))]
pub struct RentParams<T: Config> {
/// The total balance of the contract. Includes the balance transferred fro... | Rust | 0 |
Expr.And,
Expr.Return,
),
'loc_4258',
)
ChrTalk(
0x00FE,
(
'#2810441103V海利欧先生也受到了怀疑吗?',
TxtCtl.Enter,
),
)
CloseMessageWindow()
ChrTalk(
0x00FE,
(
'#2810441104V嗯~我以前觉得他和\n',
'德尔斯先生关... | Python | 1 |
= k
new_state_dict_g[new_k] = v
checkpoint['netG_state_dict'] = new_state_dict_g
# # 3) 对 netD_state_dict 同样进行处理
# old_state_dict_d = checkpoint['netD_state_dict']
# new_state_dict_d = {}
# for k, v in old_state_dict_d.items():
# if k.startswith("module."):
# new_k = k[len("module."):]
# else:
# ... | Python | 1 |
from .TestDungeon import TestDungeon
class TestEasternPalace(TestDungeon):
def testEastern(self):
self.starting_regions = ["Eastern Palace"]
self.run_tests([
["Eastern Palace - Compass Chest", True, []],
["Eastern Palace - Cannonball Chest", True, []],
... | Python | 1 |
from datetime import datetime
import re
import requests
from bs4 import BeautifulSoup
def TopListCreator():
# Initialising Variables.
start = 1
today = datetime.today().strftime('%Y-%m-%d')
# year = re.findall('\d{4}', today)[0]
year = '2022'
categories = ['feature,tv_movie', 'tv_series']
... | Python | 1 |
试夹爪控制 ===")
# 先移动到一个非零位置
print("\n1. 移动到ready位置...")
controller.go_to_named_target("ready")
rospy.sleep(1)
# 测试夹爪控制
print("\n2. 打开夹爪(保持机械臂位置)...")
controller.open_gripper()
rospy.sleep(1)
print("\n3. 关闭夹爪(保持机械臂位置)...")
... | Python | 1 |
from typing import Optional, List, Set, Any, Union
from fixcore.model.model import Model, Kind
from fixcore.model.model_handler import ModelHandler
from fixcore.types import EdgeType
from fixcore.ids import GraphName
class ModelHandlerStatic(ModelHandler):
def __init__(self, model: Model):
self.model = m... | Python | 1 |
{
TypeAnnotation::F32 => true,
_ => false,
},
TypeAnnotation::F64 => match other {
TypeAnnotation::F64 => true,
_ => false,
},
TypeAnnotation::String => match other {
TypeAnnotation::String =... | Rust | 0 |
XA_TEST = ((self.bus.read_byte_data(mpu6050.ADDRESS_DEFAULT, 0x0D) & 0xE0) >> 3) | ((self.bus.read_byte_data(mpu6050.ADDRESS_DEFAULT, 0x10) >> 4) & 0x03)
YA_TEST = ((self.bus.read_byte_data(mpu6050.ADDRESS_DEFAULT, 0x0E) & 0xE0) >> 3) | ((self.bus.read_byte_data(mpu6050.ADDRESS_DEFAULT, 0x10) >> 2) & 0x03)
... | Python | 1 |
#!/usr/bin/env python
import os
import tempfile
import zipfile
import mozfile
here = os.path.dirname(os.path.abspath(__file__))
# stubs is a dict of the form {'addon id': 'install manifest content'}
stubs = {
'test-addon-1@mozilla.org': 'test_addon_1.rdf',
'test-addon-2@mozilla.org': 'test_addon_2.rdf',
... | Python | 1 |
SCRIPTION_'),
source=ssl._ssl,
)
enum._test_simple_enum(CheckedAlertDescription, ssl.AlertDescription)
def test_sslerrornumber(self):
Checked_SSLErrorNumber = enum._old_convert_(
enum.IntEnum, 'SSLErrorNumber', 'ssl',
lambda name: name... | Python | 1 |
ted_var_axis(Axis(0), &weights, N64::new(0.0)),
Err(MultiInputError::EmptyInput)
);
assert_eq!(
a.weighted_std_axis(Axis(0), &weights, N64::new(0.0)),
Err(MultiInputError::EmptyInput)
);
// The sum methods accept empty arrays
assert_eq!(a.weighted_sum(&weights), Ok(N64::new(... | Rust | 0 |
. Deprecated alias for `window_shift`.
window_shift: (Optional.) A `tf.int64` scalar `tf.Tensor`, representing the
forward shift of the sliding window in each iteration. The default is `1`.
It must be positive.
window_stride: (Optional.) A `tf.int64` scalar `tf.Tensor`, representing the
stride... | Python | 1 |
is_ok());
let v_str = res.unwrap();
let res = serde_json::from_str::<PedersenVerifier<WrappedScalar, WrappedEdwards, 2>>(&v_str);
assert!(res.is_ok());
let verifier2 = res.unwrap();
assert_eq!(verifier.generator, verifier2.generator);
let res = serde_bare::to_vec(&verifier);
assert!(res.is_... | Rust | 0 |
0, 0, 0)))));
collisions.insert(CollisionObject::new_from(CollisionObjectType::Wall, wall_r,
Rc::new(RefCell::new(Particle::new(PhysVec::new(WALL_R.0 as f32, WALL_R.1 as f32), 0.5, 20000000000.0, 0, 0)))));
collisions.insert(CollisionObject::new_from(CollisionObjectType::Platform, arch,
Rc::ne... | Rust | 0 |
"""
CRUD for Course Layout
"""
from sqlalchemy.orm import Session
from src.models import CourseLayout
from src.schemas import CourseLayoutCreate
def get_course_layout(db: Session, course_layout_id: int) -> CourseLayout | None:
return db.query(CourseLayout).filter(CourseLayout.id == course_layout_id).first()
d... | Python | 1 |
import face_recognition
import cv2
import numpy as np
import csv
from datetime import datetime
from data import known_face_encodings, known_face_names
video_path = "C:/Users/HAI/Desktop/attendance/video.mp4"
video_capture = cv2.VideoCapture(video_path)
students = known_face_names.copy()
face_locations = []
face_encod... | Python | 1 |
d_format,
path.as_ref().display()
))
}
};
let offset_to_color_in_point = match raw_header.point_data_record_format {
2 => Some(20),
3 => Some(28),
5 => Some(28),
_ => None,
};
for point_idx in 0..header.number_of_points() {
le... | Rust | 0 |
nge(world_size)
]
torch.distributed.all_gather(all_logits_topk_idx, logits_topk_idx)
all_logits_topk_idx = torch.cat(
[t.view(-1, k) for t in all_logits_topk_idx], dim=1)
# Step 2: Compute global top-k indices.
_, all_logits_topk_topk_idx = torch.topk(all_logits_topk, k, dim=1)
all_logi... | Python | 1 |
# Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | Python | 1 |
"""
问题描述:对于二叉树的节点来说,其本身的值域,有指向左孩子和右孩子的两个指针:对双向
链表的节点来说,其本身的值域,有指向上一个节点和下一个节点的指针。在结构上,两种结构
有相似性,对于每个节点来说,原来的right指针等价于转换后的next指针,原来的left指针
等价于转换后的last指针。现在有一颗搜索二叉树,请将其转换一个有序的双向链表,并且返回
转换后的双向链表头结点。
"""
class Node:
def __init__(self, value):
self.value = value
self.left = None
self.right = Non... | Python | 1 |
No
assert_eq!(self.buf[0], self.get_m_drop());
self.buf.remove(0); // reserved1
let dl_low = self.buf.remove(0) as u16;
let dl_high = self.buf.remove(0) as u16;
let dl = (dl_low + (dl_high << 8)) - 6;
// reserved3
... | Rust | 0 |
rc<Mutex<Option<broadcast::Sender<()>>>>;
}
/// Represents the type of candidate `CandidateType` enum.
#[derive(PartialEq, Debug, Copy, Clone)]
pub enum CandidateType {
Unspecified,
Host,
ServerReflexive,
PeerReflexive,
Relay,
}
// String makes CandidateType printable
impl fmt::Display for Candida... | Rust | 0 |
# use ockam::Profile;
/// # use ockam_vault_sync_core::VaultSync;
/// fn alice_main() -> ockam_core::Result<()> {
/// # let vault = VaultSync::create_with_mutex(SoftwareVault::default());
/// # let mut alice = Profile::create(None, &vault)?;
/// # let key_agreement_hash = [0u8; 32];
/// # let contact_a... | Rust | 0 |
id = user_library.manga_id
LEFT JOIN library_category ON user_library.id = library_category.library_id
ORDER BY title"#,
)
.bind(user_id)
.fetch_all(&self.pool as &SqlitePool)
.await?
.into_par_iter()
.map(|row| Manga {
id: row.get(0),
... | Rust | 0 |
bytes(n as u32))?;
Ok(count)
}
n => {
let mut count = 0;
count += w.write(&[0xff])?;
count += w.write(&u64::to_be_bytes(n))?;
Ok(count)
}
}
}
fn read_varint<R: Read>(r: &mut R) -> std::io::Result<u64> {
let mut b = [0_u8];
r... | Rust | 0 |
MockGraph::<D>::arbitrary_fixed(g, v_count, 0);
let verts: Vec<_> = graph.all_vertices().collect();
let mut edges_added = 0;
while edges_added < e_count
{
// Randomly choose two vertices to connect
let v1 = verts[g.gen_range(0, verts.len())];
let v2 = verts[g.gen_range(0, verts.len())];
// Ensure... | Rust | 0 |
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Tuple, List, Dict
from ..plugins import Plugin
from ..utils.platform import SUPPORTED_PLATFORMS
PluginsDataT = List[Tuple[str, str, Plugin]]
from devgoldyutils import Colours
from ..plugins impo... | Python | 1 |
ociated with it."
logger.error(message)
raise PortError(message)
response = self._client.make_request(
"PUT",
f"blueprints/{blueprint_id}/scorecards/{scorecard_id}",
json=scorecard_data,
)
updated_data = response.json(... | Python | 1 |
dir_path = f"{traj_file[:-4]}-E{E}-{frame}"
outdir = OUTDIR + dir_path
os.makedirs(dir_path, exist_ok=True)
# Get electric field magnitude from material config
efield_mag = MATERIAL_CONFIG[system]['efield_magnitude']
efield = (
... | Python | 1 |
t = pd.to_datetime(pd.Series(target_times), errors="coerce").dropna().sort_values().unique()
if len(tt) == 0:
target = _derive_target_times(trH)
else:
end_dt = pd.Timestamp(tt[-1]).floor("H")
target = pd.date_range(end=end_dt, periods=WINDOW_HOURS, freq="1H")
targ... | Python | 1 |
for more info.
pub fn enqueue_marker_with_wait_list<En, Ewl>(
command_queue: &CommandQueue,
wait_list: Option<Ewl>,
new_event: Option<En>,
device_version: Option<&OpenclVersion>
) -> OclCoreResult<()>
where En: ClNullEventPtr, Ewl: ClWaitListPtr
{
// ... | Rust | 0 |
#!/usr/bin/env python
# coding: utf-8
# Copyright (c) Saga Inc.
# Distributed under the terms of the GPL License.
from typing import Any, Dict
from mitosheet.types import StepsManagerType
def get_dataframe_as_csv(params: Dict[str, Any], steps_manager: StepsManagerType) -> str:
"""
Sends a dataframe as a CSV ... | Python | 1 |
def add(a, b):
return a + b
def subtract(a, b):
return a - b
def multiply(a, b):
return a * b
def convert_fahrenheit_to_celsius(fahrenheit):
return multiply(subtract(fahrenheit, 32), 9 / 5) | Python | 1 |
get_hash();
let tx_bytes = tx.as_bytes();
(tx_hash, tx_bytes)
}
fn create_vertex(message: &str) -> Vertex {
let tx = Transaction::default().message(message);
Vertex::from_transaction(&tx)
}
/// This test creates 1000 different transactions and attaches them sequentiall... | Rust | 0 |
]] color:mesoproterozoic shift:(0,0.5)
from: -1600 till: -1400 text:[[Calymmian|Calym-~mian]] color:mesoproterozoic shift:(0,0.5)
from: -1800 till: -1600 text:[[Statherian|Stath-~erian]] color:paleoproterozoic shift:(0,0.5)
from: -2050 till: -1800 text:[[Orosirian|Oro-~sirian]] color:paleoproterozoic shift:... | Python | 1 |
Uuid;
use minecrevy_io_str::{McRead, McWrite};
use minecrevy_key::Key;
use minecrevy_protocol::Packet;
/// Tells the client to start accepting encrypted packets, and start sending them.
#[derive(Clone, PartialEq, Debug, McRead, McWrite, Packet)]
pub struct EncryptionRequest {
/// The server ID, usually empty.
... | Rust | 0 |
import collections
import threading, sys, cv2
from random import uniform
from multiprocessing import Queue
from moviepy.video.io.ffmpeg_writer import FFMPEG_VideoWriter
from moviepy.editor import VideoFileClip
from time import time as ttime, sleep
import os, time
import numpy as np
from threading import Lock
s_print_lo... | Python | 1 |
all_screen_1() {
let mut tui = TUI::new_test(21, 3);
let serv = "irc.server_1.org";
let chan = ChanNameRef::new("#chan");
tui.new_server_tab(serv, None);
tui.set_nick(serv, "osa1");
tui.new_chan_tab(serv, chan);
tui.next_tab();
tui.next_tab();
let target = MsgTarget::Chan { serv, ch... | Rust | 0 |
"Sent challenge to Stockfish level {}: https://lichess.org/{}",
level, challenge.id
);
})
}
pub async fn send_rematch(
config: &Config,
lichess: Arc<Lichess>,
game_id: &str,
) -> anyhow::Result<()> {
let game = lichess
.export_one_game_json(&game_id, None)
... | Rust | 0 |
Gzip {
decoder: gzip::Decoder<Peeked>,
head: Head,
},
/// An error occured reading the Gzip header, so return that error
/// when the user tries to read on the `Response`.
Errored {
err: Option<io::Error>,
head: Head,
}
}
impl Decoder {
/// Constructs a Decod... | Rust | 0 |
T_NDIS6: u32 = 1u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_SUPPORT_NDIS61: u32 = 1u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_SUPPORT_NDIS620: u32 = 1u32;
#[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"]
pub const NDIS_SUPPORT_... | Rust | 0 |
list = []
with open('..\data\Protein_f\sequence.txt','r',encoding='utf-8') as fr:
for line in fr:
if line == '\n' : continue
list.append(line)
if line.__contains__('VERSION') :
fileName = '..\data\Protein_f\phage-gb\\' + line[12:-3] + '.txt'
if line.__contains__('//') and... | Python | 1 |
::Error>(self, v: &str) -> Result<Self::Value, E>
{
use ArabicSubLanguage::*;
use ChineseSubLanguage::*;
use CyrillicOrLatinSubLanguage::*;
use DutchSubLanguage::*;
use EnglishSubLanguage::*;
use FrenchSubLanguage::Monaco;
use GermanSubLanguage::*;
use HumanInterfaceDeviceSubLanguage:... | Rust | 0 |
TALIC SMALL P
'q': '\U0001d492', # 𝒒 MATHEMATICAL BOLD ITALIC SMALL Q
'r': '\U0001d493', # 𝒓 MATHEMATICAL BOLD ITALIC SMALL R
's': '\U0001d494', # 𝒔 MATHEMATICAL BOLD ITALIC SMALL S
't': '\U0001d495', # 𝒕 MATHEMATICAL BOLD ITALIC SMALL T
'u': '\U0001d496', # 𝒖 MATHEMATICAL BOLD ITALIC SMAL... | Python | 1 |
FnOnce(types::Aeskey) -> types::Aeskey>(&self, index: usize, f: F) {
assert!(index < 16);
let tmp = types::Aeskey(self.read(addr::REG_AESKEY + index as u8));
self.write(addr::REG_AESKEY + index as u8, f(tmp).0)
}
pub fn temp1(&self) -> types::Temp1 {
types::Temp1(self.read(addr... | Rust | 0 |
: usize = 32;
const AMOUNT_OFFSET: usize = P_HASH_OFFSET + P_HASH_LENGTH;
const AMOUNT_LENGTH: usize = 32;
const TOKEN_OFFSET: usize = AMOUNT_OFFSET + AMOUNT_LENGTH;
const TOKEN_LENGTH: usize = 32;
const TO_OFFSET: usize = TOKEN_OFFSET + TOKEN_LENGTH;
const TO_LENGTH: usize = 32;
const N_HASH_OFFSET: usize = TO_OFFSET ... | Rust | 0 |
# Copyright 2017 Vector Creations Ltd
#
# 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 agreed to in ... | Python | 1 |
"""
Sentient Research Agent - Hierarchical Agent Framework (HAF) - Graph Package
This package manages the task graph, its state, execution, and related utilities
within the HAF.
"""
from .task_graph import TaskGraph
from .state_manager import StateManager
from .execution_engine import ExecutionEngine
from .graph_seri... | Python | 1 |
# Problem 1378: Replace Employee ID With The Unique Identifier
# Difficulty: Easy
# Table: Employees
# +---------------+---------+
# | Column Name | Type |
# +---------------+---------+
# | id | int |
# | name | varchar |
# +---------------+---------+
# id is the primary key (column with u... | Python | 1 |
from __future__ import annotations
import numpy as np
# dtypes of arrays returned by ContourPy.
point_dtype = np.float64
code_dtype = np.uint8
offset_dtype = np.uint32
# Kind codes used in Matplotlib Paths.
MOVETO = 1
LINETO = 2
CLOSEPOLY = 79
| Python | 1 |
rs.
/// The Justification may be none.
pub async fn get_signed_block<B>(&self, hash: Option<Hash>) -> ApiResult<Option<SignedBlock<B>>>
where
B: Block + DeserializeOwned,
{
let b = self
.get_request("chain_getBlock", json_req::hash_params(hash))
.await?;
... | Rust | 0 |
# Definir una cadena de caracteres
cadena = "Hola, mundo!"
# Acceso a caracteres específicos
primer_caracter = cadena[0]
ultimo_caracter = cadena[-1]
print("Acceso a caracteres:")
print("Primer caracter:", primer_caracter)
print("Último caracter:", ultimo_caracter)
# Subcadenas
subcadena = cadena[0:4]
print("\nSubca... | Python | 1 |
_deep_2
[ARCHIVING] some_dir/file_deep_3
[ARCHIVING] some_dir/file_deep_4
[ARCHIVING] some_dir/file_deep_5
[ARCHIVING] src/main.rs
[ARCHIVING] .cargo_vcs_info.json
[ARCHIVING] Cargo.lock
",
)
.run();
assert!(repo.root().join("target/package/foo-0.0.1.crate").is_file());
cargo_process("package ... | Rust | 0 |
0 => Val(SECURITY_CONFIG_A::FAB_CONFIG_1),
1 => Val(SECURITY_CONFIG_A::OPEN_CONFIG_1),
2 => Val(SECURITY_CONFIG_A::OPEN_CONFIG_2),
3 => Val(SECURITY_CONFIG_A::OPEN_CONFIG_3),
4 => Val(SECURITY_CONFIG_A::FIELD_RETURN_CONFIG),
8 => Val(SECURITY_CONFI... | Rust | 0 |
___________________________________
TOOL CREATE BY + HaWa
VESION TOOL + 1.2✨👌
NEW UPDATE😁
____________________________________
{PU}""")
os.system('clear')
banner()
#------------------[ BAGIAN-MENU ]------------... | Python | 1 |
raw::c_char,
) -> bool;
}
#[doc = "!< the entry is invalid (has neither of the types below)"]
pub const clingo_statistics_type_e_clingo_statistics_type_empty: clingo_statistics_type_e = 0;
#[doc = "!< the entry is a (double) value"]
pub const clingo_statistics_type_e_clingo_statistics_type_value: clingo_statistics_... | Rust | 0 |
y."]
#[doc = " @retval OT_ERROR_INVALID_ARGS @p aKey was set to NULL."]
#[doc = ""]
#[doc = " @note If OT_CRYPTO_KEY_STORAGE_PERSISTENT is passed for aKeyPersistence then @p aKeyRef is input and platform"]
#[doc = " should use the given aKeyRef and MUST not change it."]
#[doc = ""]
#[doc ... | Rust | 0 |
show`. Continuing.");
iso_ignition_show(config)
}
pub fn iso_remove(config: &IsoIgnitionRemoveConfig) -> Result<()> {
eprintln!("`iso remove` is deprecated; use `iso ignition remove`. Continuing.");
iso_ignition_remove(config)
}
pub fn iso_ignition_embed(config: &IsoIgnitionEmbedConfig) -> Result<()> {... | Rust | 0 |
fill(4)}/{len(all_videos)} {video['uuid']} has no processable "
f"subtitles (total WITHOUT {len(videos_without_subtitles)}).", fg='yellow'))
# Dump to JSON files
with open(videos_by_subtitles_path, 'w') as videos_by_subtitles_file:
videos_by_subtitles_file.write(json.dumps({
... | Python | 1 |
stack
/// |
/// ╚═ |======== <- memory[0]
/// The process's memory.
memory: &'static mut [u8],
kernel_memory_break: *const u8,
app_heap_break: *const u8,
app_heap_start: *const u8,
stack_data_boundary: *const u8,
cur_stack: *const u8,
/// How low have we ever seen the sta... | Rust | 0 |
# Copyright (C) 2015 Kevin Ross
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
from lib.cuckoo.common.abstracts import Signature
class ModifiesUACNotify(Signature):
name = "modify_uac_prompt"
description = "Attempts to modify UAC pro... | Python | 1 |
log;
extern crate rustc_serialize;
pub mod ascii;
pub mod collections;
pub mod err;
pub mod ffi;
pub mod str;
pub mod react;use {
clap::{value_t_or_exit, App, Arg},
console::style,
indicatif::{ProgressBar, ProgressDrawTarget, ProgressStyle},
solana_clap_utils::{input_parsers::pubkey_of, input_validato... | Rust | 0 |
2;
pub static X509_FILETYPE_DEFAULT: c_int = 3;
pub static NID_key_usage: c_int = 83;
pub static NID_ext_key_usage: c_int = 126;
extern "C" {
pub fn X509_STORE_CTX_get_ex_data(ctx: *mut X509_STORE_CTX, idx: c_int) -> *mut c_void;
pub fn X509_STORE_CTX_get_current_cert(ct: *mut X... | Rust | 0 |
let mut seckey = [0u8; 32];
csprng.fill_bytes(&mut seckey);
let wsk = secp256k1::SecretKey::from_slice(&seckey).unwrap();
let wpk = secp256k1::PublicKey::from_secret_key(&secp, &wsk);
let mut ch = channel.clone();
let nizkParams = NIZKSecretParams::<E>::setup(csprng, l);... | Rust | 0 |
let team_urls: Vec<(u16, String)> = team_seaons_needed.iter()
.filter(|team| !team_seaons_cached.contains(&(team.0, team.1)))
.map (|team| (team.0, format!("http://statsapi.mlb.com/api/v1/teams/?season={}&sportId={}&hydrate=social", team.0, team.1)))
// .take(1)
// .inspect(|url| pri... | Rust | 0 |
32
| types::B32 => Inst::load_constant32(to_reg, value as u32),
_ => unreachable!(),
}
}
fn gen_nop(preferred_size: usize) -> Inst {
if preferred_size == 0 {
Inst::Nop0
} else {
// We can't give a NOP (or any insn) < 2 bytes.
a... | Rust | 0 |
F), (6 G), (7 H), (8 I));
single_tuple_impl!(10: (0 A), (1 B), (2 C), (3 D), (4 E), (5 F), (6 G), (7 H), (8 I), (9 J));
single_tuple_impl!(11: (0 A), (1 B), (2 C), (3 D), (4 E), (5 F), (6 G), (7 H), (8 I), (9 J), (10 K));
single_tuple_impl!(12: (0 A), (1 B), (2 C), (3 D), (4 E), (5 F), (6 G), (7 H), (8 I), (9 J), (10 ... | Rust | 0 |
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<t1ha_context>())).buffer as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(t1ha_context),
"::",
stringify!(buffer)
)
);
assert_eq!(
unsafe { &... | Rust | 0 |
"rrole": temp["resource_role"],
"aname": temp["app_name"],
**future
}
if existing:
execute("""
UPDATE master_assignments
SET s1=:s1, s2=:s2, s3=:s3, s4=:s4, s5=:s5, s6=:s6,
updated_at = NOW()
WHERE id = :id AND quarter_id = :qid
""... | Python | 1 |
rgeted_{}".format(target_type)
if args.attack_defense:
dirname = 'recitification_surrogate_gradient_attack_on_defensive_model-{}-{}_loss-{}-{}'.format(dataset, loss, norm, target_str)
else:
dirname = 'recitification_surrogate_gradient_attack-{}-{}_loss-{}-{}'.format(dataset, loss, norm, target_s... | Python | 1 |
ve found signs of water on an exoplanet, \
but previous discoveries were made on planets with high temperatures or other pronounced differences from Earth. \
\"This is the first potentially habitable planet where the temperature is right and where we now know there is water,\" \
said UCL astronomer <NAME>. \"It's the b... | Rust | 0 |
.send(SubOp::AddSubscription(
sub_id.clone(),
SubscriptionRef { payload, sender },
))
.map_err(anyhow::Error::from)?;
let this = self.clone();
Ok(Subscription::wrap(
ReceiverStream::new(receiver).filter_map(|res| serde_json::from_value... | Rust | 0 |
import datetime as dt
now = dt.datetime.now()
print(now)
print(type(now))
year = now.year
month = now.month
day = now.day
week = now.weekday()
print(week)
dob = dt.datetime(year=2005, month=4, day=27, hour=13)
print(dob) | Python | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.