text stringlengths 9.08k 47.9k |
|---|
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate clap;
#[allow(dead_code)]
mod app;
mod args;
mod auth;
mod domain;
mod http;
mod infra;
mod logging;
mod metrics;
mod notify;
mod storage;
use crate::{
app::libunftp_version,
args::FtpsClientAuthType,
auth::{DefaultUserProvider, JsonUserPro... |
pub mod app;
pub mod constants;
pub mod errors;
pub mod helper;
pub mod npm;
pub mod package;
pub mod scripts;
pub mod voltapi;
use crate::commands::add::Package;
use crate::core::utils::voltapi::{VoltPackage, VoltResponse};
use crate::Instant;
use app::App;
use colored::Colorize;
use errors::VoltError;
use flate2::re... |
// 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::fidl::{self, *},
anyhow::{anyhow, Error},
heck::SnakeCase,
std::iter,
};
static ATTR_NAME_DERIVE_DEBUG: &'static str = "deriv... |
use crate::common::*;
use serde_json::json;
use std::collections::HashSet;
use v_common::module::veda_backend::Backend;
use v_common::onto::datatype::Lang;
use v_common::onto::individual::Individual;
use v_common::v_api::obj::ResultCode;
pub fn insert_to_prowatch(module: &mut Backend, ctx: &mut Context, indv: &mut Ind... |
/// PDF "cryptography" โ This is why you don't write your own crypto.
use crate as pdf;
use aes::cipher::generic_array::{sequence::Split, GenericArray};
use aes::{Aes128, Aes256, NewBlockCipher};
use block_modes::block_padding::{NoPadding, Pkcs7};
use block_modes::{BlockMode, Cbc};
use sha2::{Digest, Sha256, Sha384, S... |
use std::collections::HashMap;
use std::{cmp, ops::Div};
use bitvec::vec::BitVec;
use chrono::{Datelike, Local};
use crate::bmfont_renderer::BMFontRenderer;
use crate::caret::{Caret, CaretType};
use crate::common::{ControlFlags, Direction, FadeState};
use crate::components::draw_common::{draw_number, Alignment};
use ... |
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.
// Polkadot 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... |
use parking_lot::Mutex;
use std::sync::Arc;
#[macro_use]
mod macros;
use crate::dbg_hex;
pub mod disassemble;
pub(crate) mod status;
mod opcodes;
mod address_modes;
pub use crate::nes::cpu::address_modes::*;
pub use crate::nes::address::{Address,Addressable};
use crate::nes::interconnect::Interconnect;
use crate:... |
//! JavaScript dynamic code generation facilities for Percival.
use std::{
collections::{BTreeMap, BTreeSet},
fmt::Display,
rc::Rc,
};
use rpds::{RedBlackTreeMap, RedBlackTreeSet};
use thiserror::Error;
use crate::ast::{Aggregate, Clause, Literal, Program, Rule, Value};
const VAR_DEPS: &str = "__perciva... |
// Copyright (c) 2016-2017 Chef Software Inc. and/or applicable contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unl... |
//! The `sigverify_stage` implements the signature verification stage of the TPU. It
//! receives a list of lists of packets and outputs the same list, but tags each
//! top-level list with a list of booleans, telling the next stage whether the
//! signature in that packet is valid. It assumes each packet contains one
... |
extern crate byteorder;
extern crate embedded_hal as hal;
extern crate i2csensors;
use byteorder::{ByteOrder, LittleEndian};
use hal::blocking::i2c::{Write, Read, WriteRead};
use i2csensors::{Accelerometer, Gyroscope, Thermometer, Magnetometer, Vec3};
use std::thread;
use std::time::Duration;
use std::mem;
pub const... |
/* Copyright (c) 2018-2021 <NAME> (<EMAIL>)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, pub... |
use crate::{
ffi::{
ConnectionHandle,
EndpointHandle,
FFIResult,
FFIResultKind,
HandleMut,
Out,
Ref,
RustlsClientConfigHandle,
RustlsServerConfigHandle,
},
proto::{
ClientConfig,
DatagramEvent,
Dir,
Endpo... |
// call all intro 1 functions
pub fn _intro_1_notes() {
_mutability();
_tuples();
_arrays();
_strings();
_ownership();
_structures();
_control_flow();
_enums_and_options();
_vectors_and_hashmaps();
_casting_and_lets_and_result();
}
// underscore suppresses the "unused" warning.
... |
use anyhow::{format_err, Error};
use async_google_apis_common as common;
use common::{
yup_oauth2::{self, InstalledFlowAuthenticator},
DownloadResult, TlsClient,
};
use crossbeam::atomic::AtomicCell;
use futures::future::try_join_all;
use itertools::Itertools;
use lazy_static::lazy_static;
use log::debug;
use m... |
use async_std::{fs, io::BufReader, prelude::*, task};
use crossbeam::atomic::AtomicCell;
use dashmap::DashMap;
use error_chain::{bail, error_chain};
use futures::{channel::mpsc::unbounded, stream::TryStreamExt};
use indexmap::IndexMap;
use num_derive::{FromPrimitive, ToPrimitive};
use regex::Regex;
use serde_derive::{D... |
use crate::connectivity::{
CellConnectivity, Connectivity, ConnectivityMut, Hex20Connectivity, Hex27Connectivity, Hex8Connectivity,
Quad4d2Connectivity, Quad9d2Connectivity, Tet10Connectivity, Tet20Connectivity, Tet4Connectivity,
Tri3d2Connectivity, Tri3d3Connectivity, Tri6d2Connectivity,
};
use crate::geom... |
//! Generic wrappers over various object file formats.
use std::borrow::Cow;
use goblin::Hint;
use thiserror::Error;
use symbolic_common::{Arch, AsSelf, CodeId, DebugId};
use crate::base::*;
use crate::breakpad::*;
use crate::dwarf::*;
use crate::elf::*;
use crate::macho::*;
use crate::pdb::*;
use crate::pe::*;
use... |
// WARNING: the code in here is horrible. It is a behemoth that needs breaking up into simpler parts.
use crate::{widgets::*, *};
use epaint::*;
use super::*;
/// Builder for a floating window which can be dragged, closed, collapsed, resized and scrolled (off by default).
///
/// You can customize:
/// * title
/// *... |
//! Baja contexts
//!
//! Contexts contain meta-data, such as certificates and principals and their
//! roles, necessary to establish and manage a Baja session.
//!
//! ## Authors
//!
//! The Veracruz Development Team.
//!
//! ## Licensing and copyright notice
//!
//! See the `LICENSE.markdown` file in the Veracruz roo... |
//! Functions for creating, applying and combining diffs
use bytes_serializer::IntoBytesSerializer;
use diff_block::DiffBlock;
use diff_iterator::DiffIterator;
use diff_reader::DiffReader;
use drain::Drainable;
use functions::{read_n, vec_shift, vec_to_u32_be};
use indexes::WithIndexes;
use readslice::ReadSlice;
use s... |
use core::cell::Cell;
use kernel::common::cells::{OptionalCell, TakeCell};
use kernel::common::registers::interfaces::{ReadWriteable, Readable, Writeable};
use kernel::common::registers::{register_bitfields, register_structs, ReadOnly, ReadWrite};
use kernel::common::StaticRef;
use kernel::hil;
use kernel::hil::uart::R... |
mod handler;
mod pending;
mod receiver;
mod sender;
mod shutdown;
pub use self::handler::RequestHandler;
pub use self::pending::{
RequestOptions, RequestOptionsBuilder, SendRequest, REQUEST_MAX_TIMEOUT_DEFAULT_DURATION,
REQUEST_TIMEOUT_DEFAULT_DURATION,
};
pub use self::sender::SenderHandle;
pub use self::shut... |
//! This module allows you to deconstruct an existing SPF DNS record into its
//! constituent parts.
//! It is not intended to validate the spf record.
mod errors;
mod tests;
mod validate;
use crate::helpers;
use crate::mechanism::Kind;
pub use crate::mechanism::{Mechanism, ParsedMechanism};
pub use crate::spf::err... |
#[macro_use]
extern crate serde;
extern crate ordered_float;
#[cfg(test)]
#[macro_use]
extern crate serde_derive;
use ordered_float::OrderedFloat;
use serde::Deserialize;
use std::cmp::Ordering;
use std::collections::{BTreeMap, HashSet};
use std::fmt::Display;
use std::hash::{Hash, Hasher};
use std::sync::Arc;
pub u... |
#[cfg(all(not(feature = "std"), feature = "alloc"))]
use alloc::string::{String, ToString};
#[derive(Debug, Clone)]
pub struct Instruction {
pub opcode: u8,
pub prefixed: bool,
pub asm: String,
pub arg: Arg,
pub cycles: (usize, usize), // min, max
}
#[derive(Clone, Debug)]
pub enum Arg {
None,... |
// virtual machine architecture
// ++++++++++++++++++++++++++++
//
// segmented memory model with 16-byte segment size (notation seg:offset)
//
// 4 general-purpose registers (r0-r3)
// 2 segment registers (cs, ds equiv. to r4, r5)
// 1 flags register (fl)
//
// instruction encoding
// ++++++++++++++++++++
//
// ... |
extern crate rpassword;
mod actions;
mod audit_logs;
mod cli;
mod config;
mod configuration;
mod database;
mod environments;
mod import;
mod installation;
mod integrations;
mod lib;
mod login;
mod logout;
mod parameters;
mod projects;
mod run;
mod schema;
mod subprocess;
mod table;
mod templates;
mod users;
mod versio... |
use std::cell::RefCell;
use std::collections::HashMap;
use std::convert::Infallible;
use std::fs;
use std::iter::FromIterator;
use std::ops::{ControlFlow, FromResidual, Try};
use std::path::PathBuf;
use std::process;
use std::sync::Mutex;
use std::time::{Duration, SystemTime};
use chrono::prelude::*;
use failure::{sel... |
extern crate term_painter;
use std::thread;
use std::time::Duration;
use term_painter::Color::Custom;
use term_painter::ToStyle;
pub struct Sudoku {
columns: [[u32; 9]; 9],
horizontal_lines: [[u32; 9]; 9],
vertical_lines: [[u32; 9]; 9],
}
impl Sudoku {
pub fn new(horizontal_lines: [[u32; 9]; 9]) -> S... |
#![no_std]
#![allow(dead_code)]
#[macro_use] extern crate log;
extern crate alloc;
extern crate spin;
extern crate port_io;
extern crate memory;
extern crate bit_field;
use core::fmt;
use core::ops::{Deref, DerefMut};
use alloc::vec::Vec;
use port_io::Port;
use spin::{Once, Mutex};
use memory::PhysicalAddress;
use b... |
extern crate event;
extern crate netutils;
extern crate rand;
extern crate syscall;
use rand::{Rng, OsRng};
use std::collections::{BTreeMap, VecDeque};
use std::cell::RefCell;
use std::fs::File;
use std::io::{self, Read, Write};
use std::{mem, process, slice, str};
use std::ops::{Deref, DerefMut};
use std::os::unix::i... |
//! Allocating pages of memory from the OS and carving them into individual
//! allocations. See TypedPage for details.
use heap::GcHeap;
use marking::MarkingTracer;
use ptr::{Pointer, UntypedPointer};
use std::any::TypeId;
use std::{cmp, mem, ptr};
use std::marker::PhantomData;
use std::ops::{Deref, DerefMut};
use tr... |
use crate::{String, ToString, Vec};
use algebra::{get_best_evaluation_domain, DensePolynomial, EvaluationDomain, Evaluations};
use algebra::{Field, PrimeField};
use poly_commit::{LabeledPolynomial, PolynomialLabel};
use r1cs_core::SynthesisError;
use std::{borrow::Borrow, marker::PhantomData};
use rayon::prelude::*;
... |
// This file is part of Sulis, a turn based RPG written in Rust.
// Copyright 2018 <NAME>
//
// Sulis 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... |
#![cfg_attr(
not(any(feature = "dx12", feature = "metal", feature = "vulkan")),
allow(unused)
)]
use rendy::{
command::{Families, Graphics, Supports},
factory::{Config, Factory, ImageState},
graph::{present::PresentNode, render::*, GraphBuilder},
init::winit::{
self,
event::{Eve... |
use value::*;
use ast;
use il;
use impls;
use std::collections::HashMap;
// TODO: Proper error handling?
pub fn compile(root: &ast::Root) -> il::Program {
let un_op_pairs = impls::build_un_op_impls_table();
let un_op_index_map =
un_op_pairs.iter()
.enumerate()
.map(|(i, x)| (x.0.clone(... |
use std::prelude::v1::*;
use crate::msgs::enums::{ContentType, HandshakeType, ExtensionType};
use crate::msgs::enums::{Compression, ProtocolVersion, AlertDescription};
use crate::msgs::message::{Message, MessagePayload};
use crate::msgs::base::Payload;
use crate::msgs::handshake::{HandshakePayload, HandshakeMessagePayl... |
use crate::model::ParsingContext;
use crate::pb::*;
use tract_hir::internal::*;
use tract_hir::ops;
pub fn lstm(
_ctx: &ParsingContext,
pb: &NodeProto,
) -> TractResult<(Box<dyn InferenceOp>, Vec<String>)> {
let mut lstm = LSTM::default();
let mut options = crate::model::optional_inputs(pb).skip(3);
... |
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or ... |
#![cfg_attr(not(feature = "std"), no_std)]
/// Study the nicks pallet and modify it after stating its config values to push balances to treasury and have commission control it.
/// 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... |
//! Bitcoin protocol state machine.
#![warn(missing_docs)]
use crossbeam_channel as chan;
use log::*;
pub mod addrmgr;
pub mod channel;
pub mod connmgr;
pub mod peermgr;
pub mod pingmgr;
pub mod spvmgr;
pub mod syncmgr;
#[cfg(test)]
mod tests;
use addrmgr::AddressManager;
use channel::Channel;
use connmgr::Connectio... |
//! Smart caching and deduplication of requests when using a forking provider
use revm::{db::DatabaseRef, AccountInfo, KECCAK_EMPTY};
use crate::executor::fork::BlockchainDb;
use ethers::{
core::abi::ethereum_types::BigEndianHash,
providers::Middleware,
types::{Address, BlockId, Bytes, H160, H256, U256},
... |
use anyhow::{bail, ensure, Context, Result};
use clap::{App, Arg};
use std::cmp;
use std::convert::TryInto;
use std::fs::File;
use std::io;
use std::io::prelude::*;
use std::path::{Path, PathBuf};
#[cfg(test)]
mod unit_tests;
const NAME: &str = "b3sum";
const FILE_ARG: &str = "FILE";
const DERIVE_KEY_ARG: &str = "de... |
mod repository;
pub use pahkat_types::PackageKey;
pub use repository::{LoadedRepository, RepoDownloadError};
use std::collections::BTreeMap;
use std::convert::{TryFrom, TryInto};
use std::path::Path;
use std::sync::{Arc, RwLock};
use futures::future::FutureExt;
use futures::stream::StreamExt;
use hashbrown::HashMap;... |
use amethyst::{
ecs::{Entities, Join, ReadExpect, System, World, Write, WriteExpect, WriteStorage},
network::simulation::{laminar::LaminarSocketResource, TransportResource},
shred::{ResourceId, SystemData},
};
use std::{
cmp::Ordering,
net::{Ipv4Addr, Ipv6Addr, SocketAddr},
time::{Duration, Ins... |
//! Persistent, ACID compliant, threadsafe to-disk store.
//! Powered by Sled - an embedded database.
use std::{
collections::{HashMap, HashSet},
sync::{Arc, Mutex},
};
use crate::{
endpoints::{default_endpoints, Endpoint},
errors::{AtomicError, AtomicResult},
resources::PropVals,
storelike::{... |
use core::fmt::{self, Debug};
use std::cmp::Ordering;
use crate::common::{is_8digits, parse_digits, ByteSlice};
#[derive(Clone)]
pub struct Decimal {
pub num_digits: usize,
pub decimal_point: i32,
pub negative: bool,
pub truncated: bool,
pub digits: [u8; Self::MAX_DIGITS],
}
impl Debug for Decima... |
// Copyright (c) 2020 <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 file may not be
// copied, modified, or distributed exc... |
//! Reproduces the functionality of "adstool" from the Beckhoff ADS C++ library.
use std::convert::TryInto;
use std::io::{stdin, stdout, Read, Write};
use std::str::FromStr;
use byteorder::{ByteOrder, BE, LE, WriteBytesExt};
use itertools::Itertools;
use parse_int::parse;
use structopt::{clap::AppSettings, clap::ArgG... |
// Copyright 2016 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.
#![allow(non_camel_case_types)]
#![deny(warnings)]
use std::{cmp, fmt};
pub type zx_addr_t = usize;
pub type zx_duration_t = i64;
pub type zx_futex_t = i... |
// Copyright 2021 The Grin Developers
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
use std::str::FromStr;
use rmath::bigint::{BigInt, Nat};
use rmath::rand::IterSource;
use crate::elliptic::key_pair::{PrivateKey, PublicKey};
use crate::{CryptoError, CryptoErrorKind};
/// CurveParams contains the parameters of an elliptic curve
pub struct CurveParams {
// the order of the underlying field
p: ... |
use std::net;
use std::sync::{mpsc, Arc, Mutex};
use async_std::task;
use serde::{Deserialize, Deserializer};
use tokio::stream::{self, Stream, StreamExt};
use tokio::sync::mpsc as tmpsc;
use warp::http::{header, StatusCode};
use warp::sse::ServerSentEvent;
use warp::{reply, Filter, Reply};
use bitcoin::util::bip32::... |
// todo source provider
use std::{f64, str::FromStr, time::Duration};
use anyhow::{bail, Result};
use futures_util::{SinkExt, StreamExt};
use http::{Method, Request};
use regex::{Captures, Regex};
use reqwest::{
header::{self, HeaderMap, HeaderValue},
Client, StatusCode,
};
use scraper::{ElementRef, Html, Nod... |
extern crate fnv;
#[macro_use]
extern crate clap;
extern crate hashbrown;
extern crate statrs;
use std::io::BufReader;
use std::io::BufRead;
use std::fs::File;
use hashbrown::{HashMap,HashSet};
use fnv::FnvHasher;
use std::hash::BuildHasherDefault;
type FnvHashMap<T,V> = HashMap<T,V, BuildHasherDefault<FnvHasher>>;
ty... |
use crate::*;
use diagnostic::*;
use error::{Error, LError};
use location::{Located, SourceSpan};
use std::cell::Cell;
use std::collections;
use std::hash::Hash;
use std::rc::Rc;
use syntax::*;
use types::*;
mod error;
pub mod info;
mod types;
type Arity = usize;
pub use info::SymbolInfo;
pub use types::{RcType, Syn... |
use std::fmt;
#[derive(Clone, PartialEq)]
pub enum Operand {
// Cpu registers
A,
B,
C,
D,
E,
F,
H,
L,
// Cpu double registers
HL,
AF,
BC,
DE,
// Special Registers
SP,
PC,
// Flags
Zero,
NoZero,
Carry,
NoCarry,
Word,
DWord,... |
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TradeMatchReport {
/// MsgType = DC
#[serde(flatten)]
pub standard_message_header: super::super::standard_message_header::StandardMessageHeader<'D', 'C'>,
/// ApplicationSequenceControl
#[serde(fla... |
//! The IR data structures
pub mod ir_build;
pub mod ir_display;
use crate::ast::{self, Span};
use crate::const_eval::ConstEvaluator;
use crate::generics::replace_generics;
use crate::ty::{Ty, TyCtx, TyKind};
use std::cell::{Cell, RefCell};
use std::collections::HashMap;
/// An id that uniquely identifies each expre... |
extern crate serde_json;
use crate::crud;
use crate::resources;
use futures::join;
use tokio::time::{self, Duration};
use std::collections::HashMap;
use uuid::Uuid;
pub mod assign;
extern crate chrono;
use chrono::*;
fn _print_type_of<T>(_: &T) {
println!("{}", std::any::type_name::<T>())
}
// Scheduler Replica... |
//! # AdvancedResearch-Room: An experiment to test The Room Hypothesis of Common Sense
//!
//! Paper: [The Room Hypothesis of Common Sense](https://github.com/advancedresearch/path_semantics/blob/master/papers-wip/the-room-hypothesis-of-common-sense.pdf)
//!
//! The Room Hypothesis of Common Sense states that artificia... |
//! Minimalistic snapshot testing for Rust.
//!
//! # Introduction
//!
//! `expect_test` is a small addition over plain `assert_eq!` testing approach,
//! which allows to automatically update tests results.
//!
//! The core of the library is the `expect!` macro. It can be though of as a
//! super-charged string literal... |
//! Contains utility functions to generate suggestions.
#![deny(clippy::missing_docs_in_private_items)]
use crate::utils::{higher, snippet, snippet_opt, snippet_with_macro_callsite};
use rustc_ast::util::parser::AssocOp;
use rustc_ast::{ast, token};
use rustc_ast_pretty::pprust::token_kind_to_string;
use rustc_errors:... |
use crate::auditwheel::PlatformTag;
use crate::{BridgeModel, Target};
use anyhow::{bail, format_err, Context, Result};
use regex::Regex;
use serde::Deserialize;
use std::collections::HashSet;
use std::fmt;
use std::io;
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};
use std::str;
/// This snippets ... |
use super::super::core::{
sys::{
config::{self, Config},
system::{self, System},
},
types::{
genesis,
receipt::{Receipt, ReceiptMap},
transaction::Transaction,
},
}; // Import the system module
use super::super::crypto::blake3; // Import the blake3 hashing module
... |
extern crate ash;
#[cfg(target_os = "windows")]
extern crate winapi;
#[cfg(target_os = "macos")]
extern crate cocoa;
#[cfg(target_os = "macos")]
extern crate metal;
#[cfg(target_os = "macos")]
extern crate objc;
extern crate winit;
#[cfg(target_os = "macos")]
use cocoa::appkit::{NSView, NSWindow};
#[cfg(target_os = "m... |
//! Rustc proc-macro server implementation with tt
//!
//! Based on idea from <https://github.com/fedochet/rust-proc-macro-expander>
//! The lib-proc-macro server backend is `TokenStream`-agnostic, such that
//! we could provide any TokenStream implementation.
//! The original idea from fedochet is using proc-macro2 as... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Start RTC counter"]
pub tasks_start: TASKS_START,
#[doc = "0x04 - Stop RTC counter"]
pub tasks_stop: TASKS_STOP,
#[doc = "0x08 - Clear RTC counter"]
pub tasks_clear: TASKS_CLEAR,
#[doc = "0x0c - Set counter to 0... |
use bevy::{
prelude::*, reflect::TypeUuid, render::render_resource::std140::AsStd140,
sprite::Material2dPlugin,
};
use super::plot_format::*;
use super::colors::make_color_palette;
use crate::canvas::*;
use crate::bezier::*;
use crate::inputs::*;
use crate::markers::*;
use crate::util::*;
use crate::segments... |
//! Pretty printer for math formulas and lisp terms.
//!
//! The main interface is the [`FormatEnv::pretty`] function, which provides a
//! [`Pretty`] arena on which various methods exist to print different kinds of object.
use std::collections::HashMap;
use std::cell::RefCell;
use std::{mem, fmt};
use std::borrow::Co... |
use crate::{account_lock_manage::AccountLockManage, syscalls::error_codes::GW_FATAL_UNKNOWN_ARGS};
use ckb_vm::{
memory::Memory,
registers::{A0, A1, A2, A3, A4, A5, A7},
Error as VMError, Register, SupportMachine, Syscalls,
};
use gw_common::{
blake2b::new_blake2b,
h256_ext::H256Ext,
state::{
... |
// Copyright 2018-2022 Cargill Incorporated
//
// 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... |
use num_derive::FromPrimitive;
use crate::attribute::{Attribute, AttributeName, AttributeCommon};
use crate::character::character_common_data::CharacterCommonData;
use crate::character::character_sub_stat::CharacterSubStatFamily;
use crate::character::{CharacterConfig, CharacterName, CharacterStaticData};
use crate::ch... |
#![allow(clippy::large_enum_variant)]
//! Common types used across the library.
use std::cmp::Ordering;
use std::collections::HashMap;
use std::time::Duration;
use crate::private::Sealed;
use async_trait::async_trait;
use bytes::Bytes;
use futures::stream::BoxStream;
use futures::Stream;
use serde::de::Visitor;
use se... |
//! PSRT client module
use crate::reduce_timeout;
use crate::{Error, ErrorKind};
use std::sync::atomic;
use std::sync::Arc;
use std::time::{Duration, Instant};
use tokio::io::AsyncWriteExt;
use tokio::net::TcpStream;
use tokio::sync::oneshot;
use tokio::task::JoinHandle;
use tokio::time;
use tokio::time::sleep;
use to... |
//! Real-time clock
mod alarm;
pub use alarm::{Alarm, AlarmDay};
use crate::{pac, rcc::lsi_hz};
use chrono::{Datelike, NaiveDate, NaiveDateTime, NaiveTime, Timelike};
use pac::{
rcc::{
bdcr::RTCSEL_A,
csr::LSIPRE_A::{DIV1, DIV128},
},
rtc::cr::WUCKSEL_A,
};
/// RTC clock selection
#[deri... |
//! Traits and helpers for creating `Handler` implementations that perform some error
//! handling. Most use cases are covered by implementing the `FailableHandler` trait
//! and wrapping your impl in a `DefaultFalableHandler`.
//!
//!
//! **This module is only available when the `failable` feature is enabled in your C... |
use super::{
cgroups,
config::{Config, RepositoryType},
console::Request,
error::Error,
mount::{MountControl, MountInfo},
process::Launcher,
repository::{DirRepository, MemRepository, Npk},
stats::ContainerStats,
Container, ContainerEvent, Event, EventTx, ExitStatus, NotificationTx, ... |
// #![doc = include_str!("mod.md")] moved to book
pub mod cam; // 8 correlates
pub use cam::*;
pub mod jch; // JCh, Lightness, Chroma, and Hue-Angle
pub use jch::*;
pub mod ucs; // J'a'b' //JCh
pub use ucs::*;
use super::{CieLab, CieXYZ};
use crate::{
illuminants::{Illuminant, D50},
linterp,
observers::... |
use alloc::boxed::Box;
use core::ptr::null;
use crate::constants::*;
use crate::elf::{Elf, ElfParser, Proghdr, ProghdrType};
use crate::pmap::{PageDirectory, PhysAddr, VirtAddr};
use crate::spinlock::{Mutex, MutexGuard};
use crate::trap::Trapframe;
use crate::{file, fs, log, mpconfig, pmap, sched, util, x86};
use core... |
//! Defines a textual serialization format for [Term]s.
//!
//! Includes both a parser ([parse_term]) and serializer ([serialize_term]).
//!
//!
//! * IR Textual format
//! * It's s-expressions.
//! * `N`: natural number
//! * `I`: integer (arbitrary-precision)
//! * `X`: identifier
//! * regex: `[^()0-9#; ... |
use std::f64;
use lapack;
use lapack::c::Layout;
use Matrix;
use EigenDecompose;
use EigenOptions;
use SingularValueDecompose;
use solve::Solve;
use errors::*;
/// Valid vector norm types
#[derive(Debug, Clone, Copy)]
pub enum Norm {
/// L1 (absolute value) norm
L1,
/// L2 (Euclidean) norm
L2,
/... |
//! A library of routines commonly used in experiments.
//!
//! In honor of my friend Josh:
//!
//! _โ*โ___โโ___โ__*___โ_*___โโโญโโโโโโโโโโฎ
//! __*_โโ___โโ___โโ*____โโ___โโ|::::::^---^
//! ___โโ___โ*โ___โโ____โโ*___โโ|::::|๏ฝกโโฟโฟโ๏ฝก|
//! ___*โ__โโ_*___โโ___*โโ___*โโโฐOยญ-O---O--O โฏ
// Must be imported first because the oth... |
use cocoa::base::{id, BOOL};
use cocoa::foundation::{NSRect, NSSize, NSUInteger};
use crate::constants::ICEXIFOrientationType;
use core_graphics::base::CGFloat;
use core_graphics::image::CGImageRef;
use libc::c_uchar;
use objc::*;
/// Scanner Functional Unit Types
#[repr(u64)]
#[derive(Clone, Copy, Debug, PartialEq)]
... |
use std::{
collections::HashMap,
ops::Range,
path::{Path, PathBuf},
};
use bellframe::{
method::LABEL_LEAD_END, method_lib::QueryError, music::Regex, Bell, Mask, Method, MethodLib,
RowBuf, Stage,
};
use itertools::Itertools;
use log::log;
use monument::{
layout::new::{coursewise, leadwise, Spli... |
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
use crate::cache;
use crate::cache::Cacher;
use crate::colors;
use crate::compat;
use crate::compat::NodeEsmResolver;
use crate::config_file::ConfigFile;
use crate::config_file::MaybeImportsResult;
use crate::deno_dir;
use crate::emit;
use crat... |
#![allow(dead_code)]
use std::{
env,
fs::{self, create_dir, File},
io::{BufRead, BufReader},
path::{Path, PathBuf},
process::{Child, Command, ExitStatus},
time::{Duration, Instant},
};
use anyhow::{bail, Context as _, Result};
use openssl::{
asn1::{Asn1Integer, Asn1Time},
bn::BigNum,
... |
use crate::error::MemoryServerError;
use std::cmp::min;
use std::{fs, io, path};
use std::fs::File;
use std::io::{Write};
use std::path::{Path};
use indicatif::{MultiProgress, ProgressBar, ProgressStyle};
use futures_util::StreamExt;
use os_info::{Info as OsInfo, Type as OsType};
use semver::{Version, VersionReq};
/... |
// 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 anyhow::Context;
use {
anyhow::{format_err, Result},
ffx_core::ffx_plugin,
ffx_driver_lsusb_args::DriverLsusbCommand,
fidl_fuchsia_devi... |
#![allow(dead_code)]
#[cfg(target_endian="little")]
const IS_BIG_ENDIAN: bool = false;
#[cfg(target_endian="big")]
const IS_BIG_ENDIAN: bool = true;
const ARRAY_MAX_LEN: usize = 67108864;
use std::str::from_utf8;
use std::mem;
use dbus_strings::{SignatureMulti, SignatureMultiBuf, SignatureSingle, SignatureSingleBuf,... |
//!# PWG Raster
//!
//!Decoding of Printer Working Group Candidate Standard 5102.4-2012 raster images.
//!
//!# Decoding multiple pages
//!
//! [next_page()](struct.PWGReader.html#method.next_page) will call a closure with a page structure that allows access to
//! the header and page data. It will return Ok(None) when... |
// ุจูุณูู
ู ุงูููููู ุงูุฑููุญูู
ููู ุงูุฑููุญููู
// This file is part of Setheum.
// Copyright (C) 2019-2021 Setheum Labs.
// 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 a... |
// Copyright (c) 2020 Huawei Technologies Co.,Ltd. All rights reserved.
//
// StratoVirt is licensed under Mulan PSL v2.
// You can use this software according to the terms and conditions of the Mulan
// PSL v2.
// You may obtain a copy of Mulan PSL v2 at:
// http://license.coscl.org.cn/MulanPSL2
// THIS SOFTWA... |
// Copyright 2020 Parity Technologies (UK) Ltd.
// This file is part of Tetcoin.
// Tetcoin is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later ... |
//
// dc4 test suite
//
// Copyright (c) 2015-2021 by <NAME>
//
#![deny(rust_2018_idioms)]
fn dc4_run(expr: &[u8]) -> String {
String::from_utf8(dc4_run_bytes(expr)).unwrap()
}
fn dc4_run_bytes(expr: &[u8]) -> Vec<u8> {
let mut dc = dc4::Dc4::new("dc4 cargo test".to_string());
let mut out = Vec::<u8>::ne... |
//! Text functionality for Piet cairo backend
use std::convert::TryInto;
use std::fmt;
use std::ops::{Range, RangeBounds};
use std::rc::Rc;
use glib::translate::from_glib_full;
use pango::prelude::FontMapExt;
use pango::AttrList;
use pango_sys::pango_attr_insert_hyphens_new;
use pangocairo::FontMap;
use piet::kurbo... |
mod gl;
mod scene_loader;
use glfw::Context;
use wavefront_obj::obj;
use image::GenericImageView;
use core::mem::{size_of, size_of_val};
fn check_gl_errors() {
let err = gl::GetError();
if err != 0 {
panic!("OpenGL error: {}", err);
}
}
const W: u32 = 960;
const H: u32 = 540;
fn shader(ty: gl::types::GLe... |
use crate::metrics;
use std::collections::HashMap;
use tree_hash::TreeHash;
use types::consts::altair::SYNC_COMMITTEE_SUBNET_COUNT;
use types::slot_data::SlotData;
use types::sync_committee_contribution::SyncContributionData;
use types::{Attestation, AttestationData, EthSpec, Hash256, Slot, SyncCommitteeContribution};
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.