text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use std::sync::Arc;
use arrow::datatypes::{DataType, Field, Schema};
use arrow::{
array::{Int32Array, StringArray},
record_batch::RecordBatch,
};
use datafusion::dataframe::DataFrame;
use datafusion::datasource::MemTable;
use datafusion::error::Result;
// use datafusion::logical_plan::Expr;
use datafusion::... | the_stack |
pub mod test {
use std::{
collections::HashMap,
sync::{
Arc,
Once,
},
};
use dgraph_query_lib::{
condition::{
Condition,
ConditionValue,
},
predicate::{
Field,
Predicate,
},
... | the_stack |
// You should have received a copy of the MIT License
// along with the Jellyfish library. If not, see <https://mit-license.org/>.
//! Instantiations of Plonk-based proof systems
use super::{
prover::Prover,
structs::{
trim, BatchProof, Challenges, Oracles, PlookupProof, PlookupProvingKey,
Ploo... | the_stack |
use crate::common::BlockRange;
use alloc::vec::Vec;
use core::convert::TryFrom;
use crc::Crc;
use displaydoc::Display;
use mc_crypto_keys::{CompressedRistrettoPublic, KeyError, RistrettoPrivate, RistrettoPublic};
use mc_transaction_core::{
encrypted_fog_hint::{EncryptedFogHint, ENCRYPTED_FOG_HINT_LEN},
tx::TxOu... | the_stack |
#[cfg(feature = "use_core")]
extern crate core;
#[macro_use]
extern crate derivative;
#[derive(Derivative)]
#[derivative(Debug)]
pub struct Config {
pub name: String,
pub cluster: String,
pub debug_none: String,
pub debug_lockdep: String,
pub debug_context: String,
pub debug_crush: String,
... | the_stack |
use std::iter;
struct SI1<T: Iterator<Item: Copy, Item: Send>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
f: T,
}
struct SI2<T: Iterator<Item: Copy, Item: Copy>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is al... | the_stack |
extern crate cairo;
extern crate gdk_pixbuf;
extern crate gtk;
extern crate pango;
extern crate pangocairo;
use gtk::{Inhibit, ObjectExt, WidgetExt, traits::*};
use gtk::ContainerExt;
use glib::prelude::*; // or `use gtk::prelude::*;`
use glib;
use gdk::{ContextExt, Cursor, CursorType, Event, EventButton, EventMask,... | the_stack |
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DetailType {
#[allow(missing_docs)] // documentation missing in mo... | the_stack |
use crate::{
io::{channel_create, ReceiverExt, SenderExt},
node::{http::util::Pipe, CreatedNode, Node, NodeIsolation},
permissions::PermissionsConfiguration,
proto::oak::invocation::{HttpInvocation, HttpInvocationSender},
NodePrivilege, RuntimeProxy,
};
use log::{error, info};
use maplit::hashmap;
u... | the_stack |
#![crate_name = "sqlite3"]
#![crate_type = "lib"]
#![warn(missing_docs)]
extern crate libc;
extern crate time;
#[macro_use]
extern crate bitflags;
#[macro_use]
extern crate enum_primitive;
use std::error::Error;
use std::fmt::Display;
use std::fmt;
pub use core::Access;
pub use core::{DatabaseConnection, PreparedS... | the_stack |
//! Low-level Rust bindings for [libffi](https://sourceware.org/libffi/)
//!
//! The C libffi library provides two main facilities: assembling calls
//! to functions dynamically, and creating closures that can be called
//! as ordinary C functions.
//!
//! This is an undocumented wrapper, originally generated by bindge... | the_stack |
use crate::AidError;
use serde::de::DeserializeOwned;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::any::{Any, TypeId};
use std::collections::hash_map::DefaultHasher;
use std::error::Error;
use std::hash::Hash;
use std::hash::Hasher;
use std::sync::{Arc, RwLock};
/// This defines any value sa... | the_stack |
//! Traits and structs for configuring and loading boot parameters.
//! - [BootConfigurator](trait.BootConfigurator.html): configure boot parameters.
//! - [LinuxBootConfigurator](linux/struct.LinuxBootConfigurator.html): Linux boot protocol
//! parameters configurator.
//! - [PvhBootConfigurator](pvh/struct.PvhBootC... | the_stack |
#![forbid(unsafe_code)]
mod insert;
mod intersection;
pub mod interval;
mod remove;
#[cfg(test)]
mod fuzz_target;
use alloc::collections::vec_deque::{self, VecDeque};
use core::{
fmt,
iter::FromIterator,
num::NonZeroUsize,
ops::{Bound, Range, RangeBounds, RangeInclusive},
};
use insert::insert;
pub u... | the_stack |
use crate::nns::NnsExt;
use crate::util::{
create_agent, get_random_nns_node_endpoint, get_random_non_root_node_endpoint, runtime_from_url,
};
use slog::info;
use ic_fondue::{self, ic_instance::InternetComputer, ic_manager::IcHandle};
use async_recursion::async_recursion;
use canister_test::{Canister, Runtime};
u... | the_stack |
use crate::artifact::{
Data, DataType, Decl, DefinedDecl, Definition, ImportKind, Reloc, SectionKind,
};
use crate::target::make_ctx;
use crate::{Artifact, Ctx};
use indexmap::IndexMap;
use scroll::ctx::SizeWith;
use scroll::{IOwrite, Pwrite};
use std::collections::HashMap;
use std::io::SeekFrom::*;
use std::io::{... | the_stack |
use std::sync::Arc;
use snafu::Snafu;
use std::task::{Context, Poll};
use arrow::{
array::new_null_array,
datatypes::{DataType, SchemaRef},
error::Result as ArrowResult,
record_batch::RecordBatch,
};
use datafusion::physical_plan::{
metrics::BaselineMetrics, RecordBatchStream, SendableRecordBatchS... | the_stack |
use alloc::format;
use alloc::string::String;
use alloc::vec::Vec;
use core::mem::transmute;
use core::pin::Pin;
use fallible_collections::{FallibleVec, FallibleVecGlobal};
use log::info;
use x86::controlregs;
use x86::current::paging::*;
use super::page_table::PageTable;
use crate::arch::memory::{paddr_to_kernel_vad... | the_stack |
use crate::cmp::Ordering;
use crate::ops;
use crate::ptr;
use crate::slice::SliceIndex;
use super::ParseBoolError;
/// Implements ordering of strings.
///
/// Strings are ordered [lexicographically](Ord#lexicographical-comparison) by their byte values. This orders Unicode code
/// points based on their positions in ... | the_stack |
use hir::InFile;
use crate::{Diagnostic, DiagnosticsContext};
// Diagnostic: missing-match-arm
//
// This diagnostic is triggered if `match` block is missing one or more match arms.
pub(crate) fn missing_match_arms(
ctx: &DiagnosticsContext<'_>,
d: &hir::MissingMatchArms,
) -> Diagnostic {
Diagnostic::new... | the_stack |
use std::{
alloc::Layout,
cell::{Ref, RefMut},
marker::PhantomData,
mem::size_of,
panic::AssertUnwindSafe,
ptr::NonNull,
sync::atomic::{AtomicBool, Ordering},
};
use anyhow::anyhow;
use bytemuck::{Pod, Zeroable};
use feather_common::Game;
use feather_ecs::EntityBuilder;
use quill_common::Co... | the_stack |
use casbin::prelude::*;
extern crate criterion;
use criterion::{criterion_group, criterion_main, Criterion};
fn await_future<F, T>(future: F) -> T
where
F: std::future::Future<Output = T>,
{
#[cfg(feature = "runtime-async-std")]
{
async_std::task::block_on(future)
}
#[cfg(feature = "runt... | the_stack |
use super::*;
use super::super::path_value;
use crate::rules::parser::{rules_file, Span};
use crate::commands::files::read_file_content;
use std::fs::File;
use std::convert::TryFrom;
const RULES_FILES_EXAMPLE: &str = r###"
rule iam_role_exists {
Resources.*[ Type == "AWS::IAM::Role" ] EXISTS
}
rule iam_role_lambd... | the_stack |
use rand::{Rng, SeedableRng};
use hdrhistogram::{Counter, Histogram, SubtractionError};
use std::borrow::Borrow;
use std::fmt;
macro_rules! assert_near {
($a:expr, $b:expr, $tolerance:expr) => {{
let a = $a as f64;
let b = $b as f64;
let tol = $tolerance as f64;
assert!(
... | the_stack |
use std::ops;
use std::str;
use std::fmt;
use std::result;
use std::cell::RefCell;
use std::rc::Rc;
use std::collections::{hash_map, HashMap, HashSet};
use std::sync::Arc;
use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard};
use kailua_env::{self, Span, Spanned, WithLoc, ScopedId, ScopeMap, SpanMap};
use kail... | the_stack |
use super::*;
use crate::rules::parser::{from_str2, Span};
use indexmap::map::IndexMap;
use crate::rules::values::Value::Bool;
#[test]
fn test_assignment() {
let examples = vec!["let my_variable = 1234", "letpropertyaccess", "let my IN"];
let expected = vec![
Ok((make_empty_span(examples[0].len()),... | the_stack |
pub mod sound {
use std::sync::mpsc;
use unicorn::packet;
use unicorn::UnicornCartridge;
use chiptune::chiptune;
use std::sync::{Arc, Mutex};
pub struct SoundInternal {
pub player: chiptune::Chiptune,
pub csend: mpsc::Sender<Vec<u8>>,
pub crecv: mpsc::Receiver<Vec<u8>>... | the_stack |
use crate::collections::{map, Map};
use crate::grammar::consts::CFG;
use crate::grammar::parse_tree as pt;
use crate::grammar::parse_tree::{
read_algorithm, GrammarItem, InternToken, Lifetime, MatchMapping, Name, NonterminalString,
Path, TerminalString,
};
use crate::grammar::pattern::{Pattern, PatternKind};
us... | the_stack |
use super::xetex_layout_interface::GlyphBBox;
use crate::text_layout_engine::{LayoutRequest, NodeLayout, TextLayoutEngine};
use crate::xetex_font_info::GlyphID;
use std::ffi::CString;
use crate::cf_prelude::*;
use core_foundation::base::TCFType;
use core_foundation::string::CFString;
use core_foundation::url::CFURL;
... | the_stack |
use kernel::prelude::*;
use kernel::sync::{RwLock,Mutex};
use args::Args;
use values::FixedStr6;
use kernel::threads::get_process_local;
/// A system-call object
pub trait Object: Send + Sync + ::core::any::Any
{
fn type_name(&self) -> &str { type_name!(Self) }
fn as_any(&self) -> &dyn Any;
/// Object class code ... | the_stack |
use std::error::Error;
use std::fmt;
use async_trait::async_trait;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError};
use rusoto_core::proto;
use rusoto_core::signature::SignedReq... | the_stack |
use error::*;
use intern::{Interner, Symbol};
#[cfg(feature = "serde")]
use intern::SerializeWithInterner;
use reader::Reader;
use byteorder::{BigEndian, ByteOrder};
#[cfg(feature = "serde")]
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::{fmt, u64};
use std::collections::BTreeMap;
use std::f... | the_stack |
use crate::file_ext::*;
use crate::gpu::ColoredVertex;
use crate::hash::hash_as_utf16;
use crate::mesh::*;
use crate::rsz::*;
use anyhow::*;
use nalgebra_glm::*;
use std::any::Any;
use std::collections::HashSet;
use std::convert::{TryFrom, TryInto};
use std::io::{Cursor, Read, Seek, SeekFrom};
pub enum UserData {
... | the_stack |
mod crc;
mod header;
mod header_tests;
mod metadata;
mod metadata_tests;
mod tests;
pub use self::header::Header;
pub use self::metadata::make_distribution_string;
pub use self::metadata::make_too_much_meta_err_string;
pub use self::metadata::Metadata;
pub use self::metadata::MetadataID;
use smallvec::SmallVec;
pub ... | the_stack |
use std::collections::HashMap;
use std::rc::Rc;
use crate::rules::bonus::{AttackBonuses, AttackBuilder, Bonus, BonusKind, BonusList};
use crate::rules::{
AccuracyKind, Armor, ArmorKind, Attack, AttributeList, Damage, HitKind, Resistance, Slot,
WeaponKind, WeaponStyle,
};
use crate::{Actor, Module};
use sulis_c... | the_stack |
use ndarray::prelude::*;
use ndarray::{ShapeError, ErrorKind};
#[test]
fn push_row() {
let mut a = Array::zeros((0, 4));
a.push_row(aview1(&[0., 1., 2., 3.])).unwrap();
a.push_row(aview1(&[4., 5., 6., 7.])).unwrap();
assert_eq!(a.shape(), &[2, 4]);
assert_eq!(a,
array![[0., 1., 2., 3.],
... | the_stack |
#![crate_name = "vga"]
#![crate_type = "lib"]
#![feature( slice_patterns
, unique )]
#![feature(ptr_internals)]
#![feature( const_fn
, const_unique_new )]
#![cfg_attr(feature = "system_term", feature(lang_items))]
#![cfg_attr(feature = "clippy", feature(plugin))]
#![cfg_attr(feature = "clippy", plug... | the_stack |
use crate::category::Category;
use crate::dimension::{Dimen, Unit};
use crate::glue::Glue;
use crate::list::VerticalListElem;
use crate::parser::assignment::SpecialVariables;
use crate::parser::Parser;
use crate::token::Token;
impl<'a> Parser<'a> {
/// Handle generating an optionally indented horizontal mode box b... | the_stack |
use super::doc::*;
use crate::stepper::*;
use std::cmp;
fn compose_del_del_inner<S: Schema>(
res: &mut DelSpan<S>,
a: &mut DelStepper<S>,
b: &mut DelStepper<S>,
) {
while !a.is_done() && !b.is_done() {
match a.get_head() {
DelSkip(acount) => {
match b.head.clone() {
... | the_stack |
use std::cmp::Ordering;
use std::str::FromStr;
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("Failed to parse scale in '{0}'")]
ScaleParseError(String),
#[error("Failed to read Qty (num) from '{input}'")]
QtyNumberParseError {
input: String,
#[source] // optional if field... | the_stack |
use super::{is_not, CssString, Value};
use crate::parser::css::{selector, selector_part, selectors};
use crate::parser::input_span;
use crate::parser::{ParseError, SourcePos};
use crate::value::ListSeparator;
use std::convert::{TryFrom, TryInto};
use std::fmt;
use std::io::Write;
/// A full set of selectors
#[derive(C... | the_stack |
// TODO: remove pub mod in lib.rs
use crate::lossy_text::LossyText;
use crate::reassembler::Reassembler;
use anyhow::{format_err, Error};
use fuchsia_async::TimeoutExt;
use futures::channel::{mpsc, oneshot};
use futures::lock::Mutex;
use futures::prelude::*;
use std::collections::HashMap;
use std::time::Duration;
use ... | the_stack |
use anyhow::{Context, Result};
use std::borrow::ToOwned;
use std::ffi::OsString;
use std::fs::File;
use std::io::Read;
use std::path::{Path, PathBuf};
use std::process::Command;
#[derive(Deserialize, Debug, Clone, Copy)]
pub struct Color {
pub r: u8,
pub g: u8,
pub b: u8,
}
#[rustfmt::skip]
const DARK_BLU... | the_stack |
use super::*;
use crate::{
ops::{AddAssign, Col2Im, Im2Col, KernelArgs, KernelKind, ScaledAdd},
rust_shaders,
scalar::Float,
util::eclid_gcd,
};
use anyhow::ensure;
use ndarray::{Array, Array2, Array4, Axis, Data as ArrayData};
impl<T: Scalar, S1: DataMut<Elem = T>, S2: Data<Elem = T>, D: Dimension>
... | the_stack |
///! C-bindings for the rutabaga_gfx crate
extern crate rutabaga_gfx;
use std::convert::TryInto;
use std::ffi::CStr;
use std::os::raw::c_char;
use std::panic::{catch_unwind, AssertUnwindSafe};
use std::path::PathBuf;
use std::ptr::{copy_nonoverlapping, null_mut};
use std::slice::{from_raw_parts, from_raw_parts_mut};
... | the_stack |
//! System call numbers for x86-64 Linux.
pub const READ : usize = 0;
pub const WRITE : usize = 1;
pub const OPEN : usize = 2;
pub const CLOSE : usize = 3;
pub const STAT : usize = 4;
pu... | the_stack |
//! Prints complex data-structures for visualization with [Graphviz](http://www.graphviz.org/)
//!
//! This code was ported from the rust compiler to work with the nrk kernel.
//!
//! # References
//! * [Original Source](https://github.com/rust-lang/rust/blob/4560cb830fce63fcffdc4558f4281aaac6a3a1ba/src/libgraphviz/lib... | the_stack |
use crate::app::layout_manager::*;
use crate::error::Result;
use serde::{Deserialize, Serialize};
/// Represents a row. This has a length of some sort (optional) and a vector
/// of children.
#[derive(Clone, Deserialize, Debug, Serialize)]
#[serde(rename = "row")]
pub struct Row {
pub ratio: Option<u32>,
pub ... | the_stack |
use anyhow::{anyhow, bail, Result};
use chrono::prelude::*;
use crossbeam::channel::{self, select, Receiver, Sender};
use enum_iterator::IntoEnumIterator;
use log::{debug, error, info, trace, warn};
use nix::sys::signal::{kill, Signal};
use nix::unistd::Pid;
use scan_fmt::scan_fmt;
use std::collections::{BTreeMap, Hash... | the_stack |
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;
use std::process::{Child, Command, Stdio};
use std::thread;
use std::fmt;
use itertools::{iproduct, Itertools};
use rustc_serialize::Encodable;
use std::time::Duration;
use wait_timeout... | the_stack |
use crate::auth::{AuthData, Authorization};
use crate::XSpanIdString;
use hyper::{service::Service, Request, Response};
use std::future::Future;
use std::pin::Pin;
/// Defines methods for accessing, modifying, adding and removing the data stored
/// in a context. Used to specify the requirements that a hyper service m... | the_stack |
use super::messages::{MessageToClient, MessageToServer, RequestId, Response, ServiceId};
use super::{server, Error};
use bincode::{deserialize, serialize};
use bytes::Bytes;
use futures::{self, future, stream, unsync, Async, Future, Poll, Stream};
use serde::{Deserialize, Serialize};
use std::cell::{Ref, RefCell};
use ... | the_stack |
use super::stream_animation_core::*;
use super::element_wrapper::*;
use super::pending_storage_change::*;
use crate::storage::storage_api::*;
use crate::traits::*;
use crate::serializer::*;
use flo_canvas::*;
use flo_canvas_animation::*;
use ::desync::*;
use futures::prelude::*;
use std::sync::*;
use std::time::{Dur... | the_stack |
use super::soa::{MaterialEvalInfo, SOAPathState, SOARay, SOAVec};
use crate::camera::{Camera, PerspectiveCamera};
use crate::film::Film;
use crate::gpu::scene::GPUScene;
use crate::integrator::Integrator;
use crate::scene::Scene;
use crate::*;
use ash::vk;
use vkc::include_spv;
use vkc::profile::Profiler;
use vkc::res... | the_stack |
use crate::arbitraries::queries::{
mutation_create::mutation_create_arbitrary,
mutation_update::mutation_update_arbitrary,
mutation_update_disconnect::mutation_update_disconnect::mutation_update_disconnect_arbitrary,
mutation_delete::mutation_delete::mutation_delete_arbitrary
};
use crate::utilities::gr... | the_stack |
//! Group of literal rules.
//!
//! The list of all literals is provided by the PHP Language Specification in
//! the [Grammar chapter, Literals
//! section](https://github.com/php/php-langspec/blob/master/spec/19-grammar.md#literals).
use nom::{
InputLength,
Slice
};
use std::borrow::Cow;
use std::num::{
... | the_stack |
#[cfg(any(
all(test, feature = "check_contracts_in_tests"),
feature = "check_contracts"
))]
use contracts::*;
#[cfg(not(any(
all(test, feature = "check_contracts_in_tests"),
feature = "check_contracts"
)))]
use disabled_contracts::*;
use std::alloc::Layout;
use std::ffi::CStr;
use std::num::NonZeroU32;... | the_stack |
use syntax::{Name, Span};
use syntax::reader::Reader;
use syntax::token::{Token, TokenAndSpan, Lit};
use syntax::token::Token::*;
use ::{JsResult, JsError};
use util::interner::StrInterner;
use std::char;
use std::collections::VecDeque;
use ::util::matchers::{DecimalMatcher, Decimal};
#[derive(PartialEq)]
p... | the_stack |
use crate::http_token_utils::{http_token, is_rfc_tchar, is_rfc_whitespace, HttpToken};
pub const LF: u8 = b'\n';
pub const SP: u8 = b' ';
pub const COLON: u8 = b':';
const CR: u8 = b'\r';
const EMPTY_TOKEN: HttpToken = http_token("");
/// A window view on an HttpToken.
pub struct RequestBuffer<'a> {
buf: HttpToke... | the_stack |
use crate::schematic::parameter::resolve_value;
use crate::workload_type::{
InstigatorResult, StatusResult, ValidationResult, WorkloadMetadata, WorkloadType,
};
use failure::{format_err, Error};
use k8s_openapi::apimachinery::pkg::apis::meta::v1 as meta;
use kube::api::{Object, ObjectMeta, PatchParams, PostParams, ... | the_stack |
use std;
use types::{Range, Align, Rect, RectExt, Point};
use rusttype;
use rusttype::LayoutIter;
use super::line::{LineRects, LineInfo};
use super::Font;
/// Every possible cursor position within each line of text yielded by the given iterator.
///
/// Yields `(xs, y_range)`, where `y_range` is the `Range` occupied ... | the_stack |
use chrono::{DateTime, Duration, Local};
use std::clone::Clone;
use std::collections::{BTreeMap, HashMap, HashSet};
use std::hash::{Hash, Hasher};
use std::io::{Error, ErrorKind, Result};
use std::sync::{Arc, RwLock};
use crate::dns::protocol::{DnsPacket, DnsRecord, QueryType, ResultCode};
pub enum CacheState {
P... | the_stack |
use crate::{
layout::{CellDirection, CellSize},
sizing::Sizing,
Size, StripLayout,
};
use egui::{Rect, Response, Ui, Vec2};
/// Builder for a [`Table`] with (optional) fixed header and scrolling body.
///
/// Cell widths are precalculated so we can have tables like this:
///
/// | fixed size | all availab... | the_stack |
use super::cluster::{Glyph, GlyphInfo};
use super::feature::*;
use crate::text::{
cluster::{Char, CharCluster, ClusterInfo, ShapeClass, SourceRange, MAX_CLUSTER_SIZE},
JoiningType,
};
use core::ops::Range;
// Glyph flags.
pub const SUBSTITUTED: u16 = 1;
pub const LIGATED: u16 = 2;
pub const COMPONENT: u16 = 4;... | the_stack |
use std::ffi::{OsStr, OsString};
use std::io;
use std::os::windows::ffi::{OsStrExt, OsStringExt};
use std::path::Path;
use std::ptr::null_mut;
use winapi::ctypes::c_void;
use winapi::shared::winerror;
use winapi::um::accctrl::TRUSTEE_W;
use winapi::um::winnt;
use super::{Owner, Permissions};
const BUF_SIZE: u32 = 25... | the_stack |
use font_types::{KernRecord, KernTable};
pub static KERNING_TABLE: [(u32, KernRecord); 29] = [
(0x41, KernRecord { // A
top_right: Some(KernTable {
correction_heights: &[ fontunit!(275) ],
kern_values: &[ fontunit!(-100), fontunit!(-150) ],
}),
top_left: None,
... | the_stack |
//! Defines a C API for working with stack graphs in other languages.
#![allow(non_camel_case_types)]
use std::convert::TryInto;
use libc::c_char;
use crate::arena::Handle;
use crate::graph::File;
use crate::graph::InternedString;
use crate::graph::Node;
use crate::graph::NodeID;
use crate::graph::StackGraph;
use c... | the_stack |
use crate::msgs::enums::{SignatureAlgorithm, SignatureScheme};
use crate::key;
use crate::error::TLSError;
use ring::{self, signature::{self, EcdsaKeyPair, RsaKeyPair}};
use webpki;
use std::sync::Arc;
use std::mem;
/// An abstract signing key.
pub trait SigningKey : Send + Sync {
/// Choose a `SignatureScheme` ... | the_stack |
use std::collections::HashMap;
use protobuf;
use protobuf::compiler_plugin;
use protobuf::descriptor::*;
use protobuf::descriptorx::*;
use std::io::Write;
struct CodeWriter<'a> {
writer: &'a mut (dyn Write + 'a),
indent: String,
}
impl<'a> CodeWriter<'a> {
pub fn new(writer: &'a mut dyn Write) -> CodeWr... | the_stack |
use crate::prelude::*;
use crate::model::execution_context::AttachedVisualization;
use crate::model::execution_context::ComponentGroup;
use crate::model::execution_context::ComputedValueInfoRegistry;
use crate::model::execution_context::LocalCall;
use crate::model::execution_context::Visualization;
use crate::model::e... | the_stack |
use super::types;
use ic_crypto_internal_basic_sig_der_utils::PkixAlgorithmIdentifier;
use ic_crypto_secrets_containers::SecretVec;
use ic_types::crypto::{AlgorithmId, CryptoError, CryptoResult};
use openssl::bn::{BigNum, BigNumContext};
use openssl::ec::{EcGroup, EcKey, EcPoint};
use openssl::ecdsa::EcdsaSig;
use open... | the_stack |
// This file is a very close translation of the
// implementation of the algorithm from stb_vorbis.
use ::header_cached::CachedBlocksizeDerived;
fn imdct_step3_iter0_loop(n :usize, e :&mut[f32], i_off :usize, k_off :isize, a :&[f32]) {
let mut a_offs = 0;
let mut i_offs = i_off;
let mut k_offs = i_off as isize + k... | the_stack |
use super::behaviour::NetworkBehaviour;
use crate::metrics::start_metrics_endpoint;
use crate::network_api::NetworkApi;
use aquamarine::{AquaRuntime, AquamarineApi, AquamarineBackend, VmConfig, VmPoolConfig, AVM};
use config_utils::to_peer_id;
use connection_pool::ConnectionPoolApi;
use fluence_libp2p::{
build_tra... | the_stack |
#![allow(unused_must_use)]
use itertools::Itertools;
use proc_macro2::Span;
use std::collections::HashMap;
use std::fmt::Write;
use std::fs::File;
use std::io::prelude::*;
use syn;
use syn::Ident;
// =======================
// === Scala Generator ===
// =======================
/// A Scala ast generator.
#[derive(D... | the_stack |
use std::error;
use std::fmt;
use std::cmp::min;
use std::iter;
use tinyvec::TinyVec;
use crate::ilog;
use bitpacking::BitpackCursor;
use header::{Codebook, Floor, FloorTypeZero, FloorTypeOne,
HuffmanVqReadErr, IdentHeader, Mapping, Residue, SetupHeader};
use samples::Samples;
#[derive(Debug, PartialEq, Eq)]
pub enum... | the_stack |
use std::cmp::max;
use crate::cast::As;
use crate::types::{Color, EcLevel, Version};
//------------------------------------------------------------------------------
//{{{ Modules
/// The color of a module (pixel) in the QR code.
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
pub enum Module {
/// The module is em... | the_stack |
use bn::*;
#[cfg(feature = "snark")]
use snark::*;
mod secrets;
mod spair;
mod nizk;
mod multicore;
#[macro_use]
mod digest;
pub use self::secrets::*;
pub use self::digest::*;
use self::spair::*;
use self::multicore::*;
#[cfg(feature = "snark")]
mod qap;
/// The powers of tau.
#[derive(Clone, RustcEncodable, RustcD... | the_stack |
use kuchiki::{parse_html, parse_html_with_options, Attributes, NodeRef, ParseOpts};
use kuchiki::{traits::*, ExpandedName};
use std::cell::RefCell;
use std::collections::{BTreeMap, BTreeSet};
use std::ops::Deref;
use std::rc::Rc;
/// Pattern for matching HTML document
///
/// # Example
///
/// ```
/// use easy_scraper... | the_stack |
mod blocks;
mod config;
mod deploys;
mod event;
mod metrics;
mod peers;
mod state;
mod traits;
use std::{cmp::Ordering, convert::Infallible, fmt::Display, mem};
use datasize::DataSize;
use prometheus::Registry;
use tracing::{error, info, trace, warn};
use self::event::BlockByHashResult;
use casper_types::{EraId, Pro... | the_stack |
pub(crate) mod msg_pool;
pub(crate) mod provider;
mod selection;
pub mod test_provider;
pub(crate) mod utils;
use super::errors::Error;
use crate::msg_chain::{create_message_chains, Chains};
use crate::msg_pool::MsgSet;
use crate::msg_pool::{add_helper, remove};
use crate::provider::Provider;
use address::Address;
use... | the_stack |
mod support;
use csml_interpreter::data::context::Context;
use csml_interpreter::data::event::Event;
use std::collections::HashMap;
use crate::support::tools::format_message;
use crate::support::tools::message_to_json_value;
use serde_json::Value;
////////////////////////////////////////////////////////////////////... | the_stack |
mod api;
use api::*;
use num_traits::{ToPrimitive, FromPrimitive};
use log::{error, info, trace};
use com_rs_ref as com_rs;
use com_rs::*;
use com_rs::serdes::{STR_32_WORDS, STR_64_WORDS, STR_64_U8_SIZE, StringSer, StringDes, Ipv4Conf};
use xous::{CID, msg_scalar_unpack, msg_blocking_scalar_unpack};
use xous_ipc::{... | the_stack |
use std::{
convert::{TryFrom, TryInto},
iter::FromIterator,
marker::PhantomData,
str::FromStr,
};
use crate::{
raw::{RawBsonRef, RawDocument},
tests::LOCK,
Bson,
Document,
RawBson,
RawDocumentBuf,
};
use pretty_assertions::assert_eq;
use serde::{Deserialize, Deserializer};
use ... | the_stack |
use std::f32::consts::PI;
use std::slice;
use crate::geometry::{self, Transform2D};
mod cache;
pub use cache::{Convexity, PathCache};
// Length proportional to radius of a cubic bezier handle for 90deg arcs.
const KAPPA90: f32 = 0.5522847493;
/// Used to specify Solid/Hole when adding shapes to a path.
#[derive(Cop... | the_stack |
// So clippy doesn't complain that IllumOS isn't in tick marks
#![cfg_attr(feature = "cargo-clippy", allow(doc_markdown))]
//! A generic stack-based slab.
//!
//! This module implements a generic slab which uses an inline header and a stack of object
//! pointers in place of a free list. It differs from both the large ... | the_stack |
#![recursion_limit="128"]
extern crate proc_macro;
extern crate syn;
#[macro_use]
extern crate quote;
use proc_macro::TokenStream;
use proc_macro2::TokenStream as TokenStream2;
use syn::*;
type SynStream = TokenStream2;
// Debugging:
/*
use std::fs::{OpenOptions};
use std::io::Write;
*/
#[proc_macro_derive(Obj... | the_stack |
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_cas... | the_stack |
use csv;
use itertools::Itertools;
use phf::Map;
use std::cmp::Ord;
use std::collections::HashMap;
use std::fs::File;
use std::path::Path;
use std::path::PathBuf;
use x86::perfcnt::intel::events::COUNTER_MAP;
use x86::perfcnt::intel::{EventDescription, Tuple};
use super::profile::{MonitoringUnit, PerfEvent};
use supe... | the_stack |
use crate::{
ast::{self, query},
errors::{Error, Result},
prelude::*,
};
use std::{fmt::Debug, mem, pin::Pin, sync::Arc};
///! Thisn file includes our self referential structs
/// A script and it's attached source.
///
/// Implemention alalougous to `EventPayload`
///
/// It is essential to never access t... | the_stack |
//! Building-blocks for arbitrary-precision math.
//!
//! These algorithms assume little-endian order for the large integer
//! buffers, so for a `vec![0, 1, 2, 3]`, `3` is the most significant limb,
//! and `0` is the least significant limb.
use super::large_powers;
use super::num::*;
use super::small_powers::*;
use ... | the_stack |
use super::{
models::{
Either, HttpMethod, Reference, Resolvable, ResolvableParameter, ResolvablePathItem,
ResolvableResponse,
},
Schema,
};
use crate::error::ValidationError;
use heck::ToPascalCase;
use std::{cell::RefCell, collections::BTreeMap, mem};
// FIXME: The resolver is not in its... | the_stack |
use super::*;
use channels_util::{ChannelStatus, ProtocolStatus};
use cl::{BlindKeyPair, Signature};
use nizk::{NIZKProof, NIZKPublicParams, NIZKSecretParams};
use pairing::Engine;
use ped92::{CSMultiParams, Commitment};
use rand::Rng;
use serde::{Deserialize, Serialize};
use std::collections::{HashMap, HashSet};
use s... | the_stack |
//! Definitions of callback handling utilities.
use enso_prelude::*;
use std::any::TypeId;
// ================
// === Callback ===
// ================
/// Immutable callback type.
pub trait CallbackFn = Fn() + 'static;
/// Immutable callback object.
pub type Callback = Box<dyn CallbackFn>;
/// Callback object s... | the_stack |
use std::collections::{BTreeMap, HashMap, HashSet};
use std::hash::{Hash, Hasher};
use std::sync::mpsc::{channel, Receiver, Sender};
use std::thread::JoinHandle;
use log::warn;
use crate::execution::adapter::{ExecutionAdapter, ExecutionAdapterError};
use crate::execution::{ExecutionRegistry, TransactionFamily};
use c... | the_stack |
use crate::category::Category;
use crate::parser::Parser;
use crate::token::Token;
/// Checks if a token matches a character from a keyword. In particular, this
/// matches if it is a char token whose char component equals the the keyword
/// character case-insensitively.
pub fn token_equals_keyword_char(tok: &Token, ... | the_stack |
use crate::helpers::*;
use crate::scripts::{Block, BlockState, Component, Grid};
use GarbageState::*;
pub enum GarbageState {
Idle,
Fall,
Hang {
counter: u32,
},
Clear {
counter: u32,
end_time: u32,
finished: bool,
},
}
/// garbage child data used mainly for ... | the_stack |
use cosmwasm_std::{
attr, coin, to_binary, BankMsg, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Order,
Response, StdResult,
};
#[cfg(not(feature = "library"))]
use cosmwasm_std::entry_point;
use crate::error::ContractError;
use crate::helper::extract_budget_coin;
use crate::matching::{calculate_clr, Qu... | the_stack |
use crate::equations::reserve_ratio;
use crate::error::ProtocolError;
use crate::parameters::{
BANK_NFT_ID, COOLING_OFF_HEIGHT, FEE_PERCENT, IMPLEMENTOR_FEE_PERCENT, MAX_RESERVE_RATIO,
MIN_BOX_VALUE, MIN_RESERVE_RATIO, RESERVECOIN_DEFAULT_PRICE, RESERVECOIN_TOKEN_ID,
STABLECOIN_TOKEN_ID,
};
use ergo_headles... | the_stack |
mod estimations_test;
use super::*;
use crate::construction::constraints::ConstraintPipeline;
use crate::models::common::*;
use crate::models::problem::{Place, Single, TransportCost};
use crate::models::solution::CommuteInfo;
use crate::utils::*;
use hashbrown::{HashMap, HashSet};
use std::ops::Deref;
type PlaceInfo ... | the_stack |
use crate::prelude::*;
use enso_text::unit::*;
use crate::iter::LeafIterator;
use crate::iter::TreeFragment;
use crate::ArgumentInfo;
use ast::crumbs::IntoCrumbs;
use enso_text as text;
// ==============
// === Export ===
// ==============
pub mod kind;
pub use kind::*;
// ============
// === Node ===
// =====... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.