text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use crate::param::{FlagParam, OptionParam, ParamData, PositionalParam};
use crate::utils::{is_choice_value_terminate, is_default_value_terminate};
use crate::Result;
use anyhow::bail;
use nom::{
branch::alt,
bytes::complete::{escaped, tag, take_till, take_while1},
character::{
complete::{char, satis... | the_stack |
use crate::num::dec2flt::common::{is_8digits, parse_digits, ByteSlice, ByteSliceMut};
#[derive(Clone)]
pub struct Decimal {
/// The number of significant digits in the decimal.
pub num_digits: usize,
/// The offset of the decimal point in the significant digits.
pub decimal_point: i32,
/// If the n... | the_stack |
#![allow(unsafe_code)]
#[cfg(not(any(
target_arch = "aarch64",
target_arch = "mips",
target_arch = "mips64",
target_arch = "riscv64"
)))]
use super::super::arch::choose::syscall1;
use super::super::arch::choose::{
syscall1_readonly, syscall2, syscall2_readonly, syscall3, syscall3_readonly, syscall4... | the_stack |
pub(crate) mod tests;
use crate::alias::QueryAliases;
use crate::error::{Error, Result, ToResult};
use crate::join::{JoinKind, JoinOp};
use crate::lgc::LgcPlan;
use crate::op::{Op, OpMutVisitor, SortItem};
use crate::query::{Location, QuerySet, Subquery};
use crate::resolv::{ExprResolve, PlaceholderCollector, Placehol... | the_stack |
const HORIZONTAL : u8 =1;
const VERTICAL : u8 =2;
//================================
// RASTER SKELETONIZATION
//================================
// Binary image thinning (skeletonization) in-place.
// Implements Zhang-Suen algorithm.
// http://agcggs680.pbworks.com/f/Zhan-Suen_algorithm.pdf
fn thinning_zs_iteratio... | the_stack |
use crate::{get_rule_suggestion, CstRuleStore, File};
use super::{
commands::Command,
get_command_descriptors,
lexer::{format_kind, Lexer, Token},
CommandDescriptor, Component, ComponentKind, Directive, Instruction,
};
use rslint_errors::{file::line_starts, Diagnostic};
use rslint_lexer::{SyntaxKind, T... | the_stack |
use std::{
marker::PhantomData,
ptr::{self, NonNull},
sync::atomic::{AtomicPtr,Ordering},
};
use crate::{
external_types::RMutex,
prefix_type::{PointsToPrefixFields, PrefixRef},
pointer_trait::{ImmutableRef, ImmutableRefTarget},
};
/**
A late-initialized static reference,with fallible initiali... | the_stack |
//! Communication with SQLite.
use blob;
use capnp;
use chrono;
use diesel;
use diesel::connection::TransactionManager;
use diesel::prelude::*;
use diesel::sqlite::SqliteConnection;
use errors::DieselError;
use hash;
use root_capnp;
use std::sync::{Mutex, MutexGuard};
use std::path::Path;
use tags;
use time::Durat... | the_stack |
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate log;
mod alphabet;
pub mod script; //Making script public so that its documentation may be viewed on doc.rs
use crate::alphabet::Alphabet;
use crate::script::{Keyword, Reflection, Script, Synonym, Transform};
use regex::{Captures, Regex};
use std::coll... | the_stack |
//
// Copyright (c) 2019 Stegos AG
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, ... | the_stack |
use alloc::vec::Vec;
use std::cmp::{max, Ordering};
use std::convert::{From, Into};
use std::iter::FromIterator;
use std::ops::{Index, IndexMut};
use morton::{deinterleave_morton, interleave_morton};
use rand::Rng;
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub struct Key {
code: u8,
}
impl Key {
pub fn no... | the_stack |
#![no_std]
use thermite::*;
use core::{
fmt,
marker::PhantomData,
ops::{Add, Div, Mul, Neg, Sub},
};
/// A vectorized (SoA) complex number in Cartesian form.
pub struct Complex<S: Simd, V: SimdFloatVector<S>, P: Policy = policies::Performance> {
/// Real part
pub re: V,
/// Imaginary part
... | the_stack |
#[macro_use] extern crate alloc;
#[macro_use] extern crate log;
#[macro_use] extern crate lazy_static;
#[macro_use] extern crate terminal_print;
extern crate getopts;
extern crate spin;
extern crate task;
extern crate spawn;
extern crate scheduler;
extern crate rendezvous;
extern crate async_channel;
extern crate apic;... | the_stack |
/// Account-Based Stateless Blockchain
/// ***DISCLOSURE*** This module is incomplete, untested, and completely experimental.
use support::{decl_module, decl_storage, decl_event, ensure, dispatch::Result, StorageValue, traits::Get};
use system::ensure_signed;
use codec::{Encode, Decode};
use accumulator::*;
pub mod bi... | the_stack |
use crate::sparse::{Error, Perm, ScatteredVec, SparseMat, TriangleMat};
#[derive(Clone)]
pub struct LUFactors {
lower: TriangleMat,
upper: TriangleMat,
row_perm: Option<Perm>,
col_perm: Option<Perm>,
}
#[derive(Clone, Debug)]
pub struct ScratchSpace {
rhs: ScatteredVec,
dense_rhs: Vec<f64>,
... | the_stack |
use std::collections::BTreeMap;
use j4rs::{Instance, InvocationArg, Jvm, JvmBuilder, MavenArtifact};
use once_cell::sync::Lazy;
use rskafka::{
client::partition::Compression,
record::{Record, RecordAndOffset},
};
use time::OffsetDateTime;
/// If `TEST_JAVA_INTEROPT` is not set, skip the calling test by return... | the_stack |
//
// Copyright (c) 2019 Stegos AG
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, ... | the_stack |
#![cfg_attr(rustfmt, rustfmt::skip)]
use static_assertions::const_assert;
// ASSERTIONS
// ----------
// Ensure all our bit flags are valid.
macro_rules! check_subsequent_flags {
($x:ident, $y:ident) => {
const_assert!($x << 1 == $y);
};
}
// Ensure all our bit masks don't overlap.
macro_rules! chec... | the_stack |
mod common;
use num_format::{Buffer, CustomFormat};
#[cfg(feature = "std")]
use num_format::{ToFormattedString, WriteFormatted};
use crate::common::POLICIES;
#[test]
fn test_i8() {
let test_cases: &[(&str, i8, &CustomFormat)] = &[
("0", 0, &POLICIES[0]),
("0", 0, &POLICIES[1]),
("0", 0, &... | the_stack |
mod common_part;
mod define_macro;
use crate::icon::common_part::*;
use crate::prelude::*;
use crate::display;
use crate::display::Scene;
use ensogl::display::object::ObjectOps;
use ensogl::display::shape::compound::path::path;
use ensogl::display::Attribute;
use ensogl_hardcoded_theme::application::searcher::icons a... | the_stack |
use crate::nodes::{NodeIdentity, NODE_IDENTITY_SIZE};
use crypto::asymmetric::{encryption, identity};
use nymsphinx_types::Destination;
use serde::de::{Error as SerdeError, Unexpected, Visitor};
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::fmt::{self, Formatter};
// Not entirely sure whether... | the_stack |
use std::{
collections::{HashMap, HashSet},
path::{Path, PathBuf},
};
use crate::{build_lock::BuildLock, fs::ProjectIO, telemetry::NullTelemetry};
use gleam_core::{
ast::{SrcSpan, TypedExpr},
build::{self, Module, ProjectCompiler},
config::PackageConfig,
diagnostic::{self, Level},
io::{Comm... | the_stack |
use anyhow::anyhow;
use anyhow::{Error, Result};
use core::convert::TryInto;
use std::prelude::v1::*;
use teaclave_rpc::into_request;
use crate::teaclave_authentication_service_proto as proto;
use crate::teaclave_common;
use teaclave_types::UserAuthClaims;
pub use proto::TeaclaveAuthenticationApi;
pub use proto::Teac... | the_stack |
use super::commitments::{Commitments, MultiCommitGens};
use super::dense_mlpoly::{
DensePolynomial, EqPolynomial, PolyCommitment, PolyCommitmentGens, PolyEvalProof,
};
use super::errors::ProofVerifyError;
use super::group::{CompressedGroup, GroupElement, VartimeMultiscalarMul};
use super::nizk::{EqualityProof, Knowle... | the_stack |
use crate::prelude::*;
use crate::model::module::MethodId;
use ast::constants::keywords;
use double_representation::module;
use double_representation::tp;
use engine_protocol::language_server;
use engine_protocol::language_server::FieldUpdate;
use engine_protocol::language_server::SuggestionsDatabaseModification;
use... | the_stack |
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::value::{DecimalExt, I64Ext, StrExt};
use nu_protocol::{Signature, SyntaxShape, UntaggedValue, Value};
use nu_source::Tagged;
use std::cmp;
pub struct Seq;
impl WholeStreamCommand for Seq {
fn name(&self) -> &str ... | the_stack |
//! The `api` module contains the traits and types which make up btleplug's API. These traits have a
//! different implementation for each supported platform, but only one implementation can be found
//! on any given platform. These implementations are in the [`platform`](crate::platform) module.
//!
//! You will may w... | the_stack |
use qt_gui::QStandardItem;
use qt_gui::QIcon;
use qt_core::QString;
use cpp_core::Ref;
use std::sync::atomic::AtomicPtr;
use rpfm_lib::packedfile::{text, text::TextType};
use crate::ASSETS_PATH;
use crate::TREEVIEW_ICONS;
use crate::utils::atomic_from_cpp_box;
use crate::utils::ref_from_atomic_ref;
//------------... | the_stack |
use std::fmt;
use std::io::Error as IoError;
use std::ops::Deref;
use tracing::{debug, trace, instrument};
use dataplane::batch::Batch;
use dataplane::{Offset, Size};
use fluvio_future::file_slice::AsyncFileSlice;
use crate::batch_header::{BatchHeaderStream, BatchHeaderPos};
use crate::mut_index::MutLogIndex;
use cr... | the_stack |
use query_engine_tests::*;
#[test_suite(schema(schema))]
mod many_count_rel {
use indoc::indoc;
use query_engine_tests::run_query;
fn schema() -> String {
let schema = indoc! {
r#"model Post {
#id(id, Int, @id)
title String
comments Comm... | the_stack |
use error::*;
use io_tools::ReadExt;
use std::fs::File;
use std::io::SeekFrom;
use std::io::prelude::*;
use std::mem::size_of;
use std::path::Path;
pub struct SlpHeader {
pub file_version: [u8; 4],
pub shape_count: u32,
pub comment: [u8; 24],
}
impl SlpHeader {
pub fn new() -> SlpHeader {
Sl... | the_stack |
use std::borrow::Cow;
use std::collections::hash_map;
use std::ops::Deref;
use std::fmt;
use std::mem;
use std::slice;
use tendril::{ByteTendril, StrTendril};
use smallvec::SmallVec;
use mucell::{MuCell, Ref};
use super::{ToHeader, Header, HeaderDisplayAdapter};
// Nothing even remotely fancy here like counting how... | the_stack |
use crate::error::{PreprocessingError, Result};
use linfa::dataset::{AsTargets, Records, WithLapack, WithoutLapack};
use linfa::traits::{Fit, Transformer};
use linfa::{DatasetBase, Float};
use ndarray::{Array1, Array2, ArrayBase, ArrayView1, ArrayView2, Axis, Data, Ix2};
use ndarray_linalg::cholesky::{Cholesky, UPLO};
... | the_stack |
use anyhow::format_err;
use fidl::{endpoints::RequestStream, endpoints::ServerEnd};
use fidl_fuchsia_wlan_common as fidl_common;
use fidl_fuchsia_wlan_mlme::{self as fidl_mlme, MlmeEventStream, MlmeProxy, ScanResultCode};
use fidl_fuchsia_wlan_sme::{self as fidl_sme, ClientSmeRequest};
use fuchsia_async as fasync;
use ... | the_stack |
use crate::metrics;
use crate::utils::FutureResult;
use bytes::buf::ext::BufMutExt;
use bytes::BytesMut;
use futures::future;
use futures_codec::{Decoder, Encoder, Framed};
use futures_io::{AsyncRead, AsyncWrite};
use libp2p_core::{InboundUpgrade, Multiaddr, OutboundUpgrade, PeerId, UpgradeInfo};
use protobuf::Message... | the_stack |
use super::backward_references::kHashMul32;
//use super::super::alloc::{SliceWrapper, SliceWrapperMut};
use super::bit_cost::BitsEntropy;
use super::brotli_bit_stream::{BrotliBuildAndStoreHuffmanTreeFast, BrotliStoreHuffmanTree};
use super::entropy_encode::{BrotliConvertBitDepthsToSymbols, BrotliCreateHuffmanTree, Huff... | the_stack |
use crate::layers::ServiceBuilderExt;
use crate::plugin::Plugin;
use crate::{register_plugin, ResponseBody, RouterRequest, RouterResponse};
use futures::stream::BoxStream;
use http::header;
use http::{HeaderMap, StatusCode};
use schemars::JsonSchema;
use serde::Deserialize;
use std::ops::ControlFlow;
use tower::util::B... | the_stack |
use std::{
env,
fs::{copy, create_dir, read_dir, remove_file, File},
io::ErrorKind,
path::{Path, PathBuf},
process::{exit, Command},
};
/// Revision that the patches can be applied stably.
const STABLE_REVISION: &str = "169724fe58e8d7d0b4be6f59ca7c1e0f300399e1";
const STABLE_CSUM: &str = "293a65f46... | the_stack |
use std::mem;
use std::cmp;
use std::io::Write;
use std::convert::{TryInto, TryFrom};
use byteorder::{ByteOrder, NativeEndian, WriteBytesExt, LE};
use fehler::{throws};
type Error = std::io::Error;
/// Duplication dictionary size.
///
/// Every four bytes is assigned an entry. When this number is lower, fewer entries... | the_stack |
use std::{mem, ptr, iter, slice, cmp, fmt, error};
use std::convert::TryFrom;
use std::ops::{self, Range};
use crate::symbol::Symbol;
use crate::rc_vec::RcVec;
use crate::Function;
use crate::vm::{self, world, code};
use crate::vm::{World, Assets, Entity, Value, ValueRef, Data, Array, ArrayRef};
use crate::vm::{to_i32... | the_stack |
use noodles_bgzf as bgzf;
use noodles_csi::index::reference_sequence::{bin::Chunk, Metadata};
use tokio::io::{self, AsyncRead, AsyncReadExt};
use crate::bai::{
self,
index::{reference_sequence::Bin, ReferenceSequence},
Index, MAGIC_NUMBER,
};
/// An async BAM index (BAI) reader.
pub struct Reader<R>
where... | the_stack |
// This library must remain platform-agnostic because it used by a host tool and within Fuchsia.
use {
anyhow::{anyhow, Context, Result},
fidl_fuchsia_component_internal as fcomponent_internal,
moniker::{AbsoluteMoniker, AbsoluteMonikerBase},
serde::{Deserialize, Deserializer, Serialize, Serializer},
... | the_stack |
use crate::cast::As;
use std::cmp::{Ordering, PartialOrd};
use std::default::Default;
use std::fmt::{Display, Error, Formatter};
use std::ops::Not;
//------------------------------------------------------------------------------
//{{{ QrResult
/// `QrError` encodes the error encountered when generating a QR code.
#[d... | the_stack |
use crate::TypesMeta;
use proc_macro2::TokenStream;
use std::cmp;
use std::collections::HashSet;
use vulkano::spirv::{Decoration, Dim, Id, ImageFormat, Instruction, Spirv, StorageClass};
#[derive(Debug)]
struct Descriptor {
set_num: u32,
binding_num: u32,
desc_ty: TokenStream,
descriptor_count: u64,
... | the_stack |
#![recursion_limit = "256"]
// === Features ===
#![allow(incomplete_features)]
#![feature(allocator_api)]
#![feature(test)]
#![feature(specialization)]
#![feature(let_chains)]
// === Standard Linter Configuration ===
#![deny(non_ascii_idents)]
#![warn(unsafe_code)]
// === Non-Standard Linter Configuration ===
#![allow(... | the_stack |
use std::num::NonZeroUsize;
use clap::ArgEnum;
use serde::Deserialize;
use serde::Serialize;
use strum::Display;
use strum::EnumString;
use crate::custom_layout::Column;
use crate::custom_layout::ColumnSplit;
use crate::custom_layout::ColumnSplitWithCapacity;
use crate::CustomLayout;
use crate::DefaultLayout;
use cra... | the_stack |
use crate::cpp_data::CppClassField;
use crate::cpp_data::CppItem;
use crate::cpp_data::CppPath;
use crate::cpp_data::CppPathItem;
use crate::cpp_data::CppVisibility;
use crate::cpp_ffi_data::CppFfiType;
use crate::cpp_ffi_data::{CppFfiArgumentMeaning, CppToFfiTypeConversion};
use crate::cpp_ffi_data::{CppFfiFunction, C... | the_stack |
use criterion::{criterion_group, criterion_main, Criterion};
use ilp_node::InterledgerNode;
use serde_json::{self, json};
use tokio::runtime::Runtime;
use tokio::sync::mpsc::channel;
use tokio_tungstenite::tungstenite::{self, client, handshake::client::Request};
mod redis_helpers;
mod test_helpers;
use redis_helpers:... | the_stack |
#![forbid(unsafe_code)]
#![warn(clippy::dbg_macro)]
extern crate wain_ast;
mod error;
mod insn;
pub use error::{Error, Result};
use error::ErrorKind;
use std::borrow::Cow;
use std::collections::HashMap;
use wain_ast::source::Source;
use wain_ast::*;
// Validation context
// https://webassembly.github.io/spec/core/... | the_stack |
use crate::api::*;
use crate::config::VaultConfig;
use async_trait::async_trait;
use failure::{bail, format_err, Error};
use futures::channel::{mpsc, oneshot};
use futures::prelude::*;
use log::*;
use rocksdb::{self, Options, DB};
use std::collections::BTreeMap;
use std::collections::HashMap;
use std::fs;
use std::pa... | the_stack |
use crate::filter;
use crate::metric;
use chrono::naive::NaiveDateTime;
use chrono::offset::Utc;
use chrono::DateTime;
use rand::random;
use serde_json;
use serde_json::map::Map;
use serde_json::Value;
use std::iter::FromIterator;
use std::sync::atomic::{AtomicUsize, Ordering};
/// Total number of logline processed
pu... | the_stack |
use crate::core::{
idempotency::{IdempotentData, IdempotentStore},
scale_with_precision_loss,
types::{Convert, ConvertDetails, LeftoversStore},
};
use bytes::Bytes;
use futures::TryFutureExt;
use http::StatusCode;
use interledger_errors::{IdempotentStoreError, LeftoversStoreError};
use num_bigint::BigUint;
... | the_stack |
use super::vector::*;
use super::properties::*;
use super::control_point::*;
use super::vector_element::*;
use super::path_conversion_options::*;
use crate::traits::edit::*;
use crate::traits::path::*;
use flo_curves::*;
use flo_curves::bezier::path::*;
use flo_canvas::*;
use smallvec::*;
use std::sync::*;
use std:... | the_stack |
//! Hat's main way of storing list-like data externally.
//!
//! This module implements two structures for handling hash trees: A streaming hash-tree writer, and
//! a streaming hash-tree reader.
use key;
use blob::{ChunkRef, NodeType, LeafType};
use capnp;
use hash::Hash;
#[cfg(test)]
use quickcheck;
use root_capn... | the_stack |
use hdk::prelude::*;
use hdk_records::{
DnaAddressable,
identities::{
calculate_identity_address,
create_entry_identity,
read_entry_identity_full,
},
links::{get_linked_addresses, get_linked_headers},
rpc::call_local_zome_method,
};
pub use hdk_records::{ RecordAPIResult, Dat... | the_stack |
/// A bootrom function table code.
pub type RomFnTableCode = [u8; 2];
/// This function searches for (table)
type RomTableLookupFn<T> = unsafe extern "C" fn(*const u16, u32) -> T;
/// The following addresses are described at `2.8.2. Bootrom Contents`
/// Pointer to the lookup table function supplied by the rom.
const... | the_stack |
use super::protocol::{DeliveryCodec, DeliveryConfig, DeliveryMessage};
use futures::task::{Context, Poll};
use futures::Sink;
use futures::StreamExt;
use futures_codec::Framed;
use libp2p_core::upgrade::{InboundUpgrade, OutboundUpgrade};
use libp2p_swarm::protocols_handler::{
KeepAlive, ProtocolsHandler, Protocols... | the_stack |
use crate::{decode_engine_slice, engine::Engine, DecodeError};
use std::{cmp, fmt, io};
// This should be large, but it has to fit on the stack.
pub(crate) const BUF_SIZE: usize = 1024;
// 4 bytes of base64 data encode 3 bytes of raw data (modulo padding).
const BASE64_CHUNK_SIZE: usize = 4;
const DECODED_CHUNK_SIZE:... | the_stack |
//****************************************************************************
// Automatically generated from yaml/swiftnav/sbp/acquisition.yaml
// with generate.py. Please do not hand edit!
//****************************************************************************/
//! Satellite acquisition messages from the devi... | the_stack |
use crate::model::selector::{
AttributeComparison, AttributeSelector, Comparator, Function, Key, KeyPathSegment,
NeighborSelector, ScopedAttributeAssertion, ScopedAttributeSelector, ScopedValue, Selector,
SelectorExpression, ShapeType, Value, VariableDefinition, VariableReference,
};
use crate::model::value... | the_stack |
use codegen_lib::{
definition::{
Argument, Arguments, Command, Definition, DelimitedArguments, PossiblyOptionType,
PrimitiveType, Type, Variant,
},
parser,
};
#[test]
fn parse_empty() {
let string = String::from("");
let parse_result = parser::parse(&string).unwrap();
let expect... | the_stack |
use scasm::{
asm::Instruction,
asm::Statement,
asm::Terminator,
binary::instructions::name2instr,
binary::instructions::ArgTy,
binary::instructions::RegisterMode,
lexer::Const,
lexer::Lexical,
lexer::RegisterKind,
lexer::{Operand, Register},
span::Span,
};
use tracing::{debug... | the_stack |
use std::borrow::{Borrow, Cow};
use std::ffi::{OsStr, OsString};
use std::fs::File;
use std::hash::Hash;
use std::iter::{FromIterator, FusedIterator};
use std::mem;
use std::os::unix::io::FromRawFd;
use std::process::Stdio;
use std::rc::Rc;
use super::ast::FunctionBody;
use super::builtin::{Builtin, BuiltinSet};
use s... | the_stack |
use std::env;
use std::ffi::CString;
use std::sync::Arc;
use crate::utils::errors::GenericError;
use crate::{
cnc_file_descriptor,
concurrent::{counters::CountersReader, logbuffer::term_reader::ErrorHandler, ring_buffer::ManyToOneRingBuffer},
driver_proxy::DriverProxy,
image::Image,
utils::{
... | the_stack |
use std::fmt;
use std::future::Future;
use std::pin::Pin;
use std::sync::Arc;
use crate::solicit::end_stream::EndStream;
use crate::solicit::header::*;
use crate::AnySocketAddr;
use crate::HttpScheme;
use tls_api::AsyncSocket;
use tls_api::TlsConnectorBox;
use tls_api;
use crate::solicit_async::*;
use crate::clien... | the_stack |
use pretty_assertions::assert_eq;
use super::*;
use crate::ast::tests::Locator;
#[test]
fn map_member_expressions() {
let mut p = Parser::new(
r#"m = {key1: 1, key2:"value2"}
m.key1
m["key2"]
"#,
);
let parsed = p.parse_file("".to_string());
let loc = Locator::new(&p.source[..]);
... | the_stack |
use bitarray::{BitArray, Hamming};
use gnuplot::*;
use hnsw::*;
use itertools::Itertools;
use num_traits::Zero;
use rand::distributions::Standard;
use rand::{Rng, SeedableRng};
use rand_pcg::Pcg64;
use space::*;
use std::cell::RefCell;
use std::io::Read;
use std::path::PathBuf;
use structopt::StructOpt;
#[derive(Debug... | the_stack |
use super::client::*;
use crate::*;
use unit_part_gpu::*;
use super::uitool::UiTool;
impl App {
pub fn clear_gpu_instance_and_game_state(&mut self) {
self.game_state.players.clear();
self.game_state.my_player_id = None;
self.game_state.kbots.clear();
self.game_state.selected.clear()... | the_stack |
use std::ops::{Add, Neg, Sub, Mul};
use cube::Cube;
use std::{fmt, hash};
use std::collections::HashMap;
use rand::{self, Rng};
#[derive(Copy)]
pub struct Permutation {
perm: [u8; 54],
}
struct SeenSet {
seen: [bool; 54],
}
impl SeenSet {
fn new() -> SeenSet {
SeenSet { seen: [false; 54] }
}
... | the_stack |
use rustc::ty::cast::CastTy;
use rustc::hir::def::{Res, DefKind, CtorKind};
use rustc::hir::def_id::DefId;
use rustc::middle::expr_use_visitor as euv;
use rustc::middle::mem_categorization as mc;
use rustc::middle::mem_categorization::Categorization;
use rustc::ty::{self, Ty, TyCtxt};
use rustc::ty::query::Providers;
u... | the_stack |
use crate::block::ClientID;
use crate::types::TypeRefs;
use crate::*;
use lib0::decoding::Read;
use lib0::{any::Any, decoding::Cursor};
use std::rc::Rc;
/// A trait that can be implemented by any other type in order to support lib0 decoding capability.
pub trait Decode: Sized {
fn decode<D: Decoder>(decoder: &mut ... | the_stack |
use crate::{
ast,
ast::Ast,
ast_walk::{
LazyWalkReses,
WalkRule::{Body, LiteralLike, NotWalked},
},
beta::{Beta, Beta::*, ExportBeta},
core_forms::{strip_ee, strip_ql},
core_type_forms::{less_quoted_ty, more_quoted_ty},
form::{EitherPN::*, Form},
grammar::{
Fo... | the_stack |
#![feature(stdsimd, wasm_target_feature)]
#![cfg_attr(test, feature(test))]
#![allow(
clippy::unwrap_used,
clippy::print_stdout,
clippy::unwrap_used,
clippy::shadow_reuse,
clippy::cast_possible_wrap,
clippy::cast_ptr_alignment,
clippy::cast_sign_loss,
clippy::missing_docs_in_private_item... | the_stack |
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PackageDetails {
/// <p>Internal ID of the package.</p>
pub package_id: std::option::Option<std::string::String>,
/// <p>User-specified name of the package.</p>
pub package_name: std::option::Option<std::string::String>,
... | the_stack |
pub mod bindings;
pub mod logger;
pub mod conf;
use actix::prelude::*;
use actix_lua::LuaActorBuilder;
use actix_web::{server as actix_server, App};
use rlua::prelude::*;
use std::{
path::{Path, PathBuf},
result,
fs, io::prelude::*
};
use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod};
use serde_json:... | the_stack |
use crate::{
BaseElement, FieldElement, StarkField, CF_OP_BITS_RANGE, HD_OP_BITS_RANGE, LD_OP_BITS_RANGE,
MIN_CONTEXT_DEPTH, MIN_LOOP_DEPTH, MIN_STACK_DEPTH, NUM_CF_OP_BITS, NUM_HD_OP_BITS,
NUM_LD_OP_BITS, OP_COUNTER_IDX, OP_SPONGE_RANGE, OP_SPONGE_WIDTH, PROGRAM_DIGEST_SIZE,
};
use core::{cmp, fmt};
#[cfg... | the_stack |
use diem_crypto::{
traits::{CryptoMaterialError, ValidCryptoMaterialStringExt},
x25519,
};
#[cfg(any(test, feature = "fuzzing"))]
use proptest::{collection::vec, prelude::*};
#[cfg(any(test, feature = "fuzzing"))]
use proptest_derive::Arbitrary;
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};... | the_stack |
use anyhow::Result;
use bitflags::bitflags;
use crate::algorithms::factor_weight::factor_iterators::{GallicFactorLeft, GallicFactorRight};
use crate::algorithms::factor_weight::{factor_weight, FactorWeightOptions, FactorWeightType};
use crate::algorithms::fst_convert::fst_convert_from_ref;
use crate::algorithms::tr_m... | the_stack |
// Render normal test function
pub fn render_test_func<I, B>(imports: I, func_body: B) -> String
where
I: core::fmt::Display,
B: core::fmt::Display,
{
format!(
r#"
(module
{IMPORTS}
(memory $mem 1)
(func $test (export "canister_update test") (local $i i32)... | the_stack |
pub mod load;
pub mod store;
use crate::codegen::{
function::instruction::Instruction as MachInstruction,
isa::x86_64::{
instruction::{InstructionData, Opcode, Operand as MO, OperandData},
register::{RegClass, RegInfo, GR32},
X86_64,
},
isa::TargetIsa,
lower::{Lower as Lower... | the_stack |
use cmd_lib::*;
use std::io::Read;
use std::{thread, time};
// Converted from bash script, original comments:
//
// pipes.sh: Animated pipes terminal screensaver.
// https://github.com/pipeseroni/pipes.sh
//
// Copyright (c) 2015-2018 Pipeseroni/pipes.sh contributors
// Copyright (c) 2013-2015 Yu-Jie Lin
// Copyright ... | the_stack |
use std::io;
use std::io::Write;
use std::os::unix::io::AsRawFd;
use crate::attr::{Attr, Color, Effect};
use crate::sys::size::terminal_size;
use term::terminfo::parm::{expand, Param, Variables};
use term::terminfo::TermInfo;
// modeled after python-prompt-toolkit
// term info: https://ftp.netbsd.org/pub/NetBSD/NetB... | the_stack |
use crate::runtime::array::Array;
use crate::runtime::{object::*, IsObjectRef, String as TString};
use super::attrs::Attrs;
use super::expr::BaseExprNode;
use super::function::BaseFuncNode;
use super::span::Span;
use super::ty::Type;
use tvm_macros::Object;
use tvm_rt::NDArray;
pub use super::expr::{GlobalVar, Globa... | the_stack |
// rust lints we want
#![warn(
bare_trait_objects,
elided_lifetimes_in_paths,
missing_copy_implementations,
missing_debug_implementations,
future_incompatible,
rust_2018_idioms,
trivial_numeric_casts,
variant_size_differences,
unreachable_pub,
unused,
missing_docs
)]
// all the clippy
#![warn(clip... | the_stack |
use crate::module_group::ModuleGroup;
use crate::{
intrinsics,
ir::ty::HirTypeCache,
ir::types as ir,
ir::{dispatch_table::DispatchTable, type_table::TypeTable},
value::Global,
};
use hir::{
ArithOp, BinaryOp, Body, CmpOp, Expr, ExprId, HirDatabase, HirDisplay, InferenceResult,
Literal, Logi... | the_stack |
use byteorder::{BigEndian, ByteOrder};
use cannyls::lump::LumpId;
use fibers_rpc::client::Options as RpcOptions;
use frugalos_raft::NodeId;
use libfrugalos::entity::object::ObjectVersion;
use libfrugalos::time::Seconds;
use raftlog::cluster::ClusterMembers;
use siphasher::sip::SipHasher;
use std::hash::{Hash, Hasher};
... | the_stack |
use itertools::izip;
use ndarray::array;
use ndarray::prelude::*;
use ndarray_stats::{
errors::{EmptyInput, MinMaxError, QuantileError},
interpolate::{Higher, Interpolate, Linear, Lower, Midpoint, Nearest},
Quantile1dExt, QuantileExt,
};
use noisy_float::types::{n64, N64};
use quickcheck_macros::quickcheck;... | the_stack |
use super::BitWindow;
#[derive(Debug, PartialEq)]
pub enum Error {
MissingBits(BitWindow),
Unhandled(BitWindow, usize),
}
#[derive(Clone, Debug)]
enum DecodeValue {
Partial(&'static HuffmanDecoder),
Sym(u8),
}
#[derive(Clone, Debug)]
struct HuffmanDecoder {
lookup: u32,
table: &'static [Decod... | the_stack |
use crate::npk::{
dm_verity::{append_dm_verity_block, Error as VerityError, VerityHeader, BLOCK_SIZE},
manifest::{Bind, Manifest, Mount, MountOption},
};
use ed25519_dalek::{
ed25519::signature::Signature, Keypair, PublicKey, SecretKey, SignatureError, Signer,
SECRET_KEY_LENGTH,
};
use itertools::Iterto... | the_stack |
use crate::{
exec::ExecutionContext,
grad::GradientContext,
graph::{merge_graphs, Node, NodeInner, NodeTag, Op},
init::Initialiser,
ops::{ExecutionError, GradientError, OpBuildError, OpBuilder, OpInstance, ShapePropError},
shape::{NodeAxis, NodeShape},
shape_prop::ShapePropContext,
};
use smallvec::SmallVec;
use... | the_stack |
use crate::process::*;
use crate::hubmsg::*;
use crate::hubrouter::*;
use crate::hubclient::*;
use crate::httpserver::*;
use crate::wasmstrip::*;
use serde::{Deserialize};
use std::sync::{Arc, Mutex};
use std::fs;
use std::sync::{mpsc};
use std::sync::mpsc::RecvTimeoutError;
use toml::Value;
use std::collections::Hash... | the_stack |
use crate::error::Error;
use crate::node_type::{Key, KeyValuePair, NodeType, Offset};
use crate::page::Page;
use crate::page_layout::{
FromByte, INTERNAL_NODE_HEADER_SIZE, INTERNAL_NODE_NUM_CHILDREN_OFFSET, IS_ROOT_OFFSET,
KEY_SIZE, LEAF_NODE_HEADER_SIZE, LEAF_NODE_NUM_PAIRS_OFFSET, NODE_TYPE_OFFSET,
PARENT... | the_stack |
use crate::ast::builder::*;
use crate::ast::*;
use std::default::Default;
use std::fmt;
use std::marker::PhantomData;
use std::rc::Rc;
use std::sync::Arc;
use void::Void;
/// A macro for defining a default builder, its boilerplate, and delegating
/// the `Builder` trait to its respective `CoreBuilder` type.
///
/// Th... | the_stack |
use std::any::Any;
use std::sync::Arc;
use common_arrow::arrow::array::ArrayRef;
use common_arrow::arrow::bitmap::MutableBitmap;
use common_arrow::arrow::compute::concatenate;
use common_exception::ErrorCode;
use common_exception::Result;
use crate::prelude::*;
use crate::Column;
use crate::ColumnRef;
use crate::Null... | the_stack |
use {interval, Interval, Builder, wheel};
use worker::Worker;
use wheel::{Token, Wheel};
use futures::{Future, Stream, Async, Poll};
use futures::task::{self, Task};
use std::{fmt, io};
use std::error::Error;
use std::time::{Duration, Instant};
/// A facility for scheduling timeouts
#[derive(Clone)]
pub struct Timer... | the_stack |
use cfg_if::cfg_if;
#[cfg(feature = "google-pubsub")]
use crate::instrumentation::google_pubsub::{create_google_pubsub_wrapper, PubsubConfig};
cfg_if! {
if #[cfg(feature = "monitoring")] {
use interledger::errors::ApiError;
use secrecy::{ExposeSecret, SecretString};
use tracing::debug_span... | the_stack |
use std::collections::*;
//use call_tree::{TreeArena, NodeId};
use std::collections::hash_map::Entry;
use time::Duration;
use std::net::{TcpStream, ToSocketAddrs, Shutdown};
use resp::Value;
use std::io::{Write, Read, BufReader, Error, ErrorKind};
use std::str::from_utf8;
use std::io;
use chrono::Local;
use flare_utils... | the_stack |
use std::{collections::BTreeMap, path::Path};
use cargo_toml::{
Badges, Dependency, DependencyDetail, DepsSet, Edition, FeatureSet,
Manifest, Package, PatchSet, Product, Profiles, Publish, Resolver,
TargetDepsSet, Workspace,
};
use legion::{Query, systems::CommandBuffer, world::SubWorld};
use crate::{BuildC... | the_stack |
use {
crate::common_operations::allowed_ops,
crate::target::{AvailableTargets, TargetOps},
clap::{App, Arg},
log::error,
std::{env, ffi::OsString, ops::RangeInclusive},
thiserror::Error,
};
#[derive(Debug, Error, PartialEq)]
pub enum Error {
#[error("Operation not supported for the target."... | the_stack |
use crate::{
info_structures::{ArgType, FieldType, Options, StructInfo},
utils::to_class_case,
};
use proc_macro2::{Ident, TokenStream};
use quote::{format_ident, quote};
use syn::Error;
pub fn create_try_builder_and_constructor(
info: &StructInfo,
options: Options,
make_async: bool,
) -> Result<(I... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.