text string | label_name string | labels int64 |
|---|---|---|
"银行",
],
},
#[cfg(feature = "zh")]
crate::Annotation {
lang: "zh",
tts: Some("趋势向上且带有日元符号的图表"),
keywords: &[
"上扬",
"上涨",
"日元汇率",
"货币升值图表",
"走势",
"趋势向上且带... | Rust | 0 |
_minutes}м", inline=True)
embed.add_field(name="Завершается", value=f"<t:{int(war.ends_at.timestamp())}:R>", inline=True)
await ctx.send(embed=embed)
@commands.hybrid_command(name="war_task", description="Выполнить задание войны")
async def war_task(self, ctx, task_type: str = "daily"):
... | Python | 1 |
(1)
m.bias.data.zero_()
elif isinstance(m, nn.BatchNorm3d):
m.weight.data.fill_(1)
m.bias.data.zero_()
elif isinstance(m, nn.Linear):
m.bias.data.zero_()
def forward(self, L, R):
features_left = self.feature_extraction(... | Python | 1 |
print(n_clicks)
# if value == "sentiment_label":
# sentiment_val = df
# # print(sentiment_val)
# scatter_plot = px.scatter(
# sentiment_val,
# x="index",
# y="sentiment_score",
# color="sentiment_label",
# ... | Python | 1 |
romStrParser<T>
where
C: Context,
C::Error: From<<T as FromStr>::Err>,
T: FromStr + Send + Sync + 'static,
<T as FromStr>::Err: std::error::Error + Send + Sync,
{
type Output = T;
fn parse<'a, 'b>(
&self,
_ctx: &mut C,
input: &... | Rust | 0 |
# Basana
#
# Copyright 2022 Gabriel Martin Becedillas Ruiz
#
# 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 l... | Python | 1 |
tTag, rootClass = get_root_tag(rootNode)
if rootClass is None:
rootTag = 'Windows_Prefetch_Entry'
rootClass = WindowsPrefetchObjectType
rootObj = rootClass.factory()
rootObj.build(rootNode)
# Enable Python to collect the space used by the DOM.
doc = None
rootElement = rootObj.to_... | Python | 1 |
.DEBUG)
logging.getLogger('requests.packages.urllib3').setLevel(logging.WARNING)
verbosity = 10
elif args.verbose:
log.setLevel(logging.INFO)
logging.getLogger('gmusicapi').setLevel(logging.WARNING)
logging.getLogger('fuse').setLevel(logging.INFO)
logging.getLogger('r... | Python | 1 |
in_interface():
# with gr.Blocks() as demo:
# gr.Markdown("# Customer Chat bot (Including Flight, Car, Hotel, Etc.)")
#
# with gr.Row():
# build_button = gr.Button("构建向量库")
# status_text = gr.Textbox(label="状态", interactive=False)
#
# with gr.Column(visible=False) as ... | Python | 1 |
pecified options.");
}
//Declare individual variables, some with their default values.
let (name, module, arg, language, voice, punctuation_mode, firejailed);
let unicode_ranges: Vec<u32>;
let (mut pitch, mut capitals_pitch, mut rate, mut volume)=(10, 50, 2, 100);
... | Rust | 0 |
(pa8, PfD),
Pa12(pa12, PfC),
}
pub enum Sercom2Pad1 {
Pa9(pa9, PfD),
Pa13(pa13, PfC),
}
pub enum Sercom2Pad2 {
Pa10(pa10, PfD),
Pa14(pa14, PfC),
}
pub enum Sercom2Pad3 {
Pa11(pa11, PfD),
Pa15(pa15, PfC),
}
// sercom3[0]: PA16:D PA22:C
// sercom3[1]: PA17:D PA23:C
// sercom3[2]: PA... | Rust | 0 |
_data_nascimento = ctk.CTkLabel(self, text="Data de Nascimento", font=("Century Gothic bold", 16), text_color=["#000","#fff"])
lb_data_admissao = ctk.CTkLabel(self, text="Data de Admissão", font=("Century Gothic bold", 16), text_color=["#000","#fff"])
lb_aso = ctk.CTkLabel(self, text="Cursos", font=("Ce... | Python | 1 |
387573b68666669a0ed764252ce5367708e696e31967764a90b429c2").unwrap();
}
}
#[cfg(test)]
mod tests {
use super::{error::StarknetErrorCode, test_utils::*, *};
use crate::core::{StarknetBlockHash, StarknetBlockNumber};
use assert_matches::assert_matches;
use stark_hash::StarkHash;
impl std::fmt::Di... | Rust | 0 |
er LFAPRESC0"]
pub type R = crate::R<u32, super::LFAPRESC0>;
#[doc = "Writer for register LFAPRESC0"]
pub type W = crate::W<u32, super::LFAPRESC0>;
#[doc = "Register LFAPRESC0 `reset()`'s with value 0"]
impl crate::ResetValue for super::LFAPRESC0 {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self... | Rust | 0 |
import sys
import numpy as np
from ase.io import read
from pylab import *
import importlib.metadata
def main():
if len(sys.argv) != 2:
print("Usage: python plot_shc_multiple.py <number-of-runs>")
sys.exit(1)
if __name__ == "__main__":
main()
with open('run.in', 'r') as file:
for line in fi... | Python | 1 |
number is `NaN`
///
/// For signed integers:
///
/// * `0` if the number is zero
/// * `1` if the number is positive
/// * `-1` if the number is negative
#[inline(always)] pub fn signum<T: Signed>(value: T) -> T { value.signum() }
/// A trait for values which cannot be negative
pub trait Unsigned: Num {}
macro_rules... | Rust | 0 |
NNECT_RETRY_TIMEOUT).await;
}
Err(err) => {
return Err(anyhow::anyhow!(
"failed to create repository tunnel for target {:?}: {:?}",
target_nodename,
err
));
}
}
}
Err(anyhow::... | Rust | 0 |
h_errorecb: PUBLISH_ERRORECB,
_reserved8: [u8; 380usize],
#[doc = "0x304 - Enable interrupt"]
pub intenset: INTENSET,
#[doc = "0x308 - Disable interrupt"]
pub intenclr: INTENCLR,
_reserved10: [u8; 504usize],
#[doc = "0x504 - ECB block encrypt memory pointers"]
pub ecbdataptr: ECBDATAPTR,... | Rust | 0 |
for rando in &random_nodes {
broadcaster
.0
.connect(rando.node().listening_addr().unwrap())
.await
.unwrap();
}
wait_until!(
1,
random_nodes
.iter()
.all(|rando| rando.node().stats().received().0 == 2)
);
}
<g... | Rust | 0 |
Status(&self, out: *mut StorageProviderUriSourceStatus) -> HRESULT,
fn put_Status(&self, value: StorageProviderUriSourceStatus) -> HRESULT,
fn get_Path(&self, out: *mut HSTRING) -> HRESULT,
fn put_Path(&self, value: HSTRING) -> HRESULT
}}
impl IStorageProviderGetPathForContentUriResult {
#[inline] pub f... | Rust | 0 |
result.search_key.clone(),
));
}
}
// Iterate over rngs, searching for its current state and advancing it
for (_, ref mut rng) in self.rngs.iter_mut() {
while let Some(ciphertext) = tx_result_map.remove(rng.peek()) {
match upriv.dec... | Rust | 0 |
""" output one-hot encoding of paths """
num_paths = sum([NUM_OPS ** i for i in range(1, LONGEST_PATH_LENGTH + 1)])
path_indices = self.get_path_indices()
encoding = np.zeros(num_paths)
for index in path_indices:
encoding[index] = 1
return encoding
def encode_... | Python | 1 |
SAMPLE_RATE as f64,
BUFFER_SIZE as u32,
)?;
let mut stream = pa.open_non_blocking_stream(settings, callback)?;
stream.start()?;
// Wait for the stream to play. Work could be done on
// this thread during this time.
pa.sleep(MSECS as i32);
// Stop and close down the stream.
... | Rust | 0 |
buf_x = [0u8; 31];
transcript.challenge_bytes(b"x", &mut buf_x);
let x = random_bytes_to_fr::<E>(&buf_x);
// V computes and checks:
let h_vec_inv: Vec<E::G1Affine> = (0..gens.N)
.map(|i| h_vec[i].mul(y_n_inv[i]).into_affine())
.collect();
let wL: E::G1Projective = quick_multiexp::... | Rust | 0 |
import pytest
from spacy.lang.ja import Japanese
def test_ja_morphologizer_factory():
pytest.importorskip("sudachipy")
nlp = Japanese()
morphologizer = nlp.add_pipe("morphologizer")
assert morphologizer.cfg["extend"] is True
| Python | 1 |
from django.urls import path
from .consumers import *
websocket_urlpatterns = [
path("ws/chatroom/<chatroom_name>", ChatConsumer.as_asgi())
] | Python | 1 |
x1F1C, 0x1F1E, 0x1F25, 0x1F26, 0x1F27,
0x1F28, 0x1F2D, 0x1F38, 0x1F65, 0x1F67, 0x1F73, 0x1F76,
];
pub static GBK_LEFT_IDEOGRAPH_OFFSETS: [u16; 1627] = [
0x72DC, 0x72DF, 0x72E2, 0x72EA, 0x72F5, 0x72F9, 0x72FD, 0x7302, 0x7304, 0x730B, 0x730F, 0x7314,
0x7318, 0x731F, 0x7323, 0x7326, 0x732D, 0x732F, 0x7332, 0x... | Rust | 0 |
) -> T {
match self {
Status::Complete(t) => t,
Status::Partial => panic!("Tried to unwrap Status::Partial"),
}
}
}
#[macro_export]
macro_rules! complete {
($e:expr) => {
match try!($e) {
Status::Complete(v) => v,
Status::Partial => return... | Rust | 0 |
s.PlateCarree(),ax=ax,
alpha=0.8)
#------- Annotate -------
# Title
if len(plot_overlap) == 1:
ax.set_title('Poly #'+str(poly_idx[0])+': '+
'; '.join([str(plot_overlap[0][k]) for k in plot_overlap[0].index
if k not in ['poly_idx','rel_area','pix_idxs','coords']][0... | Python | 1 |
"""
Escopo de funções em Python
escopo significa o local onde aquele código pode atingir.
Existe o escopo global e o local.
O escopo global é o escopo onde todo o código é alcançável.
O escopo local é o escopo onde apenas nomes do mesmo local
podem ser alcançados.
"""
x = 1
def escopo():
global x
x = 10
... | Python | 1 |
))
}
fn deserialize_package_info(line: &[u8]) -> Result<Payload> {
#[derive(Deserialize, Serialize)]
struct PackageInfoPayload {
name: String,
version: String,
}
let payload: PackageInfoPayload = serde_json::from_slice(line)?;
Ok(Payload::PackageInformation(PackageInformation {
... | Rust | 0 |
acing::warn!(target: "org-node", "Signed refs for {} concurrently modified", urn);
}
}
Ok(updated)
}
/// Set the 'HEAD' of a project.
///
/// Creates the necessary refs so that a `git clone` may succeed and checkout the correct
/// branch.
fn set_head(urn: &Urn, mai... | Rust | 0 |
_in_range: bool,
transform: na::Matrix4<f64>,
}
let mut result = Vec::new();
let mut pending = Vec::<PendingNode>::new();
let mut visited = FxHashSet::<NodeId>::default();
let start_p = start.local.map(|x| x as f64) * math::origin();
pending.push(PendingNode... | Rust | 0 |
import random
import bisect
from collections import OrderedDict
'''
Top languages on the Interwebs. Not a probability distribution
as it doesn't sum to 1 and websites can be in more than one
language. Reference:
https://en.wikipedia.org/wiki/Languages_used_on_the_Internet#Content_languages_for_websites
'''
INTERNET_... | Python | 1 |
from django import forms
from . models import *
from django.contrib.auth.forms import UserCreationForm
class NotesForm(forms.ModelForm):
class Meta:
model = Notes
fields = ['title','description']
class DateInput(forms.DateInput):
input_type = 'date'
class HomeworkForm(forms.ModelForm):
... | Python | 1 |
import re
from utils.prompt import FACT_RETRIEVAL_PROMPT
def get_fact_retrieval_messages(message):
return FACT_RETRIEVAL_PROMPT, f"Input:\n{message}"
def parse_messages(messages):
response = ""
for msg in messages:
if msg["role"] == "system":
response += f"system: {msg['content']}\n"
... | Python | 1 |
# built-in
import shlex
from codecs import decode
from pathlib import Path
from string import Template
from typing import Dict
def read_dotenv(path: Path, env_vars: Dict[str, str] = None) -> Dict[str, str]:
if env_vars is None:
env_vars = dict()
else:
env_vars = env_vars.copy()
if path.is... | Python | 1 |
m(Op::Const(Value::Bool(v))))
}
pub fn uint_lit<I>(v: I, bits: usize) -> T
where
Integer: From<I>,
{
T::new(Ty::Uint(bits), bv_lit(v, bits))
}
pub fn slice(arr: T, start: Option<usize>, end: Option<usize>) -> Result<T, String> {
match &arr.ty {
Ty::Array(size, _) => {
let start = start... | Rust | 0 |
NEMAL550P,
#[serde(rename = "NEMA L6-15P")]
NEMAL615P,
#[serde(rename = "NEMA L6-20P")]
NEMAL620P,
#[serde(rename = "NEMA L6-30P")]
NEMAL630P,
#[serde(rename = "NEMA L6-50P")]
NEMAL650P,
#[serde(rename = "NEMA L10-30P")]
NEMAL1030P,
#[serde(rename = "NEMA L14-20P")]
NEMAL... | Rust | 0 |
result_sum = torch.sum(torch.abs(sample))
result_mean = torch.mean(torch.abs(sample))
assert abs(result_sum.item() - 269.2187) < 1e-2, f" expected result sum 269.2187, but get {result_sum}"
assert abs(result_mean.item() - 0.3505) < 1e-3, f" expected result mean 0.3505, but get {result_mean... | Python | 1 |
her to set the current directory to the application to the `Contents/Resources`
/// subdirectory of the application's bundle, if present.
///
/// This is ignored on platforms besides macOS.
CocoaChdirResources(bool),
/// Specifies whether to create a basic menu bar, either from a nib or manually, wh... | Rust | 0 |
:
"""
Main entry point for module execution
:returns: the result form module invocation
"""
required_if = [('state', 'merged', ('config', )),
('state', 'replaced', ('config', ))]
module = AnsibleModule(argument_spec=Lldp_interfacesArgs.argument_spec,
... | Python | 1 |
"
Whitespace@5..6 " "
Assign@6..8 ":="
Whitespace@8..10 " \n"
WaitStmt@10..16
KwWait@10..14 "wait"
Whitespace@14..15 " "
NameExpr@15..16
Name@15..16
Identif... | Rust | 0 |
deserialization_functions(
self.idx_namespace,
&[],
&[],
|_, _, kv| deserialize_unique_v(kv),
|_, _, kv| deserialize_unique_v(kv),
)
}
/// returns all items that match this secondary index, always by pk Ascending
pub fn item(&self, store: ... | Rust | 0 |
ttributes,
// vec![
// attr("action", "cast_vote"),
// attr("poll_id", POLL_ID.to_string().as_str()),
// attr("amount", "1000"),
// attr("voter", TEST_VOTER),
// attr("vote_option", "yes"),
// ]
// );
//
// creator_env.block.height += D... | Rust | 0 |
in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/linux-epoll/master/COPYRIGHT.
macro_rules! compressed_error
{
($_current_label_starts_at_pointer: ident, $_maximum_for_end_of_name_pointer: ident, $_label: ident, $_start_of_name_pointer: ident, $_pointer_to_label: id... | Rust | 0 |
num_nodes = part.pop("num_nodes")
start, end = idx, idx + num_nodes
part["nodes"] = nodes[start:end]
idx += num_nodes
sig_handler = SigHandler()
launcher_procs = []
for part in partition_dicts:
job_mode = part.pop("job_mode")
proc: "Union[subprocess.Popen[b... | Python | 1 |
"""add counter
Revision ID: d7ca3e4695b8
Revises: ba582872fd6c
Create Date: 2025-09-09 22:03:05.737309
"""
from typing import Sequence, Union
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision: str = "d7ca3e4695b8"
down_revision: Union[str, None] = "ba582872fd6c"
bran... | Python | 1 |
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<playdate_display>())).setOffset as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(playdate_display),
"::",
stringify!(setOffset)
)
);
}
#[repr(C)]... | Rust | 0 |
into_tuple(&self) -> (S, S, S, S)
where
S: Copy,
{
(self.x, self.y, self.z, self.w)
}
}
impl<S: Zero + One> Vec4<S> {
pub const X: Vec4<S> = Vec4 {
x: S::ONE,
y: S::ZERO,
z: S::ZERO,
w: S::ZERO,
};
pub const Y: Vec4<S> = Vec4 {
x: S::ZERO... | Rust | 0 |
ssed to it and there is no way to do this directly with python. In those cases the following code
# # should be uncommented and edited accordingly. Otherwise completely remove all this.
# # vba_function_name = 'set_view_filter_creation_mode_lock'
# # vba_code = """
# # Public Function se... | Python | 1 |
"""
Number Guessing Game
--------------------
- Difficulty levels: Easy(1-20), Medium(1-50), Hard(1-100)
- Tracks attempts; stores best score per difficulty in a local JSON file.
"""
import json
import os
import random
from typing import Dict
SCORES_FILE = "guess_highscores.json"
def load_scores() -> Dict[str, int]... | Python | 1 |
import frappe
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
def execute():
fields = {
"Inpatient Occupancy": [
{
"fieldname": "sales_invoice_number",
"fieldtype": "Data",
"label": "Sales Invoice Number",
... | Python | 1 |
pub use brush_lang::*;
pub use contracts;
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use helixdb::Entry;
use rand::{thread_rng, Rng};
fn do_benchmark(key_size: usize, value_size: usize, c: &mut Criterion) {
let mut rng = thread_rng();
let key = (0..key_size).map(|_| rng.gen()).co... | Rust | 0 |
elf.split_mut(pred), n)
}
/// Returns an iterator over subslices separated by elements that match
/// `pred` limited to returning at most `n` items. This starts at the end of
/// the slice and works backwards. The matched element is not contained in
/// the subslices.
///
/// The last eleme... | Rust | 0 |
p() or None
notes = input("📝 Notes: ").strip() or "New contact"
db_path = "/workspaces/sugarglitch-realops/alx_trading_database.sqlite"
try:
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
cursor.execute('''
INSERT INTO trading_contacts
... | Python | 1 |
cts/details', response_class=JSONResponse)
async def api_contacts_details(request: Request):
logger.info("收到联系人详情批量请求")
# 获取客户端IP
client_ip = request.client.host
current_time = time.time()
# 检查请求频率
if client_ip in request_counters:
# 清除10秒前的请求记录
... | Python | 1 |
(83, 100),
]),
]),
paragraph(101, 108, [ str(101, 108) ]),
]
};
}
#[allow(clippy::cognitive_complexity)]
#[test]
fn comments() {
parses_to! {
parser: RstParser,
input: "\
.. This is a comment
..
This as well.
..
_so: is this!
..
[and] this!
..
this:: too!
..
|even| this:: !
.. With a... | Rust | 0 |
lds_less_than_model_panic() {
let model = Model::new(
1894808898,
"Test Model",
vec![
Field::new("Question"),
Field::new("Answer"),
Field::new("Extra"),
],
vec![Template::new("Card 1")
.qf... | Rust | 0 |
class AddPrefixStandardScalar(StandardScaler):
def get_feature_names_out(self, input_features=None):
names = super().get_feature_names_out(input_features=input_features)
return np.asarray([f"my_prefix_{name}" for name in names], dtype=object)
pipe = make_pipeline(AddPrefixStandard... | Python | 1 |
import cv2 as cv
import numpy as np
import os
def find_crowns(game_img, templates_path):
all_rectangles = []
for template_path in templates_path:
crown_template = cv.imread(template_path, cv.IMREAD_UNCHANGED)
result = cv.matchTemplate(game_img, crown_template, cv.TM_CCOEFF_NORMED)
thres... | Python | 1 |
trix::new_from(2.0, 4, 2);
let m3 = &m1 / -2.0;
let mut same = true;
for i in 0..m1.rows {
for j in 0..m1.cols {
same = same && m3.items[i][j] == -1.0;
}
}
assert!(same);
}
#[test]
fn multiply_square_matrix() {
let m1 ... | Rust | 0 |
lConverter()
field_args = field_args or {}
model_fields = ((f.attname, f) for f in model._meta.fields)
if only:
model_fields = (x for x in model_fields if x[0] in only)
elif exclude:
model_fields = (x for x in model_fields if x[0] not in exclude)
field_dict = {}
for name, model... | Python | 1 |
r.avatar.path}'}
# Получаем путь к оригинальному изображению
avatar_path = user.avatar.path
# Создаем различные размеры
sizes = {
'thumbnail': (50, 50),
'medium': (150, 150),
'large': (300, 300)
}
generated_files = []
for si... | Python | 1 |
/// chain hash
pub chain_hash: AssetId,
/// Short channel ID
pub short_channel_id: ShortChannelId,
/// Node Id 1
pub node_id_1: PublicKey,
/// Node Id 2
pub node_id_2: PublicKey,
/// Bitcoin key 1
pub bitcoin_key_1: PublicKey,
/// Bitcoin key 2
pub bitcoin_key_2: PublicK... | Rust | 0 |
onic: Mnemonic::VCVTPS2PD,
operand1: Some(Direct(ZMM30)),
operand2: Some(Direct(YMM3)),
operand3: None,
operand4: None,
lock: false,
rounding_mode: None,
merge_mode: Some(MergeMode::Zero),
sae: true,
mask: Some(M... | Rust | 0 |
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 writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See ... | Rust | 0 |
ands: [AR(A6), AR(A7)],
extra: NoExtra,
},
&[" move.w a6,a7"],
);
}
// move.b 123(a0,d0),d3
#[test]
fn test_decode_0009_move_b_123_a0_d0_d3() {
test_decoding_result_ok(
&[0x16, 0x30, 0x00, 0x7b],
Instruction {
... | Rust | 0 |
import datetime as dt
from datetime import timedelta
from pathlib import Path
import pandas as pd
from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.operators.python import PythonOperator
dag = DAG(
dag_id="07_templated_query_ds",
schedule_interval=timedelta(days=3),
sta... | Python | 1 |
e)
a, p, n = miner(embeddings, labels)
self.assertTrue(len(a) == 0)
self.assertTrue(len(p) == 0)
self.assertTrue(len(n) == 0)
@unittest.skipUnless(WITH_COLLECT_STATS, "WITH_COLLECT_STATS is false")
def test_recordable_attributes(self):
miner = TripletMarg... | Python | 1 |
E_BADVALUE: &'static id_t = &H5E_BADVALUE_g;
pub static H5E_NOTFOUND: &'static id_t = &H5E_NOTFOUND_g;
pub static H5E_EXISTS: &'static id_t = &H5E_EXISTS_g;
pub static H5E_CANTENCODE: &'static id_t = &H5E_CANTENCODE_g;
pub static H5E_CANTDECODE: &'static id_t = &H5E_CANTDECODE_g;
pub static H5E_CANT... | Rust | 0 |
}
}
/// Attempts to create a zend type for a class object type. Returns an
/// option containing the type if successful.
///
/// Returns [`None`] if the data type was a class object where the class
/// name could not be converted into a C string (i.e. contained
/// NUL-bytes).
///
/... | Rust | 0 |
atisfiability(&[]).is_err());
Ok(())
}
#[test]
fn test_power_11_gate() -> Result<(), PlonkError> {
test_power_11_gate_helper::<FqEd254>()?;
test_power_11_gate_helper::<FqEd377>()?;
test_power_11_gate_helper::<FqEd381>()?;
test_power_11_gate_helper::<Fq377>()
}
... | Rust | 0 |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : 7_PageClass_Cookie.py
@Time : 2020-8-23 01:33:25
@Author : Recluse Xu
@Version : 1.0
@Contact : 444640050@qq.com
@Desc : 页面类 Page Class
官方文档:https://miyakogi.github.io/pyppeteer/reference.html#pyppeteer.page.Page.target
Page类提供了与标签交互的... | Python | 1 |
#!/usr/bin/python3
# This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
# This code can be used to patch Compiler.test.cpp following bytecode changes, based on error output
import sys
import re
(_, filename) = sys.argv
input = sys.stdin.readlines()
error... | Python | 1 |
1 to 3 {\n $limit: $x;\n\n a {\n color: $limit;\n }\n}\n",
"a {\n color: 1;\n}\n\na {\n color: 2;\n}\n"
);
test!(
for_styles,
"a {\n @for $i from 1 to 3 {\n color: $i;\n }\n}\n",
"a {\n color: 1;\n color: 2;\n}\n"
);
test!(
scope,
"a {\n $a: red;\n @for $i from 1 to 3 {\n $a... | Rust | 0 |
# WARNING: Please don't edit this file. It was automatically generated.
from setuptools import Extension, setup
from setuptools.command.build_ext import build_ext
from winrt_sdk import get_include_dirs
class build_ext_ex(build_ext):
def build_extension(self, ext):
if self.compiler.compiler_type == "msvc"... | Python | 1 |
, "fetching s3 etag failed for: {}", key);
let res = res.unwrap();
assert!(res.is_some(), "s3 etag returned was nil for: {}", key);
assert_eq!(res.unwrap().e_tag, key_hash_pair.1, "invalid hash: {}", key);
}
}
#[test]
fn test_sync_down_default() {
let s3client = crate::get_s3client();
... | Rust | 0 |
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from sqlframe.base.column import Column
from typing_extensions import Self
from narwhals._spark_like.expr import SparkLikeExpr
class SparkLikeExprDateTimeNamespace:
def __init__(self: Self, expr: SparkLikeExpr) ->... | Python | 1 |
import_dlc = False
if import_dlc:
for dlc in dlcs:
args.app_name = dlc.app_name
self.import_game(args)
logger.info(f'{"DLC" if game.is_dlc else "Game"} "{game.app_title}" has been imported.')
return
... | Python | 1 |
/// Fully justified.
Justified,
}
impl HorizontalAlignment {
/// Calculate offset from the left side and whitespace information.
pub(crate) fn place_line(
self,
renderer: &impl TextRenderer,
measurement: LineMeasurement,
) -> (u32, SpaceConfig) {
match self {
... | Rust | 0 |
,
AccountMeta::new(repay_reserve_pubkey, false),
AccountMeta::new(obligation_pubkey, false),
AccountMeta::new_readonly(lending_market_pubkey, false),
AccountMeta::new_readonly(user_transfer_authority_pubkey, true),
AccountMeta::new_readonly(sysvar::clock::id()... | Rust | 0 |
"""
Exceptions package containing custom exception classes.
"""
| Python | 1 |
4588098, &tags::CornealTopographyMapQualityEvaluation),
(2658610, &tags::FrameVOILUTSequence),
(805962172, &tags::SetupDeviceParameter),
(2233944, &tags::SurfaceMeshZPixelOffset),
(805962002, &tags::ControlPointIndex),
(1576995, &tags::DigitalImageFormatAcquired),
(471885... | Rust | 0 |
ForSends::AwsTraceHeader,
other => MessageSystemAttributeNameForSends::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MessageSystemAttributeNameForSends {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MessageS... | Rust | 0 |
# Choses the choice that beats the choice that has been played the least by the other player.
import random
def generate_choice(plays, answer):
if plays:
opponents_plays = [value[-1] for value in plays.values()]
rocks = 0
papers = 0
scissors = 0
for play in opponents_play... | Python | 1 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 23 15:37:35 2024
@author: manupc
"""
import sys
import pathlib
current_folder= str(pathlib.Path(__file__).parent.resolve())+'/'
sys.path.insert(1, current_folder+'../../common/')
data_folder= current_folder+'../../data/'
import numpy as np
impor... | Python | 1 |
// me
Tld::Cyrillic, // mk
Tld::Cyrillic, // mn
Tld::TraditionalSimplified, // mo
Tld::Arabic, // mr
Tld::Generic, // ms
Tld::WesternArabic, // my
Tld::Generic, // nu
Tld::Arabic, // om
Tld::A... | Rust | 0 |
()), // UTF-8
}
}
}
#[cfg(not(feature = "query_encoding"))]
#[derive(Copy, Clone)]
pub struct EncodingOverride;
#[cfg(not(feature = "query_encoding"))]
impl EncodingOverride {
pub fn utf8() -> EncodingOverride {
EncodingOverride
}
pub fn lookup(_label: &[u8]) -> Option<EncodingOverr... | Rust | 0 |
ecies_moles = 'H2:1.0, OH:4.0'
assert mix.element_moles('H') == approx(6)
assert mix.element_moles('O') == approx(4)
assert mix.element_moles('N') == approx(0)
def test_chemical_potentials(self, mix, phase1, phase2):
C = mix.chemical_potentials
C1 = phase1.chemical_potentia... | Python | 1 |
c_trait;
use libra_logger::prelude::*;
use std::{
collections::{HashMap, HashSet},
path::PathBuf,
sync::Arc,
time::Instant,
};
use structopt::StructOpt;
use tokio::{
fs::{create_dir_all, read_dir, remove_file, OpenOptions},
io::{AsyncRead, AsyncReadExt},
stream::StreamExt,
};
#[derive(Struc... | Rust | 0 |
influxdb_iox")
.unwrap()
.arg("sql")
.arg("--host")
.arg(addr)
// help should not be run as it is after the exit command
.write_stdin("exit;\nhelp;")
.assert()
.success()
.stdout(predicate::str::contains("# Basic IOx SQL Primer").not());
}
#[tokio... | Rust | 0 |
").parse()?;
let sound = split.next().map(str::parse).transpose()?.unwrap_or(0);
let kind = if kind & Self::CIRCLE_FLAG > 0 {
$self.n_circles += 1;
HitObjectKind::Circle
} else if kind & Self::SLIDER_FLAG > 0 {
$self.n_sliders += 1;
... | Rust | 0 |
UNKNOWN_INVARIANT_VIOLATION_ERROR,
))
}
Some(Err(e)) => return Err(e),
Some(Ok(v)) => v,
}
}};
}
mod connection;
mod mssql;
mod mysql;
mod postgresql;
mod sqlite;
mod transaction;
pub(crate) mod operations;
use async_trait::async_trait;
use connector_int... | Rust | 0 |
merge_mode: None,
sae: false,
mask: None,
broadcast: None,
},
&[102, 15, 26, 219],
OperandSize::Qword,
)
}
#[test]
fn bndmov_4() {
run_test(
&Instruction {
mnemonic: Mnemonic::BNDMOV,
operand1: Some(Direct(B... | Rust | 0 |
0x0010..0x0110
#[inline(always)]
pub fn encode_lrg_l(literal_len: u32) -> u32 {
debug_assert!(0x000F < literal_len);
debug_assert!(literal_len < 0x0110);
let mut opu = 0;
opu.set_bits(0, 8, 0xE0);
opu.set_bits(8, 8, literal_len - 0x10);
opu
}
#[allow(clippy::clippy::let_and_return)]
#[inline(a... | Rust | 0 |
offset: 0,
}
}
pub fn of(index: usize) -> Page {
Page {
limit: 10,
offset: 10 * (index - 1),
}
}
pub fn from(limit: u32, offset: u32) -> Self {
Page {
limit: limit.try_into().unwrap(),
offset: offset.try_into().u... | Rust | 0 |
def f(row):
return (row.count('1'), row.count('0')) | Python | 1 |
xture, Vec2};
use tetra::input::{self, Key};
use tetra::Context;
use crate::common::{center_play_area, center_screen};
use crate::consts::{BRICK_SIZE, DEMO_LEVEL, INFO_WIDTH, NUM_STATES, PLATE_REPLAY_COMPLETED, WIDTH};
use crate::field::{GameField, GameState};
use crate::loader::Loader;
use crate::replay::{Action, Rep... | Rust | 0 |
import json
import os
import threading
import requests
from dotenv import load_dotenv
from mnemonic import Mnemonic
from web3 import Web3
load_dotenv()
WEB3_PROVIDER_ENDPOINT = os.getenv("WEB3_PROVIDER_ENDPOINT")
if WEB3_PROVIDER_ENDPOINT:
print(f"Using WEB3_PROVIDER_ENDPOINT in .env! ({WEB3_PROVIDER_ENDPOINT[:1... | Python | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.