text stringlengths 3.09k 13.9k |
|---|
use proc_macro::TokenStream;
use proc_macro2::TokenStream as TokenStream2;
use quote::quote;
use syn::{
braced,
parse::{Parse, ParseStream, Result},
parse_macro_input, Attribute, ExprPath, Ident, Token, Visibility,
};
struct Input {
thr: Thr,
local: Local,
index: Index,
threads: Threads,
... |
#[derive(Debug, Clone, serde :: Deserialize, serde :: Serialize)]
#[doc = ""]
pub struct Post {
#[doc = ""]
pub content: String,
}
#[allow(unused_imports)]
use ::humblegen_rt::deser_helpers::{
deser_param, deser_post_data, deser_query_primitive, deser_query_serde_urlencoded,
};
#[allow(unused_imports)]
pub ... |
use crate::layout::*;
#[derive(Copy, Clone, Debug)]
enum Expression<'s> {
Some(&'s str),
None,
}
#[derive(Copy, Clone, Debug)]
struct Tape<'s> {
current: Expression<'s>,
next: Expression<'s>,
}
impl<'s> Tape<'s> {
fn new(current: Expression<'s>, next: Expression<'s>) -> Tape<'s> {
Tape { ... |
#[cfg(not(feature = "library"))]
use cosmwasm_std::entry_point;
use cosmwasm_std::{to_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult, Coin, BankMsg, has_coins};
use cosmwasm_std::Addr;
use cw2::set_contract_version;
use crate::error::ContractError;
use crate::msg::{ExecuteMsg, InstantiateMsg, Que... |
use ncollide::shape::{Ball, Capsule, Cuboid, ShapeHandle};
use nphysics::force_generator::DefaultForceGeneratorSet;
use nphysics::joint::{
DefaultJointConstraintSet, FixedConstraint, PrismaticConstraint, RevoluteConstraint,
};
use nphysics::object::{
BodyPartHandle, ColliderDesc, DefaultBodyHandle, DefaultBodyS... |
use crate::build_config::BuildConfig;
use crate::error::{err, ok, CompileError, CompileResult};
use crate::parse_tree::Expression;
use crate::parser::Rule;
use crate::span::Span;
use crate::{parse_array_index, Ident};
use pest::iterators::Pair;
#[derive(Debug, Clone)]
pub struct Reassignment {
// the thing being r... |
use mio::net::{TcpListener, TcpStream};
use mio::*;
use std::net;
use std::sync::{Arc, Barrier};
use std::thread::{self, sleep};
use std::time::Duration;
mod util;
use util::{any_local_address, assert_send, assert_sync, init};
#[test]
fn is_send_and_sync() {
assert_sync::<Poll>();
assert_send::<Poll>();
... |
//! A PostgreSQL `CREATE TABLE` declaration.
use itertools::Itertools;
use std::{
collections::{HashMap, HashSet},
fmt,
};
use super::{PgColumn, PgDataType, PgName, PgScalarDataType};
use crate::common::*;
use crate::schema::Column;
use crate::separator::Separator;
/// Should we check the PostgreSQL catalog ... |
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use super::commodity_channel_index::CommodityChannelIndexInstance;
use super::CommodityChannelIndex;
use crate::core::{Action, Error, Method, PeriodType, ValueType, Window, OHLC};
use crate::core::{IndicatorConfig, IndicatorInitializer, IndicatorInstance, ... |
/*!
An application that show how to use the TreeView control.
Requires the following features: `cargo run --example treeview_d --features "tree-view tree-view-iterator listbox image-list frame"`
*/
extern crate native_windows_derive as nwd;
extern crate native_windows_gui as nwg;
use nwd::NwgUi;
use nwg::Nat... |
use amethyst::{
core::cgmath::{InnerSpace, Vector2},
core::Transform,
ecs::{Entities, Join, Read, ReadStorage, System, WriteStorage},
renderer::{SpriteRender, Transparent},
};
use config::GameoffConfig;
use crate::component::{Ally, Animation, Motion, Player};
use rand::distributions::{Distribution, Unif... |
//! Generate exit proof for exodus mode given account and token
//! correct verified state should be present in the db (could be restored using `data-restore` module)
use serde::Serialize;
use std::time::Instant;
use structopt::StructOpt;
use zksync_crypto::params::MIN_NFT_TOKEN_ID;
use zksync_crypto::proof::EncodedSi... |
//! libuser CRT0 relocation
//! Contains stuffs to handle basic dynamic relocation.
// Assembly blob can't get documented, but clippy requires it.
#[allow(clippy::missing_docs_in_private_items)]
mod module_header {
global_asm!(r#"
.section .rodata.mod0
.global module_header
module_header:
.asci... |
//! RTC driver, nRF5X-family
use core::cell::Cell;
use kernel::common::cells::OptionalCell;
use kernel::common::registers::{register_bitfields, ReadOnly, ReadWrite, WriteOnly};
use kernel::common::StaticRef;
use kernel::hil::time::{self, Alarm, Ticks, Time};
use kernel::ErrorCode;
const RTC1_BASE: StaticRef<RtcRegist... |
#[macro_use]
extern crate bitflags;
pub(crate) mod au;
pub(crate) mod controller;
pub(crate) mod twitch;
use crate::au::Lerper;
use anyhow::{anyhow, Result};
use log::{debug, error, info, warn};
use std::{
fs::{File, OpenOptions},
io::{Read, Write},
str::from_utf8,
sync::{Arc, RwLock},
thread::sp... |
// Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::collections::{HashMap, HashSet};
use std::rc::Rc;
use hcons::Hc;
use crate::decl_defs::{
CeVisibility, DeclTy, DeclTy_, F... |
use pest::iterators::{Pair};
use template::{ComponentTemplate, TemplateAttribute, TemplateValue};
#[derive(Parser)]
#[grammar = "template/language.pest"]
pub struct TemplateParser;
pub fn parse_document(document_pair: Pair<Rule>) -> Result<Vec<ComponentTemplate>, String> {
assert_eq!(document_pair.as_rule(), Rul... |
use std::io;
use crate::directory::OwnedBytes;
use crate::positions::COMPRESSION_BLOCK_SIZE;
use crate::postings::compression::{BlockDecoder, VIntDecoder};
use common::{BinarySerializable, VInt};
/// When accessing the position of a term, we get a positions_idx from the `Terminfo`.
/// This means we need to skip to t... |
use std::fs::File;
use std::io::{ErrorKind, Error as IoError};
use std::path::{Path, PathBuf};
use tracing::{debug, instrument};
use semver::Version;
use fluvio_index::{HttpAgent, PackageId, Target, WithVersion, PackageVersion};
use crate::FLUVIO_EXTENSIONS_DIR;
use fluvio_types::defaults::CLI_CONFIG_PATH;
use crate::e... |
use geo::{Line};
use gre::line_intersection::*;
use gre::*;
use noise::*;
use std::f64::consts::PI;
use svg::node::element::path::Data;
use svg::node::element::*;
fn round_point ((x,y):(f64,f64)) -> (f64, f64) {
let precision = 0.01;
((x/precision).round()*precision, (y/precision).round()*precision)
}
fn art... |
// Copyright (c) The Starcoin Core Contributors
// SPDX-License-Identifier: Apache-2.0
use clap::Parser;
use sp_utils::stop_watch::start_watch;
use starcoin_chain::verifier::Verifier;
use starcoin_chain::verifier::{BasicVerifier, ConsensusVerifier, FullVerifier, NoneVerifier};
use starcoin_chain::{BlockChain, ChainRea... |
//! Named interrupts for the Ibex core.
#![allow(dead_code)]
pub const PWRMGRWAKEUP: u32 = 0x50;
pub const USBDEV_CONNECTED: u32 = 0x4f;
pub const USBDEV_FRAME: u32 = 0x4e;
pub const USBDEV_RX_BITSTUFF_ERR: u32 = 0x4d;
pub const USBDEV_RX_PID_ERR: u32 = 0x4c;
pub const USBDEV_RX_CRC_ERR: u32 = 0x4b;
pub const USBDEV... |
use std::ffi::OsStr;
use std::path::{Path, PathBuf};
use std::fs::File;
use regex::Regex;
use failure::Error;
use walkdir::{DirEntry, WalkDir};
use todo::attrs::Attrs;
use todo::command::store::Find as CanFind;
use todo::command::store::fs::AttrParser;
use todo::command::{Command, IssueCommand};
use todo::error::TodoE... |
use crate::events::events::{EventProvider, Result};
use chrono::prelude::*;
use gtk::prelude::*;
use regex::Regex;
use serde_derive::{Deserialize, Serialize};
use std::borrow::Cow;
use std::collections::hash_map::*;
use std::fs::File;
use std::io::{Read, Write};
#[cfg(unix)]
use std::os::unix::fs::PermissionsExt;
use s... |
use proc_macro2::{Span, TokenStream};
use proc_macro_error::emit_error;
use quote::quote;
use syn::parse::{Parse, ParseStream};
use syn::{
parse_file, parse_quote, visit_mut, Attribute, Ident, ItemFn, LitStr, ReturnType, Signature,
};
mod body;
mod lifetime;
mod signature;
pub use body::BodyRewriter;
use signatur... |
//! FBX 7.4 footer.
use byteorder::{ByteOrder, LittleEndian};
use log::debug;
use crate::{
low::FbxVersion,
pull_parser::{
error::DataError,
v7400::{FromParser, Parser},
Error as ParserError, ParserSource, SyntacticPosition, Warning,
},
};
/// FBX 7.4 footer.
///
/// Data containe... |
use crate::color::*;
use std::{process::exit, u8};
use std::fs::create_dir;
use std::process::Command;
use substring::Substring;
pub struct Details
{
pub frac_type: String,
pub imgx: u32,
pub imgy: u32,
pub scalex: f64,
pub scaley: f64,
pub centerx: f64,
pub centery: f64,
pub imax: u32,... |
#![cfg(test)]
use super::*;
use crate as pallet_aleph;
use frame_support::{
construct_runtime, parameter_types, sp_io,
traits::{OnFinalize, OnInitialize},
weights::RuntimeDbWeight,
};
use primitives::AuthorityId;
use sp_core::H256;
use sp_runtime::{
impl_opaque_keys,
testing::{Header, TestXt, Uint... |
use nom::{types::CompleteStr, *};
use crate::ir::{define::Define, FnSig};
#[derive(Clone, Debug, PartialEq)]
pub enum Item<'a> {
// `@__pre_init = unnamed_addr alias void (), void ()* @DefaultPreInit`
Alias(&'a str, &'a str),
// `; ModuleID = 'ipv4.e7riqz8u-cgu.0'`
Comment,
// `source_filename =... |
use std::ops::Deref;
use env::Env;
use eval::funcall;
use expr::{Error as E, Expr, Kfloat, Kint, Result, Type};
use util::*;
// since rust's macro cannot treat binop, work around macro is needed.
macro_rules! expr {
($e:expr) => {
$e
};
}
macro_rules! def_arith_op {
($name: ident, $op: tt, $init:... |
use cratesio_dbdump_csvtab::rusqlite::Connection;
use cratesio_dbdump_lookup::{get_versions, CrateDependency, CrateLookup};
use rand::{thread_rng, Rng};
use serde::Deserialize;
use std::{fs, io, path::PathBuf, str::FromStr};
#[derive(Deserialize, Debug, Clone)]
#[serde(deny_unknown_fields)]
pub struct Asset {
pub ... |
//! The internal `Value` serialization API.
//!
//! This implementation isn't intended to be public. It may need to change
//! for optimizations or to support new external serialization frameworks.
use std::any::TypeId;
use super::{Error, Fill, Slot};
pub(super) mod cast;
pub(super) mod fmt;
#[cfg(feature = "kv_unst... |
use super::*;
use proc_macro2::TokenStream as TokenStream2;
use quote::{quote, ToTokens, TokenStreamExt};
use syn::{
parse::{Parse, ParseBuffer, ParseStream},
Expr, Ident, LitStr, Result, Token,
};
// =======================================
// Parse the VNode::Element type
// =================================... |
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use crate::genesis;
use crate::Config;
use anyhow::Result;
use debug_ignore::DebugIgnore;
use multiaddr::Multiaddr;
use narwhal_config::Committee as ConsensusCommittee;
use narwhal_config::Parameters as ConsensusParameters;
use narwhal_cry... |
use std::{cell::RefCell, rc::Rc, sync::mpsc};
use derive_more::Constructor;
use super::{KeyState, MouseState, WindowState, CONSOLE};
use crate::{
event::{ButtonState, KeyEvent, MouseButton, MouseEvent},
render::RenderContext2D,
window_adapter::WindowAdapter,
WindowRequest,
};
/// Represents a wrapper... |
use crate::app::command::Command;
use std::cmp::Ordering;
use std::fmt::{Display, Formatter, Result as FmtResult};
use std::time::Instant;
/// Prefix character for indicating command input.
pub const COMMAND_PREFIX: char = ':';
/// Prefix character for indicating search input.
pub const SEARCH_PREFIX: char = '/';
///... |
// SPDX-License-Identifier: MIT
//!
//! This shows a simple server providing two retrievable signals (via `get` or `subscribe`),
//! as well as one settable signal.
//! For a better understanding of the VIS specification make sure you read the specification `https://w3c.github.io/automotive/vehicle_data/vehicle_inform... |
// Copyright 2015 <NAME> (IRCAM)
// 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 wri... |
//! Basic geometry types.
use std::fmt;
use util::int_to_usize;
use info::Info;
use quirc_sys::{ quirc_point, quirc_code, quirc_data };
use quirc_sys::{ quirc_decode, quirc_decode_error_t };
use error::{ Error, Result };
use self::quirc_decode_error_t::QUIRC_SUCCESS;
/// A size, offset, or point in the 2-dimensional ... |
use reqwest::{StatusCode, Response, Body, Client};
use std::error::Error;
use std::fmt::{Formatter, Display};
use crate::adoptopenjdk::response::AvailableReleases;
use serde::de::DeserializeOwned;
use reqwest::header::{USER_AGENT, HeaderValue, HeaderMap};
use std::path::{Path, PathBuf};
use crate::utils::utils;
use st... |
use std::cmp::max;
use std::collections::VecDeque;
use std::future::Future;
use std::pin::Pin;
use std::task::Context;
use std::task::Poll;
use std::time::Duration;
use futures::Stream;
use telegram_bot_raw::{AllowedUpdate, GetUpdates, Integer, Update};
use crate::api::Api;
use crate::errors::Error;
const TELEGRAM_... |
// M_1_3_03
//
// Generative Gestaltung – Creative Coding im Web
// ISBN: 978-3-87439-902-9, First Edition, Hermann Schmidt, Mainz, 2018
// <NAME>, <NAME>, <NAME>, <NAME>
// with contributions by <NAME> and <NAME>
// Copyright 2018
//
// http://www.generative-gestaltung.de
//
// Licensed under the Apache License, Versi... |
use crate::config::{Client, Response};
use crate::ids::{InvoiceId, SubscriptionItemId, UsageRecordId, UsageRecordSummaryId};
use crate::params::{Expand, List, Object, Timestamp};
use crate::OpenPeriod;
use serde_derive::{Deserialize, Serialize};
/// The resource representing a Stripe "UsageRecord".
///
/// For more de... |
use crate::types::Evaluation;
use ethers::types::{TxHash, U256};
use rust_decimal::prelude::*;
use thiserror::Error;
use tokio_postgres::{config::Config, Client, NoTls};
/// Wrapper around PostGres for storing results in the database
pub struct MevDB<'a> {
client: Client,
table_name: &'a str,
overwrite: St... |
use crate::common::*;
mod ending_blank_line;
mod key_without_value;
mod lowercase_key;
mod quote_character;
mod space_character;
mod trailing_whitespace;
trait Fix {
fn name(&self) -> &str;
fn fix_warnings(
&self,
warnings: Vec<&mut Warning>,
lines: &mut Vec<LineEntry>,
) -> Optio... |
//! This crate provides a basic implementation of BIP32, BIP49, and BIP84.
//! It can be easily adapted to support other networks, using the
//! paramaterizable encoder.
//!
//!
//! Typically, users will want to use the `MainnetEncoder`, `DerivedXPub`, `DerivedXPriv` types,
//! which are available at the crate root. If... |
// Copyright (c) 2015-2017 <NAME>
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according t... |
use std::{
borrow::Cow,
fmt,
};
use clang::Entity;
use maplit::hashmap;
use once_cell::sync::Lazy;
use crate::{
Constness,
CompiledInterpolation,
DefaultElement,
DefinitionLocation,
Element,
EntityElement,
GeneratedElement,
GeneratorEnv,
ReturnTypeWrapper,
StrExt,
type_ref::TemplateArg,
TypeRef,
};
#[d... |
use crate::Srs;
use anyhow::anyhow;
use anyhow::Result;
use dialoguer::theme::Theme;
use dialoguer::Confirm;
use srs_cli::Card;
use srs_cli::DeckStats;
use srs_cli::GlobalStats;
use std::io;
pub struct App<W: io::Write> {
srs: Srs,
output: W,
}
impl<W: io::Write> App<W> {
pub fn new(srs: Srs, output: W) -... |
use cardano::{block::{block, Block, BlockHeader, BlockDate, RawBlock, HeaderHash}, tx::{TxAux}};
use cardano::hash::{HASH_SIZE_256};
use storage;
use std::io::Write;
use std::time::{SystemTime, Duration};
use std::thread;
use futures::{Future, Stream};
use hyper::Client;
use tokio_core::reactor::Core;
use network::{R... |
use std::ops::Index;
use std::rc::Rc;
use std::sync::Arc;
use crate::aliases::WinResult;
use crate::co;
use crate::gui::{RadioButton, RadioButtonOpts};
use crate::gui::events::{EventsView, RadioGroupEvents};
use crate::gui::resizer::{Horz, Vert};
use crate::gui::traits::{baseref_from_parent, Child, Parent, Wi... |
use wasm_bindgen::prelude::Closure;
use wasm_bindgen::JsCast;
use web_sys::WebGl2RenderingContext as GL;
use web_sys::*;
pub fn get_webgl2_context(height: u32, width: u32) -> Result<GL, String> {
let document = window().unwrap().document().unwrap();
let canvas = document
.get_element_by_id("canvas")
... |
use super::util::{log_error_and_continue, logged_write};
use crate::options::fetch_specs::Args;
use ci_info;
use discovery_parser::{generated::ApiIndexV1, DiscoveryRestDesc, RestDescOrErr};
use failure::{err_msg, format_err, Error, ResultExt};
use google_cli_generator::{all, CombinedMetadata as Metadata};
use log::info... |
use std::collections::{HashMap, HashSet};
use std::sync::Mutex;
use parking_lot_core::{park, unpark_one, DEFAULT_PARK_TOKEN, DEFAULT_UNPARK_TOKEN};
use crate::point::Point;
#[derive(Hash, PartialEq, Eq, Copy, Clone)]
pub struct LockKey(usize, bool);
struct Inner<Point> {
read: HashMap<LockKey, (Vec<[Point; 2]>,... |
#![cfg_attr(not(test), no_std)]
use longfi_sys;
pub use longfi_sys::AntPinsMode_t as AntPinsMode;
pub use longfi_sys::BoardBindings_t as BoardBindings;
pub use longfi_sys::ClientEvent_t as ClientEvent;
pub use longfi_sys::LongFiAuthCallbacks as AuthCb;
pub use longfi_sys::LongFiAuthMode_t as AuthMode;
pub use longfi_s... |
/*
* Copyright 2018 ProximaX Limited. All rights reserved.
* Use of this source code is governed by the Apache 2.0
* license that can be found in the LICENSE file.
*/
use {
::std::{future::Future, pin::Pin, sync::Arc},
reqwest::Method,
};
use crate::{
account::{AccountsId, Address},
api::{
... |
use core::{Model, Material, RayIntersection, Ray, RayIntersectionError};
use defs::{Point3, Vector3, FloatType};
use tools::{CompareWithTolerance};
use na;
use na::{Unit};
use std;
use uuid::{Uuid};
pub struct SolidSphere {
material: Material,
origo: Point3,
radius: FloatType,
identifier: Uuid
}
impl ... |
mod graphite;
#[cfg(feature = "score_script")]
use rlua::prelude::*;
mod alive_test;
mod traffic;
use parking_lot::Mutex;
use rand::{self, Rng};
use std::{
self,
collections::{HashMap, HashSet},
io,
net::SocketAddr,
sync::Arc,
time::{Duration, SystemTime},
};
#[cfg(feature = "score_script")]
use... |
use ndarray::Array3;
use regex::Regex;
use std::{
cmp::{max, min},
collections::HashMap,
ops::RangeInclusive,
};
#[derive(Debug, Clone, Copy)]
pub enum ReactorState {
On,
Off,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct Cuboid {
x: RangeInclusive<i32>,
y: RangeInclusive<i32>,... |
pub mod blockchain;
pub use self::blockchain::{Crypto, SignedTransaction, Transaction, UnverifiedTransaction};
use client::remove_0x;
use crypto::PubKey;
use crypto::{pubkey_to_address, sign, Encryption, Hashable, KeyPair, PrivateKey, Signature};
use hex;
use protobuf::Message as MessageTrait;
use protobuf::{parse_fro... |
//! All preliminary steps to prepare reading files
use std::fs::OpenOptions;
use std::path::PathBuf;
use simplelog::*;
use crate::configuration::{config::Config, script::Script};
use crate::logfile::snapshot::Snapshot;
use crate::misc::extension::Expect;
use crate::misc::nagios::Nagios;
use crate::{args::CliOptions, ... |
use amethyst::{
ecs::*,
core::Transform,
renderer::*,
input::*
};
use components::{
block::Block,
cursor::Cursor,
kind_generator::KindGenerator,
playfield::stack::Stack,
};
use block_states::swap::SWAP_TIME;
use block_states::block_state::change_state;
use data::block_data::*;
use std:... |
use itertools::Itertools;
use std::collections::{HashMap, HashSet};
use std::io::{self, Read};
fn main() -> io::Result<()> {
let mut stdin = io::stdin();
let mut buffer = String::new();
stdin.read_to_string(&mut buffer)?;
part_one(&buffer);
part_two(&buffer);
Ok(())
}
fn parse_input(buffer: &s... |
use super::ppu::{Ppu,VideoSink};
use super::spu::Spu;
use super::cart::Cart;
use super::timer::Timer;
use super::gamepad::Gamepad;
use super::GameboyType;
const ZRAM_SIZE: usize = 0x7f;
const RAM_SIZE: usize = 1024 * 32;
pub struct Interconnect {
gameboy_type: GameboyType,
pub cart: Cart,
ppu: Ppu,
sp... |
use crate::index::metadata::AudioMetadata;
use md5::{Digest, Md5};
use sqlx::Sqlite;
pub async fn add_song(metadata: AudioMetadata, pool: sqlx::Pool<Sqlite>) {
// find or create new artist/s
let artist = artist_foc(metadata.clone(), pool.clone()).await.unwrap();
// find/create new album
let album = alb... |
use super::super::PFCPError;
use super::ie_type;
use super::_3gpp_interface_type::_3GPPInterfaceType;
use super::f_teid::FTEID;
use super::network_instance::NetworkInstance;
use super::qfi::QFI;
use super::sdf_filter::SDFFilter;
use super::source_interface::SourceInterface;
use super::ue_ip_address::UEIPAddress;
#[de... |
//
//
// This file is a part of Aleph
//
// https://github.com/nathanvoglsam/aleph
//
// MIT License
//
// Copyright (c) 2020 Aleph Engine
//
// 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 Softwar... |
use crate::odometry::{Pose, Twist};
use crate::sensor::laserscanner::{Scan, Measurement};
use crate::gridmap::grid_map::GridMap;
use crate::math::scalar::PI;
use crate::geometry::Point;
/// Computes the motion model probability of a sampled pose.
/// This is the probability p(x_t | x_t-1, u_t) of being at pose x_t aft... |
use std::sync::{Arc, Mutex};
use crate::native_java_classes::{NativeArrayInstance, NativeByteInstance, NativeCharInstance, NativeNullInstance, NativeShortInstance};
use crate::native_java_classes::NativeBooleanInstance;
use crate::native_java_classes::NativeFloatInstance;
use crate::native_java_classes::NativeDoubleIn... |
use crate::error::{ConfigError, Error, ErrorKind, OviumError};
use crate::types::*;
use crossbeam_channel::unbounded;
use crossbeam_utils::thread;
use log::{error, info};
use serde::Deserialize;
use signal_hook::{iterator::Signals, SIGINT};
use ssh2::Session;
use std::collections::HashMap;
use std::fs::File;
use std::i... |
mod test_utils;
use chrono::{DateTime, TimeZone, Utc};
use maplit::hashmap;
use ring::rand::SystemRandom;
use std::collections::HashMap;
use std::fs::{self, create_dir_all, File};
use std::num::NonZeroU64;
use std::path::Path;
use tempfile::TempDir;
use test_utils::{dir_url, test_data, DATA_1, DATA_2, DATA_3};
use tou... |
use std::convert::TryInto;
use std::ffi::{CStr, CString, OsString};
use std::mem;
use std::os::raw::c_char;
use std::os::unix::ffi::{OsStrExt, OsStringExt};
use std::path::{Path, PathBuf};
use std::ptr::{null, null_mut};
use gio_sys::*;
use glib_sys::*;
use gobject_sys::*;
use gtk_sys::*;
use super::{AlertConfig, Ale... |
// 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 writing, software
// distributed unde... |
use std::cmp::max;
use std::io::{stderr, stdout, Write};
use std::sync::atomic::{AtomicUsize, Ordering};
use ansi_term::{ANSIGenericString, Colour, Style};
use log::{Level, LevelFilter, Log, Metadata, Record, SetLoggerError};
use unicode_segmentation::UnicodeSegmentation;
/// Where to log errors to.
#[derive(Clone, C... |
// font.rs
//
// Copyright (C) 2018-2020 Minnesota Department of Transportation
//
//! Bitmap fonts are used on dynamic message signs.
use crate::dms::multi::SyntaxError;
use crate::dms::Result;
use log::debug;
use pix::{rgb::SRgb8, Raster};
use std::collections::HashMap;
/// A character for a bitmap [font].
///
/// ... |
use cosmwasm_std::{StdError, StdResult, Uint128, Binary};
use cw20::{Cw20Coin, Logo};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use cw0::Expiration;
#[derive(Serialize, Deserialize, JsonSchema, Debug, Clone, PartialEq)]
pub struct InstantiateMarketingInfo {
pub project: Option<String>,
pub... |
use itertools::{iproduct, Itertools};
use rand::Rng;
use rayon_adaptive::adaptive_sort_raw_with_policies_swap_blocks;
use rayon_adaptive::Policy;
use std::fs::File;
use std::io::prelude::*;
use std::iter::{once, repeat_with};
use thread_binder::ThreadPoolBuilder;
use time::precise_time_ns;
/// Return a random vector o... |
//! # OpenTelemetry Zipkin Exporter
//!
//! Collects OpenTelemetry spans and reports them to a given Zipkin collector
//! endpoint. See the [Zipkin Docs](https://zipkin.io/) for details and
//! deployment information.
//!
//! ## Quickstart
//!
//! First make sure you have a running version of the zipkin process you wan... |
// Copyright © 2018 <NAME>
// [This program is licensed under the "MIT License"]
// Please see the file LICENSE in the source
// distribution of this software for license terms.
//! Map data management for Plan B.
use std::collections::HashMap;
use std::error::Error;
use std::fs::File;
use std::slice;
use libflate::... |
//! Provides the parser for Portal 2 Live Timer splits files.
use std::io::{self, BufRead};
use std::result::Result as StdResult;
use std::num::ParseFloatError;
use {GameTime, Run, Segment, TimeSpan};
quick_error! {
/// The Error types for splits files that couldn't be parsed by the Portal 2
/// Live Timer Pa... |
// Copyright 2018-2020, Wayfair GmbH
//
// 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... |
pub fn run(config: Config) -> Result<String, std::io::Error> {
match config.cmd {
CMD::Init{ path } => init(&path),
CMD::Doc{ path } => doc(&path),
CMD::Did{ path } => did(&path),
CMD::Help => help()
}
}
fn init(path: &str) -> Result<String, std::io::Error> {
use std::io::W... |
use mio::tcp::{TcpStream, TcpListener};
use mio::{Poll, Token, Ready, PollOpt, Events};
use std::net;
use std::net::SocketAddr;
use std::sync::mpsc;
use std::thread;
use std::thread::{JoinHandle};
use std::io::Write;
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
use errors::*;
use brunch::{send_m... |
//! Adapters and utilities for working with audio buffers.
use std::marker::PhantomData;
mod blocks;
mod samples;
pub use blocks::{Block, BlockChannelsIter, BlocksIter};
pub use samples::{ChannelSamples, ChannelSamplesIter, SamplesIter};
/// The audio buffers used during processing. This contains the output audio o... |
use std::fs::File;
use mpeg2ts;
use mpeg2ts::{
ts::{TsPacket, TsHeader, TsPayload, Pid, ContinuityCounter},
pes::PesHeader,
};
pub struct TransportStream {
video_continuity_counter: ContinuityCounter,
audio_continuity_counter: ContinuityCounter,
packets: Vec<TsPacket>,
}
impl TransportStream {
... |
//! Request traits.
use crate::api::Join;
use crate::error::Result;
use serde::de::DeserializeOwned;
use stellar_base::asset::{Asset, CreditAssetType};
use url::Url;
/// Records order.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum Order {
/// Order in ascending order.
Ascending,
/// Order in descen... |
//!
//! # Profiles File Data Structure
//!
//! Profile file retrieves configurations from profile file into memory.
//!
use std::env;
use std::fs::read_to_string;
use std::io::Error as IoError;
use std::io::ErrorKind;
use std::path::{Path, PathBuf};
use dirs::home_dir;
use serde::Deserialize;
use types::defaults::{CL... |
use std::cell::*;
use std::collections::*;
use std::ops::Range;
use std::rc::Rc;
use rand::*;
use rand::prelude::StdRng;
use juggle::dy::*;
use juggle::*;
use juggle::utils::*;
struct MockClock(Rc<Cell<u64>>);
impl TimerClock for MockClock {
type Duration = u64;
type Instant = u64;
fn start(&self) -> Self... |
use std::sync::Arc;
use serde_json::Value as JsonValue;
use pulldown_cmark::Parser;
use pulldown_cmark::{Options as ParserOptions, OPTION_ENABLE_TABLES};
use writium::prelude::*;
use writium_cache::{Cache, DumbCacheSource};
use api::index::Index;
use super::template::*;
pub struct RootView {
index_templa... |
extern crate linkify;
use linkify::LinkFinder;
use std::cmp;
use std::collections::vec_deque::VecDeque;
use std::collections::HashSet;
pub struct TextBuffer {
xsize: usize,
ysize: usize,
raw_lines: VecDeque<String>,
}
impl TextBuffer {
pub fn new(max_x_chars: usize, max_y_chars: usize) -> Self {
... |
use crate::storages::archetypes::EntityLocation;
use crate::storages::components::ComponentTypeIdx;
use crate::storages::core::CoreStorage;
use crate::storages::systems::SystemProperties;
use crate::system_params::internal::{QuerySystemParamWithLifetime, SystemParamWithLifetime};
use crate::{SystemData, SystemInfo};
p... |
use crate::events::*;
use serde::Deserialize;
use std::collections::BTreeMap;
use std::ffi::OsStr;
use std::path::{Path, PathBuf};
const PREFIX: Option<&'static str> = option_env!("PREFIX");
pub(crate) type Device = String;
pub(crate) type GestureMap = BTreeMap<Gesture, Action>;
type BoxedError = Box<dyn std::error:... |
use std::ops::Index;
use cargo_metadata::camino::Utf8PathBuf;
use cargo_metadata::Metadata;
use clap::crate_version;
use clap::Clap;
use color_eyre::eyre::Context;
use color_eyre::eyre::ContextCompat;
use color_eyre::eyre::Result;
use color_eyre::owo_colors::colors::xterm::UserGreen;
use color_eyre::owo_colors::colors... |
use std::collections::BTreeMap;
use std::convert::TryInto;
use std::ops::{Deref, Index};
use bytes::Buf;
use crate::wad::{self, Lump, Wad};
/// A bank of [`Texture`]s from the `TEXTURE1` and `TEXTURE2` lumps, indexed by name.
#[derive(Clone, Debug)]
pub struct TextureBank(BTreeMap<String, Texture>);
impl TextureBan... |
use futures_util::StreamExt;
use std::{convert::Infallible, marker::PhantomData, pin::Pin};
use tokio::io::AsyncBufReadExt;
/// Streaming side: zero or more `Event`s can be passed in this direction,
/// Terminated by `Finish`
pub struct Streaming<E, F>(Infallible, PhantomData<(E, F)>);
impl<E, F> crate::Direction for... |
/*!
Object-oriented draw APIs
!*/
// re-export draw traits
pub use anf_gfx::cmd::traits::*;
use {
anf_gfx::{
batcher::{
bufspecs::{ColoredVertexData, QuadData},
Batcher,
},
cmd::{QuadParams, QuadPush, SpritePush},
geom2d::*,
},
fna3d_hie::Pipeline,... |
use crate::{
core::{
camera::CameraDt,
geometry::{Bounds2i, RayDifferentials, Vector3f},
integrator::{uniform_sample_one_light, Integrator, SamplerIntegrator},
interaction::{MediumInteraction, SurfaceInteraction},
lightdistrib::{create_light_sample_distribution, LightDistribu... |
//! Board representation of hexapawn
use std::fmt::Display;
use std::ops::ControlFlow;
use board_game::board::Board as BoardTrait;
use board_game::board::BoardMoves;
use board_game::board::Outcome;
use board_game::board::Player;
use board_game::board::UnitSymmetryBoard;
use chess::{BitBoard, Color};
use internal_iter... |
use std::{
collections::{hash_map::DefaultHasher, HashMap},
fmt,
hash::{Hash, Hasher},
marker::PhantomData,
};
use derivative::Derivative;
use derive_new::new;
use gilrs::{Axis, Button, Event, EventType, GamepadId, Gilrs};
use amethyst_core::{
ecs::prelude::{System, SystemData, World, Write},
... |
#![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://docs.substrate.io/v3/runtime/frame>
pub use pallet::*;
#[cfg(test)]
mod mock;
#[cfg(test)]
mod tests;
#[cfg(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.