text string | label_name string | labels int64 |
|---|---|---|
stderr(
"\
[WARNING] Target filters `bins`, `tests`, `examples`, `benches` specified, \
but no targets matched. This is a no-op
[FINISHED][..]
",
)
.run();
}
#[cargo_test]
fn reserved_windows_target_name() {
let p = project()
.file(
"Cargo.toml",
r#"
... | Rust | 0 |
#****************************************#
#* *#
#* CodinGame.com Solutions by pathosDev *#
#* *#
#* Puzzle: Defibrillators *#
#* Difficulty: Easy *#
#* Date solved: 08.11.2018 *#
#* ... | Python | 1 |
tate = 7;
pub const VkDynamicState_VK_DYNAMIC_STATE_STENCIL_REFERENCE: VkDynamicState = 8;
pub const VkDynamicState_VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV: VkDynamicState = 1000087000;
pub const VkDynamicState_VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT: VkDynamicState = 1000099000;
pub const VkDynamicState_VK_DYNAMIC_STATE... | Rust | 0 |
l,
TFXLNetForSequenceClassification,
TFXLNetForTokenClassification,
TFXLNetForQuestionAnsweringSimple,
TF_XLNET_PRETRAINED_MODEL_ARCHIVE_MAP)
from .modeling_tf_xlm i... | Python | 1 |
# coding: utf-8
"""
Graphiant APIs
**To use the APIs:** 1) Login using `/api/v1/auth/login` 2) Copy the value of \"token\" in the response 3) Click the \"Authorize\" button 4) In the \"Value\" text field enter: `Bearer <your token>` 5) Click \"Authorize\" 6) All requests are now authorized. **Toke... | Python | 1 |
!(addr, "bc1qum864wd9nwsc0u9ytkctz6wzrw6g7zdntm7f4e");
}
#[test]
pub fn test_btc_fork_address_from_str() {
let addr = BtcForkAddress::from_str("MR5Hu9zXPX3o9QuYNJGft1VMpRP418QDfW").unwrap();
assert_eq!(addr.network.coin, "LITECOIN");
assert_eq!(addr.network.seg_wit, "P2WPKH");
... | Rust | 0 |
ssagebox.showerror("Fout bij melding", f"Fout bij weergeven melding: {e}")
def update_tree(self):
for item in self.tree.get_children():
self.tree.delete(item)
for i, watcher_data in enumerate(self.watchers):
observer = watcher_data.get("observer")
status = "Actie... | Python | 1 |
ut Self) -> Result<()>,
) -> Result<Chunk> {
let postfixes_before = self.comments.remove_postfixes_before(byte_offset);
let prefixes = self.comments.remove_prefixes_before(byte_offset);
let content = self.with_temp_buf(fun)?.w;
let postfixes = next_byte_offset
.map(|byte_... | Rust | 0 |
_total(&self, categories: &CategoryLookup) -> u32 {
let mut total = 0;
for (cat, reps) in self.reps_by_category.iter() {
if let Some(category) = categories.find(cat) {
total += ((*reps as f64) * category.weight) as u32;
} else {
// default to a we... | Rust | 0 |
## Determinar si una palabra ingresada desde el teclado es un sustantivo propio o no.
import string
palabra = input("Ingrese una palabra: ")
if (palabra[0] in string.ascii_uppercase): print("Es sustantivo propio")
else: print("No es sustantivo propio") | Python | 1 |
Some(None)
}
}
struct NullIgnoringSink<'a> {
sink: SinkHandle<'a>,
}
impl<'a> Sink for NullIgnoringSink<'a> {
fn atom(&mut self, atom: Atom, state: &DeserializerState) -> Result<(), Error> {
match atom {
Atom::Null => Ok(()),
other => self.sink.atom(other, state),
... | Rust | 0 |
ketch_1/SketchLine_1][Extrusion_1_1_1/To_Face]"): True,
model.selection("VERTEX", "[Extrusion_1_1_1/Generated_Face&Sketch_1/SketchCircle_1_2&weak_name_1][Extrusion_1_1_1/Generated_Face&Sketch_1/SketchLine_1][Extrusion_1_1_1/To_Face]"): True,
model.selection("VERTEX", "[Extrusion_1_1_1/Generated_Face&Sketch_1/Sk... | Python | 1 |
(0.5, 0.5),
aspect: Aspect(1.0),
..Default::default()
})
.add_bundle(TextBundle {
font,
text: Text::new("Ivy"),
color: Color::dark_green(),
align: Alignment::new(HorizontalAlign::Left, VerticalAlign::Bottom),
..Default:... | Rust | 0 |
''' Compute SAP score using classification algorithms
:param factors: factors dataset
:param codes: latent codes dataset
:param nb_factors: number of factors in the factors dataset
:param nb_codes: number of codes in the latent codes dataset
'''
# compute accu... | Python | 1 |
e::create(key_path)?;
key_file.write_all(key.as_bytes())?;
Ok(())
}
/// Search for files in `search_directory` that match `file_pattern` and return the last match
fn get_last_path(search_directory: impl AsRef<Path>, file_pattern: &str) -> Result<PathBuf, Error> {
let pattern = search_directory.as_ref().... | Rust | 0 |
unchecked_signal)?;
}
pid if pid == -1 => {
// "If pid equals -1, then sig is sent to every process for which
// the calling process has permission to send signals, except for
// process 1 (init), but ... POSIX.1-2001 requires that kill(-1,sig)
// send sig... | Rust | 0 |
e = "v1_12", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
fn task_state(&self) -> TaskState {
unsafe { from_glib(ffi::gst_pad_get_task_state(self.as_ref().to_glib_none().0)) }
}
fn has_current_caps(&self) -> bool {
unsafe {
from_glib(ffi::gst_... | Rust | 0 |
denom: uusd_asset.clone(),
},
amount: Uint128::from(100_000_u128),
},
Asset {
info: AssetInfo::NativeToken {
denom: uluna_asset.clone(),
},
amount: Uint128::from(100_000_u128),
... | Rust | 0 |
import CodeRefinement.ModelRunner
import os
import re
import logging
logger = logging.getLogger(__name__)
class CodeRefiner:
def __init__(self):
MODEL_PATH = "NexusrexDev/CodeGator-Refinement"
self.model = CodeRefinement.ModelRunner.ModelRunner(MODEL_PATH)
def clean_code(self, code):
... | Python | 1 |
,
};
unsafe { longfi_sys::longfi_handle_event(&mut self.c_handle, event_for_c) }
}
pub fn send(&mut self, buffer: &[u8]) {
unsafe {
longfi_sys::longfi_send(&mut self.c_handle, buffer.as_ptr(), buffer.len());
}
}
pub fn send_test(&mut self) {
unsafe {... | Rust | 0 |
efghijklmnopqrstuvxyzʻ";
const VIE: &str =
"abcdefghijklmnopqrstuvwxyzàáâãèéêìíòóôõùúýăđĩũơưạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ";
const ZUL: &str = "abcdefghijklmnopqrstuvwxyz";
const LATIN_ALPHABETS: &[(Lang, &str)] = &[
(Lang::Afr, AFR),
(Lang::Aka, AKA),
(Lang::Aze, AZE),
(Lang::Cat, C... | Rust | 0 |
# 给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。
#
# 你可以假设每种输入只会对应一个答案。但是,数组中同一个元素不能使用两遍。
#
#
#
# 示例:
#
# 给定 nums = [2, 7, 11, 15], target = 9
#
# 因为 nums[0] + nums[1] = 2 + 7 = 9
# 所以返回 [0, 1]
#
# Related Topics 数组 哈希表
# leetcode submit region begin(Prohibit modification and deletion)... | Python | 1 |
from fastapi import APIRouter, HTTPException, status
from dispatch.database.core import DbSession
from dispatch.database.service import CommonParameters, search_filter_sort_paginate
from dispatch.models import PrimaryKey
from .models import (
SourceTypeCreate,
SourceTypePagination,
SourceTypeRead,
So... | Python | 1 |
decoration_similarity = 1.0
else:
decoration_similarity = 0.5
# 3.4 房龄相似度
age_similarity = 1.0
if 'age' in target and 'age' in case:
age_diff = abs(target['age'] - case['age'])
age_similarity = np.exp(-age_diff / 10) # ... | Python | 1 |
ase, Nature, Jagged, Vector1D, Value, Array, Vector1DNull, NatureCategorical, NatureContinuous, AggregatorProperties, ValueProperties, JaggedProperties, DataType, ArrayProperties, ReleaseNode, GroupId, IndexKey, ComponentExpansion, DataframeProperties, PartitionsProperties};
use indexmap::IndexMap;
use error_chain::Cha... | Rust | 0 |
ive_system.process_natural_language(message)
# Send response with metrics
await websocket.send_json({
"type": "cognitive_response",
"content": response,
"metrics": {
"coherence_strength":... | Python | 1 |
#!/usr/bin/env python
import logging
import argparse
from rush_scraper import RushScraper
logger = logging.getLogger(__name__)
def parse_args():
parser = argparse.ArgumentParser(description='Scrape Rush Limbaugh audio data')
subparsers = parser.add_subparsers(help='scrape-related subcommands',
... | Python | 1 |
\":\"20170101010101\"\
},\
\"checksum\":\"checksum\",\
\"manifest\":\"manifest\",\
\"target\":\"x86_64-linux\",\
\"deps\":[{\
\"origin\":\"dep_org\",\
\"name\":\"dep_name\",\
\"version\":\"1.1.1-dep\",\
... | Rust | 0 |
ype_annotation() -> Test {
let (root, storage) = parse_entities("3 * 4 : Int")?;
let node_3 = HasValue::new(Prim::I32(3)).at(TEST_FN, 1, 1);
let node_mul = SymbolRef::new(path!("*"), path!(TEST_FN)).at(TEST_FN, 1, 3);
let node_4 = HasValue::new(Prim::I32(4)).at(TEST_FN, 1, 5);
le... | Rust | 0 |
common::flush_only_n(segment_meta, &compaction) as usize;
for (col_name, col_meta) in &table_meta.schema.columns {
let flush_file = dirs::flush_col_file(dir, compaction_key, col_name);
let bytes_result = fs::read(&flush_file).await;
if let Err(e) = &bytes_result {
if matches!(e.kind(), i... | Rust | 0 |
ctx.with_simulation(|mut sim_ctx| {
// TODO: Use separate batch gas limit for query execution.
// Decode transaction and verify signature.
let tx_size = args
.tx
.len()
.try_into()
.map_err(|_| Error::OversizedT... | Rust | 0 |
add_material(obj, shader, input_kwargs=shader_kwargs)
if __name__ == "__main__":
for i in range(1):
bpy.ops.wm.open_mainfile(filepath="dev_scene_fish_nurb.blend")
i = 0
for obj in bpy.data.objects:
if obj.name.find("Nurb") >= 0:
apply(
obj,
... | Python | 1 |
tes of the current level feature map.
Args:
mask (Tensor): Binary mask of a feature map, has shape (bs, H, W).
Returns:
Tensor: valid ratios [r_w, r_h] of a feature map, has shape (1, 2).
"""
_, H, W = mask.shape
valid_H = torch.sum(~mask[:, :, 0], 1)
... | Python | 1 |
Processing",
Prentice-Hall, 1996, ch. 11, "Digital Filter Design"
Examples
--------
Design and plot notching comb filter at 20 Hz for a
signal sampled at 200 Hz, using quality factor Q = 30
>>> from scipy import signal
>>> import matplotlib.pyplot as plt
>>> import numpy as np
>>> fs = 200.0 # Sample freque... | Python | 1 |
}
}
/// A task to execute as the bottom half of an interrupt handler
pub trait BottomHalf {
/// Exectute the work for this bottom half
fn execute(&mut self);
}
/// A first in first out queue of `BottomHalf` tasks
struct BottomHalfQueue {
queue: LinkedList<Box<BottomHalf>>,
}
impl BottomHalfQueue {
//... | Rust | 0 |
_addr constant
#[no_mangle]
pub static C: u8 = 0;
// CHECK: @D = local_unnamed_addr global
#[no_mangle]
pub static mut D: u8 = 0;
mod private {
// CHECK: @E = local_unnamed_addr constant
#[no_mangle]
static E: u8 = 0;
// CHECK: @F = local_unnamed_addr global
#[no_mangle]
static mut F: u8 = 0;... | Rust | 0 |
use super::*;
#[test]
fn verify_groupentry_output() {
assert_eq!(
GroupEntry::TypeGroupname {
ge: TypeGroupnameEntry {
occur: None,
name: Identifier::from("entry1"),
generic_arg: None,
},
span: (0, 0, 0),
}
.to_string(),
"entry1".to_... | Rust | 0 |
&self.previous_channel_id
}
pub fn counterparty_version(&self) -> &String {
&self.counterparty_version
}
pub fn channel(&self) -> &ChannelEnd {
&self.channel
}
pub fn proofs(&self) -> &Proofs {
&self.proofs
}
}
impl Msg for MsgChannelOpenTry {
type Validati... | Rust | 0 |
ty,
style,
vm_definition_location,
)?))
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn memory_style() {
let tunables = BaseTunables {
static_memory_bound: Pages(2048),
static_memory_offset_guard_size: 128,
... | Rust | 0 |
from django.shortcuts import render
from django.views.generic import TemplateView
class AboutTemplateView(TemplateView):
template_name = 'pages/about.html'
class RulesTemplateView(TemplateView):
template_name = 'pages/rules.html'
def permission_denied(request, exception):
return render(request, 'pages... | Python | 1 |
SceneNode::LinesNode(ref mut n) => n.update(),
SceneNode::SegmentNode(ref mut n) => n.update(),
}
}
}
// FIXME: else, the object has been removed! Destroy its graphical representation as
// well?
}
... | Rust | 0 |
t': '戈馬拉文'},
'bbk': {'en': 'Babanki'},
'bbl': {'en': 'Bats'},
'bbm': {'en': 'Babango'},
'bbn': {'en': 'Uneapa'},
'bbo': {'en': 'Northern Bobo Madaré'},
'bbp': {'en': 'West Central Banda'},
'bbq': {'en': 'Bamali'},
'bbr': {'en': 'Girawa'},
'bbs': {'en': 'Bakpinka'},
'bbt': {'en': ... | Python | 1 |
]
use libfuzzer_sys::fuzz_target;
extern crate kiro_editor;
use kiro_editor::{Editor, Error, InputSeq, KeySeq, Language, Result};
use std::io::{self, Write};
use std::str;
// TODO: Fuzz stdin input
struct AllOperations(Vec<InputSeq>);
impl AllOperations {
fn new() -> Self {
let mut ops = vec![
... | Rust | 0 |
A ind,y"); rla!(self, self.indy()); },
0x34 => { mnemonic!(pc, "NOP"); nop!(self, self.zpx()); },
0x35 => { mnemonic!(pc, "AND zp,x"); and!(self, self.zpx()); },
0x36 => { mnemonic!(pc, "ROL zp,x"); rol!(self, self.zpx()); },
0x37 => { mnemonic!(pc, "RLA zp,x"); rla!(self, self.zpx()); },
0x38 =... | Rust | 0 |
from thinc.api import Relu, Softmax, chain, concatenate
from thinc.model import Model
from thinc.types import Floats2d
n_hidden = 32
dropout = 0.2
model1: Model[Floats2d, Floats2d] = chain(
Relu(nO=n_hidden, dropout=dropout), Relu(nO=n_hidden, dropout=dropout), Softmax()
)
model2: Model[Floats2d, Floats2d] = cha... | Python | 1 |