text string | label_name string | labels int64 |
|---|---|---|
GenericResourceDescriptorKind> {
alt((p_kind_indices, p_kind_sum))(input)
}
fn p_resource_definition(input: &str) -> NomResult<GenericResourceDescriptor> {
let parser = separated_pair(
alphanumeric1,
tuple((multispace0, char('='), multispace0)),
p_resource_kind,
);
map(parser, |... | Rust | 0 |
# 状态发生变化
Screen_Error = 0
Read_M_SFR_Data(256) # 读取u8在0x0100之后的128字节
Print_MSN_Data() # 解析字节中的数据格式
Read_MSN_Data(b'MSN_Status')
UID = Read_MSN_Data(b'MSN_UID')
# 获取按键状态
# LCD_State(1)#配置显示方向
ADC_det = Read_ADC_CH(9)
... | Python | 1 |
&valset1[1].get_public_key().unwrap(),
&sign_bytes,
block_vote.signature.as_ref().unwrap()
));
}
}
<filename>src/storage/indexing.rs
use std::collections::HashSet;
use std::sync::Arc;
use chrono::Utc;
use protobuf::{Message, RepeatedField};
use sled::{Batch, Db};
use crate::e... | Rust | 0 |
.await
.map_err(|e| Report(task_id.task().to_string(), e))?;
//runner
let task_assess = chord_flow::TaskRunner::new(
case_store,
assess_reporter,
app_ctx,
Arc::new(flow),
task_id.clone(),
)
.run()
.await;
Ok(task_assess)
}
struct JobTas... | Rust | 0 |
# Copyright 2016 Google Inc.
#
# 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 writing, ... | Python | 1 |
"""Test the default_config init."""
from unittest.mock import patch
import pytest
from homeassistant import bootstrap
from homeassistant.core import HomeAssistant
from homeassistant.helpers import recorder as recorder_helper
from homeassistant.setup import async_setup_component
@pytest.fixture(autouse=True, name="s... | Python | 1 |
# Create your views here.
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from polls.models import Choice, Poll
from django.views import generic
from django.utils import timezone
class IndexView(generic.ListView):
temp... | Python | 1 |
f32;
let top_right_x = source_rectangle.right() / texture.width() as f32;
let top_right_y = source_rectangle.top() / texture.height() as f32;
let bottom_left_x = source_rectangle.left() / texture.width() as f32;
let bottom_left_y = source_rectangle.bottom() / texture.he... | Rust | 0 |
credential_exchange_id")]
pub credential_exchange_id: String,
#[serde(rename = "credential_offer")]
pub credential_offer: Value,
#[serde(rename = "credential_offer_dict")]
pub credential_offer_dict: Value,
#[serde(rename = "credential_proposal_dict")]
pub credential_proposal_dict: Value,
... | Rust | 0 |
at 'Answer: $LETTER' (without quotes) where LETTER is one of ABCD."
elif row['qtype'] == 'yes/no':
user_prompt2 = f"Based on the question ({row['question']}) and reasoning provided in the output, conclude the final answer in the format 'Answer: Yes' or 'Answer: No' (without quotes)."
else:
user_... | Python | 1 |
shold (x * par)
PAR_THRESHOLD = 1.1
# Thresholds for critical call timing (ms)
PAR_STEEMD = {
'get_dynamic_global_properties': 20,
'get_block': 50,
'get_blocks_batch': 5,
'get_content': 4,
'get_order_book': 20,
'get_feed_history': 20,
'lookup_accounts... | Python | 1 |
ipe(handle.as_raw(), ov.alias_mut().deref_mut());
// we should always get FALSE with async IO
assert!(ok == winapi::shared::minwindef::FALSE);
let result = match GetLastError() {
// did we successfully connect? (it's reported as an error [ok==false])
... | Rust | 0 |
# app.py
from flask import Flask, request, jsonify
from flask_cors import CORS
import os
import sys
import subprocess
import uuid
import shutil
from datetime import datetime
from flask import Flask, request, jsonify, send_file
import json
import whisper
import re
import numpy as np
import base64
from models import db... | Python | 1 |
)).expect("failed to deserialize")
)
{
Err(ClaimsVerificationError::SignatureVerification(
SignatureVerificationError::CryptoError(_),
)) => {}
other => panic!("unexpected result: {:?}", other),
}
// No public keys
... | Rust | 0 |
mut *mut _) };
if winerror::SUCCEEDED(hr) {
Ok(unsafe { ComPtr::from_raw(factory as *mut _) })
} else {
Err(hr)
}
}
pub(crate) fn get_dxgi_factory(
) -> Result<(ComPtr<dxgi::IDXGIFactory>, DxgiVersion), winerror::HRESULT> {
// TODO: do we even need `create_dxgi_factory2`?
if let Ok... | Rust | 0 |
import chemprop
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.offsetbox import AnchoredText
from sklearn.metrics import mean_absolute_error, mean_squared_error
def plot_parity(y_true, y_pred, y_pred_unc=None, savepath=''):
axmin = min(min(y_true), min(y_pred)) - 0.1*(max(y_true)-min(y_true))... | Python | 1 |
from rdkit import Chem
from rdkit.Chem import AllChem
def is_aminonaphthalenesulfonic_acid(smiles: str):
"""
Determines if a molecule is an aminonaphthalenesulfonic acid, defined as
a naphthalenesulfonic acid having at least one amino substituent.
Args:
smiles (str): SMILES string of the molec... | Python | 1 |
placeholder[n, ic_outer, oh + kh, ow + kw, ic_f_inner * 4 + ic_s_inner],
"int32",
) * T.cast(
placeholder_1[oc_chunk, ic_outer, kh, kw, ic_f_inner, oc_block, ic_s_inner],
"int32",
)
@tvm.script.ir_module
class Conv2... | Python | 1 |
r.position() / 8,
buf.len()
);
}
Ok(SpliceDescriptor::DTMFDescriptor {
preroll,
dtmf_chars,
})
}
fn parse(buf: &[u8]) -> Result<SpliceDescriptor, SpliceDescriptorErr> {
if buf.len() < 6 {
return Err(SpliceDescriptor... | Rust | 0 |
String {
get_output("uname", &["-r"]).unwrap_or_else(|_| "linux".to_owned())
}
<filename>crate/src/store/mod.rs
mod coingecko;
pub use coingecko::{RequestCoingecko, TokenInfo, TokenInfoStore};
extern crate pest;
#[macro_use]
extern crate pest_derive;
mod error;
pub use error::*;
mod parse;
pub use parse::*;
#[c... | Rust | 0 |
ngs](crate::heatmap::GnuplotSettings)
/// ## Example
/// ```
/// use rand_pcg::Pcg64;
/// use rand::{SeedableRng, distributions::*};
/// use sampling::*;
/// use std::fs::File;
/// use std::io::BufWriter;
///
/// // first randomly create a heatmap
/// let h_x = HistUsizeFast::ne... | Rust | 0 |
}
estimated_scores.push((xx,yy,psc));
}
}
tx.send(estimated_scores)
});
}
let mut estimated_scores:Vec<Vec<f32>> = vec![vec![0.0_f32;t_length];q_length];
for _ in 0..num_threads... | Rust | 0 |
"service2"];
//! // fetch a jwt token for the default identity with the target audience
//! let jwt_token = client.fetch_jwt_token(target_audience, None)?;
//!
//! // fetch the jwt token for the default identity and parses it as a `JwtSvid`
//! let jwt_svid = client.fetch_jwt_svid(target_audience, None)?;
//!
//! // f... | Rust | 0 |
t edp1_var_names = vec!["Delta Vol Max".to_string(), "pump rpm".to_string()];
let mut edp1_history = History::new(edp1_var_names);
let mut edp1 = engine_driven_pump();
let mut edp1_controller = TestPumpController::commanding_pressurise();
let mut green_loop = hydraulic_loop("GREEN");
let green_loo... | Rust | 0 |
GEOSWKTWriter,
trim: c_char,
);
pub fn GEOSWKTWriter_setOld3D_r(
handle: GEOSContextHandle_t,
writer: *mut GEOSWKTWriter,
useOld3D: c_int,
);
pub fn GEOSWKBReader_create_r(
handle: GEOSContextHandle_t,
) -> *mut GEOSWKBReader;
pub fn GEOSWKBReader_destro... | Rust | 0 |
nvRec.CreateGlobalVarBinding(vn, false).
let is_closed_over = self.base.name_tracker.is_closed_over_def(n);
data.base
.bindings
.push(BindingName::new(*n, is_closed_over))
}
// Step 17. For each Parse Node f in functionsToInitialize, do
fo... | Rust | 0 |
An, As, Cn, Dn]),
}
}
/// Find which [PitchGroups](musictheory::types::PitchGroup) a given set of provided
/// [Note](musictheory::types::Note) belong to.
#[instrument]
pub fn find(notes: &[Note]) -> Result<Vec<PitchGroup>, &'static str> {
debug!("Notes: {:?}", ¬es);
l... | Rust | 0 |
round(obj / 137.036, 10) if obj != 0 else 0
abs(obj - 137.036); (obj + 137.036) / 2
obj ** (1/3) if obj > 0 else 0 # Cube root
pow(obj, 1/137.036) if obj > 0 and abs(obj) < 100 else 0
elif isinstance(obj, str... | Python | 1 |
t::TSTMap;
///
/// let mut m = TSTMap::new();
/// m.insert("first", 13);
/// assert_eq!(Some(&13), m.get("first"));
/// assert_eq!(None, m.get("second"));
/// ```
pub fn get(&self, key: &str) -> Option<&Value> {
match traverse::search(self.root.as_ref(), key) {
None => No... | Rust | 0 |
` of the full-node (prior mining it).
#[must_use]
#[no_mangle]
pub unsafe extern "C" fn svm_transaction_build(
raw_tx: *mut *mut svm_transaction_t,
raw_bytes: *const c_void,
raw_bytes_len: u64,
) -> wasmer_result_t {
let bytes: &[u8] =
... | Rust | 0 |
i).\n\nFor information about avaliable fields see [pio0_22](pio0_22) module"]
pub type PIO0_22 = crate::Reg<u32, _PIO0_22>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _PIO0_22;
#[doc = "`read()` method returns [pio0_22::R](pio0_22::R) reader structure"]
impl crate::Readable for PIO0_22 {}
#[doc = "`write(|w| ..)`... | Rust | 0 |
import streamlit as st
import requests
import yaml
config = yaml.safe_load(open("./config.yaml"))
API_URL = config["rag_api_endpoint"] + "chat-response"
API_KEY = config["api_key"]
def display_response(raw_text: str):
# Decode escaped characters like \n and \"
decoded_text = raw_text.encode().decode("unicod... | Python | 1 |
ed())
} else {
None
}
}
}
#[cfg(windows)]
use std::os::windows::ffi::{OsStrExt as _OsStrExt, OsStringExt};
#[cfg(windows)]
impl OsStrExt for OsStr {
fn starts_with(&self, s: &str) -> bool {
// Attempt to interpret this OsStr as utf-16. This is a pretty "poor
// man'... | Rust | 0 |
shader, etc
}
unsafe extern "C" fn set_anim_shader(env: *mut JNIEnv, _: jobject, data: jpointer, shader: jint) {
let data = get_safe_data(data);
let shader = try_or_throw!(env, RUNTIME_EXCEPTION, data.events.use_animshader(mem::transmute(shader)));
data.glinit.set_anim_shader(shader);
}
unsafe extern "C... | Rust | 0 |
ps://hf-mirror.com'
api_ = HfApi(token=TOKEN)
try:
df_info = api_.model_info(repo_id=model_name, token=TOKEN, timeout=3)
except Exception as e:
print(e)
return 0, 0
df_files = [i.rfilename for i in df_info.siblings]
exec_ = ThreadPoolExecutor(max_workers=2)
tasks = [exec_... | Python | 1 |
# Copyright 2016 The Gemmlowp Authors. 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 applicable... | Python | 1 |
(mysql_mariadb, "mysql"),
(postgres9, "postgresql"),
(postgres10, "postgresql"),
(postgres11, "postgresql"),
(postgres12, "postgresql"),
(postgres13, "postgresql"),
(sqlite, "sqlite"),
);
impl TestApiArgs {
pub fn datasource_block(&self, url: &str) -> String {
format!(
... | Rust | 0 |
rams, tokenizer, model_config)
raise ValueError(
f"Unknown guided decoding backend '{guided_params.backend}'. "
"Must be one of 'outlines, 'lm-format-enforcer', 'xgrammar'")
def get_local_guided_decoding_logits_processor(
guided_params: GuidedDecodingParams, tokenizer: PreTrainedTokenizer... | Python | 1 |
if "default_" not in cross_replace_steps:
cross_replace_steps["default_"] = (0.0, 1.0)
alpha_time_words = paddle.zeros([num_steps + 1, len(prompts) - 1, max_num_words])
for i in range(len(prompts) - 1):
alpha_time_words = update_alpha_time_word(alpha_time_words, cross_replace_steps["default_"], ... | Python | 1 |
;
let other_identity_pubkey = PublicKey::new(array_ref![response, 0, 32].to_vec());
let other_ephemeral_pubkey = PublicKey::new(array_ref![response, 32, 32].to_vec());
let signed_prekey = self.signed_prekey.as_ref().ok_or(X3DHError::InvalidState)?;
let o... | Rust | 0 |
));
assert_eq!(read_lines("Duck\nDog\nCow\n"), res);
assert_eq!(read_lines("Duck\nDog\nCow"), res);
}
<reponame>Librazy/redbpf
// Copyright 2019 Authors of Red Sift
//
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or... | Rust | 0 |
nto(),
//! name: "Mr.Flea".into(),
//! };
//!
//! // Convert into a `JsonApiDocument`
//! let doc = example_flea.to_jsonapi_document();
//! assert!(doc.is_valid());
//!
//! // Convert into a `Resource`
//! let resource = example_flea.to_jsonapi_resource();
//! ```
//!
//! ### Deserializing a JSON:API Document
//!
/... | Rust | 0 |
from django.urls import path
from . import views
urlpatterns = [
path('<slug:slug>/', views.view_post, name='view_post'),
path('create/', views.create_post, name='create_post'),
path('edit/<int:id>', views.edit_post, name='edit_post'),
path('delete/<int:id>', views.delete_post, name='delete_post'),
] | Python | 1 |
re o uguale al valore specificato\n (ad esempio, 10MB, 1GB ...)',
'fr': 'Limitez la recherche aux fichiers ayant\nune taille inférieure ou égale à la valeur spécifiée\n (par exemple, 10MB, 1GB ...)',
},
'TOOLTIP_MIN_IMAGE': {
'en': 'Limit the search pool to images with\nboth dime... | Python | 1 |
ut offsets = Vec::with_capacity(oids.len());
let mut crcs = Vec::with_capacity(oids.len());
for _ in 0..oids.len() {
offsets.push(Arbitrary::arbitrary(g));
crcs.push(Arbitrary::arbitrary(g));
}
let fanout = Self::build_fanout(&oids);
Self { oids, fanout, c... | Rust | 0 |
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<siginfo_t>()))._sifields as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(siginfo_t),
"::",
stringify!(_sifields)
)
);
}
impl Default for siginfo_t {
fn def... | Rust | 0 |
ccount=studio._studio.cluster_id,
machine=machine or studio._studio_api.get_machine(studio._studio.id, studio._teamspace.id),
interruptible=interruptible,
)
has_printed = False
while True:
curr_job = studio._studio_api._client.lightningapp_instance_service_get_lightningapp_instance... | Python | 1 |
pe _bindgen_ty_13 = ::std::os::raw::c_int;
pub const MONO_EXP_TYPE_FLAGS: ::std::os::raw::c_int = 0;
pub const MONO_EXP_TYPE_TYPEDEF: ::std::os::raw::c_int = 1;
pub const MONO_EXP_TYPE_NAME: ::std::os::raw::c_int = 2;
pub const MONO_EXP_TYPE_NAMESPACE: ::std::os::raw::c_int = 3;
pub const MONO_EXP_TYPE_IMPLEMENTATION: ... | Rust | 0 |
#!/usr/bin/env python
import sys
sys.path.append(".")
from ZhConversion import *
from valid_hanzi import *
def convert(s, d, n):
out = u""
end = len(s)
begin = 0
while begin < end:
for i in range(min(n, end - begin), 0, -1):
t = s[begin:begin+i]
t = d.get(t, t if i == 1... | Python | 1 |
= st.text_input("Purchase Order#", placeholder="e.g. 12345")
status_po = st.selectbox("Status *", [" ", "COMPLETE", "READY", "CANCELLED", "IN TRANSIT"])
encargado_po = st.selectbox("Encargado *", [" ", "Andres", "Tito", "Luz", "David", "Marcela", "John", "Carolina", "Thea", "Juan"])
... | Python | 1 |
index: usize = 0;
for _i in 0..iters {
if line_index >= lines.len() {
line_index = 0;
}
let input = lines[line_index].clone();
let encoding = tokenizer.encode(input).unwrap();
encoding.get_tokens();
}
alert("Bench batch !");
let mut batch_index: usize = 0;
for _i in 0..iters {
if... | Rust | 0 |
align-items: center;
justify-content: space-between;
min-height: 180px;
width: 100vw;
position: relative;
left: 50%;
right: 50%;
margin-left: -50vw;
margin-right: -50vw;">
<div sty... | Python | 1 |
nitializer = kernel_initializer,
)
channel_axis = -1 if backend_channels_last() else 1
def f(inp):
x = conv_layer(n_filter, kernel_size, strides=pool, **conv_kwargs)(inp)
if batch_norm:
x = BatchNormalization(axis=channel_axis)(x)
x = Activation(activation)(x)
f... | Python | 1 |
x::new(EloMMR::default())),
"mmr-fast" => Ok(Box::new(EloMMR::default_fast())),
"mmr-simple" => Ok(Box::new(SimpleEloMMR::default())),
name => Err(format!(
"{} is not a valid rating system. Must be one of: bar, glicko, cfsys, tcsys, trueskill, mmx, mmx-fast, mmr, mmr-fast, mmr-simple... | Rust | 0 |
fn invariants(&self, model: &TypedModel, node: &TypedNode) -> TractResult<Invariants> {
Ok(Invariants::default())
}
/// Fuse op after codegen to deal with local optimisations.
fn fuse(&self, _model: &TypedModel, _node: &TypedNode) -> TractResult<Option<TypedModelPatch>> {
Ok(None)
}
... | Rust | 0 |
_fee = (coin_token_amount_in as f64 * (1.0 - RAYDIUM_FEE)) as u64;
let estimated_pc_amount = math::checked_as_u64(
pc_balance as f64 * amount_in_no_fee as f64
/ (coin_balance as f64 + amount_in_no_fee as f64),
)?;
Ok((
coin_token_amount_in,
if ... | Rust | 0 |
# Copyright (c) "Neo4j"
# Neo4j Sweden AB [https://neo4j.com]
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | Python | 1 |
if let Some(s) = previous_status {
if current_status.is_disconnected != s.is_disconnected { // Reached if current is_disconnected is true & the previous status is not
let msg = format!("Client {} using endpoint {} has disconnected", friendly_name, data.e... | Rust | 0 |
# Copyright (c) 2022 PaddlePaddle Authors. 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 appli... | Python | 1 |
e.I)
if matches:
found_apis.extend(matches)
analysis['analysis']['api_endpoints_found'] = found_apis
analysis['analysis']['api_count'] = len(found_apis)
# Look for JavaScript variables with data
js_vars = []
js_patterns = [
r'window\._sha... | Python | 1 |
완료
if ui_callback:
ui_callback("stage_update", {
"stage": "search_complete",
"message": f"✅ 검색 완료: {len(search_results.get('citations', []))}개 결과",
"search_results": search_results
})
... | Python | 1 |
Assuming likes field represents visits
# Fetch 100 tokens for sending visits
tokens = asyncio.run(fetch_all_tokens())
if not tokens or len(tokens) < 100:
raise Exception(f"Failed to fetch 100 tokens, got {len(tokens) if tokens else 0}.")
# Send 1000 visi... | Python | 1 |
import re
print('Введи інформацію про себе.')
# В цей список поміщується інформація про особу
personal_info = []
# Запити про особу
prompts = ['Імʼя: ',
'Прізвище: ',
'Ким працюєш: ',
'Твій нік в Інстаграм: ',
'Вік: ',
'Зріст: ',
'Вага: ',
... | Python | 1 |
dditionOperator;
/// use fluxcore::semantic::walk::{Node, Visitor};
/// use fluxcore::semantic::nodes::*;
///
/// struct RepeatedPlusChecker {
/// // A stack.
/// plus: Vec<bool>,
/// err: String,
/// }
///
/// impl RepeatedPlusChecker {
/// fn new() -> RepeatedPlusChecker {
/// RepeatedPlusChec... | Rust | 0 |
# -*- coding: utf-8 -*-
import locale
import pandas as pd
import sys
import json
import numpy as np
import funciones as Fu
import warnings
warnings.filterwarnings('ignore')
file_optimo = '/var/www/habitat/data/optimo_provida.json'
file_instrumentos = '/var/www/habitat/comparador/funciones/instrumentos.json'
if __n... | Python | 1 |
Cow::Borrowed(s) => {
assert_eq!(s, "\u{20AC}\u{00E4}");
}
Cow::Owned(_) => unreachable!(),
}
assert!(!had_errors);
}
#[test]
fn test_decode_bomful_valid_utf8_as_windows_1257_to_cow_with_bom_removal() {
let (cow, had_errors) =
WIND... | Rust | 0 |
(crate) loaded_rom: Option<Rom>,
pub(crate) print_fn: Option<fn(&str) -> ()>,
pub(crate) debug_print_fn: Option<fn(&str) -> ()>,
pub(crate) executed_instructions_count: u64,
persistent_input_bitmask: u16,
}
impl GBA {
pub(crate) fn new(
log_level: LogLevel,
bios_file: core::option::Option<&[u8]>,
... | Rust | 0 |
m .ast_less_than_operator_node_left import AstLessThanOperatorNodeLeft # noqa: E402, F401, I001
from .ast_less_than_operator_node_right import AstLessThanOperatorNodeRight # noqa: E402, F401, I001
from .ast_less_than_or_equals_operator_node_right import AstLessThanOrEqualsOperatorNodeRight # noqa: E402, F401, I001
f... | Python | 1 |
elf) {
self.tx_shutdown.send(()).unwrap();
}
}
pub fn new_test_exporter() -> (TestSpanExporter, Receiver<exporter::SpanData>, Receiver<()>) {
let (tx_export, rx_export) = channel();
let (tx_shutdown, rx_shutdown) = channel();
let exporter = TestSpanExporter {
tx_export,
tx_shutd... | Rust | 0 |
SecondNum
ax2.scatter(xtick[start:end:], cutPoint[start:end:],
label=label[1],color=arrowCol[1],
s=500
)
ax2.vlines(x=end+0.5, ymin=-1.5, ymax=1.5,
color='k',
linestyles='--')
# -----
... | Python | 1 |
fn add_default_trait_if_needed(predicate: &mut syn::WherePredicate, generic_ident: &syn::Ident) {
if let syn::WherePredicate::Type(pt) = predicate {
if let syn::Type::Path(tp) = pt.bounded_ty.clone() {
if tp.path.is_ident(generic_ident) {
let default_type: syn::TraitBound = syn:... | Rust | 0 |
ndroid.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.google.android.apps.nexuslauncher/.NexusLauncherActivity (has extras)} from uid 10092")
}
#[test]
fn regex_pid_start_5_1_brief() {
let str_log: &str = "I/ActivityManager( 2045): Start proc 10212:com.google.android.g... | Rust | 0 |
/// Output
pub output: OutputV4,
/// Kernel
pub kernel: TxKernelV4,
/// Key Id
pub key_id: Option<Identifier>,
}
// V3 to V4 For Slate
impl From<SlateV3> for SlateV4 {
fn from(slate: SlateV3) -> SlateV4 {
let SlateV3 {
version_info,
num_participants,
id,
tx,
amount,
token_type,
fee,
hei... | Rust | 0 |
[test]
fn author_vrf_output_for_primary() {
let (pairs, mut ext) = new_test_ext_with_pairs(1);
ext.execute_with(|| {
let genesis_slot = 10;
let (vrf_output, vrf_proof, vrf_randomness) = make_vrf_output(genesis_slot, &pairs[0]);
let primary_pre_digest = make_pre_digest(0, genesis_slot, vrf_output, vrf_proof);
... | Rust | 0 |
let num = result.try_convert_to::<Fixnum>().unwrap().to_i64();
/// assert_eq!(num, 16);
/// }
/// ```
///
/// Ruby:
///
/// ```ruby
/// class Calculator
/// def calculate(a)
/// if block_given?
/// yield a
/// else
/// raise LocalJumpError, "... | Rust | 0 |
) ).await;
});
let child2 = task::spawn(
unsafe_run_session
( cont, ctx3, sender1
));
join!(child1, child2).await;
})
}
use super::*;
use super::types::*;
pub fn find_nearest_recursive<'a, T: Copy>(node: &'a Node<T>, axis: Axis, point: Point) -> Option<Nearest<'a, T... | Rust | 0 |
wrap();
}
if let Some(thing) = matches.opt_str("y") {
y = thing.parse().unwrap();
}
// As an example, we build an Ising model
let graph = make_ising_model(x, y);
// println!("Graph: {:#?}", graph);
//
// println!("Spanning tree: {:#?}", graph.make_spanning_tree("(0,0)"));
let mu... | Rust | 0 |
let file_stem = path
.file_stem()
.map(|os_str| os_str.to_string_lossy())
.unwrap_or_default();
return file_stem.to_string();
}
}
return module.to_string();
}
"...".to_string()
}
fn make_ascii_... | Rust | 0 |
//
#[cfg(any(target_os = "macos", target_os = "freebsd"))]
pub type stat64 = stat;
#[cfg(any(target_os = "macos", target_os = "freebsd"))]
pub unsafe fn lstat64(path: *const c_char, stat: *mut stat64) -> c_int {
lstat(path, stat)
}
#[cfg(any(target_os = "macos", target_os = "freeb... | Rust | 0 |
gger,
error_classification_service=error_classification_service,
request=request,
correlation_id=correlation_id,
context_info=context_info
)
except Exception as e:
# Log unexpected errors and return generic success to prevent information leakage
... | Python | 1 |
#! usr/bin/python3.9
"""
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-09-25 14:34:21.593357
.. warning::
The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only.
They are there as a guide as to how the visual basic / catscript function... | Python | 1 |
ity_dict, [prov, k], prov_result)
if len(prov_result) != 0:
df = pd.DataFrame(prov_result)
df.columns = ["prov", "city", "district", "price", "unit"]
df.to_csv("data/prov_new_house_result.csv", encoding="gbk", index=False, header=header,
... | Python | 1 |
_base_ = [
'../../../_base_/datasets/fine_tune_based/few_shot_voc.py',
'../../../_base_/schedules/schedule.py', '../../tfa_r101_fpn.py',
'../../../_base_/default_runtime.py'
]
# classes splits are predefined in FewShotVOCDataset
# FewShotVOCDefaultDataset predefine ann_cfg for model reproducibility.
data = ... | Python | 1 |
EventType::Eos => ffi::GST_EVENT_EOS,
EventType::Toc => ffi::GST_EVENT_TOC,
EventType::Protection => ffi::GST_EVENT_PROTECTION,
EventType::SegmentDone => ffi::GST_EVENT_SEGMENT_DONE,
EventType::Gap => ffi::GST_EVENT_GAP,
EventType::Qos => ffi::GST_E... | Rust | 0 |
ywords.QuantityType.POSITION_PERCENT, decimal.Decimal("-0.11"))
assert script_keywords.parse_quantity("-0.11p") == (
script_keywords.QuantityType.POSITION_PERCENT_ALIAS, decimal.Decimal("-0.11"))
assert script_keywords.parse_quantity("%p-0.11") == (
script_keywords.QuantityType.POSITION_PERCENT,... | Python | 1 |
# DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/python/mod.rs
# Based on "crates/store/re_types/definitions/rerun/components/depth_meter.fbs".
# You can extend this class by creating a "DepthMeterExt" class in "depth_meter_ext.py".
from __future__ import annotations
from .. i... | Python | 1 |
values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values
pub mod RW {
/// 0b0: ECB
pub const CTRL_AES_MODE_R0_0: u32 = 0b0;
/// 0b1: CTR
pub const CTRL_AES_MODE_R0_1: u32 = 0b1;
}
}
... | Rust | 0 |
import numpy as np
import random
def HSVtoRGB( h, s, v ):
"""
from irtk/packages/rview/src/irtkColor.cc
"""
if s == 0:
if h < 0:
r = int(255.0*v)
g = int(255.0*v);
b = int(255.0*v);
else:
raise ValueError( "irtkColor::HSV: Undefined HSV co... | Python | 1 |
0x6C => LD8(L, H),
0x6D => LD8(L, L),
0x6E => LD8(L, Memory(Box::new(HL), 0)),
0x70 => LD8(Memory(Box::new(HL), 0), B),
0x71 => LD8(Memory(Box::new(HL), 0), C),
0x72 => LD8(Memory(Box::new(HL), 0), D),
0x73 => LD8(Memory(Box::new(HL), 0)... | Rust | 0 |
)?,
data: response.into_body(),
date,
content_range,
})
}
}
use std::fmt::Debug;
use amethyst::{assets::{AssetStorage, Loader, Handle}, core::transform::Transform, ecs::{Component, DenseVecStorage}, input::{get_key, is_close_requested, is_key_down, VirtualKeyCode}, prelu... | Rust | 0 |
'vun': 'Tuvalu', 'wae': 'Tuvalu', 'wo': 'Tuwalo', 'xh': 'ETuvalu', 'xnr': 'तुवालू', 'xog': 'Tuvalu', 'yav': 'tufalú', 'yi': 'טואוואַלו', 'yo': 'Tufalu', 'yrl': 'Tuwaru', 'yue': '吐瓦魯', 'yue-Hans': '吐瓦鲁', 'yue-Hant': '吐瓦魯', 'zgh': 'ⵜⵓⴼⴰⵍⵓ', 'zh': '图瓦卢', 'zh-Hans': '图瓦卢', 'zh-Hant': '吐瓦魯', 'zu': 'i-Tuvalu'},
'TW': {'a... | Python | 1 |
}
};
}
wrapping_cast!(u8 => i8 );
wrapping_cast!(u16 => i16 );
wrapping_cast!(u32 => i32 );
wrapping_cast!(u64 => i64 );
wrapping_cast!(u128 => i128 );
wrapping_cast!(usize => isize);
wrapping_cast!(i8 => u8 );
wrapping_cast!(i16 => u16 );
wrapping_cast!(i32 => u32 );
wrapping_cas... | Rust | 0 |
field_base_type = &field.field_base_type;
let error_field = format!("{}Key::{}", &parsed_struct.struct_name, field_name);
match &field.kind {
FieldKind::Regular(ref regular_attrs) => {
if !regular_attrs.key {
continue;
}
... | Rust | 0 |
1 = 1,
}
impl From<LPI2C4_IPG_DOZE_A> for bool {
#[inline(always)]
fn from(variant: LPI2C4_IPG_DOZE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Reader of field `LPI2C4_IPG_DOZE`"]
pub type LPI2C4_IPG_DOZE_R = crate::R<bool, LPI2C4_IPG_DOZE_A>;
impl LPI2C4_IPG_DOZE_R {
#[doc = r"Get enumerated v... | Rust | 0 |
àn,gǎn,hàn"),
('矹', "wù"),
('矺', "zhé,dā"),
('矻', "kū,qià"),
('矼', "gāng,kòng,qiāng"),
('矽', "xì,xī"),
('矾', "fán"),
('矿', "kuàng"),
('砀', "dàng"),
('码', "mǎ"),
('砂', "shā"),
('砃', "dān"),
('砄', "jué"),
('砅', "lì"),
('砆', "fū"),
('砇', "mín"),
('砈', "ě"),
... | Rust | 0 |
mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", &self.url)
}
}
struct Indexer {
drivers: Vec<Driver>,
}
impl Indexer {
fn index_file(&mut self, path: std::path::PathBuf) -> std::io::Result<()> {
let file_name = match path.file_name() {
Some(file_name) => file... | Rust | 0 |
scores: &mut UVec<UVec<BitArray>>,
) {
self.get_high_score_masked_triple_sub(pc_list, row, dont_care_locations, no_dont_cares, scores, 0, pc_list_len)
}
/// Get the list of indices covered by each value if it where chosen for the specified PCs.
///
/// This method will use the bit a... | Rust | 0 |
X6", "BCJ)SHZ", "6P6)5R4", "Y1R)WYL",
"N36)VXP", "JFB)K4W", "J2N)G1W", "5VT)LZC", "V2T)29L", "84G)F2G", "VK9)T48", "RDL)WRF",
"N57)1MJ", "G6C)FHF", "HWX)PV8", "N6G)LFG", "5M7)CQ7", "LZC)P6Y", "CWX)QVJ", "C8P)32J",
"KMX)SFM", "VMS)TGS", "V2P)C1C", "1KB)777", "BV6)9NZ", "SSD)JZW", "4J5)G6L", "PX7)... | Rust | 0 |
import pyblish.api
from quadpype.hosts.blender.api import plugin
class CollectFrameRangeFromCreator(plugin.BlenderInstancePlugin):
order = pyblish.api.CollectorOrder - 0.4
hosts = ["blender"]
families = ["*"]
label = "Collect Frame Range from creator"
def process(self, instance):
creator... | Python | 1 |
enorm = output_sample.cpu().numpy() * tgt_std + tgt_mean
target_sample_denorm = target_sample.cpu().numpy() * tgt_std + tgt_mean
predicted_voltage = output_sample_denorm[0, :, 0] # Shape: (dec_seq_len,)
actual_voltage = target_sample_denorm[0, :, 0] # Shape: (dec_seq_len,)
# Append sequences to t... | Python | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.