text
stringlengths
1
1.05M
#!/bin/bash #SBATCH --time=24:00:00 #SBATCH --nodes=1 --ntasks-per-node=2 --cpus-per-task=1 #SBATCH --mem=20G MAX_SEED=$1 DATASET=$2 HP_SAMPLING=$3 CONTAMINATION=$4 module load Julia/1.5.1-linux-x86_64 module load Python/3.8.2-GCCcore-9.3.0 julia ./gan.jl ${MAX_SEED} $DATASET ${HP_SAMPLING} $CONTAMINATION
import matplotlib.pyplot as plt def plot_suspensions(suspensions, ch_from, ch_to, refnumbers, state): # Create a new figure plt.figure() # Plot the suspensions and their connections for i in range(len(suspensions)): plt.plot([ch_from[i], ch_to[i]], [i, i], 'bo-') # Plot the connection lin...
#!/usr/bin/env bash set -x rm -f /etc/motd echo " __ __ ___. .__ .__ .__ / \ / \ ____\_ |__ | |__ |__|_____ ______ |__| ____ \ \/\/ // __ \| __ \| | \| \____ \\____ \| |/ __ \ \ /\ ___/| \_\ \ Y \ | |_> > |_> > \ ___/ \__/\ / \___ >___ /___| /__| __/...
#include <stdio.h> int partition (int arr[], int low, int high) { int pivot = arr[high]; // pivot int i = (low - 1); // Index of smaller element for (int j = low; j <= high- 1; j++) { // If current element is smaller than the pivot if (arr[j] < pivot) { ...
/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $resource = Resource::find($id); if ($resource) { return response()->json(['data' => $resource], 200); } else { return response()->json(['message' => 'Resource ...
#!/bin/bash #------------------------------------------------------------------------ # Utility methods # fatal() { echo "credentials-local.sh: fatal: $1" 1>&2 exit 1 } info() { echo "credentials-local.sh: info: $1" 1>&2 } if [ -z "${LYRASIS_AWS_ACCESS_ID}" ] then fatal "LYRASIS_AWS_ACCESS_ID is not defined...
<reponame>newleaders/minitest-rails-capybara namespace :test do desc "Run tests for Rails 5.0" task "5.0" do sh "rm -f Gemfile.lock" ENV["RAILS_VERSION"] = "5.0" sh "bundle && bundle exec rake test" sh "rm -f Gemfile.lock" end desc "Run tests for Rails head" task "head" do sh "rm -f Gemfi...
#!/bin/bash # This script locks in Swarm at the below version SWARM_VERSION=1.2.0 read -p "This script will remove any existing Swarm config, are you sure? [Yy] " -n 1 -r echo # (optional) move to a new line if [[ ! $REPLY =~ ^[Yy]$ ]] then exit 1 fi echo "Installing Consul on ceph1" vagrant ssh ceph1 -c "su...
'use strict'; chrome.browserAction.onClicked.addListener(function (tab) { chrome.tabs.sendMessage(tab.id, "canonicalUrl", function (canonicalUrl) { const url = (canonicalUrl || tab.url).replace(/^https?:\/\//, ''); chrome.tabs.create({ url: "https://twitter.com/search?f=live&q=url%3A" +...
#!/usr/bin/env bash cd parallels/src && zip -r ../parallels.alfredworkflow ./ -x "*.DS_Store"
class Reservation { private String name; private int numberOfPeople; private String date; // A reservation can only be made for the same day or later private String time; public Reservation(String name, int numberOfPeople, String date, String time) { this.name = name; this.numberOfPeople = numberOf...
#!/bin/bash apt-get upgrade -s -q | sed -n -e ' # make label for kept back packages s/\(.*kept.*\)/#kept-back/ # make label for upgradeable packages s/\(.*be upgraded.*\)/#upgradeable/ # remove all lines which are not labels or do not hold package names /\(#kept-back\|#upgradeable\|\s\{2\}\)/!d # for ...
<reponame>filcloud/filecoin-specs package interpreter import "errors" import actor "github.com/filecoin-project/specs/systems/filecoin_vm/actor" import addr "github.com/filecoin-project/specs/systems/filecoin_vm/actor/address" import vmr "github.com/filecoin-project/specs/systems/filecoin_vm/runtime" import sysactors ...
<filename>Example.cpp // Just a small state machine (3 states) as demonstration. // // Compile like this: // g++ Macho.cpp Example.cpp #include "Macho.hpp" #include <iostream> using namespace std; namespace Example { //////////////////////////////////////////////////////// // State declarations // Machine's top st...
#!/bin/bash snmpwalk -Os -c private -v1 localhost 1.3.6.1.4.1.1457.4.1.1.8 exit 0
#!/bin/bash # read options, will exit if parameters are malformed temp=`getopt -n 'setup' -o g:s:v: --long group:,serviceName:,version: -- "$@"` eval set -- "$temp" # default parameters group="org.jazzcommunity.example" serviceName="ExampleService" version="1.0.0" # handle optional parameters while true; do cas...
#!/bin/bash setup_dir=$(dirname "${BASH_SOURCE[0]}") # copy synapse configs "${setup_dir}/copy_synapse_configs.sh" # initialize postgres "${setup_dir}/init_postgres.sh" # tear down containers docker-compose down echo echo "Initialization complete. When ready, run: docker-compose up -d" echo
<filename>src/si/modri/WorkLogger/TabWorkspaceController.java package si.modri.WorkLogger; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.event.ActionEvent; import javafx.event.EventType; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.ca...
<gh_stars>0 package cn.stylefeng.roses.kernel.config.api; import cn.hutool.db.Entity; import java.sql.Connection; import java.sql.SQLException; import java.util.List; /** * 系统配置元数据获取的api * * @author fengshuonan * @date 2021/3/27 21:15 */ public interface SysConfigDataApi { /** * 获取系统配置表中的所有数据 * ...
<reponame>Purlemon/oatpp /*************************************************************************** * * Project _____ __ ____ _ _ * ( _ ) /__\ (_ _)_| |_ _| |_ * )(_)( /(__)\ )( (_ _)(_ _) * (_____)(__)(__)(__) |_| |_| * * * Copy...
pub fn add(a: i32, b: i32) -> i32 { a + b } pub fn subtract(a: i32, b: i32) -> i32 { a - b } pub fn multiply(a: i32, b: i32) -> i32 { a * b } pub fn divide(a: i32, b: i32) -> i32 { a / b } pub fn modulo(a: i32, b: i32) -> i32 { a % b }
import java.util.ArrayList; import java.util.HashMap; public class HeapGeneric<T extends Comparable<T>> { private ArrayList<T> data; private boolean isMin; private HashMap<T, Integer> map; public HeapGeneric() { this(false); } public HeapGeneric(boolean isMin) { this.data = ne...
package com.avalon.caverns.core.init; public class TileEntityTypeInit { }
<gh_stars>0 import React, { useEffect, useMemo } from "react" import { Divider, Typography } from '@material-ui/core' import { VideoTileState } from "amazon-chime-sdk-js"; import { useAppState } from "../../../../providers/AppStateProvider"; import { RendererForRecorder } from "./helper/RendererForRecorder"; export ty...
use std::thread; const NTHREADS: usize = 5; fn main() { let mut children = vec![]; // Spawn NTHREADS number of threads for i in 0..NTHREADS { // Spin up another thread children.push(thread::spawn(move || { println!("this is thread number {}", i); })); } // Wai...
#!/bin/bash # Repast Simphony Model Starter # By Michael J. North and Jonathan Ozik # 11/12/2007 # Note the Repast Simphony Directories. PWD="${0%/*}" cd $PWD REPAST_SIMPHONY_ROOT=$PWD/repast.simphony/repast.simphony.runtime_$REPAST_VERSION REPAST_SIMPHONY_LIB=$REPAST_SIMPHONY_ROOT/lib # Define the Core Repast Simph...
def group_by_property(array, property): # create a dictionary to store the results results = {} for obj in array: # get the value of the chosen property from the object value = obj[property] # check if the value exists in the dictionary if value not in results: # if not, add the value to the dictionary as a...
<reponame>lgoldstein/communitychest /* * */ package net.community.chest.jfree.jcommon.util; import java.util.NoSuchElementException; import org.jfree.util.Rotation; import net.community.chest.dom.AbstractXmlValueStringInstantiator; import net.community.chest.lang.StringUtil; /** * <P>Copyright 2008 as per GPLv2<...
<gh_stars>0 package com.udacity.jdnd.course3.critter.controllers; import com.udacity.jdnd.course3.critter.dto.CustomerDTO; import com.udacity.jdnd.course3.critter.dto.EmployeeDTO; import com.udacity.jdnd.course3.critter.dto.EmployeeRequestDTO; import com.udacity.jdnd.course3.critter.entities.Customer; import com.udaci...
<reponame>NithinBiliya/ipo-calculator var app = angular.module('ipo-calculator', []); app.controller('MainCtrl', function($scope) { $scope.hniMinInvestmentLimit=200000; $scope.daysInYear=365; $scope.loanInvestmentAmount=0; $scope.loanInterestRate=7; $scope.daysForCashRedemption=5; $scope.daysForListing=...
const parseCsv = require("../src/parseCsv"); const readCsv = require("../src/readCsv"); test("Parses a CSV string", async () => { const parsed = await parseCsv("name,age\nJohn,30"); expect(parsed.errors.length).toBe(0); }); test("Parses a read file", async () => { const data = await readCsv(`${__dirname}/../sam...
#!/usr/bin/env zsh # # zsh-async # # version: 1.5.2 # author: Mathias Fredriksson # url: https://github.com/mafredri/zsh-async # # Produce debug output from zsh-async when set to 1. typeset -g ASYNC_DEBUG=${ASYNC_DEBUG:-0} # Wrapper for jobs executed by the async worker, gives output in parseable format with executi...
<filename>tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/base/ParameterBaseClass.java package org.apache.tapestry5.integration.app1.base; import org.apache.tapestry5.annotations.Parameter; public abstract class ParameterBaseClass { @Parameter private String value; }
if [ "$#" -lt 1 ]; then echo "No file specified" exit fi mysqladmin -u root drop codecepty-symphonycms-db -f mysqladmin -u root create codecepty-symphonycms-db mysql -u root codecepty-symphonycms-db < tests/_data/$1.sql
<reponame>lananh265/social-network "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ic_backup_table = void 0; var ic_backup_table = { "viewBox": "0 0 24 24", "children": [{ "name": "g", "attribs": {}, "children": [{ "name": "rect", "attribs": { ...
package com.emc.mongoose.base.storage.driver; import static com.emc.mongoose.base.Constants.KEY_CLASS_NAME; import static com.emc.mongoose.base.Constants.KEY_STEP_ID; import com.emc.mongoose.base.concurrent.DaemonBase; import com.emc.mongoose.base.data.DataInput; import com.emc.mongoose.base.config.IllegalConfigurati...
#!/bin/bash # Copyright 2017 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...
#!/bin/bash NUM_YRS=$1 ALINE="grid_ID," #concatenate string grid_ID with commas for i in `seq 1 $NUM_YRS` do ALINE=$ALINE$i"," done #remove the last comma from the header line HLINE=`echo $ALINE | sed 's/,$//'` for i in `find summaries/ -type f -iname *.OUT` do bname=`basename $i Summary.OUT` #echo $bname awk -v ...
<reponame>gitKrystan/rubyCoinCombinations require('capybara/rspec') require('./app') Capybara.app = Sinatra::Application set(:show_exceptions, false) describe('the coin combo path', {:type => :feature}) do it('processes the user entry and returns the proper coin combination') do visit('/') fill_in('change', ...
<filename>src/app/auth/store/actions/user.actions.js<gh_stars>0 import history from '@history'; import {setDefaultSettings, setInitialSettings} from 'app/store/actions/fuse'; import _ from '@lodash'; import store from 'app/store'; import * as Actions from 'app/store/actions'; import jwtService from 'app/services/jwtSer...
<reponame>kqummp/Filter const filter = require('../index.js'); const expect = require('chai').expect; describe('judgeMediumPassword', function(){ it('judgeMediumPasswordTest#1', function(){ let value = "<PASSWORD>"; let result = filter.judgeMediumPassword(value); expect(result).to.be.false; }); i...
<gh_stars>0 import * as THREE from "three"; import "./lib/OrbitControls"; import "./lib/GPUParticleSystem"; import * as helpers from "./helpers"; import Simple from "./particles/simple"; const scene = new THREE.Scene(); const clock = new THREE.Clock(); // const animMap = { // simple: new Simple(scene), // }; con...
import React, { Component, useRef, useState, useEffect } from 'react'; import { ReactComponent as ChevronBack } from '../images/icons/chevron-back-sharp.svg'; import { ReactComponent as ChevronForward } from '../images/icons/chevron-forward-sharp.svg'; let slidedTheSlider = false; const childByPos = []; export const ...
<reponame>smagill/opensphere-desktop<gh_stars>10-100 package io.opensphere.kml.common.util; import java.io.InputStream; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Date; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import g...
#!/bin/bash # this is run by netlify. there is no need to run this manually. # log # Generate index.html and /temp assets for GH Pages branch npm i grunt build grunt build-gh-pages mkdir css mkdir js cp node_modules/bootstrap/dist/css/bootstrap.min.css css/bootstrap.min.css mv temp/boots...
import { Component } from '@angular/core'; @Component({ selector: 'app-root', template: <h1>Expenses</h1> <input [(ngModel)]="expense" placeholder="Enter expense"> <button (click)="addExpense()">Add</button> <p>Total: {{ total }}</p> <canvas id="chart"></canvas> }) export class AppComponent { expense = 0...
<!DOCTYPE html> <html> <head> <title>Books</title> </head> <body> <h1>Books</h1> <div> <p>Welcome to the Books website! Here you can find information on the latest books and Authors.</p> </div> <div> <h2>Authors</h2> <ul> <li>John Grisham</li> <li>Stephen King</li> <li>Dan Brown</li> </ul> </di...
#!/bin/sh set -e BUILD_SCRIPT_LOCATION=$(cd "$(dirname "$0")"; pwd) . ${BUILD_SCRIPT_LOCATION}/../jenkins/common.sh # signing server endpoints rpm_signing_server="https://cvm-sign02.cern.ch/cgi-bin/rpm/sign-rpm" deb_signing_server="https://cvm-sign02.cern.ch/cgi-bin/deb/sign-deb" # This script works as well for auf...
#!/usr/bin/env bash wasm-pack build --out-dir web-src/pkg --target web
#!/bin/sh set -e -x PFKARCH=$( sh ../scripts/architecture ) export PFKARCH if [ ! -d rxvt-unicode ] ; then echo 'no rxvt-unicode dir, skipping rxvt build' # i'm not going to consider this an error, maybe # i just didn't extract it. exit 0 fi cd "$OBJDIR/urxvt" make install cd $HOME/pfk/$PFKARCH/ur...
import test from 'ava'; import fs from 'fs/promises'; import injectBrowserToNode from '../../lib/utils/inject-browser-to-node.js'; import mockProcessCWD from '../helpers/mock-process-cwd.js'; import buildApplication from '../../lib/builders/build-application.js'; import buildVendor from '../../lib/builders/build-vendor...
<gh_stars>0 const frame = 1 / 22 function getZone (middleX, middleY, inX, inY) { if (Math.abs(inX - middleX) <= 25 && Math.abs(inY - middleY) <= 25) { return (0) } const top = (inY < middleY) const left = (inX < middleX) if (top) { return (left) ? 1 : 2 } else { return (left) ? 3 : 4 } } funct...
#!/bin/bash set -ex sass --watch --scss --poll \ djparakeet/scss/:djparakeet/static/css/
<filename>open-sphere-base/core/src/main/java/io/opensphere/core/geometry/renderproperties/RenderPropertyChangeListener.java package io.opensphere.core.geometry.renderproperties; /** Interface for listeners for changes to render properties. */ @FunctionalInterface public interface RenderPropertyChangeListener { /*...
<filename>ts-socks/endpoint.cpp #include "endpoint.h" #include "context.h" #include <ctime> Endpoint::Endpoint(const char *id):m_sock(*Context::Get(), ZMQ_DEALER) { m_ep.append("inproc://").append(id); this->setup(); char _id[10]; srand((uint)time(0)); sprintf(_id, "%04d-%04d", rand() % 10000, ran...
<reponame>hellokellyworld/purejswatermark-deploy /** * While there is nothing in these typings that prevent it from running in TS 2.8 even, * due to the complexity of the typings anything lower than TS 3.1 will only see * PJW as `any`. In order to test the strict versions of these types in our typing * test suite, ...
<filename>eventuate-tram-messaging-proxy-service/src/main/java/io/eventuate/tram/messaging/proxy/service/SubscriptionService.java package io.eventuate.tram.messaging.proxy.service; import io.eventuate.common.json.mapper.JSonMapper; import io.eventuate.tram.commands.common.CommandMessageHeaders; import io.eventuate.tra...
let list = [1, 2, 4, 10, 8]; let highest = Math.max(...list); console.log(highest); // 10
#!/bin/bash # 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"); ...
<reponame>smvv21/corteza-webapp-messaging const types = { pending: 'pending', completed: 'completed', updatePermissions: 'updatePermissions', } const findPermission = (state, operation) => { return (state.permissions.find(s => s.operation === operation) || {}).allow } export default function (Messaging) { ...
#!/bin/bash # Secure OpenVPN server installer for Debian, Ubuntu, CentOS, Amazon Linux 2, Fedora and Arch Linux # https://github.com/angristan/openvpn-install function isRoot () { if [ "$EUID" -ne 0 ]; then return 1 fi } function tunAvailable () { if [ ! -e /dev/net/tun ]; then return 1 fi } function checkO...
#!/bin/bash set -e # Host tools required by Android, WebGL, and iOS builds MOBILE_HOST_TOOLS="matc resgen cmgen filamesh" WEB_HOST_TOOLS="${MOBILE_HOST_TOOLS} mipgen filamesh" IOS_TOOLCHAIN_URL="https://opensource.apple.com/source/clang/clang-800.0.38/src/cmake/platforms/iOS.cmake" function print_help { local sel...
A lightweight AI model can be developed using programming languages such as Python, JavaScript, etc. It will contain code to process text data, extract features, apply a suitable machine learning algorithm and train a model to classify and categorize text.
package com.alianza.sip.impl; import com.alianza.sip.SipContact; import gov.nist.javax.sdp.fields.SDPField; import gov.nist.javax.sdp.parser.SDPParser; import javax.inject.Inject; import javax.sdp.SdpEncoder; import javax.sip.InvalidArgumentException; import javax.sip.address.Address; import javax.sip.address.Address...
#../dashing2/dashing2 sketch -k15 --topk 10 --parse-by-seq --edit-distance --compute-edit-distance ./covid19/toy.fasta --cmpout ./knnGraph_covid.txt -F table_covid.txt #../dashing2/dashing2 sketch -k15 --parse-by-seq --square ./covid19/toy.fasta --cmpout table_covid.txt #../dashing2/dashing2 sketch -k15 --parse-by-se...
const { task, src, dest } = require('gulp'); const babel = require('gulp-babel'); const uglify = require('gulp-uglify'); const aliases = require('gulp-wechat-weapp-src-alisa'); const exit = require('exit'); task('js', callback => { console.log('处理js文件'); src(['src/**/*.js', '*.js', '!gulpfile.js']) //...
<gh_stars>1-10 from typing import Dict, Any from solo import http_defaults, http_endpoint from solo.apps.accounts.service import UserService from solo.apps.accounts.model import User, Guest from solo.apps.accounts import get_user from solo.server.db import SQLEngine from solo.server.request import Request from solo.se...
/// <reference types="./my-module.rt" /> /* GENERATED STUB, remove this comment and take over development of this code. */ import { session, Entity } from '@frusal/library-for-browser'; export class NamedEntity extends Entity { // nothing yet } session.factory.registerUserClass(NamedEntity); export class Produc...
def play_game(n, obstacles, treasures): grid = [[0] * n for _ in range(n)] for x, y in obstacles: grid[y][x] = -1 # Mark obstacle positions as -1 for x, y in treasures: grid[y][x] = 1 # Mark treasure positions as 1 def is_valid_move(x, y): return 0 <= x < n and 0 <= y < n and ...
REM callFunction.sql REM Chapter 9, Oracle9i PL/SQL Programming by <NAME> REM This script shows how to call a stored function. set serveroutput on DECLARE CURSOR c_Classes IS SELECT department, course FROM classes; BEGIN FOR v_ClassRecord IN c_Classes LOOP -- Output all the classes which don't have ...
fun swapArray(arr: Array<Int>): Array<Int>{ val temp = arr[0] arr[0] = arr[arr.size-1] arr[arr.size-1] = temp return arr } fun main(args: Array<String>){ val arr = arrayOf(1, 2, 3, 4) println(swapArray(arr).contentToString()) // Output: [4, 2, 3, 1] }
from typing import List def get_config_file_path(args: List[str]) -> str: config_file_path = "" for i in range(len(args)): if args[i] == "--config-file" and i + 1 < len(args): if args[i + 1].startswith("/"): config_file_path = args[i + 1] break el...
<reponame>BBK-PiJ-2015-07/FinalProject package prefuse.util.collections; import java.util.Iterator; /** * @author <a href="http://jheer.org"><NAME></a> */ public interface LiteralIterator extends Iterator { int nextInt(); boolean isIntSupported(); long nextLong(); boolean isLongSupported()...
import numpy as np from sklearn.svm import SVC from sklearn.preprocessing import StandardScaler # Create a feature vector consisting of the Color, Weight, and Size of the fruits. features = np.array([ [125, 0.7, 9], # Orange [90, 0.5, 6], # Orange [150, 0.75, 10], # Apple [88, 0.7, 8] # Apple ]) # Cre...
import { Sequelize } from 'sequelize'; import { loadModules } from '../util/common.util'; import { dbConfig } from '../config'; const options = { dialect: 'sqlite', storage: dbConfig.dbPath }; const sequelize = new Sequelize(options); (async () => { // Initialize database try { await sequelize.authenticat...
<reponame>dimostoilov/hcp-portal-service-for-pcm jQuery.sap.registerModulePath("sap.ui.fiori.util.Formatter", registerPrefix + "/pcmcpapps/Invite/util/Formatter"); sap.ui.define(["sap/ui/fiori/util/Formatter"], function(Formatter) { var formatter; module("pcmcpapps --> Invite Formatter", { setup: fun...
#!/usr/bin/env bash # # 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 "Lice...
import { useEffect } from "react"; import { connect } from "react-redux"; import { refreshToken } from "../../redux/actions"; const Auth = ({ refreshToken }) => { useEffect(() => { refreshToken(); // A timer that refreshes the token automatically // every 14 minutes (1 minute less than th...
/* * jqeury-CcUi 0.1 * Copyright (c) 2012 Chuchur http://www.Chuchur.com/ * Date: 2012-8-3 * QQ :455105775 * Dialog弹窗for bootstrap。 */ (function () { $.fn.alert = function (options) { var defaults = { type: 'success', title: '提示', content: '恭喜,操作成功!', ...
#!/bin/bash # Copyright Johns Hopkins University (Author: Daniel Povey) 2012. Apache 2.0. # begin configuration section. cmd=run.pl min_lmwt=5 max_lmwt=17 #end configuration section. [ -f ./path.sh ] && . ./path.sh . parse_options.sh || exit 1; if [ $# -ne 3 ]; then echo "Usage: $0 [--cmd (run.pl|queue.pl...)] <da...
<reponame>bankscrap/bankscrap-openbank require_relative 'utils.rb' module Bankscrap module Openbank class Card < ::Bankscrap::Card include Utils attr_accessor :contract_id CARD_ENDPOINT = '/my-money/tarjetas/movimientosCategoria'.freeze # Fetch transactions for the given account. ...
package main import "testing" // Test the creation of a basic Scum func TestScumHasBasicMembers(t *testing.T) { // New up a scum scum := Scum{"1.2.3.4", 4, false, false} scum.NumAttempts = 3 }
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package servlets; import beans.GearBean; import beans.ProfileBean; import entities.Skioprema; import java.io.IOException; import java....
#!/bin/sh export CFLAGS="-I$PREFIX/include" export LDFLAGS="-L$PREFIX/lib" ./configure --prefix=$PREFIX \ --with-ssl=$PREFIX \ --enable-hcache \ --enable-imap \ --enable-smtp \ --with-homespool=.mailbox make make install
<gh_stars>100-1000 /** * @jest-environment ./prisma/prisma-test-environment.js */ import { v4 as uuid } from 'uuid' import { prisma } from '@infra/prisma/client' import { redisConnection } from '@infra/redis/connection' import { makeDeleteUserHandler } from '../factories/DeleteUserHandlerFactory' const deleteUser...
#!/bin/bash docker build -t barryto/file-server .
$:.push File.expand_path("../lib", __FILE__) # Maintain your gem's version: require "tail/version" # Describe your gem and declare its dependencies: Gem::Specification.new do |s| s.name = "tail" s.version = Tail::VERSION s.authors = ["<NAME>"] s.email = ["<EMAIL>"] s.homepage = "http...
!/bin/bash echo "####Creating Containers####" docker run -dt --cap-add=ALL --name ospf1 --ip 192.168.0.2 --net=clos-oob-network -P ubuntu_flex:v2 docker run -dt --cap-add=ALL --name ospf2 --ip 192.168.0.3 --net=clos-oob-network -P ubuntu_flex:v2 ospf1_pid=`docker inspect -f '{{.State.Pid}}' ospf1` ospf2_pid=`doc...
import java.net.HttpURLConnection; import javax.net.ssl.HttpsURLConnection; import java.net.MalformedURLException; import java.net.URL; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.Keys; import org.openqa.selenium.StaleElementReferenceException; import org.ope...
/* * MIT License * * Copyright (c) 2021 <NAME> * * 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, mod...
#!/bin/bash if [ -n "${HADOOP_DATANODE_UI_PORT}" ]; then echo "Replacing default datanode UI port 9864 with ${HADOOP_DATANODE_UI_PORT}" sed -i "$ i\<property><name>dfs.datanode.http.address</name><value>0.0.0.0:${HADOOP_DATANODE_UI_PORT}</value></property>" ${HADOOP_CONF_DIR}/hdfs-site.xml fi if [ "${HADOOP_NODE}"...
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by <NAME>, <EMAIL>, All rights reserved. # LLNL-CODE-647188 # # For det...
<filename>19-React/01-Activities/05-Stu_HelloBootstrap/Solved/Bonus/src/components/Jumbotron.js<gh_stars>10-100 import React from "react"; function Jumbotron() { return ( <div className="jumbotron"> <h1>Your Project</h1> <p> Enim adipisicing enim reprehenderit ex ullamco consectetur Lorem lab...
#!/usr/bin/env bash # Copyright Materialize, Inc. All rights reserved. # # Use of this software is governed by the Business Source License # included in the LICENSE file at the root of this repository. # # As of the Change Date specified in that file, in accordance with # the Business Source License, use of this softw...
public class Example { public static void main(String[] args) { int a = 1; int b = 2; int c = 0; for(int i = 1; i < 10; i++) { c += a + b; a++; } System.out.println("c = "+ c); } }
<filename>SourceCode/Go/holer/IntraServerHandler.go /* * Copyright 2018-present, Yudong (<NAME> * * 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/...
var gulp = require('gulp'), child_process = require('child_process'), exec = require('child_process').exec, minifyCss = require('gulp-minify-css'), nodemon = require('gulp-nodemon'); // startup required services to run the app server gulp.task('mongod', function() { // ...
#!/usr/bin/env bash # Copyright 2021 The Cockroach 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
<reponame>MoozLee/RebateBot package main import ( "io/ioutil" "log" "os" "path/filepath" "github.com/546669204/RebateBot/common" "github.com/gin-gonic/gin" ) func initWebApi() { router := gin.New() api := router.Group("api") api.GET("/getService", getService) api.GET("/getUserData", getUserData) api.GET(...
# Implement the health_execute_command function health_execute_command() { # Add your command execution logic here # For example: # if the health command is "check_health", you can use: # if check_health_command; then # return 0 # else # return 1 # fi # Replace "check_health_command" with the actu...