text stringlengths 7.05k 33.9k |
|---|
use crate::config::{Config, Delimiter};
use crate::select::SelectColumns;
use crate::util;
use crate::CliResult;
use cached::proc_macro::cached;
use indicatif::{ProgressBar, ProgressDrawTarget};
use log::{debug, error};
use serde::Deserialize;
static USAGE: &str = "
Fetch data via a URL column, and optionally store th... |
use crate::error::*;
/// The interface for a file opened from [`FileSystem`](trait.FileSystem.html).
pub trait FileSystemFile {
/// The type of names the parent archive uses to name files and directories.
type NameType;
/// The type of directories the parent archive contains.
type DirType;
/// Re... |
//! Quadratic voting application.
use merlin::Transcript;
use rand_core::{CryptoRng, RngCore};
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use core::fmt;
use crate::{
alloc::Vec, group::Group, Ciphertext, PreparedRange, PublicKey, RangeDecomposition, RangeProof,
SumOfSquaresProof, Verifica... |
// Copyright (c) 2016-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, ... |
//! Lexing from bytes to tokens.
use crate::intern::{StrRef, StrStoreMut};
use crate::loc::{Loc, Located};
use crate::token::{IdentType, IsNumLab, Token, TyVar, ALPHA, OTHER, SYMBOLIC};
/// Transform a sequence of bytes into a sequence of tokens.
pub fn get(store: &mut StrStoreMut, bs: &[u8]) -> Result<Lexer, Located... |
// Copyright (c) The nextest Contributors
// SPDX-License-Identifier: MIT OR Apache-2.0
use crate::{
errors::{FromMessagesError, WriteTestListError},
helpers::convert_rel_path_to_forward_slash,
list::{BinaryListState, OutputFormat, RustBuildMeta, Styles},
};
use camino::{Utf8Path, Utf8PathBuf};
use cargo_m... |
use std::error::Error;
use std::fs::File;
use std::io::{BufReader, Stdout, Write};
use std::path::{Path, PathBuf};
use plist::Value;
use crate::edit::{find, Found};
use crate::res::{self, Resources};
use crossterm::terminal;
use std::collections::HashMap;
#[derive(Debug, Default)]
pub struct Settings {
pub con... |
use std::path::PathBuf;
use bytesize::ByteSize;
use eframe::{egui, epi};
use poll_promise::Promise;
use serde::{Deserialize, Serialize};
use copypasta::{ClipboardContext, ClipboardProvider};
use tokio::sync::mpsc;
use tokio::runtime::Runtime;
use crate::psn::*;
pub struct ActiveDownload {
id: String,
versio... |
// Taken from stm32f103xx-hal
//
// Copyright (c) 2017-2018 <NAME>
// 2018 <NAME>
//
// 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... |
use volatile::Volatile;
use core::fmt;
use lazy_static::lazy_static;
use spin::Mutex;
use x86_64::instructions::{
interrupts,
port::Port
};
use alloc::str::FromStr;
use crate::error::Error;
#[cfg(feature="random")]
use rand::{
SeedableRng,
rngs::SmallRng,
distributions::{Distribution, Standard},
... |
//! # Day 20: Jurassic Jigsaw
//!
//! The high-speed train leaves the forest and quickly carries you south. You
//! can even see a desert in the distance! Since you have some spare time, you
//! might as well see if there was anything interesting in the image the Mythical
//! Information Bureau satellite captured.
//!
... |
use falcon_capstone::capstone_sys::x86_reg;
use error::*;
use il::*;
use il::Expression as Expr;
use translator::x86::mode::Mode;
const X86REGISTERS : &'static [X86Register] = &[
X86Register { name: "ah", capstone_reg: x86_reg::X86_REG_AH, full_reg: x86_reg::X86_REG_EAX, offset: 8, bits: 8, mode: Mode::X86 },
... |
// Copyright (c) 2021-2022 Toposware, Inc.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except ... |
//! Ported to Rust from <https://www.shadertoy.com/view/MslSDN>
//!
//! Original comment:
//! ```glsl
//! // Created by <NAME> - 2014
//! // License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
//! ```
use shared::*;
use spirv_std::glam::{
const_vec3, vec2, vec3, Mat2, Vec2, Vec2Swiz... |
use crate::infer::*;
use crate::internal::*;
use tract_core::ops::cnn::conv::ConvUnary;
use tract_core::ops::cnn::conv::KernelFormat;
use tract_core::ops::cnn::{PaddingSpec, PoolSpec};
use tract_core::ops::nn::DataFormat;
#[derive(Debug, Clone, Default, Hash)]
pub struct Conv {
pub data_format: DataFormat,
pu... |
use crate::common;
use crate::entry::{Entry, EntryParsingError};
/// This crate provides a klogctl interface from Rust.
/// klogctl is a Linux syscall that allows reading the Linux Kernel Log buffer.
/// https://elinux.org/Debugging_by_printing
///
/// This is a crate/library version of the popular Linux utility 'dmesg... |
// 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::paths::{
maybe_path_for_char, maybe_path_for_cursor_style, path_for_strikeout, path_for_underline,
Line,
},
carnel... |
use std::process;
use std::sync::{Arc, Mutex};
use mio;
use mio::net::TcpStream;
use std::collections;
use std::fs;
use std::io;
use std::io::{BufReader, Read, Write};
use std::net::SocketAddr;
use std::str;
use env_logger;
#[macro_use]
extern crate serde_derive;
use docopt::Docopt;
use rustls;
use webpki;
use we... |
use std::error::Error;
use std::fmt;
use std::ops::{AddAssign, SubAssign};
const MAX_U128_LEFT: u128 = 0xFFFFFFFFFFFFFFFF0000000000000000;
const MAX_U128_RIGHT: u128 = 0x0000000000000000FFFFFFFFFFFFFFFF;
const FIRST_BIT_FLAG: u128 = 0x80000000000000000000000000000000;
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, C... |
// Service to clean up dead slots in accounts_db
//
// This can be expensive since we have to walk the append vecs being cleaned up.
use crate::{
bank::{Bank, BankSlotDelta, DropCallback},
bank_forks::{BankForks, SnapshotConfig},
snapshot_package::AccountsPackageSender,
snapshot_utils,
};
use crossbeam... |
//! Functions and types relating to rendering.
//!
//! This module implements a (hopefully!) efficent quad renderer, which will queue up
//! drawing operations until it is absolutely necessary to send them to the graphics
//! hardware. This allows us to minimize the number of draw calls made, speeding up
//! rendering.... |
use std::{fmt, future::Future, mem, sync::Arc};
use bitflags::bitflags;
use twilight_model::{
application::interaction::{
ApplicationCommand, ApplicationCommandAutocomplete, MessageComponentInteraction,
},
channel::message::MessageFlags,
guild::Permissions,
http::interaction::{InteractionRe... |
//! A data producer represents an endpoint capable of injecting data messages into a mediasoup
//! [`Router`](crate::router::Router).
//!
//! A data producer can use [SCTP](https://tools.ietf.org/html/rfc4960) (AKA DataChannel) to deliver
//! those messages, or can directly send them from the Rust application if the da... |
//! # Rust Compiler Self-Profiling
//!
//! This module implements the basic framework for the compiler's self-
//! profiling support. It provides the `SelfProfiler` type which enables
//! recording "events". An event is something that starts and ends at a given
//! point in time and has an ID and a kind attached to it.... |
use xsd_codegen::{
Enum, Field, Fields, Formatter, Impl, Item, Module, Struct, Type, TypeAlias, Variant,
};
use xsd_types::{to_field_name, to_struct_name, XsdIoError, XsdName, XsdParseError, XsdType};
use std::collections::BTreeMap;
use std::fmt::Debug;
use std::io::Cursor;
use std::iter::FromIterator;
use xml::name... |
#![crate_name = "uu_join"]
/*
* This file is part of the uutils coreutils package.
*
* (c) <NAME> <<EMAIL>>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
extern crate clap;
#[macro_use]
extern crate uucore;
use std::fs::File;... |
//! Realm Account
use borsh::maybestd::io::Write;
use std::slice::Iter;
use borsh::{BorshDeserialize, BorshSchema, BorshSerialize};
use solana_program::{
account_info::{next_account_info, AccountInfo},
borsh::try_from_slice_unchecked,
program_error::ProgramError,
program_pack::IsInitialized,
pubke... |
use crate::{vulkan::buffer::BufferDesc, BackendError};
use super::{
buffer::Buffer,
error::CrashMarkerNames,
physical_device::{PhysicalDevice, QueueFamily},
profiler::VkProfilerData,
};
use anyhow::Result;
use ash::{
extensions::{ext::DebugUtils, khr},
vk,
};
use gpu_allocator::{AllocatorDebugS... |
use std::env;
use std::path::PathBuf;
use std::string::ToString;
use image::GenericImageView;
use structopt::StructOpt;
use generator::painter::{circle::CirclePainter, rect::RectPainter, stroke::StrokePainter};
use generator::utils::files;
use generator::utils::parsing::{
parse_color, parse_color_matrix, parse_scale... |
// Copyright 2020, The Tari Project
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
// following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
// di... |
#[cfg(feature = "UI_Notifications_Management")]
pub mod Management;
#[doc = "*Required features: `\"UI_Notifications\"`*"]
#[repr(transparent)]
pub struct AdaptiveNotificationContentKind(pub i32);
impl AdaptiveNotificationContentKind {
pub const Text: Self = Self(0i32);
}
impl ::core::marker::Copy for AdaptiveNotif... |
// Copyright Materialize, Inc. and contributors. All rights reserved.
//
// Use of this software is governed by the Business Source License
// included in the LICENSE file.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by ... |
// Library imports
use bitvec::prelude::*;
use clap::{App, Arg};
use crossbeam_channel::{bounded, Receiver, Sender};
use hashbrown::HashMap;
use num_cpus;
use regex::Regex;
use serde::Serialize;
use std::fs::File;
use std::io::{prelude::*, BufReader, BufWriter, Write};
use std::sync::{Arc, Mutex};
use std::time::Durati... |
// LNP Node: node running lightning network protocol and generalized lightning
// channels.
// Written in 2020 by
// Dr. <NAME> <<EMAIL>>
//
// To the extent possible under law, the author(s) have dedicated all
// copyright and related and neighboring rights to this software to
// the public domain worldwide. This ... |
use std::borrow::Cow;
use std::collections::BTreeMap;
use std::env;
use std::fs;
use std::io::{BufRead, BufReader, Write};
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};
use std::sync::Mutex;
use std::thread;
use chrono::{Local, Utc};
use console::style;
use difference::{Changeset, Difference};
us... |
//! Anything relating to loading or saving map data
use fxhash::FxHashMap;
use image::{Rgb, RgbImage, DynamicImage, ColorType};
use image::codecs::bmp::{BmpDecoder, BmpEncoder};
use zip::read::ZipArchive;
use zip::write::ZipWriter;
use super::*;
use crate::app::format::{Adjacency, Definition, ParseCsv};
use crate::con... |
//! #Introduction
//! This crate focuses on geting system information.
//!
//! For now it supports Linux, Mac OS X and Windows.
//! And now it can get information of kernel/cpu/memory/disk/load/hostname and so on.
//!
extern crate libc;
use std::ffi;
use std::fmt;
use std::io::{self, Read};
use std::fs::File;
use std... |
use na::{DMatrix, Point3};
use crate::bounding_volume::AABB;
use crate::math::{Real, Vector};
use crate::shape::{FeatureId, Triangle};
bitflags! {
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Default)]
/// The status of the cell of an heightfield.
pub struct HeightFieldCellS... |
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use anyhow::Error;
use argh::FromArgs;
use diagnostics_log_encoding::{parse::parse_record, Argument, Record, Severity, Value};
use fidl::endpoints::Request... |
/// Dynamic Broker Configurations
/// core/src/main/scala/kafka/server/DynamicBrokerConfig.scala
/// Dynamic broker configurations are stored in ZooKeeper and may be defined at two levels:
/// - Per-broker configs persisted at `/configs/brokers/{brokerId}`: These can be
/// described/altered using AdminClient using t... |
///types and functions used by the compiler
use crate::ast;
use crate::builtin::*;
use crate::context::*;
use crate::globals::Globals;
use crate::levelstring::*;
use crate::value::*;
//use std::boxed::Box;
use crate::compiler_info::CompilerInfo;
use crate::value_storage::*;
use std::collections::HashMap;
use std::path... |
use std::any::{Any, TypeId};
use bevy::app::Events;
use bevy::window::{WindowId, WindowMode};
use bevy::{prelude::*, utils::HashMap};
use bevy_inspector_egui::bevy_egui::{egui, EguiContext, EguiPlugin, EguiSettings};
use bevy_inspector_egui::{InspectableRegistry, WorldInspectorParams};
use indexmap::IndexMap;
use cra... |
//! X.509 certificate support.
// Adapted from yubico-piv-tool:
// <https://github.com/Yubico/yubico-piv-tool/>
//
// Copyright (c) 2014-2016 Yubico AB
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions ... |
use crate::config::*;
use crate::endian::*;
use crate::gen::*;
use crate::meta;
use crate::meta::attr::{MetaAttr, MetaAttrType};
use crate::parsertree::*;
use proc_macro2::{Span, TokenStream, TokenTree};
use quote::ToTokens;
use syn::spanned::Spanned;
use syn::*;
#[derive(Debug)]
pub(crate) struct StructParser {
p... |
// Copyright 2017 ETH Zurich. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
//... |
//! A [`tower::Service`] that implements a server and a client simultaneously over a
//! bi-directional channel. As a server it is able to process RPC calls from a remote client,
//! and as a client it is capable of making RPC calls into a remote server. It is very
//! convinient in a system that requires asynchronous ... |
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
use std::{mem, thread, ptr, fmt};
use syscall::io::{Dma, Mmio, Io, ReadOnly};
use super::common::*;
// CORBCTL
const CMEIE: u8 = 1 << 0; // 1 bit
const CORBRUN: u8 = 1 << 1; // 1 bit
// CORBSIZE
const CORBSZCAP: (u8,u8) = (4, 4);
const CORBSIZE: (u8,u8) = (0, 2);
// CORBRP
const CORBRPRST: u16 = 1 << 15;
// RIR... |
use crate::angles::Angles;
use crate::animations::animation::AnimationData;
use crate::animations::animation_handler::AnimationHandler;
use crate::animations::animation_handler::AnimationOptions;
use crate::emitters::emitter_animation_handler::EmitterAnimationHandler;
use crate::forces::force::ForceData;
use crate::for... |
use nalgebra::{Isometry3, Point3, Translation3, UnitQuaternion, Vector3};
use ncollide3d::shape::{Ball, Cuboid, ShapeHandle};
use nphysics3d::force_generator::DefaultForceGeneratorSet;
use nphysics3d::joint::DefaultJointConstraintSet;
use nphysics3d::object::{BodyPartHandle, DefaultBodyHandle, DefaultBodySet, DefaultC... |
use crate::*;
use ethereum_types::{Address, Bloom, H160, H256, H64, U256};
use rlp::{Rlp, RlpStream};
use rlp_derive::{
RlpDecodable as RlpDecodableDerive, RlpEncodable as RlpEncodableDerive,
};
#[cfg(not(feature = "std"))]
extern crate alloc;
#[cfg(not(feature = "std"))]
use alloc::string::String;
use sp_runtime... |
// Copyright (c) The Libra Core Contributors
// SPDX-License-Identifier: Apache-2.0
use libra_proptest_helpers::pick_slice_idxs;
use libra_types::vm_error::{StatusCode, VMStatus};
use proptest::{
prelude::*,
sample::{self, Index as PropIndex},
};
use std::collections::BTreeMap;
use vm::{
errors::{append_er... |
use pest::Parser;
use std::f64::consts::{E, PI};
use crate::errors::*;
use crate::stack::{Stack, FACTORIAL, PERCENT_ADD, PERCENT_DIV, PERCENT_MUL, PERCENT_SUB, STD_FUNCS, UNARY_MINUS};
use crate::value::*;
#[derive(Parser)]
#[grammar = "calc.pest"]
pub struct CalcParser;
pub const PHI: f64 = 1.618_033_988_749_895;
c... |
// ----------------------------------------------------------------------------
// Copyright (c) Spyder Project Contributors
//
// Licensed under the terms of the MIT License
// (see LICENSE.txt for details)
// ----------------------------------------------------------------------------
/// Rust bindings to syntect li... |
// In this file are all the helper functions used by the UI when decoding RigidModel PackedFiles.
extern crate failure;
extern crate qt_widgets;
extern crate qt_gui;
extern crate qt_core;
use qt_widgets::widget::Widget;
use qt_widgets::group_box::GroupBox;
use qt_widgets::tab_widget::TabWidget;
use qt_core::event_loo... |
// Copyright 2018-2020 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... |
#![allow(non_upper_case_globals)]
pub use color_maps::html::*;
pub const IndianRed: (u8, u8, u8, u8) = (205, 92, 92, 255);
pub const LightCoral: (u8, u8, u8, u8) = (240, 128, 128, 255);
pub const Salmon: (u8, u8, u8, u8) = (250, 128, 114, 255);
pub const DarkSalmon: (u8, u8, u8, u8) = (233, 150, 122, 255);
pub const ... |
use core::fmt;
pub const NULL_GUID: Guid = Guid(
0x00000000,
0x0000,
0x0000,
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00],
);
pub const MPS_TABLE_GUID: Guid = Guid(
0xeb9d2d2f,
0x2d88,
0x11d3,
[0x9a, 0x16, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d],
);
pub const ACPI_TABLE_GUID: Guid = Gui... |
//! The execution context and other core structures
use std::{
mem::{ size_of, align_of, zeroed, },
ffi::{ CStr, },
};
use llvm_sys::{
prelude::{
LLVMContextRef,
LLVMModuleRef,
LLVMBuilderRef,
LLVMPassManagerRef,
LLVMTypeRef,
// LLVMValueRef,
},
core::{
LLVMContextCreate,
LLV... |
//! Manages fix party status and handles message synchronization
extern crate core;
use std::io;
// use std::rc::Rc;
use std::sync::Arc;
use std::sync::Mutex;
use std::fmt::{Display, Formatter, Error};
use super::MessageStore;
use fix::frame::FixFrame;
use fix::fixmessagegen::*;
/// Indicates the state of each par... |
use image::{ImageResult, RgbImage};
use mli::{Backward, Forward, Graph, Train};
use mli_conv::{Conv2n, Conv3};
use mli_defconv::DefConv2InternalOffsets;
use mli_dense::Dense2;
use mli_ndarray::{Map1One, Map2One, Map3One, Reshape3to2};
use mli_relu::Blu;
use mli_sigmoid::Logistic;
use mnist::{Mnist, MnistBuilder};
use n... |
// use buffer::{Bindable, UniformBindable};
use nannou::math::cgmath;
use nannou::prelude::*;
use rayon::prelude::*;
use std::time::Duration;
use crate::camera_controller::CameraController;
use crate::pass_compute::PassCompute;
use crate::renderer::{
self,
camera::Camera,
geom::{DrawGeom, Geom},
insta... |
// Copyright 2020 EinsteinDB Project Authors. Licensed under Apache-2.0.
//! einstein_merkle_trees for use in the test suite, implementing both the KV
//! and VioletaBFTeinstein_merkle_tree traits.
//!
//! These einstein_merkle_trees link to all other einstein_merkle_trees, providing concrete single timelike_storage
/... |
//! Yew component to visualize Rubik's cube.
use wasm_bindgen::JsCast;
use web_sys::HtmlCanvasElement;
use web_sys::HtmlDivElement;
use web_sys::WebGl2RenderingContext as GL;
use web_sys::WebGlProgram;
use yew::services::{ConsoleService, RenderService, Task};
use yew::{html, Component, ComponentLink, Html, NodeRef, Sh... |
use crate::{
component::action::Action,
engine::{
player::PlayerId,
position::{MapPosition, PixelPositionF64, PositionOffset},
types::PlayerList,
world::World,
},
tools::itemstore::HasId,
traits::{
celltypes::{CanPass, CellType},
randenum::RandEnumFrom... |
//! Bezier splines
//!
use crate::approx;
use crate::polynomial::Poly;
use std::ops;
/// A (control) point on a Bézier curve. TODO: Replace with glm::Vec2
#[derive(Debug, Clone, Copy)]
pub struct Point {
pub x: f32,
pub y: f32,
}
/// Linearly interpolate between points p, q and interpolation vartiable t.
pub ... |
//! An allocator with flexible backing stores
use core::{alloc::Layout, debug_assert, ptr::NonNull, unimplemented};
use super::{
int::BinInteger,
utils::{
nonnull_slice_end, nonnull_slice_from_raw_parts, nonnull_slice_len, nonnull_slice_start,
},
Init, Tlsf, GRANULARITY,
};
/// The trait for d... |
// Copyright (c) 2021 Quark Container Authors
//
// 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 ... |
use std::sync::Arc;
use calc::Calc;
use druid::widget::{
CrossAxisAlignment, Flex, Label, Painter,
List, Scroll, LineBreaking, Axis
};
use druid::{
theme, AppLauncher, Color, Data, FontDescriptor, LifeCycleCtx,
LayoutCtx, PaintCtx,FontFamily, FontWeight,Lens, LocalizedString,
KeyOrValue, LifeCycle,... |
// Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
// Licensed under the Apache License, Version 2.0 (see LICENSE).
#![deny(warnings)]
// Enable all clippy lints except for many of the pedantic ones. It's a shame this needs to be copied and pasted across crates, but there doesn't appear to be a way to... |
use lazy_static::lazy_static;
use pg_query_wrapper as pg_query;
use psql_splitter;
use regex::Regex;
use sqlite::doc_already_processed;
mod sqlite;
use std::collections::HashSet;
use std::convert::TryInto;
use std::io::Read;
use std::process;
use std::{
fs::{self, File},
io,
os::unix::prelude::PermissionsEx... |
use std::{
collections::HashMap,
num::NonZeroU32,
sync::{
atomic::{AtomicBool, Ordering},
Arc, Mutex,
},
};
use easygpu::{
prelude::*,
wgpu::{
Buffer, Extent3d, FilterMode, Origin3d, PresentMode, TextureAspect, TextureUsages,
COPY_BYTES_PER_ROW_ALIGNMENT,
},
... |
use std::fmt;
use sha1::Sha1;
use hmac::{Hmac, Mac, NewMac};
type Sha1Hmac = Hmac<Sha1>;
// hmac key
const HMAC_KEY: &[u8; 64] = include_bytes!("hmac_key.bin");
// file version
#[repr(i16)]
#[derive(Debug, Clone, Copy)]
pub enum FileVersion { Sb3 = 1, /* Sb4 = 4, */ }
impl TryFrom<i16> for FileVersion {
type Error... |
//! The [GeoAdmin] (https://api3.geo.admin.ch) provider for geocoding in Switzerland exclusively.
//!
//! Based on the [Search API] (https://api3.geo.admin.ch/services/sdiservices.html#search)
//! and [Identify Features API] (https://api3.geo.admin.ch/services/sdiservices.html#identify-features)
//!
//! It uses the loc... |
/*
* Copyright (c) 2017 <NAME>,
* Copyright (c) 2015-2017 <NAME>, <http://gildedhonour.com>, <http://alexmaslakov.com>
*
* 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.a... |
use std::collections::HashMap;
use std::convert::TryInto;
use std::sync::Arc;
use bytes::Bytes;
use futures01::{Future, IntoFuture, Stream};
use hashing::{Digest, Fingerprint};
use parking_lot::Mutex;
use testutil::data::{TestData, TestDirectory};
///
/// Implements the ContentAddressableStorage gRPC API, answering r... |
use crate::hal::{Features, Limits};
use crate::{Error, GlContainer};
use std::collections::HashSet;
use std::{fmt, str};
use glow::Context;
/// A version number for a specific component of an OpenGL implementation
#[derive(Clone, Eq, Ord, PartialEq, PartialOrd)]
pub struct Version {
pub is_embedded: bool,
pub... |
use crate::{
helpers::{is_fee_amount_packable, pack_fee_amount},
AccountId, Nonce, TxFeeTypes,
};
use crate::account::PubKeyHash;
use num::{BigUint, Zero};
use parity_crypto::Keccak256;
use serde::{Deserialize, Serialize};
use zksync_basic_types::{Address, TokenId, H256};
use zksync_crypto::{
params::{max_... |
use crate::ast;
use crate::ast::{
BlockCheckMode, Expr, ExprKind, Item, ItemKind, Pat, PatKind, QSelf, Ty, TyKind, VariantData,
};
use crate::parse::parser::{BlockMode, PathStyle, SemiColonMode, TokenType};
use crate::parse::token;
use crate::parse::PResult;
use crate::parse::Parser;
use crate::print::pprust;
use c... |
// Copyright (c) Facebook, Inc. and its affiliates.
// SPDX-License-Identifier: Apache-2.0
use crate::{base_types::*, committee::Committee, downloader::*, error::FastPayError, messages::*};
use failure::{bail, ensure};
use futures::{future, StreamExt};
use rand::seq::SliceRandom;
use std::{
collections::{btree_map... |
/* artifact: the requirements tracking tool made for developers
* Copyright (C) 2018 <NAME> <@vitiral, <EMAIL>>
*
* The source code is Licensed under either of
*
* * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
* http://www.apache.org/licenses/LICENSE-2.0)
* * MIT license ([LICENSE-MIT](L... |
/*
* Copyright 2020 Fluence Labs 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 by applicable law or a... |
use crate::HashMap;
use intmap::IntMap;
use std::io;
use std::mem::MaybeUninit;
use std::time::Duration;
use util::config;
use yaml_rust::{Yaml, YamlLoader};
pub(crate) mod emoji;
pub(crate) use emoji::*;
#[derive(Debug, Clone)]
pub(crate) struct MachineProps {
pub name: String,
pub emoji_version: EmojiVersion,
... |
//! This file provides some basic facilities for creating a [`Color`](color/trait.Color.html) object,
//! specifically an [`RGBColor`](color/struct.RGBColor.html), from the Google Material design
//! spec.
//!
//! One thing to keep in mind is that the Material Design specification has changed somewhat. Now,
//! they us... |
#![cfg(target_arch = "wasm32")]
#![recursion_limit = "1024"]
mod defs;
mod display;
mod eval;
mod help;
mod parse;
mod types;
use std::cell::RefCell;
use std::collections::*;
use std::rc::Rc;
use wasm_bindgen::prelude::*;
use wasm_bindgen::JsCast;
use web_sys::{HtmlElement, HtmlInputElement};
use yew::prelude::*;
use... |
use anyhow::Result;
use chrono::{Duration, NaiveDateTime};
use itertools::Itertools;
use reqwest::header::{AUTHORIZATION, USER_AGENT};
use serde::de::{DeserializeOwned, Deserializer};
use serde::Deserialize;
use std::collections::BTreeSet;
use std::fmt::Write;
#[derive(Default)]
pub struct Generator {
agenda: Stri... |
use std::{
collections::HashSet,
ffi::{c_void, CString},
};
use gl::types::*;
use lazy_static::lazy_static;
use regex::Regex;
mod average;
mod cache;
mod ringbuffer;
mod texture;
pub use average::*;
pub use cache::*;
pub use ringbuffer::*;
pub use texture::*;
#[macro_export]
macro_rules! gl_check {
() =... |
// mod channel_stats;
pub(crate) mod constants;
mod differential;
mod operator_stats;
pub mod operators;
mod program_stats;
mod progress_stats;
#[cfg(feature = "timely-next")]
mod reachability;
mod send_recv;
mod subgraphs;
mod summation;
mod tests;
mod timely_source;
pub(crate) mod utils;
mod worker;
mod worker_timeli... |
// Copyright (c) 2019, Arm Limited, All Rights Reserved
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/license... |
// Copyright 2021, The Tremor 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 t... |
use std::{
collections::HashMap,
convert::{AsRef, TryFrom},
ops::{Index, IndexMut},
};
use crate::util::name_hash;
#[cfg(feature = "string_cache")]
use string_cache::{Atom, EmptyStaticAtomSet};
mod bin;
mod json;
#[cfg(feature = "string_cache")]
type NameType = Atom<EmptyStaticAtomSet>;
#[cfg(not(featur... |
use crate::{SMBiosStruct, UndefinedStruct};
use serde::{ser::SerializeStruct, Serialize, Serializer};
use core::{fmt, any};
use core::ops::Deref;
#[cfg(feature = "no_std")]
use alloc::string::String;
/// # Portable Battery (Type 22)
///
/// This structure describes the attributes of the portable battery or batteries f... |
use std::collections::{BTreeMap, HashMap, VecDeque};
use std::sync::{Arc, Mutex};
use std::pin::Pin;
use std::io::Write;
use futures::channel::mpsc::{unbounded, UnboundedReceiver, UnboundedSender};
use futures::channel::oneshot;
use futures::{
future::try_join_all,
Future, FutureExt, TryFutureExt, Stream,
... |
// Copyright 2018 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 agre... |
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use error_chain::error_chain;
use grep::matcher::{LineMatchKind, Match, Matcher, NoError};
use grep::{self};
use memchr::{memchr, memrchr};
use regex::bytes::Regex;
use regex_syntax::ast::{
Alternation, Assertion, AssertionKind, Ast, Concat, Group, Literal... |
mod conversion;
mod error;
use crate::{
ast::{Query, Value},
connector::{metrics, queryable::*, ResultSet, Transaction},
error::{Error, ErrorKind},
visitor::{self, Visitor},
};
use async_trait::async_trait;
use connection_string::JdbcString;
use futures::lock::Mutex;
use std::{
convert::TryFrom,
... |
//! Functionality for evaluating *Breakpad
//! [RPN](https://en.wikipedia.org/wiki/Reverse_Polish_notation) expressions*.
//!
//! These expressions are defined by the following
//! [BNF](https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form) specification:
//! ```text
//! <rule> ::= <identifier>: <expr>
//! <as... |
extern crate serde_json;
extern crate uuid;
extern crate indy_crypto;
use errors::common::CommonError;
use errors::indy::IndyError;
use errors::anoncreds::AnoncredsError;
use services::anoncreds::AnoncredsService;
use services::wallet::WalletService;
use std::rc::Rc;
use services::anoncreds::helpers::get_composite_id;... |
use super::*;
use std::sync::Arc;
use xsql_catalog::mem_impl::{ColumnSpec, MemCatalogBuilder};
use xsql_catalog::{ColumnAttr, DataType};
use xsql_frontend::parser::dialect::MySQL;
use xsql_frontend::parser::parse_query;
#[test]
fn test_plan_build_select_row() {
let cat = empty_catalog();
for sql in vec![
... |
use super::{EdgeContainer, GraphStatistic, GraphStorage};
use crate::{
annostorage::{inmemory::AnnoStorageImpl, AnnotationStorage, Match},
dfs::{CycleSafeDFS, DFSStep},
errors::Result,
graph::NODE_NAME_KEY,
types::{Edge, NodeID, NumValue},
};
use rustc_hash::{FxHashMap, FxHashSet};
use serde::{Deser... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.