text stringlengths 9.08k 47.9k |
|---|
#![no_std]
#![forbid(missing_docs)]
#![deny(clippy::missing_safety_doc)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![allow(clippy::transmute_ptr_to_ptr)]
// FIXME - the docs in this crate a *very* minimal, and need to be expanded upon
//! A set of very efficient, and very customizable arenas that
//! can elide bounds ch... |
use std::collections::{HashMap, HashSet};
use std::net::{UdpSocket};
use std::sync::{Arc, Mutex, Condvar};
use std::thread;
use std::borrow::Borrow;
use log::{trace, debug, info, warn, error};
use crate::net;
use crate::config::{Member, Config};
use crate::message::{self, AppendEntriesRequest, VoteRequest, LogEntry, V... |
// Copyright 2020 MaidSafe.net limited.
//
// This SAFE Network Software is licensed to you under the MIT license <LICENSE-MIT
// http://opensource.org/licenses/MIT> or the Modified BSD license <LICENSE-BSD
// https://opensource.org/licenses/BSD-3-Clause>, at your option. This file may not be copied,
// modified, or di... |
/*
This tool is part of the WhiteboxTools geospatial analysis library.
Authors: Dr. <NAME>
Created: 11/05/2018
Last Modified: 12/10/2018
License: MIT
*/
use crate::raster::*;
use crate::structures::Array2D;
use crate::tools::*;
use num_cpus;
use rand::distributions::StandardNormal;
use rand::prelude::*;
use std::cmp::... |
extern crate db_service;
extern crate message_handler;
extern crate schema;
extern crate utils;
use super::aura_message_sender::AuraMessageSender;
use super::aura_messages::{AuraMessageTypes, AuthorBlock, BlockAcceptance, RoundOwner};
use super::config::initialize_config;
use db_service::db_fork_ref::SchemaFork;
use d... |
// Copyright 2020 The Druid Authors.
//
// 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... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - "]
pub clk_cfg: crate::Reg<clk_cfg::CLK_CFG_SPEC>,
#[doc = "0x04 - "]
pub timer0_cfg0: crate::Reg<timer0_cfg0::TIMER0_CFG0_SPEC>,
#[doc = "0x08 - "]
pub timer0_cfg1: crate::Reg<timer0_cfg1::TIMER0_CFG1_SPEC>,
#[... |
use alloc::vec::Vec;
#[derive(Copy, Clone)]
struct Sha256 {
h: [u32; 8],
}
impl Sha256 {
const K: [u32; 64] = [
0x428a_2f98,
0x7137_4491,
0xb5c0_fbcf,
0xe9b5_dba5,
0x3956_c25b,
0x59f1_11f1,
0x923f_82a4,
0xab1c_5ed5,
0xd807_aa98,
0... |
#[cfg(feature = "futures-support")]
use futures_channel::oneshot;
use webapi::event::{IEvent, IUiEvent, UiEvent, Event};
use webapi::events::mouse::{IMouseEvent, MouseEvent};
use webapi::file::File;
use webcore::once::Once;
use webcore::value::{Reference, Value};
use webcore::try_from::TryInto;
use webapi::file_list::F... |
use core::ptr::{read_volatile, write_volatile};
use core::ops::{Deref, DerefMut};
const REG_VDP_BASE: usize = 0xc00000;
const REG_VDP_DATA16: *mut u16 = REG_VDP_BASE as _;
const REG_VDP_CONTROL16: *mut u16 = (REG_VDP_BASE + 4) as _;
const DEFAULT_PALETTE: [u16; 16] = [
0x000, 0xFFF, 0xF00, 0x0F0, 0x00B, 0xFF0, 0x... |
//! Builder-pattern objects for configuration various git operations.
use libc::{c_char, c_int, c_uint, c_void, size_t};
use std::ffi::{CStr, CString};
use std::mem;
use std::path::Path;
use std::ptr;
use crate::util::{self, Binding};
use crate::{panic, raw, Error, FetchOptions, IntoCString, Repository};
use crate::{... |
use std::fmt::{self, Display};
use rustc::hir;
use rustc::hir::def::{Res, DefKind};
use rustc::hir::def_id::DefId;
use rustc::infer::InferCtxt;
use rustc::mir::{Local, Body};
use rustc::ty::subst::{SubstsRef, GenericArgKind};
use rustc::ty::{self, RegionVid, Ty, TyCtxt};
use rustc::ty::print::RegionHighlightMode;
use ... |
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use super::{
common::{
next_deadline, with_local_timer_heap, ExecutorTime, Inner, Notifier, TimerHeap,
EMPTY_WAKEUP_ID, MAIN_TASK_ID, T... |
use bitcoin::{util::uint::Uint256, BlockHash, BlockHeader, Network};
use crate::{
constants::{
checkpoints, last_checkpoint, latest_checkpoint_height, max_target, no_pow_retargeting,
pow_limit_bits, BLOCKS_IN_ONE_YEAR, DIFFICULTY_ADJUSTMENT_INTERVAL, TEN_MINUTES,
},
BlockHeight,
};
/// An ... |
use super::super::verbose_flag;
use rand::Rng;
use std::sync::Arc;
use crate::pairing::{
Engine,
Wnaf,
CurveProjective,
CurveAffine
};
use crate::pairing::ff::{
PrimeField,
Field
};
use super::{
Parameters,
VerifyingKey
};
use crate::{
SynthesisError,
Circuit,
Const... |
use std::collections::VecDeque;
use std::fmt;
use anyhow::Result;
use serde::{Deserialize, Serialize};
use geom::{Distance, Duration, PolyLine, Speed, EPSILON_DIST};
use crate::{
BuildingID, DirectedRoadID, LaneID, Map, PathConstraints, Position, Traversable, TurnID,
UberTurn,
};
#[derive(Debug, Clone, Copy... |
//! Raw file metadata.
use {Result, Version};
use byteorder::{LittleEndian, ReadBytesExt};
use feature::{Evlrs, LargeFiles, Waveforms};
use raw::LASF;
use std::io::{Read, Write};
/// A las header.
///
/// The documentation for each member is taken directly from the las 1.2 spec, except in cases
/// where the field's ... |
// Copyright © 2021-present <NAME>
// 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
// https://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in w... |
use log::*;
pub use peridot_archive as archive;
pub use peridot_math as math;
use bedrock as br;
use br::Waitable;
use std::borrow::Cow;
use std::cell::{Ref, RefCell, RefMut};
use std::ffi::CStr;
use std::ops::Deref;
use std::rc::Rc;
use std::sync::{Arc, RwLock};
use std::time::{Duration, Instant as Instan... |
//! `devx-cmd` provides more convenient primitives for spawning child processes
//! than [`std::process`] targeted for use in development scripts specifically.
//!
//! The main entities of the crate are [`Cmd`] (builder for executable
//! commands), and [`Child`] (represents a spawned process).
//!
//! There are also s... |
// Copyright Amazon.com, Inc. or its affiliates.
use rstest::*;
use ion_c_sys::reader::*;
use ion_c_sys::timestamp::Mantissa::*;
use ion_c_sys::timestamp::TSOffsetKind::*;
use ion_c_sys::timestamp::TSPrecision::*;
use ion_c_sys::timestamp::*;
use ion_c_sys::*;
use Val::*;
use bigdecimal::BigDecimal;
use chrono::Dat... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Device Configuration Status"]
pub dma_device_cfg: DMA_DEVICE_CFG,
#[doc = "0x04 - Software Channel Trigger Register"]
pub dma_sw_chtrig: DMA_SW_CHTRIG,
_reserved2: [u8; 8usize],
#[doc = "0x10 - Channel n Source Conf... |
use rustc_feature::{ACCEPTED_FEATURES, ACTIVE_FEATURES, REMOVED_FEATURES, STABLE_REMOVED_FEATURES};
use rustc_feature::{AttributeGate, BUILTIN_ATTRIBUTE_MAP};
use rustc_feature::{Features, Feature, State as FeatureState, UnstableFeatures};
use rustc_feature::{find_feature_issue, GateIssue};
use crate::ast::{self, Asso... |
/*
Copyright 2021 Volt Contributors
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
d... |
pub use rand_core::{RngCore, SeedableRng};
use interchange::Responder;
use littlefs2::path::PathBuf;
use chacha20::ChaCha8Rng;
use crate::api::*;
use crate::Bytes;
use crate::platform::*;
use crate::config::*;
use crate::error::Error;
pub use crate::key;
use crate::mechanisms;
use crate::pipe::TrussedInterchange;
pub ... |
mod hidden;
mod lobby;
mod main;
mod multiplayer_room;
mod restart;
use amethyst::{
core::{HiddenPropagate, ParentHierarchy},
ecs::{Entity, ReadExpect, System, SystemData, World, Write, WriteExpect, WriteStorage},
shred::ResourceId,
shrev::{EventChannel, ReaderId},
ui::{Interactable, UiEvent, UiEve... |
#![warn(missing_docs)]
#![warn(rustdoc::missing_doc_code_examples)]
use std::collections::HashMap;
use std::fs::File;
use std::io::{BufRead, BufReader, Cursor, Read, Write};
use std::path::Path;
use std::sync::Once;
use crypto::blockmodes::NoPadding;
use crypto::buffer::{RefReadBuffer, RefWriteBuffer};
use crypto::sc... |
use crate::{
messaging::ProtocolMessageSender,
proto::{ProtocolMessage, ProtocolMessageType},
ABFTValue,
};
use bincode::{deserialize, serialize};
use consensus_core::crypto::sign::*;
use consensus_core::crypto::{commoncoin::*, SignatureIdentifier};
use proposal_promotion::{PPProposal, PPReceiver, PPSender,... |
use smallvec::SmallVec;
use std::collections::{HashMap, HashSet};
use syntax::ast::*;
use syntax::attr;
use syntax::ptr::P;
use syntax::symbol::keywords;
use syntax::visit::{self, Visitor};
use transform::Transform;
use indexmap::IndexSet;
use api::*;
use ast_manip::AstEquiv;
use command::{CommandState, Registry};
use... |
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct SettlementInstructions {
/// MsgType = T
#[serde(flatten)]
pub standard_message_header: super::super::standard_message_header::StandardMessageHeader<'T', ' '>,
/// Unique message ID regardless of <a... |
//! In this context, a configuration is a description of a IC-network topology
//! plus some initial parameters, such as the ip addresses of the nodes and
//! consensus parameters of subnetworks.
//!
//! _Initializing_ consumes a configuration, generates corresponding files on
//! disk and returns an initialized ic.
u... |
use rand::random;
/// Core CPU implementation.
use std::error::Error;
use std::fs::File;
use std::io::Read;
use std::path::Path;
use crate::display::{Display, FONT_SET};
use crate::keypad::{Keypad, Keystate};
/// The default CPU clock, in Hz.
pub const CPU_CLOCK: u32 = 600;
/// The timers clock, in Hz.
pub const TIME... |
// This doesn't seem to work/do anything?
#![deny(intra_doc_link_resolution_failure)]
// I do prefer being explicit sometimes.
#![allow(clippy::redundant_field_names)]
//! wcnt (Warning Counter) is a small command line tool to count warnings in files, and map them
//! to declared limits. It may then return an error cod... |
extern crate blake2_rfc;
use std::{fmt, mem};
use std::error::Error;
use self::blake2_rfc::blake2b::Blake2b;
use octword::u64x2;
use block::{ARGON2_BLOCK_BYTES, Block, Matrix};
use workers::Workers;
#[derive(Eq, PartialEq, Copy, Clone, Debug)]
pub enum Variant {
Argon2d = 0,
Argon2i = 1,
}
const DEF_B2HASH_L... |
//! Base types and functions.
use clap::crate_version;
use mylib::impl_fmt;
pub use std::{
collections::{BTreeMap, BTreeSet},
io::stdout,
io::{
Result as IoRes, {Read, Write},
},
sync::{
mpsc::{Receiver, Sender},
Arc, RwLock,
},
};
pub use either::Either;
pub use error... |
use rayon::prelude::*;
use rusqlite::Transaction;
use rusqlite::{params, Connection, Result, NO_PARAMS};
use std::path::Path;
use std::time::Instant;
mod records;
use records::*;
const CUSTOM_PARAM_NAMES: [&str; 366] = [
"Diffuse",
"Specular",
"Ambient",
"BlendMap",
"Transparency",
"DiffuseMap... |
use std::io::{Read, Seek, SeekFrom};
use anyhow::{anyhow, Result};
use byteorder::{LittleEndian, ReadBytesExt};
use cgmath::{InnerSpace, Vector3, Vector4};
use crate::byte_reading::parse_vec3_f32;
#[derive(Debug)]
pub struct Mesh {
pub positions: Vec<Vector3<f32>>,
pub normals: Vec<Vector3<f32>>,
pub fac... |
use crate::{
border::BorderBuilder,
brush::{Brush, GradientPoint},
button::{ButtonBuilder, ButtonMessage},
core::{algebra::Vector2, color::Color, math::Rect, pool::Handle},
decorator::DecoratorBuilder,
define_constructor,
grid::{Column, GridBuilder, Row},
message::{CursorIcon, MessageDir... |
//! This module defines all parsing functions to generate AST from SQL texts.
//! Macros are used to eliminate idential parts of generic function signatures
//! required by nom parsing framework.
pub mod dialect;
pub(crate) mod dml;
pub(crate) mod expr;
pub(crate) mod query;
use crate::ast::*;
use crate::parser::dml::... |
use bitflags::bitflags;
use crate::{from_iter, FileWrapper, ProcResult};
use std::collections::HashMap;
use std::io::{BufRead, BufReader, Lines, Read};
use std::path::PathBuf;
use std::time::Duration;
bitflags! {
pub struct NFSServerCaps: u32 {
const NFS_CAP_READDIRPLUS = 1;
const NFS_CAP_HARDLI... |
// Copyright 2020-2021 <NAME>
// SPDX-License-Identifier: Apache-2.0
use core::convert::TryFrom;
use crypto::ciphers::aes::Aes128Gcm;
use crypto::ciphers::aes::Aes192Gcm;
use crypto::ciphers::aes::Aes256Gcm;
use crypto::ciphers::aes_cbc::Aes128CbcHmac256;
use crypto::ciphers::aes_cbc::Aes192CbcHmac384;
use crypto::cip... |
use std::{cmp::Ordering, mem, time::Instant};
use arrayvec::ArrayVec;
use rustc_hash::FxHashMap;
use crate::{
cast,
chunk::{Chunk, Op, Value},
compiler::Parser,
error::LoxError,
memory::{HeapId, Memory},
object::{BoundMethod, Class, Closure, Instance, NativeFunction, ObjData, Upvalue},
};
pub... |
use std::{
fmt,
sync::atomic::{AtomicUsize, Ordering},
collections::BTreeMap,
rc::Rc,
any::Any,
hash::Hash,
cell::{Ref as StdRef, RefMut as StdRefMut, RefCell},
};
use azul_css::{LayoutPoint, LayoutRect, CssPath};
#[cfg(feature = "css_parser")]
use azul_css_parser::CssPathParseError;
use cra... |
//! The Styx IR builder.
//!
//! Styx IR is a structure very close to actual assembly.
//!
//! It consists of raw assembly with the following added features:
//! - **Macros**: Instructions that get expanded to one or more other instructions.
//! - **Variables**: Abstract variables that are automatically transformed... |
// The MIT License (MIT)
//
// Copyright (c) 2015 <NAME>
//
// 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, mo... |
// Copyright 2020 <NAME> <<EMAIL>>
//
// 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 agree... |
#![ allow (unused_parens) ]
use std::collections::HashMap;
use std::collections::HashSet;
use std::collections::LinkedList;
use std::io::Cursor;
use std::io::Read;
use std::io::Write;
use std::ops::DerefMut;
use std::path::Path;
use std::path::PathBuf;
use std::sync::Arc;
use std::sync::Mutex;
use rust_crypto::digest... |
//! Implementation of the Grisu algorithm.
//!
//! These routines are adapted from <NAME>'s `fpconv` library,
//! which is available [here](https://github.com/night-shift/fpconv).
//!
//! In addition to porting from C to Rust, this also adds format
//! precision control and other features.
//!
//! This code is therefor... |
//! Illustrates rendering using Vulkan with multiview. Supports any Vulkan 1.1 capable environment.
//!
//! Renders a smooth gradient across the entire view, with different colors per eye.
//!
//! This example uses minimal abstraction for clarity. Real-world code should encapsulate and
//! largely decouple its Vulkan a... |
//! Virtual key codes corresponded to physical scan codes.
#![allow(missing_docs)]
use std::ffi::{CStr, CString};
use crate::{bind, EnumInt};
use super::scan_code::ScanCode;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum KeyCode {
Unknown,
Return,
Escape,
Backspace,
Tab,
Space,
E... |
use quote::{quote, ToTokens};
use syn::{self, Type, Ident, parse_quote, spanned::Spanned};
use std::collections::HashMap;
use proc_macro2::{Span};
use proc_macro_error::{abort};
use crate::{comm::{FieldExtra, FieldInformation, CustomArgument, NUMBER_TYPES, COW_TYPE, CUSTOM_ARG_LIFETIME, CUSTOM_ARG_ALLOWED_COPY_TYPES, V... |
// (C) COPYRIGHT 2018 TECHNOLUTION BV, GOUDA NL
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// exce... |
use crate::args::Args;
use crate::constants::*;
use crate::errors::VcsrError;
use crate::models::{
Dimensions, Frame, Grid, MediaAttributes, MediaCapture, MediaInfo, MetadataPosition,
TimestampPosition,
};
use image::{GenericImage, ImageBuffer, Rgba, RgbaImage};
use imageproc::{drawing::draw_text_mut, rect::Re... |
/*
* Copyright 2019 Comcast Cable Communications Management, LLC
*
* 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 applicab... |
use crate::{
dubin::{
calculate_dubin_path_candidates, calculate_georeferenced_dubin_path_candidates,
GeographicDubinPath,
},
helpers::binary_search,
Aircraft, HumanPresenceCategory, Location, LocationMap, RiskClassification, SurfaceType,
UsageType,
};
use geo::{
prelude::{Euclid... |
// This module handles everything related with a Tracker :
// The UDP Tracker Protocol is followed from : http://www.bittorrent.org/beps/bep_0015.html
// TODO : {
// 1 : Add Scrape Request
// 2 : Add TCP Tracker request
// }
//
#![allow(unused_must_use)]
#![allow(dead_code)]
use crate::Result;
use byteorder::{B... |
// This is a part of Chrono.
// See README.md and LICENSE.txt for details.
/*!
`strftime`/`strptime`-inspired date and time formatting syntax.
## Specifiers
The following specifiers are available both to formatting and parsing.
| Spec. | Example | Description ... |
use std::collections::HashMap;
use std::path::PathBuf;
use regex::Regex;
use structopt::clap;
use syntect::highlighting::Style as SyntectStyle;
use syntect::highlighting::Theme as SyntaxTheme;
use syntect::parsing::SyntaxSet;
use unicode_segmentation::UnicodeSegmentation;
use crate::ansi;
use crate::cli;
use crate::c... |
// Fill in all six of the TODO methods. You can run the unit tests to
// ensure that you have done them correctly. You may want to comment out other unit
// tests for other functions (they are grouped by functions) just to minimize distractions.
// You should not have to edit any code other than in functions with the... |
use std::collections::{BTreeSet, HashMap};
use std::fs::{self, File};
use std::io::prelude::*;
use std::io::SeekFrom;
use std::path::{Path, PathBuf};
use std::rc::Rc;
use std::sync::Arc;
use flate2::read::GzDecoder;
use flate2::{Compression, GzBuilder};
use log::debug;
use tar::{Archive, Builder, EntryType, Header, He... |
//! A Chunker ported from [OpenNLP](https://opennlp.apache.org/).
use half::bf16;
use serde::{Deserialize, Serialize};
use std::hash::{Hash, Hasher};
use std::{cmp::Ordering, collections::BinaryHeap};
use crate::types::{DefaultHashMap, DefaultHasher};
use super::IncompleteToken;
fn softmax(vec: &mut Vec<f32>) {
... |
// In the name of Allah
//! Provides functionality for conversion among Persian (Solar Hijri) and Gregorian calendars.
//! A Julian calendar is used as an interface for all conversions.
//! The crate name is ptime and it is compatible with the crate [time](https://crates.io/crates/time).
//! This source code is licens... |
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at yo... |
use csv::{Reader, ReaderBuilder};
use owo_colors::OwoColorize;
use std::fs::File;
use std::io::{self, BufReader, Read};
use std::path::PathBuf;
use structopt::StructOpt;
mod datatype;
use crossterm::terminal::size;
use directories::BaseDirs;
use serde::Deserialize;
use serde::Serialize;
use std::convert::TryInto;
use t... |
mod call_context_manager;
pub use super::queues::memory_required_to_push_request;
use super::{queues::can_push, ENFORCE_MESSAGE_MEMORY_USAGE};
pub use crate::canister_state::queues::CanisterOutputQueuesIterator;
use crate::{CanisterQueues, InputQueueType, StateError};
pub use call_context_manager::{CallContext, CallCo... |
use std::time::Duration;
use bevy_retrograde::physics::heron::rapier_plugin::PhysicsWorld;
use bevy_retrograde::prelude::{kira::parameter::tween::Tween, raui::core::make_widget};
use itertools::Itertools;
use crate::utils::{IntoBevy, IntoNav};
use super::map_loading::LdtkMapLevelNavigationMeshes;
use super::*;
mod ... |
use {
super::Cell,
std::{f32::consts::PI, mem, ops::Range},
thiserror::Error,
ultraviolet::{rotor::Rotor2, vec::Vec2},
wgpu::util::DeviceExt,
winit::{
dpi,
event::{Event, WindowEvent},
event_loop::ControlFlow,
window::Window,
},
};
#[derive(Debug, Error)]
pub... |
// <NAME>
// build.rs for cyclonedds-sys
/*
Copyright 2020 <NAME>
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 req... |
use crate::{
code::{def::InstructionEntry, Range},
style::STYLE_MAP,
};
use ::class::{
attribute::{Attribute, AttributeInfo, Code},
class::Class,
constant::Constant,
parse::ByteParser,
signature as sig,
};
use ansi_term::Style;
use class::attribute::{Annotation, AnnotationPair, AnnotationVal... |
#![cfg(feature = "test_262")]
use indicatif::{ParallelProgressIterator, ProgressBar, ProgressStyle};
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
use ressa::Parser;
use serde::{Deserialize, Serialize};
use std::fs::File;
use std::io::BufWriter;
use std::{
error::Error,
path::{Path, PathBuf},
}... |
use std::collections::HashMap;
use std::ops::{Deref, Index};
use std::sync::{Arc, RwLock};
use anyhow::{anyhow, bail};
use lazy_static::lazy_static;
use maplit::hashmap;
use regex::Regex;
use serde::{Deserialize, Serialize};
use super::constants::*;
use super::help::HelpKVS;
use crate::auth;
use crate::strset::String... |
use crate::data_structures::{Accumulator, AccumulatorRef, InputRef};
use crate::error::{ASError, BoxedError};
use crate::ConstraintF;
use crate::{AccumulationScheme, MakeZK};
use ark_ec::AffineCurve;
use ark_ff::{to_bytes, One, Zero};
use ark_poly::polynomial::univariate::DensePolynomial;
use ark_poly_commit::trivial_... |
// Copyright 2020 TiKV Project Authors. Licensed under Apache-2.0.
use std::cell::Cell;
use std::ffi::CString;
use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::{Arc, Mutex};
use std::thread;
use std::time::{Duration, Instant};
use super::{GcConfig, GcWorkerConfigManager};
use crate::storage::mvcc::{check_... |
//! Module for KWP2000 (Keyword protocol 2000 - ISO142330)
//!
//! This module is written to be 100% compliant with the following vehicle manufactures
//! which utilize KWP2000:
//! * Dodge
//! * Chrysler
//! * Jeep
//! * Mitsubishi (Abbreviated as MMC)
//! * Daimler (Mercedes-Benz, Maybach and SMART)
//!
//! Other man... |
#![warn(missing_docs)]
//! # Country Codes (ISO 3166)
//! The purpose of [ISO 3166][1] is to define internationally recognized codes
//! of letters and/or numbers that we can use when we refer to countries and
//! their subdivisions. However, it does not define the names of countries –
//! this information comes fr... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - EBU Clock Control Register"]
pub clc: CLC,
#[doc = "0x04 - EBU Configuration Register"]
pub modcon: MODCON,
#[doc = "0x08 - EBU Module Identification Register"]
pub id: ID,
#[doc = "0x0c - EBU Test/Control Confi... |
//! Instruction formats and opcodes.
//!
//! The `instructions` module contains definitions for instruction formats, opcodes, and the
//! in-memory representation of IR instructions.
//!
//! A large part of this module is auto-generated from the instruction descriptions in the meta
//! directory.
use alloc::vec::Vec;
... |
use bevy::{
app::CoreStage,
asset::AssetStage,
core::FloatOrd,
pbr::{NotShadowCaster, NotShadowReceiver},
prelude::*,
utils::HashMap,
};
use bevy_tweening::{lens::*, *};
use heron::prelude::*;
use rand::{distributions::WeightedIndex, prelude::*};
use serde::Deserialize;
use std::{
... |
use std::cmp::Ordering;
use std::collections::{HashMap, HashSet};
use std::iter::FromIterator;
use std::net::Ipv4Addr;
use std::rc::Rc;
use std::sync::atomic::{AtomicUsize, Ordering as SyncOrd};
use std::sync::Arc;
use parking_lot::Mutex;
use rand::Rng;
use serde_derive::{Deserialize, Serialize};
use serde_traitobject... |
//! Helpful methods and structs for operating on the
//! [flags](https://polytope.miraheze.org/wiki/Flag) of a polytope.
//!
//! Recall that a flag is a maximal set of pairwise incident elements in a
//! polytope. For convenience, we omit the minimal and maximal elements from our
//! flags, though we sometimes pretend ... |
use std::collections::HashMap;
use std::fs::File;
use std::io;
use std::io::BufRead;
use std::io::BufReader;
use std::io::Write;
use vdb::{Data, Db, Entry, Predicate, PredicateType, RowId};
#[derive(Debug)]
struct DictEntry {
word: Option<String>,
translations: Vec<String>,
conjugations: Vec<String>,
i... |
#[derive(PartialEq, Debug)]
pub enum AddressingMode
{
Implied,
Accumulator,
Immediate,
Absolute,
AbsoluteX,
AbsoluteY,
ZeroPage,
ZeroPageX,
ZeroPageY,
Relative,
Indirect,
IndirectX,
IndirectY,
}
pub enum Operation
{
// Binary operations
ADC,
SBC,
AND,... |
/*!
This module bypasses alsa-lib and directly read and write into memory mapped kernel memory.
In case of the sample memory, this is in many cases the DMA buffers that is transferred to the sound card.
The reasons for doing this are:
* Minimum overhead where it matters most: let alsa-lib do the code heavy setup -
... |
/*
* Copyright 2019 The Starlark in Rust Authors.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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
*
* https://www.apache.org/lic... |
/**
* Copyright 2019-2020, <NAME> and the zenith contributors
*/
use crate::graphics::{GraphicsDevice, GraphicsExt};
use crate::histogram::HistogramMap;
use crate::util::percent_of;
use crate::zprocess::*;
use futures::StreamExt;
use heim::host;
use heim::net;
use heim::net::Address;
use heim::units::frequency::mega... |
//! The first pass resolves all block structure, generating an AST. Within a block, items
//! are in a linear chain with potential inline markup identified.
use std::cmp::max;
use crate::parse::{scan_containers, Allocations, Item, ItemBody};
use crate::scanners::*;
use crate::tree::Tree;
/// Runs the first pass, wh... |
#![allow(
dead_code,
non_camel_case_types,
non_upper_case_globals,
non_snake_case
)]
///
/// # Библиотека VIPS
/// Чтобы использовать VIPS нужно выполнить в терминале:
/// ```bash
/// $sudo apt-get install libvips*
/// ```
/// Версия не должна быть менее 8.8 чтобы в этой либе был smart_crop
//
// # Б... |
///!
///! System Control Module (SYS) and
///! Programmable Built-In Self-Test (PBIST) Module
///!
///! The PBIST architecture consists of a small coprocessor
///! with a dedicated instruction set targeted specifically
///! toward testing memories. This coprocessor executes test
///! routines stored in the PBIST ROMand... |
use std::collections::btree_map::BTreeMap;
use std::collections::HashSet;
use std::io::Read;
use std::path::PathBuf;
use filecoin_proofs::error::ExpectWithBacktrace;
use filecoin_proofs::pieces::get_piece_start_byte;
use filecoin_proofs::{
compute_comm_d, verify_seal, PaddedBytesAmount, PieceInfo, PrivateReplicaIn... |
use std::collections::HashMap;
use std::collections::HashSet;
use std::collections::VecDeque;
use crate::common::logger::*;
use crate::common::now_millis;
use crate::task::Task;
use crate::topology::TaskMsg;
use tempest_source::prelude::{Msg, MsgId};
static ROOT_NAME: &'static str = "root";
/// An edge defines the ... |
use bellperson::{Circuit, ConstraintSystem, SynthesisError};
use fil_sapling_crypto::circuit::num;
use fil_sapling_crypto::jubjub::JubjubEngine;
use paired::bls12_381::{Bls12, Fr};
use paired::Engine;
use crate::circuit::constraint;
use crate::circuit::porc;
use crate::circuit::sloth;
use crate::compound_proof::{Circu... |
//! HAL interface to the UARTE peripheral.
//!
//! See product specification:
//!
//! - nrf52832: Section 35
//! - nrf52840: Section 6.34
use core::fmt;
use core::ops::Deref;
use core::sync::atomic::{compiler_fence, Ordering::SeqCst};
use embedded_hal::blocking::serial as bserial;
use embedded_hal::digital::v2::Output... |
#![warn(clippy::all)]
#![warn(rust_2018_idioms)]
//! `texture-synthesis` is a light API for Multiresolution Stochastic Texture Synthesis,
//! a non-parametric example-based algorithm for image generation.
//!
//! First, you build a `Session` via a `SessionBuilder`, which follows the builder pattern. Calling
//! `build... |
//! ECE AES-GCM 128 encrypter/decrypter pipe implementation for Firefox Send v3.
use std::cmp::min;
use std::io::{self, Read, Write};
use byteorder::{BigEndian, ByteOrder};
use bytes::BytesMut;
#[cfg(feature = "crypto-openssl")]
use openssl::symm;
#[cfg(feature = "crypto-ring")]
use ring::aead;
use super::{Crypt, Cr... |
use std::{io, ptr, net};
use std::collections::{HashMap, VecDeque};
use std::io::{Cursor, Read, Write};
use std::sync::{mpsc, Arc};
use std::time::Instant;
use bitcoin::consensus::encode::{self, Decodable, Encodable};
use bitcoin::network::message::{NetworkMessage, RawNetworkMessage};
use crate::{Event, Listener, Pe... |
use borsh::{BorshDeserialize, BorshSerialize};
use evm::backend::{Apply, ApplyBackend, Backend, Basic, Log};
use evm::executor::{StackExecutor, StackSubstateMetadata};
use evm::ExitFatal;
use evm::{Config, CreateScheme, ExitError, ExitReason};
use crate::connector::EthConnectorContract;
#[cfg(feature = "contract")]
us... |
// Copyright 2016-2021 the Tectonic Project
// Licensed under the MIT License.
#![deny(missing_docs)]
//! Tectonic’s pluggable I/O backend.
//!
//! This crates defines the core traits and types used by Tectonic’s I/O
//! subsystem, and provides implementations for common stdlib types. It provides
//! a simplified I/O... |
use std::collections::{BTreeMap, BTreeSet, HashMap};
use std::fs::{File, Metadata};
use std::io::Write;
use std::io::*;
use std::path::{Path, PathBuf};
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
use std::sync::Arc;
use std::thread::sleep;
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use std::{fs,... |
//! Code for notifying other modules about changes in the directory.
// TODO(nickm): After we have enough experience with this FlagPublisher, we
// might want to make it a public interface. If we do it should probably move
// into another crate.
use std::{
fmt,
marker::PhantomData,
pin::Pin,
sync::{
... |
use bars_duration_ticks;
use conrod_core::{self as conrod, widget, Colorable, Positionable, Sizeable, Widget};
use playhead::{self, Playhead};
use ruler::{self, Ruler};
use std;
use std::collections::HashMap;
use time_calc as time;
use track;
/// A widget for viewing and controlling time related data.
#[derive(WidgetC... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.