text
stringlengths
7.05k
33.9k
// Copyright (c) The Libra Core Contributors // SPDX-License-Identifier: Apache-2.0 //! The ConnectivityManager actor is responsible for ensuring that we are //! connected to a node if and only if it is an eligible node. //! //! A list of eligible nodes is received at initialization, and updates are //! received on ch...
//! Rust bindings to libssh2, an SSH client library. //! //! This library intends to provide a safe interface to the libssh2 library. It //! will build the library if it's not available on the local system, and //! otherwise link to an installed copy. //! //! Note that libssh2 only supports SSH *clients*, not SSH *serv...
//! SQLite database backend use super::helper; use super::*; use crate::db::connmethods::BackendRows; use crate::debug; use crate::migrations::adb::{AColumn, ATable, Operation, TypeIdentifier, ADB}; use crate::query; use crate::query::Order; use crate::{Result, SqlType, SqlVal, SqlValRef}; #[cfg(feature = "datetime")] ...
#![type_length_limit = "1138969"] mod config; use crate::config::{get_mqtt_options, read_sensor_names, Config}; use backoff::future::retry; use backoff::ExponentialBackoff; use eyre::{eyre, Report}; use futures::stream::StreamExt; use futures::TryFutureExt; use homie_device::{HomieDevice, Node, Property}; use itertoo...
// // Copyright 2021 <NAME> // This file is part of the Ida compiler. // Ida is licensed under the BSD-3 license. See the COPYING file for more information. // use std::io; use std::io::prelude::*; use std::io::BufWriter; use std::fs::File; use parser::ltac::{LtacFile, LtacData, LtacDataType, LtacType, LtacInstr}; /...
use crate::compaction::CompactionRequest; use crate::util::{BtreeComparable, PageIterator}; use crate::version::{TableFile, Version}; use crate::{ColumnFamilyOptions, ImmutableDBOptions}; use std::cmp::Ordering; use std::collections::HashMap; use std::sync::Arc; pub struct LevelCompactionPicker { cf_opts: HashMap<...
use log; use std::collections::HashMap; use std::env; use std::fs; use std::fs::OpenOptions; use std::fs::{create_dir_all, read_dir, File}; use std::io::prelude::*; use std::io::BufWriter; use std::io::Error; use std::io::Read; use std::io::SeekFrom; use std::io::Write; use std::path::Path; use std::sync::atomic::Order...
//! Esp8266 Async Driver //! //! An async driver for the Esp8266 AT-command firmware. The driver implements the drogue-network APIs for //! WifiSupplicant and TcpStack. mod buffer; mod num; mod parser; mod protocol; mod socket_pool; use socket_pool::SocketPool; use crate::traits::{ ip::{IpAddress, IpProtocol, So...
use crate::*; use near_sdk::json_types::{WrappedBalance, WrappedDuration, WrappedTimestamp}; use near_sdk::{assert_one_yocto, Duration, Timestamp}; const MAX_DURATION_TO_START: Duration = 365 * 24 * 60 * 60 * 1_000_000_000; const MAX_DURATION: Duration = 4 * 366 * 24 * 60 * 60 * 1_000_000_000; /// Minimum duration. Us...
use super::*; use crate::{ messaging::SerialisedFrame, net::{ buffers::{BufferChunk, BufferPool, DecodeBuffer}, frames::{Frame, FramingError, Hello, Start, FRAME_HEAD_LEN}, }, }; use bytes::{Buf, BytesMut}; use mio::{net::TcpStream, Token}; use network_thread::*; use std::{ cell::RefCell...
use proc_macro2::{Ident, Span}; use quote::quote; use quote::ToTokens; use syn; use syn::{BinOp, Expr, ItemFn, Lit, Member}; use crate::proc_macro::TokenStream; // fn is_name_char(arg: char) -> bool { // match arg { // '.' | // '_' | // '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' |...
#![allow(unused_imports)] #![allow(non_camel_case_types)] #![allow(dead_code)] #![allow(non_snake_case)] use crate::vpp::mloi::*; use core::cell::Cell; use kernel::procs::{State, ProcessType, Process, FaultResponse, FunctionCall, FunctionCallSource, ProcessLoadError}; use crate::vpp::mloi::VppState::*; use crate::vpp::...
// Copyright 2019 Fullstop000 <<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 ag...
//! A woker for handle events. //! //! # EventHandle //! //! This is an important entry point to control the flow of tasks: //! //! 1. Branch of different mandated events. //! 2. A communication center for internal and external workers. pub(crate) use super::super::entity::{SharedHeader, SharedTaskWheel}; use super::r...
use std::collections::HashMap; use crate::{Color, ColorImage}; use super::{Cluster, Clusters, ClustersView, container::ClusterIndex, container::ClusterIndexElem}; #[derive(Clone)] pub struct BuilderConfig { pub(crate) diagonal: bool, pub(crate) hierarchical: u32, pub(crate) batch_size: u32, pub(crate) ...
// Copyright (c) 2020 <NAME> // // This software is released under the MIT License. // https://opensource.org/licenses/MIT use crate::common::parser::FieldParser; use crate::common::parser::{jump_newline, parse_right, take_trim_start_own}; use crate::types::{ AtomName, Helix, HelixClass, ParseFw4, Registration, Re...
use crate::generate::build_tables::item::{TokenSet, TokenSetDisplay}; use crate::generate::grammars::{LexicalGrammar, SyntaxGrammar}; use crate::generate::nfa::{CharacterSet, NfaCursor, NfaTransition}; use std::collections::HashSet; use std::cmp::Ordering; use std::fmt; #[derive(Clone, Debug, Default, PartialEq, Eq)] ...
//! Functions to communicate with a network server that provides over-the-air live update functionality. //! #![no_std] #![feature(slice_concat_ext)] #[macro_use] extern crate log; #[macro_use] extern crate alloc; extern crate smoltcp; extern crate network_manager; extern crate hpet; extern crate owning_ref; extern ...
pub mod progress { use std::io::{self, Write}; pub struct Bar { pub left_pad: usize, pub bar_width: usize, pub max: usize, } impl Bar { pub fn print(&self, i: usize) { let inverse = 1.0 / (i as f32 / self.max as f32); let progress = (self.bar_width as f32 / inverse) as usize; if self.bar_wid...
use torifune::graphics::drawable::*; use torifune::graphics::object::*; use torifune::numeric; use torifune::{core::*, sound::SoundPlayFlags}; use crate::core::util::read_from_resources_as_string; use crate::{ core::*, flush_delay_event, flush_delay_event_and_redraw_check, scene::{DelayEventList, SceneID, ...
use crate::trampoline::StoreInstanceHandle; use crate::types::matching; use crate::{ Engine, Export, Extern, ExternType, Func, Global, InstanceType, Memory, Module, Store, Table, Trap, }; use anyhow::{bail, Context, Error, Result}; use std::mem; use std::sync::Arc; use wasmtime_environ::entity::PrimaryMap; use ...
// Copyright 2020 Parity Technologies (UK) Ltd. // This file is part of Cumulus. // Tetcore 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 later ...
use num_derive::FromPrimitive; use crate::attribute::Attribute; use crate::character::character_common_data::CharacterCommonData; use crate::character::character_sub_stat::CharacterSubStatFamily; use crate::character::{CharacterConfig, CharacterName, CharacterStaticData}; use crate::character::skill_config::CharacterSk...
//! Basic data types `Player`, `Piece` and `Move` //! Also `CPosState` and `Signature` #![allow(non_snake_case)] #![allow(non_camel_case_types)] use super::fieldset::Field; use super::position::Position; use std::fmt::{Debug, Display, Formatter}; use std::path::Path; pub use Piece::*; pub use Player::*; pub type Pla...
// Copyright 2020 Parity Technologies // // 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 // except accor...
use crate::crypto_provider::get_crypto_provider; use crate::generated::ffi::*; use std::fmt; use std::os::raw::{c_char, c_int, c_void}; use std::ptr::null_mut; // Wrapper around the Signal context. pub type SignalContextPtr = *mut signal_context; #[derive(Debug)] pub struct SignalError; impl fmt::Display for SignalE...
#![allow(unused)] //! Generate the main table seen within the TUI that shows the file paths and //! tags. This is used to iterate over Row, Cell, Spans, and Span to get the //! styles for each individual tag as they're seen on the regular TUI. This part //! of the module also allows for some additional features that t...
mod attributes; use self::attributes::AttributesValidationState; use crate::{ ast, interner::StringInterner, names::Names, relations::Relations, types::Types, DatamodelError, Diagnostics, ScalarFieldType, StringId, ValueValidator, }; use schema_ast::ast::WithName; use std::collections::{HashMap, HashSet}; ///...
//! Manages pointstamp reachability within a graph. //! //! Timely dataflow is concerned with understanding and communicating the potential //! for capabilities to reach nodes in a directed graph, by following paths through //! the graph (along edges and through nodes). This module contains one abstraction //! for mana...
//! Exploration of the search space. use device::Context; use explorer::candidate::Candidate; use explorer::config::{BanditConfig, NewNodeOrder, OldNodeOrder}; use explorer::logger::LogMessage; use explorer::store::Store; use explorer::{choice, local_selection}; use itertools::Itertools; use rpds::List; use std; use s...
use std::error::Error; use std::fmt::Display; use crate::openapi::is_success; use crate::openapi::operations::*; use crate::openapi::Components; use indexmap::IndexMap; use jsonschema::JSONSchema; use nonempty::NonEmpty; use openapiv3::MediaType; use openapiv3::Operation; use openapiv3::ReferenceOr; use serde_json::Va...
/* * Copyright 2018 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...
#![allow(dead_code)] //! Utility functions for working with keys. use std::{f32, f64, i16, i32, i64, i8}; use byteorder::{BigEndian, ByteOrder, NativeEndian, WriteBytesExt}; use ieee754::Ieee754; use partition::PartitionKey; use DataType; use Error; use HashPartitionSchema; use PartitionSchema; use RangePartitionSc...
/*! # fltk-egui An FLTK backend for Egui using a GlWindow. The code is largely based on https://github.com/ArjunNair/egui_sdl2_gl modified for fltk-rs. ## Usage Add to your Cargo.toml: ```toml [dependencies] fltk-egui = "0.5" # targets egui 0.16 ``` The basic premise is that egui ...
// 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 // disclaimer. /...
//! Crate, which implements all functions required for operations with a single collection use std::{ cmp::max, collections::HashMap, fs::{create_dir_all, rename}, io, path::{Path, PathBuf}, sync::Arc, }; use crate::operations::types::PointRequest; use crate::operations::OperationToShard; use ...
//! edit-server standalone binary for web deployment. #![feature(extern_in_paths)] #![feature(proc_macro_hygiene)] #[macro_use] extern crate oatie; #[macro_use] extern crate rouille; #[macro_use] extern crate failure; #[macro_use] extern crate serde_json; use crypto::digest::Digest; use crypto::md5::Md5; use edit_co...
use crate::FieldBasedHashGadget; use algebra::fields::{tweedle::Fr, Field}; use primitives::crh::{FieldBasedHashParameters, PoseidonParameters, TweedleFrPoseidonHash}; use r1cs_core::{ConstraintSystemAbstract, ConstraintVar, LinearCombination, SynthesisError}; use r1cs_std::{ alloc::{AllocGadget, ConstantGadget}, ...
//! An interface to the Search endpoint of the ADS API. //! //! # Examples //! //! The primary interface is [`Query`], and this will generally be accessed via //! the [`crate::Ads::search`] method as follows: //! //! ```no_run //! # fn run() -> adsabs::Result<()> { //! use adsabs::Ads; //! let api_token = "ADS_API_TOKE...
use crate::path_mapper::PathMapper; use crate::shared::{AddressDebugInfo, InlineStackFrame, RangeReadRef, SymbolicationResult}; use crate::symbolicate::demangle; use addr2line::{ fallible_iterator, gimli::{self, EndianSlice, Reader, ReaderOffsetId, RunTimeEndian}, }; use fallible_iterator::FallibleIterator; use...
use std::{ any::{Any, TypeId}, borrow::Cow, result::Result as StdResult, string::String as StdString, sync::{Arc, Mutex, RwLock, RwLockReadGuard}, usize, }; use crate::base::{ ast, fnv::FnvMap, kind::{ArcKind, Kind, KindEnv}, metadata::{Metadata, MetadataEnv}, symbol::{Name,...
#![allow(unused)] #![allow(clippy::eq_op)] use ark_ff::{ fields::{FftField, Field, LegendreSymbol, PrimeField, SquareRootField}, Fp, MontBackend, MontConfig, }; use ark_serialize::{buffer_bit_byte_size, Flags, SWFlags}; use ark_std::{io::Cursor, rand::Rng}; pub const ITERATIONS: u32 = 40; fn random_negation_t...
// Copyright 2019 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::message::{Message, MessageReturn}; use crate::node::Node; use crate::types::ThermalLoad; use async_trait::async_trait; use failure::{format_err,...
//! The module with genetic algorithm implementation. //! //! # Terms //! * "chromosomes" are points in the search space. //! Usually chromosome is single value or vector of values. //! * "Fitness" is value of goal function value in genetic algorithm. //! * "Generation" is iteration number of genetic algorithm. //! * "...
use crate::MacroContext; use runestick::Span; use std::fmt; /// A single token encountered during parsing. #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Token { /// The span of the token. pub span: Span, /// The kind of the token. pub kind: Kind, } impl crate::IntoToke...
use std::cell::RefCell; use std::collections::HashSet; use std::fs::File; use std::io::{BufReader, BufWriter}; use std::rc::Rc; use failure::Error; use finalfusion::chunks::metadata::Metadata; use finalfusion::compat::text::{ReadText, ReadTextDims}; use finalfusion::compat::word2vec::ReadWord2Vec; use finalfusion::io ...
//! The RTMP Receive step registers with the RTMP server endpoint to allow publishers to connect with //! the specified port, application name, and stream key combination. Any media packets that //! RTMP publishers send in will be sent to the next steps. //! //! All media packets that come in from previous workflow st...
#![allow(dead_code)] #![allow(unused_imports)] use boulder::{Buildable, Builder, Generatable, Generator}; fn foo(a: i16) -> i16 { a + 6 } #[derive(Debug, Buildable)] pub struct Womble { #[boulder(default = "hullo")] a: String, #[boulder(default=foo(1))] b: i32, } #[derive(Debug, Buildable)] pub ...
use std::fmt; use fnv::FnvHashMap; #[cfg(feature = "graphql-parser-integration")] use graphql_parser::schema::Document; use crate::{ ast::Type, executor::{Context, Registry}, schema::meta::{Argument, InterfaceMeta, MetaType, ObjectMeta, PlaceholderMeta, UnionMeta}, types::{base::GraphQLType, name::Nam...
//! CodeBlock //! //! This module is for the CodeBlock which implements a function representation in the VM use crate::{ builtins::function::{ arguments::Arguments, Captures, ClosureFunctionSignature, Function, NativeFunctionSignature, ThisMode, }, context::StandardObjects, environment:...
//! FIXME: write short doc here use crate::{ mbe_expander::{Binding, Bindings, Fragment}, parser::{Op, RepeatKind, Separator}, subtree_source::SubtreeTokenSource, tt_iter::TtIter, ExpandError, MetaTemplate, }; use super::ExpandResult; use parser::{FragmentKind::*, TreeSink}; use syntax::{SmolStr, ...
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. use crate::{ env::{get_path_with_directory, LD_LIBRARY_PATH, PATH}, expand::Expand, fs::{list_files, write_file}, input_tester::{TestResult, Tester}, }; use anyhow::{Context, Result}; use rand::seq::SliceRandom; use rand::thread...
// Copyright 2020 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. // This is a rework of crosvm/devices/src/utils/event_loop.rs for single threaded use. // Notable changes: // * FailHandles were removed // * The W...
pub mod commands; pub mod list; pub mod unit; use std::path::{Path, PathBuf}; use libc::{c_void, sockaddr}; use once_cell::sync::OnceCell; use quick_error::quick_error; use winapi::shared::ntdef::HANDLE; use bw_dat::UnitId; pub use bw_dat::structs::*; #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct StormPl...
fn main() -> Result<(), Box<dyn std::error::Error>> { #[cfg(feature = "bin")] bin::mod_main()?; #[cfg(not(feature = "bin"))] lib::mod_main()?; Ok(()) } #[cfg(not(feature = "bin"))] mod lib { static ERROR: &str = "Please re-run with the flag --features bin"; pub struct E; impl std::fm...
use std::collections::{HashMap, HashSet}; use syntax::token::{Op, AssignOp}; use compile::{ FunctionStub, FunctionScope, TyScope, VariableScope, ReserveSymbol, }; use ir::*; use vm::{ self, Bc, Condition, CompareOp, Symbolic, Variable, }; /// A compilation error. pub type Error = String; /// A...
use super::constants::CLOSE_DISCOVERY_HANDLER_CONNECTION_CHANNEL_CAPACITY; #[cfg(any(test, feature = "agent-full"))] use super::constants::ENABLE_DEBUG_ECHO_LABEL; use akri_discovery_utils::discovery::v0::{ register_discovery_handler_request::EndpointType, registration_server::{Registration, RegistrationServer}...
/* Contiene constantes usadas en varias clases */ // Constantes para el tipo de movimiento pub const ORDINARY_MOVE: i16 = 0; pub const SHORT_CASTLE: i16 = 1; pub const LONG_CASTLE: i16 = 2; pub const EN_PASSANT: i16 = 3; pub const PROMOTION_QUEEN: i16 = 4; pub const PROMOTION_ROOK: i16 = 5; pub const PROMOTION_BISHOP:...
use buffer::CapacityError; use common::num::Cast; use format::DeltaHeader; use format::Item; use format::Warning; use format::key; use format::key_to_id; use format::key_to_type_id; use gamenet::enums::MAX_SNAPSHOT_PACKSIZE; use gamenet::msg::system; use packer::Packer; use packer::Unpacker; use packer::with_packer; us...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { _reserved_0_diepctl: [u8; 4usize], _reserved1: [u8; 4usize], #[doc = "0x08 - Device Endpoint Interrupt Register"] pub diepint: DIEPINT, _reserved2: [u8; 4usize], #[doc = "0x10 - Device Endpoint Transfer Size Register"] pub diep...
use std::{boxed::Box, ffi::{CStr/*, CString,*/}, net::{SocketAddr/*, ToSocketAddrs*/}, os::raw::c_char, pin::Pin, sync::Arc}; #[macro_use] extern crate log; extern crate log4rs; // use log::{/*debug,*/ error, info}; use base64::{decode as base64decode}; // use futures_util; use async_stream::{/*try_stream,*/ str...
use std::sync::mpsc; use std::sync::mpsc::{RecvTimeoutError, TryRecvError}; use std::sync::Arc; use std::sync::Mutex; use std::time::Duration; use anyhow::Result; use log::*; use process::Process; pub use process::{LaunchOptions, LaunchOptionsBuilder, DEFAULT_ARGS}; pub use tab::Tab; pub use transport::ConnectionClos...
// Copyright 2020 - developers of the `grammers` project. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // https://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distr...
extern crate gl; extern crate glm; extern crate sdl2; use std::collections::HashMap; use std::ffi::CString; use std::path::Path; use std::time::SystemTime; mod assets; mod input; mod maze; mod render; mod threadpool; use assets::loader::Loader; use render::shader::Program; use render::shader_manager; use render::wind...
use std::convert::TryInto; use std::convert::TryFrom; use super::lossless::subsample_size; #[derive(Debug, Clone)] pub(crate) enum TransformType { PredictorTransform { size_bits: u8, predictor_data: Vec<u32> }, ColorTransform {size_bits: u8, transform_data: Vec<u32> }, SubtractGreen, ColorIndexingTra...
use sdl2::rect::Point; use sdl2::rect::Rect; use sdl2::ttf::Font; use sdl2::ttf::Sdl2TtfContext; use sdl2::video::FullscreenType; use std::fs; use std::path::Path; use std::path::PathBuf; use std::sync::mpsc; use std::thread; use sdl2::image::LoadTexture; use sdl2::pixels::Color; use sdl2::render::{Canvas, Texture, Te...
// This file is part of Bit.Country. // Copyright (C) 2020-2021 Bit.Country. // SPDX-License-Identifier: Apache-2.0 // 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...
// Copyright 2017 The Exonum Team // // 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 i...
mod cp437; mod deflate; mod lua; mod tic_file; use anyhow::{anyhow, bail, Result}; use clap::Clap; use flate2::write::ZlibEncoder; use std::{ cmp, collections::{BTreeMap, HashSet}, path::PathBuf, process::exit, }; use std::{collections::HashMap, fs::File, io::prelude::*, sync::mpsc, time::Duration}; #...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - ISO7816 interrupt status"] pub sr: SR, #[doc = "0x04 - ISO7816 interrupt enable"] pub ier: IER, #[doc = "0x08 - ISO7816 transmit control"] pub tcr: TCR, #[doc = "0x0c - ISO7816 user control"] pub ucr: UCR, ...
#![cfg_attr(not(feature = "std"), no_std)] pub mod weights; /// Edit this file to define custom logic or remove it if it is not needed. /// Learn more about FRAME and the core library of Substrate FRAME pallets: /// https://substrate.dev/docs/en/knowledgebase/runtime/frame pub use pallet::*; pub use scale_info::TypeI...
use algebra::{Field, PrimeField, ProjectiveCurve, ToBits}; use primitives::{ crh::FieldBasedHash, signature::{ schnorr::field_based_schnorr::{FieldBasedSchnorrPk, FieldBasedSchnorrSignature}, FieldBasedSignatureScheme, }, }; use r1cs_crypto::{ crh::{FieldBasedHashGadget, TweedleFrPoseid...
mod genotypes; pub mod info; pub use self::{genotypes::read_genotypes, info::read_info}; use std::io::{self, Read}; use byteorder::{LittleEndian, ReadBytesExt}; use noodles_vcf::record::{AlternateBases, Ids, Position, QualityScore, ReferenceBases}; use super::value::read_value; use crate::{ record::{Filters, Va...
use std::{ fmt, io::{self, Write}, mem, net::Ipv4Addr, }; use crate::tlv::{Tlv, TlvReadExt, TlvWriteExt}; use byteorder::{ByteOrder, ReadBytesExt, WriteBytesExt}; use pnet::util::MacAddr; // ===== Discovery Command ===== #[derive(PartialEq, Copy, Clone, Debug)] pub enum OpnFiDiscoveryCommand { //...
use amber::console::{Console, ConsoleTextKind}; use amber::matcher::{QuickSearchMatcher, RegexMatcher, TbmMatcher}; use amber::pipeline::{Pipeline, PipelineFork, PipelineInfo, PipelineJoin}; use amber::pipeline_finder::PipelineFinder; use amber::pipeline_matcher::PipelineMatcher; use amber::pipeline_printer::PipelinePr...
use std::fmt::Display; use std::hash::Hash; use log::{error, info, warn}; use tokio::sync::mpsc; use tokio::time::{interval, Instant, Interval}; use super::commit_queue::{EnqueuedCommit, TakeOwnershipResult}; use super::{ utils, AccumulatedCommitPolicy, DataMap, DataState, InternalMessage, PendingCallback, S...
use crate::Evaluator; use crate::evaluator::CactusKevEvaluator; use std::fs::File; use std::path::Path; use std::io::prelude::*; struct DataFileGenerator { // ids: [i64;612978], ids: Vec<i64>, // hr: [i32;32487834], hr: Vec<i32>, num_ids: i32, max_id: i64, numcards: usize, max_hr...
use std::time::Duration; use crate::dataset::Individual; use crate::settings::{Simulation, Group}; #[derive(Copy, Clone, Debug)] pub struct Cell { pub red: f32, pub green: f32, pub blue: f32, pub grass: f32, } #[derive(Clone, Debug)] pub struct Map { cells: Vec<Cell>, width: u32, #[cfg(de...
// Copyright 2022 Webb Technologies 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...
# ! [ doc = r" Interrupts" ] use cortex_m::exception; use cortex_m::interrupt::Nr; use cortex_m::{Handler, Reserved}; # [ doc = r" Interrupt handlers" ] # [ repr ( C ) ] pub struct Handlers { # [ doc = "Window Watchdog interrupt" ] pub wwdg: Handler, # [ doc = "PVD through EXTI line detection interrupt" ] ...
use crate::cli::AuthFlag; use crate::models::*; use chrono::{DateTime, Datelike}; use colorsys::{Hsl, Rgb}; use handlebars::{to_json, Context, Handlebars, Helper, Output, RenderContext, RenderError}; use ini::Ini; use octocrab::Octocrab; use serde_json::Map; use std::error::Error; use std::fs::File; use std::process; u...
use std::convert::Infallible; use std::env; use std::str::FromStr; use std::time::Duration; use anyhow::Error; use carapax::{ dialogue::{ dialogue, Dialogue, DialogueResult::{self, Exit, Next}, State, }, longpoll::LongPoll, methods::SendMessage, ratelimit::{limit_all_chats, ...
// Copyright (c) The cargo-guppy Contributors // SPDX-License-Identifier: MIT OR Apache-2.0 use crate::errors::FeatureGraphWarning; use crate::graph::feature::build::FeatureGraphBuildState; use crate::graph::feature::{Cycles, FeatureFilter}; use crate::graph::{ DependencyDirection, FeatureIx, PackageGraph, Package...
use super::super::common::*; use super::super::errors::*; use super::api::CookieBuf; use super::needle::*; use super::volume_index::*; use super::superblock::*; use std::io; use std::io::{Write, Read, Seek, Cursor}; use std::collections::HashMap; use std::fs::{File, OpenOptions}; use crc32c::crc32c_append; use std::pa...
//! The [`Pantry`] is useful for temporarily storing for later use values that //! might "decay" (become unusable) over time. //! //! Create a [`Pantry`] value and use its [`store`] function to store values //! for later use. A key is provided along with the value, so that the value //! can be retrieved later using th...
use pyo3::prelude::*; use serde::de::{DeserializeSeed, Error, IgnoredAny, MapAccess, Visitor}; use serde::{Deserialize, Deserializer}; use serde_json::value::RawValue; use std::fmt; use std::sync::Arc; use super::config::Config; use super::market_definition::{MarketDefinition, MarketDefinitionKeyLine, PriceLadderDescr...
#![feature(attr_literals, custom_derive, plugin, fnbox, iterator_step_by)] #![plugin(rocket_codegen)] // Limit for error_chain #![recursion_limit = "1024"] extern crate bit_vec; #[macro_use] extern crate error_chain; extern crate rand; extern crate regex; extern crate reqwest; extern crate rocket; extern crate rocket_...
use crate::{ config::Config, message::{EditPanel, Move, OpenPanel, PanelAction, Request, Update}, store::Store, ui::panel::PanelMode, }; use chrono::Local; use crossbeam_channel::{Receiver, Sender}; use panel::Panel; use split::UnicodeSplit; use std::{ io::stdout, mem::swap, sync::{Arc, Mute...
use crate::{ point::Point, rectangle::{Quadrant, Rectangle, RectangleRelation}, spatial::Spatial, TreeNode, }; pub(crate) struct Node<T> where T: Sized, { quadrants: [Option<TreeNode<T>>; 4], bounds: Rectangle, } impl<T> Node<T> where T: Sized, { pub(crate) const fn new_bounded(bou...
use anyhow::Context; use anyhow::Result; use bevy::diagnostic::LogDiagnosticsPlugin; use bevy::ecs::system::EntityCommands; use bevy::input::system::exit_on_esc_system; #[allow(unused_imports)] use bevy::log::*; use bevy::math::Vec3Swizzles; use bevy::prelude::*; use bevy::utils::HashMap; use std::collections::BTreeMap...
//! A wrapper around the `List` widget providing the ability to select one or more items. use {Color, Positionable, Scalar, Sizeable, Ui, Widget}; use {event, graph, input, widget}; use std; /// A wrapper around the `List` widget that handles single and multiple selection logic. #[derive(Clone)] #[allow(missing_copy_...
use bevy_ecs::prelude::*; use rapier3d::prelude::*; use rapier3d::na::*; use std::path::Path; use std::fs::File; use std::io::Read; use std::time::Instant; use glfw::{Action, Context, Key}; use glam::f32::{ Mat4, Vec2, Vec3 }; use wgpu::util::DeviceExt; use bevy_ecs::world::EntityRef; use render::{ GpuDevice, Mesh...
// Symphonia // Copyright (c) 2019 The Project Symphonia Developers. // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. use symphonia_core::errors::{Result, decode_...
#![allow(clippy::cast_possible_truncation)] use crate::PolicyDecision; use anyhow::anyhow; use serde::{de::DeserializeOwned, Deserialize, Serialize}; use std::{ borrow::Cow, collections::HashMap, io::copy, mem::ManuallyDrop, string::String, sync::Arc, }; use wasmtime::{Caller, Engine, Instance, Linker, Memory, Mem...
//! Scheduling of flashcards. use std::cmp; use std::collections::{BTreeMap, HashMap, HashSet}; use rand::Rng; use serde::{Serialize, Deserialize}; use chrono; use yaml; use crate::{now, cards, settings, deck, Time}; // TODO: Proper handling of potential OOB errors happening when you mess up `Schedule` store. For /...
use super::FileMetaData; use crate::common::{Error, Result}; use crate::util::{ get_length_prefixed_slice, get_var_uint32, get_var_uint64, put_length_prefixed_slice, put_var_uint32, put_var_uint64, put_varint32varint32, put_varint32varint32varint64, put_varint32varint64, put_varint64varint64, }; use crate::...
use crate::components::comparisons::{render_lighthouse_score, Comparison}; use crate::components::container::{Container, ContainerProps}; use crate::components::info_svg::INFO_SVG; use perseus::{t, ErrorCause, GenericErrorWithCause, Html, RenderFnResultWithCause, Template}; use serde::{Deserialize, Serialize}; use std:...
// Copyright 2019 Google 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
use crate::back::write::create_informational_target_machine; use crate::{llvm, llvm_util}; use libc::c_int; use rustc_codegen_ssa::target_features::supported_target_features; use rustc_data_structures::fx::FxHashSet; use rustc_metadata::dynamic_lib::DynamicLibrary; use rustc_middle::bug; use rustc_session::config::Prin...
// Copyright (c) Facebook, Inc. and its affiliates. // // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source tree. //! An implementation of a 62-bit STARK-friendly prime field with modulus 2^62 - 111 * 2^39 + 1. //! //! All operations in this field are ...