text stringlengths 1 1.05M |
|---|
#!/bin/bash
# Scenario#1: create keyvault, key, and DiskEncryptionSet
rgName=
location=southcentralus
keyVaultName=
keyName=
diskEncryptionSetName=
az group create -g $rgName -l $location
az keyvault create -n $keyVaultName -g $rgName -l $location --enable-purge-protection true --enable-soft-delete true
az keyvault ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.handleHostOption = void 0;
const bin_1 = require("../../bin");
function handleHostOption(incoming) {
const host = incoming.get("host");
const listen = incoming.get("listen");
if (host && listen) {
if (host !== liste... |
<reponame>quicksprout/naas-api-client-python
import iso8601
from naas.models.links import Links
class CampaignEmailTemplate(object):
"""
Campaign Email Template
===============
This returns an instance of the Campaign Email Template domain model
"""
def __init__(self, attributes={}):
... |
<reponame>opuneet/dyno
package com.netflix.dyno.connectionpool.impl.health;
public interface ErrorMonitor {
/**
* Monitor errors
* @param numErrors
* @return true/false indicating whether the error are within the threshold.
* True: Errors still ok. False: errors have crossed the threshold
*/
bo... |
import logging
def process_payload(payload, username, data):
if not payload: # Check if the payload is empty
logging.error('Collection entry is empty') # Log the error message
return None # Return None if the payload is empty
fmt = payload.get('format', 'raw') # Get the format from the pay... |
/**
* agent.js
* Defines the $agent object that will be injected in every webview
*/
const $agent = {
callbacks: {},
interface: {}
};
// Make requests to another agent
$agent.request = function(rpc, callback) {
// set nonce to only respond to the return value I requested for
var nonce = Ma... |
const Logger = require('js-logger');
import { logErrors } from './errorService';
describe('Error Service', () => {
describe('logError ', () => {
it('log an error', () => {
// Arrange
Logger.error = jest.fn();
const message = 'Something important to know';
const file = 'test.file';
... |
package org.chojin.spark.lineage.report
case class Metadata(appName: String) {
def toMap(): Map[String, String] = Map(
"appName" -> appName
)
}
|
mkdir package
cp -v LICENSE package.json README.md tsconfig.json sha1.ts package/
cd package
mkdir lib
cd ..
cp -v lib/sha1.js lib/sha1.d.ts lib/sha1.js.map package/lib
tar -czvf release.tar.gz package/*
|
import Foundation
#if os(iOS) || os(tvOS)
public extension NSObject {
var className: String {
return String(describing: type(of: self)).components(separatedBy: ".").last ?? ""
}
}
#endif |
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: sans-serif;
background-repeat: no-repeat;
background-size: cover;
}
a {
text-decoration: none;
color: #008f68;
font-weight: bold;
}
h1 {
font-size: 45px;
font-weight: bold;
}
h2 {
font-size: 30px;
font-weight: bold;
}
h3 {
font-size: 25px;
... |
#!/bin/sh
#
# uuspeed - a script to parse a Taylor UUCP Stats file into pretty results.
# Zacharias J. Beckman.
grep bytes /usr/spool/uucp/Stats | grep -v 'bytes 0.00 secs' | grep -v 'failed after' | tail -80 | \
gawk '
BEGIN {
printf(" UUCP transmission history:\n");
format=" %8d bytes %8s(%8s) in ... |
def findMinValue(list):
minValue = list[0]
for i in range(1, len(list)):
if list[i] < minValue:
minValue = list[i]
return minValue
list1 = [30, 10, 40, 20]
minValue = findMinValue(list1)
print(minValue) |
<filename>app/models/des/hvd/HvdFromUnseenCustDetails.scala
/*
* Copyright 2021 HM Revenue & Customs
*
* 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/licen... |
<filename>CODES/24. Object constructor function/source codes/js/script.js<gh_stars>0
/*
* Objects - containers for storing variables (properties) and functions (called methods)
* thematically related to each other for easier re-using
*
* Class (constructor function)
* Shortly class ... |
#!/usr/bin/gnuplot -c
# data.csv "xeon" "numbers.png" "cycles" "block size"
set title @ARG2
set terminal pngcairo transparent enhanced linewidth 2 font 'Helvetica,15' size 1000, 600 background rgb 'white'
set xtics nomirror rotate by -45 ##scale 0 offset 4 #
set ytics nomirror
set grid ytics
set grid xtics
set ylabel "... |
//
// UIView+Snapshots.h
// AHKActionSheetExample
//
// Created by Arkadiusz on 08-04-14.
// Copyright (c) 2014 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIView (Snapshots)
- (UIImage *)AHKsnapshotImage;
@end
|
# Initialize the two points
A = (1,2)
B = (5,6)
# Create a function
def short_path(p1, p2):
# Compute the x-distance
x_dist = abs(p2[0] - p1[0])
# Compute the y-distance
y_dist = abs(p2[1] - p1[1])
# Compute the manhattan distance
manh_dist = x_dist + y_dist
return manh_dist
# Test the fu... |
<gh_stars>0
package main
import (
"fmt"
"log"
"net/http"
"time"
"github.com/gorilla/websocket"
)
const (
// Time allowed to write a message to the peer.
writeWait = 10 * time.Second
// Time allowed to read the next pong message from the peer.
pongWait = 60 * time.Second
// Send pings to peer with this pe... |
#!/usr/bin/env bash
if [[ ! -d "$HOME/.pyenv" ]]; then
curl https://pyenv.run | bash
export PATH="/home/vagrant/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
cat <<'EOF' >> "$HOME/.bashrc"
# Pyenv configuration
export PATH="/home/vagrant/.pyenv/bin:$PATH"
eval "$(pyenv ini... |
#!/bin/sh
set -e
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
local source="${BUILT_PRO... |
<reponame>SathishRamasubbu/Local----Zipkin
/**
* Copyright 2015-2018 The OpenZipkin 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
... |
"""
Create a class that can create a binary search tree from a given array.
"""
class BinarySearchTree:
def __init__(self):
self.root = None
def add(self, value):
node = self.Node(value)
if self.root is None:
self.root = node
else:
se... |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('plataforma', '0004_auto_20160912_1647'),
]
operations = [
migrations.AddField(
model_name='categoria',
name='slug',
field=models.SlugField(max_length=200, n... |
curl https://shouldervis.chpc.utah.edu/kinevis/csv.zip --output csv.zip
unzip csv.zip -d csv
rm csv.zip
|
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0
# Test WasmEdge WASI layer.
# The testcase is from https://github.com/khronosproject/wasi-test
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
current_dir=$(pwd -P)
usage() {
ca... |
<reponame>rpcxio/go-redis
package internal
import (
"context"
"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/api/metric"
)
var (
// WritesCounter is a count of write commands performed.
WritesCounter metric.Int64Counter
// NewConnectionsCounter is a count of new connections.
NewConnectionsCou... |
<filename>Big O/bigOexercise1.js<gh_stars>0
// What is the Big O of the below function? (Hint, you may want to go line by line)
function funChallenge(input) {
let a = 10; //O(1) only runs once
a = 50 + 3; //reassigning a. Also an O(1)
for (let i = 0; i < input.length; i++) { //O(n) because loops are line... |
import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
import { InjectModel } from '@nestjs/sequelize';
import { Project } from 'src/database/projects/models';
import { CreateProjectDto, UpdateProjectDto } from '../dtos';
@Injectable()
export class ProjectsService {
constructor(
@InjectModel(Pro... |
#!/bin/bash
num_args=$#
args=${@}
cmd_str=""
outdircame=0
for arg in "$@"
do
cmd_str="${cmd_str} ${arg}"
if [ $outdircame -eq 1 ]; then
mkdir -p ${arg}
outdircame=0
fi
if [ ${arg} == "--outdir" ]; then
outdircame=1
fi
done
echo ${cmd_str}
eval ${cmd_str}
|
import pytest
from fontbakery.codetesting import (TEST_FILE,
assert_results_contain)
from fontbakery.checkrunner import ERROR
from fontbakery.profiles import fontval as fontval_profile
def test_check_fontvalidator():
""" MS Font Validator checks """
# check = CheckTester(f... |
<reponame>anchit-sadana/hal9ai<gh_stars>0
// @flow
import yaml from 'js-yaml';
/*::
type params = { [key: string]: Array<string> };
type flatparams = Array<string>;
type deps = Array<string>;
type func = (...args: Array<any>) => any;
type header = { params: Array<string>, deps: Array<string> };
*/
var depsCache = {}... |
import hashlib
import itertools
import string
def find_original_input(hash, size):
characters = string.ascii_letters + string.digits + string.punctuation
for length in range(1, size + 1):
for combination in itertools.product(characters, repeat=length):
input_data = ''.join(combination)
... |
module.exports = function(app, chatRoutes,io){
var User = require('../models/user.js');
var Chat = require('../models/chat.js');
var Message = require ('../models/message.js');
chatRoutes.get('/users/:username/chat',function(req, res){
Chat.find({
$or:[
{user1:req.params.username},
{user2:re... |
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
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... |
select sid, event, seconds_in_wait, state
from v$session_wait
where event = 'log buffer space%'
/
|
import re
class QueryProcessor:
def __init__(self, source):
self.source = source
def _validate_query(self):
condensed_query = self.source.query.lower().replace(" ", "")
if re.search(r"notin\({ids}\)", condensed_query):
raise ValueError(f"Not support 'not in' phrase: {self.s... |
<gh_stars>1-10
import React from 'react';
import { connect } from 'react-redux';
import "storm-react-diagrams/dist/style.min.css";
import {
setSelectedCourse,
} from "../actions/DiagramActions";
import RequirementChart from '../components/main/RequirementChart';
import {
fetchCourse,
} from "../actions/ApiActio... |
<gh_stars>0
/** # Mancala CBR test
CBR based player test. Populates a case base (SQLite3 database) and assesses the resulting player
against other players.
*/
var ludorumCBR = require('../build/ludorum-player-cbr'),
mancala = require('@creatartis/ludorum-game-mancala'),
ludorum = require('ludorum'),
base =... |
#!/bin/bash
#SBATCH -t 02:00:00
#SBATCH -p RM-shared
#SBATCH -N 1
#SBATCH --ntasks-per-node 1
#SBATCH --array=1-88:1
Rscript sim_code/fig04_partial_oracle_axis.R sim_params/fig04_partial_oracle_axis_params.csv $SLURM_ARRAY_TASK_ID
|
from pathlib import Path
LEGACY_SUPPORT = False
def pltostr(path) -> str:
if isinstance(path, Path):
return str(path.resolve())
elif isinstance(path, str):
if LEGACY_SUPPORT:
path = path.replace("\\", "/") # Convert legacy string path to modern format
return str(Path(path)... |
<gh_stars>0
package com.firax.tetris;
import com.firax.tetris.bricks.Brick;
import com.firax.tetris.bricks.BrickColor;
import javafx.animation.Animation;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.application.Platform;
import javafx.event.ActionEvent;
import javafx.geome... |
#!/bin/bash
if [ ! "$1" ]; then
echo "This script requires either amd64 of arm64 as an argument"
exit 1
elif [ "$1" = "amd64" ]; then
PLATFORM="$1"
DIR_NAME="chia-blockchain-linux-x64"
else
PLATFORM="$1"
DIR_NAME="chia-blockchain-linux-arm64"
fi
pip install setuptools_scm
# The environment variable CHIA_INSTAL... |
var native;
try {
native = require("./build/Release/malloc-tools.node");
} catch (ex) {
native = require("./build/Debug/malloc-tools.node");
}
module.exports = native;
|
#!/bin/bash
source initialize.sh
source data/version.sh
source config/config.sh
source sync_from_s3.sh
|
<reponame>naokikimura/gulp-mocha
/// <reference types="../src/@types/mocha/lib/cli/options" />
import { expect } from 'chai';
import stream from 'stream';
import mocha from '../src/index';
describe('Plugin', () => {
it('it should return Transform instance', () => {
expect(mocha()).to.be.an.instanceof(stream.Tra... |
ansible-playbook -i deploy/hosts deploy/mqpi-deployment.yml -u root --flush-cache -v
|
package org.hiro.things;
import java.util.Arrays;
public enum ObjectType {
PASSAGE('#'),
DOOR('+'),
FLOOR('.'),
PLAYER('@'),
TRAP('^'),
STAIRS('%'),
GOLD('*'),
POTION('!'),
SCROLL ('?'),
MAGIC ('$'),
FOOD (':'),
WEAPON (')'),
ARMOR (']'),
AMULET (','),
RING ('='),
STICK ('/'),
Vert('|'),
Horizon('... |
<gh_stars>1-10
/* eslint-disable camelcase */
export interface Author {
state: string;
id: number;
web_url: string;
name: string;
avatar_url?: any;
username: string;
}
export interface Milestone {
project_id: number;
description: string;
state: string;
due_date?: any;
iid: number;
created_at: D... |
package org.stjs.server.rest.spring;
import org.springframework.http.HttpStatus;
import org.stjs.shared.rest.spring.RestCallback;
import org.stjs.shared.rest.spring.RestResult;
/**
*
* @author sj
*/
public class ResponseResult<T> implements RestResult<T> {
private final HttpStatus httpStatus;
private final T b... |
package de.wwu.wmss.core;
public class Tonality {
private String mode;
private String tonic;
private String code;
public Tonality() {
super();
}
public String getMode() {
return mode;
}
public void setMode(String mode) {
this.mode = mode;
}
public String getTonic() {
return tonic;
}
public voi... |
/*
* Copyright 2021 Hazelcast Inc.
*
* Licensed under the Hazelcast Community License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://hazelcast.com/hazelcast-community-license
*
* Unless required by applicable law or agree... |
<reponame>missaouib/Fame
package com.designre.blog.listener.event;
import com.designre.blog.model.dto.CommentDto;
import lombok.Getter;
import lombok.ToString;
import org.springframework.context.ApplicationEvent;
@ToString
@Getter
public class CommentNewEvent extends ApplicationEvent {
private final CommentDto c... |
<filename>src/commands/invites/check.ts
import { EMBEDS, MESSAGES } from '@constants'
import { extractCodes, handle, processResults } from '@utils'
import { Command } from 'discord-akairo'
import { CategoryChannel, Collection, Message, NewsChannel, TextChannel } from 'discord.js'
export default class CheckCommand exte... |
<reponame>zhanghongli-lily/tmoney
package zelda;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import zelda.page.AppLogin;
/**
* @ClassName: BaseCase
* @Description: baseCase
* @Author: zh... |
import { AnyObject } from '../types/common-types';
export const decodeState = (encodedState: string): AnyObject | undefined => {
try {
return JSON.parse(atob(decodeURIComponent(encodedState)));
} catch (error) {
return undefined;
}
};
export const encodeState = (state: AnyObject, stateKey?: string): str... |
<filename>app/services/events.service.js
const bluebird = require('bluebird');
const request = require('request-promise');
const PubSub = require('@google-cloud/pubsub');
const config = require('../../config');
const pubsub = PubSub({
projectId: config.pubsub.projectId,
credentials: config.pubsub.credentials,
pr... |
<filename>RPiAir/players/omxplayer.py
import os
import pexpect
import time
from player import Player
from RPiAir.database import Movie
from RPiAir.messaging import create_jsonMessage
class OMXPlayer(Player):
"""class for control OMXPlayer instance (RPi)"""
CMD = "/usr/bin/omxplayer.bin"
ARGS = "-o hdmi... |
import java.util.HashSet;
import java.util.Set;
public class Role {
private String name;
private Set<String> permissions;
public Role(String name) {
this.name = name;
this.permissions = new HashSet<>();
}
public void addPermission(String permission) {
permissions.add(permi... |
def generate_output(input_list):
if len(input_list) != 4:
raise ValueError("input_list must have 4 elements")
output = 0
for input in input_list:
if input == 1:
output = 0
break
if output == 0:
output = 1
return output |
#!/bin/sh
#
# Vivado(TM)
# runme.sh: a Vivado-generated Runs Script for UNIX
# Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.
#
echo "This script was generated under a different operating system."
echo "Please update the PATH and LD_LIBRARY_PATH variables below, before executing this script"
exit
... |
private void pesquisa_Click(object sender, EventArgs e)
{
ValidateInput(codCli.Text);
}
private void ValidateInput(string input)
{
if (string.IsNullOrWhiteSpace(input))
{
MessageBox.Show("O campo de pesquisa não pode estar vazio", "Resultado", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
... |
<reponame>HQ063/18xx<filename>lib/engine/game/g_1889.rb
# frozen_string_literal: true
require_relative '../config/game/g_1889'
require_relative 'base'
module Engine
module Game
class G1889 < Base
load_from_json(Config::Game::G1889::JSON)
end
end
end
|
echo ""
echo "=========================================================="
echo "Push Kubernetes 1.11.0 Images into hub.docker.com ......"
echo "=========================================================="
echo ""
echo "docker tag to openthings ..."
## 添加Tag for hub.docker.com
docker tag k8s.gcr.io/kube-apiserver-amd6... |
import pulsar as psr
def load_ref_system():
""" Returns 2_2-dichloroacetic_acid as found in the IQMol fragment library.
All credit to https://github.com/nutjunkie/IQmol
"""
return psr.make_system("""
C 0.1545 -0.2925 -0.4629
C -1.0813 0.5115 -0.1454
... |
import os
def remove_files_and_directories(packages):
files_and_directories_to_remove = [
"tslint.json",
"yarn.lock",
"ember-cli-build.js",
".travis.yml",
"CODE_OF_CONDUCT.md",
"LICENSE",
"tmp",
"dist"
]
for package in packages:
for r... |
#!/bin/bash
#SBATCH -p haswell
#SBATCH --exclusive
#SBATCh --time=01:30:00
#SBATCH -c 24
#SBATCH -n 1
#SBATCh --cpu_bind=threads
#SBATCH --mem-per-cpu=2300
module use /projects/p_readex/modules/
module load scorep/scorep/ci_TRY_READEX_online_access_call_tree_extensions_bullxmpi1.2.8.4_gcc5.3.0
module load readex-rrl... |
<filename>domain-machine/src/main/java/org/angrygoat/domainmachine/exception/PolicyDomainRuntimeException.java
package org.angrygoat.domainmachine.exception;
public class PolicyDomainRuntimeException extends RuntimeException {
/**
*
*/
private static final long serialVersionUID = 3243208307509723136L;
public... |
<filename>src/app/atoms/Dropdown.react.js
import Component from 'react-pure-render/component';
import font from '../styles/Font';
import Icon from './Icon.react';
import {mediaQueries} from '../styles/MediaQueries';
import Radium from 'radium';
import React, {PropTypes as RPT} from 'react';
import ReactDOM from 'react-... |
#!/usr/bin/env bash
for f in /home/{{ ansible_user }}/runners/*.sh
do
echo "Running ${f}"
echo $(date -u +"%Y-%m-%dT%H:%M:%SZ"),start,${f%.*} >> /home/{{ ansible_user }}/runners/log.csv
${f}
echo $(date -u +"%Y-%m-%dT%H:%M:%SZ"),done,${f%.*} >> /home/{{ ansible_user }}/runners/log.csv
done
echo $(date... |
<reponame>jmthompson2015/book-club
const QUnit = require("../node_modules/qunit/qunit/qunit.js");
const Book = require("../artifact/Book.js");
const Person = require("../artifact/Person.js");
const Series = require("../artifact/Series.js");
const UrlGenerator = require("./UrlGenerator.js");
QUnit.module("UrlGenerato... |
<filename>src/main/java/com/example/effective3/Main.java
package com.example.effective3;
/**
* 用私有构造器或者枚举类型强化 Singleton 属性
* @author qxw
* @version 1.00
* @time 27/5/2019 上午 11:35
*/
public class Main {
public static void main(String[] args) {
Singleton1 obj1=Singleton1.INSTANCE;
Singleton1... |
<filename>src/test/java/de/fnordbedarf/debugger/givendebugger/Sleep.java
package de.fnordbedarf.debugger.givendebugger;
import de.fnordbedarf.debugger.Debugger;
import org.junit.jupiter.api.Test;
/**
* Created by HiekmaHe on 05.05.2017.
*
*/
class Sleep
{
@Test
void whenSleepTwoSecondsThenSleepTwoSeconds() {
... |
#!/usr/bin/env bash
# Create the pre-start script that copies the buildpack package to /var/vcap/data/shared-packages/.
set -o errexit -o nounset
release="suse-staticfile-buildpack"
buildpack="suse-staticfile-buildpack"
pre_start="/var/vcap/all-releases/jobs-src/${release}/${buildpack}/templates/bin/pre-start"
copy... |
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 充值跳端
*
* @author auto create
* @since 1.0, 2021-09-29 17:19:44
*/
public class AlipayFundJointaccountFundDepositModel extends AlipayObject {
private static final long serialVer... |
#!/bin/bash
maildir=$1
# ó: 9b -> f3
# í: ad -> ed
# ç: d8 -> e7
# á: ff -> e1
function replaceByte() {
local path="$maildir/$1"
sed -i "s/\x9b/\xf3/g" "$path"
sed -i "s/\xad/\xed/g" "$path"
sed -i "s/\xd8/\xe7/g" "$path"
sed -i "s/\xff/\xe1/g" "$path"
}
#9b
replaceByte shackleton-s/all_documents... |
#include <iostream>
#include <string>
#include <cassert>
class XMLIterPrinter {
private:
bool theOpenStart;
public:
XMLIterPrinter() : theOpenStart(true) {}
void addStrAttribute(const char *name, const char *value) {
assert(theOpenStart);
std::cout << ' ' << name << "=\"" << value << "\"";
}
void ... |
#!/bin/sh
XDG_RUNTIME_DIR=/home/mikolaj/.run
PULSE_RUNTIME_PATH="${XDG_RUNTIME_DIR}/pulse"
PULSE_ENV="env PULSE_RUNTIME_PATH=${PULSE_RUNTIME_PATH} XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}"
PULSE="${PULSE_ENV} pulseaudio"
|
#!/bin/bash
curl -Ss $URL|jq '.'
|
#!/usr/bin/env bash
# Enumerate docker images to be processed
DOCKER_IMAGE_NAMES=(
"bitnami/kafka:2.8.0"
"bitnami/rabbitmq:3.8.17"
"bitnami/zookeeper:3.6.3"
"coleifer/sqlite-web:latest"
"ibmcom/db2:11.5.5.1"
"mysql:5.7"
"obsidiandynamics/kafdrop:3.27.0"
"phpmyadmin/phpmyadmin:5.1.1"
"postgres:11.12.... |
<filename>src/module.indexer/model/transaction.vin.ts
import { Injectable } from '@nestjs/common'
import { defid, Indexer, RawBlock } from '@src/module.indexer/model/_abstract'
import { TransactionVin, TransactionVinMapper } from '@src/module.model/transaction.vin'
import { TransactionVout } from '@src/module.model/tra... |
#!/bin/sh
WRAP_DIR=~/moses.new/scripts/training/wrappers/
tagger=$WRAP_DIR/make-factor-en-pos.mxpost.perl
lang=en
for stem in test train.10k train.100k; do
$tagger -mxpost /home/pkoehn/statmt/project/mxpost $stem.$lang $stem.tagged.$lang /tmp
done
tagger=$WRAP_DIR/make-factor-de-pos.perl
lang=de
for stem in tes... |
#!/bin/bash
# usage: ./fetch-release.sh releaseVersion
if [ $# -eq 0 ]
then
echo usage: ./release.sh releaseVersion
exit -1
fi
git checkout -B stage origin/stage
git pull --recurse-submodules=yes
git checkout tags/jpo-ode-$1
git submodule update --recursive --init
|
#!/bin/bash
#
# Copyright (c) 2019-2020 P3TERX <https://p3terx.com>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
# https://github.com/P3TERX/Actions-OpenWrt
# File name: diy-part2.sh
# Description: OpenWrt DIY script part 2 (After Update feeds)
#
# Modify default IP... |
#!/bin/bash -E
# Pre-checks for validation and linting
#
# These checks do not provide a fix and are quicker to run,
# allowing CI to fail quickly on basic linting or validation errors
FAILED=()
CURRENT=""
# AZP appears to make lines with this prefix red
BASH_ERR_PREFIX="##[error]: "
DIFF_OUTPUT="${DIFF_OUTPUT:-/bui... |
// const zos = require('zos');
const ProofOfExistence = artifacts.require('../contracts/ProofOfExistence.sol');
/** This runs tests with the standard migration provided by Truffle. Hence, our contracts
* will not be properly initialized due to our use of the ZeppelinOS library. We can still test
* the user facing ... |
import React from 'react'
import PropTypes from 'prop-types'
import ManageQuestionsListItem from './questionsListItem'
import {
ListGroupItem, Row, Col
} from 'react-bootstrap'
const ManageQuestions = ({ questions, sortBy, handleSort }) => {
const isMobile = window.innerWidth < 992
return (
<>
<ListGro... |
#include <iostream>
#include <vector>
#include <string>
#include <unordered_map>
// Define a struct to hold the parsed command-line options
struct CommandLineOptions {
std::string scriptFileName;
std::vector<std::string> inlineStrings;
int testNumber;
bool is3D;
bool runDiffTest;
double diffTes... |
# Import the necessary packages
import requests
# Make an API call and store the response
url = 'https://example.com/'
r = requests.get(url)
# Extract the content of the response
html_content = r.content
# Print the response
print(html_content) |
#!/usr/bin/env bash
# Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
# rebuild is a reasonbuild wrapper that builds reason files
# it calls into ocamlbuild, telling it to call a special
# command 'reopt' which links custom reasson build
# rules.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )... |
#!/bin/zsh
DEBUG=""
USAGE=1
ONE_TIME=1
LOG_LEVEL="d"
if [ ! -d /opt/generic_bash_functions ];then
echo "/opt/generic_bash_functions not found, attemting to clone from lanthean's github"
pushd /opt
sudo git clone https://github.com/lanthean/generic_bash_functions.git
popd
sudo chown -R $USER:staff ... |
#!/bin/bash
trap 'echo "${BASH_SOURCE[0]}: line ${LINENO}: status ${?}: user ${USER}: func ${FUNCNAME[0]}"' ERR
set -o errexit
set -o errtrace
SERVER_NAME="ManagedServer2"
DOMAIN_HOME="/usr/local/weblogic/user_projects/domains/base_domain"
LOG_DIR="${DOMAIN_HOME}/logs"
DATETIME="$(date +'%Y%m%d_%H%M%S')"
CURRENT_USER... |
/**
*/
package PhotosMetaModel.impl;
import PhotosMetaModel.PhotosMetaModelPackage;
import PhotosMetaModel.View_a;
import org.eclipse.emf.ecore.EClass;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>View a</b></em>'.
* <!-- end-user-doc -->
*
* @generated
*/
public class View_aI... |
import nltk
import random
import string
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
# A list of common questions related to online shopping
questions = [
'How do I find the best deals?',
'Can I get free shipping?',
'What payment methods are accepted?',
'What is your return policy?',
... |
module.exports = {
useProject: true,
exec: function({registry, logger, screen, docker, config, args}) {
screen.info('Definitions are valid.');
var tableData = [];
for(var cluster of registry.clusters)
{
tableData.push([cluster.id, cluster.berliozfile]);
... |
#!/bin/bash
# Copyright 2021 Huawei Technologies 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 ... |
<reponame>jcfr/SPHARM-PDM
/*
* author: msturm,
* created: 16 Apr 1997
* changes:
*
* contains routines for command line parsing
* (mostly copied from gaudi toolbox, changed to templated functions)
*
*/
#ifndef __ARGIO_H__
#define __ARGIO_H__
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#inclu... |
<reponame>insufficientchocolate/diplomat<filename>pkg/log/maybe.go
package log
type maybeLogger struct {
parent Logger
}
func (m maybeLogger) Info(message string, args ...interface{}) {
if m.parent != nil {
m.parent.Info(message, args...)
}
}
func (m maybeLogger) Error(message string, args ...interface{}) {
if... |
<filename>aws/table_aws_redshift_subnet_group.go
package aws
import (
"context"
"github.com/turbot/steampipe-plugin-sdk/v3/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v3/plugin/transform"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/redshift"
"github.com/turbot/steampipe-plugin-sd... |
#!/usr/bin/env bash
for j in `seq 10`;
do
{ time python ~/bin/Skeleton/bin/aimes-skeleton-synapse.py serial flops 1 1715750072310 65536 65536 0 0 0 ; } 2>> ~/bin/time_results_skeleton_comet;
done
sed -n '/cannot/!p' ~/bin/time_results_skeleton_comet | sed -n '/open/!p' | grep . > ~/bin/time_results_cleaned_skeleto... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.