text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
export HPL_DIR=${HPL_DIR:-$(cd $(dirname $0) && pwd)} # The shared directory where scripts, data, and results are stored
export HPL_SCRIPTS_DIR=${HPL_SCRIPTS_DIR:-${HPL_DIR}} # The shared directory where these scripts are stored
## Set default options
niters=5
partition="batch"
usegres=1
hplai=0
maxnodes=9999
grestype... | the_stack |
# Secure WireGuard server installer for Debian, Ubuntu, CentOS, Fedora and Arch Linux
# https://github.com/angristan/wireguard-install
RED='\033[0;31m'
ORANGE='\033[0;33m'
NC='\033[0m'
function isRoot() {
if [ "${EUID}" -ne 0 ]; then
echo "You need to run this script as root"
exit 1
fi
}
function checkVirt() {... | the_stack |
# Convert ANSI (terminal) colours and attributes to HTML
# Licence: LGPLv2
# Author:
# http://www.pixelbeat.org/docs/terminal_colours/
# Examples:
# ls -l --color=always | ansi2html.sh > ls.html
# git show --color | ansi2html.sh > last_change.html
# Generally one can use the `script` util to capture full t... | the_stack |
export LC_NUMERIC="en_US.UTF-8"
# takes two time values in ns and returns their subtraction in HH:MM:SS:ms format
calcTimeFormat(){
dt=$(echo "$1 - $2" | bc)
dd=$(echo "$dt/86400" | bc)
dt2=$(echo "$dt-86400*$dd" | bc)
dh=$(echo "$dt2/3600" | bc)
dt3=$(echo "$dt2-3600*$dh" | bc)
dm=$(echo "$dt... | the_stack |
TEST_UTILS_VERSION="test-utils.sh v1.8"
[[ "$TEST_UTILS_SH" = "$TEST_UTILS_VERSION" ]] && return
TEST_UTILS_SH="$TEST_UTILS_VERSION"
export PATH=.:$HOME/lib:$PATH
source list-utils.sh
source help-util.sh
test_help() {
help_pager <<'EOF'
The `test-utils.sh` library provides an infrasructure for test-driven
developm... | the_stack |
## @description install yarn
## @audience public
## @stability stable
function install_yarn_insecure()
{
# change the soft link of etc
rm -f ${PACKAGE_DIR}/hadoop/yarn/etc
ln -s ${PACKAGE_DIR}/hadoop/yarn/etc_insecure ${PACKAGE_DIR}/hadoop/yarn/etc
initialize_temp_insecure
host=$(hostname)
inde... | the_stack |
# Background:
# https://medium.com/@lopp/how-to-run-bitcoin-as-a-tor-hidden-service-on-ubuntu-cff52d543756
# https://bitcoin.stackexchange.com/questions/70069/how-can-i-setup-bitcoin-to-be-anonymous-with-tor
# https://github.com/lightningnetwork/lnd/blob/master/docs/configuring_tor.md
# INFO
# --------------------
# b... | the_stack |
#
# Change the Git history of a repository
#
# Note: Running this script rewrites history for all repository collaborators.
# After completing these steps, any person with forks or clones must fetch
# the rewritten history and rebase any local changes into the rewritten history.
#
VERSION="v2.4.0"
# Set Defaults
SHOW... | the_stack |
# Copyright (c) 2011-2014 Benjamin Fleischer
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# lis... | the_stack |
usage()
{
cat << EOF
Usage: $0 [OPTIONS]
This script generates the office texts in EPUB format for one or several years.
OPTIONS:
-h Show this message
-y NUMBER The first year to generate the office for (e.g. 2017).
Defaults to the current year.
-t NUMBER The last year to g... | the_stack |
##############################################
##
## Richard J. Sears
## richardjsears@gmail.com
##
## system_backup.sh
##
## V1.0.0
## July 31th, 2020
##
##
## GardenPi System Backup and Restore Script
##
## This backup scripts makes a complete backup
## of all critical GardenPi system files including
## everything ne... | the_stack |
shopt -s extglob
export TIBANNA_VERSION=
export AWSF_IMAGE=
export SHUTDOWN_MIN=now
export PASSWORD=
export ACCESS_KEY=
export SECRET_KEY=
export REGION=
export SINGULARITY_OPTION_TO_PASS=
printHelpAndExit() {
echo "Usage: ${0##*/} -i JOBID -l LOGBUCKET -V VERSION -A AWSF_IMAGE [-m SHUTDOWN_MIN] [-p PASSWORD] [-a ... | the_stack |
#No semicolons after numerical values please, and a space before comments (this file is read into matlab, so certain rules have to be followed) also no / in the end of paths as I add them later
hd=~/HEAD/DART/models/gitm #directory where gitm is located
rd=/nobackup/NYXUSERNAME #temporary directory where you want to ru... | the_stack |
use Getopt::Long;
use Git;
use strict;
use utf8;
use Encode qw(encode);
my $Repo = Git->repository($ENV{"GIT_DIR"} || ".");
my $Pretty_fmt = "format:%s";
my $Reverse_order = 1;
my $Show_all = 1;
my $Show_rebase = 1;
my $Style = 1;
my $Subvine_depth = 2;
my $With_sha = 0;
my %Color ... | the_stack |
buildperfbreakdownlambdalatencysummary() {
echo USAGE: perfbreakdown arg1:FILE - arg2:Expected latency - arg3:Size of input file - arg4:Number of runs
echo 1st arg: $1
echo 2nd arg: $2
echo 3rd arg: $3
echo 4th arg: $4
sleep 3
durationlambdalatencyaccnanosecs=0
cat $1 | grep durationlatency > durationla... | the_stack |
import os
import shutil
import sys
import tempfile
import zipfile
import optparse
import subprocess
import platform
import textwrap
import contextlib
import json
import codecs
from distutils import log
try:
from urllib.request import urlopen
from urllib.parse import urljoin
except ImportError:
from urllib... | the_stack |
set -e
#Script Behaviour Modifying Parameters (Change after throughly reading documentation)
EXEC_DIR=${EXEC_DIR:-$PWD}
SKIP_TESTS=${SKIP_TESTS:-true}
REMOVE_OLDER=${REMOVE_OLDER:-true}
BUILD_ONLY=${BUILD_ONLY:-false}
SKIP_BUILD=${SKIP_BUILD:-false}
SKIP_UI=${SKIP_UI:-false}
SKIP_SCHEDULER=${SKIP_SCHEDULER:-false}
SK... | the_stack |
# Copyright 2016-Present Couchbase, Inc.
#
# Use of this software is governed by the Business Source License included in
# the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that
# file, in accordance with the Business Source License, use of this software
# will be governed by the Apache License, ... | the_stack |
set -euo pipefail
doit() {
echo "@@@@ $@"
"$@"
}
QUICK=
while [ $# -gt 0 ]; do
case "$1" in
test )
;; # nothing
quick )
QUICK=quick
;;
caffeinate )
# Re-run preventing sleep.
shift
exec caffeinate -ims $0 $@
;;
tmpdir )
# Clone to a temp director... | the_stack |
## 版本号
Ver="Build 20220405-001-Alpha"
## 导入通用变量与函数
[[ -d "/ql/shell" ]] && dir_shell=/ql/shell
[[ -f "$dir_shell/share.sh" ]] && . $dir_shell/share.sh
## emoji 符号及分隔线
emoji_OK="✅"
emoji_NO="🚫"
emoji_UNKNOW="❓"
emoji_MSG="📑"
emoji_ON="🉑"
emoji_OFF="🈲"
emoji_NONE="🈚️"
emoji_DATE="📆"
emoji_SOS="🆘"
emoji_CHART="📊... | the_stack |
PV='pv -qL'
prompt()
{
# Set a color prompt to better mimic a Linux terminal.
/bin/echo -n -e "\n\e[1;32m[PMem@PMEM-CSI]$\e[0m "
# This is used for the cursor positioning of ansi escape characters
# Add the total number of characters in prompt + 1
prompt_col_start_position=17
}
command()
{
speed=$2
[ -... | the_stack |
utils_test_case no_args
no_args_body() {
cat >Kyuafile <<EOF
syntax(2)
test_suite("integration")
atf_test_program{name="metadata"}
atf_test_program{name="simple_all_pass"}
include("subdir/Kyuafile")
EOF
utils_cp_helper metadata .
utils_cp_helper simple_all_pass .
mkdir subdir
cat >subdir/Kyuafile <... | the_stack |
###################################################
# Check if account name is valid by a regex expression
# Globals: None
# Arguments: 1
# ${1} = Account name
# Result: read description and return 1 or 0
###################################################
_account_name_valid() {
name_account_name_valid="${1:?}" ... | the_stack |
# Copyright 2021 The Kubernetes 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 agreed to ... | the_stack |
# usage: install.sh update_dmg_mount_point installed_app_path current_version
#
# Called by Omaha v4 to update the installed application with a new version from
# the dmg.
#
# Exit codes:
# 0 Success!
# 1 Unknown Failure
# 2 Could not locate installed app path.
# 3 DMG mount point is not an absolute pat... | the_stack |
jarfilename="JavaSetup.jar"
tempdir=/var/tmp/install_$$
java_runtime="java"
java_runtime_set="no"
java_runtime_found="no"
java_runtime_sufficient="no"
java_versions_supported="1.4 1.5 1.6"
rpm2cpio_found="no"
rpm_found="no"
is_64bit_arch="no"
arch64string="x86_64"
arch64string2="64-bit"
sunjavahotspot="HotSpot"
errorte... | the_stack |
# For usage, please type
# ./increase-root-volume.sh
#
# By default, dry run is turned off. To turn it on, please set it to true
DRY_RUN=false
SCRIPT_NAME_BASE=increase-root-volume
SCRIPT_NAME=$SCRIPT_NAME_BASE.sh
LOG_FILE=$SCRIPT_NAME_BASE.log
DESCRIBE_INSTANCE_FILE="$SCRIPT_NAME_BASE-describe-instances-result.jso... | the_stack |
bebasid_banner(){
echo " _ _ _ _ "
echo "| |__ ___| |__ __ _ ___(_) __| |"
echo "| '_ \ / _ \ '_ \ / _' / __| |/ _' |"
echo "| |_) | __/ |_) | (_| \__ \ | (_| |"
echo "|_.__/ \___|_.__/ \__,_|___/_|\__,_|"
echo
echo "===== PEDULI INTERNET NETRAL ====="
echo
}
about(){
... | the_stack |
# Node Version Manager
# Implemented as a bash function
# To use source this file from your bash profile
#
# Implemented by Tim Caswell <tim@creationix.com>
# with much bash help from Matthew Ranney
has() {
type "$1" > /dev/null 2>&1
return $?
}
# Make zsh glob matching behave same as bash
# This fixes the "zsh: ... | the_stack |
if [ "$RANCHER_DEBUG" == "true" ]; then set -x; fi
SCALE=$(giddyup service scale etcd)
IP=$(giddyup ip myip)
META_URL="http://rancher-metadata.rancher.internal/2015-12-19"
STACK_NAME=$(wget -q -O - ${META_URL}/self/stack/name)
CREATE_INDEX=$(wget -q -O - ${META_URL}/self/container/create_index)
SERVICE_INDEX=$(wget -q... | the_stack |
# Copyright (c) 2019-2021, Saif Sidhik
# Copyright (c) 2013-2016, Rethink Robotics
# All rights reserved.
# This is a convenient script which will set up your ROS environment and
# should be executed with every new instance of a shell in which you plan on
# working with Franka ROS Interface or PandaRobot.
# This file... | the_stack |
###########################################################
# Configure Mesos One Box
#
# This installs the following components
# - zookeepr
# - mesos master
# - marathon
# - mesos agent
###########################################################
set -x
echo "starting mesos cluster configuration"
date
ps ax
SWARM_VE... | the_stack |
load environment
ASSERTION_SOURCE="$_GO_CORE_DIR/lib/bats/assertions"
load "$_GO_CORE_DIR/lib/bats/assertion-test-helpers"
setup() {
test_filter
mkdir "$BATS_TEST_ROOTDIR"
}
teardown() {
remove_bats_test_dirs
}
@test "$SUITE: fail prints status and output, returns error" {
expect_assertion_failure "echo 'He... | the_stack |
timestamp() {
date +"%Y-%m-%d_%H-%M-%S"
}
# change directory to add-on directory.
none_type_values=$1
bool_type_values=$2
add_on_directory='add-on'
merge_script_report='merge_report.txt'
user_input_file='user-input.yaml'
add_on_manifest='add_on_manifest.yaml'
echo "Merge script started." >> $merge_script_report
... | the_stack |
# The optimization code is based on pngslim (http://goo.gl/a0XHg)
# and executes a similar pipleline to optimize the png file size.
# The steps that require pngoptimizercl/pngrewrite/deflopt are omitted,
# but this runs all other processes, including:
# 1) various color-dependent optimizations using optipng.
# 2) optim... | the_stack |
clear
cd sanity-check || exit 1
echo "" > log.txt
export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc --all)
###############################################################################
cd c++03 || exit 1
cmake -E make_directory bgcc bclang
{ echo ""
echo "Using "${CMAKE_BUILD_PARALLEL_LEVEL}" jobs"
echo "-----------------... | the_stack |
set -Eeuo pipefail
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
reset=$(tput sgr0)
blue=$(tput setaf 4)
function logg() {
printf "${blue}##### $(date +"%H:%M:%S") # %-56.55s #####${reset}\n" "${1}"
}
function pushd () {
command pushd "$@" > /dev/null
}
function popd () {
comma... | the_stack |
# Tests for deploying a K8s cluster inside system container nodes and have them
# interconnected through flannel CNI.
#
# The system container nodes have K8s + Docker inside (i.e., K8s uses
# Docker to deploy pods).
#
# NOTE: the "cluster up" test must execute before all others,
# as it brings up the K8s cluster. Simil... | the_stack |
# #################################################
# Pre-requisites check
# #################################################
if (( ${BASH_VERSION%%.*} < 4 )); then
printf "This script uses associative arrays, requiring Bash 4.x minimum\n"
exit 2
fi
# check if curl is installed
type curl > /dev/null
if [[ $? -ne ... | the_stack |
# These build instructions are for ubuntu. Other linux distributions may have saner behaviour.
# The build script relies on the following assumptions:
# - You have already cloned ClassiCube from github
# - The root folder is ~/client/ (i.e. folder layout is ~/client/.git/, ~/client/src/, etc)
# First you need to instal... | the_stack |
load ../lib/bsfl
# is_ipv4()
# --------------------------------------------------------------#
@test "is_ipv4() with an empty string" {
run is_ipv4 ''
[ "$status" -eq 1 ]
[ "$output" == '' ]
}
@test "is_ipv4() with '.'" {
run is_ipv4 .
[ "$status" -eq 1 ]
[ "$output" == '' ]
}
@test "is_ipv4... | the_stack |
# Copyright 2020 Laboro.AI, Inc.
# (Authors: Shintaro Ando and Hiromasa Fujihara)
# Apache 2.0
# This recipe is based on the two following recipes:
# - We imported the hyperparameters and the training procedures from
# the CSJ recipe by Takafumi Moriya, Tomohiro Tanaka, Takahiro Shinozaki and Shinji... | the_stack |
GETHATTACHPOINT=`grep IPCFILE settings.txt | sed "s/^.*=//"`
PASSWORD=`grep PASSWORD settings.txt | sed "s/^.*=//"`
TEMPINFILE=`grep TEMPINFILE settings.txt | sed "s/^.*=//"`
FACTORYOUTPUTFILE=`grep FACTORYOUTPUTFILE settings.txt | sed "s/^.*=//"`
TOKENTRADERFACTORYSOL=`grep ^TOKENTRADERFACTORYSOL settings.txt | sed ... | the_stack |
#
# Copyright (C) 2021 IBM. All Rights Reserved.
#
# See the LICENSE file in the root directory
# of this source tree for licensing information.
#
#
# DeployToHPVS.sh
# ---------------
# Sign a FHE Toolkit Docker image and deploy it to a Hyper Protect Virtual
# Server (HPVS) instance in the IBM public cloud.
#... | the_stack |
# call somatic variants with Strelka
# 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 [ ! $# == 6 ] ; then
echo -e "\n $script_name ER... | the_stack |
# Both branches of the following `if` do the same thing -- define
# __skim_completion_options such that `eval $__skim_completion_options` sets
# all options to the same values they currently have. We'll do just that at
# the bottom of the file after changing options to what we prefer.
#
# IMPORTANT: Until we get to the... | the_stack |
# custom startup log
logfile=/mnt/startup.log
exec > $logfile 2>&1
# TODO: these are all duplicate settings; need to be removed
USE_HDFS=false
S3_BUCKET=canvasspadac
# not sure why FABRIC_HOME isn't automatically recognized here...
FABRIC_HOME=/usr/local/appistry/cloudiq/system
NETWORK_BRIDGE_HOME=/usr/local/appistry... | the_stack |
# MIT License
#
# Sherver: Pure Bash lightweight web server.
# Copyright (c) 2019 Rémi Ducceschi
#
# 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 limit... | the_stack |
Version=V6.6.7
function TITLE() {
clear && echo "Openwrt-AutoUpdate Script by Hyy2001 ${Version}"
}
function SHELL_HELP() {
TITLE
cat <<EOF
使用方法: bash $0 [-n] [-f] [-u] [-F] [-P] [-D <Downloader>] [--path <PATH>]
bash $0 [-x] [--path <PATH>] [--url <URL>]
更新固件:
-n 不保留配置更新固件 *
-u 适用于定时更新 LUCI 的参数 *
-f ... | the_stack |
###############################################################################
# This script is used to "lock" agents for nested tests. When we lock an agent,
# we alter the agent capability named "status" by appending the build id of
# the current run. We also add contextual information about the topology level
# (i.... | the_stack |
##############################################
# procedure: partition_create
##############################################
PROCEDURE=partition_create
/usr/bin/mysql -h${MYSQL_HOST} -u${MYSQL_USER} -p${MYSQL_PASSWORD} zabbix -e "show procedure status" | /usr/bin/grep -q ${PROCEDURE}
if [ "$?" != 0 ]; then
/usr/bin/... | the_stack |
test_description="Test dag command"
. lib/test-lib.sh
test_init_ipfs
test_expect_success "make a few test files" '
echo "foo" > file1 &&
echo "bar" > file2 &&
echo "baz" > file3 &&
echo "qux" > file4 &&
HASH1=$(ipfs add --pin=false -q file1) &&
HASH2=$(ipfs add --pin=false -q file2) &&
HASH3=$(ipfs add... | the_stack |
#
# -- Helper functions ----------------------------------------------------------
#
print_usage()
{
# Echo usage info.
echo " "
echo " ${script_name}"
echo " "
echo " Field G. Van Zee"
echo " "
echo " Generate a monolithic header by recursively replacing all #include"
echo " directives in a selected file with... | the_stack |
log "Starting Web Application Installation"
apt_install() {
if [[ $(apt-cache -n search ^${1}$ | awk '{print $1}' | grep ^${1}$) == "$1" ]] && [[ $(dpkg -s $1 2>&- | awk '/Status: / {print $NF}') != "installed" ]]; then
apt-get -qq -y install $1 >> $logFile 2>&1
if [[ $? -ne 0 ]]; then
log "Failed to install $... | the_stack |
if [ "$CP_CLOUD_PLATFORM" == 'aws' ]; then
ES_JAVA_OPTS=""; echo $(get-aws-profile.sh --key) | bin/elasticsearch-keystore add s3.client.default.access_key -f
ES_JAVA_OPTS=""; echo $(get-aws-profile.sh --secret) | bin/elasticsearch-keystore add s3.client.default.secret_key -f
elif [ "$CP_CLOUD_PLATFORM" == 'gcp'... | the_stack |
# This is very rough and could use some adaptation. This was specific to a particular environment,
# so all of the disk labels are specific. There's probably a better way to do this, but
# I haven't taken the time to reason out what it is.
if [ "$OSTYPE" = "SunOS" ]; then
# device name of the disk
#
... | the_stack |
set -x
set +e
# 主要在平行链上测试
source "./mainPubilcRelayerTest.sh"
# shellcheck disable=SC2034
{
chain33BridgeBank=""
ethBridgeBank=""
BridgeRegistryOnChain33=""
BridgeRegistryOnEth=""
multisignChain33Addr=""
multisignEthAddr=""
chain33EthBridgeTokenAddr=""
ethereumUSDTERC20TokenAddr=""
... | the_stack |
# ****************************
# PREPARING OF THE ENVIRONMENT
# ****************************
echo "System environment preparing ..."
cd ~
declare ITEST_DIR=$(pwd)/itest
declare ITEST_ARCHIVE=installer/test/qa-functional/itest.zip
declare ITEST_SLEEP=10000
declare SYSTEM_TEMP=/tmp
cd $ITEST_DIR
if [ "$(test -f confi... | the_stack |
#-----------------------------------------------------------------------------
#
# File: hab4_pki_tree.sh
#
# Description: This script generates a basic HAB4 PKI tree for the Freescale
# HAB code signing feature. What the PKI tree looks like depends
# on whether the SRK is chosen to be a CA k... | the_stack |
DEPENDS="path"
### section configure
option()
{
_default_cachedir="${LOCALSTATEDIR}/lib"
_default_configdir="${DATADIR}/config"
case "$LOCALSTATEDIR" in
"/var")
_default_cachedir="/var/lib/pbis"
;;
"/private/var")
_default_cachedir="/private/var/lib/pbi... | the_stack |
######################
###Michaelis_Menten1###
#######################
#function; Michaelis Menten function, 1st parametarization;
#\f$ \f$ \f$ \frac{ax}{b+x} \f$
#func( Michaelis_Menten1(
#//calculate y(s,s,s) y=a*x/(b+x);
#//calculate y(v,s,s) y=a*elem_div(x, b+x);
#//calculate y(v,v,s) y=elem_prod(a, elem... | the_stack |
####################################################################################################
# Name: Autodesk Fusion 360 - Setup Wizard (Linux) #
# Description: This is the Spanish translation for the Setup Wizard. #
# Author: S... | the_stack |
# Cause the script to exit if a single command fails
set -eo pipefail -v
function clean_requirements() {
pip uninstall -r requirements/requirements-cv.txt -y
pip uninstall -r requirements/requirements-dev.txt -y
pip uninstall -r requirements/requirements-hydra.txt -y
pip uninstall -r requirements/requirements-... | the_stack |
# A tool to check that every commit in the git history is valid
#
# We decide if a commit is valid if one of this is true:
# - it is managed by a continuous integration tool
# - a list of "make" targets are all successfully run on this commit
#
# For each commit where the make targets are executed, the script will post... | the_stack |
load ../common
fromhost_clean () {
[[ $1 ]]
# We used to delete only specific paths, but this turned into an unwieldy
# mess of wildcards that obscured the original specificity purpose.
rm -f "${1}/ld.so.cache"
find "$1" -xdev \( \
-name 'libcuda*' \
-o -name 'libnvi... | the_stack |
set -e
MVM_BASE="$HOME/.mesos"
MVM_BIN="$MVM_BASE/bin"
MVM_INSTALL_LOCK_FILE="$MVM_BASE/install.lock"
MVM_ENV_FILE="$MVM_BASE/env"
MESOS_INSTALL_BASE="$MVM_BASE/mesos_versions"
MESOS_SOURCES="$MVM_BASE/mesos_src"
FISH_RC_FILE="$HOME/.config/fish/config.fish"
ZSH_RC_FILE="$HOME/.zshrc"
GENERIC_PROFILE_FILE="$HOME/.pr... | the_stack |
#################################################################################
# #
# TPM2 regression test #
# Written by Ken Goldman #
# IBM Thomas J. Watson Research Center #
# #
# (c) Copyright IBM Corporation 2015 - 2020 #
# #
# All rights reserved. ... | the_stack |
# Installation script to download and install the OpenAPI Terraform provider based on the arguments provided and following the
# expected Terraform plugin installation paths depending the Terraform version is installed.
#
# - If Terraform v0.12 is detected, the plugin will be installed following Terraform's v0.12 insta... | the_stack |
# for FB15k
# DistMult 1GPU
DGLBACKEND=pytorch python3 train.py --model DistMult --dataset FB15k --batch_size 1024 \
--neg_sample_size 256 --hidden_dim 400 --gamma 143.0 --lr 0.08 --batch_size_eval 16 \
--valid --test -adv --gpu 0 --max_step 40000
# DistMult 8GPU
DGLBACKEND=pytorch python3 train.py --model Dis... | the_stack |
. "$BASE_DIR/script-modules/log.sh"
. "$BASE_DIR/script-modules/util.sh"
. "$BASE_DIR/script-modules/fetch-rules.sh"
. "$BASE_DIR/script-modules/cpu.sh"
. "$BASE_DIR/script-modules/module_base.sh"
. "$BASE_DIR/rules.d/core-rules.sh"
die() {
echo $1
#exit 1
}
#
# Regarding COMPILER... It didn't used to be safe. N... | the_stack |
set -o pipefail
shopt -s nocasematch
#Obtain SLES release version and service pack level
function get_sles_release() {
local query_type=$1
local version_file=$2
if [[ -z ${version_file} ]];then
version_file="/etc/os-release"
fi
local sles_version=`cat ${version_file}... | the_stack |
# Die on any error:
set -e
# General commands
if [ "$(uname)" == "Darwin" ]; then
# Do something under Mac OS X platform
SED=`which gsed` && : || (echo "Command 'gsed' is not installed."; exit 10;)
else
# Do something else under some other platform
SED=`which sed` && : || (echo "Command 'sed' is not ins... | the_stack |
if test $# -ne 1
then
echo "usage:" >&2
echo "$0 name" >&2
exit 1
fi
nameUC=`echo $1 | tr "[a-z]" "[A-Z]" `
nameLC=`echo $1 | tr "[A-Z]" "[a-z]" `
if test -n "${nameUC}"
then
#append underscore to name
nameUC="${nameUC}_"
nameLC="${nameLC}_"
fi
sed -e "s/XXX_/${nameUC}/g" -e "s/xxx_/${nameLC}/g" <<"EOF" \
> ... | the_stack |
. $srcdir/test-subr.sh
testfiles testfile testfile2
testrun_compare ${abs_builddir}/show-abbrev testfile testfile2 <<\EOF
abbrev[0]: code = 1, tag = 17, children = 1
abbrev[0]: attr[0]: code = 16, form = 6, offset = 0
abbrev[0]: attr[1]: code = 18, form = 1, offset = 2
abbrev[0]: attr[2]: code = 17, form = 1, offset ... | the_stack |
. $srcdir/test-subr.sh
# Tests dwfl_module_{addrsym,getsym,relocate_address}
# See run-readelf-s.sh for how to generate test binaries.
# In addition, *_pl files were created from their base file
# with prelink -N, and *_plr with prelink -r 0x4200000000.
testfiles testfilebaztab
testfiles testfilebazdbg testfilebazdbg... | the_stack |
# ------------------------------------------------------------------------------
# CONFIGURATION
# The default configuration that can be overridden in .zshrc
# ------------------------------------------------------------------------------
NEWLINE='
'
# ORDER
if [ ! -n "$SPACESHIP_PROMPT_ORDER" ]; then
SPACESHIP_PRO... | the_stack |
set -exu
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
SCRIPT=$(readlink -f $0)
TMPBASE=${4:-$(mktemp -d --tmpdir sysdig.XXXXXXXXXX)}
elif [[ "$unamestr" == 'Darwin' ]]; then
SCRIPT=$(greadlink -f $0)
unset TMPDIR #make shure that mktemp on mac will generate the folder under /tmp
TMPBASE=${4:-$(... | the_stack |
set -e # Exit when any command fails.
set -x # Echo all commands.
export RUST_BACKTRACE=1 # Show Rust errors.
function generate_bindings() {
# Generate bindings for the module.
local libname=$1
local modname=$2
local libdir=$3
# libcmd looks like bin/targets/bluepill_my_sensor/app/libs/senso... | the_stack |
# Script structure inspired from Apache Karaf and other Apache projects with similar startup approaches
# Discover the path of the file
# Since MacOS X, FreeBSD and some other systems lack gnu readlink, we use a more portable
# approach based on following StackOverflow comment http://stackoverflow.com/a/1116890/8888... | the_stack |
# Defines
SCRIPTDIR=$( cd "${BASH_SOURCE[0]%\/*}" && pwd )
CWD=$(pwd)
OSNAME="$(uname -s)"
DEBUGLEVEL="${DEBUGLEVEL:-1}"
DISPLAYERROR="${DISPLAYERROR:-0}"
OPERATIONS="${OPERATIONS:-1000}"
HCAOPERATIONS="${HCAOPERATIONS:-100}"
CONCURRENCY="${CONCURRENCY:-5}"
BREAKONERROR="${BREAKONERROR:-0}"
RUNSCRIPTS="${RUNSCRIPTS:-1}... | the_stack |
CONF_FILE="etc/system.conf"
YI_HACK_PREFIX="/tmp/sd/yi-hack"
YI_HACK_UPGRADE_PATH="/tmp/sd/.fw_upgrade"
YI_HACK_VER=$(cat /tmp/sd/yi-hack/version)
MODEL_SUFFIX=$(cat /tmp/sd/yi-hack/model_suffix)
get_config()
{
key=$1
grep -w $1 $YI_HACK_PREFIX/$CONF_FILE | cut -d "=" -f2
}
start_buffer()
{
# Trick to s... | the_stack |
set -o nounset # Fail on uninitialized variables.
set -e # Fail on non-zero exit code.
# ANSI color codes
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[0;33m'
NOCOLOR='\033[0m'
#
# Parse options
#
CONFIGURATION="Debug"
TARGET_RUNTIME="ubuntu.18.04-x64"
VERSION="" # Will set this later by reading TestPlat... | 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
startupdb=$dir/startup_db
fjukebox=$dir/example-jukebox.yang
# Define default restconfig config: RESTCONFIG
RESTCONFIG=$(restconf_config user false)
cat <<EO... | the_stack |
# Note: This script uses gcloud for all commands because many are not supported by the HTTP API,
# which would be preferable as we'd be able to easily check for OK status (200) for all calls, and
# be able to easily parse info from structured responses in json.
# Also, using the HTTP API requires creating an API key wh... | the_stack |
set -o errexit
set -o nounset
set -o pipefail
set -o xtrace
# Close stdin
exec 0<&-
: ${TEST_PREFIX:=""}
: ${NAVIGATOR_IMAGE_REPOSITORY:="quay.io/jetstack"}
: ${NAVIGATOR_IMAGE_TAG:="build"}
: ${NAVIGATOR_IMAGE_PULLPOLICY:="Never"}
export \
NAVIGATOR_IMAGE_REPOSITORY \
NAVIGATOR_IMAGE_TAG \
NAVIGATOR_IM... | the_stack |
# Data are from test data in https://github.com/biocore/qiime
# align_seqs
align_seqs.py \
--input_fasta_fp 'test-data/align_seqs/unaligned.fna' \
-o 'align_seqs_pynast_uclust' \
--alignment_method 'pynast' \
--pairwise_alignment_method 'uclust' \
--template_fp 'test-data/align_seqs/core_set_aligne... | the_stack |
WebDir='/eos/cms/store/group/dpg_hcal/comm_hcal/www/HcalRemoteMonitoring'
WebSite='https://cms-conddb-dev.cern.ch/eosweb/hcal/HcalRemoteMonitoring'
HistoDir='/eos/cms/store/group/dpg_hcal/comm_hcal/www/HcalRemoteMonitoring/CMT/histos'
eos='/afs/cern.ch/project/eos/installation/0.3.15/bin/eos.select'
# print usage info... | the_stack |
# Copyright (c) Open Enclave SDK contributors.
# Licensed under the MIT License.
WORKING_DIR=$1
OS_CODENAME=$('grep UBUNTU_CODENAME /etc/os-release | cut -d= -f2')
cd "$WORKING_DIR" || exit 1
# OP-TEE Build Output Folders
OPTEE_DEBUG_QEMU_ARMV8_OUT_PATH="$PWD/build/optee/3.6.0/vexpress-qemu_armv8a/debug"
OPTEE_DEBU... | the_stack |
# Setup {{{
# Set base dir and copy command
base_pkg_dir='/usr'
if [[ "$OSTYPE" == 'darwin'* ]]; then
if type "brew" > /dev/null 2>&1; then
base_pkg_dir=$(brew --prefix)
else
base_pkg_dir='/usr/local'
fi
COPY_CMD='pbcopy'
else
COPY_CMD='xsel --clipboard'
fi
# Enable completions
if ... | the_stack |
# Automatic RDP session configurator
# a.k.a. ScaryGliders RDPsesconfig
#
# Version 3.11
#
# Version release date : 20140617
########################(yyyyMMDD)
#
# See CHANGELOG for release detials
#
# Will run on Debian-based systems only at the moment. RPM based distros perhaps some time in the future...
#
# Copyrigh... | the_stack |
# @file cstr.sh
# @author Adam Piecek <piecek@cesnet.cz>
# @brief Helper script for creating tests that converts yang and c strings.
#
# Copyright (c) 2020 CESNET, z.s.p.o.
#
# This source code is licensed under BSD 3-Clause License (the "License").
# You may not use this file except in compliance with the License.
# Y... | the_stack |
DGSH_READVAL=../src/dgsh-readval
DGSH_WRITEVAL=../src/dgsh-writeval
DGSH_HTTPVAL=../src/dgsh-httpval
# Helper functions {{{1
# Repeat x times
sequence()
{
jot $1 2>/dev/null || seq $1 2>/dev/null
}
fail()
{
echo "FAIL"
echo "$1"
$DGSH_READVAL -q -s testsocket 2>/dev/null
if [ "$SERVER_PID" ]
then
stop_server
... | the_stack |
# Copyright 2012 Johns Hopkins University (Author: Daniel Povey). Apache 2.0.
# This version of the train_sgmm2 script has several jobs on each machine, and adds the
# accumulators up in memory.
# SGMM training, with speaker vectors. This script would normally be called on
# top of fMLLR features obtained from a c... | the_stack |
set -e
# This script looks for bundles built by make.sh, and releases them on a
# public S3 bucket.
#
# Bundles should be available for the VERSION string passed as argument.
#
# The correct way to call this script is inside a container built by the
# official Dockerfile at the root of the Docker source code. The Dock... | the_stack |
# Note that this script is used in the "streamly" package as well as
# in "streaming-benchmarks" package. Any changes to the script should be
# generic enough so that it works in both the cases.
#------------------------------------------------------------------------------
set -o pipefail
SCRIPT_DIR=$(cd `dirname $... | the_stack |
builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || { builtin print -P "${ZINIT[col-error]}ERROR:%f%b Couldn't find ${ZINIT[col-obj]}zinit-side.zsh%f%b."; return 1; }
ZINIT[EXTENDED_GLOB]=""
#
# Backend, low level functions
#
# FUNCTION: .zinit-unregister-plugin [[[
# Removes the plugin from ZINIT_REGISTERED_PLUGIN... | the_stack |
# =============================================================================
#
# ------------------------------------------------------------------
# Encrypt or Decrypt a file and generate Secure Keys for Encryption.
# ------------------------------------------------------------------
#
# Author: Conrad Sollit... | the_stack |
DEFAULT_PATH="/var/crash/"
FENCE_KDUMP_CONFIG_FILE="/etc/sysconfig/fence_kdump"
FENCE_KDUMP_SEND="/usr/libexec/fence_kdump_send"
FADUMP_ENABLED_SYS_NODE="/sys/kernel/fadump_enabled"
is_fadump_capable()
{
# Check if firmware-assisted dump is enabled
# if no, fallback to kdump check
if [ -f $FADUMP_ENABLED_S... | the_stack |
cd features
sh run.sh
cd ../model/
# single model
python xgboost_model.py
#python xgb_remove_feature.py
#python xgb_feature_select.py
#python huanglin_lightgbm_model.py
#python huang_lin_xgboost_model.py
#python sqg_lightgbm_model.py
#python sqg_xgboost_model.py
#python catboost_model.py
# stacking
######## level 1, ... | the_stack |
set -e
unset CDPATH
yum_url=https://yum.oracle.com
github_url=https://github.com/oracle/centos2ol/
arch=$(uname -m)
bad_packages=(centos-backgrounds centos-gpg-keys centos-logos centos-release centos-release-cr desktop-backgrounds-basic \
centos-release-advanced-virtualization centos-release-ansible26 ce... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.