text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use std::collections::VecDeque;
use super::super::{
Combinator, ComplexSelector, ComplexSelectorComponent, CompoundSelector, Pseudo, SimpleSelector,
};
/// Returns the contents of a `SelectorList` that matches only elements that are
/// matched by both `complex_one` and `complex_two`.
///
/// If no such list can ... | the_stack |
use std::cell::RefCell;
use std::f32::consts::PI;
use neon::prelude::*;
use skia_safe::{Path, Point, PathDirection, Rect, Matrix, PathOp, StrokeRec,};
use skia_safe::{PathEffect, trim_path_effect};
use skia_safe::path::{self, AddPathMode, Verb, FillType};
use crate::utils::*;
pub type BoxedPath2D = JsBox<RefCell<Path... | the_stack |
use crate::{
counter::Counter,
random,
recovery::{
congestion_controller::{self, CongestionController},
cubic::{FastRetransmission::*, State::*},
hybrid_slow_start::HybridSlowStart,
pacing::Pacer,
RttEstimator,
},
time::Timestamp,
};
use core::{
cmp::{max,... | the_stack |
use crate::consts::VIEWPORT_ROTATE_SNAP_INTERVAL;
pub use crate::document::layer_panel::*;
use crate::document::DocumentMessage;
use crate::input::keyboard::Key;
use crate::message_prelude::*;
use crate::{
consts::{VIEWPORT_SCROLL_RATE, VIEWPORT_ZOOM_LEVELS, VIEWPORT_ZOOM_MOUSE_RATE, VIEWPORT_ZOOM_SCALE_MAX, VIEWPORT_... | the_stack |
use crate::data::error_info::ErrorInfo;
use crate::data::position::Position;
use crate::data::{
ast::Interval,
literal::ContentType,
message::Message,
primitive::{
tools_crypto, tools_jwt, tools_smtp, tools_time, Data, MessageData, Primitive,
PrimitiveArray, PrimitiveBoolean, PrimitiveIn... | the_stack |
pub struct ListApplicationInstanceDependenciesPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::list_application_instance_dependen... | the_stack |
mutable_transmutes,
non_camel_case_types,
non_snake_case,
non_upper_case_globals
)]
use std::ffi::{CStr, CString};
use std::ptr;
use std::collections::HashMap;
// HtTable implements defers to a normal std::collections::HashMap
// but tracks the iteration order of dvipdfmx's ht_table for backwards compat
... | the_stack |
#[macro_use]
extern crate bitflags;
use std::os::raw::{c_char, c_uchar, c_int, c_float, c_void};
pub const FONS_INVALID: c_int = -1;
pub type NVGcontext = c_void;
// No reason to use a union here, since the nanovg guys
// only used it for convenience.
#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq)]
pub struct N... | the_stack |
//! `ScrollBar` control
use std::fmt::Debug;
use super::{DragHandle, ScrollRegion};
use kas::{event, prelude::*};
/// A scroll bar
///
/// Scroll bars allow user-input of a value between 0 and a defined maximum,
/// and allow the size of the handle to be specified.
#[derive(Clone, Debug, Default, Widget)]
#[handler(... | the_stack |
use super::hal;
use embedded_hal::{adc::OneShot, blocking::spi::Transfer};
use serde::{Deserialize, Serialize};
pub mod attenuators;
pub mod dds_output;
pub mod hrtimer;
pub mod rf_power;
#[cfg(feature = "pounder_v1_1")]
pub mod timestamp;
pub enum GpioPin {
Led4Green = 0,
Led5Red = 1,
Led6Green = 2,
... | the_stack |
use smartnoise_validator::errors::*;
use crate::utilities;
use smartnoise_validator::Float;
use crate::utilities::{noise};
use smartnoise_validator::components::gaussian_mechanism::get_analytic_gaussian_sigma;
use std::ops::{Div};
/// Returns noise drawn according to the Laplace mechanism
///
/// Noise is drawn with ... | the_stack |
use std::sync::Arc;
use async_trait::async_trait;
use common_exception::ErrorCode;
use common_meta_api::KVApi;
use common_meta_types::GetKVActionReply;
use common_meta_types::KVMeta;
use common_meta_types::MGetKVActionReply;
use common_meta_types::MatchSeq;
use common_meta_types::PrefixListReply;
use common_meta_types... | the_stack |
use crate::kalk_value::KalkValue;
use lazy_static::lazy_static;
use std::collections::HashMap;
use FuncType::*;
#[cfg(feature = "rug")]
pub mod with_rug;
#[cfg(feature = "rug")]
pub use with_rug::funcs::*;
#[cfg(feature = "rug")]
pub use with_rug::*;
#[cfg(not(feature = "rug"))]
pub mod regular;
#[cfg(not(feature = "... | the_stack |
use crate::address::MoneroAddress;
use crate::format::MoneroFormat;
use crate::network::MoneroNetwork;
use crate::public_key::MoneroPublicKey;
use wagyu_model::{no_std::Vec, Address, AddressError, PrivateKey, PrivateKeyError, PublicKey};
use core::{fmt, fmt::Display, marker::PhantomData, str::FromStr};
use curve25519_... | the_stack |
use super::{Action, ComputedTarget, Dependency, Label, Target};
use anyhow::{anyhow, Context};
use daggy::{Dag, NodeIndex};
use dashmap::DashMap;
use log::debug;
use petgraph::dot;
use petgraph::{stable_graph::StableDiGraph, Direction};
use std::collections::HashMap;
use std::path::PathBuf;
use zap_buildscript::*;
///... | the_stack |
use crate::common::fio_run_verify;
use common::compose::Builder;
use composer::{Binary, ComposeTest, ContainerSpec, RpcHandle};
use etcd_client::Client;
use rpc::mayastor::{
AddChildNexusRequest,
BdevShareRequest,
BdevUri,
Child,
ChildState,
CreateNexusRequest,
CreateReply,
DestroyNexusR... | the_stack |
use super::RgbVertex;
use voxel_rs_common::data::vox::VoxelModel;
/// Data structure used to draw a pre-loaded model
/// Contains the position, scale and its id in the model registry
pub struct Model {
/// Id in the model registry
pub mesh_id: u32,
pub pos_x: f32,
pub pos_y: f32,
pub pos_z: f32,
... | the_stack |
use kvm_bindings::{
kvm_create_device, kvm_device_attr, kvm_device_type_KVM_DEV_TYPE_ARM_VGIC_V2,
kvm_device_type_KVM_DEV_TYPE_ARM_VGIC_V3, KVM_DEV_ARM_VGIC_CTRL_INIT,
KVM_DEV_ARM_VGIC_GRP_ADDR, KVM_DEV_ARM_VGIC_GRP_CTRL, KVM_DEV_ARM_VGIC_GRP_NR_IRQS,
KVM_VGIC_V2_ADDR_TYPE_CPU, KVM_VGIC_V2_ADDR_TYPE_DIS... | the_stack |
use crate::error::IoResult;
use crate::math::Vec2;
#[allow(unused)]
#[inline]
pub fn encode(buffer: &mut [u16], count: Vec2<usize>, size: Vec2<usize>, max_value: u16) -> IoResult<()> {
if is_14_bit(max_value) { encode_14_or_16_bit(buffer, count, size, true) }
else { encode_14_or_16_bit(buffer, count, size, fal... | the_stack |
mod tests {
use std::convert::TryFrom;
use chrono::{FixedOffset, NaiveDate, NaiveDateTime, NaiveTime, TimeZone};
use bolt_proto::{message::*, value::*, version::*, ServerState::*};
use crate::{client::v1::tests::*, error::CommunicationError, skip_if_handshake_failed};
#[tokio::test]
async fn... | the_stack |
use either::Either;
use heck::{CamelCase, SnakeCase};
use itertools::Itertools;
use log::debug;
use multimap::MultiMap;
use prost_types::field_descriptor_proto::{Label, Type};
use prost_types::source_code_info::Location;
use prost_types::{
DescriptorProto, FieldDescriptorProto, FileDescriptorProto, FileDescriptorSe... | the_stack |
extern crate data_encoding;
extern crate linked_hash_map;
extern crate rand;
#[macro_use]
extern crate log;
extern crate byteorder;
use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
use data_encoding::BASE64URL_NOPAD;
use linked_hash_map::LinkedHashMap;
use rand::RngCore;
use std::collections::{HashMap, HashSet}... | the_stack |
mod command;
mod error;
mod handle;
mod looping;
mod mode;
mod queue;
mod state;
pub use self::{command::*, error::*, handle::*, looping::*, mode::*, queue::*, state::*};
use crate::{constants::*, driver::tasks::message::*, events::EventStore, input::Input};
use flume::{Receiver, TryRecvError};
use std::time::Duratio... | the_stack |
mod db;
mod fmt;
pub mod plot;
// Re-exports.
pub use db::{ExperimentData, LatencyPrecision, ResultsDB, Search};
pub use fmt::PlotFmt;
use color_eyre::eyre::WrapErr;
use color_eyre::Report;
use fantoch::client::KeyGen;
// use fantoch::executor::ExecutorMetricsKind;
use fantoch::id::ProcessId;
use fantoch::protocol::P... | the_stack |
use crate::{ComparisonOp, LinearExpr, OptimizationDirection, Problem, Variable};
use std::{
collections::{HashMap, HashSet},
io,
};
/// A linear programming problem parsed from an MPS file.
#[derive(Clone)]
pub struct MpsFile {
/// Value of the NAME field.
pub problem_name: String,
/// A mapping of... | the_stack |
use super::macros::{ExpressionMacroInvocation, MacroDefinition};
use num_bigint::BigInt;
use snafu::OptionExt;
use snafu::{Backtrace, Snafu};
use std::collections::HashMap;
use std::fmt::{self, Debug};
/// An error that arises when an expression cannot be evaluated.
#[derive(Snafu, Debug)]
#[snafu(visibility = "pub")]... | the_stack |
use crate::lazy_tree::LazyTree;
use ic_crypto_tree_hash::{
self as crypto, hasher::Hasher, Digest, Label, LabeledTree, WitnessBuilder,
};
use std::collections::VecDeque;
use std::fmt;
use std::ops::Range;
const EMPTY_HASH: Digest = Digest([
0x4e, 0x3e, 0xd3, 0x5c, 0x4e, 0x2d, 0x1e, 0xe8, 0x99, 0x96, 0x48, 0x3f... | the_stack |
use bio::stats::*;
use errors::*;
use hashbrown::HashMap;
//use util::*;
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
pub struct Genotype(pub u8, pub u8);
#[derive(Debug, Clone)]
pub struct GenotypeProbs {
pub tab: Vec<Vec<LogProb>>,
}
impl GenotypeProbs {
pub fn zeros(n_alleles: usize) -> GenotypeProbs {
... | the_stack |
use crate::{cargo_cli::CargoCli, output::OutputOpts};
use camino::{Utf8Path, Utf8PathBuf};
use color_eyre::eyre::{bail, Result, WrapErr};
use colored::Colorize;
use guppy::{
graph::{PackageGraph, PackageSet},
MetadataCommand,
};
use hakari::{
cli_ops::{HakariInit, WorkspaceOps},
diffy::PatchFormatter,
... | the_stack |
use std::borrow::Borrow;
use std::fmt::Debug;
use std::fs::{read, File};
use std::hash::Hash;
use std::io::BufWriter;
use std::path::Path;
use std::sync::Arc;
use anyhow::{Context, Result};
use crate::algorithms::compose::compose_filters::{ComposeFilter, ComposeFilterBuilder};
use crate::algorithms::compose::filter_s... | the_stack |
mutable_transmutes,
non_camel_case_types,
non_snake_case,
non_upper_case_globals
)]
use super::dpx_numbers::GetFromFile;
use crate::dpx_pdfobj::{pdf_stream, STREAM_COMPRESS};
use crate::dpx_truetype::SfntTableInfo;
use std::rc::Rc;
use std::io::{Read, Seek, SeekFrom};
pub(crate) trait PutBE<T> {
fn p... | the_stack |
use super::super::*;
extern crate byteorder;
use self::byteorder::{ByteOrder, BigEndian, ReadBytesExt, WriteBytesExt};
///Udp header according to rfc768.
#[derive(Clone, Debug, Eq, PartialEq, Default)]
pub struct UdpHeader {
///Source port of the packet (optional).
pub source_port: u16,
///Destination por... | the_stack |
use anyhow::bail;
use clap::{arg_enum, Error, ErrorKind};
use std::ffi::OsString;
use std::path::PathBuf;
use structopt::StructOpt;
// By default we configure CBMC to use 16 bits to represent the object bits in pointers.
const DEFAULT_OBJECT_BITS: u32 = 16;
#[derive(Debug, StructOpt)]
#[structopt(
name = "kani",
... | the_stack |
use crate::{Twips, Point2};
use pathfinder_color::ColorU;
use pathfinder_content::stroke::{LineJoin, LineCap};
use pathfinder_renderer::paint::Paint;
use std::cmp::Ordering;
use std::mem;
use swf_types::tags::DefineShape;
use swf_types::{CapStyle, FillStyle, JoinStyle, LineStyle, ShapeRecord, StraightSRgba8, Vector2D}... | the_stack |
use core::ptr::NonNull;
use crate::{
dag::*,
defs::Defs,
dll::*,
upcopy::*,
};
use sp_std::{
collections::btree_map::BTreeMap,
mem,
vec::Vec,
};
use alloc::string::String;
enum Single {
Lam(Var),
Slf(Var),
Fix(Var),
Dat,
Cse,
}
enum Branch {
All(NonNull<All>),
App(NonNull<App>),
Ann(N... | the_stack |
mod stateful;
mod slice;
pub mod data_source;
use std::io;
use std::ops;
use std::ptr;
use std::cell::Cell;
use types::{Input, ParseResult};
use types::Buffer as InputBuffer;
use primitives::Guard;
pub use self::slice::SliceStream;
pub use self::data_source::{DataSource, RWDataSource};
pub use self::stateful::Sour... | the_stack |
use std::cell::{Cell, RefCell};
use std::collections::{HashMap, HashSet};
use std::error;
use std::fmt;
use std::rc::Rc;
use crate::ast;
use crate::core::*;
use crate::spans::{Span, SpannedError as SyntaxError};
type Result<T> = std::result::Result<T, SyntaxError>;
#[derive(Clone)]
enum Scheme {
Mono(Value),
... | the_stack |
#[cfg(test)]
mod tests {
use crate::nom_data_test::{execute_test, walk, TestData};
use crate::quorum::joint::JointConfig;
use crate::quorum::majority::MajorityConfig;
use crate::quorum::quick_test::alternative_majority_committed_index;
use crate::quorum::quorum::{to_string, AckedIndexer, Index, MapA... | the_stack |
// this ensures that crate users generating docs with --no-deps will still
// properly get links to the public docs for haybale's types
// it was especially necessary when the docs.rs docs weren't working for any
// llvm-sys consumers; now that we have docs.rs as the official docs, I'm not
// sure if this is necessary ... | the_stack |
use datafusion::parquet::{
basic::LogicalType,
file::reader::{FileReader, SerializedFileReader},
schema::types::Type,
};
use datafusion::{
arrow::datatypes::Schema,
catalog::{catalog::CatalogProvider, schema::SchemaProvider},
datasource::{
datasource::{Statistics, TableProviderFilterPush... | the_stack |
mod abi;
mod r#enum;
mod function;
mod impl_trait;
mod monomorphize;
mod storage;
mod r#struct;
mod r#trait;
mod variable;
pub use abi::*;
pub use function::*;
pub use impl_trait::*;
pub(crate) use monomorphize::*;
pub use r#enum::*;
pub use r#struct::*;
pub use r#trait::*;
pub use storage::*;
pub use variable::*;
us... | the_stack |
use id_arena::{Arena, Id};
use sericum::types;
use std::ops::{Index, IndexMut};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Sign {
Signed,
Unsigned,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum StorageClass {
Typedef,
Extern,
Static,
Auto,
Register,
}
#[de... | the_stack |
use std::collections::HashMap;
use std::iter::once;
use resiter::map::*;
use sophia_api::term::matcher::AnyOrExactly;
use sophia_api::term::{CopyTerm, TTerm};
use sophia_term::*;
use crate::graph::*;
use crate::triple::*;
/// A map associating variable names to [`RcTerm`]s.
pub type BindingMap = HashMap<String, RcTe... | the_stack |
use std::cell::RefCell;
use std::collections::{HashMap, HashSet, VecDeque};
use crate::{WorkerId, ChannelId, Tag};
use crate::dataflow::Dataflow;
use crate::common::Port;
use crate::operator::{Operator, Notification};
use crate::channel::eventio::{EventsBuffer, EventCaster};
use crate::channel::{Edge, IOResult};
use cr... | the_stack |
mod arch;
#[cfg(target_arch = "arm")]
#[path = "arm.rs"]
mod arch;
#[cfg(target_arch = "mips")]
#[path = "mips.rs"]
mod arch;
#[cfg(target_arch = "mips64")]
#[path = "mips64.rs"]
mod arch;
#[cfg(target_arch = "powerpc")]
#[path = "powerpc.rs"]
mod arch;
#[cfg(target_arch = "powerpc64")]
#[path = "powerpc64.rs"]
mo... | the_stack |
use std::path::PathBuf;
use actix::prelude::*;
use derivative::Derivative;
use thiserror::Error;
use augmented::audio::gc::Shared;
use augmented::gui::iced::{Command, Element, Subscription};
use plugin_host_lib::audio_io::{
LoadPluginMessage, ReloadPluginMessage, SetAudioFilePathMessage, StartMessage, StopMessage... | the_stack |
/// Enigma runtime implementation
#[macro_use]
extern crate sgx_tstd as std;
extern crate sgx_types;
extern crate sgx_trts;
#[macro_use]
extern crate serde_json;
#[macro_use]
extern crate enigma_tools_t;
extern crate enigma_crypto;
extern crate enigma_types;
extern crate json_patch;
extern crate rmp_serde as rmps;
exte... | the_stack |
use std::collections::HashMap;
use std::fs::File;
use comfy_table::{Attribute, Cell, CellAlignment, Color, ContentArrangement, Table};
use epub_builder::{EpubBuilder, EpubContent, TocElement, ZipLibrary};
use html5ever::tendril::fmt::Slice;
use indicatif::{ProgressBar, ProgressStyle};
use kuchiki::NodeRef;
use log::{d... | the_stack |
use crate::baseclient::ClientCoding;
use crate::server_suite::coding::CodingItem;
use anyhow::Result;
use ring::aead;
use ring::aead::{Nonce, NonceSequence};
use ring::error::Unspecified;
use ring::hkdf;
use ring::rand::{SecureRandom, SystemRandom};
const KEYSIZE: usize = 32;
#[derive(Clone, Debug, PartialEq)]
pub st... | the_stack |
use std::{backtrace::Backtrace, collections::HashMap, sync::Arc};
use super::extended::PreparedStatement;
use crate::{
compile::{
convert_statement_to_cube_query,
parser::{parse_sql_to_statement, parse_sql_to_statements},
CompilationError, MetaContext, QueryPlan,
},
sql::{
d... | the_stack |
//! A helper module to probe the Windows Registry when looking for
//! windows-specific tools.
use std::process::Command;
use crate::Tool;
#[cfg(windows)]
use crate::ToolFamily;
#[cfg(windows)]
const MSVC_FAMILY: ToolFamily = ToolFamily::Msvc { clang_cl: false };
/// Attempts to find a tool within an MSVC installat... | the_stack |
use async_recursion::async_recursion;
use async_trait::async_trait;
use colored::*;
use nix::sys::signal::Signal;
use std::{
collections::{HashMap, HashSet},
path::{Path, PathBuf},
time::Instant,
};
use structopt::StructOpt;
use tokio::io::{empty, AsyncRead, AsyncReadExt};
#[derive(StructOpt, Clone)]
pub s... | the_stack |
use std::collections::BTreeMap;
use serde_derive::{Deserialize, Serialize};
use serde_json::{json, Value};
use crate::error::{ArrowError, Result};
use super::DataType;
/// Contains the meta-data for a single relative type.
///
/// The `Schema` object is an ordered collection of `Field` objects.
#[derive(Serialize, ... | the_stack |
use serde::Serialize;
use std::cmp;
use std::io::Write;
use std::result::Result;
use std::sync::atomic::AtomicUsize;
use std::sync::Arc;
use std::time::Duration;
use ::timerfd::{ClockId, SetTimeFlags, TimerFd, TimerState};
use ::logger::{error, IncMetric, METRICS};
use ::utils::eventfd::EventFd;
use ::virtio_gen::vir... | the_stack |
use anyhow::{anyhow, Result};
use futures::{StreamExt, TryStreamExt};
use k8s_openapi::apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinition;
use kube::{
api::{
Api, ApiResource, DeleteParams, DynamicObject, GroupVersionKind, ListParams, Patch, PatchParams,
PostParams, Watc... | the_stack |
use anyhow::{Context, Result};
use electrs_rocksdb as rocksdb;
use std::path::{Path, PathBuf};
use std::sync::atomic::{AtomicBool, Ordering};
pub(crate) type Row = Box<[u8]>;
#[derive(Default)]
pub(crate) struct WriteBatch {
pub(crate) tip_row: Row,
pub(crate) header_rows: Vec<Row>,
pub(crate) funding_ro... | the_stack |
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateJobExecutionOutput {
/// <p>A JobExecutionState object.</p>
pub execution_state: std::option::Option<crate::model::JobExecutionState>,
/// <p>The contents of the Job ... | the_stack |
//! Pushes predicates down through other operators.
//!
//! This action generally improves the quality of the query, in that selective per-record
//! filters reduce the volume of data before they arrive at more expensive operators.
//!
//!
//! The one time when this action might not improve the quality of a query is
//... | the_stack |
use crate::ndarray_ext::NdArray;
#[cfg(feature = "mkl")]
use crate::ndarray_ext::{get_batch_ptrs, get_batch_ptrs_mut};
#[cfg(feature = "mkl")]
use crate::ops::mkl_ffi::*;
use crate::same_type;
use crate::tensor::Tensor;
use crate::Float;
use crate::NdArrayView;
use crate::{op, NdArrayViewMut};
use ndarray;
#[cfg(featur... | the_stack |
use crate::xxx::big;
use crate::xxx::big::BIG;
use crate::xxx::ecp;
use crate::xxx::fp::FP;
use crate::xxx::fp2::FP2;
use crate::xxx::fp4::FP4;
use crate::xxx::rom;
pub const ZERO: usize = 0;
pub const ONE: usize = 1;
pub const SPARSEST: usize = 2;
pub const SPARSER: usize = 3;
pub const SPARSE: usize = 4;
pub const D... | the_stack |
use crate::limits::MAX_WASM_FUNCTION_LOCALS;
use crate::primitives::{MemoryImmediate, Operator, SIMDLaneIndex, Type, TypeOrFuncType};
use crate::{BinaryReaderError, Result, WasmFeatures, WasmFuncType, WasmModuleResources};
/// A wrapper around a `BinaryReaderError` where the inner error's offset is a
/// temporary pla... | the_stack |
use std::collections::HashMap;
use std::fs::File;
use std::path::Path;
use std::str::FromStr;
use std::sync::Arc;
use std::time::SystemTime;
use cron;
use indexmap::IndexMap;
use itertools::Itertools;
use num_cpus;
use serde::Deserialize;
use serde_yaml;
use crate::models::*;
pub fn load(config_path: &str) -> Arc<Co... | the_stack |
//! Depth and stencil operations description.
//!
//! After the fragment shader has finished running, each fragment goes through the depth, depth
//! bounds and stencil tests.
//!
//! The depth test passes of fails depending on how the depth value of each fragment compares
//! to the existing depth value in the depth b... | the_stack |
use rustc_ast::{InlineAsmOptions, InlineAsmTemplatePiece};
use rustc_hir as hir;
use rustc_hir::def::CtorKind;
use rustc_hir::def_id::DefId;
use rustc_hir::RangeEnd;
use rustc_index::newtype_index;
use rustc_index::vec::IndexVec;
use rustc_middle::infer::canonical::Canonical;
use rustc_middle::middle::region;
use rustc... | the_stack |
use self::puncher::Puncher;
pub use self::rendezvous_client::UdpRendezvousClient;
use mio::Poll;
use mio::Token;
use socket_collection::UdpSock;
use sodium::crypto::box_;
use std::any::Any;
use std::cell::RefCell;
use std::collections::HashSet;
use std::fmt::{self, Debug, Formatter};
use std::mem;
use std::net::{Ipv4Ad... | the_stack |
#![allow(unused_imports)]
#![allow(dead_code)]
#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
//#![feature(const_slice_len)]
use std::fmt;
use std::ops::{Index,IndexMut,Add,Sub,Mul,BitAnd,BitOr,BitXor,Not};
type float_t = f64;
// use std::f64::consts::PI;
const PI: float_... | the_stack |
pub mod memreader;
pub mod windows;
use std::fs::File;
use std::io::{Read, Write};
use std::ops::Range;
use std::collections::{HashSet, HashMap};
use crate::memreader::{MemReader, Address};
use crate::windows::*;
/// Get a HashMap of the current user modules key'd by their address range with
/// value of their base... | the_stack |
use flo_binding::*;
use super::viewmodel::*;
use super::controller::*;
use super::viewmodel_update::*;
use std::collections::{HashSet, HashMap};
use std::sync::*;
lazy_static! {
// View model used when there is no view model
pub static ref NULL_VIEW_MODEL: Arc<NullViewModel> = Arc::new(NullViewModel::new());... | the_stack |
extern crate fnv;
use fnv::FnvHashMap;
use std::env;
use std::io::BufReader;
use std::io::BufRead;
use std::fs::File;
static DEBUG: bool = false;
static DEBUG_CELL: &str = "ACGGGTCGTTCCACGG-1";
fn main() {
let args: Vec<String> = env::args().collect();
let calls_file = &args[1];
let cluster_file = &args[2... | the_stack |
use serde_json::value::{Number, Value};
use std::cell::{Cell, RefCell};
use std::mem;
use std::ops::Index;
use std::rc::{Rc, Weak};
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum ContainerState {
Expanded,
Inlined,
Collapsed,
}
#[derive(Debug)]
pub struct JNode {
pub value: JValue,
pub par... | the_stack |
use std::fs::{DirBuilder, File};
use std::path::Path;
use ark_crypto_primitives::CircuitSpecificSetupSNARK;
use ark_ec::{PairingEngine, ProjectiveCurve};
use ark_groth16::{Groth16, Proof, ProvingKey, VerifyingKey};
use ark_mnt4_753::{Fr as MNT4Fr, G1Projective as G1MNT4, G2Projective as G2MNT4, MNT4_753};
use ark_mnt6... | the_stack |
use crate::core::config::DatasourceCfg;
use crate::core::feature::Feature;
use crate::core::layer::Layer;
use crate::core::Config;
use crate::datasource::postgis_fields::FeatureRow;
use crate::datasource::DatasourceType;
use native_tls::TlsConnector;
use postgres::types::{self, ToSql};
use postgres::NoTls;
use postgres... | the_stack |
use super::*;
use crate::error::FontError;
use elefont::{CacheError, FontCache, FontProvider, PixelType, Texture, TextureGlyph};
use std::iter;
#[cfg(feature = "ttf")]
use std::path::Path;
#[cfg(feature = "ttf")]
/// VectorFonts allow drawing characters from TTF files
///
/// They store the glyphs as a collection of ... | the_stack |
use super::engine::Transaction;
use super::parser::format_ident;
use super::types::{DataType, Value};
use crate::error::{Error, Result};
use serde_derive::{Deserialize, Serialize};
use std::fmt::{self, Display};
/// The catalog stores schema information
pub trait Catalog {
/// Creates a new table
fn create_ta... | the_stack |
// Copyright (c) 2015 Rustcc developers
// 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, publis... | the_stack |
//! Some canisters may want to use randomness, for example a lottery canister.
//! Since a canister is executed on many replicas and we want the different
//! replicas to have the same state, we must use agreed-upon pseudo-randomness.
//! The RandomTape fulfills this purpose. The RandomTapeMaker is responsible for
//! ... | the_stack |
use crate::bba::timing::BBATiming;
use crate::bba::bbastruct::*;
use crate::bba::idstring::*;
use crate::bba::idxset::*;
use crate::bba::tiletype::*;
use crate::chip::*;
use crate::database::*;
use crate::pip_classes::classify_pip;
use itertools::Itertools;
use std::collections::{BTreeSet, HashMap};
use std::convert:... | the_stack |
use relay_general::protocol::{Event, EventType};
use crate::{CspFilterConfig, FilterStatKey};
/// Checks if the event is a CSP Event from one of the disallowed sources.
pub fn matches<It, S>(event: &Event, disallowed_sources: It) -> bool
where
It: IntoIterator<Item = S>,
S: AsRef<str>,
{
if event.ty.value... | the_stack |
// Copyright (c) 2018-2021 The orion Developers
// 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... | the_stack |
// Bit flags passed to the "info" parameter of the iter function which
// provides additional information about the data
const SPACE: u8 = 1 << 1;
const STRING: u8 = 1 << 2;
static TABLE: [u8; 256] = {
let mut table = [0; 256];
table[b'\t' as usize] |= SPACE;
table[b'\n' as usize] |= SPACE;
table[b'\r... | the_stack |
pub mod merkle_state;
use std::collections::{HashMap, HashSet, VecDeque};
use std::convert::TryFrom;
use std::fmt;
use std::sync::{
mpsc::{channel, Receiver, Sender, TryRecvError},
Arc,
};
use std::time::{Duration, Instant, SystemTime};
use protobuf::Message;
use sawtooth::receipt::store::ReceiptStore;
use sa... | the_stack |
extern crate fixedbitset;
use std::cell::RefCell;
use std::collections::HashMap;
use std::collections::HashSet;
use std::rc::Rc;
use crate::charclasses::CharClasses;
use crate::charclasses::Interval;
use crate::dfa::DFA;
use crate::scanner::RepetitionKind;
use crate::scanner::{Action, IRKind, IR};
use self::fixedbit... | the_stack |
mod error_types;
pub use error_types::*;
use chrono::{DateTime, Local};
use http::header::HeaderValue;
use once_cell::sync::Lazy;
use regex::Regex;
use serde::{ser::Serializer, Serialize};
use serde_json::error::Category;
use serde_json::{Map, Value};
use std::{
error::Error as StdError,
fmt::{self, Display},
... | the_stack |
use crate::{ShellCmdApi,CommonEnv};
use xous_ipc::String;
//use core::convert::TryFrom;
use codec::*;
use xous::MessageEnvelope;
#[derive(Debug)]
pub struct Audio {
codec: codec::Codec,
sample: xous::MemoryRange,
header: Header,
raw_data: *const u32,
raw_len_bytes: u32,
play_ptr_bytes: usize,
... | the_stack |
//! Diff build is a new multi-layers image build workflow that allows
//! multiple directory paths to be passed into the builder at once as
//! arguments, e.g.
//! ```
//! nydus-image create ... --source-type diff \
//! /path/to/snapshot.1 /path/to/snapshot.2 ... /path/to/snapshot.N
//! ```
//!
//! or
//!
//! nydus-i... | the_stack |
use airtable_api::User as AirtableUser;
use anyhow::Result;
use async_trait::async_trait;
use chrono::{naive::NaiveDate, DateTime, Utc};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use crate::repos::FromUrl;
/// Define the trait for doing logic in updating Airtable.
#[async_trait]
pub trait UpdateA... | the_stack |
use csv;
use itertools::*;
use log::error as lerror;
use log::*;
use nom::*;
use std::fs;
use std::fs::File;
use std::io;
use std::io::prelude::*;
use std::path::Path;
use std::path::PathBuf;
use std::process::{Command, Output};
use std::str::{from_utf8_unchecked, FromStr};
use x86::cpuid;
pub type Node = u64;
pub typ... | the_stack |
use crate::{
components::{font_awesome, modal, Placement},
extensions::{MergeAttrs as _, NodeExt as _},
generated::css_classes::C,
key_codes,
page::{
snapshot::{get_fs_names, help_indicator},
RecordChange,
},
GMsg, RequestExt,
};
use iml_graphql_queries::{snapshot, Response};... | the_stack |
use std::str;
use std::fmt;
use std::fmt::Write;
use std::iter::Iterator;
use std::string::String;
use types::*;
#[derive(Debug, PartialEq)]
pub struct Formatter<'a, 'b> {
pub key: &'a str,
fill: char,
align: Alignment, // default Right for numbers, Left for strings
sign: Sign,
alternate: bool,
... | the_stack |
use crate::cx::*;
use std::ffi;
use winapi::shared::{dxgiformat};
use winapi::um::{d3d11, d3dcommon};
use wio::com::ComPtr;
#[derive(Clone)]
pub struct CxPlatformShader {
pub geom_vbuf: D3d11Buffer,
pub geom_ibuf: D3d11Buffer,
pub pixel_shader: ComPtr<d3d11::ID3D11PixelShader>,
pub vertex_shader: ComPt... | the_stack |
use crate::board_message::*;
use crate::board_simulator::*;
use crate::event::*;
use crate::sounds::*;
use zzt_file_format::*;
use zzt_file_format::dosstring::DosString;
use std::fmt::Debug;
/// This is a description of one mutating operation to perform on the BoardSimulator.
#[derive(Debug, Clone)]
pub enum Action {... | the_stack |
use llvm_sys;
use std::ffi::CString;
use crate::ast::IterKind::*;
use crate::ast::*;
use crate::error::*;
use crate::runtime::WeldRuntimeErrno;
use crate::sir::*;
use self::llvm_sys::core::*;
use self::llvm_sys::prelude::*;
use self::llvm_sys::{LLVMIntPredicate, LLVMLinkage};
use crate::codegen::llvm2::llvm_exts::L... | the_stack |
use std::convert::Infallible;
use std::fmt::Display;
use std::net::SocketAddr;
use std::sync::mpsc::Sender;
use std::sync::Arc;
use std::time::Duration;
use chrome_devtools as protocol;
use futures_util::future::TryFutureExt;
use futures_util::sink::SinkExt;
use futures_util::stream::{SplitStream, StreamExt};
use htt... | the_stack |
use std::cell::RefCell;
use std::rc::Rc;
use crate::{action_kind, AreaMouseover};
use sulis_core::image::Image;
use sulis_core::io::{DrawList, GraphicsRenderer};
use sulis_core::resource::{ResourceSet, Sprite};
use sulis_core::ui::{animation_state, Cursor, LineRenderer, Theme, Widget};
use sulis_core::util::{Offset, R... | the_stack |
use std::net::Ipv4Addr;
use std::str::FromStr;
use std::sync::Arc;
use std::thread;
use anyhow::{anyhow, bail, Context};
use argh::FromArgs;
use base::validate_raw_descriptor;
use base::{error, warn, Event, RawDescriptor};
use cros_async::{EventAsync, Executor, IntoAsync, IoSourceExt};
use futures::future::{AbortHandl... | the_stack |
extern crate test;
extern crate simd;
use test::black_box as bb;
use test::Bencher as B;
use simd::f32x4;
#[cfg(target_feature = "avx")]
use simd::x86::avx::{f32x8, f64x4};
// #[cfg(target_feature = "avx2")]
// use simd::x86::avx2::Avx2F32x8;
#[bench]
fn multiply_naive(b: &mut B) {
let x = [[1.0_f32; 4]; 4];
... | the_stack |
use crate::cpu::{test_fixture::TestCpu, Interconnect};
use asm6502::assemble;
// TODO: Consolidate duplicated logic in the assert macros
/// # Executes a test fixture that asserts bytes read and cycles executed
///
/// The CPU fixture is created with the following state:
///
/// * The program counter is set to 0x20... | the_stack |
use nom::{Err as NomErr, is_space};
use nom::verbose_errors::Context;
use ast::{Float, Int};
use ast::Span;
use errors::*;
use source::SourceCode;
use tokenizer::token_parser::read_token;
mod token_parser;
#[derive(PartialEq, Debug, Clone)]
pub enum Token {
Id(String),
UpperId(String),
BinaryOperator(Str... | the_stack |
//! SQL APIs
//!
//! [Execute SQL queries against Elasticsearch indices and return results in tabular format](https://www.elastic.co/guide/en/elasticsearch/reference/master/xpack-sql.html).
#![allow(unused_imports)]
use crate::{
client::Elasticsearch,
error::Error,
http::{
headers::{HeaderMap, Head... | the_stack |
#![cfg_attr(not(any(feature = "punycode", feature = "std")), no_std)]
#![forbid(unsafe_code)]
extern crate alloc;
mod error;
mod fxhash;
#[cfg(feature = "anycase")]
use alloc::borrow::Cow;
use alloc::borrow::ToOwned;
#[cfg(not(feature = "anycase"))]
use alloc::vec::Vec;
#[cfg(feature = "anycase")]
use core::str;
use... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.