text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
/// Basic definition of some running process. #[derive(Debug)] pub struct Process { pub pid: usize, pub name: String, } #[cfg(windows)] mod natives { #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] const PROCESS_LEN: usize = 10192; use logging::...
the_stack
use std; use std::cell; use pyo3::*; use futures::{future, unsync, Async, Poll}; use boxfnonce::BoxFnOnce; use TokioEventLoop; use utils::{Classes, PyLogger}; use pyunsafe::{GIL, OneshotSender, OneshotReceiver}; #[derive(Copy, Clone, PartialEq, Debug)] pub enum State { Pending, Cancelled, Finished, } pub...
the_stack
use std::{ cell::RefCell, collections::{hash_map::Entry, HashMap}, sync::{ atomic::{AtomicBool, Ordering}, Arc, }, thread::JoinHandle, thread_local, time::{Duration, Instant}, usize, }; use log::{error, trace, warn}; use once_cell::sync::Lazy; use parking_lot::{Condvar, Mutex, MutexGuard, RwLock}; use x11r...
the_stack
/// Camenisch-Shoup verifiable encryption. /// Based on the paper Practical Verifiable Encryption and Decryption of Discrete Logarithms. https://www.shoup.net/papers/verenc.pdf. /// Various code comments refer this paper /// Need to be used with Anonymous credentials as described in Specification of the Identity /// Mi...
the_stack
use anyhow::{anyhow, bail, ensure, Context, Result}; use bookfile::Book; use bytes::Bytes; use lazy_static::lazy_static; use postgres_ffi::pg_constants::BLCKSZ; use tracing::*; use std::cmp; use std::collections::hash_map::Entry; use std::collections::HashMap; use std::collections::{BTreeSet, HashSet}; use std::fs; us...
the_stack
use std::str::Utf8Error; use crate::list::encoding::*; use crate::list::encoding::varint::*; use crate::list::{Frontier, OpLog}; use crate::list::remote_ids::{ConversionError, RemoteId}; use crate::list::frontier::{frontier_eq, frontier_is_sorted}; use crate::list::internal_op::OperationInternal; use crate::list::opera...
the_stack
pub const flexfloat_h: u32 = 1; pub const _STDINT_H: u32 = 1; pub const _FEATURES_H: u32 = 1; pub const __USE_ANSI: u32 = 1; pub const _BSD_SOURCE: u32 = 1; pub const _SVID_SOURCE: u32 = 1; pub const __USE_ISOC11: u32 = 1; pub const __USE_ISOC99: u32 = 1; pub const __USE_ISOC95: u32 = 1; pub const _POSIX_SOURCE: u32 = ...
the_stack
use std::str::FromStr; use std::sync::Arc; use std::io::{self, Read, BufReader, BufRead}; use std::str::from_utf8; use std::fs::{File, read_dir}; use std::collections::{HashMap, HashSet}; use libc; use cantal::itertools::{NextValue, NextStr}; use frontend::graphql::ContextRef; use history::Key; use scan::cgroups::CGr...
the_stack
use chrono::{Datelike, Local, NaiveDate, Offset, TimeZone}; use chrono_tz::{OffsetComponents, Tz, TZ_VARIANTS}; use num_integer::Integer; use serde_derive::{Deserialize, Serialize}; use crate::errs::{BaseError, BaseResult}; use std::lazy::SyncLazy; use std::{fmt, str::FromStr}; #[derive(Debug, Default, Eq, PartialEq...
the_stack
mod utils; use fluence_faas::FluenceFaaS; use fluence_faas::IType; use once_cell::sync::Lazy; use serde_json::json; use std::rc::Rc; static ARG_CONFIG: Lazy<fluence_faas::TomlFaaSConfig> = Lazy::new(|| { let mut arrays_passing_config = fluence_faas::TomlFaaSConfig::load("./tests/wasm_tests/arrays_passin...
the_stack
use std::ops::{AddAssign, Mul, MulAssign}; use std::sync::Arc; use std::time::Instant; use ff::{Field, PrimeField}; use group::{prime::PrimeCurveAffine, Curve}; use pairing::MultiMillerLoop; use rand_core::RngCore; use rayon::prelude::*; use super::{ParameterSource, Proof}; use crate::domain::EvaluationDomain; use cr...
the_stack
#![allow(clippy::cognitive_complexity, clippy::too_many_arguments)] mod builder; mod guard; mod pipe; mod socket; mod types; pub use self::builder::*; pub use self::guard::*; pub use self::pipe::*; pub use self::socket::*; pub use self::types::*; use crate::syscalls::types::*; use crate::utils::map_io_err; use crate:...
the_stack
// This file is generated by rust-protobuf 2.22.1. Do not edit // @generated // https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] #![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #!...
the_stack
#[allow(unused)] fn runner() -> crate::TestRunner { super::runner() } mod greater_than { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn both() { assert_eq!( runner().err("a {b: calc(var(--c)) > calc(var(--d))}\n"), "Error: Undefined op...
the_stack
//! Local caching of bundle data. //! //! This module implements Tectonic’s local filesystem caching mechanism for TeX //! support files. To enable efficient caching with proper invalidation //! semantics, the caching layer does *not* merely wrap [`IoProvider`] //! implementations. Instead, a cacheable bundle must impl...
the_stack
pub struct Sha1 { state: [u32; STATE_LEN], block: [u8; U8_BLOCK_LEN], total: usize, in_block: usize, } impl Sha1 { pub fn new() -> Self { Self { state: SHA1_INIT_STATE, block: [0u8; U8_BLOCK_LEN], in_block: 0, total: 0 } } pub fn update(&mut self, bytes: &[u8]) { // first w...
the_stack
use whitebox_raster::*; use whitebox_common::structures::Array2D; use crate::tools::*; use num_cpus; use std::env; use std::f64; use std::i64; use std::io::{Error, ErrorKind}; use std::path; use std::sync::mpsc; use std::sync::Arc; use std::thread; /// This tool calculates the most elevation percentile (EP) across a r...
the_stack
//! Protocol-agnostic service implementation use std::collections::HashMap; use std::marker; use std::sync::{Arc, RwLock, RwLockReadGuard, RwLockWriteGuard}; use super::{GenericId, GenericNodeTable, Node}; static MAX_NODE_COUNT: usize = 16; /// Result of the find operations - either data or nodes closest to it. #[d...
the_stack
use std::iter::Iterator; use super::ast::*; use super::token:: {TokenSpan, Lit}; use super::lex::Lexer; use std::mem::swap; use super::token::Token; use super::Span; use super::super::storage::SqlType; use super::parser; use std::collections::HashMap; // ================================================================...
the_stack
use super::handler::FloodsubHandler; use super::metrics; use super::protocol::{ FloodsubMessage, FloodsubRpc, FloodsubSubscription, FloodsubSubscriptionAction, }; use futures::prelude::*; use futures::task::{Context, Poll}; use libp2p_core::connection::ConnectionId; use libp2p_core::{Multiaddr, PeerId}; use libp2p...
the_stack
use super::AllocatedNum; use super::{AllocatedBit, Boolean, Num}; use crate::{ circuits::{Coeff, ConstraintSystem, LinearCombination, SynthesisError}, fields::Field, Curve, }; use subtle::CtOption; /// A curve point. It is either the identity, or a valid curve point. /// /// Internally it is represented ei...
the_stack
// You should have received a copy of the MIT License // along with the Jellyfish library. If not, see <https://mit-license.org/>. use crate::{RescueParameter, ROUNDS, STATE_SIZE}; use ark_bls12_377::Fq; // the constants in this file are generated with // https://github.com/EspressoSystems/Marvellous/blob/fcd4c41672f...
the_stack
use std::{mem, thread}; use std::cell::RefCell; use {global, hazard, guard, debug, settings}; use garbage::Garbage; thread_local! { /// The state of this thread. static STATE: RefCell<State> = RefCell::new(State::default()); } /// Add new garbage to be deleted. /// /// This garbage is pushed to a thread-local...
the_stack
use std::sync::atomic::{self, AtomicPtr}; use std::{mem, thread}; use {debug, local}; /// Pointers to this represents the blocked state. static BLOCKED: u8 = 0; /// Pointers to this represents the free state. static FREE: u8 = 0; /// Pointers to this represents the dead state. static DEAD: u8 = 0; /// The state of a...
the_stack
use ff::PrimeField; use crate::iop::*; use crate::polynomials::*; use crate::fft::multicore::*; use crate::SynthesisError; use crate::utils::log2_floor; pub mod fri_on_values; pub mod verifier; pub mod query_producer; /* This module contains a FRI implementation. Set of traits is generic enough to have FRI with `nu`...
the_stack
use std::sync::Arc; use crate::{ ast::{SrcSpan, TypedExpr}, type_::{ self, AccessorsMap, Environment, ExprTyper, FieldMap, ModuleValueConstructor, RecordAccessor, Type, ValueConstructor, ValueConstructorVariant, }, uid::UniqueIdGenerator, }; fn compile_expression(src: &str) -> TypedExp...
the_stack
use std::mem::size_of; use crate::common::util::{any_as_bytes, Pod}; /// The `Pipeline` trait, which allows render pipelines to be defined more-or-less declaratively. fn create_shader<S>( device: &wgpu::Device, compiler: &mut shaderc::Compiler, name: S, kind: shaderc::ShaderKind, source: S, ) -> ...
the_stack
use crate::weechat_utils::MessageManager; use indexmap::IndexMap; use lazy_static::lazy_static; use regex::Regex; use serenity::{ cache::{Cache, CacheRwLock}, model::{id::ChannelId, prelude::*}, prelude::*, }; use std::{borrow::Cow, sync::Arc}; use weechat::{Buffer, ConfigOption, Weechat}; #[derive(Debug, ...
the_stack
macro_rules! extend_dataframe_explore { //implementation of a trait to send/receive with mpi ($name:ident, input {$($input:ident: $input_ty:ty)*}, vec {$($input_vec:ident: [$input_ty_vec:ty; $input_len: expr])*} ) => { unsafe impl Equivalence for $name { type Out = UserDatatype; ...
the_stack
mod handler; mod state; use state::State; use crate::{ data::{Request, Response}, net::{Codec, DataStream, Transport, TransportListener, TransportReadHalf, TransportWriteHalf}, server::{ utils::{ConnTracker, ShutdownTask}, PortRange, }, }; use futures::stream::{Stream, StreamExt}; use ...
the_stack
use std::error; use std::fmt::{self, Debug, Display}; use std::io; use std::result; /// This type represents the possible errors when parsing S-expression /// data. pub struct Error { /// This `Box` allows us to keep the size of `Error` as small as possible. A /// larger `Error` type was substantially slower d...
the_stack
use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; use strum_macros::{EnumDiscriminants, EnumProperty, EnumString}; use syn::*; use to_syn_value_derive::ToDeriveInput; /* * This crate exists to generate the Instruction enum in * src/instructions.rs and its adjoining impl functi...
the_stack
use std::ops::{Deref, DerefMut}; use crate::entity::borrow::Reborrow; use crate::entity::storage::prelude::*; use crate::entity::storage::{AsStorage, AsStorageMut, Fuse, StorageTarget}; use crate::entity::view::{Bind, ClosedView, Rebind}; use crate::graph::core::Core; use crate::graph::data::{Data, GraphData, Parametr...
the_stack
use super::array::Array; use super::guard::{Guard, GuardMut}; use super::heap::Box; use core::marker::PhantomData; use core::ops::{Add, Div, Mul, Rem, Sub}; use core::ops::{Bound, RangeBounds}; use scale::alloc::GetAllocator; use scale::*; use scale::{alloc::Allocate, LoadFromMem, Reveal, StoreInMem}; /// An array dat...
the_stack
use anyhow::Result; use clap::Parser; #[cfg(feature = "selfupdate")] fn run_individual_config_wizard(install_choices: &mut InstallChoices) -> Result<()> { use std::path::PathBuf; use log::trace; use requestty::{Question, prompt}; trace!("install_location pre inside the prompt function {:?}", instal...
the_stack
use super::{ device::{RawDevice, VkDevice, VkDeviceProperties}, surface::VkSurface, }; use ash::{ extensions::{ ext::DebugUtils, khr::{Surface, Swapchain}, }, prelude::VkResult, vk::{self, Handle}, }; use raw_window_handle::HasRawWindowHandle; use std::{ffi::CStr, ops::Deref, s...
the_stack
use std::env; use std::f64; use std::f64::consts::PI; use std::io::{Error, ErrorKind}; use std::path; use std::str; use std::time::Instant; use whitebox_common::structures::Array2D; use whitebox_common::utils::get_formatted_elapsed_time; use whitebox_raster::*; /// This tool identifs grid cells in a DEM for which the ...
the_stack
//! Serialization tests #[cfg(any(not(feature = "proptest-support"), not(feature = "compare")))] compile_error!("Tests must be run with features `proptest-support` and `compare`"); #[macro_use] pub mod common; use nalgebra_sparse::coo::CooMatrix; use nalgebra_sparse::csc::CscMatrix; use nalgebra_sparse::csr::CsrMatri...
the_stack
use super::events::{ConfigType, Event, EventBody, EventProvider, Result, WordWrapMode}; use crate::config::Config; use crate::icons::*; use chrono::prelude::*; use core::time::Duration; use itertools::{join, Itertools}; use serde_derive::{Deserialize, Serialize}; use std::borrow::Cow; use std::collections::{HashMap, Ha...
the_stack
## Copyright (c) Microsoft. All rights reserved. ## Licensed under the MIT license. See LICENSE file in the project root for full license information. ############################################################################### # This script demonstrates creating X.509 certificates for an Azure IoT Hub # CA Cert de...
the_stack
# Copyright (c) 2018 Talkowski Laboratory # Contact: Ryan Collins <rlcollins@g.harvard.edu> # Distributed under terms of the MIT license. # Collects QC data for SV VCF output by SV pipeline set -e ###USAGE usage(){ cat <<EOF usage: collectQC.sh [-h] [-F FAM] [-R] VCF SVTYPES BENCHDIR OUTDIR Helper tool to collect ...
the_stack
set -euo pipefail SCRIPT_NAME=$(basename "$0") USER=$(whoami) PLATFORM_DUMP_FNAME="platform_dump.sql" PLATFORM_DB_NAME="yugaware" PROMETHEUS_SNAPSHOT_DIR="prometheus_snapshot" # This is the UID for nobody user which is used by the prometheus container as the default user. NOBODY_UID=65534 # When false, we won't stop/s...
the_stack
###################################################################### # # GETSTARTED.SH : The 1st Command Should Be Run To Get Your Access Token # To Start Using Kotoriotoko Commands # # Written by Shell-Shoccar Japan (@shellshoccarjpn) on 2020-05-06 # # This is a public-domain software (CC0). It means...
the_stack
#Functions, functions everywhere. #Below are # Logging setup. Ganked this entirely from stack overflow. Uses named pipe magic to log all the output of the script to a file. Also capable of accepting redirects/appends to the file for logging compiler stuff (configure, make and make install) to a log file instead of lo...
the_stack
##################################################################################### # ADS-B RECEIVER # ##################################################################################### # ...
the_stack
#mvn test -Dtest=org.apache.hadoop.hbase.regionserver.TestScanWithBloomError $* #exit #set to 0 to run only developpers tests (small & medium categories) runAllTests=0 #set to 1 to replay the failed tests. Previous reports are kept in # fail_ files replayFailed=0 #set to 0 to run all medium & large tests in a sing...
the_stack
DATE_UTILS_VERSION="date-utils.sh v2.2" [[ "$DATE_UTILS_SH" = "$DATE_UTILS_VERSION" ]] && return DATE_UTILS_SH="$DATE_UTILS_VERSION" export DATE_FORMAT="%F" source arg-utils.sh source talk-utils.sh help_date() { cat <<'EOF' The `date-utils` library enables easy management of dates and its year, month, and day comp...
the_stack
platform='unknown' unamestr=`uname` if [[ "$unamestr" == 'Linux' ]]; then platform='linux' elif [[ "$unamestr" == 'Darwin' ]]; then platform='darwin' fi # 1-100: g3.4 # 101-200: p2 # AMI="ami-660ae31e" AMI="ami-d0a16fa8" #extract #AMI="ami-7428ff0c" #extract #INSTANCE_TYPE="g3.4xlarge" #INSTANCE_TYPE="p2.xlarge...
the_stack
. ./cmd.sh . ./path.sh set -e fea_nj=32 nnet_nj=80 data_root=/home/heliang05/liuyi/sre.full/sre16_kaldi_list/ root=/home/heliang05/liuyi/sre.full/ data=$root/data exp=$root/exp mfccdir=$root/mfcc vaddir=$root/mfcc gender=pool export sre10_dir=$data_root/sre10_eval/ export sre10_train_c5_ext=$sre10_dir/coreext_c5/en...
the_stack
set -e LANG=en_US.UTF-8 ROOT=$(pwd) LOG_INFO() { local content=${1} echo -e "\033[32m[INFO] ${content}\033[0m" } LOG_ERROR() { local content=${1} echo -e "\033[31m[ERROR] ${content}\033[0m" } version_file="profile_version.sh" [[ ! -f "${version_file}" ]] && { LOG_ERROR " ${version_file} not exist, ...
the_stack
set -eu ##### User modifiable variables section ##### # SSH Command line SSH_USER="root" SSH_CMD="/usr/bin/ssh -x -a -q -2 -o \"ConnectTimeout=120\" -o \"PreferredAuthentications publickey\" -o \"StrictHostKeyChecking no\" -l ${SSH_USER}" ###### End of user modifiable variable section ##### # Counting for running be...
the_stack
set -e set -x # Enable core dumps # # Core files will be placed in /var/lib/systemd/coredump/ # Core files will be compressed with xz... use unxz to uncompress them # # To install the delve debugger, you will need to `go get -u github.com/go-delve/delve/cmd/dlv` # - An alias for the above, `gogetdlv`, should be issue...
the_stack
# # Sysbox installer integration-tests for scenarios where 'shiftfs' kernel # module is not available, and Docker must operat in 'userns-remap' mode. # load ../helpers/run load ../helpers/docker load ../helpers/fs load ../helpers/sysbox-health load ../helpers/installer function teardown() { sysbox_log_check } # #...
the_stack
set -o xtrace set -o errexit : ${CATFS:="false"} #COMMON=integration-test-common.sh #source $COMMON # Configuration TEST_TEXT="HELLO WORLD" TEST_TEXT_FILE=test-s3fs.txt TEST_DIR=testdir ALT_TEST_TEXT_FILE=test-s3fs-ALT.txt TEST_TEXT_FILE_LENGTH=15 BIG_FILE=big-file-s3fs.txt BIG_FILE_LENGTH=$((25 * 1024 * 1024)) fun...
the_stack
REPO_VERSION=${NVIDIA_TRITON_SERVER_VERSION} if [ "$#" -ge 1 ]; then REPO_VERSION=$1 fi if [ -z "$REPO_VERSION" ]; then echo -e "Repository version must be specified" echo -e "\n***\n*** Test Failed\n***" exit 1 fi if [ ! -z "$TEST_REPO_ARCH" ]; then REPO_VERSION=${REPO_VERSION}_${TEST_REPO_ARCH} fi...
the_stack
# include common function and variable definitions . `dirname $0`/prebuilt-common.sh . `dirname $0`/builder-funcs.sh CXX_STL_LIST="stlport libc++" PROGRAM_PARAMETERS="" PROGRAM_DESCRIPTION=\ "Rebuild one of the following NDK C++ runtimes: $CXX_STL_LIST. This script is called when pacakging a new NDK release. It wil...
the_stack
lock_dir=_sh05593 # Made on 2020-07-21 11:38 CEST by <root@kazhua>. # Source directory was '/var/lib/openqa/share/tests/opensuse/data'. # # Existing files will *not* be overwritten, unless '-c' is specified. # # This shar contains: # length mode name # ------ ---------- ------------------------------------------ ...
the_stack
# MIT Licence - Copyright (c) 2020 Bircan Bilici - Run at Scale # # 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,...
the_stack
# 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 # # THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, EITHER E...
the_stack
# Entire script assumes tezos-node runs as a service: echo "Starting the tezos-node-cpr.sh v 0.2 (etomknudsen, August 2021)" # Get timestamp for last reboot LAST_REBOOT=$(date -d "$(who -b | cut -c22-38)" +"%s") # Networking interface # Use "ls -la /sys/class/net/" to see which devices you have avaiable ALLOW_WIFI=t...
the_stack
#set -x # This script contains two parts. # The first part is meant as a library, declaring the variables and functions to spins off drand containers # The second part is triggered when this script is actually ran, and not # sourced. This part calls the function to setup the drand containers and run # them. It produce...
the_stack
python test_correlation.py --dataset_name summeval --aspect consistency --aligner_type bert --bert_model_type bert-base-uncased --aggr_type mean python test_correlation.py --dataset_name summeval --aspect consistency --aligner_type bert --aggr_type mean python test_correlation.py --dataset_name summeval --aspect consis...
the_stack
#colors vars LBLUE='\033[1;34m' LRED='\033[1;31m' LGREEN='\033[1;32m' RED='\033[0;31m' YELLOW='\033[1;33m' NONE='\033[0m' PURPLE='\033[1;35m' CYAN='\033[0;36m' GREEN='\033[0;32m' # #predifined vars S=1000 mon=Monitor man=Managed version="3.1" language="English" #user="clu3bot" github="https://github.com/clu3bot/" file...
the_stack
php_lib_download(){ for i in "$PHP_LIBICONV_VERSION.tar.gz" "$PHP_LIBMCRYPT_VERSION.tar.gz" "$PHP_MHASH_VERSION.tar.gz" "$PHP_MCRYPT_VERSION.tar.gz" do if [ -s packages/$i ]; then echo "$i [found]" else echo "Error: $i not found!!!download now......" wget htt...
the_stack
## requires # /tmp/caesar/ points to desired results directory also containing the racecar.log file # $HOME/data to point to folder containing racecar/labrun* export CAESAR_EX_DIR=$HOME/.julia/dev/Caesar/examples/wheeled/racecar/ # julia102 -O 3 -p 4 apriltag_and_zed_slam.jl --folder_name "labrun8" --failsafe # julia...
the_stack
# As Cardano Rosetta is mostly some queries and data mapping it makes no sense to mock repository # queries as, after that, it's just some data mapping nad that's it. In order to test our queries # we can populate the test db with some real mainnet data. We are already importing a mainned snapshot # but using a whole m...
the_stack
# set -e: Terminate script if a command returns an error set -e # set -u: Terminate script if an unset variable is used set -u # set -x: Debugging use, print each statement # set -x ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null |...
the_stack
## COPY of functions-issue96.sh with a marker emebedded in the file # # Copyright © 2008-2013 RAAF Technology bv # # This file is part of Session. # # Session is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, e...
the_stack
# CC is an associative array that holds data specific to creating a cluster. declare -A _CC # Declare externally defined variables ---------------------------------------- # Defined in GL (globals.sh) declare OK ERROR STDERR STOP TRUE FALSE K8SVERSION # Getters/Setters -----------------------------------------------...
the_stack
__upterm_debug() { if [[ -n ${BASH_COMP_DEBUG_FILE:-} ]]; then echo "$*" >> "${BASH_COMP_DEBUG_FILE}" fi } # Homebrew on Macs have version 1.3 of bash-completion which doesn't include # _init_completion. This is a very minimal version of that function. __upterm_init_completion() { COMPREPLY=() ...
the_stack
# # Copyright (c) 2019 Google LLC # 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 req...
the_stack
. ./common_proc.sh . ./config.sh currDir=$PWD # Be careful when you rename parameter names, certain things # are used in Python scripts # Notes on the number candidates generated # 1. if the user doesn't specify the # of candidates explicitly (candQty in JSON), it's set to the maximum # of answers to produce # 2. if...
the_stack
# # Copyright 2020 New Relic Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # # New Relic agent installation script. # : ${nrversion:="UNSET"} # # This must run as root. # myuid=`id -u 2>/dev/null` if [ "${myuid}" != "0" ]; then echo "ERROR: $0 must be run as root" >&2 exit 1 fi if [ ...
the_stack
COMMANDLINE_ARGS="$@" EXEC_OPTION="" SERVER_NAME="boot" # ------------------------------------------------------------------------ # HELPERS # a simple helper to get the current user setCurrentUser(){ CUSER="`whoami 2>/dev/null`" # Solaris hack if [ ! $? -eq 0 ]; then CUSER="`/usr/ucb/whoami 2>/dev/null...
the_stack
tfp="azurerm_resources" prefixa="tres" at=`az account get-access-token -o json` bt=`echo $at | jq .accessToken | tr -d '"'` sub=`echo $at | jq .subscription | tr -d '"'` tput clear rm -f resources.txt noprovider.txt *.json echo -n "Getting Resources .." #ris=`printf "curl -s -X GET -H \"Authorization: Bearer %s\" -H...
the_stack
# see https://github.com/openshift/origin/blob/master/hack/util.sh # Provides simple utility functions # tryuntil loops, retrying an action until it succeeds or times out after 90 seconds. function tryuntil { timeout=$(($(date +%s) + 90)) echo "++ Retrying until success or timeout: ${@}" while [ 1 ]; do if eval ...
the_stack
######################################## #logging setup: Stack Exchange made this. snorby_logfile=/var/log/snorby_install.log mkfifo ${snorby_logfile}.pipe tee < ${snorby_logfile}.pipe $snorby_logfile & exec &> ${snorby_logfile}.pipe rm ${snorby_logfile}.pipe ######################################## #Metasploit-like ...
the_stack
__mmh_debug() { if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then echo "$*" >> "${BASH_COMP_DEBUG_FILE}" fi } # Homebrew on Macs have version 1.3 of bash-completion which doesn't include # _init_completion. This is a very minimal version of that function. __mmh_init_completion() { COMPREPLY=() _get_com...
the_stack
# Change login shell to zsh. This is default shell for MacOS Catalina and above, this is only for legacy systems # chsh -s /bin/zsh # install homebrew apps repositories manager /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" # add repo with drivers to cask (needed fo...
the_stack
get_bars() { bars=( $(ps aux | awk '! /awk/ && /lemonbar/ { print $NF }') ) bar_count=${#bars[*]} } kill_bar() { local pid=$(ps aux | awk '!/barctl.sh/ { if(/-n \<'$bar'\>/) print $2 }' | xargs) [[ $pid ]] && kill $pid } kill_running_script() { local running_pids=( $(pidof -o %PPID -x ${0##*/}) ) ((${#running_p...
the_stack
################################################################################## # Script to setup the development environment that we use in Wolox for Mac. # # # # Usage: ...
the_stack
# Source this file from the $IMPALA_HOME directory to # setup your environment. If $IMPALA_HOME is undefined # this script will set it to the current working directory. export JAVA_HOME=${JAVA_HOME:-/usr/java/default} if [ ! -d $JAVA_HOME ] ; then echo "JAVA_HOME must be set to the location of your JDK!" retur...
the_stack
set -e -u -x iso_name=operos iso_label="OPEROS_$(date +%Y%m)" iso_version=$(date +%Y.%m.%d) install_dir=operos arch=$(uname -m) work_dir=work out_dir=out sfs_comp="xz" verbose="" devbuild="" script_path=$(readlink -f ${0%/*}) _usage () { echo "usage ${0} [options]" echo echo " General options:" echo ...
the_stack
_checkTerminalSize_() { # DESC: # Checks the size of the terminal window. Updates LINES/COLUMNS if necessary # ARGS: # NONE # OUTS: # NONE # USAGE: # _updateTerminalSize_ # CREDIT: # https://github.com/labbots/bash-utility shopt -s checkwinsize && (:...
the_stack
# Copyright 2015 The Kubernetes Authors 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 applicab...
the_stack
# annotate VCF using ANNOVAR # script filename script_path="${BASH_SOURCE[0]}" script_name=$(basename "$script_path") segment_name=${script_name/%.sh/} echo -e "\n ========== SEGMENT: $segment_name ========== \n" >&2 # check for correct number of arguments if [ ! $# == 3 ] ; then echo -e "\n $script_name ERROR: WRO...
the_stack
# This is similar with tdnn_opgru_1a but with correct num_leaves (7k rather than 11k), # aligments from lattices when building the tree, and better l2-regularization as opgru-1a # from fisher-swbd. # ./local/chain/compare_wer_general.sh tdnn_opgru_1a_sp tdnn_opgru_1b_sp # System tdnn_opgru_1a_sp tdnn_opgru...
the_stack
. $srcdir/test-subr.sh # - hello.c # int say (const char *prefix); # # static char * # subject (char *word, int count) # { # return count > 0 ? word : (word + count); # } # # int # main (int argc, char **argv) # { # return say (subject (argv[0], argc)); # } # # - world.c # static int # sad (char c) # { # return...
the_stack
SCRIPT=$(readlink -f "$0") && cd $(dirname "$SCRIPT") # --- Script Init --- mkdir -p log rm -R -f log/* # --- Setup run dirs --- find output -type f -not -name '*summary-info*' -not -name '*.json' -exec rm -R -f {} + mkdir output/full_correlation/ rm -R -f /tmp/%FIFO_DIR%/fifo/* mkdir /tmp/%FIFO_DIR%/fifo/full_cor...
the_stack
# A setup script that will be easy to understand and # be used to configure the .env file for the install trap "exit" INT red=`tput setaf 1` green=`tput setaf 2` yellow=`tput setaf 3` cyan=`tput setaf 6` reset=`tput sgr0` defaultDir="~/hms-docker_data" defaultMount="/mnt/hms-docker_data" defaultDomain="local" defaultP...
the_stack
mkdir -p logs/drebin_new_7/ && \ nohup python -u main.py \ --data drebin_new_7 \ --newfamily-label 7 \ -c mlp \ -...
the_stack
# Magic line must be first in script (see README.md) s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi APPNAME=example cfg=$dir/conf.xml fyang=$dir/list.yang # Define default restconfig config: RESTCONFIG RESTCONFIG=$(restconf_config none false) # <CLICON_YANG_MODULE_MAIN>example</CLICON_YANG...
the_stack
# java.security.egd is needed for low-entropy docker containers # /dev/./urandom (as opposed to simply /dev/urandom) is needed prior to Java 8 # (see https://docs.oracle.com/javase/8/docs/technotes/guides/security/enhancements-8.html) # # NewRatio is to leave as much memory as possible to old gen test_jvm_args="-Xmx256...
the_stack
display_usage() { echo "" echo "Toranj Build script " echo "" echo "Usage: $(basename "$0") [options] <config>" echo " <config> can be:" echo " ncp : Build OpenThread NCP FTD mode with simulation platform" echo " ncp-15.4 : Build OpenThread NCP FTD mode wi...
the_stack
export SCRIPT_DIR=$(cd `dirname $0` && pwd -P) source ${SCRIPT_DIR}/functions export WORKSPACE=${WORKSPACE:-/tmp} export CEPH_VERSION=${CEPH_VERSION:-pacific} export PUPPET_MAJ_VERSION=${PUPPET_MAJ_VERSION:-5} export SCENARIO=${SCENARIO:-scenario001} export MANAGE_PUPPET_MODULES=${MANAGE_PUPPET_MODULES:-true} export M...
the_stack
# build-definitions.sh provides functions to build thirdparty dependencies. # These functions do not take positional arguments, but individual builds may # be influenced by setting environment variables: # # * PREFIX - the install destination directory. # * MODE_SUFFIX - an optional suffix to add to each build director...
the_stack
# Magic line must be first in script (see README.md) s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi APPNAME=example # Which format to use as datastore format internally : ${format:=xml} cfg=$dir/conf_yang.xml fyang=$dir/type.yang fyang2=$dir/example2.yang fyang3=$dir/example3.yang # transit...
the_stack
next_remote_tap() { TAP=$( ssh $SSH_OPTIONS "ifconfig -a | egrep 'tun[0-9]{1,2}' | sort -r | head -n1 | cut -d':' -f1 | cut -d' ' -f1" ) R=$? if [ "" == "$TAP" ]; then echo "tun0" return $R fi TAP=$[ $( echo $TAP | cut -c4- ) + 1 ] echo "tun$TAP" return $R } next_tap() { TAP=$( ifconfig -a | egrep 'tun[0-9]{1,2}'...
the_stack
function printBanner { set +x if test $# = 1 -o $# = 2 ; then TMPFILE=/tmp/hudson_${hudson_start_time_seconds} echo "*******************************************************************" >> $TMPFILE echo "${1}" >> $TMPFILE echo "" ...
the_stack
color=${@: -1} set_hsv() { sign=${2:0:1} #case $1 in # H) hue=${2:1};; # S) saturation=${2:1};; # V) value=${2:1};; #esac case $1 in h) offset_type=hue;; s) offset_type=saturation;; *) offset_type=value;; esac eval $offset_type=$2 #~/.orw/scripts/notify.sh "$offset_type ${!offset_type}" } while get...
the_stack