text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use crate::exporters::*;
use crate::sensors::Sensor;
use clap::Arg;
use serde::{Deserialize, Serialize};
use std::fs;
use std::fs::File;
use std::path::PathBuf;
use std::thread;
use std::time::{Duration, Instant};
/// An Exporter that displays power consumption data of the host
/// and its processes on the standard ou... | the_stack |
extern crate bit_field;
extern crate bitflags;
extern crate log;
use crate::cpu::mmu;
use crate::boot_proto::BootProtocol;
use crate::mm;
use crate::mm::phy::{Frame, PhysicalMemoryManager};
use lazy_static::lazy_static;
use bit_field::BitField;
use bitflags::bitflags;
const MAX_ENTRIES_PER_LEVEL: u16 = 512;
const E... | the_stack |
use core::ops;
use crate::utils::Init;
/// Get a type implementing [`WrappingTrait`] that wraps around when incremented
/// past `MAX`.
///
/// This type alias tries to choose the most efficient data type to do the job.
pub type Wrapping<const MAX: u64> = If! {
if (MAX == 0) {
()
} else if (MAX < u8::... | the_stack |
use ctypes::wchar_t;
use shared::basetsd::{UINT32, UINT64, ULONG64};
use shared::guiddef::GUID;
use shared::in6addr::IN6_ADDR;
use shared::inaddr::IN_ADDR;
use shared::minwindef::{DWORD, PULONG, PUSHORT, UCHAR, ULONG, USHORT};
use shared::ws2def::{
INADDR_ANY, INADDR_BROADCAST, INADDR_NONE, IOC_VENDOR, SOCKADDR_IN,... | the_stack |
#[allow(unused)]
fn runner() -> crate::TestRunner {
super::runner()
.mock_file(
"before_use/function/other.scss",
"@function member() {@return null}\n",
)
.mock_file(
"before_use/variable_declaration/other.scss",
"$member: value;\n",
)
... | the_stack |
use emumisc::{BitExtra, is_b0_set, is_b7_set};
use rom::{NesRom, LoadError};
use mappers::Mapper;
use generic_mapper::{bank, BankedGenericMapper};
use memory_map::LOWER_ROM_ADDRESS;
// FIXME: This implementation of MMC1 is not yet accurate.
// At very least the serial writes to the serial port
// should be ignored, an... | the_stack |
use core::ptr::{Unique};
use arch::{kernel_start_paddr, kernel_start_vaddr,
kernel_end_paddr};
use arch::paging::{PTEntry, PML4, PDPT, PD, PT,
pml4_index, pdpt_index, pd_index, pt_index,
BASE_PAGE_LENGTH, LARGE_PAGE_LENGTH};
use arch::{KERNEL_BASE};
use common::{PAddr, ... | the_stack |
mod format0 {
use ttf_parser::{cmap, GlyphId};
#[test]
fn maps_not_all_256_codepoints() {
let mut data = vec![
0x00, 0x00, // format: 0
0x01, 0x06, // subtable size: 262
0x00, 0x00, // language ID: 0
];
// Map (only) codepoint 0x40 to 100.
... | the_stack |
extern crate detours_sys;
extern crate winapi;
use std::{
ffi::c_void,
mem,
os::raw::{c_int, c_uint, c_ulong},
ptr, slice, usize,
};
use detours_sys::{
DetourAttach, DetourDetach, DetourRestoreAfterWith, DetourTransactionAbort,
DetourTransactionBegin, DetourTransactionCommit, DetourUpdateProce... | the_stack |
use parser::Identifier;
use memory::MemoryBlock;
use operations::{Operation};
use operations::item_type::{ItemType, FuncArgType};
use operations::scope::{ScopeStack, ScopeItem, TypeId};
pub fn define_boolean(scope: &mut ScopeStack) -> TypeId {
// Taking advantage of the scope system to simulate modules
// This... | the_stack |
use std::io::{BufRead, ErrorKind, Result, Write};
pub trait BufReadExt: BufRead {
fn stream_until_token<W: Write>(&mut self, token: &[u8], out: &mut W) -> Result<(usize, bool)> {
stream_until_token(self, token, out)
}
}
impl<T: BufRead> BufReadExt for T {}
fn stream_until_token<R: BufRead + ?Sized, W... | the_stack |
use std::{
cell::Cell,
collections::HashMap,
convert::TryInto,
sync::{Arc, Mutex},
io::Read,
};
use anyhow::{Context, Error};
use hotg_rune_core::{SerializableRecord, Shape, TFLITE_MIMETYPE};
use hotg_rune_runtime::{Capability, Image, Output};
use wasmer::{Array, Function, LazyInit, Memory, RuntimeE... | the_stack |
use std::{collections::HashMap, convert::TryInto, iter, mem};
use gazebo::dupe::Dupe;
use indexmap::map::IndexMap;
use crate::{
codemap::CodeMap,
environment::{names::MutableNames, slots::ModuleSlotId, EnvironmentError, Globals, Module},
errors::{did_you_mean::did_you_mean, Diagnostic},
eval::runtime:... | the_stack |
use json::JsonValue;
use log::*;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::time::{Duration, SystemTime};
use tokio::signal::unix::{signal, SignalKind};
use tokio::stream::StreamExt;
use tokio::sync::mpsc::{channel, Receiver, Sender};
use tokio::sync::oneshot;
use crate::amqp_trigger:... | the_stack |
use super::{ Joint, Vertex, Triangle, Weight, Mesh, Animation };
use std::{ vec, char, str };
use std::rt::io::buffered::BufferedReader;
use std::rt::io::{ Reader, File };
use math;
use log::Log;
#[macro_escape]
#[path = "../../../shared/log/macros.rs"]
mod macros;
struct Model
{
file_directory: ~str,
version: i... | the_stack |
//! The core implementation of the concurrent trie data structure.
//!
//! This module contains the [`Raw`][crate::raw::Raw] type, which is the engine of all the data
//! structures in this crate. This is exposed to allow wrapping it into further APIs, but is
//! probably not the best thing for general use.
// # The d... | the_stack |
use crc::crc32;
use flate2::{write::ZlibEncoder, Compression};
use sha1::{Digest, Sha1};
use std::{
collections::BTreeMap,
io,
io::{copy, Seek, SeekFrom, Write},
num::NonZeroU8,
};
use std::{
fs::OpenOptions,
io::BufWriter,
};
pub type Sha1Oid = [u8; 20];
#[derive(Clone, Debug)]
pub enum GitOb... | the_stack |
use std::{error, fmt, io, ops::Deref};
use bytes::{Buf, BufMut, Bytes, BytesMut, IntoBuf};
use tokio_codec as codec;
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd, Eq, Ord, Hash)]
pub struct LightWeightConnectionId(u32);
impl Deref for LightWeightConnectionId {
type Target = u32;
fn deref(&self) -> &Self... | the_stack |
use super::{
attribute::{Attribute, AttributeList},
constants::*,
expression::Convertor,
symbol::Symbol,
Error, Tuple,
};
use crate::chase::Sequent;
use codd::expression as rel_exp;
use itertools::Itertools;
use razor_fol::{
syntax::{
formula::{Atom, Atomic, Equals},
term::Variab... | the_stack |
use std::convert::TryInto;
use futures::stream::{FuturesUnordered, StreamExt};
use hex::FromHex;
use tower::ServiceExt;
use zebra_chain::{
block::Block, serialization::ZcashDeserializeInto, sprout::EncryptedNote,
transaction::Transaction,
};
use crate::primitives::groth16::*;
async fn verify_groth16_spends_... | the_stack |
use std::marker::PhantomData;
use std::{any::Any, fmt::Debug};
use anyhow::Result;
use provide::{Edges, Graph, Neighbors, Vertices};
use quickcheck::Arbitrary;
use crate::provide;
use crate::storage::{FlowList, FlowMat, GraphStorage, List, Mat};
use crate::{
graph::{error::Error, DefaultEdge, Edge, EdgeDir, FlowE... | the_stack |
use super::Compiler;
use cpu::CPU;
use cpu::Registers;
use dynasmrt::{DynasmApi, DynasmLabelApi};
use memory::MemSegment;
pub extern "win64" fn read_memory(cpu: *mut CPU, addr: u16) -> u8 {
unsafe { (*cpu).read(addr) }
}
// Expects the 6502 address in rcx and returns the byte in r8 (arg)
macro_rules! c... | the_stack |
use crate::net::graphql::QuestsResponse;
use crate::net::graphql::{
query_types::{
AttacksResponse, BuildingsResponse, HobosQueryResponse, VolatileVillageInfoResponse,
},
ReportsResponse,
};
use crate::prelude::{PadlError, PadlErrorCode};
use crate::resolution::{SCREEN_H, SCREEN_W};
use crate::{game... | the_stack |
use core::{
convert::Infallible,
fmt::{Result, Write},
ops::Deref,
};
use embedded_hal::prelude::*;
use crate::{gpio::*, rcc::Rcc, time::Bps};
use core::marker::PhantomData;
/// Serial error
#[non_exhaustive]
#[derive(Debug)]
pub enum Error {
/// Framing error
Framing,
/// Noise error
No... | the_stack |
use crate::{
//common::timed_event_handler::TimedEventHandler,
//network::constant::TimerMessageType,
structure::{cache_change::ChangeKind, entity::RTPSEntity},
};
use crate::structure::endpoint::{Endpoint, EndpointAttributes};
use crate::messages::submessages::submessages::*;
use crate::dds::ddsdata::DDSData;
u... | the_stack |
//! Gallery of all widgets
//!
//! This is a test-bed to demonstrate most toolkit functionality
//! (excepting custom graphics).
use kas::dir::Right;
use kas::event::VirtualKeyCode as VK;
use kas::prelude::*;
use kas::resvg::Svg;
use kas::updatable::SharedRc;
use kas::widgets::{menu::MenuEntry, view::SingleView, *};
... | the_stack |
use std::borrow::Cow;
use std::io;
use std::cmp;
use std::mem;
use std::iter;
use std::io::prelude::*;
use crate::common::{Block, Frame};
mod decoder;
pub use self::decoder::{
PLTE_CHANNELS, StreamingDecoder, Decoded, DecodingError, DecodingFormatError, Extensions,
Version
};
const N_CHANNELS: usize = 4;
//... | the_stack |
use std::{
collections::{HashMap, HashSet},
env,
fmt::Write,
sync::Arc,
};
use serenity::prelude::*;
use serenity::{
async_trait,
client::bridge::gateway::{GatewayIntents, ShardId, ShardManager},
framework::standard::{
buckets::{LimitedFor, RevertBucket},
help_commands,
... | the_stack |
use crate::css_kinds_src::CSS_KINDS_SRC;
use crate::json_kinds_src::JSON_KINDS_SRC;
use crate::kinds_src::{AstSrc, Field, TokenKind, JS_KINDS_SRC};
use crate::{to_lower_snake_case, to_upper_snake_case, LanguageKind};
use proc_macro2::Literal;
use quote::{format_ident, quote};
use std::collections::HashMap;
use xtask::R... | the_stack |
use super::Error;
use nix::libc::{c_long, c_uint, c_void};
pub type khronos_utime_nanoseconds_t = khronos_uint64_t;
pub type khronos_uint64_t = u64;
pub type khronos_ssize_t = c_long;
pub type EGLint = i32;
pub type EGLchar = char;
pub type EGLLabelKHR = *const c_void;
pub type EGLNativeDisplayType = NativeDisplayType... | the_stack |
use crate::Caps;
use crate::Element;
use crate::Event;
use crate::FlowError;
use crate::FlowSuccess;
use crate::Object;
use crate::PadDirection;
use crate::PadLinkCheck;
use crate::PadLinkError;
use crate::PadLinkSuccess;
use crate::PadMode;
use crate::PadTemplate;
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_... | the_stack |
use crate::bls::hash256::HASH256;
use crate::bls::hash384::HASH384;
use crate::bls::hash512::HASH512;
use crate::bls::rand::RAND;
use crate::bls::sha3::SHA3;
pub const MC_SHA2: usize = 2;
pub const MC_SHA3: usize = 3;
pub const SHA256: usize = 32;
pub const SHA384: usize = 48;
pub const SHA512: usize = 64;
#[allow(no... | the_stack |
//! Utilities for loading ELF files into an existing address space.
use {
crate::elf_parse as elf,
crate::util,
fuchsia_zircon::{self as zx, AsHandleRef},
std::ffi::{CStr, CString},
thiserror::Error,
};
/// Possible errors that can occur during ELF loading.
#[allow(missing_docs)] // No docs on ind... | the_stack |
// cspell:ignore Trillian, Vogon
use exonum::{
crypto::{hash, KeyPair, Seed},
runtime::{
migrations::{
InitMigrationError, LinearMigrations, MigrateData, MigrationContext, MigrationError,
MigrationScript,
},
versioning::Version,
},
};
use exonum_derive::{Serv... | the_stack |
use std::collections::BTreeSet;
use std::convert::From;
use std::iter;
use std::mem::size_of;
use arrow::array::{Array, StringArray};
use super::NULL_ID;
use crate::column::{cmp, RowIDs};
pub const ENCODING_NAME: &str = "RLE";
// `RLE` is a run-length encoding for dictionary columns, where all dictionary
// entries... | the_stack |
use crate::build_support::{android, binaries_config, cargo, features, ios, xcode};
use bindgen::{CodegenConfig, EnumVariation, RustTarget};
use cc::Build;
use std::path::{Path, PathBuf};
pub mod env {
use crate::build_support::cargo;
pub fn skia_lib_definitions() -> Option<String> {
cargo::env_var("SK... | the_stack |
use approx::{AbsDiffEq, RelativeEq, UlpsEq};
use num_complex::Complex;
use std::fmt;
use crate::base::{Matrix2, Matrix3, Normed, Unit, Vector1, Vector2};
use crate::geometry::{Point2, Rotation2};
use crate::Scalar;
use simba::scalar::RealField;
use simba::simd::SimdRealField;
use std::cmp::{Eq, PartialEq};
/// A 2D r... | the_stack |
use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
use rocksdb::{self, Writable};
use std::io::Write;
use std::path::Path;
use std::sync::Arc;
use std::{mem, str};
use utils::*;
struct U16BeSuffixTransform;
impl rocksdb::SliceTransform for U16BeSuffixTransform {
fn transform<'a>(&mut self, key: &'a [u8]) ->... | the_stack |
use super::{
config,
traits::sealed::{Bits, Sealed},
traits::*,
DmaDirection, MemoryToPeripheral, PeripheralToMemory,
};
use core::fmt;
use core::marker::PhantomData;
use core::mem;
use crate::{
pac::{self, MDMA},
rcc::{rec, rec::ResetEnable},
};
use core::ops::Deref;
impl Sealed for MDMA {}... | the_stack |
use std::cmp::{max, min, PartialOrd};
pub fn clamp<T: PartialOrd>(val: T, min: T, max: T) -> T {
if val < min {
min
} else if val > max {
max
} else {
val
}
}
#[inline]
pub fn extract_pixel_rgba(pixel: image::Rgba<u8>) -> (u8, u8, u8, u8) {
(pixel[0], pixel[1], pixel[2], pi... | the_stack |
use ic_crypto::utils::TempCryptoComponent;
use ic_crypto_test_utils_threshold_sigs::non_interactive::{
create_dealings, run_ni_dkg_and_create_single_transcript, NiDkgTestEnvironment,
RandomNiDkgConfig,
};
use ic_interfaces::crypto::{
LoadTranscriptResult, NiDkgAlgorithm, Signable, SignableMock, ThresholdSig... | the_stack |
use core::{cell::UnsafeCell, fmt, marker::PhantomData};
use crate::{
hunk::{CfgHunkBuilder, DefaultInitTag, Hunk, HunkIniter},
kernel::{
self,
cfg::{CfgBuilder, CfgMutexBuilder},
LockMutexError, MarkConsistentMutexError, MutexProtocol, TryLockMutexError,
},
prelude::*,
};
/// C... | the_stack |
use anyhow::{Context, Result};
use bytes::{BufMut, BytesMut};
use log::*;
use std::fmt::Write as FmtWrite;
use std::io;
use std::io::Write;
use std::sync::Arc;
use std::time::SystemTime;
use tar::{Builder, EntryType, Header};
use crate::relish::*;
use crate::repository::Timeline;
use postgres_ffi::xlog_utils::*;
use p... | the_stack |
use std::convert::{AsRef, Infallible, TryFrom};
use std::error::Error;
use std::fmt::{self, Debug, Display, Formatter};
use std::ops::Deref;
use std::str;
use crate::syntax;
/// An RTSP request method (as defined in
/// [[RFC7826, Section 13]](https://tools.ietf.org/html/rfc7826#section-13)).
///
/// Each variant (ex... | the_stack |
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListFragmentsOutput {
/// <p>A list of archived <code>Fragment</code> objects from the stream that meet the selector criteria. Results are in no specific order, even across pages.<... | the_stack |
//! Definition of boolean logic combinators over `Predicate`s.
use std::fmt;
use std::marker::PhantomData;
use crate::reflection;
use crate::Predicate;
/// Predicate that combines two `Predicate`s, returning the AND of the results.
///
/// This is created by the `Predicate::and` function.
#[derive(Debug, Clone, Copy... | the_stack |
use std::pin::Pin;
use http;
use hyper;
#[cfg(feature = "bundle_files")]
use includedir;
use {futures, jsonwebtoken, serde, serde_json, std};
use hyper::header::ACCEPT;
use hyper::{Method, StatusCode};
use futures::channel::mpsc;
use futures::Future;
use parking_lot::Mutex;
use std::sync::Arc;
use crate::access_co... | the_stack |
use super::*;
use bytes::buf::UninitSlice;
/// Structure used by components to continuously extract leases from BufferChunks swapped with the internal/private BufferPool
/// Using get_buffer_encoder() we get a BufferEncoder which implements BufMut interface for the underlying Chunks
/// The BufferEncoder uses its life... | the_stack |
use serde::{Deserialize, Serialize};
pub use super::exception::Exception;
use super::{arm::ArmCond, psr::RegPSR, Addr, CpuMode, CpuState};
use crate::util::{Shared, WeakPointer};
use super::memory::{MemoryAccess, MemoryInterface};
use MemoryAccess::*;
use cfg_if::cfg_if;
#[cfg(feature = "debugger")]
use super::th... | the_stack |
use alloc::vec::Vec;
use core::{
convert::{TryFrom, TryInto},
fmt::{self, Display, Formatter},
result,
};
use crate::{
bytesrepr::{self, FromBytes, ToBytes, U8_SERIALIZED_LENGTH},
CLType, CLTyped,
};
/// Errors which can occur while executing the Auction contract.
#[derive(Debug, Copy, Clone, Part... | the_stack |
use core_model::coco_struct::{ClassInfo, MemberInfo, MethodInfo};
use regex::Regex;
use std::collections::HashMap;
use std::fs::File;
use std::io::{BufRead, BufReader};
use std::path::PathBuf;
use std::str::Lines;
pub struct CtagsParser {
class_map: HashMap<String, ClassInfo>,
}
impl Default for CtagsParser {
... | the_stack |
#[macro_use(s)]
#[cfg_attr(test, macro_use(array))]
extern crate ndarray;
extern crate test; // benchmarking
use ndarray::Array2;
use numpy::PyArray1;
use numpy::PyArray2;
use numpy::PyArray3;
use pyo3::exceptions::{PyRuntimeError, PyValueError};
use pyo3::prelude::*;
use pyo3::types::PySequence;
use pyo3::wrap_pyfu... | the_stack |
use std::ops::{BitAnd, BitOr};
use proc_macro2::{Ident, TokenStream, TokenTree};
use crate::parser::Parser;
use crate::util::is_punct;
#[derive(Clone, Copy, PartialEq, Eq)]
pub struct IgnoreFlags {
bits: u8,
}
#[allow(non_upper_case_globals)]
impl IgnoreFlags {
pub const Empty: Self = Self::new(0x00);
p... | the_stack |
#![no_std]
#![feature(panic_info_message)]
#[macro_use] extern crate alloc;
#[macro_use] extern crate lazy_static;
#[macro_use] extern crate log;
#[macro_use] extern crate static_assertions;
extern crate irq_safety;
extern crate memory;
extern crate stack;
extern crate tss;
extern crate mod_mgmt;
extern crate context_... | the_stack |
use crate::color::{color_blend, color_dist, Color};
use crate::console::*;
use crate::file::FileLoader;
use image;
/// An easy way to load PNG images and blit them on the console
pub struct Image {
file_loader: FileLoader,
img: Option<image::RgbaImage>,
}
impl Image {
/// Create an image and load a PNG fi... | the_stack |
use query_engine_tests::*;
#[test_suite]
mod multi_field_uniq_mut {
use indoc::indoc;
use query_engine_tests::{run_query, run_query_json};
fn schema_one2one() -> String {
let schema = indoc! {
r#"model User {
#id(id, Int, @id)
name String
blog... | the_stack |
use std::os::raw::c_void;
use cocoa::appkit::*;
use cocoa::base::{id, Nil};
use cocoa::base::nil;
use cocoa::foundation::{NSPoint, NSRect, NSSize, NSString, NSUInteger};
use glutin::event::VirtualKeyCode;
use glutin::window::Window;
use objc::*;
use objc::declare::ClassDecl;
use objc::runtime::{NO, Object, object_getC... | the_stack |
use crate::error::*;
// some std stuff...
use std::collections::HashMap;
use std::fmt;
use std::hash::{Hash, Hasher};
use std::io::{Read, Seek};
use std::marker::PhantomData;
use std::{
borrow::{Borrow, Cow},
num::NonZeroU64,
};
use futures::TryFutureExt;
use wgpu::{util::DeviceExt, ComputePassDescriptor};
//... | the_stack |
use gstreamer_gl_sys::*;
use std::env;
use std::error::Error;
use std::ffi::OsString;
use std::mem::{align_of, size_of};
use std::path::Path;
use std::process::Command;
use std::str;
use tempfile::Builder;
static PACKAGES: &[&str] = &["gstreamer-gl-1.0"];
#[derive(Clone, Debug)]
struct Compiler {
pub args: Vec<St... | the_stack |
use crate::*;
/// A rendering context e.g. for doing 3d rendering.
///
/// Useful if you need:
/// * A different set of top-level uniforms (see [`PassUniforms`]).
/// * To render into a [`Texture`], which you can then manipulate to your liking.
///
/// [`Pass`]es are nested, with each [`CxWindow`] having a [`CxWindow:... | the_stack |
use alloc::FrameAllocator;
use ::elf;
use memory::{Addr, PAGE_SIZE, PAddr, Page, PhysicalPage, VAddr, VirtualPage};
use core::marker::PhantomData;
use core::ops::{Index, IndexMut};
use core::{convert, fmt, intrinsics};
use ::{ MapResult, MapErr};
/// The number of entries in a page table.
pub const N_ENTRIES: usize ... | the_stack |
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::PoseidonHasher, sha256::Sha256Hasher, Domain, Hasher,... | the_stack |
//! A utility for recursively measuring the size of an object
//!
//! This contains the [`DeepSizeOf`](DeepSizeOf) trait, and re-exports
//! the `DeepSizeOf` derive macro from [`deepsize_derive`](https://docs.rs/deepsize_derive)
//!
//! ```rust
//! use deepsize::DeepSizeOf;
//!
//! #[derive(DeepSizeOf)]
//! struct Test... | the_stack |
//! Transport upgrader.
//!
// TODO: add example
use crate::muxing::{IStreamMuxer, StreamMuxer, StreamMuxerEx};
use crate::secure_io::SecureInfo;
use crate::transport::{ConnectionInfo, IListener, ITransport, ListenerEvent, TransportListener};
use crate::upgrade::multistream::Multistream;
use crate::upgrade::Upgrader;
... | the_stack |
use std::any::type_name;
use std::future::Future;
use std::marker::PhantomData;
use std::pin::Pin;
use std::task::{self, Poll};
mod context;
pub mod messages;
mod sync;
#[cfg(test)]
mod tests;
#[doc(inline)]
pub use context::{Context, NoMessages, ReceiveMessage, RecvError};
#[cfg(any(test, feature = "test"))]
pub(cra... | the_stack |
use shared::*;
use spirv_std::glam::{
const_vec3, vec2, vec3, Mat2, Mat3, Vec2, Vec2Swizzles, Vec3, Vec3Swizzles, Vec4, Vec4Swizzles,
};
// Note: This cfg is incorrect on its surface, it really should be "are we compiling with std", but
// we tie #[no_std] above to the same condition, so it's fine.
#[cfg(target_ar... | the_stack |
use std::sync::Arc;
use futures::{channel::mpsc, sink::SinkExt};
use log::LevelFilter::Debug;
//use nimiq_mempool::filter::MempoolFilter;
use parking_lot::RwLock;
use rand::prelude::StdRng;
use rand::SeedableRng;
use beserial::{Deserialize, Serialize};
use nimiq_blockchain::Blockchain;
use nimiq_bls::KeyPair as BLSKe... | the_stack |
use std::{cmp::min, marker::PhantomData};
use magnitude::Magnitude;
use crate::{
graph::{Edge, UndirectedEdge},
provide::{Edges, Graph, IdMap, Vertices},
};
/// Finds cut vertices(articulation points) and cut edges(bridges).
///
/// # Examples
/// ```
/// use prepona::prelude::*;
/// use prepona::storage::Ma... | the_stack |
use crate::contract::{execute, instantiate, query};
use crate::error::ContractError;
use crate::querier::query_epoch_state;
use crate::state::{read_epoch_state, store_epoch_state, EpochState};
use crate::testing::mock_querier::mock_dependencies;
use cosmwasm_bignumber::{Decimal256, Uint256};
use cosmwasm_std::testing:... | the_stack |
use std::sync::Arc;
use std::path::PathBuf;
use std::collections::HashMap;
use http_file_headers::{Config as HeadersConfig};
use quire::validate::{Nothing, Enum, Structure, Scalar, Mapping, Sequence};
use quire::validate::{Numeric};
use serde::de::{Deserializer, Deserialize, Error};
use crate::intern::DiskPoolName;
... | the_stack |
pub struct DescribeMergeConflictsPaginator<
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::describe_merge_conflicts_input::Builder,
}
imp... | the_stack |
pub mod globals;
use crate::globals::*;
use anyhow::{Context, Result};
use common::external::{error_message, Camera};
use common::internal::{handle_controller, Input};
use memory_rs::internal::injections::*;
use memory_rs::internal::memory::{resolve_module_path, scan_aob};
use memory_rs::internal::process_info::Proces... | the_stack |
use connected_client::{ClientEvent, ConnectedClient};
use created_swarm::make_swarms;
use test_constants::KAD_TIMEOUT;
use test_utils::{create_service, timeout};
use eyre::{ContextCompat, WrapErr};
use futures::executor::block_on;
use itertools::Itertools;
use libp2p::core::Multiaddr;
use local_vm::read_args;
use mapl... | the_stack |
use std::time::Duration;
use ergo_database::RedisPool;
use ergo_graceful_shutdown::{GracefulShutdown, GracefulShutdownConsumer};
use ergo_queues::{Job, JobId, Queue};
use futures::future::try_join_all;
use indicatif::{MultiProgress, ProgressBar, ProgressStyle};
use serde::{Deserialize, Serialize};
use structopt::Struc... | the_stack |
use std::path::{Path, PathBuf};
use std::thread;
use std::time::{Duration, Instant};
use std::env;
use std::fs;
use reqwest;
use utils::*;
lazy_static! {
static ref CARGO_WEB: PathBuf = {
if let Some( path ) = env::var_os( "CARGO_WEB" ) {
return path.into();
}
let candidates ... | the_stack |
use {
crate::{
events::{
error::EventError,
types::{ComponentIdentifier, Moniker, UniqueKey, ValidatedSourceIdentity},
},
inspect::container::InspectArtifactsContainer,
lifecycle::container::LifecycleArtifactsContainer,
logs::{
budget::Budg... | the_stack |
use crate::aliases::WinResult;
use crate::co;
use crate::enums::{BmpPtrStr, IdMenu, IdPos, MenuEnum};
use crate::ffi::user32;
use crate::funcs::GetLastError;
use crate::handles::{HBITMAP, HWND};
use crate::msg;
use crate::privs::bool_to_winresult;
use crate::structs::{MENUINFO, MENUITEMINFO, POINT};
use crate:... | the_stack |
use std::collections::{HashSet, HashMap};
use nom::{
branch::{alt},
bytes::complete::{is_not, tag},
character::complete::{char, digit1},
combinator::{map, map_res, opt},
error::*,
sequence::{delimited, preceded, tuple},
multi::{separated_list0},
};
use memchr::{memchr, memchr3};
use arrayvec... | the_stack |
use gc_arena::Collect;
use crate::{
ConstantIndex16, ConstantIndex8, Opt254, PrototypeIndex, RegisterIndex, UpValueIndex, VarCount,
};
#[derive(Debug, Copy, Clone, Collect)]
#[collect(require_static)]
pub enum OpCode {
Move {
dest: RegisterIndex,
source: RegisterIndex,
},
LoadConstant ... | the_stack |
use crate::{
tensors::{Input, Kernel, Output},
EvalMethod, Evaluate,
};
use algebra::{fixed_point::*, fp_64::Fp64Parameters, FpParameters, PrimeField};
use crypto_primitives::AdditiveShare;
use num_traits::{One, Zero};
use std::{
marker::PhantomData,
ops::{AddAssign, Mul},
};
use tch::nn::Module;
use c... | the_stack |
use std::error::Error;
use std::fmt::{self, Display};
use std::fs::{canonicalize, read};
use std::path::PathBuf;
#[cfg(feature = "binaryen")]
use libchisel::binaryenopt::BinaryenOptimiser;
use libchisel::{
checkfloat::CheckFloat, checkstartfunc::CheckStartFunc, deployer::Deployer,
dropsection::DropSection, rem... | the_stack |
use desert::{ToBytes,FromBytes,CountBytes};
use crate::{Scalar,Point,Value,Coord,Error,EyrosErrorKind,Overlap,RA,Root,
query::{QStream,QTrace}, tree_file::TreeFile, SetupFields};
use async_std::{sync::{Arc,Mutex},channel};
#[cfg(not(feature="wasm"))] use async_std::task::spawn;
#[cfg(feature="wasm")] use async_std::t... | the_stack |
//! Module containing methods for generating code to "raise" from the low level
//! generic ASTs to the high level, typed, generated AT command and response types.
use {
super::{
common::{to_initial_capital, type_names::*, write_indent, write_newline, TABSTOP},
error::Result,
},
crate::defi... | the_stack |
use std::pin::Pin;
use std::sync::Arc;
use dbus::channel::Sender;
use std::future::Future;
use std::marker::PhantomData;
use crate::{Context, MethodErr, IfaceBuilder, stdimpl};
use crate::ifacedesc::Registry;
use std::collections::{BTreeMap, HashSet};
use std::any::Any;
use std::fmt;
use crate::utils::Dbg;
const INTRO... | the_stack |
mod parser;
mod socket_pool;
use socket_pool::SocketPool;
use embedded_hal::digital::v2::InputPin;
use embedded_hal::digital::v2::OutputPin;
use crate::actors::wifi::Adapter;
use crate::traits::{
ip::{IpAddress, IpProtocol, SocketAddress},
tcp::{TcpError, TcpStack},
wifi::{Join, JoinError, WifiSupplicant... | the_stack |
use crate::code_gen::code_gen_context::*;
use crate::code_gen::values::*;
use crate::code_gen::*;
use crate::error;
use crate::error::Error;
use crate::hir::pattern_match;
use crate::hir::HirExpressionBase::*;
use crate::hir::*;
use crate::names::*;
use crate::ty;
use crate::ty::*;
use inkwell::values::*;
use std::conv... | the_stack |
use colored::Colorize;
use difflib::get_close_matches;
use indicatif::{ProgressBar, ProgressStyle};
use std::fs;
use std::fs::File;
use std::io::{BufReader, BufWriter, Write};
use std::path::{Path, PathBuf};
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use utils::classes::package::Package... | the_stack |
use crate::interactive::bookmarks_table::BookmarksTable;
use crate::interactive::helpers::{horizontal_layout, vertical_layout};
use crate::interactive::interface::InputMode;
use crate::interactive::modules::{Draw, HandleInput, Module};
use regex::Regex;
use std::error::Error;
use termion::event::Key;
use tui::backend::... | the_stack |
use std::sync::{Arc, RwLock};
use std::time::Duration;
use boringtun::noise::{Tunn, TunnResult};
use ipnetwork::IpNetwork;
use windows::{
self as Windows,
core::*,
Networking::Sockets::*,
Networking::Vpn::*,
Networking::*,
Win32::Foundation::{E_BOUNDS, E_INVALIDARG, E_UNEXPECTED},
};
use crate... | the_stack |
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountCreateContract {
#[prost(bytes="vec", tag="1")]
pub owner_address: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes="vec", tag="2")]
pub account_address: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration="super::common::AccountType", tag="3"... | the_stack |
use ttf_parser::GlyphId;
use ttf_parser::parser::LazyArray16;
use ttf_parser::opentype_layout::*;
use super::MAX_CONTEXT_LENGTH;
use super::apply::{Apply, ApplyContext, WouldApply, WouldApplyContext};
use super::matching::{
match_backtrack, match_glyph, match_input, match_lookahead,
MatchFunc, Matched,
};
imp... | the_stack |
use jtd_codegen::target::{self, inflect, metadata};
use jtd_codegen::Result;
use lazy_static::lazy_static;
use regex::Regex;
use serde_json::Value;
use std::collections::{BTreeMap, BTreeSet};
use std::io::Write;
lazy_static! {
static ref KEYWORDS: BTreeSet<String> = include_str!("keywords")
.lines()
... | the_stack |
use super::protocol::{ReplicationCodec, ReplicationConfig, ReplicationVersion};
use futures::prelude::*;
use futures::sink::SinkExt;
use futures::task::{Context, Poll};
use libp2p_core::upgrade::{InboundUpgrade, OutboundUpgrade};
use libp2p_swarm::protocols_handler::{
KeepAlive, ProtocolsHandler, ProtocolsHandlerE... | the_stack |
use crate::api::*;
use crate::bitflip;
use core::convert::TryInto;
use aes_xous::{Aes256, NewBlockCipher, BlockDecrypt, BlockEncrypt};
use cipher::generic_array::GenericArray;
#[derive(Debug, Copy, Clone)]
pub enum FpgaKeySource {
Bbram,
Efuse,
}
pub(crate) const AES_BLOCKSIZE: usize = 16;
// a "slight" lie... | the_stack |
use std::{
collections::HashMap,
io::Cursor,
ops::DerefMut,
sync::{
atomic::{AtomicI32, Ordering},
Arc, RwLock,
},
};
use thiserror::Error;
use tokio::{
io::{AsyncRead, AsyncWrite, AsyncWriteExt, WriteHalf},
sync::{
oneshot::{channel, Sender},
Mutex,
},
... | the_stack |
use arrayvec::ArrayVec;
use derivative::Derivative;
use std::borrow::Borrow;
use std::hash::{Hash, Hasher};
use std::mem;
use std::ops::{Deref, DerefMut};
use theon::space::{EuclideanSpace, Scalar, Vector};
use theon::{AsPosition, AsPositionMut};
use crate::entity::borrow::{Reborrow, ReborrowInto, ReborrowMut};
use cr... | the_stack |
use ::{JsResult, JsError};
use rt::{JsEnv, JsArgs, JsValue, JsType, JsFnMode, JsString, JsHandle, JsItem};
use syntax::parser::ParseMode;
use ::util::matchers::DecimalMatcher;
use std::{char, f64};
use ::syntax::lexer::{is_line_terminator, is_whitespace};
// 15.1.2.2 parseInt (string , radix)
pub fn Global_parseInt(en... | the_stack |
use super::device::Device;
use super::surface::{Surface, Synchronization, Win32Objects};
use crate::context::{ContextID, CREATE_CONTEXT_MUTEX};
use crate::egl;
use crate::egl::types::{EGLConfig, EGLContext, EGLint};
use crate::platform::generic::egl::context::{self, CurrentContextGuard};
use crate::platform::generic::e... | the_stack |
use std::collections::BTreeSet;
use std::ops::{Bound, RangeInclusive};
use thiserror::Error;
use bitcoin::network::constants::ServiceFlags;
use bitcoin::network::message_filter::{CFHeaders, CFilter, GetCFHeaders};
use bitcoin::util::bip158;
use bitcoin::{Script, Transaction, Txid};
use nakamoto_common::block::filter... | the_stack |
use std::ops::Add;
use num_traits::{ops::overflowing::OverflowingAdd, CheckedAdd, SaturatingAdd, WrappingAdd};
use crate::{
array::PrimitiveArray,
bitmap::Bitmap,
compute::{
arithmetics::{
ArrayAdd, ArrayCheckedAdd, ArrayOverflowingAdd, ArraySaturatingAdd, ArrayWrappingAdd,
},
... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.