text
stringlengths
7.05k
33.9k
// Copyright (c) 2016 The vulkano developers // 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. All files in the project carrying such // notice may not be ...
// Copyright (c) 2017 <NAME>, RWTH Aachen University // 2018 <NAME>, RWTH Aachen University // // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // http://opensource.org/licenses/MIT>, at your option. This fi...
//! Main writer API to write record batches to Delta Table //! //! Writes Arrow record batches to a Delta Table, handling partitioning and file statistics. //! Each Parquet file is buffered in-memory and only written once `flush()` is called on //! the writer. Once written, add actions are returned by the writer. It's ...
use super::math_utilities::get_bit_width_from; use crate::ir::traversal::{Action, Named, VisResult, Visitor}; use crate::ir::{self, LibrarySignatures}; use crate::{build_assignments, guard, structure}; use itertools::Itertools; use std::{cmp, rc::Rc}; #[derive(Default)] /// Optimized lowering for control statements th...
use std::{ cmp, collections::{BTreeMap, VecDeque}, mem, ops::{Index, IndexMut}, time::{Duration, Instant}, }; use fxhash::FxHashSet; use super::assembler::Assembler; use crate::{ crypto, crypto::Keys, frame, packet::SpaceId, range_set::ArrayRangeSet, shared::IssuedCid, StreamId, VarInt, };...
// Copyright 2018 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...
//! The high-level replica object methods. //! //! Replica is a logical data volume exported over nvmf (in SPDK terminology //! an lvol). Here we define methods for easy management of replicas. use std::ffi::{c_void, CStr, CString}; use futures::channel::oneshot; use nix::errno::Errno; use rpc::mayastor as rpc; use s...
//! Render README files to HTML. use ammonia::{Builder, UrlRelative, UrlRelativeEvaluate}; use comrak::nodes::{AstNode, NodeValue}; use htmlescape::encode_minimal; use std::borrow::Cow; use std::path::Path; use swirl::PerformError; use url::Url; use crate::background_jobs::Environment; use crate::models::Version; //...
use imgref::Img; use rav1e::prelude::*; use rgb::RGB8; use rgb::RGBA8; /// See [`Config`] #[derive(Debug, Copy, Clone)] pub enum ColorSpace { YCbCr, RGB, } /// Encoder configuration struct /// /// See [`encode_rgba`](crate::encode_rgba) #[derive(Debug, Copy, Clone)] pub struct EncConfig { /// 0-100 scale ...
use rustc_hir as hir; use rustc_index::vec::Idx; use rustc_infer::infer::{InferCtxt, TyCtxtInferExt}; use rustc_middle::mir::Field; use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_middle::ty::{self, AdtDef, Ty, TyCtxt}; use rustc_session::lint; use rustc_span::Span; use rustc_trait_selection::traits::pred...
// process.rs // Kernel and user processes // <NAME> // 27 Nov 2019 use crate::{ cpu::{get_mtime, CpuMode, Registers, TrapFrame}, fs::Inode, page::{dealloc, unmap, zalloc, Table}, }; use crate::lock::Mutex; use alloc::{ collections::{vec_deque::VecDeque, BTreeMap}, string::String, }; use core::ptr...
use bytemuck::cast_slice; use usb_device::{ class_prelude::*, endpoint::{Endpoint, Out, In} }; use crate::hal::pac; use crate::uac::{descriptors::{AudioControlAllocator, descriptor_type::CS_INTERFACE, feature_unit_control_selector::{FU_MUTE_CONTROL, FU_VOLUME_CONTROL}, clock_source_control_selectors}, request...
use cosmwasm_std::{ entry_point, from_binary, to_binary, Addr, Api, Binary, CosmosMsg, Decimal, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult, Uint128, WasmMsg, }; use cw20::{Cw20ExecuteMsg, Cw20ReceiveMsg}; use cw2::set_contract_version; use mars_periphery::lp_staking::{ ConfigResponse, C...
//! This module defines the trait `FiniteElement`, and provides methods to //! solve finite element systems. //! //! # Example //! ``` //! use finiteelement::*; //!//Define a struct that implements the FiniteElement trait //! //! //!#[derive(Clone)] //!pub struct Spring { //! pub a: usize, //! pub b: usize, //! ...
use std::convert::TryInto; use std::env; use std::path::PathBuf; use std::process::{self, Command}; use anyhow::{Context, Result}; use clap::Parser; use fs_err as fs; use indicatif::{MultiProgress, ProgressBar, ProgressStyle}; use xwin::util::ProgressTarget; /// Compile a local package and all of its dependencies #[d...
#![deny(missing_docs, unsafe_code)] //! Implementation of procedural macro for generating type-safe bindings to an //! ethereum smart contract. extern crate proc_macro; mod spanned; use crate::spanned::{ParseInner, Spanned}; use ethcontract_common::abi::{Function, Param, ParamType}; use ethcontract_common::abiext::...
use super::{InlineAsmArch, InlineAsmType}; use crate::spec::Target; use rustc_macros::HashStable_Generic; use std::fmt; def_reg_class! { X86 X86InlineAsmRegClass { reg, reg_abcd, reg_byte, xmm_reg, ymm_reg, zmm_reg, kreg, } } impl X86InlineAsmRegClass { ...
/* This tool is part of the WhiteboxTools geospatial analysis library. Authors: Dr. <NAME> Created: 19/07/2017 Last Modified: 30/01/2020 License: MIT */ use crate::raster::*; use crate::tools::*; use num_cpus; use std::env; use std::f64; use std::io::{Error, ErrorKind}; use std::path; use std::sync::mpsc; use std::syn...
#![deny(warnings)] #![cfg_attr(test, feature(proc_macro_hygiene))] #![cfg_attr(not(feature = "std"), no_std)] #[cfg(test)] mod mock; #[cfg(test)] mod tests; #[cfg(test)] extern crate mocktopus; #[cfg(test)] use mocktopus::macros::mockable; mod ext; pub mod types; use crate::types::{PolkaBTC, Redeem, DOT}; use bitc...
use super::CliError; use crate::base64; use crate::xor::fixed_xor; use openssl::symm::{Cipher, Crypter, Mode}; use rand::Rng; use std::collections::HashMap; use std::error::Error; pub fn pad(input: &[u8], length: usize) -> Vec<u8> { if input.len() >= length { return input.to_vec(); } let mut output...
// Copyright 2020 The Matrix.org Foundation C.I.C. // // 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...
use strum_macros::{Display, EnumString}; use crate::context::Context; /// Status register flags #[derive(Clone, Copy, PartialEq, Eq, Debug, EnumString)] #[strum(serialize_all = "lowercase")] pub enum SFlags { /// Carry C, /// Zero Z, /// Negative N, /// Twos complement overflow V, ...
use winapi::shared::windef::HWND; use winapi::shared::minwindef::{LPARAM, WPARAM}; use winapi::um::winuser::{WS_VISIBLE, WS_DISABLED, WS_TABSTOP}; use crate::win32::base_helper::{check_hwnd, to_utf16, from_utf16}; use crate::win32::window_helper as wh; use crate::{Font, NwgError}; use super::{ControlHandle, ControlBase...
use crate::math::{decimal_multiplication, decimal_subtraction, reverse_decimal}; use crate::msg::{ Cw20HookMsg, HandleMsg, MigrateMsg, PoolResponse, QueryMsg, ReverseSimulationResponse, SimulationResponse, }; use crate::state::{read_pair_info, store_pair_info}; use cosmwasm_std::{ from_binary, log, to_bina...
//! Combines sequences of arithmetic or logical instructions into single instructions. //! For every instruction, try to combine one of its operands into itself. This //! transforms linear data-dependency chains into trees. use crate::analysis::analyzer::{ Action, Analyzer, AnalyzerInfo, AnalyzerKind, AnalyzerResu...
mod hardware_breakpoint; mod memory; mod readmem; use crate::target::thread::Thread; use crate::target::unix::{self, UnixTarget}; use nix::sys::ptrace; use nix::unistd::{getpid, Pid}; use procfs::process::{Process, Task}; use procfs::ProcError; use std::{ ffi::CString, fs::File, io::{BufRead, BufReader}, }...
// 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 crate::bounding_box::BoundingBox; use crate::shape::group::GroupShape; use crate::shape::shape::Shape; use crate::shape::smooth_triangle::SmoothTriangle; use crate::shape::triangle::Triangle; use crate::tuple::Tuple; use std::collections::hash_map::HashMap; use std::fmt::{self, Display, Formatter}; use std::io::{se...
//! # ASI-CORE-0 //! //! An agent architecture candidate core for Artificial Super Intelligence (ASI). //! //! This library contains a set of structs and traits useful for programming agents. //! It is designed for agents that must deal with real time concurrency, delays and failures. //! In this design, cognitive capa...
//! Contains structs for representing tables of genotype probabilities, as well as estimation of //! genotype priors. use bio::stats::*; use errors::*; use hashbrown::HashMap; //use util::*; #[derive(Debug, Clone, Copy, Eq, PartialEq)] pub struct Genotype(pub u8, pub u8); #[derive(Debug, Clone)] pub struct Genotype...
//! This module implements the PATA interface for hard drives. //! The PATA interface is an old, deprecated interface that has been replaced by the SATA //! interface. //! ATA devices may be detected by the PCI, but if not, it doesn't mean that they are not present. //! The disk(s) may instead use the standardized IO p...
use num_derive::FromPrimitive; use crate::attribute::{Attribute, AttributeName}; use crate::character::character_sub_stat::CharacterSubStatFamily; use crate::character::{CharacterConfig, CharacterName, CharacterStaticData}; use crate::character::character_common_data::CharacterCommonData; use crate::character::skill_co...
extern crate hacl_star; use std::mem; use super::CryptoResolver; use params::{DHChoice, HashChoice, CipherChoice}; use types::{Random, Dh, Hash, Cipher}; use self::hacl_star::curve25519::{self, SecretKey, PublicKey}; use self::hacl_star::sha2::{Sha256, Sha512}; use self::hacl_star::chacha20poly1305; use byteorder::{B...
#![allow(dead_code)] use std::collections::*; use net::*; use std; // Terms of the Abstract Calculus. #[derive(Clone, Debug)] pub enum Term { // Abstractions (affine functions). Lam {nam: Vec<u8>, bod: Box<Term>}, // Applications. App {fun: Box<Term>, arg: Box<Term>}, ...
use crate::Opt; use metagoblin::elf; use crate::format::*; use anyhow::Error; use prettytable::Cell; use prettytable::Row; use scroll::ctx::StrCtx; use scroll::Pread; use std::io::Write; use termcolor::Color::*; use termcolor::*; use crate::elf::dynamic; use crate::elf::header; use crate::elf::program_header; use cra...
use crate::model::model::{Model, Vector2D, Field, FieldType, Record}; use std::collections::{HashMap, HashSet}; use crate::model::datatypes::reference::REFERENCE_TYPE; use crate::image::ImageView; use std::collections::hash_map::Entry; use crate::model::datatypes::DEFAULT_TYPE; use tokio::sync::mpsc::{UnboundedSender};...
// Copyright (c) The Libra Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::tests::mock_storage::MockStorage; use crate::{ executor_proxy::ExecutorProxyTrait, PeerId, StateSyncClient, StateSynchronizer, SynchronizerState, }; use anyhow::{bail, Result}; use config_builder::util::get_test_conf...
// Copyright 2015-2019 Parity Technologies (UK) Ltd. // This file is part of Parity Ethereum. // Parity Ethereum is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at yo...
use crate::trampoline::StoreInstanceHandle; use crate::types::matching; use crate::{ Engine, Export, Extern, Func, Global, InstanceType, Memory, Module, Store, Table, Trap, }; use anyhow::{bail, Context, Error, Result}; use std::mem; use std::rc::Rc; use wasmtime_environ::entity::PrimaryMap; use wasmtime_environ::w...
use std::{error, fmt, io, thread, time}; mod commands { /// 10.1.1 Set Column Address /// Note: Each pixel takes 4 bits in display memory so `(end-start)` should be `h_pixels/2`. /// /// # Arguments /// * start: `u8` Column start address of display data RAM. /// * end: `u8` Column end address of display d...
use std::cell::{Cell, RefCell}; use std::collections::{HashMap, HashSet}; use std::error; use std::fmt; use std::rc::Rc; use crate::ast; use crate::core::*; use crate::spans::{Span, SpannedError as SyntaxError}; type Result<T> = std::result::Result<T, SyntaxError>; #[derive(Clone)] enum Scheme { Mono(Value), ...
#![deny(clippy::all)] #![deny(clippy::cargo)] #![warn(clippy::pedantic)] #![allow(clippy::cast_sign_loss)] #![allow(clippy::missing_errors_doc)] use chunk::{AudioType, Audo, BackgroundEntry, Bgnd, Font, Gen8, Optn, PNGState, Sond, SoundEntry, SpriteEntry, SpriteState, Sprt, TextureEntry, Tpag, Txtr}; use image::{Gene...
use std::collections::HashMap; use std::process::Command; use anyhow::{anyhow, Result}; use chrono::{DateTime, Local, NaiveDateTime, Utc}; use clap::{App, Arg}; use colored::Colorize; use extend::ext; use itertools::Itertools; use once_cell::sync::Lazy; use regex::Regex; use reqwest::blocking::{Client, ClientBuilder};...
// //! Copyright 2020 Alibaba Group Holding Limited. //! //! Licensed under the Apache License, Version 2.0 (the "License"); //! you may not use this file except in compliance with the License. //! You may obtain a copy of the License at //! //! http://www.apache.org/licenses/LICENSE-2.0 //! //! Unless required ...
use std::fmt; use lazy_static::lazy_static; use log::debug; #[cfg(all(feature = "opencl", feature = "cuda"))] use log::warn; use std::convert::TryFrom; use std::mem; use crate::error::{GPUError, GPUResult}; #[cfg(feature = "cuda")] use crate::cuda; #[cfg(feature = "opencl")] use crate::opencl; /// The UUID of the ...
use crate::effect::Effector; use crate::enforcer::Enforcer; use crate::persist::Adapter; use crate::rbac::RoleManager; use std::collections::HashMap; impl<A: Adapter, RM: RoleManager + Send + 'static, E: Effector> Enforcer<A, RM, E> { /// Get the list of roles for `user`. pub fn get_roles_for_user(&self, user:...
/* * Copyright 2021 <NAME> <<EMAIL>> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
#![no_std] #![warn(unused_extern_crates)] /// Enigma runtime implementation #[macro_use] extern crate sgx_tstd as std; extern crate sgx_types; extern crate sgx_trts; #[macro_use] extern crate serde_json; #[macro_use] extern crate enigma_tools_t; extern crate enigma_crypto; extern crate enigma_types; extern crate json...
use std::collections::VecDeque; use skulpin::skia_safe::canvas::{SaveLayerRec, SrcRectConstraint}; use skulpin::skia_safe::gpu::SurfaceOrigin; use skulpin::skia_safe::{ image_filters::blur, BlendMode, Budgeted, Canvas, Color, Image, ImageInfo, Paint, Point, Rect, Surface, }; use super::animation_utils::*; use...
use albedo_backend::{shader_bindings, GPUBuffer, UniformBuffer}; use albedo_rtx::passes::{ AccumulationPass, BlitPass, GPUIntersector, GPURadianceEstimator, GPURayGenerator, }; use albedo_rtx::renderer::resources; use winit::{ event::{self}, event_loop::EventLoop, }; mod gltf_loader; use gltf_loader::loa...
//! This module contains all the tools and functions that integrate with the clients database //! for the exit, which is most exit logic in general. Keep in mind database connections are remote //! and therefore synronous database requests are quite expensive (on the order of tens of milliseconds) use crate::rita_comm...
// Copyright (c) The Starcoin Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_vault_config::AccountVaultConfig; use crate::helper::{load_config, save_config}; use crate::sync_config::SyncConfig; use anyhow::{ensure, format_err, Result}; use git_version::git_version; use once_cell::sync::Laz...
pub mod copy; pub mod http; #[cfg(feature = "score_script")] use rlua::prelude::*; pub mod socks5; use log::debug; use parking_lot::{Mutex, RwLock}; use serde::{Serialize, Serializer}; use serde_derive::Serialize; use std::{ cmp, collections::HashSet, fmt, hash::{Hash, Hasher}, io, net::{IpAddr,...
#![deny(unsafe_code)] //#![deny(warnings)] #![no_main] #![no_std] #![allow(non_snake_case)] #[allow(unused_imports)] use panic_semihosting; use rtic::cyccnt::U32Ext; use asm_delay::{bitrate, AsmDelay}; use embedded_hal::digital::v2::OutputPin; use stm32f1xx_hal::{ gpio::gpioa::*, gpio::*, pac, prel...
use crate::{ config::ResourceType, model::{CachedGuild, CachedPresence}, InMemoryCache, UpdateCache, }; use dashmap::DashMap; use std::{collections::HashSet, hash::Hash}; use twilight_model::{ gateway::payload::incoming::{GuildCreate, GuildDelete, GuildUpdate}, guild::Guild, id::{marker::GuildMa...
// Copyright 2021 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use crate::fs::FdEvents; use crate::logging::*; use crate::signals::SignalState; use crate::task::Task; use crate::types::Errno; use crate::types::*; use f...
pub mod cfg; mod diags; mod graph; use self::cfg::{TreeSkip, ValidConfig}; use crate::{ diag::{self, CfgCoord, FileId, KrateCoord}, Kid, Krate, Krates, LintLevel, }; use anyhow::Error; use semver::{Version, VersionReq}; use std::{cmp::Ordering, fmt}; #[derive(Eq)] #[cfg_attr(test, derive(Debug))] pub struct K...
use crate::common::ScaledFloat; use super::SourceChromaticities; pub(crate) struct ImageExpected<'a, R>{ pub path: &'a str, pub expected: Option<R> } pub(crate) fn for_image_gamma()->Vec<ImageExpected<'static, ScaledFloat>>{ vec![ ImageExpected{path:"tests/pngsuite/f00n0g08.png",expected: None}, ...
use super::{File, FileId}; use drive3; use failure::{err_msg, Error}; use fuse::{FileAttr, FileType}; use id_tree::InsertBehavior::*; use id_tree::MoveBehavior::*; use id_tree::RemoveBehavior::*; use id_tree::{Node, NodeId, Tree, TreeBuilder}; use std::collections::HashMap; use std::collections::LinkedList; use std::fm...
/*! A pure-Rust library to work with Linux capabilities. It provides support for manipulating capabilities available on modern Linux kernels. It supports traditional POSIX sets (Effective, Inheritable, Permitted) as well as Linux-specific Ambient and Bounding capabilities sets. ```rust type ExResult<T> = Result<T, Bo...
#[macro_use] extern crate quicli; use quicli::prelude::*; use std::collections::{HashMap, HashSet}; use std::fs::{self, File}; use std::io::prelude::*; use std::io::Write; use std::path::{Path, PathBuf}; use std::process::Command; #[derive(Debug)] struct ExampleEvent { name: String, content: String, event...
pub mod memreader; pub mod windows; use std::fs::File; use std::io::{Read, Write}; use std::ops::Range; use std::collections::{HashSet, HashMap}; use crate::memreader::{MemReader, Address}; use crate::windows::*; /// Get a HashMap of the current user modules key'd by their address range with /// value of their base...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Version ID Register"] pub verid: VERID, #[doc = "0x04 - Parameter Register"] pub param: PARAM, _reserved2: [u8; 8usize], #[doc = "0x10 - Control Register"] pub cr: CR, #[doc = "0x14 - Status Register"] pub sr: SR, #[doc...
extern crate fnv; use fnv::FnvHashMap; use std::env; use std::io::BufReader; use std::io::BufRead; use std::fs::File; static DEBUG: bool = false; static DEBUG_CELL: &str = "ACGGGTCGTTCCACGG-1"; fn main() { let args: Vec<String> = env::args().collect(); let calls_file = &args[1]; let cluster_file = &args[2...
#![cfg_attr(test, feature(test))] extern crate itertools; #[macro_use] extern crate combine; extern crate prettytable as pt; extern crate chrono; extern crate serde; extern crate rmp_serde; extern crate im; extern crate rusqlite; extern crate mysql; extern crate log; extern crate lru_cache; extern crate snap; ext...
#![deny(clippy::unimplemented, clippy::unwrap_used, clippy::ok_expect)] #[cfg(feature = "visualizer")] mod visualizer; #[cfg(feature = "visualizer")] pub use visualizer::AllocatorVisualizer; use super::allocator; use super::allocator::AllocationType; use ash::vk; use log::{debug, warn, Level}; use std::fmt; use crat...
// Copyright (c) 2018-2021 The MobileCoin Foundation //! Server object containing a view node //! Constructible from config (for testability) and with a mechanism for //! stopping it use crate::{ block_tracker::BlockTracker, config::MobileAcctViewConfig, counters, db_fetcher::DbFetcher, fog_view_service::FogV...
//! Provides an implementation of the [canonical Huffman] encoder. //! //! Encoding is relatively easy since we are replacing the individual characters //! with the Huffman code. We add an EOS sign at the end to always fill the //! entire octet. //! //! The Huffman encoder implementation illustration: //! //! ```txt...
use crate::{ polynomial::DensePolynomial, rational_expression::RationalExpression, trace_table::TraceTable, }; use std::{cmp::min, ops::Neg, prelude::v1::*}; use tiny_keccak::Keccak; use zkp_macros_decl::field_element; use zkp_primefield::{invert_batch_src_dst, FieldElement, Inv, One, Pow, Root, Zero}; use zkp_u256...
// 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::directory_broker, crate::model::{ self, addable_directory::{AddableDirectory, AddableDirectoryWithResult}, err...
use super::{TestStateEntry, TestStateEntryData}; use crate::{ cell::{Cell, RefCell}, collections::{btree_map, BTreeMap, HashMap as Map, VecDeque}, rc::Rc, Box, StateEntryId, StateError, Vec, }; const BRANCHING_FACTOR: usize = 16; pub(crate) type Index = usize; #[derive(Debug)] pub(crate) struct State...
//! # Domafic - Safe, high-performance, universal web applications //! //! Domafic is a library for building templates and interactive web applications. Applications //! built in Domafic can be rendered server-side and used in front-end web servers, but they can //! also be deployed directly to the client using asm.js ...
extern crate fixedbitset; use std::cell::RefCell; use std::collections::HashMap; use std::collections::HashSet; use std::rc::Rc; use crate::charclasses::CharClasses; use crate::charclasses::Interval; use crate::dfa::DFA; use crate::scanner::RepetitionKind; use crate::scanner::{Action, IRKind, IR}; use self::fixedbit...
/* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not u...
use std::fmt; use std::iter::Peekable; use std::result::Result; use std::str::Chars; use crate::time::Time; #[derive(Clone, PartialEq, Eq, Debug)] pub enum Token { Hyphen, Number(String), Colon, FullStop, S, } impl fmt::Display for Token { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), f...
#![allow(dead_code)] use super::super::constant::Value; use super::super::importer::{Config, ImportKey, Importer}; use super::super::objects::{DeclInfoKey, ObjKey, PackageKey, ScopeKey, TCObjects, TypeKey}; use super::super::operand::OperandMode; use super::super::selection::Selection; use super::interface::IfaceInfo; ...
use std::f32::consts::{FRAC_PI_2, PI}; use std::time::Instant; use debug_ui::EguiGlium; use graphics::{Colors, DirectionalLight, draw_params, glium, GVec3, load_glsl, load_png_texture, load_tif_texture, Material, PointLight, SpotLight, Vertex}; use graphics::glium::glutin::dpi::{PhysicalPosition, PhysicalSize, Size}; ...
use std::borrow::Cow; use std::cell::RefCell; use std::collections::HashMap; use std::rc::Rc; use ckb_vm::decoder::{build_decoder, Decoder}; use ckb_vm::instructions::instruction_length; use ckb_vm::machine::{DefaultMachine, DefaultMachineBuilder}; use ckb_vm::memory::Memory; use ckb_vm::registers::{A0, SP}; use ckb_v...
use crate::game::Game; use crate::renderer::open_gl; use logger::*; use std::lazy::SyncLazy; use std::os::raw::{c_int, c_uint}; use std::sync::Mutex; use std::{error::Error, mem::MaybeUninit}; use std::{ ffi::{c_void, CStr, CString}, ptr::addr_of_mut, }; use x11::xlib; static ASPECT_RATIO: SyncLazy<Mutex<f32>>...
/* * Copyright 2019 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
use serde::{Serialize, Deserialize}; use serde_json::Value; use std::fs::File; use std::io::{BufReader, Read}; use std::path::Path; use byte_unit::Byte; use tracing::{info, error}; use rand::Rng; use url::form_urlencoded::byte_serialize; use crate::algorithm; //refresh interval const NEVER: u8 = 0; const TIMED_OR_AFTE...
use crate::bits::*; use crate::bytes::{Address, Bytes}; use crate::errors::{FormatError, RuntimeError}; use crate::version::*; use std::cell::RefCell; use std::rc::Rc; pub struct ZString(Vec<u8>); impl From<&[u8]> for ZString { fn from(bytes: &[u8]) -> ZString { ZString(bytes.to_vec()) } } impl ZStri...
use crate::{Affinity, AffinityParams, Availability, DaySchedule, UserId, WeekSchedule}; use chrono::prelude::*; use chrono::Duration; use serde::{Deserialize, Serialize}; struct AffinityMatrix(usize, Vec<Option<Affinity>>); impl std::ops::Index<(UserId, UserId)> for AffinityMatrix { type Output = Option<Affinity>...
use std::collections::{BTreeMap, VecDeque}; use std::marker::PhantomData; use std::{fmt::Write, mem}; use bevy::ecs::schedule::IntoSystemDescriptor; use bevy::{ app::{EventReaderState, EventWriterState, Events}, ecs::system::{ LocalState, ResMutState, ResState, Resource, SystemMeta, SystemParam, System...
use std::collections::{HashMap, HashSet}; use std::sync::Arc; use sha3::{Digest, Sha3_256}; use tokio::sync::{Mutex, oneshot}; use tokio::sync::mpsc::{channel, Sender}; use crate::{leader, net}; use crate::leader::NodeOutput; use crate::net::utils::*; use crate::storage::partition::{PartitionTable, calculate_partitio...
use crate::{ abc_wrappers::DiatonicPitchClass, accidentals::KeySignatureMap, errors::AbcParseError, grammar::{abc_key_signature, KeySignatureSymbol}, }; use abc_parser::datatypes::{ Accidental::{self, DoubleFlat, DoubleSharp, Flat, Sharp}, Note::{A, B, C, D, E, F, G}, }; use anyhow::Result; use ...
use crate::cx::*; use std::ffi; use winapi::shared::{dxgiformat}; use winapi::um::{d3d11, d3dcommon}; use wio::com::ComPtr; #[derive(Clone)] pub struct CxPlatformShader { pub geom_vbuf: D3d11Buffer, pub geom_ibuf: D3d11Buffer, pub pixel_shader: ComPtr<d3d11::ID3D11PixelShader>, pub vertex_shader: ComPt...
use crate::cli::InitCommand; use crate::utils::{ defaults, program_type::{ProgramType, ProgramType::*}, SWAY_GIT_TAG, }; use anyhow::{Context, Result}; use forc_util::{println_green, validate_name}; use serde::Deserialize; use std::fs; use std::fs::File; use std::io::{Read, Write}; use std::path::{Path, Pat...
use std::sync::atomic::{AtomicBool, AtomicU8, Ordering}; use std::{collections::HashMap, marker::PhantomData, pin::Pin, sync::Arc}; use async_stream::stream; use futures::SinkExt; use futures_util::{stream::Stream, StreamExt}; use raw::{ClientMessage, GraphQLReceiver, GraphQLSender, ServerMessage}; use serde::{de::Des...
//! Chunked Phase 2 //! //! Large MPCs can require >50GB of elements to be loaded in memory. This module provides //! utilities for operating directly on raw items which implement `Read`, `Write` and `Seek` //! such that contributing and verifying the MPC can be done in chunks which fit in memory. use crate::{ keyp...
use std::{ collections::HashMap, convert::TryInto, fs::File, io::{BufReader, Read, Seek, SeekFrom}, ops::Range, path::Path, }; use byteorder::{LittleEndian, ReadBytesExt}; use pasture_core::{ containers::{ PerAttributePointView, PerAttributeVecPointStorage, PointBuffer, PointBufferW...
// CHIP-8 EMULATOR CORE /* Basic CPU loop: 1. Fetch the value from our game (loaded into RAM) at the memory address stored in our program counter. 2. Decode this instruction 3. Execute, which will possible involve modifying our CPU registers or RAM 4. Move the PC to the next instruction and re...
use crate::errors::Context; use crate::journal::Change; use crate::journal::ChangeFilter; use crate::journal::Journal; use log::info; use rand::Rng; use std::collections::HashSet; use std::fs; use std::io; use std::path::Path; use std::path::PathBuf; use std::process::Command; use std::process::ExitStatus; use structop...
// Copyright 2016 Google Inc. All rights reserved. // // 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...
// Copyright 2021-2022 <NAME>. // This file is part of ConcreteSTV. // ConcreteSTV is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. // ...
//! The TUI parts, greatly using [Cursive](https://gyscos.github.io/Cursive/cursive/index.html) //! showing table, the paths being searched, an alive for that, also the mDNS search performed //! and later status of the connection to the found clients. use super::super::{ common::config, ctrl::{CollectionPathAl...
extern crate priority_queue; extern crate ters_gc; use priority_queue::PriorityQueue; use std::cell::RefCell; use std::cmp::{Eq, PartialEq}; use std::collections::HashMap; use std::fmt; use std::hash::{Hash, Hasher}; use ters_gc::trace::{Trace, Tracer}; use ters_gc::*; type GcNode<'a> = Gc<'a, Node<'a>>; type GcEdge<...
use zkp::rand::seq::SliceRandom; use zkp::rand::CryptoRng; use zkp::rand::RngCore; use sha2; use sha2::Digest; use sha2::Sha512; use zkp::Transcript; use curve25519_dalek::constants as dalek_constants; use curve25519_dalek::ristretto::CompressedRistretto; use curve25519_dalek::ristretto::RistrettoPoint; use curve255...
use std::sync::Arc; use eyre::Report; use rosu_pp::{ Beatmap as Map, CatchPP, CatchStars, ManiaPP, OsuPP, PerformanceAttributes, TaikoPP, }; use rosu_v2::prelude::{Beatmap, GameMode, GameMods, OsuError, Score, User}; use twilight_model::{ application::interaction::{application_command::CommandOptionValue, Appl...
//! Data model for single patches. //! use std::convert::TryFrom; use std::convert::TryInto; use std::fmt; use std::collections::BTreeMap; use bit::BitIndex; use crate::{SystemExclusiveData, Checksum}; use crate::k5000::control::{ Polyphony, AmplitudeModulation, MacroController, SwitchControl, ControlDestina...