text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use std::cmp;
use super::bus::*;
use super::dma::DmaController;
use super::gpu::regs::GpuMemoryMappedIO;
use super::gpu::regs::WindowFlags;
use super::gpu::*;
use super::interrupt::{InterruptConnect, InterruptController, SharedInterruptFlags};
use super::keypad;
use super::mgba_debug::DebugPort;
use super::sched::{Sch... | the_stack |
use std::collections::HashSet;
use serde_json::*;
type Document = Map<String, Value>;
const SPLIT_SYMBOL: char = '.';
/// Returns `true` if the `selector` match the `key`.
///
/// ```text
/// Example:
/// `animaux` match `animaux`
/// `animaux.chien` match `animaux`
/// `animaux.chien` match `anim... | the_stack |
use crate::energy_to_loudness;
use crate::utils::Sample;
use bitflags::bitflags;
use std::error;
use std::fmt;
/// Error values for [`EbuR128`](struct.EbuR128.html) functions.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Error {
/// Not enough memory
NoMem,
/// Invalid mode selected
InvalidM... | the_stack |
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateTemplateSyncConfigOutput {
/// <p>The template sync configuration detail data that's returned by Proton.</p>
pub template_sync_config: std::option::Option<crate::model::T... | the_stack |
use std::{mem, ptr};
use llvm_sys::core::*;
use llvm_sys::prelude::*;
use llvm_sys::{LLVMAttributeFunctionIndex, LLVMAttributeReturnIndex, LLVMIntPredicate};
use arret_runtime::boxed;
use crate::codegen::alloc::{ActiveAlloc, AllocAtom, BoxSource};
use crate::codegen::mod_gen::ModCtx;
use crate::codegen::target_gen::... | the_stack |
use std::any::Any;
use std::collections::HashMap;
use ast::Float;
use ast::Int;
use errors::ElmError;
use errors::InterpreterError;
use errors::Wrappable;
use types::Value;
// TODO convert to postfix function calls
pub fn float_of(value: &Value) -> Result<f32, ElmError> {
match value {
Value::Number(a) =>... | the_stack |
use {
super::*, crate::ipc::*, crate::object::*, alloc::sync::Arc, alloc::vec, alloc::vec::Vec,
core::mem::size_of, futures::channel::oneshot, kernel_hal::context::UserContext, spin::Mutex,
};
/// Kernel-owned exception channel endpoint.
pub struct Exceptionate {
type_: ExceptionChannelType,
inner: Mut... | the_stack |
use crate::hashing::*;
use failure::{bail, format_err, Fallible};
use serde::{de::DeserializeOwned, Serialize};
use std::fs::File;
use std::io::Read;
use std::io::{BufReader, BufWriter};
use std::path::{Path, PathBuf};
use std::str;
/// Given the path to a file, and a function that takes as an argument a `String` with... | the_stack |
use contracts::debug_ensures;
use fathom_runtime::{FormatReader, ReadError};
use num_traits::ToPrimitive;
use std::collections::{BTreeMap, HashMap, VecDeque};
use std::sync::Arc;
use crate::lang::core;
use crate::lang::core::semantics::{self, Elim, Head, Value};
use crate::lang::core::{FieldDeclaration, Globals, ItemD... | the_stack |
use rmpv::decode::{read_value_ref, Error};
use rmpv::ValueRef;
#[test]
fn from_nil() {
let buf = [0xc0];
let mut rd = &buf[..];
assert_eq!(ValueRef::Nil, read_value_ref(&mut rd).unwrap());
}
#[test]
fn from_bool_false() {
let buf = [0xc2];
let mut rd = &buf[..];
assert_eq!(ValueRef::Boolea... | the_stack |
use byteorder::{BigEndian, ReadBytesExt};
use futures::Stream;
use rdkafka::config::{ClientConfig, TopicConfig};
use rdkafka::consumer::stream_consumer::StreamConsumer;
use rdkafka::consumer::{Consumer, EmptyConsumerContext};
use rdkafka::error::KafkaError;
use rdkafka::{Message, Offset, TopicPartitionList};
use cache... | the_stack |
use crate::alloc::align_u128;
use crate::array::Array;
use crate::bitmap::Bitmap;
use crate::codec::{Codec, Single};
use crate::error::{Error, Result};
use crate::repr::ByteRepr;
use crate::sel::Sel;
use crate::sma::{PosKind, PosTbl, SMA};
use bitflags::bitflags;
use smallvec::SmallVec;
use std::io;
use std::sync::Arc;... | the_stack |
use std::env;
use std::fs::OpenOptions;
use std::io::{self, Write};
use std::path::Path;
use std::process::{Command, Stdio};
#[macro_use]
extern crate lazy_static;
extern crate regex;
use regex::bytes::Regex;
mod fork;
mod wsl;
const VERSION: &'static str = env!("CARGO_PKG_VERSION");
static mut DOUBLE_DASH_FOUND: ... | the_stack |
use byteorder::{LittleEndian, ReadBytesExt};
use once_cell::sync::OnceCell;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::fmt::Display;
use std::io::{self, Cursor, Error, ErrorKind, Seek};
#[derive(Debug, Clone)]
struct Variable {
value: i64,
location: Location,
}
impl std::fmt:... | the_stack |
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed unde... | the_stack |
use analysis::{self, Loc};
use ir::{
BinaryOp, BitOp, Block, BlockEnd, BlockId, Function, Instruction, IntOp, Program, Reg,
Signedness, Size, UnaryOp, Value,
};
use std::collections::{HashMap, HashSet};
#[derive(Debug, Clone)]
enum Val {
Ir(Value),
Ref(Reg, u32),
Unknown,
Any,
}
impl Val {
... | the_stack |
use super::*;
use ethereum_types::{H160, U256};
use jni::objects::{JObject, JValue, JClass, JString};
use wallets::model::{EeeChain, BtcChain, EthChain};
use jni::sys::{jint, jobject, jbyteArray};
use wallets::module::Chain;
pub fn get_eee_chain_obj<'a, 'b>(env: &'a JNIEnv<'b>, eee_chain: EeeChain) -> JObject<'a> {
... | the_stack |
use std::error::Error;
use storage::ResultSet;
use storage::{Column, SqlType};
use storage::types::FromSql;
use std::cmp::{max};
/// Representation of a ResultSet with its useful functions to get data.
pub struct DataSet {
data: Vec<Vec<Vec<u8>>>,
columns: Vec<Column>,
current_pos : usize,
line_cnt: us... | the_stack |
use crate::unary::{LessThan, Unary, S, Z};
// Each construct in the session types language lives in its own module, along with the
// implementation of its various typing rules.
mod call;
mod choose;
mod r#continue;
mod done;
mod r#loop;
mod offer;
mod recv;
mod send;
mod split;
pub use call::*;
pub use choose::*;
pu... | the_stack |
extern crate argparse;
extern crate base64;
extern crate blake2;
extern crate humantime;
extern crate ipnetwork;
extern crate libc;
extern crate libmount;
extern crate lithos;
extern crate nix;
extern crate quire;
extern crate serde_json;
extern crate signal;
extern crate syslog;
extern crate ssh_keys;
extern crate uns... | the_stack |
extern crate datalog_with_constraints as datalog;
extern crate biscuit_vrf as vrf;
extern crate rand;
extern crate curve25519_dalek;
extern crate serde;
extern crate serde_cbor;
extern crate sha2;
extern crate hmac;
#[macro_use]
extern crate nom;
use curve25519_dalek::ristretto::RistrettoPoint;
use serde::{Serialize, ... | the_stack |
extern crate bufstream;
extern crate confy;
extern crate ff_bl as ff;
extern crate libc;
extern crate pairing_bl as pairing;
extern crate rand;
extern crate redis;
extern crate secp256k1;
extern crate serde;
extern crate sha2;
extern crate structopt;
extern crate zkchan_tx;
extern crate zkchannels;
use bufstream::BufS... | the_stack |
use crate::error::{Error, Result};
use crate::op::{Op, OpMutVisitor, OpVisitor};
use crate::query::{Location, QuerySet, Subquery};
use crate::rule::RuleEffect;
use fnv::FnvHashMap;
use smol_str::SmolStr;
use std::collections::BTreeMap;
use std::mem;
use xngin_expr::controlflow::{Branch, ControlFlow, Unbranch};
use xngi... | the_stack |
use super::util::get_peer_ucred;
use super::{
super::{close_by_error, handle_fd_error},
imports::*,
util::{
check_ancillary_unsound, enable_passcred, fill_out_msghdr_r, mk_msghdr_r, mk_msghdr_w,
raw_get_nonblocking, raw_set_nonblocking,
},
AncillaryData, AncillaryDataBuf, EncodedAnci... | the_stack |
use num;
use af;
use af::{Array, MatProp, Dim4, DType};
use utils;
use std::sync::{Arc, Mutex};
use activations;
use initializations;
use params::{Params};
use layer::Layer;
use num::Complex;
pub struct Unitary {
pub input_size: usize,
pub output_size: usize,
}
/// Compute the multiplication with the diagonal ... | the_stack |
use super::dialog_helpers;
use super::standard_dialogs;
use crate::sql_thread::SqlFunc;
use diesel::prelude::*;
use gtk::prelude::*;
use projectpadsql::models::{InterestType, RunOn, ServerPointOfInterest};
use relm::Widget;
use relm_derive::{widget, Msg};
use std::str::FromStr;
use std::sync::mpsc;
use strum::IntoEnumI... | the_stack |
use core::cell::UnsafeCell;
use core::fmt;
use core::marker::PhantomData;
use core::mem;
use core::ops::{Deref, DerefMut};
#[cfg(feature = "arc_lock")]
use alloc::sync::Arc;
#[cfg(feature = "arc_lock")]
use core::mem::ManuallyDrop;
#[cfg(feature = "arc_lock")]
use core::ptr;
#[cfg(feature = "owning_ref")]
use owning_... | the_stack |
feature = "storage-mem",
feature = "storage-file",
feature = "storage-sqlite",
feature = "storage-redis"
))]
extern crate tempdir;
extern crate zbox;
use std::io::{Read, Seek, SeekFrom};
use tempdir::TempDir;
#[allow(unused_imports)]
use zbox::{
init_env, Cipher, Error, MemLimit, OpenOptions, OpsLimi... | the_stack |
use crate::batch_hasher::Batcher;
use crate::error::Error;
use crate::poseidon::{Poseidon, PoseidonConstants};
use crate::{Arity, BatchHasher};
use blstrs::Scalar as Fr;
use ff::Field;
use generic_array::GenericArray;
pub trait TreeBuilderTrait<TreeArity>
where
TreeArity: Arity<Fr>,
{
fn add_leaves(&mut self, ... | the_stack |
#[macro_use]
extern crate clap;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate log;
use clap::{ArgMatches,
ErrorKind as ClapErrorKind,
Shell};
use configopt::{ConfigOpt,
Error as ConfigOptError};
use futures::stream::StreamExt;
use hab::{cli::{self,
... | the_stack |
use futures::{future, future::BoxFuture, Stream, stream, future::FutureExt, stream::TryStreamExt};
use hyper::{Request, Response, StatusCode, Body, HeaderMap};
use hyper::header::{HeaderName, HeaderValue, CONTENT_TYPE};
use log::warn;
#[allow(unused_imports)]
use std::convert::{TryFrom, TryInto};
use std::error::Error;... | the_stack |
//! ICMPv6
use core::convert::TryFrom;
use core::fmt;
use net_types::ip::{Ipv6, Ipv6Addr};
use packet::{BufferView, ParsablePacket, ParseMetadata};
use zerocopy::{AsBytes, ByteSlice, FromBytes, Unaligned};
use crate::error::{ParseError, ParseResult};
use crate::U32;
use super::common::{IcmpDestUnreachable, IcmpEcho... | the_stack |
use crate::{script, Tag, Face, GlyphInfo, Mask, Script};
use crate::buffer::{Buffer, BufferFlags};
use crate::ot::{feature, FeatureFlags};
use crate::plan::{ShapePlan, ShapePlanner};
use crate::unicode::{CharExt, GeneralCategoryExt};
use super::*;
use super::arabic::ArabicShapePlan;
pub const UNIVERSAL_SHAPER: Comple... | the_stack |
// https://github.com/Manishearth/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy)]
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code... | the_stack |
use crate::runtime::failure::{init_panic_hook, persist_failure, persist_task_failure};
use crate::runtime::storage::{StorageKey, StorageMap};
use crate::runtime::task::clock::VectorClock;
use crate::runtime::task::{Task, TaskId, DEFAULT_INLINE_TASKS};
use crate::runtime::thread::continuation::PooledContinuation;
use cr... | the_stack |
/// This is a small client program intended to pair with `remote-test-server` in
/// this repository. This client connects to the server over TCP and is used to
/// push artifacts and run tests on the server instead of locally.
///
/// Here is also where we bake in the support to spawn the QEMU emulator as
/// well.
u... | the_stack |
extern crate ctest;
#[derive(Eq, Ord, PartialEq, PartialOrd, Copy, Clone, Debug)]
struct Xcode(pub u32, pub u32);
impl Xcode {
fn version() -> Xcode {
use std::process::Command;
let out = Command::new("/usr/bin/xcodebuild")
.arg("-version")
.output()
.expect("fa... | the_stack |
use super::address::*;
use super::compression;
use super::crypto;
use std::convert::TryInto;
pub const MINIMUM_ADDR_CHUNK_SIZE: usize = 2 * (8 + ADDRESS_SZ);
pub const SENSIBLE_ADDR_MAX_CHUNK_SIZE: usize = 30000 * (8 + ADDRESS_SZ);
#[derive(Debug, thiserror::Error)]
pub enum HTreeError {
#[error("corrupt or tampe... | the_stack |
use utils::version_constants;
use libc::c_char;
use utils::cstring::CStringUtils;
use utils::libindy::{wallet, pool, ledger};
use utils::error;
use settings;
use std::ffi::CString;
use utils::threadpool::spawn;
use error::prelude::*;
use indy::{INVALID_WALLET_HANDLE, CommandHandle};
use utils::libindy::pool::init_pool;... | the_stack |
use cosmwasm_std::{
entry_point, to_binary, Addr, BankMsg, Binary, Coin, Deps, DepsMut, Env, MessageInfo, Response,
StdResult,
};
use crate::error::ContractError;
use crate::msg::{ArbiterResponse, ExecuteMsg, InstantiateMsg, QueryMsg};
use crate::state::{config, config_read, State};
#[entry_point]
pub fn inst... | the_stack |
use std::{collections::HashMap, fmt};
use serde::{
de,
de::{Error, MapAccess},
ser::SerializeStruct,
Deserialize, Deserializer, Serialize, Serializer,
};
use smol_str::SmolStr;
use super::read_field;
use crate::{
CursorDiff, DataType, Diff, DiffEdit, ListDiff, MapDiff, MapType, ObjType, ObjectId, ... | the_stack |
use crate::utils::create_delay;
use crate::utils::send_post_json_message;
use crate::utils::send_post_json_message_with_client;
use crate::utils::WorkflowInfo;
use crate::CommandResponseChannel;
use crate::TriggerCommand;
use crate::TriggerCommandChannel;
use serde::{Deserialize, Serialize};
use crate::TriggerManager;
... | the_stack |
use casper_engine_test_support::{
DeployItemBuilder, ExecuteRequestBuilder, InMemoryWasmTestBuilder, UpgradeRequestBuilder,
WasmTestBuilder, DEFAULT_ACCOUNT_ADDR, DEFAULT_ACCOUNT_INITIAL_BALANCE, DEFAULT_ACCOUNT_KEY,
DEFAULT_PAYMENT, DEFAULT_RUN_GENESIS_REQUEST,
};
use casper_execution_engine::storage::glob... | the_stack |
use crate::{
StorageAlloc, cell_db::CellDb,
db::{rocksdb::RocksDb, traits::{DbKey, KvcSnapshotable, KvcTransaction}},
dynamic_boc_db::DynamicBocDb, /*dynamic_boc_diff_writer::DynamicBocDiffWriter,*/
traits::Serializable, types::{CellId, Reference, StorageCell},
TARGET,
};
#[cfg(feature = "telemetry... | the_stack |
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CertificateOptions {
/// <p>You can opt out of certificate transparency logging by specifying the <code>DISABLED</code> option. Opt in by specifying <code>ENABLED</code>. </p>
pub certificate_transparency_logging_preference:
... | the_stack |
pub mod aggregations;
pub mod count;
pub mod highlight;
use std::collections::{BTreeMap, HashMap};
use std::fmt::Debug;
use reqwest::StatusCode;
use serde::{de::DeserializeOwned, ser::Serializer, Deserialize, Serialize};
use serde_json::Value;
use super::{
common::{OptionVal, Options},
format_indexes_and_ty... | the_stack |
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct S3Location {
/// <p>Name of the S3 bucket.</p>
pub bucket: std::option::Option<std::string::String>,
/// <p>Prefix for the location to write to.</p>
pub prefix: std::option::Option<std::string::String>,
}
impl S3Location {
... | the_stack |
use {
super::SuiteServer,
crate::errors::ArgumentError,
anyhow::Context,
async_trait::async_trait,
fidl::endpoints::{ProtocolMarker, ServerEnd},
fidl_fuchsia_component_runner as fcrunner, fidl_fuchsia_io as fio,
fidl_fuchsia_io::{DirectoryMarker, DirectoryProxy},
fidl_fuchsia_ldsvc::{Loa... | the_stack |
use crate::render_features::{
RenderPhase, RenderPhaseIndex, RenderRegistry, MAX_RENDER_PHASE_COUNT,
};
use crate::resources::resource_arc::{ResourceId, WeakResourceArc};
use crate::resources::vertex_data::{VertexDataSetLayout, VertexDataSetLayoutHash};
use crate::{GraphicsPipelineResource, MaterialPassResource, Re... | the_stack |
use llvm_sys;
use std::ffi::CStr;
use crate::ast::ScalarKind::*;
use crate::ast::Type::*;
use crate::ast::*;
use crate::error::*;
use self::llvm_sys::core::*;
use self::llvm_sys::prelude::*;
use self::llvm_sys::LLVMIntPredicate::{LLVMIntEQ, LLVMIntNE};
use super::llvm_exts::LLVMExtAttribute::*;
use super::llvm_ext... | the_stack |
extern crate alloc;
use alloc::collections::{BTreeSet, VecDeque};
/// Maximum number of nodes for a graph
const MAX_NODES: usize = 64;
/// Maximum input size in bytes
const MAX_INPUT_SIZE: usize = 4;
/// A strongly typed node ID
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub struct NodeId(pub us... | the_stack |
use crate::error::ObjectError;
use object::write::{
Object, Relocation, StandardSection, StandardSegment, Symbol as ObjSymbol, SymbolSection,
};
use object::{
elf, macho, RelocationEncoding, RelocationKind, SectionKind, SymbolFlags, SymbolKind,
SymbolScope,
};
use wasmer_compiler::{Architecture, BinaryForma... | the_stack |
use {
crate::protocol::{self, ParameterValue, ReportFormat, Value, MAX_PACKET_SIZE},
anyhow::{bail, format_err, Error},
serde::{Deserialize, Serialize},
serde_json as json,
std::{
cell::RefCell,
collections::HashMap,
io::{Read, Write},
os::raw::{c_uchar, c_ushort},
... | the_stack |
use std::collections::BTreeMap;
use std::path::Path;
use toml::value::Value;
use xcb::base::*;
use xcb::Timestamp;
use xcb::xkb as xxkb;
use xcb::xproto;
use xkb;
use xkb::{Keycode, Keymap, State};
use xkb::context::Context;
use xkb::state::{Key, Update};
use kbd::config;
use kbd::desc::*;
use kbd::err::*;
use kbd:... | the_stack |
use aoc_runner_derive::{aoc, aoc_generator};
use itertools::Itertools;
use std::collections::BinaryHeap;
use std::error::Error;
use std::fmt;
use std::iter::Sum;
use std::ops::{Add, AddAssign, Neg};
use std::str::FromStr;
type NodeIndex = usize;
#[derive(Debug, Copy, Clone)]
enum Dir {
Left,
Right,
}
impl Neg... | the_stack |
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UntagResourceOutput {}
impl std::fmt::Debug for UntagResourceOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struc... | the_stack |
pub mod builder;
use std::fs::File;
use syntax::{Name, Span};
use syntax::ast::*;
use syntax::token::Lit;
use syntax::ast::visitor::AstVisitor;
use self::builder::Ir;
use util::interner::StrInterner;
use syntax::token::{LitNumber, name};
use syntax::lexer::{Lexer, LexerMode};
use syntax::parser::{Parser, ParseMode};
u... | the_stack |
use crate::tasks::block_sync_task::SyncBlockData;
use crate::tasks::inner_sync_task::InnerSyncTask;
use crate::verified_rpc_client::{RpcVerifyError, VerifiedRpcClient};
use anyhow::{format_err, Error, Result};
use futures::channel::mpsc::UnboundedSender;
use futures::future::BoxFuture;
use futures::{FutureExt, TryFutur... | the_stack |
use crate::graphic::uniform::GlUniform;
use crate::graphic::GlProgram;
use crate::opengl;
use crate::opengl::types::{GLint, GLuint};
use image::{GenericImageView, ImageBuffer, LumaA, Pixel, Rgba, SubImage};
use nalgebra::Vector2;
use num_integer::Integer;
use std::convert::{TryFrom, TryInto};
use std::ffi::{c_void, CSt... | the_stack |
use super::hir::{Symbol, Variable};
use crate::intern::InternedStr;
#[cfg(test)]
use proptest_derive::Arbitrary;
use std::fmt::{self, Formatter};
pub use struct_ref::{StructRef, StructType};
mod struct_ref {
use std::cell::RefCell;
use std::rc::Rc;
use super::Variable;
thread_local!(
/// The ... | the_stack |
#![deny(warnings)]
#![cfg_attr(test, feature(proc_macro_hygiene))]
#![cfg_attr(not(feature = "std"), no_std)]
mod ext;
pub mod types;
#[cfg(any(feature = "runtime-benchmarks", test))]
mod benchmarking;
mod default_weights;
pub use default_weights::WeightInfo;
#[cfg(test)]
mod mock;
#[cfg(test)]
mod tests;
#[cfg(t... | the_stack |
mod bs_bpb;
mod dir_file;
mod entry;
mod fat;
mod tree;
use crate::cache::CACHE;
#[allow(unused)]
use crate::sdcard::AsyncSDCard;
#[allow(unused)]
use crate::virtio::async_blk::VirtIOAsyncBlock;
use alloc::{boxed::Box, string::String, sync::Arc, vec::Vec};
use bs_bpb::*;
use dir_file::*;
use entry::*;
use fat::*;
use ... | the_stack |
use crate::component::datatype::DataType;
use crate::component::field::Field;
use crate::storage::diskinterface::{DiskError, DiskInterface, TableMeta};
use regex::Regex;
use std::collections::HashMap;
use std::collections::HashSet;
use std::fmt;
use uuid::Uuid;
#[derive(Debug, Clone)]
pub struct Table {
/* definit... | the_stack |
use crate::broadcast::Sender;
use crate::context::BastionId;
use fxhash::FxHashMap;
use lever::table::lotable::LOTable;
use lightproc::recoverable_handle::RecoverableHandle;
use std::cmp::min;
use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::Arc;
#[cfg(feature = "scaling")]
#[derive(Debug)]
/// Special str... | the_stack |
//! Desequentialization
use crate::{
analysis::{TemporalRegion, TemporalRegionGraph},
ir::{prelude::*, InstData},
opt::prelude::*,
value::IntValue,
};
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
/// Desequentialization
///
/// This pass implements detection of state-keeping behaviour... | the_stack |
use crate::ndarray_ext::{NdArray, NdArrayView};
use crate::op;
use crate::tensor::Tensor;
use crate::Float;
use crate::Graph;
/// Implement +, -, *, / operators for Tensor
/// +=, -=, *=, /= are provided as methods of c.inplace_*.
/// *=, /= don't propagate gradients.
use ndarray;
use std::mem;
pub struct AddOp;
pub s... | the_stack |
use crate::data::primitive::string::PrimitiveString;
use crate::data::{
ast::*, position::Position, tokens::*, warnings::DisplayWarnings, Data, Literal, MessageData,
MSG,
};
use crate::error_format::{gen_nom_failure, CustomError, *};
use crate::interpreter::variable_handler::expr_to_literal;
use crate::parser::... | the_stack |
use crate::generated::binary_protocol_generated::org::enso::languageserver::protocol::binary::*;
use crate::prelude::*;
use crate::binary::message;
use crate::binary::message::FromServerPayload;
use crate::binary::message::FromServerPayloadOwned;
use crate::binary::message::Message;
use crate::binary::message::Message... | the_stack |
use crate::contract::{execute, instantiate, query};
use crate::testing::mock_querier::mock_dependencies;
use cosmwasm_std::testing::{mock_env, mock_info, MOCK_CONTRACT_ADDR};
use cosmwasm_std::{
attr, from_binary, BankMsg, BlockInfo, Coin, CosmosMsg, Decimal, Env, StdError, SubMsg,
Timestamp, Uint128,
};
use mi... | the_stack |
use crate::{
server::{self, Channel},
util::Compact,
};
use fnv::FnvHashMap;
use futures::{prelude::*, ready, stream::Fuse, task::*};
use pin_project::pin_project;
use std::sync::{Arc, Weak};
use std::{
collections::hash_map::Entry, convert::TryFrom, fmt, hash::Hash, marker::Unpin, pin::Pin,
};
use tokio::s... | the_stack |
use core::cell::UnsafeCell;
use core::sync::atomic::{AtomicUsize, Ordering};
use crossbeam_utils::CachePadded;
use crate::mutex::Mutex;
use log::trace;
#[derive(Debug, Clone, Copy)]
pub enum RwLockIntent {
Read,
Write,
}
#[derive(Debug)]
pub struct RwLock {
inner: UnsafeCell<RwLockInner>,
}
unsafe imp... | the_stack |
// === Features ===
#![feature(exit_status_error)]
// === Standard Linter Configuration ===
#![deny(non_ascii_idents)]
#![warn(unsafe_code)]
// === Non-Standard Linter Configuration ===
#![deny(keyword_idents)]
#![deny(macro_use_extern_crate)]
#![deny(missing_abi)]
#![deny(pointer_structural_match)]
#![deny(unsafe_op_i... | the_stack |
#[cfg(feature = "outline")]
mod outline;
use std::convert::TryFrom;
use std::iter;
use bitflags::bitflags;
use itertools::Itertools;
use log::warn;
use crate::binary::read::{ReadBinary, ReadBinaryDep, ReadCtxt, ReadFrom, ReadScope};
use crate::binary::write::{WriteBinary, WriteBinaryDep, WriteContext};
use crate::bi... | the_stack |
use crate::avx2::*;
#[cfg(target_arch = "wasm32")]
use crate::simd128::*;
use crate::scores::*;
use std::{alloc, cmp, ptr, i16};
use std::marker::PhantomData;
const NULL: u8 = b'A' + 26u8; // this null byte value works for both amino acids and nucleotides
#[inline(always)]
fn convert_char(c: u8, nuc: bool) -> u8 {... | the_stack |
//! Caching energy components for speeding up the energy computation in
//! Monte Carlo simulations.
//!
//! In most of Monte Carlo moves, only a very small subset of the system changes.
//! We can use that property to remove the need of recomputing most of the
//! energy components, by storing them and providing updat... | the_stack |
use std::borrow::Borrow;
use std::collections::hash_map::RandomState;
use std::fmt::{Debug, Formatter, Result as FmtResult};
use std::hash::{BuildHasher, Hash};
use std::iter::FromIterator;
use std::marker::PhantomData;
#[cfg(feature = "rayon")]
use rayon::iter::{FromParallelIterator, IntoParallelIterator, ParallelExt... | the_stack |
use std::collections::HashSet;
use std::iter;
use std::path::PathBuf;
use anyhow::{anyhow, bail, Context};
use itertools::Itertools;
use lazy_static::lazy_static;
use regex::Regex;
use protobuf::descriptor::field_descriptor_proto::Label;
use protobuf::descriptor::FileDescriptorSet;
use protobuf::reflect::{
FieldD... | the_stack |
use crate::core::geometry::{Bounds2i, Point2f, Point2i, Vector2i, XYEnum};
use crate::core::lowdiscrepancy::{sobol_interval_to_index, sobol_sample};
use crate::core::paramset::ParamSet;
use crate::core::pbrt::Float;
use crate::core::pbrt::{
clamp_t, is_power_of_2, log_2_int_u32, round_up_pow2_32, round_up_pow2_64,
... | the_stack |
#![deny(unsafe_code)]
#![warn(missing_docs)]
#![allow(clippy::needless_doctest_main)]
mod error;
mod typo;
pub use error::{Error, Result};
use std::io::{self, Write};
use std::{env, fmt, iter::Peekable, process};
/// Whitelisted overriding help targets
const HELP_POSSIBLES: &[&str] = &["--help", "-h", "help"];
///... | the_stack |
use crate::engine::fast_portable::INVALID_VALUE;
use crate::engine::DecodeEstimate;
use crate::{DecodeError, PAD_BYTE};
// decode logic operates on chunks of 8 input bytes without padding
const INPUT_CHUNK_LEN: usize = 8;
const DECODED_CHUNK_LEN: usize = 6;
// we read a u64 and write a u64, but a u64 of input only yi... | the_stack |
use super::{Store, StoreDelete, StoreGet, StoreGetAll, StorePut};
use crate::{Error, Product, ProductRange};
use async_trait::async_trait;
use aws_sdk_dynamodb::{model::AttributeValue, Client};
use std::collections::HashMap;
use tracing::{info, instrument};
mod ext;
use ext::AttributeValuesExt;
/// DynamoDB store imp... | the_stack |
use super::node::{Node, NodeInfo};
use super::text_renderer::TextRenderer;
use super::TileGrid;
use crate::display::Display;
use crate::window::Window;
use crate::{
config::Config, renderer::Renderer, system::NativeWindow, system::SystemResult,
system::WindowId,
};
use crate::{direction::Direction, split_direct... | the_stack |
use std::collections::BTreeMap;
use std::sync::Arc;
use kismet_cache::CacheBuilder;
use quinine::MonoArc;
use umash::Fingerprint;
use crate::chain_error;
use crate::fresh_error;
use crate::loader::Chunk;
use crate::loader::Loader;
use crate::manifest_schema::Manifest;
use crate::replication_target::ReplicationTarget;... | the_stack |
use crate::hints::{HintType, Hints};
use crate::inference::jsoninputerr::JsonInputErr;
use crate::inference::jsonlex::{JsonLexer, JsonToken};
use crate::shape::{common_shape, Shape};
use crate::Options;
use linked_hash_map::LinkedHashMap;
use std::io::Read;
use std::iter::Peekable;
pub fn shape_from_json<R: Read>(
... | the_stack |
use core::{fmt, mem::size_of};
use memlog::memlog;
use zerocopy::{AsBytes, FromBytes, LayoutVerified};
/// Trait for block devices that can read, write, and erase 512-Byte blocks.
///
/// This is meant to be implemented for "managed" devices that have their own controller for
/// scheduling page erases and doing wear... | the_stack |
mod state;
use crate::prelude::*;
use crate::executor::global::spawn_stream_handler;
use enso_frp as frp;
use ide_view as view;
use ide_view::graph_editor::component::node as node_view;
use ide_view::graph_editor::EdgeEndpoint;
// ===============
// === Aliases ===
// ===============
type ViewNodeId = view::grap... | the_stack |
use cosmwasm_std::{
entry_point, to_binary, BankMsg, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult,
};
use crate::error::ContractError;
use crate::msg::{ConfigResponse, ExecuteMsg, InstantiateMsg, QueryMsg};
use crate::state::{config, config_read, State};
#[entry_point]
pub fn instantiate(
deps... | the_stack |
use llvm_ir::Module;
use std::path::Path;
macro_rules! llvm_test {
($path:expr, $func:ident) => {
#[test]
#[allow(non_snake_case)]
fn $func() {
let _ = env_logger::builder().is_test(true).try_init(); // capture log messages with test harness
let path = Path::new($pat... | the_stack |
use std::cell::RefCell;
use weasel::battle::{Battle, BattleController, BattleRules, BattleState};
use weasel::character::{AlterStatistics, Character, CharacterRules};
use weasel::entity::{EntityId, Transmutation};
use weasel::entropy::Entropy;
use weasel::event::{EventKind, EventQueue, EventTrigger, LinkedQueue};
use w... | the_stack |
use std::cmp::Ordering;
use std::str::FromStr;
use bigdecimal::{BigDecimal, One, Signed, ToPrimitive, Zero};
use num_bigint::BigInt;
// ipow' :: Num a => a -> Integer -> a
// ipow' x n
// | n == 0 = 1
// | m == 0 = let y = ipow' x d in y * y
// | otherwise = x * ipow' x (n - 1)
// where (d,m) = divMod n 2
fn ... | the_stack |
extern crate clap;
use clap::Shell;
use std::str::FromStr;
// Logging:
#[macro_use]
extern crate log;
extern crate env_logger;
extern crate structopt;
use structopt::StructOpt;
use candid::parser::types::IDLType;
use candid::parser::typing::{check_type, Env, TypeEnv};
use candiff::{
//Type,
pretty,
Valu... | the_stack |
use crate::builder::{ScopeBuildError, ScopeDataMapAndScriptStencilList, ScopeDataMapBuilder};
use crate::data::FunctionDeclarationPropertyMap;
use ast::arena;
use ast::associated_data::AssociatedData;
use ast::source_atom_set::CommonSourceAtomSetIndices;
use ast::{types::*, visit::Pass};
use std::collections::HashMap;
... | the_stack |
use crate::{block::SectorRead, mem::MemoryRegion};
use core::convert::TryFrom;
#[repr(packed)]
struct Header {
_magic: [u8; 3],
_identifier: [u8; 8],
bytes_per_sector: u16,
sectors_per_cluster: u8,
reserved_sectors: u16,
fat_count: u8,
root_dir_count: u16,
legacy_sectors: u16,
_medi... | the_stack |
//! Defines basic arithmetic kernels for `PrimitiveArrays`.
//!
//! These kernels can leverage SIMD if available on your system. Currently no runtime
//! detection is provided, you should enable the specific SIMD intrinsics using
//! `RUSTFLAGS="-C target-feature=+avx2"` for example. See the documentation
//! [here](... | the_stack |
//! This module defines the structs transported during the network handshake protocol v1.
//! These should serialize as per the [DiemNet Handshake v1 Specification].
//!
//! During the v1 Handshake protocol, both end-points of a connection send a serialized and
//! length-prefixed [`HandshakeMsg`] to each other. The ha... | the_stack |
use crate::{dimensions::Dimensions, frame::Frame, settings::*};
use clap::{App, Arg};
#[derive(Clone, Debug)]
pub struct CmdLineSettings {
// Pass through arguments
pub neovim_args: Vec<String>,
// Command-line arguments only
pub geometry: Dimensions,
pub log_to_file: bool,
pub no_fork: bool,
... | the_stack |
use std::ffi::{CStr, CString, OsString};
use std::path::{Path, PathBuf};
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Once;
use super::*;
use crate::exception::*;
use crate::fs::HostStdioFds;
use crate::interrupt;
use crate::process::idle_reap_zombie_children;
use crate::process::{ProcessFilter, Spawn... | the_stack |
use super::*;
use alloc::sync::Arc;
use core::convert::TryFrom;
use zircon_object::{
dev::pci::{
constants::*,
pci_init_args::{PciInitArgsAddrWindows, PciInitArgsHeader, PCI_INIT_ARG_MAX_SIZE},
MmioPcieAddressProvider, PCIeBusDriver, PciAddrSpace, PciEcamRegion, PcieDeviceInfo,
PcieD... | the_stack |
use std::io;
use std::ops::Deref;
use std::os::unix::io::{AsRawFd, RawFd};
use bitflags::bitflags;
use libc::{
epoll_create1, epoll_ctl, epoll_event, epoll_wait, EPOLLERR, EPOLLET, EPOLLEXCLUSIVE, EPOLLHUP,
EPOLLIN, EPOLLONESHOT, EPOLLOUT, EPOLLPRI, EPOLLRDHUP, EPOLLWAKEUP, EPOLL_CLOEXEC,
EPOLL_CTL_ADD, EP... | the_stack |
use cargo_metadata::{Dependency, DependencyKind, Metadata, Package};
use std::collections::HashSet;
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct Feature {
pub package_id: String,
pub name: String,
pub causes: Vec<FeatureCause>,
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub enum FeatureCaus... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.