text string | label_name string | labels int64 |
|---|---|---|
a| a.abs());
ctx.append_output(ret);
}
Ok(())
}
fn grad(&self, ctx: &mut crate::op::GradientContext<T>) {
ctx.append_input_grad(Some(ctx.output_grad() * sign(ctx.input(0))));
}
}
impl<T: Float> op::Op<T> for NegOp {
fn compute(&self, ctx: &mut crate::op::ComputeCont... | Rust | 0 |
from unittest.mock import ANY, AsyncMock, call, patch
import pytest
from yarf.rf_libraries.libraries.mir.VideoInput import VideoInput
@pytest.fixture
def mock_screencopy(autouse=True):
with patch("yarf.lib.wayland.screencopy.Screencopy") as m:
m.return_value.grab_screenshot = AsyncMock()
m.retur... | Python | 1 |
175971],
[0.709898, 0.868751, 0.169257],
[0.720391, 0.870350, 0.162603],
[0.730889, 0.871916, 0.156029],
[0.741388, 0.873449, 0.149561],
[0.751884, 0.874951, 0.143228],
[0.762373, 0.876424, 0.137064],
[0.772852, 0.877868, 0.131109],
[0.783315, 0.879285, 0.125405],
[0.793760, 0.880678... | Rust | 0 |
sort_ascending=sort_ascending,
)
response = {"Backups": [b.to_dict() for b in backups], "NextToken": next_token}
return json.dumps(response, cls=DateTimeEncoder)
def put_resource_policy(self) -> str:
params = json.loads(self.body)
resource_arn = params.get("R... | Python | 1 |
"""SciPy solver Class."""
from typing import Callable, Union
import numpy as np
from numpy.typing import ArrayLike
from scipy.optimize import minimize, Bounds
from ._base_solvers import NonLinearOptimizer
class OptimizerSciPy(NonLinearOptimizer):
"""
SciPy solver configuration class.
Attributes
--... | Python | 1 |
la configuration OpenAPI de base
openapi_schema = get_openapi(
title=app.title,
version="1.0.0",
description=app.description,
routes=app.routes,
)
# S'assurer que le composant 'schemas' existe
if "components" not in openapi_schema:
openapi_schema["components... | Python | 1 |
eq!(sent, Ok(1));
let out = peer_conn.process(None, now());
hconn.process(out.dgram(), now());
sent = peer_conn.stream_send(control_stream, &[0x5]);
assert_eq!(sent, Ok(1));
let out = peer_conn.process(None, now());
hconn.process(out.dgram(), now());
sent = peer... | Rust | 0 |
/// If the PE is not halted when `C_HALT` is cleared to zero, it is UNPREDICTABLE whether this bit is set to `1`. If
/// `DHCSR.C_DEBUGEN == 0` this bit reads as an UNKNOWN value.
///
/// This bit clears to zero when read.
///
/// **Note**
///
/// If the request to clear C_HALT is made simul... | Rust | 0 |
oot.destroy()
frontscreen()
backbutton = Button(adminroot, text="Back", font=("Microsoft Sans Serif", 9), activebackground="#B7CADB",
width=8, bg="#035397", fg="white", bd=4, command=back).place(x=5, y=40)
adminroot.mainloop()
def bookingdetails(adminroot):
if usrnme.get(... | Python | 1 |
.as_ref().unwrap();
let web_asset_path = PathBuf::from(&config_.build.dist_dir);
if !web_asset_path.exists() {
return Err(anyhow::anyhow!(
"Unable to find your web assets, did you forget to build your web app? Your distDir is set to \"{:?}\".",
web_asset_path
));
}
if let S... | Rust | 0 |
ring,
pub description: String,
pub title: String,
pub click_action: String,
pub click_url: String,
#[serde(default)]
pub last_updated: Option<serde_json::Value>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct BadgeSet {
pub versions: HashMap<String, Badge>,
}
#[derive(Debug, ... | Rust | 0 |
x = True
y= False
# and
print(x and y) # False
"""#uso posible:
if (aprobo(matematicas) and aprobo(fisica)):
print("Aprobo las dos materias")"""
# or
print(x or y) # True
""" 1 and 1 -> 1
0 and 1 -> 0
1 and 0 -> 0
0 and 0 -> 0
1 or 0 -> 1
0 or 1 -> 1
0 or 0 -> 0
1 or 1 -> 1"""
print(y)
#negar y
p... | Python | 1 |
dr_target = self.conn.addr(url)?;
let user = if let Some(u) = proxy.username() { u.to_string() } else { "".to_string() };
let mut stream = Socks4Stream::connect(&addr_proxy[..], &addr_target[..], &user[..])
.map_err(error::request)?;
self.conn.block_send_with_stream(url, &mut stream)
}
fn call_wi... | Rust | 0 |
#for getting the linkedin jobs using playwright library in python
from playwright.sync_api import sync_playwright
#Output -> get company name, job title, no of jobs from linkedin
# -> user input location, job title, no of jobs e.g Noida Software developer 10
# Process -> browser -> linkeding job search-> location &... | Python | 1 |
https://docs.rs/vtc/badge.svg" alt="Documentation"></a>
</p>
# Overview
``vtc-rs`` is inspired by years of scripting workflow solutions in a Hollywood cutting
room. It aims to capture all the ways in which timecode is used throughout the industry so
users can spend more time on their workflow logic, and less time han... | Rust | 0 |
scn_mlm_mask = seq_mlm_mask.clone()
aux["xt_traj"] = torch.stack(xt_traj, dim=1)
aux["aatype_t_traj"] = torch.stack(aatype_t_traj, dim=1)
aux["aatype_pred_traj"] = torch.stack(aatype_pred_traj, dim=1)
aux["seq_probs"] = seq_probs_t
aux["psce"] = psce_t
aux["psce_t_tra... | Python | 1 |
ecutionProvider) を利用できる
## iGPU でも利用できるが、大半のケースで CPU 推論よりも大幅に遅くなる
elif use_gpu is True and "DmlExecutionProvider" in self.available_onnx_providers: # fmt: skip
self.onnx_providers = []
## TODO: より適した Direct3D 上のデバイス ID を指定できるようにする
self.onnx_providers.append(("DmlExec... | Python | 1 |
ably a valid email, it will most likely pass.
However, it could still very well be that the actual emailaddress has simply
not be claimed by anyone (so then this function fails to devalidate).
"""
if not re.match(VALID_ADDRESS_REGEXP, email_address):
emsg = 'Emailaddress "{}" is not valid accord... | Python | 1 |
INNER join.
if self.effective_connector == AND or (
self.effective_connector == OR and votes == self.num_children
):
to_demote.add(table)
# Finally, what happens in cases where we have:
# (rel_a__col=1|rel_b__col=2) & rel_a__col__gte=0
... | Python | 1 |
{
map.add(
Select,
[Vector(n, s_ty), Vector(n, s_ty), Vector(n, Bool)],
Vector(n, s_ty),
);
}
}
for s_ty in [I32, U32] {
for ty in scalar_and_vectors_of(s_ty) {
map.add(Clamp, [ty.clone(), ty.clone(), ty.clone()... | Rust | 0 |
forks had been implemented.
Genesis,
/// [`BIP 34`](https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki):
/// The rule that requires blocks to contain their height (number) in the coinbase input,
/// and the introduction of version 2 blocks has been implemented since core **v0.7.0**.
/// ... | Rust | 0 |
: Copy
{
let tn = QNameRef::from(tag_name);
if let QNameRef::Name(name) = tn {
if name.is_empty() {
panic!("supplied tag name is empty");
}
}
let mut node = Node::new(NodeData {
storage_key: None,
node_type: NodeType::E... | Rust | 0 |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode':
# define a function to traverse the... | Python | 1 |
let n: UdWords;
let d: UdWords;
let mut q: UdWords;
let mut r: UdWords;
let mut sr: i32;
unsafe {
n = transmute(a);
d = transmute(b);
}
/* special cases, X is unknown, K != 0 */
if n.high == 0 {
if d.high == 0 {
/* 0 X
* ---
... | Rust | 0 |
opy
{
/// Construct a matrix from a set of column vectors.
#[rustfmt::skip]
#[inline]
pub fn from_columns(c0: &Vector4<S>, c1: &Vector4<S>) -> Self {
Self::new(
c0[0], c0[1], c0[2], c0[3],
c1[0], c1[1], c1[2], c1[3],
)
}
/// Construct a matrix from a set ... | Rust | 0 |
e:
policy = [p for p in (api('get', 'data-protect/policies', v=2))['policies'] if p['name'].lower() == policyname.lower()]
if policy is None or len(policy) == 0:
print('Policy %s not found' % policyname)
exit(1)
else:
policy = policy[0]
# get storageDomai... | Python | 1 |
from yacs.config import CfgNode as CN
cn = CN(new_allowed=True)
cn.DATASET = CN(new_allowed=True)
cn.DATASET.NAME = 'COCO'
cn.DATASET.TFRECORDS = '/media/user/data/coco/TF2-SimpleHumanPose/tfrecords'
cn.DATASET.ANNOT = '/media/user/data/coco/annotations/person_keypoints_val2017.json'
cn.DATASET.TRAIN_SAMPLES = 149813... | Python | 1 |
"""
Negative Lens Experiment: Visualize how a negative lens affects light rays.
This experiment places a negative lens at a fixed distance of 4dm from the camera
and renders the scene with a target image at 50dm (5m) distance. The simulation
demonstrates how a negative lens causes light rays to diverge.
Output files... | Python | 1 |
(t(symbol::EQ), r"="),
(t(symbol::DOT), r"\."),
(t(symbol::COMMA), r","),
(t(symbol::L_BRACK), r"\["),
(t(symbol::R_BRACK), r"\]"),
(t(symbol::L_CURLY), r"\{"),
(t(symbol::R_CURLY), r"\}"),
(t(symbol::WHITESPACE), r"\s+"),
... | Rust | 0 |
0)]
ResolveError(ResolveError),
#[display(fmt = "RuntimeError: {}", _0)]
RuntimeError(RuntimeError),
#[display(fmt = "ContractError: {}", _0)]
ContractError(ContractError),
}
#[derive(Debug, Clone, Display)]
pub enum PreCompileError {
#[display(fmt = "ValidationError: {}", msg)]
ValidationError { msg: String },... | Rust | 0 |
ory_axis.has_major_gridlines,
caxis_has_minor_gridlines=False,
caxis_major_tick_mark='outside',
caxis_minor_tick_mark='none',
caxis_tick_labels_font_name="Calibri",
caxis_tick_labels_font_size=10,
caxis_tick_labels_font_bold=False,
caxis_tick_labels_font_italic=F... | Python | 1 |
# Copyright (c) 2022-2023, NVIDIA CORPORATION.
# 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... | Python | 1 |