text stringlengths 7.05k 33.9k |
|---|
// Unless explicitly stated otherwise all files in this repository are licensed under the
// MIT/Apache-2.0 License, at your convenience
//
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2020 Datadog, Inc.
//
use alloc::alloc::Layout;
use core::future::Future;
use core::m... |
//! Holds serializable EventSub stuff
//!
//! Use [`CreateEventSubSubscription`](crate::helix::eventsub::CreateEventSubSubscription) to subscribe to an event according to the [EventSub guide](https://dev.twitch.tv/docs/eventsub).
//! Parse the response payload text with [`Payload::parse`] or the .
//!
//! # Example
//!... |
pub mod utils;
use {
crate::utils::*,
anchor_lang::{
prelude::*,
safecoin_program::program::{invoke, invoke_signed},
AnchorDeserialize, AnchorSerialize,
},
anchor_spl::{
associated_token::AssociatedToken,
token::{Token, TokenAccount},
},
};
anchor_lang::decl... |
//! An append-only collection of update batches.
//!
//! The `Spine` is a general-purpose trace implementation based on collection and merging
//! immutable batches of updates. It is generic with respect to the batch type, and can be
//! instantiated for any implementor of `trace::Batch`.
use std::fmt::Debug;
use ::d... |
// Copyright 2017, 2018 Parity Technologies
//
// 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... |
mod logging;
use structopt;
use anyhow::{anyhow, Context, Result};
use cargo_toml::Manifest;
use colored::*;
use indicatif::{MultiProgress, ProgressBar, ProgressStyle};
use std::{
env,
io::Write,
path::{Path, PathBuf},
process::{self, Command, Stdio},
sync::Arc,
time::Instant,
};
use structopt... |
use std::collections::{HashMap, VecDeque};
use std::iter::FromIterator;
use anyhow::anyhow;
use log::warn;
use relative_path::{RelativePath, RelativePathBuf};
use airport::Airport;
pub use io::{DirectorySource, FileSource};
use open_air::domain::coords::geo_to_map;
use open_air::domain::viewer::Colour;
use visual::Ge... |
use super::*;
use std::error;
use std::ffi::{CStr, CString};
use std::fmt;
use std::marker;
use std::mem;
pub struct UGC<Manager> {
pub(crate) ugc: *mut sys::ISteamUGC,
pub(crate) inner: Arc<Inner<Manager>>,
}
const CALLBACK_BASE_ID: i32 = 3400;
const CALLBACK_REMOTE_STORAGE_BASE_ID: i32 = 1300;
// TODO: s... |
// 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 {
async_trait::async_trait,
failure::{err_msg, Error, ResultExt},
fidl::endpoints::{create_proxy, create_request_stream, ClientEnd, ServerE... |
use crate::utils::{in_macro, meets_msrv, snippet_opt, span_lint_and_sugg};
use if_chain::if_chain;
use rustc_errors::Applicability;
use rustc_hir as hir;
use rustc_hir::def::DefKind;
use rustc_hir::{
def,
def_id::LocalDefId,
intravisit::{walk_ty, NestedVisitorMap, Visitor},
Expr, ExprKind, FnRetTy, FnS... |
//! Phase Locked Loop Configuration
use super::{Rcc, HSI};
use crate::stm32::RCC;
use crate::time::Hertz;
/// Strategies for configuring a Phase Locked Loop (PLL)
#[derive(Copy, Clone)]
pub enum PllConfigStrategy {
/// VCOL, highest PFD frequency, highest VCO frequency
Normal,
/// VCOH, choose PFD frequen... |
use itertools::Itertools;
use inflate::{inflate_bytes_zlib, inflate_bytes};
use deflate::deflate_bytes;
use crate as pdf;
use crate::error::*;
use crate::object::{Object, Resolve};
use crate::primitive::{Primitive, Dictionary};
use std::convert::TryInto;
#[derive(Object, ObjectWrite, Debug, Clone)]
pub struct LZWFla... |
use super::*;
use core::marker::PhantomData;
use stm32f7::stm32f7x6::{
gpioa, gpiob, gpiod, GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH, GPIOI, GPIOJ,
GPIOK,
};
/// Abstraction for a GPIO port that allows safe configuration of the port's pins.
pub struct GpioPort<T: RegisterBlockTrait> {
pub(sup... |
//! Contains the code for interpreting SAILAR code, managing the call stack, etc.
use sailar::format::{indices, instruction_set, type_system};
use sailar_get::loader;
pub mod call_stack;
pub mod debugger;
pub mod error;
pub mod ffi;
pub mod mem;
pub mod register;
pub use error::{Error, ErrorKind, LoaderError};
pub ... |
// par_newsort-5a
use std::mem::{size_of};
macro_rules! lt {
($v: ident, $left: expr, $right: expr, $is_less: ident) => {
// $cmp(&$v[$left], &$v[$right])
$is_less(unsafe {&$v.get_unchecked($left)}, unsafe {&$v.get_unchecked($right)})
};
}
macro_rules! gt {
($v: ident, $left: expr, $right:... |
use graph::{
blockchain::block_ingestor::CLEANUP_BLOCKS,
components::ethereum::NodeCapabilities,
prelude::{
anyhow::{anyhow, bail, Context, Result},
info, serde_json, Logger, NodeId,
},
};
use graph_store_postgres::{DeploymentPlacer, Shard as ShardName, PRIMARY_SHARD};
use http::HeaderM... |
use kzg::{FFTFr, FFTSettings, FFTSettingsPoly, Fr, Poly, PolyRecover, ZeroPoly};
use crate::consts::SCALE_FACTOR;
use crate::recovery::{scale_poly, unscale_poly};
use crate::types::fft_settings::FsFFTSettings;
use crate::types::fr::FsFr;
use crate::utils::is_power_of_two;
use crate::utils::{log2_pow2, log2_u64, min_u6... |
// 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::{format_err, Error},
fidl_fuchsia_bluetooth::ErrorCode,
fidl_fuchsia_bluetooth_bredr as bredr, fuchsia_async as fasync,
fuchs... |
#[macro_use]
extern crate clap;
extern crate color_eyre;
extern crate eyre;
use std::env;
use std::fs::{self, OpenOptions, File};
use std::io::Write;
use std::path::{Path, PathBuf};
use std::process::Command;
use std::io::LineWriter;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::mpsc::channel;
use std:... |
// Copyright 2022 pyke.io
// 2019-2021 Tauri Programme within The Commons Conservancy
// [https://tauri.studio/]
//
// 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... |
use crate::common::{HTTPDate, HTTPVersion, Header, StatusCode};
use std::cmp::Ordering;
use std::sync::mpsc::Receiver;
use std::io::Result as IoResult;
use std::io::{self, Cursor, Read, Write};
use std::fs::File;
use std::str::FromStr;
/// Object representing an HTTP response whose purpose is to be given to a `Req... |
use std::{future::Future, pin::Pin};
use dada_brew::prelude::*;
use dada_collections::Map;
use dada_id::prelude::*;
use dada_ir::code::bir::LocalVariable;
use dada_ir::code::validated::op::Op;
use dada_ir::effect::Effect;
use dada_ir::function::Function;
use dada_ir::{
code::{bir, syntax},
error,
origin_ta... |
extern crate vulkan_tutorial_rust;
use vulkan_tutorial_rust::{
utility, // the mod define some fixed functions that have been learned before.
utility::share,
utility::debug::*,
utility::constants::*,
};
extern crate winit;
extern crate ash;
use winit::{ Event, EventsLoop, WindowEvent, ControlFlow, Vi... |
use super::utils;
use super::vector::{vec3::Vec3, VecMethods};
use super::NoiseEvaluator;
use super::{vector::vec2::Vec2, PermTable};
const STRETCH: f64 = -1.0 / 6.0; // (1 / sqrt(3 + 1) - 1) / 3
const SQUISH: f64 = 1.0 / 3.0; // (sqrt(3 + 1) - 1) / 3
const NORMALIZING_SCALAR: f64 = 103.0;
const GRAD_TABLE: [Vec3<f6... |
//! Types and functions for building Universal Scalability Law models from sets of observed
//! measurements.
//!
//! ```
//! use usl::{Model, Measurement};
//! let measurements = vec.
///
/// Use the macro `VkAccessFlags!` as an alternative method to create a structure. For example, these two snippets return the sa... |
use derive_more::{Display, Error, From};
use phf::phf_map;
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Error, From)]
pub struct UpyunError {
code: u64,
}
#[derive(Debug, Display, Error, From)]
pub enum Error {
Reqwest(reqwest::Error),
SerdeJSON(serde_json::Error),
Upyun(UpyunError),
... |
use regex::Regex;
use std::{
borrow::Cow,
cmp::{Ord, Ordering, PartialOrd},
collections::BTreeMap,
};
use super::Error;
use shellac_codec::{Suggestion, SuggestionType};
/// A step in matching the definition
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Step<T: Ord> {
/// Check if one value of argv ... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - I2S/PCM Control Register"]
pub i2s_pcm_ctl: crate::Reg<i2s_pcm_ctl::I2S_PCM_CTL_SPEC>,
#[doc = "0x04 - I2S/PCM Format Register 0"]
pub i2s_pcm_fmt0: crate::Reg<i2s_pcm_fmt0::I2S_PCM_FMT0_SPEC>,
#[doc = "0x08 - I2S/PCM F... |
// Copyright 2018 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 carnelian::{
color::Color,
drawing::{load_font, path_for_circle, DisplayRotation, FontFace},
facet::... |
/// physics
use core::num::ParseFloatError;
use std::fmt;
use std::ops::Neg;
use std::ops::Add;
use std::ops::Mul;
use std::str::*;
use rand::Rng;
use regex::Regex;
use super::*;
use super::algebra::*;
#[derive(Debug, PartialEq, Clone, Copy)]
pub enum Wavelength {
Red,
Green,
Blue
}
impl fmt::Display for Wav... |
use basebits::{hamming_dist_none, BaseBits};
//use rayon::iter::ParBridge;
use rayon::prelude::*;
use rust_htslib::bam::errors::Error;
use rust_htslib::bam::record::{Aux, Cigar, CigarString};
use rust_htslib::bam::{self, Read};
use std::cmp::Ordering;
use std::collections::hash_map::{Entry::Occupied, Entry::Vacant};
us... |
use std::borrow::Cow;
use std::cmp::{max, min};
use std::env;
use std::process::{Command, Stdio};
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
use std::sync::mpsc::{channel, Receiver, Sender};
use std::sync::Arc;
use std::thread;
use std::thread::JoinHandle;
use derive_builder::Builder;
use nix::libc;
u... |
//! Slitter stashes allocations for each size class in a thread-local
//! cache.
#[cfg(any(
all(test, feature = "check_contracts_in_tests"),
feature = "check_contracts"
))]
use contracts::*;
#[cfg(not(any(
all(test, feature = "check_contracts_in_tests"),
feature = "check_contracts"
)))]
use disabled_con... |
// 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... |
use nalgebra as na;
use kdtree::KdTree;
use serde_derive::Serialize;
use std::{fmt, sync::RwLock, iter::FromIterator};
use crate::ratings::{Id, RatingValue, RatingContainer};
use crate::dataprovider::RatingDataProvider;
#[derive(Debug)]
pub enum PredictionError {
Unknown,
NotInitialized,
UnknownUser,
U... |
use anyhow::{bail, Error, Result};
use log::{error, info};
use std::{
cmp::min,
future::Future,
path::PathBuf,
str::FromStr,
time::{Duration, Instant},
};
use tokio::{fs, time};
async fn read<T>(path: &PathBuf) -> Result<std::result::Result<T, <T as FromStr>::Err>>
where
T: FromStr,
{
Ok(fs... |
use crate::specs::*;
use amq_protocol_types::*;
use serde::Deserialize;
use serde_json::Value;
use std::collections::BTreeMap;
type MethodDefaults = (&'static str, &'static [&'static str]);
type ClassDefaults = (&'static str, &'static [MethodDefaults]);
const ENFORCED_DEFAULTS: &[ClassDefaults] = &[
("access", ... |
use super::*;
#[derive(PartialEq, Clone)]
pub enum OverworldStage {
OrdonRanch,
TitleScreen,
OrdonVillage,
OrdonSpring,
FaronWoods,
KakarikoVillage,
DeathMountain,
KakarikoGraveyard,
ZorasRiver,
ZorasDomain,
Snowpeak,
LakeHylia,
CastleTown,
SacredGrove,
Bublin... |
use crate::events::{Event, EventManager, Message};
use crate::build_handler::Builder;
use crate::{Entity, Hierarchy, State, Window};
use std::collections::{HashMap, VecDeque};
use femtovg::{
renderer::OpenGl,
Align,
Baseline,
Canvas,
FillRule,
FontId,
ImageFlags,
ImageId,
LineCap... |
extern crate num_traits;
#[cfg(test)]
mod tests;
use num_traits::{Bounded, Float, FromPrimitive, NumAssignOps, PrimInt, ToPrimitive};
#[derive(Debug, PartialEq, Clone)]
pub enum Marker {
Unused,
Used,
}
/// Compute the elimination tree for a quasidefinite matrix
/// in compressed sparse column form, where t... |
#![cfg_attr(not(feature = "std"), no_std)]
/// Edit this file to define custom logic or remove it if it is not needed.
/// Learn more about FRAME and the core library of Substrate FRAME pallets:
/// https://substrate.dev/docs/en/knowledgebase/runtime/frame
pub use pallet::*;
pub mod interface;
pub use crate::... |
// Copyright 2011 Google Inc. All Rights Reserved.
// Copyright 2017 The Ninja-rs Project Developers. 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:/... |
use std::{
any::TypeId,
collections::{hash_map::Entry, HashMap},
sync::{
atomic::{AtomicUsize, Ordering},
Arc,
},
};
use egui::{
ClippedMesh, CtxRef, Event, Modifiers, Output, PointerButton, RawInput, Rect,
TextureId as eguiTextureId,
};
use image::RgbaImage;
use sabi_core::{Job... |
use std;
use std::error::Error;
use std::io::BufReader;
use std::path::PathBuf;
use super::gtk;
use super::gtk::prelude::*;
use super::gtk::{Builder, Button, Entry, MenuItem, RadioButton, Window};
extern crate rodio;
use self::rodio::Source;
use super::person;
#[doc = "The global state of the program"]
static mut S... |
use std::collections::HashSet;
#[derive(Debug, PartialEq)]
pub struct Puzzle {
nums: [Option<u8>; 81],
rows: Vec<HashSet<u8>>,
cols: Vec<HashSet<u8>>,
boxes: Vec<HashSet<u8>>,
}
impl Puzzle {
pub fn new(input: Vec<Vec<isize>>) -> Result<Self, &'static str> {
if input.len() != 9 {
... |
pub mod state_machine;
use capnp::serialize::OwnedSegments;
use capnp::message::Reader;
use raft_capnp::{client_request};
use rpc::client::Rpc;
use common::{client_command, raft_query, raft_command, RaftError, SessionInfo};
use common::constants;
use std::collections::HashMap;
use std::net::SocketAddr;
use std::thread... |
#![type_length_limit = "1138969"]
use backoff::{future::FutureOperation, ExponentialBackoff};
use futures::stream::StreamExt;
use futures::TryFutureExt;
use homie_device::{HomieDevice, Node, Property};
use itertools::Itertools;
use mijia::{DeviceId, MacAddress, MijiaEvent, MijiaSession, Readings, SensorProps};
use rum... |
//!
//! # Diode Solver(s)
//!
use std::collections::HashMap;
use super::consts;
use super::{make_matrix_elem, Component};
use crate::analysis::{AnalysisInfo, Options, Stamps, VarIndex, VarKind, Variables};
use crate::defs::DefPtr;
use crate::proto;
use crate::sparse21::{Eindex, Matrix};
use crate::{attr, from_opt_type... |
//! Extracts URI from HTTP response implementing [RFC 8288: Web Linking].
//!
//! [RFC 8288: Web Linking]: https://www.rfc-editor.org/rfc/rfc8288.html
use bstr::{BStr, ByteSlice};
use std::borrow::Cow;
/// Construct iterator over [`Link`] from `&`[`BStr`].
pub fn from_bstr<'a>(input: impl Into<&'a BStr>) -> Links<'a>... |
//! SAME/EAS Event Codes
use std::convert::TryFrom;
use std::fmt;
use std::str::FromStr;
use strum::{EnumMessage, EnumProperty};
use thiserror::Error;
/// SAME message significance level
///
/// Usually constructed as part of an [`EventCode`].
/// See also [MessageHeader::event()](crate::MessageHeader#method.event)
... |
// Copyright 2015-2016 Mozilla Foundation. See the COPYRIGHT
// file at the top-level directory of this distribution.
//
// 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 you... |
//! A module to parse Open Document Spreadsheets
//!
//! # Reference
//! OASIS Open Document Format for Office Application 1.2 (ODF 1.2)
//! http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.pdf
use std::borrow::Cow;
use std::collections::HashMap;
use std::io::{BufReader, Read, Seek};
use quick_xml::events::at... |
use prolog_parser::ast::*;
use prolog::clause_types::*;
use prolog::fixtures::*;
use prolog::forms::*;
use prolog::instructions::*;
use prolog::iterators::*;
use prolog::machine::machine_errors::*;
use prolog::machine::machine_indices::*;
use prolog::ordered_float::*;
use prolog::rug::ops::PowAssign;
use prolog::rug... |
use crate::async_communication::{expect_output, expect_output_and_listen_for_info, stderr_listener, write_all};
use core_sdk::board_representation::game_state::*;
use core_sdk::move_generation::movegen::MoveList;
use core_sdk::search::timecontrol::TimeControl;
use log::{info, warn};
use std::collections::HashMap;
use s... |
//! This is a tool to experiment with the concept of 15-minute neighborhoods. Can you access your
//! daily needs (like groceries, a cafe, a library) within a 15-minute walk, bike ride, or public
//! transit ride of your home?
//!
//! See https://github.com/a-b-street/abstreet/issues/393 for more context.
use abstutil... |
//! This module contains the module client and module message types.
/// A client for the Azure IoT Hub MQTT protocol. This client receives module-level messages.
///
/// A `Client` is a [`Stream`] of [`Message`]s. These messages contain twin state messages and direct method requests.
///
/// It automatically reconnec... |
use std::future::Future;
use std::path::PathBuf;
use std::sync::Arc;
use std::time::SystemTime;
use anyhow::{anyhow, Error};
use futures::{channel::mpsc, StreamExt, TryStreamExt};
use hyper::{
body::Bytes,
client::{Client, HttpConnector},
header::{HeaderValue, AUTHORIZATION, CONTENT_LENGTH},
Body, Meth... |
mod column;
mod enums;
mod index;
mod sql_schema_differ_flavour;
mod table;
pub(crate) use column::{ColumnChange, ColumnChanges};
pub(crate) use sql_schema_differ_flavour::SqlSchemaDifferFlavour;
use crate::{
pair::Pair,
sql_migration::{
self, AddColumn, AddForeignKey, AlterColumn, AlterEnum, AlterTab... |
// ccommon - a cache common library.
// Copyright (C) 2019 Twitter, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless requ... |
// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//
// Portions Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-BSD-3-Clause file.
use anyhow::... |
use std::collections::{HashMap, HashSet};
use std::sync::{Arc, RwLock};
use bitcoin::hashes::{hex::FromHex, sha256, Hash};
use bitcoin::{BlockHash, Txid};
use elements::confidential::{Asset, Value};
use elements::encode::{deserialize, serialize};
use elements::{issuance::ContractHash, AssetId, AssetIssuance, OutPoint,... |
#![allow(non_camel_case_types)]
use crate::ptr::{Array, WasmPtr};
use byteorder::{ReadBytesExt, WriteBytesExt, LE};
use std::fmt;
use std::mem;
use wasmer_runtime_core::types::ValueType;
pub type __wasi_advice_t = u8;
pub const __WASI_ADVICE_DONTNEED: u8 = 0;
pub const __WASI_ADVICE_NOREUSE: u8 = 1;
pub const __WASI_... |
use std::fmt;
use async_trait::async_trait;
use erased_serde::serialize_trait_object;
use futures::future::BoxFuture;
use serde::{
ser::{SerializeStruct, Serializer},
Deserialize,
Serialize,
};
use serde_json::json;
use crate::{event::Event, pointer, HapType, Result};
mod generated;
pub use generated::*... |
use crate::assets_cache::AssetsCache;
use crate::client::Client;
use crate::consts;
use crate::framebuffer::FramebufferSystem;
use glutin::event::{Event, KeyboardInput, VirtualKeyCode, WindowEvent};
#[cfg(feature = "imgui_inspect")]
use imgui::Context;
#[cfg(feature = "imgui_inspect")]
use imgui_winit_support::{HiDpiMo... |
use std::cmp::PartialEq;
use std::collections::HashMap;
use diesel::result::{Error as DieselResultError, Error::DatabaseError};
use diesel::{ExpressionMethods, Insertable, MysqlConnection, QueryDsl, Queryable, RunQueryDsl, debug_query};
use diesel::mysql::Mysql;
use serde::{Deserialize, Serialize};
use crate::create_... |
use super::broker::MetaDataBroker;
use super::core::{CoordinateError, ProxyMetaRetriever, ProxyMetaSender};
use crate::common::cluster::{ClusterName, Proxy, Role, SlotRange};
use crate::common::proto::{ClusterConfigMap, ClusterMapFlags, ProxyClusterMap, ProxyClusterMeta};
use crate::common::response::{ERR_NOT_MY_META, ... |
use crate::blocks::{BlockDirection, BlockFacing, BlockPos};
use crate::chat::ChatComponent;
use crate::items::{Item, ItemStack};
use crate::network::packets::clientbound::*;
use crate::network::NetworkClient;
use crate::plot::worldedit::{WorldEditClipboard, WorldEditUndo};
use crate::utils::HyphenatedUUID;
use byteorde... |
use derivative::Derivative;
use super::{
conn::PendingConnection,
connection_requester,
connection_requester::{
ConnectionRequest,
ConnectionRequestReceiver,
ConnectionRequestResult,
ConnectionRequester,
},
establish::ConnectionEstablisher,
manager,
manager::... |
// Attribution:
// Thanks kn team https://github.com/micouy/kn
use alphanumeric_sort::compare_os_str;
use nu_protocol::ShellError;
use nu_protocol::Span;
use powierza_coefficient::powierża_coefficient;
use std::cmp::{Ord, Ordering};
use std::{
convert::AsRef,
ffi::{OsStr, OsString},
fs::DirEntry,
mem,
... |
#![cfg_attr(not(feature = "std"), no_std)]
/// Edit this file to define custom logic or remove it if it is not needed.
/// Learn more about FRAME and the core library of Substrate FRAME pallets:
/// <https://substrate.dev/docs/en/knowledgebase/runtime/frame>
#[cfg(test)]
mod mock;
#[cfg(test)]
mod tests;
#[cfg(featur... |
use rustc::hir;
use rustc::middle::const_val::{ConstEvalErr, ConstVal, ErrKind};
use rustc::middle::const_val::ErrKind::{TypeckError, CheckMatchError};
use rustc::mir;
use rustc::ty::{self, TyCtxt, Ty, Instance};
use rustc::ty::layout::{self, LayoutOf};
use rustc::ty::subst::Subst;
use syntax::ast::Mutability;
use syn... |
use std::rc::Rc;
use nalgebra::{Matrix4, Vector3, Matrix};
use super::{Color, Texture, SharedData, RectRenderer};
use super::glwrap::*;
///////////////////////////////////////////////////////////////////////////////////////////////////// GridMetrics
#[allow(dead_code)]
struct GridMetrics {
// Tile size in pixels... |
use actix::{Actor, ActorContext, Addr, AsyncContext, Handler, Message, Running, StreamHandler};
use actix_web::{App, Error, HttpResponse, HttpRequest, HttpServer};
use actix_web::dev::BodyEncoding;
use actix_web::http::header::{ContentEncoding, ContentType};
use actix_web::middleware;
use actix_web::web;
use actix_web_... |
use cgmath::prelude::*;
use std::iter;
use wgpu::util::DeviceExt;
use winit::{
event::*,
event_loop::{ControlFlow, EventLoop},
window::Window,
};
mod camera;
mod dynamics;
mod model;
mod post;
mod quad;
mod rand_util;
mod sampler;
mod screenshot;
mod sphere;
mod tail_buffer;
mod texture;
mod util;
use mod... |
use std::mem::size_of;
use std::ptr::copy_nonoverlapping;
use std::os::raw::c_void;
pub fn recursive_bf(img: &mut [u8],
sigma_spatial: f32,
sigma_range: f32,
width: u32,
height: u32,
channel: u32)
->... |
#![cfg(test)]
use std::io::Cursor;
use std::ops::DerefMut;
use std::path::Path;
use std::pin::Pin;
use std::task::{Context, Poll};
use std::time::Duration;
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
use crate::common::resources::{CpuRequest, NumOfCpus, ResourceDescriptor, ResourceRequest};
use crate::common::{... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00..0x8c - PAD_%s control register"]
pub pad__ctrl: [crate::Reg<pad__ctrl::PAD__CTRL_SPEC>; 35],
#[doc = "0x8c - PAD_%s control register(ffe exclusive)"]
pub pad_35_ctrl_ffe: crate::Reg<pad__ctrl_ffe::PAD__CTRL_FFE_SPEC>,
#[... |
use std::{error::Error, f32::consts::PI};
use bevy::{prelude::*, tasks::AsyncComputeTaskPool};
use blackout::{
bevy_input_actionmap::InputMap,
bevy_openal::{Buffer, Sound, SoundState},
core::{Area, Coordinates, Player, PointLike},
crossbeam_channel::{unbounded, Receiver, Sender},
derive_more::{Dere... |
use std::collections::HashMap;
use std::marker::PhantomData;
use std::sync::{Arc, RwLock};
use crate::crypto::feistel::{self, FeistelPrecomputed};
use crate::drgraph::{BucketGraph, Graph};
use crate::hasher::Hasher;
use crate::layered_drgporep::Layerable;
use crate::parameter_cache::ParameterSetIdentifier;
use crate::... |
//! Generates graphs and writes them to a file as adjacency matrices
//!
//! The graphs are:
//!
//! * random
//! * undirected
//! * weighted
//! * completely connected
//! * made of nodes whose edges follow the triangle inequality
//! (going directly from A to B is cheaper than going from A to C to B. Nodes are genera... |
mod l1;
mod l2;
use std::sync::Arc;
use std::time::Duration;
use crate::{
core::{
ContractRoot, GlobalRoot, StarknetBlockHash, StarknetBlockNumber, StarknetBlockTimestamp,
},
ethereum::{
log::StateUpdateLog,
state_update::{DeployedContract, StateUpdate},
Chain,
},
r... |
use std::collections::HashMap;
use rtlola_frontend::ir::{
ArithLogOp, Constant, Expression, ExpressionKind, InputStream, Offset, OutputStream, StreamReference,
};
use rtlola_frontend::RTLolaIR;
use z3::ast::{Ast, Int};
use z3::{Config, Context};
use crate::utils::{get_linear_and_recursive_streams, max_memory_bound,... |
// Copyright 2016 The Cartographer 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 or... |
// Code used in the crate test suite.
use std::convert::{TryFrom, TryInto};
use std::io::{Read, Write};
use std::mem::size_of;
use std::net::{TcpListener, TcpStream};
use std::sync::{Arc, Mutex};
use std::thread;
use std::time::Duration;
use byteorder::{ReadBytesExt, WriteBytesExt, LE};
use once_cell::sync::Lazy;
use... |
// 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... |
use glam::*;
use shared::MeshShaderConstants;
use std::any::TypeId;
use std::default::Default;
use std::ffi::CString;
use ash::{vk, Device};
use crate::game::SpvFile;
use crate::mesh::*;
use crate::render_pass_common::*;
use crate::vulkan_base::*;
use crate::vulkan_helpers::*;
#[allow(dead_code)]
pub struct RenderMe... |
use std::fmt;
use serde::{Deserialize, Serialize};
use serde_with::skip_serializing_none;
use yaserde_derive::{YaDeserialize, YaSerialize};
use crate::{
Attribution, ConfidenceLevel, Date, EnumAsString, EventRole, EvidenceReference, Id, Identifier,
Lang, Note, PlaceReference, ResourceReference, SourceReferenc... |
//! ## Path stroke tessellator
//!
//! Tessellation routines for path stroke operations.
//!
//! ## Overview
//!
//! The stroke tessellation algorithm simply generates a strip of triangles along
//! the path. This method is fast and simple to implement, howerver it means that
//! if the path overlap with itself (for ex... |
#[cfg(debug_assertions)]
#[macro_use] extern crate log;
extern crate crypto;
#[cfg(debug_assertions)]
extern crate env_logger;
extern crate futures;
extern crate getopts;
extern crate hyper;
extern crate librespot;
extern crate rpassword;
#[macro_use]
extern crate serde_json;
extern crate tokio_core;
extern crate tokio... |
//! Hooks used to have Git call back into `git-branchless` for various functionality.
use std::borrow::Cow;
use std::collections::{HashMap, HashSet};
use std::convert::TryInto;
use std::ffi::{OsStr, OsString};
use std::fmt::Write;
use std::fs::File;
use std::io::{stdin, BufRead, BufReader, Read, Write as WriteIo};
use... |
pub mod config;
pub mod source;
use crate::config::*;
use crate::source::Source;
use crate::source::EOZ;
use core::hash::Hash;
use core::hash::Hasher;
use core::ptr;
use std::collections::HashSet;
use std::fmt;
use std::mem;
use std::string;
const TOK_OFS: i32 = 256;
const TOK_and: i32 = 257;
const TOK_break: i32 = ... |
use std::error::Error;
use std::process::Command;
use imgui::*;
use glium::{
Surface,
backend::Facade,
};
use glium::glutin::event_loop::EventLoop;
use glium::glutin::event::{Event, WindowEvent, VirtualKeyCode};
use glium::glutin::dpi::LogicalSize;
use support::{init, Program, Framework, LoopSignal, run, begin_fram... |
use std::cmp::Ordering;
use std::collections::BinaryHeap;
use std::fmt::Display;
use std::time::Instant;
use aoc_2021::get_input;
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]
struct Edge {
node: (usize, usize),
cost: u8,
}
#[derive(Copy, Clone, Eq, PartialEq)]
struct State {
position: (usize, usize),... |
use crate::redis::listpack;
use crate::redis::listpack::{MemoizedValue, UnsafeAppender, Value};
use spin::Mutex;
use std::ptr;
use std::sync::Arc;
use super::*;
use super::record::*;
// Redis Streams entry flags
pub const STREAM_ITEM_FLAG_NONE: i32 = 0; /* No special flags. */
pub const STREAM_ITEM_FLAG_... |
//! Server logic for driving the library via commands.
use std::cell::RefCell;
use std::collections::{HashMap, HashSet};
use std::hash::Hash;
use std::rc::Rc;
use std::time::{Duration, Instant};
use timely::communication::Allocate;
use timely::dataflow::operators::capture::event::link::EventLink;
use timely::dataflow... |
// 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... |
// Symphonia
// Copyright (c) 2020 The Project Symphonia Developers.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
use symphonia_core::{errors::end_of_stream_... |
use crate::constants::*;
use crate::is_syllable;
pub trait Syllable {
fn composable_u32(&self) -> u32;
fn to_u32(&self) -> u32;
fn to_index(&self) -> u32;
}
#[derive(Debug, PartialEq)]
pub enum Choseong {
Giyeok,
SsangGiyeok,
Nieun,
Digeut,
SsangDigeut,
Rieul,
Mieum,
Bieup,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.