text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
mod deduplication;
use std::collections::HashMap;
use http::header::{ACCEPT_ENCODING, CONTENT_ENCODING};
use http::HeaderValue;
use schemars::JsonSchema;
use serde::Deserialize;
use tower::util::BoxService;
use tower::{BoxError, ServiceBuilder, ServiceExt};
use crate::layers::ServiceBuilderExt;
use crate::plugin::Pl... | the_stack |
use crate::utilities::graphql::{
get_graphql_type_name,
is_graphql_type_a_relation_many,
is_graphql_type_a_relation_one,
is_graphql_type_an_enum
};
use graphql_parser::schema::{
Document,
Field,
ObjectType
};
use proptest::{
prelude::{
any,
Just
},
strategy::{
... | the_stack |
use {super::*, fidl_fuchsia_pkg::ResolveError, pretty_assertions::assert_eq};
#[fasync::run_singlethreaded(test)]
async fn succeeds_even_if_retained_packages_fails() {
let env =
TestEnv::builder().unregister_protocol(crate::Protocol::RetainedPackages).build().await;
env.resolver.url(UPDATE_PKG_URL_PIN... | the_stack |
use errors::*;
use std;
use std::fmt;
use std::io::{self, BufRead, Write};
use std::marker::PhantomData;
use std::sync::{Arc, Mutex};
use cell_gc::GcHeapSession;
use value::Value;
// Traits
pub trait TextualInputPort: Send {
fn read<'h>(&mut self, hs: &mut GcHeapSession<'h>) -> Result<Value<'h>>;
fn read_cha... | the_stack |
use catalog::CatalogHandler;
use data_manipulation::{
QueryPlan, TypedDeleteQuery, TypedInsertQuery, TypedQuery, TypedSelectQuery, TypedTree, TypedUpdateQuery, UntypedInsertQuery, UntypedQuery,
UntypedUpdateQuery,
};
use definition::ColumnDef;
use definition_planner::DefinitionPlanner;
use postgre_sql::{
qu... | the_stack |
use interner::*;
use core::*;
use core::Expr::*;
use types::{qualified, extract_applied_type};
use typecheck::{Types, DataTypes, TypeEnvironment, find_specialized_instances};
use scoped_map::ScopedMap;
use std::borrow::ToOwned;
use core::translate::{translate_module, translate_modules};
use lambda_lift::do_lambda_lift... | the_stack |
use serde::{Deserialize, Serialize};
use std::convert::TryInto;
use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign};
use std::{
fmt::{Display, Formatter, Result},
mem::swap,
ops::{Index, IndexMut, Neg},
panic,
};
use crate::prelude::{transpose, Dot};
use super::super::utils:... | the_stack |
use gdal_sys::{CPLErr, CPLErrorNum, CPLGetErrorHandlerUserData};
use libc::{c_char, c_void};
use crate::errors::{CplErrType, Result};
use crate::utils::_string;
use once_cell::sync::Lazy;
use std::ffi::CString;
use std::sync::Mutex;
/// Set a GDAL library configuration option
///
/// Refer to [GDAL `ConfigOptions`](h... | the_stack |
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use libc::{self, MAP_SHARED, PROT_READ, PROT_WRITE, c_char, c_int, c_short, c_ulong};
use libc::{c_ushort, c_void, mode_t, off_t, size_t, sockaddr, sockaddr_un, socklen_t, ssize_t};
use std::cmp;
use std::collections::HashSet;
use std::ffi::{CStr, CString};
us... | the_stack |
use std::iter::Peekable;
use std::ops::Not;
use std::cmp::Ordering;
use std::rc::Rc;
use utils::fraction::Fraction;
use utils::RcRefCell;
use lexer::Token;
use procedure::ProcedureData;
use evaluator;
use env::EnvRef;
use port::PortData;
use expander::expand;
use serr::{SErr, SResult};
pub type SExprs = Vec<SExpr>;
... | the_stack |
use crate::pairing::ff::{Field};
use crate::pairing::{Engine, CurveProjective};
use std::marker::PhantomData;
use crate::sonic::helped::{Proof, SxyAdvice};
use crate::sonic::helped::batch::Batch;
use crate::sonic::helped::poly::{SxEval, SyEval};
use crate::sonic::helped::Parameters;
use crate::SynthesisError;
use cr... | the_stack |
//! Secure Session service.
//!
//! **Secure Session** is a lightweight mechanism for securing any kind of network communication
//! (both private and public networks, including the Internet). It is protocol-agnostic and
//! operates on the 5th layer of the network OSI model (the session layer).
//!
//! Communication o... | the_stack |
use crate::*;
use crate::diagn::RcReport;
use crate::syntax::{Token, TokenKind, excerpt_as_usize};
#[derive(Clone)]
pub struct Parser<'a>
{
pub report: Option<RcReport>,
pub tokens: &'a [Token],
index: usize,
index_prev: usize,
read_linebreak: bool,
partial_index: usize
}
pub struct ParserState
{
index: usiz... | the_stack |
use crate::ffi;
use foreign_types::{ForeignType, ForeignTypeRef, Opaque};
use libc::{c_char, c_int, c_long, c_uchar, c_uint, c_void};
use std::any::TypeId;
use std::cmp;
use std::collections::HashMap;
use std::convert::TryInto;
use std::ffi::{CStr, CString};
use std::fmt;
use std::io;
use std::io::prelude::*;
use std::... | the_stack |
use crate::data::error_info::ErrorInfo;
use crate::data::position::Position;
use crate::data::primitive::{PrimitiveInt, PrimitiveObject, PrimitiveString, PrimitiveType};
use crate::data::{ast::Interval, csml_logs::*, ArgsType, Literal};
use crate::error_format::*;
use std::collections::HashMap;
use std::env;
use std::... | the_stack |
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateUserSecurityProfilesOutput {}
impl std::fmt::Debug for UpdateUserSecurityProfilesOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut... | the_stack |
pub mod with_rug;
#[cfg(feature = "rug")]
use rug::Float;
#[cfg(feature = "rug")]
pub use with_rug::*;
#[cfg(not(feature = "rug"))]
pub mod regular;
#[cfg(not(feature = "rug"))]
pub use regular::*;
mod rounding;
use crate::ast::Expr;
use crate::radix;
use lazy_static::lazy_static;
use std::collections::HashMap;
use ... | the_stack |
use std::rc::Rc;
#[cfg(any(feature = "image-loading", doc, doctest))]
use {
crate::image::ImageFileFormat,
image::GenericImageView,
std::fs::File,
std::io::{BufRead, BufReader, Seek},
std::path::Path
};
use crate::color::Color;
use crate::dimen::Vector2;
use crate::error::{BacktraceError, Context,... | the_stack |
use crate::guts::{self, Finalize, Implementation, Job, LastNode, Stride};
use crate::state_words_to_bytes;
use crate::Count;
use crate::Hash;
use crate::Params;
use crate::State;
use crate::Word;
use crate::BLOCKBYTES;
use arrayref::array_mut_ref;
use arrayvec::ArrayVec;
use core::fmt;
/// The largest possible value o... | the_stack |
use std::collections::hash_map::Entry;
use std::mem;
use thiserror::Error;
use tracing::debug;
use super::{Retransmits, ShouldTransmit, StreamHalf, StreamId, StreamsState, UnknownStream};
use crate::connection::assembler::{Assembler, Chunk, IllegalOrderedRead};
use crate::{frame, Dir, TransportError, VarInt};
#[deri... | the_stack |
// This file contains an end to end test of parquet pruning. It writes
// data into a parquet file and then
use std::sync::Arc;
use arrow::{
array::{
Array, Date32Array, Date64Array, StringArray, TimestampMicrosecondArray,
TimestampMillisecondArray, TimestampNanosecondArray, TimestampSecondArray,
... | the_stack |
use std::char;
use std::collections::{BTreeMap, BTreeSet};
use std::env;
use std::fmt;
use std::fs::File;
use std::io::{self, Write};
use std::mem::size_of;
use std::path::{Path, PathBuf};
use std::str;
use byteorder::{BigEndian as BE, ByteOrder};
use fst::raw::Fst;
use fst::{MapBuilder, SetBuilder};
use regex_automat... | the_stack |
use crate::actions::{self, Action, ActionsCtx};
use crate::db::{Database, QueryUtils};
use crate::experiments::{CapLints, CrateSelect, Experiment, GitHubIssue, Mode, Status};
use crate::prelude::*;
use crate::server::github::{GitHub, Issue, Repository};
use crate::server::messages::{Label, Message};
use crate::server::... | the_stack |
use std::{
collections::{BTreeMap, HashMap},
env, fs,
io::{copy, Write},
process::Command,
str::FromStr,
};
use anyhow::{bail, Result};
use async_trait::async_trait;
use chrono::{offset::Utc, DateTime, Duration, NaiveDate};
use chrono_humanize::HumanTime;
use docusign::DocuSign;
use flate2::read::G... | the_stack |
use maplit::hashmap;
use oak_functions_abi::proto::{Response, ServerPolicy, StatusCode};
use oak_functions_loader::{
grpc::{create_and_start_grpc_server, create_wasm_handler},
logger::Logger,
lookup::LookupFactory,
lookup_data::{parse_lookup_entries, LookupData, LookupDataAuth, LookupDataSource},
se... | the_stack |
// Implementation note: the main job of this module is communicating with the child process. We
// use simple blocking calls for communication, so we organize the module with threads and
// channels. A thread is started to manage each type of communication, like reading, writing,
// waiting for exit, etc. When we ne... | the_stack |
use std::{
borrow::Borrow,
fmt::{self, Debug},
};
use oasis_borsh::{BorshDeserialize, BorshSerialize};
/// `Set` is a data structure with a [`Set`](https://doc.rust-lang.org/std/collections/hash_set/struct.HashSet.html)-like API but based on a `Vec`.
/// It's primarily useful when you care about constant fact... | the_stack |
use std::sync::{Arc, RwLock};
use common::{PerfLogEvent, PerfLogger};
use dashmap::mapref::entry::Entry;
use fnv::FnvHashMap;
use graphql_watchman::WatchmanFileSourceSubscriptionNextChange;
use interner::StringKey;
use log::debug;
use rayon::iter::ParallelIterator;
use relay_compiler::{
build_raw_program, build_sc... | the_stack |
#[derive(Debug, Clone, Copy)]
pub enum Op {
Add,
Sub,
Mult,
Div,
Rem,
Lt,
Lte,
Gt,
Gte,
Eq,
Neq,
}
/////////////////////////////////////////////////////////////////////////////////////////////
pub fn assign(lhs: Expr, rhs: Expr) -> Expr {
Expr(Expr2::Assignment(lhs.0.i... | the_stack |
use std::collections::HashMap;
use std::process::Command;
use std::sync::{Arc, RwLock};
use std::time::{Duration, Instant};
use serde::Serialize;
use serde_json::Value;
use bitcoin::{BlockHash, BlockHeader, Network, OutPoint, Transaction, Txid};
use bitcoin_hashes::hex::FromHex;
use bitcoincore_rpc::{json as rpcjson,... | the_stack |
// Copyright (c) 2018-2021 The orion Developers
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... | the_stack |
use glib::translate::{from_glib, from_glib_full, IntoGlib};
use glib::ToSendValue;
use std::mem;
// FIXME: Copy from gstreamer/src/event.rs
macro_rules! event_builder_generic_impl {
($new_fn:expr) => {
pub fn seqnum(self, seqnum: gst::Seqnum) -> Self {
Self {
seqnum: Some(seqnum... | the_stack |
use std::mem::replace;
use crate::algorithm::selection_functions::SelectionFunction;
use crate::node::{ParentNode, RTreeNode};
use crate::object::RTreeObject;
use crate::params::RTreeParams;
use crate::{Envelope, RTree};
/// Iterator returned by `RTree::drain_*` methods.
///
/// Draining iterator that removes element... | the_stack |
use baldrdash as bd;
use cpu::make_isa;
use cranelift_codegen::binemit::{Addend, CodeOffset, NullTrapSink, Reloc, RelocSink, TrapSink};
use cranelift_codegen::cursor::{Cursor, FuncCursor};
use cranelift_codegen::entity::EntityRef;
use cranelift_codegen::ir::stackslot::StackSize;
use cranelift_codegen::ir::{InstBuilder,... | 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 std::env;
use std::io;
use std::ffi::OsString;
use std::fs;
use std::path::{Path, PathBuf};
use std::borrow::Cow;
use anyhow::Context;
use async_std::task;
use clap::{ValueHint};
use fn_error_context::context;
use rand::{thread_rng, Rng};
use edgedb_client::client::Connection;
use edgedb_client::Builder;
use edge... | the_stack |
use crate::runtime_info::*;
use crate::units::*;
use serde_json::Value;
pub fn open_all_sockets(run_info: ArcMutRuntimeInfo, conf: &crate::config::Config) {
// TODO make configurable
let control_sock_path = {
run_info
.read()
.unwrap()
.config
.notificat... | the_stack |
extern crate rand;
use amcl_wrapper::constants::MODBYTES;
use amcl_wrapper::errors::SerzDeserzError;
use amcl_wrapper::field_elem::FieldElement;
use amcl_wrapper::group_elem::GroupElement;
use amcl_wrapper::group_elem_g1::G1;
use rand::rngs::EntropyRng;
use rand::RngCore;
#[derive(Debug, Clone, Copy)]
pub enum MuSigE... | the_stack |
use crate::assets::{AssetLoader, Assets};
use crate::config::*;
use crate::graphics::Graphics;
use crate::handlers::{
AppCallback, AppHandler, DrawCallback, DrawHandler, EventCallback, EventHandler,
ExtensionHandler, PluginHandler, SetupCallback,
};
use crate::parsers::*;
use crate::plugins::*;
use crate::{App,... | the_stack |
use super::{repeat, Cursor, ReadBuf, SeekFrom};
use crate::cmp::{self, min};
use crate::io::{self, IoSlice, IoSliceMut};
use crate::io::{BufRead, BufReader, Read, Seek, Write};
use crate::mem::MaybeUninit;
use crate::ops::Deref;
#[test]
#[cfg_attr(target_os = "emscripten", ignore)]
fn read_until() {
let mut buf = ... | the_stack |
use std::collections::HashMap;
use std::collections::HashSet;
use std::env;
use std::error::Error;
use std::fs;
use std::fs::File;
use std::io;
use std::io::BufWriter;
use std::io::ErrorKind;
use std::io::Write;
use std::path::Path;
use std::result::Result;
use tensorflow_op_codegen::parser;
use tensorflow_op_codegen::... | the_stack |
use llvm_sys;
use std::ffi::CStr;
use crate::ast::BinOpKind::*;
use crate::ast::ScalarKind::I64;
use crate::ast::Type;
use crate::codegen::llvm2::numeric::gen_binop;
use crate::codegen::llvm2::SIR_FUNC_CALL_CONV;
use crate::error::*;
use crate::sir::FunctionId;
use super::vector;
use super::vector::VectorExt;
use s... | the_stack |
use bars;
use conrod_core::Scalar;
use std::iter::{Enumerate, Zip};
use time_calc as time;
/// For converting a duration in bars to a viewable grid.
#[derive(Copy, Clone, Debug, PartialEq)]
pub struct Ruler {
pub width_per_beat: Scalar,
marker_step: (time::NumDiv, time::Division),
}
/// The information requir... | the_stack |
use crate::build_solidity;
use ethabi::Token;
#[test]
fn simple() {
let mut vm = build_solidity(
r#"
contract foo {
int private foo;
function boom() public view returns (int) {
int baz = false? foo : 0;
return baz;
}
}"#,
... | the_stack |
use std::convert::TryInto;
use sodiumoxide::crypto::{
aead::xchacha20poly1305_ietf as aead, box_, generichash, kdf, pwhash::argon2id13, scalarmult,
sign,
};
use super::error::{Error, Result};
macro_rules! to_enc_error {
($x:expr, $msg:tt) => {
($x).or(Err(Error::Encryption($msg)))
};
}
fn ge... | the_stack |
pub struct DescribeAlarmHistoryPaginator<
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_alarm_history_input::Builder,
}
impl<C,... | the_stack |
use lazy_static::lazy_static;
use rand::distributions::Alphanumeric;
use rand::Rng;
mod crypto_utils;
mod hashers;
use regex::Regex;
pub use crate::hashers::*;
/// Algorithms available to use with Hashers.
#[derive(PartialEq)]
#[cfg_attr(test, derive(Debug))]
pub enum Algorithm {
/// PBKDF2 key-derivation functio... | the_stack |
use crossbeam_epoch as epoch;
use flurry::*;
use std::sync::Arc;
#[test]
fn pin() {
let _map = HashMap::<usize, usize>::new().pin();
}
#[test]
fn with_guard() {
let guard = epoch::pin();
let _map = HashMap::<usize, usize>::new().with_guard(&guard);
}
#[test]
fn clear() {
let map = HashMap::<usize, us... | the_stack |
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use ebur128::filter;
// Run filter benchmarks on the same filter instance to not measure the setup time
// and measure once with and another time without calculating the sample peak.
//
// We don't calculate the true peak because that has its own... | the_stack |
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
#![warn(clippy::pedantic)]
mod common;
use common::{
apply_header_protection, client_initial_aead_and_hp, connect, connected_server,
decode_initial_header, default_server, get_ticket, remove_header_protection,
};
use neqo_common::{qtrace, Datagram, Deco... | the_stack |
use cess_node_runtime::{
AccountId, AuthorityDiscoveryConfig, BabeConfig, BalancesConfig, Balance, CouncilConfig,
GenesisConfig, GrandpaConfig, Block, IndicesConfig,
ImOnlineConfig, SessionConfig, Signature, StakingConfig, SessionKeys, SudoConfig, StakerStatus,
SystemConfig, TechnicalCommitteeConfig, wasm_binar... | the_stack |
use core::hint::unreachable_unchecked;
use core::time::Duration;
use crate::types::*;
#[macro_use]
mod macros;
// TODO: Ideally, we would not need to assign random numbers here
// The only use for them is to check that the reply type corresponds
// to the request type in the client.
//
// At minimum, we don't want to... | the_stack |
use crate::{
handler::ActiveOutput,
state::{Fireplace, BackendData, SurfaceData},
wayland::{
init_eglstream_globals,
init_wl_drm_global
},
};
use anyhow::{Context, Result};
use edid_rs::{parse as edid_parse, MonitorDescriptor};
use image::ImageBuffer;
use smithay::{
backend::{
... | the_stack |
use crate::mock_server::bare_server::BareMockServer;
use crate::mock_server::pool::get_pooled_mock_server;
use crate::mock_server::MockServerBuilder;
use crate::{mock::Mock, verification::VerificationOutcome, MockGuard, Request};
use deadpool::managed::Object;
use log::debug;
use std::convert::Infallible;
use std::net:... | the_stack |
pub mod attr;
pub mod derive;
use std::{any::TypeId, collections::HashSet, convert::TryInto as _, marker::PhantomData};
use proc_macro2::TokenStream;
use quote::{format_ident, quote, ToTokens};
use syn::{
parse::{Parse, ParseStream},
parse_quote,
spanned::Spanned as _,
token,
};
use crate::{
comm... | the_stack |
extern crate capstone;
extern crate pdb;
use capstone::prelude::*;
#[macro_use]
extern crate bitflags;
pub mod memreader;
pub mod windows;
use crate::pdb::FallibleIterator;
use crate::memreader::{MemReader, Address};
use crate::windows::*;
use std::collections::{HashSet, HashMap};
use std::convert::TryInto;
use std... | the_stack |
use proc_macro2::Span;
use quote::{quote, ToTokens};
use syn::*;
use diplomat_core::ast;
fn gen_params_at_boundary(param: &ast::Param, expanded_params: &mut Vec<FnArg>) {
match ¶m.ty {
ast::TypeName::StrReference | ast::TypeName::PrimitiveSlice(_) => {
let data_type = if let ast::TypeName:... | the_stack |
use itertools::Itertools;
use crate::bpftrace_compiler::BlockType::{Uprobe, UprobeOffset, Uretprobe};
use crate::bpftrace_compiler::Expression::Printf;
use crate::bpftrace_compiler::{self, Block, BlockType, Expression};
use crate::error::Error;
use crate::events::{Event, TraceCumulative, TraceInfo, TraceInfoMode};
use... | the_stack |
use super::article_view;
use super::async_view;
use super::comment_view;
use super::help_view::HasHelpView;
use super::list_view::*;
use super::text_view;
use crate::client::StoryNumericFilters;
use crate::prelude::*;
static STORY_TAGS: [&str; 5] = ["front_page", "story", "ask_hn", "show_hn", "job"];
/// StoryView is... | the_stack |
use super::*;
use ciboulette::{
CibouletteIdTypeSelector, CibouletteRelationshipManyToManyOptionBuilder,
CibouletteRelationshipOneToManyOptionBuilder, CibouletteStoreBuilder,
};
use ciboulette2pg::{
Ciboulette2PgError, Ciboulette2PgId, Ciboulette2PgSafeIdent, Ciboulette2PgTable,
Ciboulette2PgTableStore,... | the_stack |
use std::cell::RefCell;
use std::fmt;
/** Copyright 2020-2021 Alibaba Group Holding Limited.
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 r... | the_stack |
use legion::prelude::*;
use std::{convert::TryInto, sync::Arc};
use crate::{
graphics::{
pipeline_manager::PipelineManager,
resources::GPUResourceManager,
shadows::{OmniShadowManager, ShadowCamera},
CommandBufferQueue, CommandQueueItem, pipelines::{PointLight, DirectionalLight, MAX_... | the_stack |
use crate::env::{GlobalVar, LocalVar};
use crate::StringId;
pub mod binary;
pub mod semantics;
/// Modules
pub struct Module<'arena> {
pub items: &'arena [Item<'arena>],
}
/// Top-level items
pub enum Item<'arena> {
/// Top-level definitions
Definition {
/// The label that identifies this definit... | the_stack |
use fxhash::FxBuildHasher;
use madvise::{AccessPattern, AdviseMemory};
use ordered_float::NotNan;
use parking_lot;
use pbr;
use rayon::prelude::*;
use std::cmp;
use std::collections::{BinaryHeap, HashSet};
use std::convert::TryFrom;
use std::time;
#[cfg(test)]
mod tests;
mod io;
pub mod reorder;
#[cfg(feature = "rw_... | the_stack |
use crate::{
helpers::{resized_view, to_dense},
lu::{lu_factorize, LUFactors, ScratchSpace},
sparse::{ScatteredVec, SparseMat, SparseVec},
ComparisonOp, CsVec, Error,
};
use sprs::CompressedStorage;
type CsMat = sprs::CsMatI<f64, usize>;
const EPS: f64 = 1e-8;
#[derive(Clone)]
pub(crate) struct Solv... | the_stack |
use std::fs::File;
use std::io::{Read, Write};
use std::str::FromStr;
use base64;
use clap;
use hex;
use bitcoin::{PrivateKey, consensus::{deserialize, serialize}};
use bitcoin::secp256k1;
use bitcoin::util::bip32;
use bitcoin::util::psbt;
use bitcoin::{PublicKey, Transaction};
use cmd;
pub fn subcommand<'a>() -> c... | the_stack |
use crate::array::*;
use crate::bit_protocols::*;
use crate::fixed_point::*;
use crate::floating_point::*;
use crate::integer::*;
use crate::math::*;
use crate::slice::*;
use core::cmp::max;
use scale::*;
/***************************************************
* Helper Routines for Sqrt for Fixed Point Values *
*******... | the_stack |
use std::borrow::Borrow;
use std::ffi::OsStr;
use std::fmt;
use std::ops::Range;
use std::path::{Path, PathBuf};
use anyhow::{bail, Result};
use regex::RegexSet;
use serde::{Deserialize, Serialize};
use crate::filter::Filter;
use crate::region::{Region, RegionIndex};
/// `PathBuf` that is guaranteed to be canonicali... | 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 multi-scalar-multiplication circuits.
use super::{Point, PointVariable};
use crate::{
circuit::{Circuit, PlonkCircuit, Variable},
errors::PlonkError,
};... | the_stack |
extern crate tar;
use util;
use {ArgsIter, Result, UtilSetup};
use clap::{Arg, ArgGroup, OsValues};
use globset::{Glob, GlobSetBuilder};
//use regex::bytes::RegexSet;
use std::borrow::Cow;
use std::fs::File;
use std::io::{BufReader, BufWriter, Read, Write};
use std::path::Path;
pub(crate) const NAME: &str = "tar";
p... | the_stack |
use serde::Deserialize;
use serde::Serialize;
use serde_json::json;
use std::collections::HashMap;
use std::io;
use std::sync::mpsc::channel;
use std::sync::mpsc::Sender;
use std::sync::Arc;
use std::sync::Mutex;
use std::sync::Weak;
/// The Read trait allows for reading utf-8 packets from a source.
pub trait Read {
... | the_stack |
extern crate libc;
extern crate lua;
extern crate serde_json;
extern crate swiboe;
use ::keymap_handler;
use std::collections::HashSet;
use std::mem;
use std::path;
use std::ptr;
use std::string;
use swiboe::client::RpcCaller;
use swiboe::client;
const REGISTRY_NAME_FOR_CONFIG_FILE_RUNNER: &'static str = "config_file... | the_stack |
use crate::{constants::PROC_POLL_TIMEOUT, runtime};
use distant_core::{
RemoteLspProcess as DistantRemoteLspProcess, RemoteProcess as DistantRemoteProcess,
};
use mlua::{prelude::*, UserData, UserDataFields, UserDataMethods};
use once_cell::sync::Lazy;
use std::{collections::HashMap, io, time::Duration};
use tokio:... | the_stack |
//! A library shim around a mirror of the
//! official [webassembly MVP testsuite](https://github.com/WebAssembly/spec/tree/master/test/core).
//!
//! It can be used as a independent testsuite launcher for other
//! webassembly implementations by implementing `ScriptHandler`.
//!
//! Example:
//! ```should_fail
/*!
use... | the_stack |
mod component;
mod prelude;
use prelude::*;
#[handler]
#[instrument(skip(executor_conf, shared_delay_timer, signed_task_package), fields(task_package = signed_task_package.task_package.id))]
async fn create_task(
Json(signed_task_package): Json<SignedTaskPackage>,
shared_delay_timer: Data<&Arc<DelayTimer>>,
... | the_stack |
use zzt_file_format::*;
use zzt_file_format::dosstring::DosString;
use crate::event::*;
use crate::direction::*;
use crate::behaviour::*;
use crate::oop_parser::*;
use crate::board_message::*;
use std::borrow::Cow;
use std::cmp::Ordering;
use std::rc::Rc;
use rand::Rng;
// These are two larger than 60x25 becuase a bo... | the_stack |
use core::{cmp, fmt, mem::MaybeUninit, ops, ptr};
#[macro_use]
mod macros;
mod loom;
pub mod mpsc;
pub mod recycling;
mod util;
mod wait;
pub use self::recycling::Recycle;
// TODO(eliza): finish writing this
// #[doc = include_str!("../mpsc_perf_comparison.md")]
// pub mod mpsc_perf_comparison {
// // Empty modu... | the_stack |
use {
cobalt_sw_delivery_registry as metrics,
fidl_fuchsia_pkg_ext::RepositoryConfigBuilder,
fuchsia_async as fasync,
fuchsia_pkg_testing::{serve::responder, PackageBuilder, RepositoryBuilder},
lib::{ResolverVariant, TestEnvBuilder, EMPTY_REPO_PATH},
std::sync::Arc,
};
#[fasync::run_singlethrea... | the_stack |
use crate::cli::{
fixtures::*,
utils::{random_tenant, FAILURE_LINE},
};
use assert_cmd::Command;
use assert_fs::prelude::*;
use distant::ExitCode;
use distant_core::{
data::{DirEntry, Error, ErrorKind, FileType},
Request, RequestData, Response, ResponseData,
};
use rstest::*;
use std::path::PathBuf;
//... | the_stack |
use std::{
fs::{File, OpenOptions},
io::{BufReader, BufWriter, Seek},
path::Path,
sync::Arc,
};
use ark_ec::AffineCurve;
use ark_ff::{FftField, PrimeField, SquareRootField};
use ark_poly::{univariate::DensePolynomial, Radix2EvaluationDomain as D};
use array_init::array_init;
use commitment_dlog::{
... | the_stack |
use *;
/// Stores intermediate data for physics simulation.
pub struct Physics<T> {
/// Scalars connected to bones.
pub pos1: Vec<(T, T)>,
/// 2D points connected to bones.
pub pos2: Vec<([T; 2], [T; 2])>,
/// 3D points connected to bones.
pub pos3: Vec<([T; 3], [T; 3])>,
/// 4D points conn... | the_stack |
use crate::{aead::Aead, header_key::HeaderKey, iv};
use ::ring::{aead, hkdf};
use core::fmt;
use s2n_quic_core::crypto::{label, CryptoError};
use zeroize::{Zeroize, Zeroizing};
mod negotiated;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
#[path = "cipher_suite/x86.rs"]
mod platform;
mod ring;
#[cfg(not(an... | the_stack |
use factotum::tests::make_task;
use factotum::factfile::*;
use factotum::executor::*;
#[test]
fn get_task_execution_list_good() {
let mut ff = Factfile::new("N/A", "test");
ff.add_task_obj(&make_task("apple", &vec![]));
ff.add_task_obj(&make_task("turnip", &vec![]));
ff.add_task_obj(&make_task("orange"... | the_stack |
use std::{
collections::HashMap,
fs,
path::{Path, PathBuf},
};
use crate::{
code_blocks::{is_custom_code_block, render_code_block, AuthorCode, CodeBlock},
current_mode, data,
entity::{Entity, MarkdownConfig, Zine},
html::rewrite_html_base_url,
locales::FluentLoader,
Mode,
};
use an... | the_stack |
use crate::{
errors::{Error, Result},
executor::MVHashMapView,
task::{ExecutionStatus, ExecutorTask, Transaction as TransactionType, TransactionOutput},
};
use proptest::{arbitrary::Arbitrary, collection::vec, prelude::*, proptest, sample::Index};
use proptest_derive::Arbitrary;
use std::{
collections::... | the_stack |
use crate::{
error::CompileError,
parse_tree::{Purity, Visibility},
semantic_analysis::{ast_node::*, *},
};
use super::{
const_eval::compile_constant_expression, convert::convert_resolved_typeid, function::FnCompiler,
};
use sway_ir::*;
use sway_types::{span::Span, Spanned};
pub(super) fn compile_scr... | the_stack |
use nom::{multispace, slice_to_offsets, IResult, Needed};
use std;
use std::fmt;
use std::str::from_utf8;
/// An error reported by the parser.
#[derive(Debug, Clone, PartialEq)]
pub enum ParseError {
/// A token that is not allowed at the given location (contains the location of the offending
/// character in ... | the_stack |
use anyhow::{bail, Context, Result};
use std::fs::{metadata, set_permissions, OpenOptions};
use std::io::{self, Read, Write};
use std::os::unix::fs::PermissionsExt;
use std::process::{Child, Command, Stdio};
use std::thread::{self, JoinHandle};
use tempfile::{self, TempDir};
#[derive(Debug)]
pub enum VerifyKeys {
... | the_stack |
use bevy::{
app::{Events, ManualEventReader},
ecs::schedule::SystemSet,
input::mouse::{MouseMotion, MouseWheel},
prelude::*,
render::{
camera::Camera,
camera::CameraProjection,
camera::{ActiveCameras, PerspectiveProjection},
render_graph::base::camera::CAMERA_3D,
... | the_stack |
// This file tests handle rights checking end-to-end for all variations that
// show up in the generated code. These checks are verified to be happening
// both on the send-side (before the handle is written to channel) and
// receive-side (after the handle is read from the channel).
// In order to accomplish this, se... | the_stack |
//! Module containing `CrtGadgets`, which are the CRT-based gadgets for `Fancy`.
use super::{Fancy, HasModulus};
use crate::{
errors::FancyError,
fancy::bundle::{Bundle, BundleGadgets},
util,
};
use itertools::Itertools;
use std::ops::Deref;
/// Bundle which is explicitly CRT-representation.
#[derive(Clon... | the_stack |
use std::rc::Rc;
use std::sync::mpsc::Sender;
use core::{EndpointId, Message};
use core::socket::{Protocol, Reply};
use core::endpoint::Pipe;
use core::context::Context;
use super::priolist::Priolist;
use super::pipes::PipeCollection;
use super::{Timeout, PUSH, PULL};
use super::policy::fair_queue;
use io_error::*;
p... | the_stack |
use std::cell::RefCell;
use std::fs;
use std::rc::Rc;
use std::sync::Arc;
use std::thread;
use crate::format;
use crate::format::{Component, TextComponent};
use crate::paths;
use crate::protocol;
use crate::render;
use crate::settings;
use crate::ui;
use crate::render::hud::{Hud, HudContext};
use crate::render::Rende... | the_stack |
use std::collections::BTreeMap;
use std::io::Write;
use quick_xml::events::{BytesEnd, BytesStart, Event};
use quick_xml::Error as XmlError;
use quick_xml::Writer;
use super::{parse_image, NAMESPACE};
use crate::extension::util::remove_extension_value;
use crate::extension::Extension;
use crate::toxml::{ToXml, WriterE... | the_stack |
//! Scanners for fragments of CommonMark syntax
use std::convert::TryInto;
use std::{char, convert::TryFrom};
use crate::parse::HtmlScanGuard;
pub(crate) use crate::puncttable::{is_ascii_punctuation, is_punctuation};
use crate::strings::CowStr;
use crate::{entities, HeadingLevel};
use crate::{Alignment, LinkType};
u... | the_stack |
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AddSourceIdentifierToSubscriptionError {
/// Kind of error that occurred.
pub kind: AddSourceIdentifierToSubscriptionErrorKind,
/// Additional metadata about the error, including error code, message, and request ID.
pub(crate) meta: aws_smithy_type... | the_stack |
//! A UEFI based bootloader for an x86-64 kernel.
//!
//! This code roughly does the following: looks for a kernel binary
//! in the EFI partition, loads it, then continues to construct an
//! address space for it, and finally it switches to the new address
//! space and executes the kernel entry function. In addition ... | the_stack |
// Copyright 2020 Parity Technologies (UK) Ltd.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, mer... | the_stack |
use bevy::{
asset::LoadState,
prelude::*,
render::camera::Camera,
sprite::{TextureAtlas, TextureAtlasBuilder},
utils::HashSet,
window::WindowMode,
};
use bevy_tilemap::prelude::*;
use rand::Rng;
fn main() {
App::build()
.insert_resource(WindowDescriptor {
title: "Endless... | the_stack |
use core::{cmp, ops::Range};
use std::io::{self, Write};
use anyhow::format_err;
use xmas_elf::{
program::{SegmentData, Type},
sections::SectionData,
symbol_table::Entry as _,
ElfFile,
};
use crate::{
dcd::{self, AddressValue},
ivt, BootData, Ivt,
};
/// ROM bootloader limitation
const MAX_IM... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.