text
stringlengths
7.05k
33.9k
use crate::prelude::*; use std::mem; pub struct Answer; const WIDTH: usize = 10; const SIDE: usize = 12; const N_TILES: usize = SIDE * SIDE; /// power of `2 >= N_TILES` const N: usize = 256; const MAX_EDGES: usize = 1 << WIDTH; /// tile width in the bitmap const W: usize = WIDTH - 2; /// pixel width of final bitmap c...
// Copyright 2015-2020 Capital One Services, 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 applicable law o...
mod call_context_manager; use crate::{CanisterQueues, NumWasmPages, PageMap, StateError}; pub use call_context_manager::{CallContext, CallContextAction, CallContextManager, CallOrigin}; use ic_base_types::NumSeconds; use ic_interfaces::messages::CanisterInputMessage; use ic_protobuf::{ proxy::{try_from_option_fiel...
// Copyright 2017 PingCAP, 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 i...
//! The structure copying is needed because we cannot impl things for foreign //! types. Naturally this is a good reason, but it means we have to copy things //! around. If the structures change, we will know about it because we use the //! from trait, and we are not allowed to skip or use different types. use std::ptr...
use std::f32; use std::path::Path; use enum_map::EnumMap; use failure::{err_msg, Error}; use tensorflow::{ Graph, ImportGraphDefOptions, Operation, Session, SessionOptions, SessionRunArgs, Status, Tensor, }; use features::{InputVectorizer, Layer, LayerLookups}; use models::tensorflow::LayerTensors; use models...
use { crate::{ast::AstIndex, ConstantIndex}, std::{convert::TryFrom, fmt}, }; /// A parsed node that can be included in the [AST](crate::Ast). /// /// Nodes refer to each other via [AstIndex]s, see [AstNode](crate::AstNode). #[derive(Clone, Debug, PartialEq)] pub enum Node { /// An Empty node, used for `()...
use crate::vm; use crate::vm::ast; use crate::vm::ast::{ Ast, AstBranch, AstBranchID, ErrPart, InferredType, IsLinked, LinkedNodeBody, Node, NodeID, NodeType, NodeTypeSource, NodeValue, TypesInferred, }; use crate::vm::ast::{NBCall, NBProcedureDeclaration}; use crate::vm::runtime::RuntimeDefinitions; use crate:...
// Copyright 2020 TiKV Project Authors. Licensed under Apache-2.0. #![feature(test)] #![feature(duration_consts_float)] #[macro_use] extern crate lazy_static; #[cfg(test)] extern crate test; #[allow(unused_extern_crates)] extern crate tikv_alloc; mod file; mod io_stats; mod metrics; mod metrics_manager; mod rate_l...
//! This module contains a `MixedRadixEvaluationDomain` for //! performing various kinds of polynomial arithmetic on top of //! fields that are FFT-friendly but do not have high-enough //! two-adicity to perform the FFT efficiently, i.e. the multiplicative //! subgroup `G` generated by `F::TWO_ADIC_ROOT_OF_UNITY` is no...
use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_index::bit_set::HybridBitSet; use rustc_infer::infer::canonical::QueryRegionConstraints; use rustc_middle::mir::{BasicBlock, Body, ConstraintCategory, Local, Location}; use rustc_middle::ty::{Ty, TypeFoldable}; use rustc_trait_selection::traits::query::dr...
use super::XMLBuilder; use super::XmlEvent; use crate::types::*; const EXPECT_MESSAGE: &str = "should write buf"; impl XMLBuilder { // i.e. <w:body... > open!(open_body, "w:body"); // i.e. <w:basedOn ... > closed_with_str!(based_on, "w:basedOn"); // i.e. <w:t ... > pub(crate) fn text(mut self,...
//! An entropy encoder. mod lazy_stream; use self::lazy_stream::*; use super::dictionary::{Fetch, LinearTable, TableRef}; use super::rw::*; use bytes::lengthwriter::LengthWriter; use bytes::varnum::WriteVarNum; use io::statistics::{Bytes, Instances, PerUserExtensibleKind, Rational}; use io::{Path, TokenWriter}; use T...
use crate::roles::actors; use crate::storage::data_object_type_registry::Trait as DOTRTrait; use crate::traits::{ContentIdExists, IsActiveDataObjectType, Members, Roles}; use parity_codec::Codec; use parity_codec_derive::{Decode, Encode}; use rstd::prelude::*; use runtime_primitives::traits::{ As, MaybeDebug, Maybe...
use crate::{ direction, event::{AnyCb, Event, EventResult, Key}, rect::Rect, view::{IntoBoxedView, Selector, SizeCache, View, ViewNotFound}, Printer, Vec2, With, XY, }; use log::debug; use std::cmp::min; use std::ops::Deref; /// Arranges its children linearly according to its orientation. /// /// #...
//! Contains an implementation of pull-based XML parser. use std::mem; use std::borrow::Cow; use std::io::prelude::*; use common::{ self, XmlVersion, Position, TextPosition, is_name_start_char, is_name_char, }; use name::OwnedName; use attribute::OwnedAttribute; use namespace::NamespaceStack; use reader:...
//! <div align="center"> //! <img alt="Rune Logo" src="https://raw.githubusercontent.com/rune-rs/rune/main/assets/icon.png" /> //! </div> //! //! <br> //! //! <div align="center"> //! <a href="https://rune-rs.github.io"> //! <b>Visit the site 🌐</b> //! </a> //! - //! <a href="https://rune-rs.github.io/book/"> ...
//! Memory visualization use sdl2; use sdl2::mouse::MouseButton; use sdl2::pixels::*; use sdl2::rect::{Point, Rect}; use sdl2::surface::Surface; use std::num::Wrapping; use super::utility::Drawable; use crate::cpu::constants::CpuState; use crate::cpu::constants::MemAddr; use crate::io::constants::*; //use cpu::memvi...
use std::{ fs::File, io::{BufReader, Read}, path::Path, sync::Arc, }; use crate::{ blend::{self, Color8}, cel::{CelCommon, CelId, CelsData, ImageContent, ImageSize}, external_file::{ExternalFile, ExternalFileId, ExternalFilesById}, layer::{Layer, LayerType, LayersData}, pixel::Pixel...
use cbindgen::{Builder, Language}; use std::{env, fs, path::PathBuf}; const PRE_HEADER: &'static str = r#" // Define the `ARCH_X86_X64` constant. #if defined(MSVC) && defined(_M_AMD64) # define ARCH_X86_64 #elif (defined(GCC) || defined(__GNUC__) || defined(__clang__)) && defined(__x86_64__) # define ARCH_X86_64 #en...
mod value_definition; mod value_type; use std::cmp::Ordering; use std::hash::Hasher; use std::path::{PathBuf, Path}; use std::str::FromStr; use chrono::{DateTime, Local}; use regex::Regex; use crate::{ util::file::cwd, lang::table::Table, lang::errors::{error, to_crush_error}, util::glob::Glob, }; us...
use core::mem::replace; use std::any::TypeId; use std::collections::{HashSet, HashMap}; use std::string::String; use pr47::data::traits::StaticBase; use pr47::data::tyck::TyckInfoPool; use pr47::data::Value; use pr47::ffi::Signature; pub use pr47::ffi::async_fn::{AsyncFunction, AsyncFunctionBase}; pub use pr47::ffi::s...
use super::helper::Float; use super::sweep_event::{ResultTransition, SweepEvent}; use geo_types::Coordinate; use std::collections::HashSet; use std::rc::Rc; fn order_events<F>(sorted_events: &[Rc<SweepEvent<F>>]) -> Vec<Rc<SweepEvent<F>>> where F: Float, { let mut result_events: Vec<Rc<SweepEvent<F>>> = Vec::n...
// Musium -- Music playback daemon with web-based library browser // 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. // A copy of the License has been included in the root of the repository. //! Logic for pl...
//! Special composed key definitions. These values are added to 0x100000. #![allow(clippy::transmute_int_to_char)] /// Contains the [`char`] constants for the special keys. pub struct NcKey; impl NcKey { pub const INVALID: char = constants::NCKEY_INVALID; ///generated interally in response to SIGWINCH pub...
// TODO: when you drop() the window, it shows a completely black screen for a split second. // Not sure what's causing it, but I don't feel like figuring it out right now. use std::ffi::{CStr, CString}; use std::os::raw::{c_int, c_void}; use std::sync::{Arc, Mutex}; use std::thread; use std::ptr::null_mut; use x11::{...
use crate::error::*; use crate::unity::{Version,Component}; use crate::unity::urls::{DownloadURL, IniUrl}; use crate::unity::hub::paths; use reqwest::Url; use std::collections::HashMap; use std::fmt; use std::fs::{DirBuilder, File}; use std::io::{self, Read, Write}; use super::MD5; use std::path::Path; use derive_deref...
// Copyright 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writi...
use std::fmt; use std::error::Error as StdError; use std::result::Result as StdResult; use serde::de; use serde_json::{self, Error as JsonError}; use url::{ParseError as UrlError, Url}; use oauth2::token::Token; pub use reqwest::{Client as HttpClient, Error as HttpError}; use auth::{AccessToken, OAuth, Permissions}; ...
use crate::error::{scanner_error, Result, ScannerErrorKind}; use std::cmp::Ordering; /// The set of tokens output by the scanner. #[derive(Debug, Clone, Eq, PartialEq)] #[allow(missing_docs)] pub enum Token { // Punctuation Semicolon, Pipe, Dot, Comma, Colon, // Parentheses OpenParenth...
use web_sys::{ CanvasRenderingContext2d, WebGlBuffer, WebGlRenderingContext, WebGlRenderingContext as GL, WebGlTexture, window, HtmlCanvasElement, HtmlElement }; use js_sys::Float32Array; use wasm_bindgen::JsCast; use wasm_bindgen::JsValue; use wasmuri_core::*; use std::cell::RefCell...
// Copyright 2021 <NAME> // Copyright 2010-2018 <NAME> and 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless ...
use bytes::Bytes; use futures::{ future::{self, BoxFuture}, ready, sink::Sink, task::{Context, Poll}, Future, FutureExt, }; use std::{ error::Error, fmt, mem::size_of, pin::Pin, sync::{ atomic::{AtomicBool, Ordering}, Arc, Weak, }, }; use tokio::sync::{mpsc, o...
// these are valid partial opcodes which needs to be combined with // constants for various size and addressing mode modifiers // to construct actual opcodes pub const OP_ABCD: u32 = 0b1100_0001_0000_0000; pub const OP_ADD: u32 = 0b1101_0000_0000_0000; pub const OP_ADDI: u32 = 0b0000_0110_0000_0000; pub const OP_ADDQ:...
//! The lexer, transforming an input string to a stream of tokens. //! //! A custom lexer is implemented in order to support arbitrary interpolated expressions, which is //! not possible using LALRPOP's generated lexer. To see why, consider the following string: //! //! ``` //! "hello, I have 1 + ${ {a = "40"}.a } + 1 ...
use crate::ast::{ BinaryOp, BindX, Binder, Binders, Constant, Datatypes, Decl, DeclX, Expr, ExprX, Exprs, Ident, MultiOp, Quant, Query, QueryX, Stmt, StmtX, Triggers, Typ, TypX, Typs, UnaryOp, }; use crate::errors::all_msgs_from_error; use crate::util::vec_map; use sise::{Node, Writer}; use std::sync::Arc; pub...
extern crate csv; extern crate gl; extern crate glfw; extern crate image; extern crate rand; extern crate rusttype; use gl::types::*; use glfw::{Action, Context, Key}; use image::{Rgba, RgbaImage}; use rand::{thread_rng, Rng}; use rusttype::{point, Font, Scale}; use std::env; use std::io::Read; struct Header { nu...
use num_derive::FromPrimitive; use crate::attribute::{Attribute, AttributeName}; use crate::character::character_common_data::CharacterCommonData; use crate::character::character_sub_stat::CharacterSubStatFamily; use crate::character::{CharacterConfig, CharacterName, CharacterStaticData}; use crate::character::skill_co...
extern crate ggez; use ggez::*; use ggez::graphics; use ggez::nalgebra as na; use ggez::input; mod body; use body::Body; mod physics; use physics::*; mod input_type; use input_type::*; use rayon::prelude::*; const G: f32 = 6.674; #[derive(Clone)] struct MainState { bodies: Vec<Body>, start_point: Point2, ...
// 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 required by applicable law or agreed to in writi...
use nom::branch::alt; use nom::bytes::complete::tag; use nom::error::context; use nom::IResult; use strum_macros::{EnumVariantNames}; use nom::multi::separated_list0; use nom::sequence::tuple; use nom::combinator::opt; #[derive(Clone, Debug, PartialEq, Eq, EnumVariantNames, Hash)] #[strum(serialize_all = "shouty_sna...
use bitpat::bitpat; use std::fmt; /* Things that need to be added to this: Some sort of sign-extension module, which modifies the incoming data using the contents of the S and H bits in an applicable instruction word (possibly in the read data register) */ /* The status register */ #[derive(Clone, Copy, Debug)] ...
use hdk::{ error::{ ZomeApiResult, ZomeApiError }, holochain_core_types::{ link::LinkMatch, entry::Entry }, holochain_persistence_api::{ cas::content::Address }, holochain_json_api::{ json::JsonString }, api::DNA_ADDRESS }; use std::co...
// Start mock ingester // Start generating logs // Start agent under flamegraph // Kill agent use std::convert::TryInto; use std::fs::File; use std::future::Future; use std::io::{BufRead, Write}; use std::net::{IpAddr, Ipv4Addr, SocketAddr, TcpListener}; use std::path::PathBuf; use std::process::Stdio; use std::sync::...
//! Layout engine. use super::{create_gui_proj_matrix, text, GuiGraph}; use crate::collections::ordered_dag::prelude::*; use crate::comp::Transform; use crate::res::DeviceDimensions; use glutin::dpi::LogicalSize; use log::warn; use nalgebra::{Matrix4, Point2, Vector2, Vector3}; use specs::prelude::*; use std::fmt; // ...
//! easyfuse: A convenient library that lets you build your own FUSE //! filesystems quickly without having to resolve all inodes //! yourself. It's meant to allow flexibility but the most important //! goal is making it easy to write idiomatic rust (an example of this //! is using the `Result` return type instead of c...
// MakAir Control UI // // Copyright: 2021, <NAME> // License: Public Domain License use std::cmp::Ordering; use conrod_core::{ color::{self, Color}, widget::{self, id::List, Id as WidgetId}, Positionable, Sizeable, Widget, }; use crate::config::environment::*; use crate::display::widget::ControlWidget; ...
use stm32f103xx::RCC; #[derive(Debug)] pub enum ClockError { SysClkOverClocking, AhbOverClocking, Apb1OverClocking, Apb2OverClocking, PllSettingFault, HsiSettingFault, HseSettingFault, SysClkSettingFault, } type ClockResult<U> = Result<U, ClockError>; #[derive(Eq, PartialEq, Copy, Cl...
#![allow(clippy::unreadable_literal)] pub mod errors; use std::collections::{HashMap, VecDeque}; use std::iter::Peekable; use std::str; use bbhash::MPHF; use failure::{Error, SyncFailure}; use lazy_static::lazy_static; use nthash::{ntf64, NtHashForwardIterator}; use crate::errors::UKHSError; lazy_static! { sta...
use crate::utils::create_hash; use core::cmp::min; use pathfinding::prelude::{absdiff, astar}; use rand::prelude::*; use std::cmp::max; const SQRT2: f32 = 1.4142135623730950488016887242097; #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum TileType { Nothing, Exit, Dirt, } impl Default for TileType { fn ...
extern crate dependy; extern crate humantime; extern crate regex; extern crate runny; extern crate systemd_parser; use std::cell::RefCell; use std::error::Error; use std::fs::File; use std::io::{BufRead, BufReader, Read}; use std::path::{Path, PathBuf}; use std::rc::Rc; use std::sync::{Arc, Mutex}; use st...
//! Implementation of procedural macro for generating type-safe bindings to an //! ethereum smart contract. #![deny(missing_docs, unsafe_code)] use ethers_contract_abigen::Source; use proc_macro::TokenStream; use proc_macro2::{Literal, Span}; use quote::{quote, quote_spanned}; use syn::spanned::Spanned as _; use syn::...
use crate::{api, env::NapiEnv, prelude::*}; use std::mem::MaybeUninit; #[repr(C)] #[derive(Clone, Copy, Debug)] pub struct JsValue(pub(crate) NapiEnv, pub(crate) napi_value); impl JsValue { /// `NapiEnv` of this `JsValue` pub fn env(&self) -> NapiEnv { self.0 } /// raw napi_value of this `JsV...
//! This implements the VCode container: a CFG of Insts that have been lowered. //! //! VCode is virtual-register code. An instruction in VCode is almost a machine //! instruction; however, its register slots can refer to virtual registers in //! addition to real machine registers. //! //! VCode is structured with trad...
/* * Copyright 2020 Draphar * * 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 writi...
// Copyright (c) 2019, Facebook, Inc. // All rights reserved. // // This source code is licensed under the MIT license found in the // LICENSE file in the "hack" directory of this source tree. use std::borrow::Cow; #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum IntKind { Dec, Hex, Oct, Bin, } ...
use core::any::Any; extern crate alloc; use alloc::collections::BTreeMap; use alloc::sync::Arc; use alloc::vec::Vec; // TODO: Think how to model this in no_std without pushing generic params everywhere use std::sync::RwLock; // TODO: Perhaps replace these with the core2 polyfills use std::io; use std::io::Read; #[c...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Flash Cache Control Register"] pub cachecfg: CACHECFG, #[doc = "0x04 - Flash Control Register"] pub flashcfg: FLASHCFG, #[doc = "0x08 - Cache Control"] pub ctrl: CTRL, _reserved3: [u8; 4usize], #[doc = "0x10...
/*! This is the Teddy searcher, but ported to AVX2. See the module comments in the SSSE3 Teddy searcher for a more in depth explanation of how this algorithm works. For the most part, this port is basically the same as the SSSE3 version, but using 256-bit vectors instead of 128-bit vectors, which increases throughput....
// Copyright (c) 2016 <NAME> // // 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. All files in the project carrying such notice may not be copied, // modified, ...
//! A structure representing a logfile, with all its related attributes. Those attributes are //! coming from the processing of the log file, every time it's read to look for patterns. use std::borrow::Cow; use std::collections::HashMap; use std::fs::File; use std::io::BufReader; use std::path::Path; use bzip2::read::...
//! multilinear polynomial represented in sparse evaluation form. use crate::evaluations::multivariate::multilinear::swap_bits; use crate::{DenseMultilinearExtension, MultilinearExtension}; use ark_ff::{Field, Zero}; use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, Read, SerializationError, Write}; use ar...
#![allow(warnings)] use core::{ cmp, convert::TryFrom, ops::Range, sync::atomic::{AtomicBool, Ordering}, }; use std::{ collections::{btree_map, BTreeMap}, fs, io::{self, Write as _}, mem, path::PathBuf, process, time::Instant, }; use anyhow::{anyhow, bail}; use arrayref::ar...
/* This tool is part of the WhiteboxTools geospatial analysis library. Authors: Dr. <NAME> Created: 10/02/2019 Last Modified: 18/01/2020 License: MIT */ use crate::lidar::*; use crate::tools::*; use std; use std::env; use std::fs::File; use std::io::prelude::*; use std::io::BufReader; use std::io::{Error, ErrorKind}; ...
use std::{ collections::{HashSet, VecDeque}, env, ffi, fs, path::Component, path::{self, Path}, }; use path::PathBuf; use super::{data, diff, Commit, Tree, DEFAULT_REPO}; /// Initialise a new repository and create a master branch. pub fn init() { data::init(); data::update_ref( &PathB...
// Copyright 2006 The Android Open Source Project // Copyright 2020 <NAME> // // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use crate::Point; use crate::fixed_point::{fdot6, fdot16, FDot6, FDot16}; use crate::math::left_shift; /// We store 1<<shift in a (sign...
use colored::*; use dialoguer::Confirm; use error::handle_rejection; use hyper::{server::conn::AddrStream, Body, Request}; use indoc::printdoc; use ipnetwork::IpNetwork; use parking_lot::Mutex; use rusqlite::Connection; use serde::{de::DeserializeOwned, Deserialize, Serialize}; use shared::{AddCidrOpts, AddPeerOpts, Io...
#![allow(clippy::assertions_on_constants)] #![allow(clippy::type_complexity)] #![allow(clippy::cognitive_complexity)] #![allow(dead_code)] #[global_allocator] static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; #[macro_use] extern crate clap; #[macro_use] extern crate derivative; #[macro_use] extern crate ...
// This file is part of Substrate. // Copyright (C) 2017-2020 Parity Technologies (UK) Ltd. // SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the F...
use std::future::Future; use std::pin::Pin; use std::sync::atomic::{AtomicBool, AtomicU8, Ordering}; use std::sync::Arc; use anyhow::Result; use bytes::Bytes; use dtls::config::ClientAuthType; use dtls::conn::DTLSConn; use sha2::{Digest, Sha256}; use srtp::protection_profile::ProtectionProfile; use srtp::session::Sess...
// Copyright (C) 2017 <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 required by applicable law or agreed to in writ...
use crate::ast; use crate::{Parse, ParseError, ParseErrorKind, Parser, Peek, Spanned}; use std::mem::take; use std::ops; /// Indicator that an expression should be parsed with an eager brace. #[derive(Debug, Clone, Copy)] pub(crate) struct EagerBrace(pub(crate) bool); impl ops::Deref for EagerBrace { type Target ...
#![allow(dead_code)] // TODO: remove use super::SymKey; use crate::err::Res; use crate::hpke::Aead as AeadId; use aead::{AeadMut, Key, NewAead, Nonce, Payload}; use aes_gcm::{Aes128Gcm, Aes256Gcm}; use chacha20poly1305::ChaCha20Poly1305; use std::convert::TryFrom; /// All the nonces are the same length. Exploit that...
/*! A tracing [Layer](`ChromeLayer`) for generating a trace that can be viewed by the Chrome Trace Viewer at `chrome://tracing`. # Usage ```no_run use tracing_chrome::ChromeLayerBuilder; use tracing_subscriber::{registry::Registry, prelude::*}; let (chrome_layer, _guard) = ChromeLayerBuilder::new().build(); tracing_s...
use crate::{ acme::AcmeHandler, health::{HealthConfig, Healthiness}, load_balancing::{ ip_hash::IPHash, least_connection::LeastConnection, random::Random, round_robin::RoundRobin, sticky_cookie::StickyCookie, LoadBalancingStrategy, }, middleware::{ authentication::Authentication, compression::Comp...
//! stm32ral module for stm32l562 /// Number of priority bits implemented by the NVIC pub const NVIC_PRIO_BITS: u8 = 3; /// Interrupt-related magic for this device pub mod interrupts; pub use self::interrupts::Interrupt; pub use self::interrupts::Interrupt as interrupt; pub use super::instances::dac; pub use super::...
use std::{ borrow::Cow, collections::{HashMap, HashSet}, sync::Arc, }; use thiserror::Error; use wgpu::{Buffer, BufferUsages, CommandEncoder}; use crate::{ compiler::{compile, CompileError, CompiledNode}, ir::{Node, NodeDefinition, NodeIdentifier, OperatorDefinition}, onnx::TensorProto, re...
use super::*; use crate::constants::*; use prisma_models::CompositeFieldRef; pub(crate) struct UpdateDataInputFieldMapper { unchecked: bool, } impl UpdateDataInputFieldMapper { pub fn new_checked() -> Self { Self { unchecked: false } } pub fn new_unchecked() -> Self { Self { unchecked...
use resource_info_table::resource_info; use reader_writer::{FourCC, Reader, Writable}; use structs::{res_id, ResId, Resource, ResourceKind}; use crate::{ pickup_meta::PickupType, starting_items::StartingItems, ResourceData, }; use std::collections::HashMap; macro_rules! def_asset_ids { (@Build { $pre...
// #![feature(core_intrinsics)] /// Provides the public Embedding interface /// Note: the API does not take a Store and returns the new Store as stated in /// the spec but takes a (possibly mutable) reference when needed extern crate core; #[macro_use] mod interpreter; mod binary; mod memmap; mod ops; pub mod runtime;...
use std::collections::HashMap; use std::env; use airtable_api::{Airtable, Record}; use chrono::{Duration, NaiveDate, Utc}; use gsuite_api::{CalendarEvent, GSuite}; use handlebars::Handlebars; use sendgrid_api::SendGrid; use crate::airtable::{AIRTABLE_DISCUSSION_TOPICS_TABLE, AIRTABLE_MEETING_SCHEDULE_TABLE}; use crat...
use crate::db::config::LEVEL_NUMBER; use crate::db::file_meta::FileMetaData; use crate::db::format::ValueType; use crate::db::iterator::LevelFileNumIter; use crate::db::key::{parse_internal_key, InternalKey, LookUpKey, ParsedInternalKey}; use crate::db::options::Options; use crate::db::version_manager::{find_file, max_...
mod boolean; mod integer; mod null; mod sequence; mod utf8_string; use crate::misc::{Length, WriteExt}; use crate::ser::boolean::Boolean; use crate::ser::integer::UnsignedInteger; use crate::ser::null::Null; use crate::ser::sequence::Sequence; use crate::ser::utf8_string::Utf8String; use crate::{Asn1DerError, Asn1RawD...
// This parses the ops.pbtxt file in TensorFlow and returns a list of op definitions. This is // currently implemented directly with nom to parse the text proto, but ideally this would use a // proto library with support for parsing text protos. use crate::protos::AttrValue; use crate::protos::AttrValue_ListValue; use...
use std::marker::PhantomData; use crate::{ type_level::impl_enum::{Implemented, Unimplemented}, GetStaticEquivalent, InterfaceType, StableAbi, }; //////////////////////////////////////////////////////////////////////////////// #[repr(C)] #[derive(StableAbi)] #[sabi(impl_InterfaceType( Send, Sync, ...
use std::env; use std::fmt::Write as _; use std::io; use std::panic; use std::process::exit; use std::thread; use structopt::StructOpt; use nntp_rs::config; use nntp_rs::dns; use nntp_rs::history::{self, History, MLockMode}; use nntp_rs::ioerr; use nntp_rs::logger::{self, LogTarget}; use nntp_rs::nntp_client; use nnt...
/* This tool is part of the WhiteboxTools geospatial analysis library. Authors: Dr. <NAME> Created: 17/02/2019 Last Modified: 17/02/2019 License: MIT */ use crate::raster::*; use crate::structures::Array2D; use crate::tools::*; use num_cpus; use std::env; use std::f64; use std::io::{Error, ErrorKind}; use std::path; u...
use glib::prelude::*; use glib::subclass::prelude::*; use gst::prelude::*; use gst::subclass::prelude::*; use gst::{gst_debug, gst_info}; use gst_base::subclass::prelude::*; use opencv::{ core::{self, Mat, ToOutputArray, UMat, UMatUsageFlags}, imgcodecs, imgproc, prelude::*, types, Result, }; use atomi...
//! Manages the spawning of tasks which process the various work queues in //! the system, as well as notifying subsequent queue processors to pick up the //! work that was left off. //! //! The following table lays out the queues and the workflows that consume them, //! as well as the follow-up workflows. A "source" q...
use crate::event::*; use crate::board_message::*; use crate::console::*; use zzt_file_format::{WorldHeader, BoardMetaData}; use zzt_file_format::dosstring::DosString; use num::FromPrimitive; /// When a text input is open in the side bar, this represents the purpose of the input. #[derive(Clone)] pub enum TextInputMod...
// Copyright (c) Facebook, Inc. and its affiliates. use anyhow::{Context, Result}; use log::{debug, error, info, warn}; use std::collections::HashSet; use std::sync::{Arc, Mutex}; use std::thread::sleep; use std::time::{Duration, Instant}; use systemd::UnitState as US; use util::*; use rd_agent_intf::{RunnerState, Sli...
//! # Data types supported by Polars. //! //! At the moment Polars doesn't include all data types available by Arrow. The goal is to //! incrementally support more data types and prioritize these by usability. //! //! [See the AnyType variants](enum.AnyType.html#variants) for the data types that //! are currently suppo...
use crate::{ expr::{Expr, Index, Value}, sprite::Sprite, statement::Statement, }; use serde::Deserialize; use smol_str::SmolStr; use std::{ cell::{Cell, RefCell}, cmp, collections::HashMap, io::Write, ops, time, }; use thiserror::Error; #[derive(Debug, Deserialize)] pub struct VM { ...
//! The recovery library contains several functions and wrappers of tools useful //! to subnet recovery, such as `ic-admin` proposals, state up- and download, //! state replay, restart of nodes, etc. The library is designed to be usable by //! command line interfaces. Therefore, input arguments are first captured and /...
// Copyright (c) SimpleStaking, Viable Systems and Tezedge Contributors // SPDX-License-Identifier: MIT use std::process::ExitStatus; use std::sync::Arc; use std::{ops::ControlFlow, os::unix::prelude::ExitStatusExt}; use crypto::hash::BlockHash; use nix::{ sys::signal::{self, Signal}, unistd::Pid, }; use slo...
#![allow(dead_code)] use std::convert::{TryFrom, TryInto}; use std::io; use std::ops::{Deref, DerefMut}; use std::sync::Arc; use rustls::internal::msgs::codec::Reader; use rustls::internal::msgs::message::{Message, OpaqueMessage, PlainMessage}; use rustls::server::AllowAnyAuthenticatedClient; use rustls::Connection; ...
// 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 { anyhow::Error, carnelian::{ make_app_assistant, AnimationMode, App, AppAssistant, FrameBufferPtr, Point, Size, ViewAssistant,...
#![no_main] #![no_std] extern crate panic_halt; use core::{ cell::RefCell, fmt::{ self, Write as _, }, str::from_utf8, }; use cortex_m::{ interrupt::Mutex, singleton, }; use cortex_m_rt::entry; use gnat::hal::{ prelude::*, gpio::{ Output, PushPull, ...
// Copyright © 2018 <NAME> - Piemyth // [This work is licensed under the "BSD 2-Clause License"] // Please see the file LICENSE in the source // distribution of this software for license terms. extern crate find_folder; extern crate glutin_window; extern crate graphics; extern crate opengl_graphics; extern crate pisto...
//- // Copyright 2017, 2018, 2019 The proptest developers // // 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 distrib...