text string | label_name string | labels int64 |
|---|---|---|
_HS device IN endpoint transmit FIFO status register"]
pub otg_hs_dtxfsts5: OTG_HS_DTXFSTS5,
_reserved44: [u8; 4usize],
#[doc = "0x1c0 - OTG device endpoint-6 control register"]
pub otg_hs_diepctl6: OTG_HS_DIEPCTL6,
_reserved45: [u8; 4usize],
#[doc = "0x1c8 - OTG device endpoint-6 interrupt regi... | Rust | 0 |
lock().unwrap().exec_records, "F", "E");
}
fn assert_ordering<T: AsRef<str>>(records: &[T], first: &str, second: &str) {
assert!(first != second);
let first_idx = records.iter().position(|s| s.as_ref() == first);
let second_idx = records.iter().position(|s| s.as_ref() == second);
assert!(first_idx.unwr... | Rust | 0 |
, Coin};
use chain_core::tx::data::address::ExtendedAddr;
use chain_core::tx::data::attribute::TxAttributes;
use chain_core::tx::data::output::TxOut;
use chain_core::tx::data::Tx;
use chain_core::tx::fee::FeeAlgorithm;
use chain_core::tx::{TransactionId, TxAux};
use client_common::{ErrorKind, Result, SignedTransaction}... | Rust | 0 |
}
#[man(socketpair(2))]
pub fn socketpair(
domain: c::c_int,
ty: c::c_int,
protocol: c::c_int,
) -> Result<(OwnedFd, OwnedFd)> {
let mut socks = [0, 0];
let res = unsafe { c::socketpair(domain, ty, protocol, &mut socks[0]) };
map_err!(res).map(|_| (OwnedFd::new(socks[0]), OwnedFd::new(socks[1]... | Rust | 0 |
0.0, f64::cos(theta), 0.0, -f64::sin(theta)],
[0.0, 0.0, 1.0, 0.0],
[0.0, f64::sin(theta), 0.0, f64::cos(theta)],
]
}
fn rotmat_4d_zu(theta: f64) -> Mat4x4 {
[
[1.0, 0.0, 0.0, 0.0],
[0.0, 1.0, 0.0, 0.0],
[0.0, 0.0, f64::cos(theta), -f64::sin(theta)],
[0.0, 0.0, f... | Rust | 0 |
2id;
pub mod mock;
use ra_syntax::{TextUnit, TextRange, SourceFile, TreePtr};
pub use crate::{
cancellation::{Canceled, Cancelable},
syntax_ptr::LocalSyntaxPtr,
input::{
FilesDatabase, FileId, CrateId, SourceRoot, SourceRootId, CrateGraph, Dependency,
FileTextQuery, FileSourceRootQuery, So... | Rust | 0 |
u32::from_be_bytes(self.0[24..28].try_into().unwrap())
));
s.push_str(&format!(
" green y: {}\n",
u32::from_be_bytes(self.0[28..32].try_into().unwrap())
));
s.push_str(&format!(
" blue x: {}\n",
u32::from_be_bytes(self.0[32..36].tr... | Rust | 0 |
}
} => Ok(())
}
test_verify_one_file! {
#[test] test2 code! {
enum E1 {
N(),
E(Box<E2>),
}
enum E2 {
N(),
E(Box<E1>),
}
} => Ok(())
}
test_verify_one_file! {
#[test] test3 code! {
struct List<A> {
a: ... | Rust | 0 |
attr(
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
mod cmd;
fn main() {
tauri::Builder::default()
.on_page_load(|window, _payload| {
window.listen("tauri://update-available".to_string(), move |msg| {
println!("New version available: {:?}", msg);
}... | Rust | 0 |
import numpy as np
# Creating an array
array = np.array([1, 2, 3, 4, 5, 6])
# Boolean condition
mask = array > 3
# Applying the mask
filtered_array = array[mask]
print("Original Array:", array)
print("Mask:", mask)
print("Filtered Array:", filtered_array)
| Python | 1 |
class AllOne:
def __init__(self):
self.myDict = {}
def inc(self, key: str) -> None:
if key in self.myDict:
self.myDict[key] += 1
else:
self.myDict[key] = 1
def dec(self, key: str) -> None:
if key in self.myDict:
if self.myDict[key] > 1:
... | Python | 1 |
ers: List[str]) -> Dict[str, Any]:
"""
Add access points to an AP group.
Args:
venue_id: ID of the venue
ap_group_id: ID of the AP group
serial_numbers: List of AP serial numbers to add to the group
Returns:
Dict conta... | Python | 1 |
team1_num = 5
team2_num = 6
score_1 = 40
score_2 = 42
team1_time = 1552.512
team2_time = 2153.31451
if score_1 > score_2 or score_1 == score_2 and team1_time > team2_time:
result = 'Победа команды Мастера кода!'
elif score_1 < score_2 or score_1 == score_2 and team1_time < team2_time:
result = 'Победа команды ... | Python | 1 |
::<i64>::from(typeid_array))
as std::sync::Arc<dyn arrow2::array::Array>,
std::sync::Arc::new(arrow2::array::Utf8Array::<i64>::from(noticetype_array))
as std::sync::Arc<dyn arrow2::array::Array>,
std::sync::Arc::new(arrow2::array::PrimitiveArray::f... | Rust | 0 |
specified app type. Creates a
/// `#[wasm_bindgen]` export with the name of the app type prefixed with `boot`.
/// For example, `app_boot!(Example)` would export a JavaScript function named
/// `bootExample`.
#[macro_export]
macro_rules! app_boot {
($app:ty) => {
moxie_dom::__paste! {
impl moxi... | Rust | 0 |
=[[11, 12, 13], [21, 22, 23], [31, 32, 33]])
print("ss2 =\n" + str(ss2))
# The data of a StateSpace object is defined as read-only
nx1 = ss1.nx
A = ss1.A
# ss1.nx = 3 # Raises an exceptions, since attribute is defined as read only
print("\nCalculate eigen values and right eigen vectors:")
... | Python | 1 |
ub fn and(&mut self, other: &Bitmap) {
for i in 0..self.data.len() {
self.data[i] &= other.data[i];
}
}
}
/**
* A 32x32 matrix that can be displayed on a LED matrix.
*/
#[derive(Clone, Copy, PartialEq)]
pub struct Frame<const XSIZE: usize, const YSIZE: usize> {
bitmap: [Bitmap; YS... | Rust | 0 |
elf.inputs[index]["attention_mask"].squeeze() # might need to squeeze
target_mask = self.targets[index]["attention_mask"].squeeze() # might need to squeeze
return {"source_ids": source_ids, "source_mask": src_mask,
"target_ids": target_ids, "target_mask": target_mask}
def _b... | Python | 1 |
import ast
class GroupSimilarConstructsVisitor(ast.NodeVisitor):
def visit_function_def(self, func_node, is_async):
return self.generic_visit(func_node)
def visit_FunctionDef(self, func_node):
return self.visit_function_def(func_node, is_async=False)
def visit_AsyncFunctionDef(self, func_... | Python | 1 |
match (l, bg.len()) {
(0,4) | (1,3) | (2,2) => {bg.pop(); (l, bg)},
_ => (l, bg),
}
}).collect();
let badges_filtered: HashMap<i16, Vec<api::PuzzleResult>> = badges_group_f
.into_iter()
.map(|(l,bg)| (l,bg
.into_iter()
.map(|b| api::Puz... | Rust | 0 |
irs": self._scan_dirs,
"min_size": self._min_size,
"exclude_dirs": self._exclude_dirs,
"exclude_extensions": self._exclude_extensions,
"exclude_keywords": self._exclude_keywords,
"hash_buffer_size": self._hash_buffer_size,
"... | Python | 1 |
from securityheaders.models import SecurityHeader
from securityheaders.models.featurepolicy import FeaturePolicyDirective, FeaturePolicyKeyword
from securityheaders.models.annotations import *
import copy
@requiredheader
@description('It is a new header that allows a site to control which features and APIs can be used... | Python | 1 |
r_style = 'success'
progress.value = index
label.value = "{name}: {index}".format(
name=name,
index=str(index or '?')
)
def dbg(*args):
if cfg['debug']: print(*args)
cfg = {
'sys_seed':0,
'debug':True,
'scoring': None,
'scoring_higher_better': True,
'indent... | Python | 1 |
SHIFT, __PAGE_OFFSET};
/// PAGE_SHIFT determines the page size
pub const PAGE_SHIFT: i32 = 12;
pub const PAGE_SIZE: usize = 1 << PAGE_SHIFT;
pub const PAGE_MASK: usize = !(PAGE_SIZE - 1);
pub const PMD_PAGE_SIZE: usize = 1 << PMD_SHIFT;
pub const PMD_PAGE_MASK: usize = !(PMD_PAGE_SIZE - 1);
pub const HPAGE_SHIFT: i3... | Rust | 0 |
FramedStream) {
if let Err(err) = Self::echo(&mut stream).await {
error!("echo {}", err);
}
}
}
async fn make_xenovox<A: ToSocketAddrs>(
addr: A,
peer_store: SimplePeerStore,
) -> Result<(QuicHost, PublicKey), Error> {
let (sk, pk) = random_keypair();
let mut sock_addr... | Rust | 0 |
, w3);
///
/// *state = [ae.0, bf.0, cg.0, dh.0,
/// ae.1, bf.1, cg.1, dh.1];
/// }
/// ```
///
/// instead of 4 rounds of:
///
/// ```ignore
/// fn round(state: &mut [u64; 8], w: &mut [u64], t: usize) {
/// let [a, b, c, mut d, e, f, g, mut h]: [u64; 8] = *state;
///
/// h += big_sigma1!(e) +... | Rust | 0 |