text string | label_name string | labels int64 |
|---|---|---|
if not is_last:
if use_siren:
omega_0 = first_omega if siren_is_first else hidden_omega
lin = SineLayer(dims[l], out_dim, True, siren_is_first, omega_0, weight_norm)
else:
lin = nn.Linear(dims[l], out_dim)... | Python | 1 |
"""
Requirement App - Forms module
"""
from django import forms
from .models import Document, Requirement, Standard
class DocumentDetailForm(forms.models.ModelForm):
"""
Document Form
*Only allows update to notes. Any other update must be via Admin interface.
"""
doc_identifier = forms.CharField... | Python | 1 |
of the field is `ONES_COMPLEMENT`"]
#[inline]
pub fn is_ones_complement(&self) -> bool {
*self == CMPL_WRR::ONES_COMPLEMENT
}
}
#[doc = "Possible values of the field `BIT_RVS_SUM`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BIT_RVS_SUMR {
#[doc = "No bit order reverse for CRC_SUM"]
N... | Rust | 0 |
# coding: utf-8
# Copyright (c) 2025 OceanBase.
#
# 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 agr... | Python | 1 |
ull(ffi::gst_device_provider_get_hidden_providers(self.to_glib_none().0))
}
}
fn hide_provider(&self, name: &str) {
unsafe {
ffi::gst_device_provider_hide_provider(self.to_glib_none().0, name.to_glib_none().0);
}
}
fn start(&self) -> Result<(), glib::error::BoolErro... | Rust | 0 |
SummarySomeRequest,
SummarySomeResponse,
),
"/arista.imagestatus.v1.SummaryService/GetAll": grpclib.const.Handler(
self.__rpc_get_all,
grpclib.const.Cardinality.UNARY_STREAM,
SummaryStreamRequest,
Summa... | Python | 1 |
# python의 모듈 중 하나인 time 모듈은 1970년 1월 1일 0시 0분 0초 이후로부터 지금까지 흐른 시간을 초단위로 반환합니다
# 이를 이용하여 현재 연도(2021)를 출력해보세요
import time
t = time.time() # 1970-01-01 00:00:00 이후 경과한 시간을 초단위로 반환
print(t, type(t)) # 1635255494.1543155 <class 'float'>
# 초, 분, 시간, 일
t = t // (60 * 60 * 24 * 365) + 1970
print(int(t)) | Python | 1 |
esults."""
try:
with sqlite3.connect(self.db_path) as conn:
cursor = conn.cursor()
cursor.execute('''
INSERT OR REPLACE INTO search_cache (search_term, results)
VALUES (?, ?)
''', (search_term, json.dumps(results... | Python | 1 |
est_validator.verify_request_token(
request.resource_owner_key, request):
raise errors.InvalidClientError()
request.realms = realms
if (request.realms and not self.request_validator.verify_realms(
request.resource_owner_key, request.realms, request)):
... | Python | 1 |
alse`.
"""
return pulumi.get(self, "generate_credentials_in_worker")
@property
@pulumi.getter(name="moduleId")
def module_id(self) -> pulumi.Output[Optional[builtins.str]]:
"""
ID of the module which assumes the AWS IAM role
"""
return pulumi.get(self, "modul... | Python | 1 |
802311600),
(201802311600, 201803311600),
(201803311600, 201804311600),
(201804311600, 201805311600),
(201805311600, 201806311600),
(201806311600, 201807311600),
(201807311600, 201808311600),
... | Python | 1 |
{
self.get_x().dot(&self.get_r())
}
/// Return the X matrix
fn get_x(&self) -> ArrayView2<Self::A>;
/// Return the R matrix
fn get_r(&self) -> ArrayView2<Self::A>;
/// Return the index vector
fn get_row_ind(&self) -> ArrayView1<usize>;
fn get_x_mut(&mut self) -> ArrayViewMut... | Rust | 0 |
{
let n_black_neighbours = neighbours_of(*black_tile)
.iter()
.filter(|tile| flipped_state.contains(tile))
.count();
if 0 < n_black_neighbours && n_black_neighbours <= 2 {
new_flipped_state.insert(*black_tile);
}
}
for white_tile in &whit... | Rust | 0 |
# emulate printf of C language
format = "Welcome %s, what a %s player"
print(format)
values = ("Sachin", "superb") # tuple
print(values)
print(format % values)
print("-" * 60)
format = "Welcome %s, your rating of %.3f what a %s player"
print(format % ("Sachin", 4, "superb"))
print(format % ("Sachin", 4.8, "s... | Python | 1 |
temperature, n, model, max_tokens, stop):
return batch_prompt(prompt_direct_output, extract_answer_direct_output, queries, temperature, n, model, max_tokens, stop)
# cot output prompt
def prompt_cot_output(i, cache, gpt_query, temperature, n, model, max_tokens, stop):
return prompt_openai_general(make_cot_outp... | Python | 1 |
tacks,
nbeams=nbeams,
MJD=MJD_nums,
target=target,
SNR=row['SNR'],
corrs=row['corrs'],
SNRr=row['SNR_ratio'],
path=path,
pdf=pdf)
# Print the elapsed time ... | Python | 1 |
Reno::default());
// Change state to congestion avoidance by introducing loss.
let p_lost = SentPacket::new(
PacketType::Short,
1, // pn
now(), // time sent
true, // ack eliciting
Vec::new(), //... | Rust | 0 |
"/kythe/loc/end",
byte_end.to_string().into_bytes().to_vec(),
)?;
self.emit_edge(anchor_vname, target_vname, "/kythe/edge/ref")
}
}
use deployer_lib::{infra::Error, *};
use structopt::StructOpt;
#[tokio::main]
async fn main() -> Result<(), Error> {
let cli_args = CliArgs::from_a... | Rust | 0 |
# coding: utf-8
"""
Corbado Backend API
# Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys.
The version of the OpenAPI document: 2.0.0
Contact: support@corbado.com
Generated by OpenAPI Generator (https://ope... | Python | 1 |
vs r makeSpiderHeaderr JD
AXF
Ff}!
_F&1*oG| %'/C CF
4[CF
4[CF
CFDkCGFmCGFmCGFmCG ab'CJJsO),-AFKKQ--- !C,c
2 U R S:w a U R S5 n [ U 5 n[ ... | Python | 1 |
def banker_algorithm(max_matrix, allocated_matrix, available_matrix, request_process, request_vector):
"""
银行家算法实现
参数:
max_matrix: 每个进程的最大需求矩阵 (n×m)
allocated_matrix: 当前已分配矩阵 (n×m)
available_matrix: 可用资源向量 (1×m)
request_process: 请求资源的进程索引 (0-based)
request_vector: 请求... | Python | 1 |
_file_size, Ordering::Relaxed);
Ok(())
}
/// The whole data buffer is given to `f` which should return the data back
/// or return None if something went wrong.
pub fn get_data<F, U>(&self, offset: usize, f: F) -> Option<U>
where
F: Fn(SharedMmap) -> Option<U>,
{
let mm... | Rust | 0 |
ack;
mod split;
mod streams;
mod video;
mod ui_event;
pub use self::ui_event::{UIEvent, UIEventChannel};
use futures::{
channel::mpsc as async_mpsc,
future::{self, LocalBoxFuture},
prelude::*,
};
use gio::prelude::*;
use log::warn;
use std::{
future::Future,
ops::{Deref, DerefMut},
path::Pat... | Rust | 0 |
ctions of all the givens
/// futures.
///
/// Once this command is run, all the futures will be exectued at once.
///
/// [`Command`]: struct.Command.html
pub fn batch(commands: impl Iterator<Item = Command<T>>) -> Self {
Self {
futures: commands.flat_map(|command| command.fu... | Rust | 0 |
109, 194, 218, 83, 229, 116, 76, 116, 40, 195, 101, 29, 130, 243, 126, 89, 205, 212,
87, 173, 222, 234, 12, 197, 145, 116, 209, 46, 182, 102, 134, 15,
],
30 => [
239, 89, 25, 14, 35, 42, 26, 61, 180, 140, 224, 106, 63, 122, 122, 78, 89, 65, 28, 26,
74, 63, 65, 52, 176... | Rust | 0 |
entry_point: DEFAULT_SHADER_MAIN_VTX,
buffers: &[draw_context.vertex_buffer_layout.clone()],
};
let default_fragment_state = wgpu::FragmentState {
module: &default_shader_module,
entry_point: DEFAULT_SHADER_MAIN_FRG,
targets: &[wgpu::ColorTargetState {
... | Rust | 0 |
uce_concat=range(2, 6)),
Genotype(
normal=[('sep_conv_3x3', 0), ('sep_conv_3x3', 1), ('skip_connect', 0),
('dil_conv_3x3', 2), ('skip_connect', 0), ('sep_conv_3x3', 1),
('skip_connect', 0), ('skip_connect', 1)],
normal_concat=range(2, 6),
reduce=[('max_pool_3x... | Python | 1 |
import py_trees
from py_trees.common import Status
import random
nums = [2, 3, 0, 8]
class SortedCondition(py_trees.behaviour.Behaviour):
def __init__(self, name):
super().__init__(name)
def setup(self, **kwargs):
pass
def initialise(self) -> None:
pass
def update(self) -> ... | Python | 1 |
quarters())),
DateTimeUnits::Month => Ok(D::from(interval.months())),
DateTimeUnits::Day => Ok(D::lossy_from(interval.days())),
DateTimeUnits::Hour => Ok(D::lossy_from(interval.hours())),
DateTimeUnits::Minute => Ok(D::lossy_from(interval.minutes())),
DateTimeUnits::Second => Ok(... | Rust | 0 |
err do not count towards the connection count in the pool.
#[tokio::test]
async fn should_hold_bounds_on_error() -> super::Result<()> {
// Should not be possible to connect to broadcast address.
let pool = Pool::new(String::from("mysql://255.255.255.255"));
assert!(try_join!(pool.get_c... | Rust | 0 |
775A),
(r"meshes\b\b_n_dark elf_m_head_04.nif", 0x1611_1060, 0x1499_775B),
(r"meshes\b\b_n_dark elf_m_head_08.nif", 0x1611_1060, 0x1499_775D),
(r"meshes\b\b_n_dark elf_m_head_11.nif", 0x1611_1060, 0x24A0_7278),
(r"meshes\b\b_n_dark elf_m_head_13.nif", 0x1611_1060, 0x24A0_7279),
(r"meshes\b\b_n_... | Rust | 0 |
ICE).interest_index,
user_interest_index_block_number_4
);
assert_ok!(MinterestProtocol::deposit_underlying(alice_origin(), DOT, 20 * DOLLARS,));
});
}
}
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use crate:... | Rust | 0 |
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_admin import Admin
from flask_admin.contrib.sqla import ModelView
db = SQLAlchemy()
admin = Admin()
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(50))
posts = db.relationship("Post"... | Python | 1 |
bol on first use" strategy
// for shared libraries is disabled and all symbols get resolved immediately on
// load. Since the enclave is ultimatley a self-contained static blob,
// we don't need or want any of those trampolines. [4]
//
// Note: [2] suggests in the last sentenc... | Rust | 0 |
o be 32".to_string(),
));
}
let mut bytes = [0u8; 32];
bytes.copy_from_slice(src);
Ok(Self(bytes))
}
}
impl fmt::Display for DatabaseByteArrayKey {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", hex_fmt::HexFmt(self.0))
}
}
impl fm... | Rust | 0 |
ts(apet, apet_idx, teams, te=None, te_idx=None, fixed_targets=None):
fixed_targets = fixed_targets or []
fteam, oteam = get_teams(apet_idx, teams)
if len(fixed_targets) == 0:
target, possible = get_target(apet, apet_idx, teams, te=te)
else:
target = fixed_targets
possible = [fix... | Python | 1 |
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
df =pd.read_csv("/home/noor/UA_Local_Proejcts/UA_Projects/Fault Detection/Dataset/Cleaned_data_after_processing.csv")
#Data_Preprocessing
#print(df.head())
print(df.columns)
#print(df['event type'])
#Data count... | Python | 1 |
num_col_num=info_dict['num_col_num'],
text_df=text_df
)
print('>>> Merging text and table is done ..')
# Split folds
data = np.load(os.path.join(args.output_path, args.norm, 'input_ids.npy'))
fold_root= os.path.join(args.output_path, args.norm, 'fold')
os.makedirs(fold_root, exist... | Python | 1 |
: String,
arguments: Vec<Value>,
_neovim: Neovim<TxWrapper>,
) {
trace!("Neovim notification: {:?}", &event_name);
#[cfg(windows)]
let ui_command_sender = self.ui_command_sender.clone();
let redraw_event_sender = self.redraw_event_sender.clone();
task::spawn... | Rust | 0 |
"""
LeetCode 5. Longest Palindromic Substring
https://leetcode.com/problems/longest-palindromic-substring/
summary:
주어진 문자열 s에서 "가장 긴 팰린드룸 부분 문자열"을 찾아 반환
"""
class Solution:
def longestPalindrome(self, s: str) -> str:
# DP (시간복잡도 O(n^2), 공간복잡도 O(n^2))
n = len(s)
dp = [[False]*n fo... | Python | 1 |
], max(t["assign_to_cell"] for t in ref if t["x"] < token["end_x"] and "assign_to_cell" in t) + 1]
# Action strands are added to their respective data strands
# The top action strand for an x value goes to the top data strand for that x value
curr_x = 0
x_count = 0
... | Python | 1 |
butes": [
"title",
"tagline",
"overview",
"cast",
"director",
"producer",
"production_companies",
"genres",
],
"displayedAttributes": [
"title",
... | Rust | 0 |
event_DI1.append((f"e{idx1}_{i}-e{idx2}_{j}", di_test))
event_DI2 = []
for i in range(1, 13):
if f"e{idx2}_{i}" in evenement_all[col2]:
for j in range(1, 13):
if f"e{idx1}_{j}" ... | Python | 1 |
device, criterion=criterion, denoising=False, denoise_model =autoencoder,
zero_mask_model = zero_model, parallel=True, num_classes=num_classes)
# print(summary(model=model,
# input_size=(32, 1, 16, 512), # make sure this is "input_size", not "input_shape"
# # col_names=["input_size"... | Python | 1 |
lib.get(lst, [])
lib[lst] = list(vals)
lib['own_%s' % lst] = list(vals)
for fg_name in lib.get('filegroups', []):
fg = filegroups[fg_name]
for plugin in fg['plugins']:
if plugin not in plugins:
plugins.append(plugin)
... | Python | 1 |
Lakes),
12 => Some(Biome::SnowyTundra),
13 => Some(Biome::SnowyMountains),
140 => Some(Biome::IceSpikes),
3 => Some(Biome::Mountains),
34 => Some(Biome::WoodedMountains),
131 => Some(Biome::GravellyMountains),
162 => Some(Biome::Gravell... | Rust | 0 |
match self.stream.next() {
Some((_, c)) if c == expected => Ok(()),
Some((_, c)) => invalid_input(expected, c),
None => end_of_expr(expected),
}
}
fn parse_num<T: FromStr>(&mut self) -> Result<T> {
match self.stream.peek() {
Some(&(i, c)) if c.i... | Rust | 0 |
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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 (a... | Python | 1 |
Bowl Sunday?",
"Oh, no.",
"No no no no.",
"I kept looking at her face.",
"I'd go, 'C'mon, love her.",
"Love her!'",
"Yeah.",
"Anyway, he shamed me into it.",
"Yes, I think I would.",
"'HEY!",
"JIMMY!!!",
"ha ha ha........Great game.'",
"Are you through? ",
"You find this interesting, don't you... | Rust | 0 |
w)
}
}
#[doc = "Possible values of the field `CH0_THRSEL`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH0_THRSELR {
#[doc = "Threshold 0. Channel 0 results will be compared against the threshold levels indicated in the THR0_LOW and THR0_HIGH registers"]
THRESHOLD_0,
#[doc = "Threshold 1. Channe... | Rust | 0 |
import time
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
# ruta correcta a ChromeDriver
driver_path = "C:/Users/Sebas/Documents/chromedriver.exe"
# servicio para ChromeDriver
service = Service(executable_path=driver_path)
# inicializar... | Python | 1 |
mut prev = None;
// This starts with the following structure
//
// 0-1-2-3-4-5-6-7-8-9-10-11-12-13
for i in 0i64..=13i64 {
initial.insert(
i,
StateGroupEntry {
in_range: true,
prev_state_group: prev,
state_map: StateMap::n... | Rust | 0 |
help="Use gradient checkpointing via model-specific policy",
)
parser.add_argument(
"--fsdp-wrap",
"--fsdp_wrap",
action="store_true",
help="Apply fsdp to submodules via model-specific policy",
)
dist_arg = parser.add_mutually_exclusive_group()
dist_arg.add_argument... | Python | 1 |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# To read data from Age_Income.csv file
dataFrame = pd.read_csv('Age_Income.csv')
# To place data in to age and income vectors
age = dataFrame['Age']
income = dataFrame['Income']
# number of points
num = np.size(age)
# To find the mean of age and in... | Python | 1 |
|
/// | unreproducible | success | failed | yes |
/// | reproducible | success | success | n/a |
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
pub enum BuildStatus {
FirstFailed,
SecondFailed,
Unreproducible(Hashes),
Reproducible... | Rust | 0 |
ess
.debounce(Duration::from_millis(100));
// Add an async interrupt to trigger whenever the button is pressed
button
.when_pressed(|_| {
println!("button pressed");
})
.unwrap();
}
<gh_stars>1000+
//
// Copyright © 2020 <NAME>
// This code is licensed under MIT lice... | Rust | 0 |
n up event for the specified button, using the provided constants """
location = get_position()
button_code, _, button_up, _ = _button_mapping[button]
e = Quartz.CGEventCreateMouseEvent(
None,
button_up,
location,
button_code)
if _last_click["time"] is not None and _last... | Python | 1 |
/// * `eps` − tolerance used to determine when a value converged to 0.
/// * `max_niter` − maximum total number of iterations performed by the algorithm. If this
/// number of iteration is exceeded, `None` is returned. If `niter == 0`, then the algorithm
/// continues indefinitely until convergenc... | Rust | 0 |
[unique_selected_points != -1]
# 画边
for j in range(len(selected_arc_point_mapping)):
linked_points = selected_arc_point_mapping[j]
# 获取边的两端节点:s_-起点,e_-终点
s_ = point_set[linked_points[0]]
e_ = point_set[linked_points[1]]
# 获取s_的x,y坐标
... | Python | 1 |
ee",
"egui": "ESET NOD32",
"ekrn": "ESET NOD32",
"eguiProxy": "ESET NOD32",
"kxetray": "金山毒霸",
"knsdtray": "可牛杀毒",
"TMBMSRV": "趋势杀毒",
"avcenter": "Avira(小红伞)",
"avguard": "Avira(小红伞)",
"avgnt": "Avira(小红伞)",
... | Python | 1 |
.format(", ".join([QT_API for _, QT_API in _candidates]))
)
else: # We should not get there.
raise AssertionError(f"Unexpected QT_API: {QT_API}")
_version_info = tuple(QtCore.QLibraryInfo.version().segments())
if _version_info < (5, 12):
raise ImportError(
f"The Qt version imported ... | Python | 1 |
1d\x7d\x31\xe8\xd9\x2e\x59\x82\xc9\xdd\x29\x86\xea\
\xad\x58\x1f\x21\x2d\x43\xda\x9c\x5c\xb7\xb9\x48\xfc\x18\x91\x4b\xe9\x02\
\x19\x70\x9d\x0c\x26\xd3\xb5\xf4\xad\x87\x9d\x84\x94\xbb\x3a\xeb\xfe\x61\
\x2e\xc5\x40\x41\xe4\xa3\x80\xf0\
";
pub static FULFILLMENT: [u8; 32] = *b"\
\x11\x7b\x43\x4f\x1a\x54\x... | Rust | 0 |
ure
`BitVec` will not specifically overwrite any data that is removed from it, nor
will it specifically preserve it. Its uninitialized memory is scratch space that
may be used however the implementation desires, and must not be relied upon as
stable. Do not rely on removed data to be erased for security purposes. Even... | Rust | 0 |
):
return DerefExpr(self.visit(e.lval))
def visit_AddrOfExpr(self, e):
return AddrOfExpr(self.visit(e.lval))
def visit_FieldExpr(self, e):
return FieldExpr(self.visit(e.record), *e.fieldpath)
def visit_ArrAtExpr(self, e):
return ArrAtExpr(self.visit(e.array), self.visit(e.... | Python | 1 |
/// Kind of this entry
kind: RawDirEntryKind<E>,
/// Is set when this entry was created from a symbolic link and the user
/// expects to follow symbolic links.
follow_link: bool,
/// Cached file_type()
ty: E::FileType,
}
impl<E: fs::FsDirEntry> RawDirEntry<E> {
/// Create new object fr... | Rust | 0 |
,
/// Opcode of the message. Note that the size is not the same as the [`ServerHeader`].
pub opcode: u32,
}
/// Main struct for encryption or decryption.
///
/// Created from [`ProofSeed::into_header_crypto`].
///
/// Handles both encryption and decryption of headers through the
/// [`Encrypter`] and [`Decrypt... | Rust | 0 |
v)
}
pub fn a(self) -> u8 {
(self.into_native() >> 24) as u8
}
pub fn b(self) -> u8 {
(self.into_native() >> 16) as u8
}
pub fn c(self) -> u8 {
(self.into_native() >> 8) as u8
}
pub fn d(self) -> u8 {
self.into_native() as u8
}
}
// TODO: wrap for... | Rust | 0 |
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import re
def check_password_strength(password):
# Check length of the password
if len(password) < 8:
return "Weak: Password should be at least 8 characters long."
# Check for presence of uppercase and lowercase letters in password
if not a... | Python | 1 |
},
"frontend_ip_configurations": [
{
"id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + GROUP_NAME + "/providers/Microsoft.Network/loadBalancers/" + LOAD_BALANCER_NAME + "/frontendIPConfigurations/" + FRONTEND_IPCONFIGURATION_NAME
}
... | Python | 1 |
std::fs;
use std::path::PathBuf;
pub const DOCKER_IMAGE: &str = "jjy0/ckb-capsule-recipe-rust:2020-6-2";
const RUST_TARGET: &str = "riscv64imac-unknown-none-elf";
const CARGO_CONFIG_PATH: &str = ".cargo/config";
const BASE_RUSTFLAGS: &str =
"-Z pre-link-arg=-zseparate-code -Z pre-link-arg=-zseparate-loadable-segm... | Rust | 0 |
accept the next connection.
fn poll_accept(
self: Pin<&mut Self>,
cx: &mut task::Context<'_>,
) -> Poll<Option<Result<Self::Conn, Self::Error>>>;
}
/// Create an `Accept` with a polling function.
///
/// # Example
///
/// ```
/// use std::task::Poll;
/// use hyper::server::{accept, Server};
///... | Rust | 0 |
import numpy as np
# Thanks, Guillaume Bouvier!
# source: https://gist.github.com/bougui505/23eb8a39d7a601399edc7534b28de3d4
def find_rigid_alignment(A, B):
"""
See: https://en.wikipedia.org/wiki/Kabsch_algorithm
2-D or 3-D registration with known correspondences.
Registration occurs in the zero cent... | Python | 1 |
import yarl
url = yarl.URL(TAINTED_STRING)
ensure_tainted(
url, # $ tainted
# see https://yarl.readthedocs.io/en/stable/api.html#yarl.URL
url.user, # $ tainted
url.raw_user, # $ tainted
url.password, # $ tainted
url.raw_password, # $ tainted
url.host, # $ tainted
url.raw_host, # $... | Python | 1 |
.0; }));
const_vars = const_vars.union(x_scale.vars());
let x_ = x_scale.elem_mult(x_);
let y_ = x_;
let y_ = batch_norm_conv2d_xavier_op_gpu(frame_dim, ConvShape{
axes: conv_axes,
kernel: (7, 7),
stride: (2, 2),
zero_pad: true,
filters: Some(64),
}, stats_cfg, &mut sta... | Rust | 0 |
imizationLevel};
use test::Bencher;
#[bench]
fn bench_eval_expression_single(bench: &mut Bencher) {
let script = "1";
let mut engine = Engine::new();
engine.set_optimization_level(OptimizationLevel::None);
let ast = engine.compile_expression(script).unwrap();
bench.iter(|| engine.consume_ast(&as... | Rust | 0 |
22236, 0.363520045761914, -0.0339129968146675,
-0.00000107342140085188, -0.0000139801296102807,
-0.00000425069770699759, 0.0436806162945145, 0.00144170298545239,
0.0109507769345455, 0.00261657568854817, 0.0046983621886579,
0.00714512825214436]
}
res_c_2exog = {
'llf': 609.0516018486... | Python | 1 |
std::option::Option<u64>,
remaining: ::std::option::Option<u64>,
blockPoolUsed: ::std::option::Option<u64>,
lastUpdate: ::std::option::Option<u64>,
xceiverCount: ::std::option::Option<u32>,
location: ::protobuf::SingularField<::std::string::String>,
nonDfsUsed: ::std::option::Option<u64>,
ad... | Rust | 0 |
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2017 Stanford University and the Authors
#
# Authors: Christoph Klein
# Contributors: Tim Moore
#
# MDTraj is free s... | Python | 1 |
(binary_mask, cmap='gray')
# Plot points in different colors
colors = list(mcolors.TABLEAU_COLORS.values())
for i, point in enumerate(points):
plt.scatter(point[0], point[1], c=colors[i % len(colors)], s=100, label=f'Point {i+1}') # Corrected to plot y, x order
... | Python | 1 |
versaire du décès du Président Felix Houphouet-Boigny")
)
# Christmas Day.
dt = self._add_christmas_day(tr("Fête de Noël"))
if self._year >= 2011:
self._add_observed(dt)
# Day after Prophet's Birthday.
self._add_mawlid_day(tr("Lendemain de l'Anniversaire... | Python | 1 |
Button::Right,
}],
),
Hotkey::new(xkb::XKB_KEY_q, Modifiers::NONE, vec![Command::HideWindow]),
Hotkey::new(
xkb::XKB_KEY_Escape,
Modifiers::NONE,
vec![Command::HideWindow],
),
... | Rust | 0 |
# Copyright 2019 Uber Technologies, Inc. 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 applica... | Python | 1 |
from transliterate import defaults
__title__ = 'transliterate.conf'
__author__ = 'Artur Barseghyan'
__copyright__ = '2013-2018 Artur Barseghyan'
__license__ = 'GPL-2.0-only OR LGPL-2.1-or-later'
__all__ = (
'get_setting',
'reset_to_defaults_settings',
'set_setting',
'settings',
)
class Settings(objec... | Python | 1 |
#[inline]
pub fn _from(value: u8) -> AVAILR {
match value {
128 => AVAILR::MODE7,
64 => AVAILR::MODE6,
32 => AVAILR::MODE5,
16 => AVAILR::MODE4,
8 => AVAILR::MODE3,
4 => AVAILR::MODE2,
2 => AVAILR::MODE1,
1 =>... | Rust | 0 |
9]);
let mut cursor = Cursor::new(v.to_vec());
cursor.set_position(0);
let mut reader = BinReader::new(&mut cursor, ProtocolVersion::local());
Ok((ServerInfo::read(&mut reader)?, id.clone()))
})?;
let mut ret = vec![];
loop {
match itt.next() {
Some((server, server_id)) => {
let server_id... | Rust | 0 |
rch.sqrt(2.0 * x)
taylor_correction = 1.0 - x/12.0 + 3.0*x*x/160.0
result[close_to_one] = sqrt_2x * taylor_correction
return result
else:
# 所有值都远离1,使用标准公式
sqrt_term = torch.sqrt(z * z - 1.0)
return torch.log(z + sqrt_term)
def... | Python | 1 |
assert_eq!(transformed_value.to_owned(), expected_value)
}
#[test]
fn transform_email_with_empty_string_value() {
let expected_value = "";
let transformer = get_transformer();
let column = Column::StringValue("email".to_string(), expected_value.to_string());
let tr... | Rust | 0 |
== STAT_REG {
self.set_stat(b);
} else if addr == SCY_REG {
// FF42 SCY
self.scy = b;
} else if addr == SCX_REG {
// FF43 SCX
self.scx = b;
} else if addr == LY_REG {
// FF44 LY
self.ly = b;
} else if add... | Rust | 0 |
l[sss <= args.smax]
if args.c != None:
ccc = ccc[sss <= args.smax]
sss = sss[sss <= args.smax]
nc.close()
# to reduce file size, remove zero water points
if args.c != None:
ccc = ccc[bwat > 0]
bwprel = bwprel[bwat > 0.0]
bwat = bwat[bwat > 0.0]
# to reduce file size, remove zero press... | Python | 1 |
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Jason Power
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this list of con... | Python | 1 |
ERROR expected one of
fn main() {
pong!();
ping!();
deep!();
}
//! Types representing Hello elements
use {Error, Repr, Result};
use byteorder::{ByteOrder, NetworkEndian};
use hello::bitmap::{Bitmap, BitmapRepr};
enum_with_unknown! {
/// Represent the type of payload of the Hello message element.
... | Rust | 0 |
ield(help_text="变量名")
attr_value = serializers.CharField(help_text="变量值")
name = serializers.CharField(help_text="名称")
scope = serializers.CharField(help_text="范围")
is_change = serializers.BooleanField(help_text="是否可改变")
class ComponentVolumeSerializer(serializers.Serializer):
"""组件存储信息序列化器"""
... | Python | 1 |
fTag, T>
where
SetUnionRepr<SelfTag, T>: LatticeRepr<Lattice = SetUnion<T>>,
SetUnionRepr<DeltaTag, T>: LatticeRepr<Lattice = SetUnion<T>>,
<SetUnionRepr<SelfTag, T> as LatticeRepr>::Repr: Collection<T, ()> + Extend<T>,
<SetUnionRepr<DeltaTag, T> as LatticeRepr>::Repr: IntoIterator<Item = T>,
{
fn... | Rust | 0 |
CustomWithValues(String, Vec<Value>),
Keyword(Keyword),
}
impl Expr {
pub(crate) fn new() -> Self {
Self::default()
}
fn new_with_left(left: SimpleExpr) -> Self {
Self {
left: Some(left),
right: None,
uopr: None,
bopr: None,
... | Rust | 0 |
ns;
fn bar(x: Option<i32>, j: i32) -> Option<i32> {
match x {
Some(i) => Some(i << 1),
None => Some(j),
}
}
fn bas(x: Option<i32>, j: i32) -> Option<i32> {
match x {
Some(i) => Some(i << 2),
None => Some(j),
}
}
fn foo(f: fn(Option<i32>, i32) -> Option<i32>) -> Option<... | Rust | 0 |
ile found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/security-keys-rust/master/COPYRIGHT. No part of security-keys-rust, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
// Copy... | Rust | 0 |
# app.py
import streamlit as st
def page_1():
st.write("Welcome to Page 1")
def page_2():
st.write("Welcome to Page 2")
page = st.sidebar.selectbox("Choose a page", ["Page 1", "Page 2"])
if page == "Page 1":
page_1()
else:
page_2()
| Python | 1 |
0.0]), 0.0);
assert_eq!(axis_parallel_hyper_ellipsoid(&vec![0.0]), 0.0);
}
#[test]
fn axis_parallel_hyper_ellipsoid_not_optimum() {
assert_ne!(axis_parallel_hyper_ellipsoid(&vec![1.0, 0.0, 0.0]), 0.0);
assert_ne!(axis_parallel_hyper_ellipsoid(&vec![0.1]), 0.0);
}
#[test]
... | Rust | 0 |
use numbers::*;
pub use secure::*;
pub use stats::*;
pub use token_bucket::*;
pub use utils::*;
<reponame>CubeArrow/raytracer
pub mod texture;
<reponame>rustake/veho<gh_stars>0
use std::hash::Hash;
pub trait Unwinds<K, V>: IntoIterator<Item=(K, V)> where
Self: Sized,
K: Hash + Eq
{
fn move_unwind(self) ->... | Rust | 0 |
}
<reponame>des256/e
// E - System - iOS
// <NAME>, 1998-2021
use crate::packets::PacketBody;
use crate::SliceCursor;
/// Set the active NPC.
///
/// Direction: Server <-> Client (Sync).
#[derive(Debug)]
pub struct SetActiveNpc {
pub player_id: u8,
pub npc_talk_target: i16,
}
impl PacketBody for SetActiveNpc... | Rust | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.