text
stringlengths
7.05k
33.9k
//! # runner //! //! Runs the requested tasks.<br> //! The flow is as follows: //! //! * Load env variables //! * Create an execution plan based on the requested task and its dependencies //! * Run all tasks defined in the execution plan //! #[cfg(test)] #[path = "runner_test.rs"] mod runner_test; use crate::command;...
// Copyright 2020 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. //! Functions for drawing in Carnelian //! Carnelian uses the Render abstraction over Mold and Spinel //! to put pixels on screen. The items in this module...
// Rust-oracle - Rust binding for Oracle database // // URL: https://github.com/kubo/rust-oracle // //----------------------------------------------------------------------------- // Copyright (c) 2017-2018 <NAME> <<EMAIL>>. All rights reserved. // This program is free software: you can modify it and/or redistribute it...
use std::{ borrow::Cow, fs, fs::File, mem, path::{Path, PathBuf}, ptr, }; use anyhow::{anyhow, bail, Context, Result}; use ash::{version::DeviceV1_0, vk}; use futures_util::future::{try_join_all, BoxFuture, FutureExt}; use lahar::{BufferRegionAlloc, DedicatedImage}; use tracing::{error, trace};...
#![recursion_limit = "256"] #![deny(missing_docs)] //! # A leaky-bucket rate limiter //! //! This implements a leaky bucket from which you can acquire tokens. //! //! If the tokens are already available, the acquisition will be instant (fast path) and the //! acquired number of tokens will be added to the bucket. //! /...
//! BLAKE2bp, a variant of BLAKE2b that uses SIMD more efficiently. //! //! The AVX2 implementation of BLAKE2bp is about twice as fast that of BLAKE2b. //! However, note that it's a different hash function, and it gives a different //! hash from BLAKE2b for the same input. //! //! # Example //! //! ``` //! use blake2b_...
//! Common traits for input backends to receive input from. use std::path::PathBuf; use wayland_server::protocol::wl_keyboard::KeyState as WlKeyState; mod tablet; pub use tablet::{ ProximityState, TabletToolAxisEvent, TabletToolButtonEvent, TabletToolCapabilitys, TabletToolDescriptor, TabletToolEvent, Table...
mod dsl; mod helpers; mod utils; use cached::proc_macro::cached; use comrak::{markdown_to_html, ComrakOptions}; use dotenv::dotenv; use dsl::{TemplateContentDSLItem}; use handlebars::Handlebars; use hotwatch::{Event, Hotwatch}; use parking_lot; use rayon::prelude::*; use regex::Regex; use serde::{Deserialize, Serializ...
use super::plan::{NormalPlan, Plan}; use crate::{ bundler::load::{Source, Specifier, TransformedModule}, util::{CHashSet, IntoParallelIterator}, Bundler, Load, ModuleId, Resolve, }; use anyhow::{Context, Error}; #[cfg(feature = "concurrent")] use rayon::iter::ParallelIterator; use std::{ collections::Ha...
use std::cell::RefCell; use std::collections::HashMap; use std::fs::File; use std::io::{Read, Seek, SeekFrom}; use std::path::Path; use csv::{self, Reader, StringRecord}; use csv_core as csvc; use regex::Regex; use crate::{ chain::{Chain, ViterbiResults, STATE_STEADYFLEX, STATE_STEADYSTRICT, STATE_UNSTEADY}, ...
use log::{debug, info, error}; use env_logger::Env; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use clap::{Arg, App, ArgMatches}; use std::panic; use std::process; use ilert::ilert::ILert; use ilert::ilert_builders::{EventImage, EventLink}; mod il_config; use il_config::ILConfig; mod il_db; us...
use bitflags::bitflags; use std::sync::Mutex; use bevy::{ core::Byteable, prelude::*, reflect::TypeUuid, render::{ camera::{ActiveCameras, Camera}, draw::OutsideFrustum, mesh::Indices, pipeline::PrimitiveTopology, renderer::RenderResources, }, tasks::Asyn...
//! A Wordle solver #![warn(clippy::all, clippy::pedantic, clippy::nursery, clippy::cargo)] #![warn( bad_style, const_err, dead_code, improper_ctypes, missing_copy_implementations, missing_debug_implementations, missing_docs, no_mangle_generic_items, non_shorthand_field_patterns, ...
use crate::comms::fdcan::{self, Fdcan, Running}; use crate::comms::messages::FdcanID; use crate::comms::MessageHandler; use crate::control_loops::calibrate_adc::CalibrateADC; use crate::control_loops::{ControlHardware, Controller}; use crate::cordic::Cordic; use crate::encoder::Encoder; use crate::pwm::PwmOutput; use c...
use cef_string::{CefString, CefStringUserFree}; use process_message::{CefProcessId, CefProcessMessage}; use cef_base; use libc::{c_void}; use cef_settings; use platform::windows::CefWindowInfo; use std::os::raw::{c_int}; use cef_types::*; #[allow(unused_variables)] pub extern fn nop_handler (this: *mut CefCl...
// Copyright 2020, The Tari Project // // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the // following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following // di...
//! dynamics, constraints for Dubins airplane [Chitsaz and LaValle, 2007] //! //! states := [ x, y, z, theta ] //! control := [ u, v ] //! x' = Vcos(theta) //! y' = Vsin(theta) //! z' = v //! theta' = u //! u range: [-40,40] degrees //! z range: [-0.5,0.5] //! V = 1 use crate::states::*; use crate::control::*; use cra...
// Copyright (c) SimpleStaking and Tezedge Contributors // SPDX-License-Identifier: MIT use std::collections::{HashMap, HashSet}; use std::env; use std::fs; use std::path::{Path, PathBuf}; use serde::{Deserialize, Serialize}; use slog::{Drain, Level, Logger}; use crypto::hash::OperationHash; use tezos_messages::p2p:...
use std::collections::HashMap; use std::convert::TryFrom; use std::fmt::Debug; use std::hash::{Hash, Hasher}; use std::str::FromStr; use num_traits::{AsPrimitive, Float}; use serde::{Deserialize, Serialize}; use crate::metric::{FromF64, Metric, MetricType, MetricTypeName}; /// Percentile counter. Not safe. Requires ...
//! utilities and helpers for testing use std::cell::{Cell, RefCell}; use std::sync::{Arc, Mutex}; use std::task::{Context, Poll, Waker}; use std::{any, cmp, fmt, future::Future, io, mem, net, pin::Pin, rc::Rc}; use ntex_bytes::{Buf, BufMut, Bytes, BytesVec}; use ntex_util::future::poll_fn; use ntex_util::time::{sleep...
//! Describes a `Function` that is ready to execute on a device. use std::fmt; use std::sync::Arc; use crate::codegen::{ self, cfg, dimension, Cfg, Dimension, InductionLevel, InductionVar, }; use crate::ir::{self, IrDisplay}; use crate::search_space::{self, DimKind, Domain, MemSpace, SearchSpace}; use fxhash::FxHa...
#![allow(non_snake_case)] use opcode::Opcode; use keypad::Keypad; use display::Display; use util; pub struct Cpu { pub memory: [u8; 4096], pub v: [u8; 16], pub i: usize, pub pc: usize, pub gfx: [u8; 64 * 32], pub delay_timer: u8, pub sound_timer: u8, pub stack: [u16; 16], pub sp: u...
#![no_std] #![no_main] #![feature(asm)] extern crate nrf52dk_sys; use nrf52dk_sys as nrf; use nrf::check; static NAME: &str = "RUST-BLE"; static mut EVENT_BUFFER: [u8; 88] = [0; 88]; // 64 + 23 = 87, rounded up to next word static mut M_CONN_HANDLE: u16 = nrf::BLE_CONN_HANDLE_INVALID as u16; const APP_FEATURE_NOT_SU...
use std::{ borrow::{Borrow, Cow}, collections::{BTreeMap, BTreeSet, HashMap}, fmt::{self, Write}, path::Path, rc::Rc, }; use cargo::{ core::{ dependency::Kind as DependencyKind, resolver::{Method, Resolve}, InternedString, Package, PackageId, PackageIdSpec, SourceId, Wor...
//! A-Star pathfinding algorithm for an Axial grid alignment. //! //! Axial coordinates use the convention of `q` for column and `r` for row. In the example below the `r` is a diagonal row. //! For hexagon layouts where the pointy tops are facing up the calculations remain exactly the same as you're effectively //! jus...
// Copyright 2020 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 { crate::cache::load_config, crate::env_var::env_var, crate::environment::Environment, crate::file_backed_config::FileBacked as Config,...
use std::process::{Command, Stdio}; use std::io::{BufWriter, Write, Read}; use std::fs::File; use csnappy; use xsnappy::{max_encode_len, encode}; use xsnappy::{decode_len, decode}; use criterion::{criterion_group, criterion_main, Criterion, Bencher, Throughput, BenchmarkGroup}; use std::time::Duration; use crate::golde...
// Copyright © Spelldawn 2021-present // 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 i...
// // // This file is a part of Aleph // // https://github.com/nathanvoglsam/aleph // // MIT License // // Copyright (c) 2020 Aleph Engine // // 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 Softwar...
use std::iter; use std::str::FromStr; use std::io::{copy, BufReader, Read, Cursor}; use std::fs::{self, File}; use std::fmt::{self, Display, Formatter}; use std::path::{PathBuf, Path}; use std::sync::Arc; use zip::ZipArchive; use indexmap::{IndexMap}; use failure::Error; use failure_derive::Fail; use itertools::Peekin...
extern crate strtod; use syntax::Span; use syntax::Name; use util::interner::StrInterner; use self::strtod::strtod; pub enum LitNumber { Float(f64), Long(i64) } impl LitNumber { pub fn from_lit(interner: &StrInterner, lit: &Lit, sign: bool) -> Option<LitNumber> { if let Lit::Number(...
//! Various utility functionality. use std::io; use std::fs; use std::mem; use std::env; use std::fmt; use std::time; use std::process; use std::borrow::Cow; use std::fmt::Display; use std::result::Result as StdResult; use std::path::{Path, PathBuf}; use std::io::{Read, Write, Seek, SeekFrom}; use clap; use log; use u...
// vim: tw=80 //! Measures BTree metadata efficiency //! //! This program constructs a filesystem BTree and fills it with records //! simulating both sequential and random insertion into a large file. It //! computes the Tree's padding fraction (lower is better) and the overall //! metadata fraction of the file system...
use std::time::{SystemTime, UNIX_EPOCH}; use std::{cmp::min, io, io::Read, pin::Pin}; use aes::Aes128; use anyhow::anyhow; use anyhow::Result; use byteorder::{BigEndian, ByteOrder}; use bytes::{BufMut, BytesMut}; use cfb_mode::stream_cipher::{NewStreamCipher, StreamCipher}; use cfb_mode::Cfb; use digest::ExtendableOut...
use rand::Rng; /// Offset in CHIP8 RAM where actual ROM (program) starts pub const ROM_OFFSET: usize = 0x200; /// Number of pixels horizontally pub const COLS: usize = 64; /// Number of pixels vertically pub const ROWS: usize = 32; /// Total number of pixels pub const PIXELS: usize = ROWS * COLS; /// CHIP-...
use crate::errors::{Error, Result}; use crate::vec2d::*; use std::io::{self, Write}; use unicode_width::*; pub type CharList = Vec<char>; pub type FieldXY = Vec2D<isize>; pub type PosXY = (usize, usize); /// Maximum size for a field (x, y): `(500, 500)` pub const GEOMETRY_LIMITS_MAX: PosXY = (500, 500); /// Minimum...
//! # `yaxpeax-lc87`, a decoder for the LC87 instruction set //! //! the LC87 instruction set is used in the LC87 series of microcontrollers, originally developed //! by Sanyo, whose semiconductor division was acquired by [ON Semiconductor in //! 2011](https://www.onsemi.com/PowerSolutions/newsItem.do?article=2458). LC...
use dqcsim::{ common::{ error::{inv_arg, inv_op, oe_inv_arg, ErrorKind, Result}, gates::*, types::{ ArbData, Basis, Gate, Matrix, PluginMetadata, PluginType, QubitMeasurementValue, QubitRef, }, }, debug, info, plugin::{definition::PluginDefinition,...
//! Universal shader translator. //! //! The central structure of the crate is [`Module`]. //! //! To improve performance and reduce memory usage, most structures are stored //! in an [`Arena`], and can be retrieved using the corresponding [`Handle`]. #![allow(clippy::new_without_default)] #![deny(clippy::panic)] mod ...
use std::fs::File; use std::io::{BufWriter, Write}; use inflector::Inflector; use self::error_types::{GenerateErrorTypes, JsonErrorTypes, RestJsonErrorTypes, XmlErrorTypes}; use self::json::JsonGenerator; use self::query::QueryGenerator; use self::rest_json::RestJsonGenerator; use self::rest_xml::RestXmlGenerator; us...
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ use super::{PayloadChecksumKind, SignatureLocation}; use crate::http_request::canonical_request::header; use crate::http_request::canonical_request::param; use crate::http_request::canonical_request::{C...
use crate::{ buffers::Acker, event::{self, Event, ValueKind}, region::RegionOrEndpoint, sinks::util::{ retries::{FixedRetryPolicy, RetryLogic}, BatchServiceSink, Buffer, PartitionBuffer, PartitionInnerBuffer, SinkExt, }, topology::config::{DataType, SinkConfig}, }; use bytes::Byt...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Channel Control Register (channel = 0)"] pub ccr0: crate::Reg<ccr0::CCR0_SPEC>, _reserved_1_cmr0: [u8; 0x04], #[doc = "0x08 - Stepper Motor Mode Register (channel = 0)"] pub smmr0: crate::Reg<smmr0::SMMR0_SPEC>, _re...
//! Request identity service for Actix applications. //! //! [**IdentityService**](struct.IdentityService.html) middleware can be //! used with different policies types to store identity information. //! //! By default, only cookie identity policy is implemented. Other backend //! implementations can be added separatel...
// Copyright 2019 CoreOS, Inc. // // 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...
// Copyright 2018 The Chromium OS 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 std::ffi::CStr; use std::fs::File; use std::io::Read; use arch::fdt::{ begin_node, end_node, finish_fdt, generate_prop32, generate_prop64, pro...
//! DOM-tree to CSS style tree stying use std::{fmt, collections::BTreeMap}; use azul_css::{ Css, CssContentGroup, CssPath, CssPathSelector, CssPathPseudoSelector, CssNthChildSelector::*, }; use webrender::api::HitTestItem; use { ui_description::{UiDescription, StyledNode}, dom::NodeData, ui_state:...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - SMC Setup Register (CS_number = 0)"] pub setup0: SETUP0, #[doc = "0x04 - SMC Pulse Register (CS_number = 0)"] pub pulse0: PULSE0, #[doc = "0x08 - SMC Cycle Register (CS_number = 0)"] pub cycle0: CYCLE0, #[doc = ...
use std::task; use bytes::{Bytes, BytesMut}; use futures::{future::BoxFuture, stream, FutureExt, SinkExt}; use http::Uri; use prost::Message; use serde::{Deserialize, Serialize}; use snafu::{ResultExt, Snafu}; use vector_core::ByteSizeOf; use super::collector::{self, MetricCollector as _}; use crate::{ config::{s...
/* This tool is part of the WhiteboxTools geospatial analysis library. Authors: Dr. <NAME> Created: 29/03/2018 Last Modified: 28/05/2020 License: MIT NOTES: When support is provided for reading vector attributes tables, this tool should be modified so that lake elevations can alternatively be specified as an attribute...
use crate::{ kernel::{fuse_attr, fuse_file_lock, fuse_forget_one, fuse_kstatfs}, util::{make_raw_time, make_system_time}, }; use std::{ convert::TryFrom, // error, fmt, time::SystemTime, }; /// Attributes about a file. /// /// This type is ABI-compatible with `fuse_attr`. #[derive(Default, Clon...
// Copyright 2021 Parallel Finance Developer. // This file is part of Parallel Finance. // 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 // Unl...
// Copyright 2019 TiKV Project Authors. Licensed under Apache-2.0. use std::{ cell::RefCell, fs, fs::{File, OpenOptions}, io::{self, BufReader, Read, Write}, sync::Arc, usize, }; use encryption::{ encryption_method_from_db_encryption_method, DataKeyManager, DecrypterReader, EncrypterWriter,...
// MRustC custom version of libproc_macro // // Unlike the rustc version, this one is designed to live complely detached from its compiler. //#[macro_use] //extern crate log; //extern crate env_logger; macro_rules! debug { ( $($t:tt)* ) => { if ::std::env::var_os("MRUSTC_PM_DEBUG").is_some() { ...
// Distributed under the OSI-approved BSD 2-Clause License. // See accompanying LICENSE file for details. use crate::data; use crate::run::compile::*; use crate::run::BulletManager; use crate::run::Node; #[derive(Debug, Clone, Copy)] struct Function { min: u32, max: u32, start: f32, end: f32, ste...
// QuiZX - Rust library for quantum circuit rewriting and optimisation // using the ZX-calculus // Copyright (C) 2021 - <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 // /...
extern crate byteorder; // use byteorder::{WriteBytesExt, LE}; // use std::io::{self, Cursor, Read, Write}; pub const MAX_SAMPLES_PER_FRAME: usize = 1152 * 2; /// More than ISO spec's pub const MAX_FREE_FORMAT_FRAME_SIZE: usize = 2304; pub const MAX_FRAME_SYNC_MATCHES: usize = 10; /// MUST be >= 320000/8/32000*1152 ...
use std::collections::{HashMap}; use std::iter::{FromIterator}; use super::code::{Instr}; use super::ast::{Alias, Ast, Binding, Expr, Id, Node, Range}; use super::engine::{stock_syms::*, Sym, with_known_ops}; #[cfg(feature = "compiler")] use serde::{Deserialize, Serialize}; //we do all of the standard passes in one a...
use crate::error::{self, Result}; use bottlerocket_types::agent_config::{ ClusterType, CreationPolicy, Ec2Config, EksClusterConfig, K8sVersion, MigrationConfig, SonobuoyConfig, SonobuoyMode, TufRepoConfig, AWS_CREDENTIALS_SECRET_NAME, }; use kube::ResourceExt; use kube::{api::ObjectMeta, Client}; use maplit::bt...
//! The AUTHENTICATE_MESSAGE defines an NTLM authenticate message that is sent from the client //! to the server after the CHALLENGE_MESSAGE is processed by the client. use super::{AvPair, DomainNameFields, Version, WorkstationFields}; #[derive(Debug, PartialEq, Eq, Clone)] pub struct Authenticate { /// LmChallen...
// This file is part of context-coroutine. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/context-coroutine/master/COPYRIGHT. No part of context-coroutine, including this file, may be copied, modified, pro...
#[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; use wrapping_arithmetic::wrappit; // Krull65 features // -"trivially strong" design by <NAME> // -64-bit output, 256-bit state, 320-bit footprint // -full 256-bit state space with no bad states and no bad seeds // -2**128 pairwise independent streams of le...
// Copyright 2019 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, ...
// Copyright 2018- Onai (Onu Technology, Inc., San Jose, California) // // 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 // ...
// Copyright 2021 <NAME> <<EMAIL>> // All right reserved. // extern crate xiao_m0 as hal; extern crate paste; use makbe_ff::key_switch::KeySwitch; use makbe_ff::switch_pool; use makbe_ff::device::{Device, DeviceHolder}; use makbe_ff::devices::tca9555::TCA9555; use keyberon::key_code::KeyCode::*; use keyberon::action:...
//! TODO Documentation use std::{ cell::Cell, ffi::CStr, mem::ManuallyDrop, panic, ptr, ptr::NonNull, rc::{Rc, Weak}, time::Duration }; use crate::libc::{c_float, c_int, clock_t}; use crate::wayland_sys::server::WAYLAND_SERVER_HANDLE; use wlroots_sys::{ timespec, wl_list, wl_output_sub...
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MI...
use crate::piece::*; use crate::position::*; use std::i32; // Score is centipawns pub const MAX_SCORE: i32 = 1_000_000; pub const CHECKMATE_SCORE: i32 = -100_000; // Sources: // https://www.chessprogramming.org/Simplified_Evaluation_Function pub const PAWN: i32 = 100; pub const KNIGHT: i32 = 320; pub const BISHOP: i3...
use crate::cfg::trace; use crate::tls::ThreadLocal; use crate::utils::{CachePadded, Rdmw}; use crate::{Link, Linked}; use std::cell::UnsafeCell; use std::mem::ManuallyDrop; use std::num::NonZeroU64; use std::ptr; use std::sync::atomic::{AtomicPtr, AtomicU64, AtomicUsize, Ordering}; // Fast, lock-free, robust concurre...
use cbor_tools::test_util::*; use cbor_tools::{ByteString, CborType, Encode, Float, Indefinite, Integer, Tag, TextString}; use half::f16; use hex_literal::hex; use std::convert::TryFrom; #[test] fn special_types() { assert_eq!(CborType::Bool(false).encode(), hex!("F4")); assert_eq!(CborType::Bool(true).encode(...
//! # Propose and reject //! This module provides an [assigner](crate::assignment::assigners::Assigner) inspired by the Gale-Shapley algorithm (also known as the propose-and-reject algorithm). //! use std::collections::HashSet; use std::iter::FromIterator; use std::ops::Deref; use std::ops::DerefMut; use super::Assign...
use std::collections::{BTreeMap, btree_map}; use std::convert::TryInto; use wasm_bindgen::prelude::*; use web_sys::{WebGl2RenderingContext, WebGlVertexArrayObject, WebGlTexture}; use lyon::geom::math::{Point, Angle, Vector}; use lyon::tessellation::{VertexBuffers}; #[allow(unused_imports)] use crate::log; use crate:...
use crate::comm::notifications::Notifications; use crate::comm::reactor::{ gather, get_ncores, proxy_to_worker, release_keys, scatter, subscribe_keys, update_graph, who_has, }; use crate::comm::CommRef; use crate::protocol::clientmsg::FromClientMessage; use crate::protocol::generic::{ GenericMessage, Identi...
use super::book::Deal; use super::book::{Book, BookAccounting}; use super::tradestats::{TimeStats, TradeStats}; use crate::error::PoloError; use crate::get_time; use serde::{Deserialize, Serialize}; use std::cmp::Ordering; use std::collections::{HashMap, VecDeque}; use std::fmt; use time; use time::Timespec; use std::h...
use std::fmt::{self, Display, Write}; use codemap::Span; use peekmore::{PeekMore, PeekMoreIterator}; use crate::common::{Brackets, ListSeparator, QuoteKind}; use crate::error::SassResult; use crate::scope::Scope; use crate::utils::{ devour_whitespace, eat_comment, eat_ident_no_interpolation, parse_interpolation,...
// GStreamer // // Copyright (C) 2018 maxmcd <<EMAIL>> // Copyright (C) 2019 <NAME> <<EMAIL>> // Copyright (C) 2020 <NAME> <<EMAIL>> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation;...
// gltf importer for sparkle-rs use std::cell::RefCell; use std::collections::HashMap; use std::error::Error; use std::rc::Rc; use winapi::um::d3d11 as dx11; use winapi::um::d3d11_1 as dx11_1; use crate::engine::d3d11::drawable::{DxDrawable, ObjType}; use crate::engine::d3d11::textures::Texture2D; use crate::engine::...
use std::sync::Arc; use anyhow::{Context, Result}; use parking_lot::Mutex; use pkey_mprotect::*; use tiny_adnl::utils::*; use tokio::sync::mpsc; use ton_block::Serializable; use self::bridge::*; use self::eth_subscriber::*; use self::keystore::*; use self::metrics_exporter::*; use self::staking::*; use self::ton_cont...
//!--- Day 8: Seven Segment Search --- //! //! You barely reach the safety of the cave when the whale smashes into the cave //! mouth, collapsing it. Sensors indicate another exit to this cave at a much //! greater depth, so you have no choice but to press on. //! //! As your submarine slowly makes its way through the ...
use std::cmp; use std::collections::HashMap; use std::fmt; use std::marker::PhantomData; use ff::Field; use crate::{ circuit::{ layouter::{RegionColumn, RegionLayouter, RegionShape, TableLayouter}, Cell, Layouter, Region, RegionIndex, RegionStart, Table, }, plonk::{ Advice, Any, As...
use crate::{api, document}; use ansi_to_tui::ansi_to_text; use color_eyre::Report; use eyre::bail; use reqwest::header::CONTENT_TYPE; use std::io::{stdout, Write}; use std::process::Command; use syntect::easy::HighlightLines; use syntect::highlighting::{Style as hStyle, ThemeSet}; use syntect::parsing::SyntaxSet; use s...
extern crate curl; extern crate rustc_serialize; extern crate dotenv; #[macro_use] extern crate serde_derive; extern crate serde_json; #[macro_use] extern crate diesel; #[macro_use] extern crate diesel_codegen; extern crate csv; extern crate pbr; #[macro_use] extern crate clap; extern crate rand; #[macro_use] extern cr...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { _reserved0: [u8; 32usize], #[doc = "0x20 - Signature start address register"] pub fmsstart: FMSSTART, #[doc = "0x24 - Signature stop-address register"] pub fmsstop: FMSSTOP, _reserved2: [u8; 4usize], #[doc = "0x2c - 128-bit sig...
// Copyright 2017-2020 Parity Technologies (UK) Ltd. // This file is part of Tetcoin. // Tetcoin 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 your option) any l...
use super::*; use linkerd2_app_core::proxy::http::trace; use linkerd2_proxy_api::destination as pb; use linkerd2_proxy_api::net; use std::collections::{HashMap, VecDeque}; use std::net::IpAddr; use std::ops::{Bound, RangeBounds}; use std::sync::{Arc, Mutex}; use tokio::sync::mpsc; use tonic as grpc; use tracing_future...
//! Query Engine Metrics //! This crate is responsible for capturing and recording metrics in the Query Engine. //! Metrics is broken into two parts, `MetricsRecorder` and `MetricsRegistry`, and uses our tracing framework to communicate. //! An example best explains this system. //! When the engine boots up, the `Metri...
use std::task::{Context, Poll}; use std::time::{Duration, Instant}; use std::{cell::RefCell, collections::VecDeque, future::Future, pin::Pin, rc::Rc}; use h2::client::{Builder, Connection as H2Connection, SendRequest}; use http::uri::Authority; use crate::io::{types::HttpProtocol, IoBoxed, TokioIoBoxed}; use crate::t...
use std::borrow::Cow; use std::collections::HashMap; use std::io::{self, Seek, Write}; use failure::{Fail, ResultExt}; use fnv::{FnvHashMap, FnvHashSet}; use num::FromPrimitive; use symbolic_common::{Arch, DebugId, Language}; use symbolic_debuginfo::{DebugSession, FileInfo, Function, LineInfo, ObjectLike, Symbol}; u...
use super::REDUNDANT_PATTERN_MATCHING; use clippy_utils::diagnostics::span_lint_and_then; use clippy_utils::source::snippet; use clippy_utils::sugg::Sugg; use clippy_utils::ty::{implements_trait, is_type_diagnostic_item, is_type_lang_item, match_type}; use clippy_utils::{higher, match_def_path}; use clippy_utils::{is_l...
use std::cmp::Ordering; use std::collections::BinaryHeap; /// A `Point` is something that exists in some sort of metric space, and /// can thus calculate its distance to another `Point`, and can be moved /// a certain distance towards another `Point`. pub trait Point: Sized + PartialEq { /// Distances should be po...
//! A Tracing [Subscriber][`FlameSubscriber`] for generating a folded stack trace for generating flamegraphs //! and flamecharts with [`inferno`] //! //! # Overview //! //! [`tracing`] is a framework for instrumenting Rust programs to collect //! scoped, structured, and async-aware diagnostics. `tracing-flame` provides...
use crate::{Reader, Writer}; use std::io; const DRM_ON_FLAG: u32 = 0xFFFF_FFFF; const EXTH_ON_FLAG: u32 = 0x40; #[derive(Debug, PartialEq, Copy, Clone)] pub enum MobiType { MobiPocketBook, PalmDocBook, Audio, News, NewsFeed, NewsMagazine, PICS, WORD, XLS, PPT, TEXT, HT...
use crate::atoms::Atoms; use crate::grid::Grid; use crate::progress::Bar; use crate::utils; use crate::voxel_map::{Voxel, VoxelMap}; use rustc_hash::FxHashMap; /// The Errors Associated with the [`Analysis`] structure. pub enum AnalysisError { /// Not finding index for supplied maxima. NotMaxima, } /// Make E...
//! This is the constellation binary that, when run one or more times, constitutes a constellation cluster. //! //! # `constellation` //! Run a constellation node, optionally as master, and optionally start a bridge running //! //! ## Usage //! ```text //! constellation master (<addr> <mem> <cpu> [<bridge> <addr>]...)....
// Copyright 2016 Google Inc. All rights reserved. // // 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, ...
use curve25519_dalek::{constants, edwards::EdwardsPoint, scalar::Scalar, traits::Identity}; use failure::Fail; use rand::{CryptoRng, Error as RngError, RngCore}; use sha3::digest::{FixedOutput, Input}; use sha3::Sha3_256; use crate::common::{Verifiable, Verified}; pub mod dleq; fn ed25519_base_mul(s: &Scalar) -> Edw...
use std::cmp; use std::marker::PhantomData; use bitvec::{self, BitVec}; use byteorder::{ByteOrder, LittleEndian}; use ff::{Field, PrimeField, ScalarEngine}; use itertools::Itertools; use paired::bls12_381::{Bls12, Fr, FrRepr}; use paired::Engine; use serde::de::Deserialize; use serde::ser::Serialize; use crate::error...
// Copyright 2022 RisingLight Project Authors. Licensed under Apache-2.0. use std::convert::TryFrom; use std::fmt::Debug; use std::iter::TrustedLen; use std::ops::{Bound, RangeBounds}; use std::sync::Arc; use paste::paste; use rust_decimal::prelude::FromStr; use rust_decimal::Decimal; use crate::types::{Blob, Conver...
#![no_std] extern crate alloc; pub mod crypto; pub mod ecall_args; mod proto_generated; pub mod prpc { pub use crate::proto_generated::*; use alloc::vec::Vec; use phala_types::messaging::{MessageOrigin, SignedMessage}; pub use prpc::{client, server, Message}; pub type EgressMessages = Vec<(Messag...
//! Tasks run by the component. use std::{ error::Error as StdError, fmt::Display, io, net::SocketAddr, pin::Pin, sync::{Arc, Weak}, time::Duration, }; use dimension_types::PublicKey; use futures::{ future::{self, Either}, stream::{SplitSink, SplitStream}, Future, SinkExt, Stre...