text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use std::convert::TryFrom; use std::i64; use std::rc::Rc; use ::keys::Address; use constants::block_version::BlockVersion; use log::{debug, warn}; use proto::chain::transaction::{result::ContractStatus, Result as TransactionResult}; use proto::contract as contract_pb; use proto::state::{Account, SmartContract}; use st...
the_stack
use crate::error::{Result, SQLRiteError}; use crate::sql::parser::create::CreateQuery; use serde::{Deserialize, Serialize}; use std::cell::RefCell; use std::collections::{BTreeMap, HashMap}; use std::fmt; use std::rc::Rc; use prettytable::{Cell as PrintCell, Row as PrintRow, Table as PrintTable}; /// SQLRite data typ...
the_stack
use c64::cia; use c64::memory; use c64::opcodes; use c64::sid; use c64::vic; use std::cell::RefCell; use std::rc::Rc; use utils; pub type CPUShared = Rc<RefCell<CPU>>; pub const NMI_VECTOR: u16 = 0xFFFA; pub const RESET_VECTOR: u16 = 0xFFFC; pub const IRQ_VECTOR: u16 = 0xFFFE; // status flags for P register pub...
the_stack
use std::collections::HashMap; use std::error::Error; use std::fs::File; use std::io::{self, prelude::*, BufReader, SeekFrom}; use crate::material::Material; use crate::object::Object; use crate::shape::{Mesh, Triangle}; fn parse_index(value: &str, len: usize) -> Option<usize> { value.parse::<i32>().ok().map(|ind...
the_stack
use parking_lot::{const_mutex, Mutex}; use rome_rowan::{TextRange, TextSize}; use similar::{utils::diff_lines, Algorithm, ChangeTag}; use std::{ env, ffi::OsStr, fmt::Write, fs::{read_to_string, write}, ops::Range, os::raw::c_int, path::Path, sync::Once, }; use rome_diagnostics::{file::...
the_stack
extern crate gl; extern crate glutin; extern crate nanovg; extern crate rand; #[macro_use] extern crate lazy_static; use glutin::GlContext; use nanovg::{Color, Frame, PathOptions, Solidity, StrokeOptions, Transform, Winding}; use rand::{thread_rng, Rand, Rng}; use std::collections::HashMap; use std::f32::consts::PI; ...
the_stack
use crate::space::{AlignedSpace, AtomWriter}; use crate::{Atom, AtomHandle, UnidentifiedAtom}; use urid::URID; use crate::space::error::AtomWriteError; use crate::space::terminated::Terminated; use core::mem::{size_of, size_of_val, MaybeUninit}; /// The result of a [`SpaceAllocator`](SpaceAllocator) allocation. /// /...
the_stack
use std::any::Any; use fluvio::consumer::Record; use structopt::StructOpt; use futures_lite::stream::StreamExt; use std::pin::Pin; use std::time::{Duration, SystemTime}; use fluvio::{ConsumerConfig, FluvioError, MultiplePartitionConsumer, PartitionConsumer}; use fluvio::Offset; use crate::tests::TestRecord; use fluvi...
the_stack
use std::{collections::HashSet, iter::IntoIterator}; use crate::*; //------------------------------------------------------------------------------ #[derive(Default, Debug, PartialEq, PartialOrd, Ord, Eq, Clone, Hash)] /// OcTree https://en.wikipedia.org/wiki/Octree pub struct OcTree<P> where P: Is3D, { root...
the_stack
use rand::Rng; use std::error::Error; use std::ffi::OsStr; use std::ffi::OsString; use std::os::unix::fs::symlink; use std::path::{Path, PathBuf}; use std::process::Command; use clap::ArgMatches; use regex::Regex; use semver::Version; use simple_error::*; use simplelog::{debug, info, warn}; use crate::common::*; use ...
the_stack
use alloc::string::String; use alloc::vec::Vec; use core::assert; use core::iter::Iterator; #[allow(unused_imports)] use liumlib::*; #[derive(Debug, Clone, PartialEq, Eq)] pub enum State { /// https://html.spec.whatwg.org/multipage/parsing.html#data-state Data, /// https://html.spec.whatwg.org/multipage/pa...
the_stack
use std::{ io::{Error, ErrorKind, Read, Result, Seek, SeekFrom, Write}, vec::Vec, }; struct Op { offset: u64, data: Vec<u8>, } impl Op { fn end(&self) -> u64 { self.offset + self.data.len() as u64 } } // TransactionManager provides the ability to queue up changes and then later commit...
the_stack
use cli::arg_types::Interval; use std::str::FromStr; // Use of #from_str. use itertools::Itertools; use api::client::{TellerClient, ApiServiceResult, Transaction}; use api::client::parse_utc_date_from_transaction; use chrono::{Date, Datelike, UTC}; pub type Balances = HistoricalAmountsWithCurrency; pub type Outgoin...
the_stack
use arrow2::array::*; use arrow2::compute::temporal::*; use arrow2::datatypes::*; macro_rules! temporal_test { ($func:ident, $extract:ident, $data_types:path) => { #[test] fn $func() { for data_type in $data_types() { let data = TestData::data(&data_type); ...
the_stack
mod net; mod vsock; pub use net::Net; pub use vsock::{Vsock, VsockState}; use std::fs::{File, OpenOptions}; use std::os::unix::fs::OpenOptionsExt; use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; use std::sync::{Arc, Mutex}; use address_space::{ AddressSpace, FlatRange, GuestAddress, Listener, ListenerReqType...
the_stack
//! Parsing values. use std::cell::{RefCell}; use std::fmt; use std::iter::{Peekable}; use std::old_io::{BufferedReader, File, IoError, IoErrorKind, IoResult, MemReader}; use heap::{Heap, Rooted}; use value::{list, RootedValue, SchemeResult, Value}; /// `CharReader` reads characters one at a time from the given inpu...
the_stack
use std::sync::Arc; use anyhow::{Context, Result}; use hyper::header; use hyper::StatusCode; use hyper::{Body, Request, Response, Uri}; use routerify::{ext::RequestExt, RouterBuilder}; use serde::Serialize; use tracing::*; use zenith_utils::auth::JwtAuth; use zenith_utils::http::endpoint::attach_openapi_ui; use zenith...
the_stack
#![no_std] #![no_main] // #![deny(warnings)] use core::convert::TryFrom; use runner::hal; use hal::traits::wg::timer::Cancel; use hal::traits::wg::timer::CountDown; use hal::drivers::timer::Elapsed; use hal::time::{DurationExtensions, Microseconds}; use rtic::cyccnt::{Instant, U32Ext as _}; const CLOCK_FREQ: u32 = 9...
the_stack
use codespan::{ByteIndex, ByteSpan}; use im::HashMap; use moniker::{Binder, BoundTerm, Embed, FreeVar, Scope, Var}; use crate::syntax::concrete; use crate::syntax::core; use crate::syntax::{Label, Level}; /// The environment used when resugaring from the core to the concrete syntax #[derive(Debug, Clone)] pub struct ...
the_stack
use std::io::BufWriter; use anyhow::{bail, Result}; use async_trait::async_trait; use barcoders::{ generators::{image::Image, svg::SVG}, sym::code39::Code39, }; use chrono::{DateTime, Utc}; use google_drive::{ traits::{DriveOps, FileOps}, Client as GoogleDrive, }; use log::{info, warn}; use macros::db;...
the_stack
use { crate::{ meta_file::MetaFile, meta_subdir::MetaSubdir, root_dir::RootDir, u64_to_usize_safe, usize_to_u64_safe, }, async_trait::async_trait, fidl::endpoints::ServerEnd, fidl_fuchsia_io::{ NodeAttributes, NodeMarker, DIRENT_TYPE_DIRECTORY, INO_UNKNOWN, MODE_TYPE_DIRECTOR...
the_stack
use regex::Regex; use std::error::Error; use std::ffi::OsStr; use std::os::unix::fs::symlink; use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; use std::{file, line}; use clap::ArgMatches; use simple_error::*; use simplelog::{debug, info, warn}; use crate::resolve::resolve_versions; use crate::rvers...
the_stack
use crate::{ buffer::float::FloatBuffer, device::Device, glsl_shaders, linalg::{Dot, DotAcc, DotBias}, ops::AddAssign, ops::{Col2Im, Im2Col, KernelArgs, KernelKind}, result::Result, rust_shaders, scalar::FloatType, tensor::float::{ FloatArcTensor, FloatArcTensor2, FloatDa...
the_stack
use core::num; use lexical_util::constants::BUFFER_SIZE; use lexical_util::format::NumberFormatBuilder; use lexical_util::num::Float; use lexical_write_float::float::{ExtendedFloat80, RawFloat}; use lexical_write_float::{compact, Options, RoundMode}; use proptest::prelude::*; use quickcheck::quickcheck; const DECIMAL:...
the_stack
use crate::leapiter::{Iter, IterMut, OwnedIter}; use crate::leapref::{Ref, RefMut}; use crate::util::{allocate, deallocate, round_to_pow2, AllocationKind}; use crate::{make_hash, Value}; use atomic::Atomic; use std::alloc::{Allocator, Global}; use std::borrow::Borrow; use std::hash::{BuildHasher, BuildHasherDefault, Ha...
the_stack
// You should have received a copy of the MIT License // along with the Jellyfish library. If not, see <https://mit-license.org/>. //! This module implements non-native circuits that are mainly //! useful for rescue hash function. use super::mod_arith::{FpElem, FpElemVar}; use crate::{ circuit::{Circuit, PlonkCir...
the_stack
//! Code to generate Rust's `enum`'s from TL definitions. use crate::grouper; use crate::metadata::Metadata; use crate::rustifier; use crate::{ignore_type, Config}; use grammers_tl_parser::tl::{Definition, ParameterType, Type}; use std::collections::HashSet; use std::io::{self, Write}; /// Types that implement Copy f...
the_stack
use rg3d::{ core::{ algebra::{Isometry3, Matrix4, Point3, Translation, Translation3, Vector3}, color::Color, math::aabb::AxisAlignedBoundingBox, pool::{ErasedHandle, Handle, Pool}, uuid::Uuid, BiDirHashMap, }, physics3d::{ desc::{ ColliderD...
the_stack
//! A cache that holds a limited number of key-value pairs. When the //! capacity of the cache is exceeded, the least-recently-used //! (where "used" means a look-up or putting the pair into the cache) //! pair is automatically removed. //! //! # Examples //! //! ```rust,ignore //! use common_cache::{Cache, LruCache}; ...
the_stack
mod mbe; mod builtin_fn_macro; mod builtin_derive_macro; mod proc_macros; use std::{iter, ops::Range}; use ::mbe::TokenMap; use base_db::{fixture::WithFixture, SourceDatabase}; use expect_test::Expect; use hir_expand::{ db::{AstDatabase, TokenExpander}, AstId, InFile, MacroDefId, MacroDefKind, MacroFile, }; u...
the_stack
#[macro_use] extern crate log; extern crate uosql; extern crate bincode; extern crate byteorder; extern crate docopt; extern crate rustc_serialize; extern crate server; extern crate regex; extern crate libc; extern { fn key() -> libc::c_int; } mod specialcrate; use std::net::Ipv4Addr; use std::cmp::{max, min}; u...
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 tidb_query_codegen::rpn_fn; use tidb_query_common::Result; use tidb_query_datatype::codec::data_type::*; use tidb_query_datatype::codec::Error; #[rpn_fn(nullable)] #[inline] pub fn logical_and(lhs: Option<&i64>, rhs: Option<&i64>) -> Result<Option<i64>> { Ok(match (lhs, rhs) { (Some(0), _) | (_, Some(...
the_stack
use crate::pg_constants; use crate::CheckPoint; use crate::FullTransactionId; use crate::XLogLongPageHeaderData; use crate::XLogPageHeaderData; use crate::XLogRecord; use crate::XLOG_PAGE_MAGIC; use anyhow::{bail, Result}; use byteorder::{ByteOrder, LittleEndian}; use bytes::BytesMut; use bytes::{Buf, Bytes}; use crc3...
the_stack
#[derive(Debug)] enum Error { IoError(std::io::Error), DepgraphError(String), Other(String), } impl std::fmt::Display for Error { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match *self { Error::IoError(ref e) => ::std::fmt::Display::fmt(e, f), Er...
the_stack
use super::*; use crate::linalg::{Dot, DotAcc, DotBias}; #[allow(clippy::too_many_arguments, clippy::many_single_char_names)] fn gemm_impl<T: Scalar>( alpha: T, a: &TensorView2<T>, b: &TensorView2<T>, bias: Option<&TensorView1<T>>, beta: T, c: &mut TensorViewMut2<T>, ) -> Result<()> { use c...
the_stack
use crate::{ attributes, context::Context, events, external_functions, functions::FunctionGenerator, yul_functions::YulFunction, }; use move_model::{ ast::ModuleName, emit, emitln, model::{FunId, FunctionEnv, ModuleEnv, QualifiedId, QualifiedInstId}, ty::Type, }; use std::collections::BTreeMap; ...
the_stack
use crate::physics::Collider; use bevy::prelude::*; /// An [`Sprite`] is the basic abstraction for something that can be seen and interacted with. /// Players, obstacles, etc. are all sprites. #[derive(Clone, Debug)] pub struct Sprite { /// READONLY: A way to identify a sprite. pub label: String, /// READO...
the_stack
use std::{error, fmt, str::FromStr}; use bitcoin::{ self, hashes::hex::FromHex, secp256k1, secp256k1::{Secp256k1, Signing}, util::bip32, }; use MiniscriptKey; /// The MiniscriptKey corresponding to Descriptors. This can /// either be Single public key or a Xpub #[derive(Debug, Eq, PartialEq, Clon...
the_stack
use super::migrate::MetaStoreMigrate; use super::persistence::MetaSyncError; use super::query::MetaStoreQuery; use super::update::MetaStoreUpdate; use crate::common::cluster::ClusterName; use crate::common::cluster::{ Cluster, MigrationMeta, MigrationTaskMeta, Node, Proxy, RangeList, SlotRange, SlotRangeTag, }; use...
the_stack
use std::collections::{HashMap, HashSet}; use libseccomp::scmp_cmp; use syscalls::Sysno; use super::YesReally; use crate::{Rule, RuleSet}; // TODO: make bind calls conditional on the DGRAM/UNIX/STREAM flag in each function // TODO: add io_uring const NET_IO_SYSCALLS: &[Sysno] = &[ Sysno::epoll_create, Sysno::ep...
the_stack
use std::iter::{self, Iterator}; use num::{ bigint::{BigInt, BigUint, ToBigInt}, clamp, rational::Ratio, traits::clamp_max, }; use rand::SeedableRng; use rand_chacha::ChaCha20Rng; use thiserror::Error; use crate::{ crypto::{prng::generate_integer, ByteObject}, mask::{ config::MaskConfi...
the_stack
use unicode_canonical_combining_class::get_canonical_combining_class; /// An enumeration of the Unicode /// [Canonical_Combining_Class values](http://www.unicode.org/reports/tr44/#Canonical_Combining_Class_Values), /// with the following modifications: /// /// * Remove: `CCC84`, `CCC91`, `CCC103`. /// * Add: `CCC3`, `...
the_stack
use cast; use common_failures::prelude::*; use nom::{be_u16, IResult}; use std::fmt; use idx; use image::{ImageBuffer, Rgba, RgbaImage}; use img::{decompress, Size}; use mpeg2::ps; use util::BytesFormatter; /// The default time between two adjacent subtitles if no end time is /// provided. This is chosen to be a val...
the_stack
//! Definition of the genesis block. Placeholder for now. // required for genesis replacement //! #![allow(unused_imports)] #![cfg_attr(feature = "cargo-clippy", allow(clippy::unreadable_literal))] use chrono::prelude::{TimeZone, Utc}; use crate::core; use crate::global; use crate::pow::{Difficulty, Proof, ProofOfW...
the_stack
use crate::backup::Backup; use crate::{ consensus_pool_cache::{ get_highest_catch_up_package, get_highest_finalized_block, update_summary_block, ConsensusCacheImpl, }, inmemory_pool::InMemoryPoolSection, metrics::{LABEL_POOL_TYPE, POOL_TYPE_UNVALIDATED, POOL_TYPE_VALIDATED}, }; use ic_co...
the_stack
use std::collections::btree_map::Entry as BEntry; use std::collections::hash_map::Entry as HEntry; use std::collections::{BTreeMap, HashMap, HashSet}; use std::sync::Arc; use parking_lot::RwLock; use crate::errors::{Error, Result}; use crate::metrics::Collector; use crate::proto; use cfg_if::cfg_if; use lazy_static:...
the_stack
use crate::generated::gremlin as pb; use crate::generated::protobuf as result_pb; use crate::process::traversal::step::by_key::{ByStepOption, TagKey}; use crate::process::traversal::step::group_by::GroupFunctionGen; use crate::process::traversal::step::order_by::Order; use crate::process::traversal::traverser::Traverse...
the_stack
use crate::decode::basic::LittleEndianBasicDecoder; use crate::decode::*; use byteordered::byteorder::{ByteOrder, LittleEndian}; use dicom_core::dictionary::{DataDictionary, DictionaryEntry}; use dicom_core::header::{DataElementHeader, Length, SequenceItemHeader}; use dicom_core::{Tag, VR}; use dicom_dictionary_std::St...
the_stack
//! Code completion. use std::fmt; use std::mem; use std::ptr; use std::slice; use std::cmp::{self, Ordering}; use std::marker::{PhantomData}; use std::path::{PathBuf}; use clang_sys::*; use libc::{c_uint}; use utility; use super::{Availability, EntityKind, TranslationUnit, Unsaved, Usr}; use super::diagnostic::{Di...
the_stack
use std::sync::Arc; use axum::{ extract::{Extension, Query}, routing::{delete, get, post}, Json, Router, }; use tower_cookies::{Cookie, Cookies}; use http::{HeaderValue, StatusCode}; use serde::Deserialize; use serde_json::{json, Value}; use senseicore::{ services::{ admin::{AdminRequest, Adm...
the_stack
use std::ffi::c_void; use std::mem; use std::sync::atomic::{AtomicUsize, Ordering::SeqCst}; pub type wasm_name_t = wasm_byte_vec_t; pub type wasm_valkind_t = u8; pub type wasm_externkind_t = u8; pub type wasm_message_t = wasm_name_t; //pub type wasm_func_callback_t = Option< // unsafe extern "C" fn(args: *const was...
the_stack
use anyhow::anyhow; use anyhow::Error; use anyhow::Result; use parking_lot::Condvar; use parking_lot::Mutex; use std::path::Path; use std::path::PathBuf; use std::sync::Arc; use crate::environment::DirEntry; use crate::environment::DirEntryKind; use crate::environment::Environment; use super::GlobMatcher; use super::...
the_stack
/// Logs an error message if the passed in `result` is an error. #[macro_export] macro_rules! log_if_err { ($result:expr, $log_prefix:expr) => { if let Err(e) = $result.as_ref() { log::error!("{}: {}", $log_prefix, e); } }; } /// Logs an error message if the provided `cond` evaluate...
the_stack
/// Makes a method from a parser combination /// /// The must be set up because the compiler needs /// the information /// /// ```ignore /// method!(my_function<Parser<'a> >( &[u8] ) -> &[u8], tag!("abcd")); /// // first type parameter is `self`'s type, second is input, third is output /// method!(my_function<Parser<'a...
the_stack
// Instrumentation pass which injects global invariants into the bytecode. use crate::{ function_data_builder::FunctionDataBuilder, function_target::{FunctionData, FunctionTarget}, function_target_pipeline::{ FunctionTargetProcessor, FunctionTargetsHolder, FunctionVariant, VerificationFlavor, }...
the_stack
use std::error::Error; use std::io::{self, Cursor}; use std::path::{Path, PathBuf}; use std::{env, fs}; use clap::Parser; use futures::executor::block_on; use tracing::{debug, error, info}; use quake_core::entry::entry_defines::EntryDefines; use quake_core::entry::entry_paths::EntryPaths; use quake_core::quake::Quake...
the_stack
pub const DRAM_BASE: u64 = 0x80000000; const DTB_SIZE: usize = 0xfe0; extern crate fnv; use self::fnv::FnvHashMap; use memory::Memory; use cpu::{PrivilegeMode, Trap, TrapType, Xlen, get_privilege_mode}; use device::virtio_block_disk::VirtioBlockDisk; use device::plic::Plic; use device::clint::Clint; use device::uar...
the_stack
use super::link; use crate::actors::client_session::ClientSender; use crate::actors::router::Router; use crate::actors::supervisor::Supervisor; use crate::registry::{Occupied, ProviderEntry, Registry, WasEmpty}; use anyhow::Error; use async_trait::async_trait; use meio::{ ActionHandler, Actor, Context, IdOf, Intera...
the_stack
use filetime::FileTime; use crate::{entry, extension, Entry, State, Version}; mod entries; pub mod header; mod error { use quick_error::quick_error; use crate::{decode, extension}; quick_error! { #[derive(Debug)] pub enum Error { Header(err: decode::header::Error) { ...
the_stack
use crate::{ mocks::{CartMock, MockSpriteRenderer, MockVram}, ppu::{ background_renderer::BackgroundRenderer, control_register::ControlRegister, mask_register::MaskRegister, status_register::StatusRegister, write_latch::WriteLatch, IPpu, Ppu, CYCLES_PER_SCANLINE, SCREEN_HEIGHT, SCREEN_WI...
the_stack
use ggez::{ audio, audio::SoundSource, conf, event::{self, EventHandler, KeyCode, KeyMods}, graphics, graphics::{DrawMode, Font, Rect}, timer, Context, ContextBuilder, GameResult, }; use rand::prelude::*; use std::f32::consts::PI; use std::time::Duration; type Point2 = nalgebra::Point2<f32>...
the_stack
use capstone::{arch::arm::ArmInsn, prelude::*}; use std::{ collections::{HashMap, HashSet}, fs::{self, File}, io::{self, BufRead}, time::Instant, }; use crate::common::{check_bb_cov, find_ud_jumps, AnalysisOptions, BasicBlock, Jump, Summary}; /// traverse basic blocks to analyze potential new coverage...
the_stack
use std::collections::HashMap; use crate::common::pakhi_error::PakhiErr::SyntaxError; use crate::common::pakhi_error::PakhiErr; #[derive(Clone, Debug, PartialEq)] pub struct Token { pub kind: TokenKind, pub lexeme: Vec<char>, pub line: u32, pub src_file_path: String, } #[derive(Clone, Debug, PartialEq...
the_stack
use crate::codegen::arch::machine::register::*; use crate::codegen::common::machine::inst_def::*; #[allow(non_upper_case_globals)] mod inst { use super::*; // TODO: need macro to describe the followings lazy_static! { pub static ref ADDI: TargetInstDef = TargetInstDef::new("addi", TargetOpcode::AD...
the_stack
use std::cell::RefCell; use std::collections::btree_map::{BTreeMap, Entry}; use std::rc::Rc; use std::sync::{Arc, Condvar, Mutex, MutexGuard}; use rand::{self, Rng}; use {ChannelId, Receiver, Sender, Data}; /// Select encapsulates synchronization on at most one channel operation. /// /// This type was *specifically ...
the_stack
use c_fixed_string::CFixedStr; use jieba_rs::{Jieba, KeywordExtract, TextRank, TFIDF}; use std::boxed::Box; use std::os::raw::c_char; use std::{mem, ptr}; pub struct CJieba; pub struct CJiebaTFIDF; #[repr(C)] pub struct CJiebaWords { pub words: *mut FfiStr, pub len: usize, } #[repr(C)] pub struct CJiebaToken...
the_stack
use paste::paste; use std::borrow::Cow; use std::marker::PhantomData; /// Common traits for built-in units. pub mod traits { pub use super::BytesCowOps; pub use super::BytesOps; pub use super::BytesStrOps; pub use super::DurationNumberOps; pub use super::DurationOps; pub use super::IntoUnchec...
the_stack
use serde_json::Value as Json; use search::{Term, Token, Query, TermScorer}; use search::schema::Schema; use mapping::FieldSearchOptions; use query_parser::{QueryBuildContext, QueryParseError, QueryBuilder}; use query_parser::utils::{parse_string, parse_float, Operator, parse_operator}; #[derive(Debug)] struct Matc...
the_stack
mod command_handlers; mod config; mod generators; mod tree; #[allow(clippy::missing_errors_doc)] pub mod git; use crate::{ generators::CargoConfig, git::{ codec::{Encoder, GitCodec}, packfile::high_level::GitRepository, PktLine, }, tree::Tree, }; use arrayvec::ArrayVec; use by...
the_stack
extern crate env_logger; extern crate failure; extern crate floating_duration; extern crate gl; extern crate lesson_24_x_render as render; extern crate lesson_24_x_render_gl as render_gl; #[macro_use] extern crate log; extern crate nalgebra as na; extern crate nalgebra_glm as glm; extern crate resources; extern crate s...
the_stack
//! Widget traits use std::any::Any; use std::fmt; use crate::draw::{DrawHandle, InputState, SizeHandle}; use crate::event::{self, ConfigureManager, Manager, ManagerState}; use crate::geom::{Coord, Offset, Rect}; use crate::layout::{AlignHints, AxisInfo, SizeRules}; use crate::{CoreData, TkAction, WidgetId}; impl dy...
the_stack
use crate::engine::fields::field::Field; use cfg_if::cfg_if; use hashbrown::HashMap; use rand::prelude::*; use rand_pcg::Pcg64; use std::cell::RefCell; use std::fmt::Display; use std::hash::Hash; cfg_if! { if #[cfg(any(feature = "parallel", feature = "visualization", feature = "visualization_wasm"))]{ use ...
the_stack
use std::any::Any; use std::cmp::Ordering; use std::fmt::{self, Debug}; use std::future::Future; use std::hash::{Hash, Hasher}; use std::sync::{Arc, Weak}; use std::{mem, ptr}; use futures::channel::{mpsc, oneshot}; use futures::future::{self, BoxFuture, FutureExt}; use futures::select_biased; use futures::stream::{Fu...
the_stack
extern crate proc_macro; #[macro_use] extern crate quote; use std::collections::HashSet; use std::fmt::Write; use std::ops::Deref; use proc_macro::TokenStream; use syn::parse_macro_input; use syn::{ Expr, ExprLit, Fields, FieldsNamed, FieldsUnnamed, GenericArgument, ItemEnum, ItemStruct, Lit, PathArguments, T...
the_stack
extern crate nom; use nom::branch::alt; use nom::bytes::complete::tag; use nom::combinator::map; use nom::number::complete::le_u16; use nom::number::complete::le_u8; use nom::sequence::preceded; use nom::IResult; #[derive(Copy, Clone)] struct Word(u16); fn le_word(input: &[u8]) -> IResult<&[u8], Word> { le_u16(in...
the_stack
use bevy::prelude::*; use bevy::render::mesh::{Indices, VertexAttributeValues}; //use crate::objects::plane::Plane; use na::{point, Point3, Vector3}; use std::collections::HashMap; use bevy::render::pipeline::PrimitiveTopology; use bevy::render::wireframe::Wireframe; use rapier::geometry::{ColliderHandle, ColliderSet...
the_stack
use anyhow::Result; use magnitude::Magnitude; use num_traits::Zero; use std::collections::HashMap; use std::{any::Any, collections::HashSet}; use crate::algo::Error; use crate::provide::{Edges, Graph, Vertices}; use crate::{ graph::{subgraph::ShortestPathSubgraph, Edge, EdgeDir}, prelude::Neighbors, }; /// Fi...
the_stack
use wasm_bindgen::prelude::*; use super::common::*; use super::matrix2d::*; use super::matrix4::*; use super::quaternion::*; use super::vector2::*; #[wasm_bindgen] pub struct Matrix3( pub f32, pub f32, pub f32, pub f32, pub f32, pub f32, pub f32, pub f32, pub f32, ); #[wasm_bindge...
the_stack
pub mod cifar; pub mod crop; pub mod mnist; pub use crate::crop::{Crop, Cropping}; use alumina_core::graph::Node; use indexmap::IndexMap; use ndarray::{ArcArray, Axis, IxDyn}; use rand::SeedableRng; use rand::{seq::SliceRandom, thread_rng, Rng, RngCore}; use rand_pcg::Pcg64Mcg; use smallvec::SmallVec; use std::{ iter...
the_stack
use std::{borrow::Cow, convert::TryFrom}; use serde::{ser::SerializeSeq, Deserialize, Serialize}; use super::{ error::{ValueAccessError, ValueAccessErrorKind, ValueAccessResult}, serde::OwnedOrBorrowedRawArray, Error, Iter, RawBinaryRef, RawBsonRef, RawDocument, RawRegexRef, Result...
the_stack
#![allow(non_upper_case_globals)] use libc::{c_int, c_uint, size_t, c_void}; use std; use std::borrow::ToOwned; use std::cell::{UnsafeCell}; use std::cmp::{Ordering}; use std::collections::HashMap; use std::error::Error; use std::ffi::{CString}; use std::path::Path; use std::mem; use std::ptr; use std::result::Result;...
the_stack
use std::path::Path; use bellperson::{ gadgets::{boolean::AllocatedBit, multipack, num::AllocatedNum}, util_cs::test_cs::TestConstraintSystem, Circuit, ConstraintSystem, }; use blstrs::Scalar as Fr; use ff::Field; use filecoin_hashers::{ blake2s::Blake2sHasher, poseidon::{PoseidonDomain, PoseidonHa...
the_stack
use iced::{button, container, Container, Align, Length, HorizontalAlignment, VerticalAlignment, Background, Button, Row, Column, Element, Sandbox, Settings, Text}; use rand::{thread_rng, seq::SliceRandom}; use lazy_static::lazy_static; use std::sync::Mutex; use chess_engine::*; pub use chess_engine::Board; pub fn run...
the_stack
use self::Op::{Compatible, Ex, Gt, GtEq, Lt, LtEq, Tilde, Wildcard}; use self::WildcardVersion::{Minor, Patch}; use crate::errors::Error; use crate::parser; use crate::version::{Identifier, Version}; #[cfg(feature = "serde")] use serde::de::{self, Deserialize, Deserializer, Visitor}; #[cfg(feature = "serde")] use serde...
the_stack
use basedrop::{Handle, Shared, SharedCell}; use cpal::traits::{DeviceTrait, HostTrait, StreamTrait}; use cpal::StreamConfig; use ringbuf::Consumer; use audio_processor_graph::AudioProcessorGraph; use audio_processor_standalone_midi::audio_thread::MidiAudioThreadHandler; use audio_processor_standalone_midi::host::MidiM...
the_stack
use crate::OutputConfig; use super::{CLIError, Command}; use kamu::domain::*; use kamu::infra::DatasetKind; use kamu::infra::DotStyle; use kamu::infra::DotVisitor; use kamu::infra::WorkspaceLayout; use opendatafabric::*; use std::collections::HashSet; use std::fmt::Write; use std::path::PathBuf; use std::sync::Arc; ...
the_stack
use std::fs::File; use std::fs::OpenOptions; use std::io::BufRead; use std::io::BufReader; use std::io::Write; use std::num::NonZeroUsize; use std::str::FromStr; use std::sync::atomic::Ordering; use std::sync::Arc; use std::thread; use color_eyre::eyre::anyhow; use color_eyre::Result; use miow::pipe::connect; use park...
the_stack
use crate::prelude::*; use crate::executor::global::spawn_stream_handler; use crate::model::execution_context::VisualizationUpdateData; use crate::presenter::graph; use crate::presenter::graph::visualization::manager::Manager; use crate::presenter::graph::AstNodeId; use crate::presenter::graph::ViewNodeId; use enso_f...
the_stack
#![allow(dead_code)] use bitflags::*; use kernel_hal::user::*; pub use linux_object::ipc::*; use numeric_enum_macro::numeric_enum; use zircon_object::vm::*; use super::*; impl Syscall<'_> { /// returns the semaphore set identifier associated with the argument key pub fn sys_semget(&self, key: usize, nsems: u...
the_stack
use crate::encoding::ceil8; use super::super::bitpacking; use super::super::uleb128; use super::super::zigzag_leb128; #[derive(Debug)] struct Block<'a> { // this is the minimum delta that must be added to every value. min_delta: i64, num_mini_blocks: usize, values_per_mini_block: usize, bitwidths:...
the_stack
use crate::{ timestamp::{FloatTimestamp, Timestamp}, Config, }; use std::ops::{Deref, DerefMut}; use tracing::{trace, warn}; /// Arbitrary structure that can be updated in discrete steps. pub trait Stepper { /// Update a single step. fn step(&mut self); } /// A [`Stepper`] that has a notion of timesta...
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::c_void; use std::mem::MaybeUnin...
the_stack
use serde::{de::DeserializeOwned, Serialize}; use std::ops::{Bound, RangeBounds}; use std::path::{Path, PathBuf}; use std::sync::Mutex; use std::time::{Duration, Instant}; /// Generic `Dataset` trait, modeled after PyTorch's `utils.data.Dataset`. /// It represents a collection of objects indexed in the range `0..len()...
the_stack
#[non_exhaustive] #[derive(std::fmt::Debug)] pub struct AssociateMemberAccountError { /// Kind of error that occurred. pub kind: AssociateMemberAccountErrorKind, /// Additional metadata about the error, including error code, message, and request ID. pub(crate) meta: aws_smithy_types::Error, } /// Types ...
the_stack
use crate::runtime::execution::ExecutionState; use crate::runtime::task::clock::VectorClock; use crate::runtime::task::{TaskId, DEFAULT_INLINE_TASKS}; use crate::runtime::thread; use smallvec::SmallVec; use std::cell::RefCell; use std::fmt::Debug; use std::rc::Rc; use std::result::Result; pub use std::sync::mpsc::{Recv...
the_stack
use crate::graphic::{GlBuffer, GlProgram, GlProgramBuilder, GlVertexArray}; use crate::opengl; use crate::opengl::types::{GLboolean, GLint, GLsizeiptr, GLuint}; use fnv::FnvHashSet; use lru::LruCache; use nalgebra::Matrix4; use point_viewer::octree; use point_viewer::read_write::PositionEncoding; use rand::{prelude::Sl...
the_stack
use crate::pairing::ff::{Field}; use crate::pairing::{Engine, CurveProjective}; use std::marker::PhantomData; use rand::{Rand, Rng}; use crate::sonic::helped::{Proof, SxyAdvice}; use crate::sonic::helped::batch::Batch; use crate::sonic::helped::poly::{SxEval, SyEval}; use crate::sonic::helped::helper::Aggregate; use c...
the_stack
use std::fmt; use std::rc::Rc; use typecheck::types::{TypeEnv, Type, TypeRef}; use typecheck::locals::{Locals, LocalEntryMerge}; use ast::Loc; use util::Or; #[derive(Debug)] pub struct ComputationPredicate<'ty, 'object: 'ty> { pub truthy: Option<Computation<'ty, 'object>>, pub falsy: Option<Computation<'ty, 'o...
the_stack
use eframe::egui::epaint::Shadow; use eframe::egui::{self, vec2, Color32, Pos2, Rect, Response, Stroke, TextStyle, Vec2}; use std::path::PathBuf; use std::str::FromStr; use super::super::platform::platform_colors; use super::super::widgets::background::{shadow_background, AnimatedBackground}; use super::Textures; use...
the_stack