text
stringlengths
1
1.05M
#!/bin/bash set -ue # Copy all the local pcap files to the remote machine. if [[ "$#" -ne 2 ]]; then echo "Usage: $0 <target machine> <max pcap size>" fi host=$1 max_size=$2 # Generate all sizes of PCAP file up to max size: pushd ../pcap_files/ for i in $(seq 1 ${max_size}); do if [[ ! -f $i.cap ]]; then python ...
#!/bin/sh cd $(dirname $0) cd ../complete ./mvnw clean package ret=$? if [ $ret -ne 0 ]; then exit $ret fi rm -rf target ./gradlew build ret=$? if [ $ret -ne 0 ]; then exit $ret fi rm -rf build cd ../initial ./mvnw clean compile ret=$? if [ $ret -ne 0 ]; then exit $ret fi rm -rf target ./gradlew compileJava ret=$...
from typing import List def extract_html_comments(html_file_path: str) -> List[str]: with open(html_file_path, 'r', encoding='utf-8') as file: html_content = file.read() comments = [] start_index = html_content.find("<!--") while start_index != -1: end_index = html_conte...
<reponame>schinmayee/nimbus //##################################################################### // Copyright 2002-2004, <NAME>, <NAME>, <NAME> // This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt. //###################################...
from .const import CLI_STATUS_STARTLINE, DOWNPOSTFIX, DOWN_CHUNK_SIZE, DEFAULT_CONN_TIMEOUT from . import utils from .torrunner import TorRunner from .segfile import SegFileLoader, SegFileMonitor from .page import Page import colors import requests import os import sys import multiprocessing as mp import time from date...
<filename>src/app/send-pw/send-pw.component.spec.ts import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { SendPwComponent } from './send-pw.component'; describe('SendPwComponent', () => { let component: SendPwComponent; let fixture: ComponentFixture<SendPwComponent>; beforeEach(asy...
<filename>ArtemShchepets/src/test/java/week1/controller/ProxyITerminalControllerImplTest.java package week1.controller; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import week1.model.Bill; import week1.model.Product; import week1.model.Seller; import java.time.Loc...
#!/bin/bash # -*- coding: UTF8 -*- ## # Drupal simple Shell install script for rapid dev start # Requires drush # # @see http://drush.ws # @see http://drushmake.me # # @version 2014/11/26 01:39:08 # @author Paulmicha # SITE_NAME="This is your site name" DRUPAL_PROFILE="minimal" DB_HOST="localhost" DB_NAM...
<gh_stars>0 package com.corsair.sparrow.pirate.oauth.service.impl; import com.corsair.sparrow.pirate.oauth.domain.bean.SysUserRole; import com.corsair.sparrow.pirate.oauth.mapper.SysUserRoleMapper; import com.corsair.sparrow.pirate.oauth.service.ISysUserRoleService; import com.baomidou.mybatisplus.extension.service.im...
(function() { // var el = document.getElementById("device"); // var browser = document.getElementById("browser"); // var os = document.getElementById("os"); var parser = new UAParser(); if (parser.getDevice() && parser.getDevice().name) { // el.innerHTML += '<b>Device:</b> ' + JSON.stringify...
<filename>app/src/main/java/com/ap/stephen/videodrawerplayer/VideoListActivity.java package com.ap.stephen.videodrawerplayer; import android.content.Context; import android.content.Intent; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.os.CountDownTimer; import android.support...
package com.iflytek.cyber.resolver.speechrecognizer; import android.content.Context; import com.google.gson.JsonObject; import com.iflytek.cyber.CyberDelegate; import com.iflytek.cyber.SpeechController; import com.iflytek.cyber.resolver.ResolverModule; import okio.Source; public class SpeechRecognizerResolver exten...
import * as R from 'ramda' import { Style, Icon } from 'ol/style' import ms from 'milsymbol' import { K } from '../../../shared/combinators' import { defaultStyle, styleFactory } from './default-style' const MODIFIERS = { c: 'quantity', f: 'reinforcedReduced', g: 'staffComments', h: 'additionalInformation', ...
# configure astyle if [ ! -d /home/vagrant/astyle-install ]; then cd /home/vagrant mkdir astyle-install cd astyle-install wget https://jaist.dl.sourceforge.net/project/astyle/astyle/astyle%203.1/astyle_3.1_linux.tar.gz -O astyle.tar.gz tar -xzf astyle.tar.gz cd astyle cmake . make make install fi # configure ...
import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; public class RemoveDuplicates { public static void main(String[] args) { List<Integer> list = new ArrayList<>(); list.add(5); list.add(2); list.add(12); list.add(9); list.add(2); list.add(7); list.add(12); Set<...
export MINIO_ACCESS_KEY=minio export MINIO_SECRET_KEY=miniokey export AWS_ACCESS_KEY_ID=minio export AWS_SECRET_ACCESS_KEY=miniokey export WORLD_NAME=New_York_Track export ROS_AWS_REGION=us-east-1 export AWS_REGION=us-east-1 export AWS_DEFAULT_REGION=us-east-1 export MODEL_S3_PREFIX=rl-deepracer-sagemaker export MODEL_...
require File.expand_path('../../../spec_helper', __FILE__) describe "File.chown" do before :each do @fname = tmp('file_chown_test') touch @fname end after :each do rm_r @fname end as_superuser do platform_is :windows do it "does not modify the owner id of the file" do File.cho...
<gh_stars>0 /* **** Notes Exchange the DI and the SI */ # define CAR # include "../../../incl/config.h" signed(__cdecl sw_p(void(**di),void(**si))) { auto void *p; if(!di) return(0x00); if(!si) return(0x00); p = (*di); *di = (*si); *si = (p); return(0x01); }
#!/bin/bash root_folder=$(cd $(dirname $0); cd ..; pwd) readonly ENV_FILE="${root_folder}/local.env" exec 3>&1 function _out() { echo "$(date +'%F %H:%M:%S') $@" } function setup() { _out Deploying web-api-java-jee v1 cd ${root_folder}/istio protectyaml="${root_folder}/web-api-java-jee/istio/protect-web-a...
#!/bin/bash #SBATCH --account=hacc #SBATCH --qos=regular #SBATCH --constraint=knl #SBATCH --time=24:00:00 #SBATCH --nodes=8 #SBATCH --tasks-per-node=1 #SBATCH --job-name=deltasigma #SBATCH --output=M001-%j.out cd /global/cscratch1/sd/asv13/ source /global/homes/a/asv13/miniconda3/bin/activate chopperds srun python -u...
import { RANGES, SUPPORTED_PROTOCOLS } from "../constants"; export const checkProtocolSupport = protocol => { return SUPPORTED_PROTOCOLS.includes(protocol); }; export const findScoreRange = score => { let range = "good"; const { poor, ok } = RANGES; if (score < poor) { range = "poor"; } else if (score >...
<reponame>sergeytkachenko/siesta-template<gh_stars>1-10 StartTest(function (t) { /* This test reproduces a "click offset" bug, which appears in very specific environment It was caused by the jQuery bug - the "el.offset()" and "el.scrollTop()" methods were using different algorithms for calcu...
def process_message(input_dict: dict) -> dict: response_message = 'Received message: ' + input_dict['message'] # Concatenate the message with a prefix input_dict['response'] = response_message # Add a new key-value pair to the dictionary input_dict.pop('message') # Remove the 'message' key from the dicti...
#!/usr/bin/env bash VNC_PORT=5900 VNC_PASSWORD=112358 PARAMS= while (( "$#" )); do case "$1" in -p|--vnc-port) VNC_PORT=$2 shift 2 ;; -pw|--vnc-password) VNC_PASSWORD=$2 shift 2 ;; --) # end argument parsing shift break ;; -*|--*=) # unsupported ...
#!/bin/sh set -e set -u set -o pipefail if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy # frameworks to, so exit 0 (signalling the script phase was successful). exit 0 fi echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_P...
import React, { useState } from 'react'; const App = () => { const [num1, setNum1] = useState(0); const [num2, setNum2] = useState(0); const [result, setResult] = useState(0); const add = () => { setResult(num1 + num2); }; return ( <div> <input type="number" value={num1} onChange={e => setNum1(+e.target...
#!/bin/bash cd "$( cd "$( dirname "$0" )" && pwd )" coffee -o ../js/ -cw .
#!/usr/bin/env bash # # Copyright 2020 Brian Smith. # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHO...
<reponame>m-nakagawa/sample<gh_stars>0 /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache Licen...
Listeners::BrokerUpdatedListener.run
package com.stackroute.playerservice.repository; import com.stackroute.playerservice.domain.Player; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework...
<filename>app.py from flask import Flask, render_template app = Flask(__name__) @app.route('/') def hello_world(): return render_template('index.html') @app.route('/page1') def page1(): return render_template('page1.html') @app.route('/page2') def page2(): return render_template('page2...
/** * Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.analytics.financial.credit.creditdefaultswap.pricing; import javax.time.calendar.ZonedDateTime; import com.opengamma.analytics.financial.credit.BuySellProtec...
from abc import ABC, abstractmethod class AbstractRecognizer: """ A base class for facial recognition service interfaces Args: recognition_endpoint (string): The url of the recognition service (theoretically could be something other than a string...maybe an object) """ def __init__(se...
#!/bin/bash # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
#!/bin/bash # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) # Kselftest framework requirement - SKIP code is 4. ksft_skip=4 if [ -f /dev/tpmrm0 ] ; then python -m unittest -v tpm2_tests.SpaceTest else exit $ksft_skip fi
/* * Copyright (c) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
class Game: def __init__(self, window, ball, lives, lives_label): self.window = window self.ball = ball self.lives = lives self.lives_label = lives_label def update(self): if self.ball.y >= self.window.height - self.ball.height: # Check if the ball has reached the botto...
#!/bin/bash echo "System started at: `date`" >> nihit_log.txt
var Path = require('path'); var Promise = require('the-promise'); var uuid = require('uuid'); var _ = require('the-lodash'); class DataProvider { constructor() { this._actionTracker = {} } //getting all regions getRegions() { console.log("[DataProvider][getRegions] begin") return Promise.timeout(...
cmake -GNinja -H./llvm-test-suite -B./llvm-test-suite-build \ -C./llvm-test-suite/cmake/caches/$1.cmake \ -DCMAKE_C_COMPILER=$PWD/llvm-project-build/bin/clang \ -DTEST_SUITE_USE_PERF=true \ -DTEST_SUITE_SUBDIRS=CTMark \ -DTEST_SUITE_RUN_BENCHMARKS=false \ -DTEST_SUITE_COLLECT_CODE_SIZE=false
## read damper ## Update the id for your point curl -X "POST" "http://localhost/api/read" \ -H 'Accept: application/json' \ -H 'Content-Type: text/zinc' \ -d $'ver:"2.0" filter,limit "id==@52e40666-a939-49ce-b403-ea08247b379d",1000 '
import { ComponentRendering, Field, HtmlElementRendering, Item } from './dataModels'; /** * Safely extracts a field value from a rendering or fields object. * Null will be returned if the field is not defined. */ export function getFieldValue<T>( renderingOrFields: ComponentRendering | { [name: string]: Fi...
package org.multibit.hd.ui.views.components; import org.multibit.hd.ui.views.components.display_qrcode.DisplayQRCodeModel; import org.multibit.hd.ui.views.components.display_qrcode.DisplayQRCodeView; import org.multibit.hd.ui.views.components.display_environment_alert.DisplayEnvironmentAlertModel; import org.multibit....
const importMap = require("./importMap"); const MemberExpressionKeys = Object.keys(importMap.MemberExpression); const NewExpressionKeys = Object.keys(importMap.NewExpression); module.exports = function main({ types: t }) { const addedFills = []; let addPolyfills = true; function addImport(path, polyfillPath) { i...
<reponame>openlibraryenvironment/ui-directory import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { Accordion } from '@folio/stripes/components'; import renderCustProps from '../components/custPropRenderer'; const CustomProperties = (props) => { const ...
function generateProductCarouselTitle($settingsArray) { $icon = isset($settingsArray['value']) ? $settingsArray['value'] : ''; // Get the selected icon from the settings array $title = 'Product Carousel Title'; // Replace with the actual product carousel title // Generate the HTML markup for the product ca...
#!/bin/bash # follow these steps : https://linuxize.com/post/how-to-install-netbeans-on-ubuntu-18-04/ sudo apt update sudo apt install openjdk-8-jdk java -version sudo snap install netbeans --classic netbeans
# This file was auto-generated from 'constants.yaml'. Changes may be overridden. GO_VERSION='1.15.8'
<reponame>shimpeiws/remote-patient-monitoring-api import Auth from '@aws-amplify/auth'; import {config} from './config'; import APIGateway from 'aws-sdk/clients/apigateway'; import {ICredentials} from '@aws-amplify/core'; import {Spec, SwaggerUIBundle} from 'swagger-ui-dist' export const initSwagger = async (): Promis...
var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var __decorate = (this && this.__decorate) || function (decora...
<filename>docs/52.bundle.js (window["webpackJsonp"] = window["webpackJsonp"] || []).push([[52],{ /***/ "../../src/components/icon/assets/bolt.js": /*!***************************************************************************!*\ !*** /Users/chanderprall/projects/eui/src/components/icon/assets/bolt.js ***! \*******...
#!/bin/bash ORIGIN=024000 top=../../../ tu=${top}/src/tapeUtils/ as8=${top}/src/as8+/ # Preprocess ${as8}/as8pp < bound_bootload_0.as8 > bound_bootload_0.s.tmp # Assemble ${as8}/as8+ bound_bootload_0.s.tmp -o bound_bootload_0.oct # Pack ${tu}/pack bound_bootload_0.oct bound_bootload_0.pck.tmp # Compare original ...
from game.client.view.pad.pad import Pad class LegendPad(Pad): TEXT_COLOR = '#eaeaea' HIGHLIGHTED_TEXT_COLOR = '#e6e600' BACKGROUND_COLOR = '#26004d' # BACKGROUND_COLOR = '#000000' INVENTORY_TEXT = ' Inventory ' SKIP_TEXT = ' Skip turn ' NEXT_TEXT = ' Next (↓) ' PREV_TEXT = ...
<filename>src/web/assets/js/myUnderscore.js<gh_stars>1-10 /* 自己封装的工具库 基于可插拔的架构去写 */ (function () { var root = (typeof self == "object" && self.self === self && self) || (typeof global == "object" && global.global === global && global) || this || {}; // 这里返回的其实是一个new好的unders...
<filename>src/_global.js<gh_stars>0 let namespace if (typeof(global) !== 'undefined') { namespace = global } else if (typeof(window) !== 'undefined') { namespace = window } module.exports = namespace
<reponame>huanglii/Awesome-GIS-RS-Data<gh_stars>1-10 import React from 'react' import ReactDOM from 'react-dom' import { ConfigProvider } from 'antd' import zhCN from 'antd/es/locale/zh_CN' import App from './app' import './index.less' ReactDOM.render( <ConfigProvider locale={zhCN}> <App /> </ConfigProvider>...
#!/bin/bash echo -------------------------------- echo ------------Limpiando imagenes echo -------------------------------- docker rmi $(docker images | grep mongo) --force echo -------------------------------- echo ------------Creado docker echo -------------------------------- docker-compose -f ms-db-docker-compose.y...
<gh_stars>1-10 from sys import argv from flask import Flask, render_template, request, Response, send_from_directory import settings app = Flask( __name__ ) # db_session @app.teardown_appcontext def close_db( error ): from database import db_session db_session.close() @app.route( '/static/<path:path>/<fi...
package lemongrenade.core.templates; import com.rabbitmq.client.ConnectionFactory; import io.latent.storm.rabbitmq.RabbitMQBolt; import io.latent.storm.rabbitmq.config.*; import lemongrenade.core.coordinator.AdapterManager; import lemongrenade.core.coordinator.JobManager; import lemongrenade.core.models.LGJob; import ...
#!/bin/bash # # Crontab entry # */2 * * * * /root/block_bad_auth_cron.sh > /var/log/block_bad_auth_cron.log date "+timestamp: %Y-%m-%d %H:%M:%S" ( echo "Checking for lock. If lock, will wait 10s" # Wait for lock on /var/lock/.block_bad_auth_cron_lock flock -x -w 10 200 || exit 1 . /root/.cronenv /...
/** * Copyright(c) 2004-2018 bianfeng */ package com.shareyi.molicode.builder.impl; import com.alibaba.fastjson.JSON; import com.shareyi.molicode.builder.AbstractBuilder; import com.shareyi.molicode.common.enums.DataTypeEnum; import com.shareyi.molicode.common.enums.OwnerTypeEnum; import com.shareyi.molicode.common...
package org.fluentlenium.adapter; import org.testng.ITestContext; import org.testng.ITestNGMethod; import org.testng.ITestResult; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeMethod; import org.testng.a...
import { EventEmitter, OnInit, Output, ViewChild, ElementRef, Input } from '@angular/core'; import { fromEvent } from 'rxjs'; import 'rxjs/Rx'; /** * The 'BaseViewComponent' provides the common API to search models. */ export abstract class BaseSearchComponent implements OnInit { /** * Debounce tim...
#!/usr/bin/env bash set -euxo pipefail time crane validate --remote=kaniko.kontain.me/dockersamples/node-bulletin-board/bulletin-board-app:3f08afd time crane validate --remote=kaniko.kontain.me/dockersamples/node-bulletin-board/bulletin-board-app:3f08afd
<gh_stars>1-10 import React from 'react' import { graphql } from 'gatsby' import Layout from '../components/layout' import PostList from '../components/post-list' import PageHeading from '../components/UI/PageHeading' const Articles = ({ data }) => { const blogPosts = data.allMarkdownRemark.edges.filter(post => { ...
#!/usr/bin/env sh DATA_SET=image # define data source for train and test DATA_FILE=cifar100_fine_R10 DEBUG=false TRAIN_LIST=/scratch/dutta/cifarR20_trainval_train.txt VAL_LIST=/scratch/dutta/test_fine_labels.txt TRAIN_BASE_DIR=/scratch/dutta/cifar\-100\-train VAL_BASE_DIR=/scratch/dutta/cifar\-100\-test WIDTH=96 W...
#!/usr/bin/expect -f set timeout 1800 set cmd [lindex $argv 0] set licenses [lindex $argv 1] spawn {*}$cmd expect { "Do you accept the license '*'*" { exp_send "y\r" exp_continue } "Accept?*" { exp_send "y\r" exp_continue } eof }
#ifndef _CAFFE_UTIL_IM2CHUK_HPP_ #define _CAFFE_UTIL_IM2CHUK_HPP_ namespace caffe { template <typename Dtype> void im2chuk_cpu(const Dtype* data_im, const int channels, const int height, const int width, const int kernel_h, const int kernel_w, const int local_h, const int local_w, const int stride_h, ...
<gh_stars>10-100 package idmap import ( "os/user" "strconv" "github.com/lxc/lxd/shared/idmap" "github.com/pkg/errors" ) func ResolveCurrentIdmapSet() (*idmap.IdmapSet, error) { currentUser, err := user.Current() if err != nil { return nil, errors.Wrapf(err, "couldn't resolve current user") } return resolve...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
#!/bin/sh #docker-volumes /nix/store:/nix/store:ro \ #docker-volumes /nix/var/nix/db:/nix/var/nix/db:ro \ #docker-volumes /nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro \ mkdir -p /backup/nix/var/nix cp -r /nix/store /backup/nix/store cp -r /nix/var/nix/db /backup/nix/var/nix/db
def zip_two_lists(list1, list2): return zip(list1, list2)
<filename>public/src/App.tsx<gh_stars>1-10 import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { connect, Provider } from 'react-redux'; import {store} from './store'; let App = ({ isPinging, ping }) => ( <div> <h1>is pinging: {isPinging.toString()}</h1> <button onClick={ping}>Start...
const schedule = require('node-schedule'); const express = require('express'); const app = express(); // Store tasks let tasks = {}; // Create a task app.post('/tasks', function (req, res) { const taskId = req.body.taskId; const task = req.body.task; // Schedule the task const job = schedule.scheduleJob(taskId,...
#include "factory.h" namespace odfaeg { namespace core { template <class O, class K> std::map<K, O*> Factory<O, K>::m_map = std::map<K, O*> (); template <class O, class K> void Factory<O, K>::Register (K key, O* object) { if(m_map.find(key)==m_map.end()) { ...
#!/bin/bash $HADOOP_PREFIX/bin/hdfs dfs -mkdir -p /user/root $HADOOP_PREFIX/bin/hdfs dfs -put $HADOOP_PREFIX/etc/hadoop input $HADOOP_PREFIX/bin/hadoop jar $HADOOP_PREFIX/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.9.2.jar grep input output 'dfs[a-z.]+' $HADOOP_PREFIX/bin/hdfs dfs -cat output/*
<filename>src/main/java/app/habitzl/elasticsearch/status/monitor/tool/client/params/ClusterAllocationParams.java package app.habitzl.elasticsearch.status.monitor.tool.client.params; /** * Parameter list of all values offered by the Elasticsearch {@code /_cluster/allocation/explain} API. */ public final class Cluster...
<filename>src/math/Boj1676.java package math; import java.io.BufferedReader; import java.io.InputStreamReader; /** * * @author minchoba * 백준 1676번: 팩토리얼 0의 갯수 * * @see https://www.acmicpc.net/problem/1676/ * */ public class Boj1676 { private static final int TWO = 2; private static final int FIVE = 5; pri...
<table> <thead> <tr> <th>Name</th> <th>Age</th> </tr> </thead> <tbody> <tr> <td>John</td> <td>20</td> </tr> <tr> <td>Mary</td> <td>15</td> </tbody> <tbody> <tr> <td>Bob</td> <td>30</td> </tr> </tbody> </table> <script> let table = document.querySelector('table'); let rows = Array.from(table.q...
<reponame>NightKosh/wolfarmor package com.attributestudios.wolfarmor.entity.passive; import com.attributestudios.wolfarmor.WolfArmorMod; import com.attributestudios.wolfarmor.api.IWolfArmorCapability; import com.attributestudios.wolfarmor.common.capabilities.CapabilityWolfArmor; import net.minecraft.entity.passive.Ent...
zmodload zsh/terminfo autoload -Uz edit-command-line zle -N edit-command-line setopt BEEP bindkey -M vicmd "E" edit-command-line bindkey -M vicmd '/' history-incremental-pattern-search-backward bindkey -M vicmd '?' history-incremental-pattern-search-forward bin...
public static String reverse(String str) { if (str == null || str.length() == 0) { return str; } StringBuilder sb = new StringBuilder(); for(int i=str.length()-1; i>=0; --i) { sb.append(str.charAt(i)); } return sb.toString(); }
def standard_deviation(list_data): mean = sum(list_data)/len(list_data) variance = 0 for data in list_data: variance += (data - mean) **2 variance /= len(list_data) return variance ** 0.5 list_data = [5, 8, 10, 15, 20] print(standard_deviation(list_data))
#!/bin/env sh # Temporary script to test syncing, this should be done by the regular tests instead. set -e HOST=my-laptop HOSTHOME=/home/bashlund/cluster-host export CLUSTERPATH=/home/bashlund/tmp/simplenetes-testing/dev-cluster # Get an understanding what the remote host has right now. releaseData="$(space / -e RUN=...
<reponame>S0c5/ledger package ledger import ( "errors" "fmt" "github.com/numary/ledger/core" machine "github.com/numary/machine/core" "github.com/numary/machine/script/compiler" "github.com/numary/machine/vm" ) func (l *Ledger) Execute(script core.Script) error { if script.Plain == "" { return errors.New("n...
<?php // Function to generate alphanumeric random string function generateRandomString($length) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $characters[ra...
#!/bin/bash set -e # exit on error wget "https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh" -O miniconda.sh bash miniconda.sh -b echo "Configuring conda." conda config --set auto_update_conda off echo "Installing test dependencies." conda install --yes appdirs dask==2 nodejs jinja2 numpy pyyaml r...
<filename>swarm/document-service/src/data/manager-client.js import service from '../common/service-helper'; export default { getService, startService, checkService, }; /** * [service description] * @param {[type]} name [description] * @return {[type]} [description] */ function getService(name) { re...
#!/bin/bash # This script builds all dependencies of sdsl # and installs the library on a LINUX or Mac OS X system CUR_DIR=`pwd` SDSL_INSTALL_PREFIX=${HOME} if [ $# -ge 1 ]; then SDSL_INSTALL_PREFIX=${1} fi # Get absolute path name of install directory mkdir -p "${SDSL_INSTALL_PREFIX}" 2> /dev/null cd "${SDSL_INSTAL...
#!/bin/bash set -e # Reference: # - https://docs.docker.com/engine/userguide/containers/dockerimages/ # - https://github.com/dockerfile/java/blob/master/oracle-java8/Dockerfile if [ $# -lt 1 ]; then echo "-------------------------------------------------------------------------------------------" echo "Usag...
package com.platform.service; import com.platform.entity.RepairEntity; import java.util.List; import java.util.Map; /** * Service接口 * * @author lipengjun * @email <EMAIL> * @date 2018-11-21 09:25:22 */ public interface RepairService { /** * 根据主键查询实体 * * @param id 主键 * @return 实体 *...
<gh_stars>0 // angular import { Title, DOCUMENT } from '@angular/platform-browser'; import { Inject, Injectable } from '@angular/core'; import { Router, NavigationEnd, ActivatedRoute } from '@angular/router'; // libs import 'rxjs/add/operator/filter'; import 'rxjs/add/operator/map'; // module import { PageTitlePositi...
<reponame>song28/reservoir import Map from "ol/Map.js"; import View from "ol/View.js"; import {defaults} from "ol/control" import { Tile as TileLayer, Vector as VectorLayer } from 'ol/layer.js'; import { XYZ, TileWMS, Vector as VectorSource, Cluster } from 'ol/source.js'; import { Circle as CircleStyle, Fill, Stroke,...
<filename>mvvmfx-validation/src/test/java/de/saxsys/mvvmfx/utils/validation/cssvisualizer/CssVisualizerViewModel.java package de.saxsys.mvvmfx.utils.validation.cssvisualizer; import de.saxsys.mvvmfx.ViewModel; import de.saxsys.mvvmfx.utils.validation.FunctionBasedValidator; import de.saxsys.mvvmfx.utils.validation.Val...
# download Julia 1.5.3 JULIA_VERSION=1.5.3 echo "## downloading Julia $JULIA_VERSION..." curl -OJ "https://julialang-s3.julialang.org/bin/linux/x64/1.5/julia-1.5.3-linux-x86_64.tar.gz" echo "## unpacking Julia..." tar -xzf julia-1.5.3-linux-x86_64.tar.gz echo "## setting up scripts..." export JULIA_DEPOT_PATH=$PWD/ju...
#!/bin/bash dir="$(dirname "$0")" function d_start { echo "Jars Refresh: starting service" "$dir/jars-refreshd.sh" echo $! > /tmp/jars-refresh.pid echo "PID: $(cat /tmp/jars-refresh.pid)" } function d_stop { echo "Jars Refresh: stopping service (PID: $(cat /tmp/jars-refresh.pid))" kill $(ca...
<filename>clicktests/test.stash.js<gh_stars>0 var helpers = require('./helpers'); var testsuite = require('./testsuite'); var Environment = require('./environment'); var webpage = require('webpage'); var page = webpage.create(); var suite = testsuite.newSuite('discard', page); var environment; var testRepoPath; sui...
module.exports = { 'encryption': '3e#h*R2)39#' }
#!/bin/bash # Define input parameters SCRATCH_DIR="/path/to/scratch" ARCHIVE_DIR="/path/to/archive" INPUT_PARENT_DIR="/path/to/input" KEEP_OR_DELETE="delete" # or "keep" # Construct the output parent directory path OUTPUT_PARENT_DIR="$SCRATCH_DIR/$(sed "s|$ARCHIVE_DIR||g"<<<"$INPUT_PARENT_DIR")" # Create parent fol...