text
stringlengths
1
1.05M
/* * Copyright 2017 Nafundi * * 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 in writi...
<reponame>lionelpa/openvalidation<filename>openvalidation-common/src/main/java/io/openvalidation/common/unittesting/astassertion/lists/OperandListAssertion.java /* * Copyright 2019 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance wi...
public class ExampleWhile { public static void main(String[] args) { int x = 5; while(x<=50) { System.out.println("X is equal to "+x); x += 5; } } }
//Morse Code encoding function function convertToMorse (text) { //object containing alphabets and their corresponding Morse representations const MorseCode = { 'A': '.-', 'B': '-...', 'C': '-.-.', 'D': '-..', 'E': '.', 'F': '..-.', 'G': '--.', 'H': '....', 'I': '..', 'J': '....
<reponame>chipsi/GasMileage package net.alteridem.mileage.dialogs; import android.app.DialogFragment; import android.text.format.DateFormat; import android.view.KeyEvent; import android.view.View; import android.view.WindowManager; import android.view.inputmethod.EditorInfo; import android.widget.ArrayAdapter; import ...
import {connect} from 'react-redux' import Counter from '../components/counter' import {countDown, countUp} from '../actions' const mapStateToProps = (state) => { return { count: state.count.count } } const mapDispatchToProps = (dispatch) => { return { onClickCountUp: () => dispatch(countU...
<gh_stars>1-10 package sock import "syscall" func Control(network, address string, conn syscall.RawConn) error { return nil }
<reponame>Luxcium/iexjs "use strict"; /* *************************************************************************** * * Copyright (c) 2021, the iexjs authors. * * This file is part of the iexjs library, distributed under the terms of * the Apache License 2.0. The full license can be found in the LICENSE file. *...
<filename>sql/updates/Rel18/12654_01_mangos_command.sql<gh_stars>0 ALTER TABLE db_version CHANGE COLUMN required_c12631_02_mangos_gameobject required_m12654_command bit; update command set `name`='summon' where `name`='namego'; update command set `name`='appear' where `name`='goname';
<filename>test/bad-calls.test.js /** * @jest-environment node */ import { run, runIf, apply } from '..'; test('bad-calls', () => { const implementations = [run, runIf, apply]; implementations.forEach(implementation => expect(() => implementation('value', 'not-a-function')).toThrow('is not a function')); implemen...
public class Triangle { public static boolean isTriangle (int a, int b, int c) { // The three lengths should not be negative if (a <= 0 || b <= 0 || c <= 0) return false; // Sum of any two sides should be larger than the third side if (a + b > c && a + c > b...
#!/bin/bash . ./check-go.sh echo "-- Clear old plugchain testnet data and install plugchain and setup the node --" rm -rf ~/.plugchain YOUR_KEY_NAME=$1 YOUR_NAME=$2 DAEMON=plugchaind DENOM=line CHAIN_ID=plugchain-testnet-1 SEEDS="" APPNAME="~/.plugchain" echo "install plugchain" git clone https://github.com/oracleN...
<filename>public/scripts/modules/sample-module/predix-asset-service.js define(['angular', './sample-module'], function(angular, module) { 'use strict'; /** * PredixAssetService is a sample service that integrates with Predix Asset Server API */ module.factory('PredixAssetService', ['$q', '$...
/** * * MainPage * */ import React, { memo, useEffect } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Helmet } from 'react-helmet'; import { FormattedMessage } from 'react-intl'; import { createStructuredSelector } from 'reselect'; import { compose } from 'redux'...
<reponame>minuee/japan01<filename>assets/js/schedule.js $(function () { $(document).on("change", "#ScheduleTeam,#ProjectGroup", function () { $("#IsOnlyme").val(0); $('#calendar').fullCalendar('rerenderEvents'); }); $(document).on("click", "#btn_view_onlyme", function () { if ( $(t...
<reponame>paccojl/SD44-Deck-Copy-Tool<filename>src/Details.java import java.util.LinkedList; public class Details { String mapname; Integer gamemode; Integer maxPlayers; Integer ver; String duration; Integer victory; Integer score; LinkedList<Player> players; String servername; ...
import { registerTheme } from '../../theme'; var BAR_ACTIVE_STYLE = function (style) { var opacity = style.opacity || 1; return { opacity: opacity * 0.5 }; }; var BAR_DISABLE_STYLE = function (style) { var opacity = style.opacity || 1; return { opacity: opacity * 0.5 }; }; export var DEFAULT_BAR_THEME =...
// sc: // https://ru.hexlet.io/courses/js-asynchronous-programming/lessons/event-loop/exercise_unit // Это задание напрямую не связано с теорией урока, но позволяет еще больше прокачаться в // работе с асинхронным кодом. // В библиотеке async есть функция waterfall, которая позволяет строить цепочки // асинхронных фу...
import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Conv2D, Flatten, Dropout, MaxPooling2D # Create the model model = Sequential([ Conv2D(16, 3, padding='same', activation='relu', input_shape=(28, 28 ,1)), MaxPooling2D(), Dropout(0.5), Conv2...
#!/bin/bash # Copyright © 2020 Intel Corporation. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause set -e DIR=$1 MQTT=$2 CONFIDENCE=$3 SKUS=$4 source /opt/intel/openvino_2021/bin/setupvars.sh /go/src/ds-cv-inference/ds-cv-inference -dir $DIR -mqtt $MQTT -skuMapping $SKUS -model /go/src/ds-cv-inference/...
#! /bin/sh # Copyright (C) 2012-2017 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program ...
<reponame>harry-xiaomi/SREWorks package com.alibaba.sreworks.job.worker.taskscene.risk; import java.net.http.HttpResponse; import java.util.List; import com.alibaba.fastjson.JSONObject; import com.alibaba.sreworks.job.taskinstance.ElasticTaskInstanceWithBlobs; import com.alibaba.sreworks.job.taskinstance.ElasticTaskI...
import { vtkAlgorithm, vtkObject } from "../../../interfaces"; interface IDracoReaderOptions { binary?: boolean; compression?: string; progressCallback?: any; } /** * */ export interface IDracoReaderInitialValues { } type vtkDracoReaderBase = vtkObject & Omit<vtkAlgorithm, | 'getInputData' | 'setInputData' ...
<filename>router_test.go package ogen import ( "fmt" "net/http" "testing" "github.com/stretchr/testify/require" api "github.com/ogen-go/ogen/internal/sample_api" ) func TestRouter(t *testing.T) { s := api.NewServer(&sampleAPIServer{}) type testCase struct { Method string Path string Operation ...
#include "stdafx.h" std::tuple<int32_t, int32_t> GetDesktopRes() { HMONITOR monitor = MonitorFromWindow(GetDesktopWindow(), MONITOR_DEFAULTTONEAREST); MONITORINFO info = {}; info.cbSize = sizeof(MONITORINFO); GetMonitorInfo(monitor, &info); int32_t DesktopResW = info.rcMonitor.right - info.rcMonito...
<gh_stars>10-100 package chylex.hee.world.feature.stronghold.rooms.loot; import java.util.Arrays; import java.util.Random; import net.minecraft.init.Blocks; import chylex.hee.init.BlockList; import chylex.hee.system.abstractions.Meta; import chylex.hee.system.abstractions.Pos; import chylex.hee.system.abstractions.Pos....
<filename>datapipe/store/milvus.py import pandas as pd from typing import Dict, List, Optional from pymilvus import connections, utility, CollectionSchema, Collection, FieldSchema, SearchResult from datapipe.types import DataSchema, MetaSchema, IndexDF, DataDF, data_to_index from datapipe.store.table_store import Tab...
<filename>wit/src/StCons.h //============================================================================== // WIT // // Based On: //============================================================================== // Constrained Materials Management and Production Planning Tool // // (C) Copyright IBM Corp. 1993, 2020 A...
require 'yaml' module Termup class Base def initialize(project) @handler = Termup::Handler.new config = YAML.load(File.read("#{TERMUP_DIR}/#{project}.yml")) @tabs = config['tabs'] # Config file compatibility checking if @tabs.is_a?(Array) and @tabs.first.is_a?(Hash) abort ...
#!/usr/bin/env bash name=$1 ass=$2 file=$3 # adjust the next line for class and semester curl -F student=$name -F assignment="CS472 F16 Assignment $ass" -F "submittedfile=@$file" "http://ec2-52-89-93-46.us-west-2.compute.amazonaws.com/cgi-bin/fileCapture.py"
import React, { useEffect } from 'react' import { makeStyles, useTheme } from '@material-ui/core/styles' import Input from '@material-ui/core/Input' import MenuItem from '@material-ui/core/MenuItem' import FormControl from '@material-ui/core/FormControl' import Select from '@material-ui/core/Select' import axios from '...
#IMAGE=supervisely/base-py #docker pull $IMAGE && \ #docker build --build-arg IMAGE=$IMAGE -t $IMAGE"-debug" . && \ #docker run --rm -it -p 7777:22 --shm-size='1G' -e PYTHONUNBUFFERED='1' $IMAGE"-debug" # -v ~/max:/workdir cp /root/.ssh/authorized_keys . && \ docker-compose up -d && \ docker-compose ps
/** * OLAT - Online Learning and Training<br> * http://www.olat.org * <p> * Licensed under the Apache License, Version 2.0 (the "License"); <br> * you may not use this file except in compliance with the License.<br> * You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unl...
set -e if [ ! -f /usr/local/bin/windres ]; then ln -s /usr/bin/x86_64-w64-mingw32-windres /usr/local/bin/windres fi cd /deps/openssl CC=x86_64-w64-mingw32-gcc HOST=x86_64-w64-mingw32 INCLUDE=/usr/x86_64-w64-mingw32/include LIB=/usr/x86_64-w64-mingw32/lib ./Configure --prefix=/usr/x86_64-w64-mingw32 mingw64 threads ...
#!/bin/bash if [[ "$1" == "" ]]; then echo "" echo "usage: random_sampler.bash FACTOR" echo "" echo "prints to STDOUT approximately 1/FACTOR of the lines passed to STDIN" echo "" exit fi awk -v SEED=$RANDOM -v FACTOR=$1 'BEGIN{srand(SEED)} {if( rand() < 1/FACTOR) print $0}' <&0
def last_n_elements(arr, n): """Returns an array containing the last n elements from the original array""" return arr[-n:]
using System; public class Program { public static void Main() { int[] intList = {1,2,3,4,5}; foreach (int num in intList) { Console.WriteLine(num); } } }
for port in `seq 7001 7006`; do \ mkdir -p ./${port}/conf \ && PORT=${port} envsubst < redis-cluster.tmpl > ./${port}/conf/redis.conf \ && mkdir -p ./${port}/data; \ done
from wtforms import StringField, SubmitField from flask import Flask, render_template, redirect, url_for from flask_wtf import FlaskForm from wtforms.validators import InputRequired import possible_cards app = Flask(__name__) app.config["SECRET_KEY"] = "testkey" class OpponentForm(FlaskForm): card1 = StringFiel...
<gh_stars>100-1000 # -*- encoding: utf-8 -*- # this is required because of the use of eval interacting badly with require_relative require 'razor/acceptance/utils' confine :except, :roles => %w{master dashboard database frictionless} test_name 'Remove policy tag with nonexistent tag' step 'https://testrail.ops.puppetl...
package fr.unice.polytech.si3.qgl.soyouz.classes.objectives.root.regatta; import fr.unice.polytech.si3.qgl.soyouz.classes.actions.GameAction; import fr.unice.polytech.si3.qgl.soyouz.classes.gameflow.GameState; import fr.unice.polytech.si3.qgl.soyouz.classes.gameflow.goals.RegattaGoal; import fr.unice.polytech.si3.qgl....
#! /bin/bash # Exit when any command fails set -e echo "Stopping all services" python3.7 deploy_aws.py --target=flask --state=down python3.7 deploy_aws.py --target=test_metric_producer --state=down --start_cluster_id=0 python3.7 deploy_aws.py --target=test_metric_reader --state=down python3.7 deploy_aws.py --target=...
public class MultiplicationTable { public static void main(String[] args) { int n = Integer.parseInt(args[0]); for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { System.out.print(String.format("%4d", i * j)); } System.out.println(); ...
// 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 in writing, software // distributed unde...
def find_max_sum_subarray(arr): max_sum = 0 temp_sum = 0 start = 0 end = 0 for i in range(0, len(arr)): temp_sum = temp_sum + arr[i] if temp_sum < 0: temp_sum = 0 start = i + 1 else: if temp_sum > max_sum: ...
<reponame>Michael-Jalloh/serial-link from serial_link import Link def run(port="/dev/ttyUSB0"): l = Link(port) while 1: l.read() if l.new_data: data = l.get_data().split(";") print(f"SW: {data[0]}") print(f"X: {data[1]}") print(f"Y: {data[2]}") ...
#!/usr/bin/env bash # # The Alluxio Open Foundation licenses this work under the Apache License, version 2.0 # (the "License"). You may not use this work except in compliance with the License, which is # available at www.apache.org/licenses/LICENSE-2.0 # # This software is distributed on an "AS IS" basis, WITHOUT WARRA...
rm -rf temp/data/integration-test-wallet mkdir -p temp/data/integration-test-wallet export TARI_BASE_NODE__NETWORK=localnet export TARI_BASE_NODE__LOCALNET__DATA_DIR=localnet export TARI_BASE_NODE__LOCALNET__DB_TYPE=lmdb export TARI_BASE_NODE__LOCALNET__ORPHAN_STORAGE_CAPACITY=10 export TARI_BASE_NODE__LOCALNET__PRUNIN...
<filename>src/main/java/com/threathunter/bordercollie/slot/compute/graph/nodegenerator/FilterVariableNodeGenerator.java package com.threathunter.bordercollie.slot.compute.graph.nodegenerator; import com.threathunter.bordercollie.slot.compute.graph.node.FilterVariableNode; import com.threathunter.bordercollie.slot.comp...
<reponame>Ravi9562/Sample #!/usr/bin/python from collections import defaultdict import requests import argparse parser = argparse.ArgumentParser(description="Run SQLI Tests") parser.add_argument("-hn", "--hostname", help="Hostname", required=True) parser.add_argument("-p", "--port", help="Port", required=True) parser...
#! /bin/bash # [Topcoder] # This script consists of Test-case from 7 to 11 #exec >> automated_test2.log # Enable set -e to stop script in case of exception #set -e # http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in?page=1&tab=votes#tab-top SOURCE="${BASH_SOURCE[0]}" while ...
import { MutationResult, useMutation } from "@apollo/client"; import { apolloCacheUpdateQuery } from "../../lib/apollo-immer"; import { PostFragment, PostVotersDocument, UserDetailsDocument, VoteDocument } from "../generated"; import { useSessionQuery } from "../queries/Session"; export type VoteFunction = (post: Post...
<filename>src/app/accounts/index.ts import { hashApiKey } from "@domain/accounts" import { ValidationError } from "@domain/errors" import { AccountApiKeysRepository, AccountsRepository, WalletsRepository, } from "@services/mongoose" export * from "./add-api-key-for-account" export * from "./get-api-keys-for-acco...
#!/bin/sh echo tutu echo "### nova boot " nova boot --flavor t1.cw.tiny --image "CentOS 6.5" --key-name KP_BadCops-Dev_GLL --security-groups SSH_Only,SGrpAdmin --user_data user_data_file.yaml IN-BAD-DEV1-GLL-01 echo "### sleep " sleep 30 echo "### nova floating-ip-associate " nova floating-ip-associate IN-BAD-DEV1-GLL...
package redi import ( "github.com/gomodule/redigo/redis" "time" "github.com/name5566/leaf/log" ) var rediPool * redis.Pool func newPool(addr string, pwd string) *redis.Pool { if addr == "" || pwd == "" { return nil } return &redis.Pool{ MaxIdle: 3, IdleTimeout: 240 * time.Second, Dial: func () (redis....
<gh_stars>1-10 package fetch import ( "fmt" "os" "testing" ) func TestGetMaxWidth(t *testing.T) { os.Setenv("VIP_MAX_WIDTH", "500") if width := getMaxWidth(); width != 500 { t.Fail() } os.Setenv("VIP_MAX_WIDTH", "1024") if width := getMaxWidth(); width != 1024 { t.Fail() } // Test default value os.Se...
/* * Copyright 2011-2021 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #ifndef __SHADERLIB_SH__ #define __SHADERLIB_SH__ vec4 encodeRE8(float _r) { float exponent = ceil(log2(_r) ); return vec4(_r / exp2(exponent) , 0.0 , 0.0 , (exponent + 128....
'use strict'; // ***************************************************** // API // ***************************************************** function ResultSet() { this.loaded = false; this.loading = true; } ResultSet.prototype.set = function(error, value) { this.loaded = true; this.loading = false; ...
package ctag.tags; import ctag.Binary; import ctag.CTagInput; import ctag.exception.EndException; import ctag.exception.NegativeLengthException; import java.io.IOException; /** * The tag that represents a signed 32bit integer array. * <br/><br/> * <table> * <tr> * <td><b>Binary prefix: </b></td> * <td><code>00...
function sendEmail() { var address = "example@example.com"; var subject = "Automatic Message"; var message = "Hello!"; MailApp.sendEmail(address, subject, message); }
./yaml2latex mv xvi-wiek.tex ../tufte-latex/ cd ../tufte-latex/ pdflatex xvi-wiek.tex pdflatex xvi-wiek.tex texindy xvi-wiek.idx -L polish -C utf8 pdflatex xvi-wiek.tex cp xvi-wiek.pdf ../xvi-wiek/ui/static/pdf/
class User: def __init__(self, name): self.name = name def update_name(self, new_name): self.name = new_name
#!/bin/bash urdfFile=`rospack find $1`/$1.urdf echo link,mass,ixx,iyy,izz,ixy,ixz,iyz for suffix in \ `xmlstarlet sel -t -v '//link/@name' $urdfFile | \ grep '^r_' | sed -e 's@^r@@'` do xmlstarlet sel -t -o "r$suffix," \ -t -v "//link[@name='r$suffix']/inertial/mass/@value" -t -o ',' \ -t -v "...
#!/bin/bash set -o errexit -o nounset rev=$(git rev-parse --short HEAD) ldoc -d $CIRCLE_ARTIFACTS/docs . cd $CIRCLE_ARTIFACTS/docs git init git config user.name "Kyle McLamb" git config user.email "kjmclamb@gmail.com" git remote add upstream "https://$GH_API@github.com/Alloyed/ltrie.git" git fetch upstream git re...
#!/bin/bash set -e -u MAKE="make $1" PLATFORM=`gcc -dumpmachine` UNAME=`uname` MACHINE=`uname -m` echo $UNAME echo $MACHINE function contains () { # helper function to determine whether a bash array contains a certain element # http://stackoverflow.com/questions/3685970/bash-check-if-an-array-contains-a-valu...
#!/usr/bin/env sh CONFIG_PATH=/config TEMPLATES="http.conf.template mail.conf.template nginx.conf.template proxy.conf.template tls.conf.template" function render_template() { eval "echo \"$(cat $1)\"" } function generate_configs() { for item in ${TEMPLATES}; do render_template ${CONFIG...
import java.util.Random; public class Program { public static void main(String[] args){ String password = generatePassword("alice"); System.out.println(password); } public static String generatePassword(String str) { String numbers = "0123456789"; String lower_case = "abcdefghijklmnopqrstuvwxyz"; String ...
""" Enhance the existing code such that it can process multi-dimensional lists recursively. """ def sum_list(in_list): if not isinstance(in_list, list): return print("Error: input must be a list") total = 0 for item in in_list: if isinstance(item, list): total += sum_list(item)...
<filename>src/app/shared/models/table/column.ts export class Column<T> { public readonly columnDef: string; public readonly key: string; public readonly cell: (element: T) => string; constructor(columnDef: string, key: string, cell: (element: T) => string) { this.columnDef = columnDef; this.key = key; ...
# Imports from flask import Flask, render_template, request from sklearn.externals import joblib # App app = Flask(__name__) # Load the model model = joblib.load(Python Machine Learning model file) # Routes @app.route('/', methods=['GET', 'POST']) def predict(): # Get the data from the POST request. data...
<reponame>ideacrew/pa_edidb class UpdatePersonAddress def initialize(person_repo, address_changer, change_address_request_factory) @person_repo = person_repo @address_changer = address_changer @change_address_request_factory = change_address_request_factory end def validate(request, listener) fai...
<reponame>chylex/Hardcore-Ender-Expansion package chylex.hee.entity.mob.ai.target; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemSt...
#!/bin/bash # Script Path SCRIPT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Go to root path of application cd $SCRIPT && cd .. echo "===========================================" echo "==== Reset node_modules and components ====" echo "===========================================" echo "" echo "=== Delete no...
termux_step_install_license() { [ "$TERMUX_PKG_METAPACKAGE" = "true" ] && return mkdir -p "$TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME" local LICENSE local COUNTER=0 if [ ! "${TERMUX_PKG_LICENSE_FILE}" = "" ]; then INSTALLED_LICENSES=() COUNTER=1 while read -r LICENSE; do if [ ! -f "$TERMUX_PKG_SRCDIR/$LIC...
package com.cumbari.dps.config; import junit.framework.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRu...
/** * This class was created by <ArekkuusuJerii>. It's distributed as * part of Stratoprism. Get the Source Code in github: * https://github.com/ArekkuusuJerii/Stratoprism * * Stratoprism is Open Source and distributed under the * MIT Licence: https://github.com/ArekkuusuJerii/Stratoprism/blob/master/LICENSE */ ...
package gex.newsml.g2; import lombok.ToString; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyAttribute; import javax.xml.bind.a...
# This works for AKS... # Can also just use az aks get-credentials... cat <<EOF | cfssl genkey - | cfssljson -bare james { "CN": "james", "key": { "algo": "rsa", "size": 4096 } } EOF cat <<EOF | kubectl apply -f - apiVersion: certificates.k8s.io/v1beta1 kind: CertificateSigningRequest metadata: name: james spec: ...
#!/bin/bash sudo dpkg-reconfigure keyboard-configuration
#!/bin/bash print_usage() { cat <<EOF USAGE: install-ssl-certificate.sh [-h] install-ssl-certificate.sh [-v version] [-C certificatefile] [-P password] install-ssl-certificate.sh [-a appliance] [-t accesstoken] [-v version] [-C certificatefile] [-P password] -h Show help and exit -a Network ad...
word = input('Enter word: ') if word.lower() == 'super': print('Object found')
<gh_stars>10-100 package infoblox import ( "encoding/json" "fmt" "log" "net/url" ) //Resource represents a WAPI object type Object struct { Ref string `json:"_ref"` r *Resource } func (o Object) Get(opts *Options) (map[string]interface{}, error) { resp, err := o.get(opts) if err != nil { return nil, err ...
package org.jooby.issues; import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigValueFactory; import org.flywaydb.core.Flyway; import org.jooby.flyway.Flywaydb; import org.jooby.test.ServerFeature; import org.junit.Test; import java.util.Arrays; public class Issue623 extends ServerFeature { {...
<gh_stars>0 import {loadSchedule, loadSession} from '../actions'; export default () => ({ title: 'CodeMash', loadSchedule, loadSession, days: ['2019-01-08', '2019-01-09', '2019-01-10', '2019-01-11'], tags: ['codemash'], location: 'Sandusky, OH', site: 'http://www.codemash.org/', image: 'https://pbs...
<filename>pkg/inmemory-mvcc/transaction_test.go package inmemory_mvcc import ( "fmt" "sync" "testing" "github.com/dr0pdb/icecanedb/pkg/storage" "github.com/dr0pdb/icecanedb/test" "github.com/stretchr/testify/assert" ) var ( mvcc *MVCC ) // create a snapshot with the given seq number. set seq to 0, for the de...
import React, {useState, useEffect} from 'react'; import axios from 'axios'; const App = () => { const [query, setQuery] = useState(''); const [cities, setCities] = useState([]); useEffect(() => { axios .get(`https://api.openweathermap.org/data/2.5/weather?q=${query}&appid=<API-KEY>`) .then(data => setCities(d...
#!/bin/bash ## Enable Docker systemctl daemon-reload systemctl restart docker systemctl enable docker ## Pull Docker images docker pull registry.gitlab.com/analythium/shinyproxy-hello/hello:latest docker pull analythium/shinyproxy-demo:latest ## Onstall ShinyProxy export VERSION="2.5.0" wget https://www.shinyproxy.i...
<gh_stars>1-10 import { CoreElement } from './enum'; export const CoreOption = Object.freeze([ { label: '火', value: CoreElement.火, }, { label: '水', value: CoreElement.水, }, { label: '地', value: CoreElement.地, }, { label: '风', value: CoreElement.风, }, { label: '光',...
#!/bin/bash -f #********************************************************************************************************* # Vivado (TM) v2019.1 (64-bit) # # Filename : DM.sh # Simulator : Xilinx Vivado Simulator # Description : Simulation script for compiling, elaborating and verifying the project source files. # ...
<reponame>Kam-M/english-irregular-verbs package englishVerbs; import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java...
#!/bin/bash LC_ALL=C tensorboard --logdir="/work/log" --port=6006 & jupyter lab --ip=0.0.0.0 --allow-root --port=8888 \ --NotebookApp.token='token' \ --NotebookApp.terminado_settings='{"shell_command": ["/bin/bash"]}'
#!/bin/bash if [ $# -ne 1 ]; then echo "usage: ./publish.sh \"commit message\"" exit 1; fi sculpin generate --env=prod git stash git checkout master cp -R output_prod/* . rm -rf output_* objects refs source git add * git commit -m "$1" git push origin --all git checkout drafts git stash pop
#!/bin/bash curl https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh chmod +x dotnet-install.sh ./dotnet-install.sh --channel $1 --verbose
package xtest_test import ( xtest "github.com/goclub/test" "github.com/stretchr/testify/assert" "regexp" "strconv" "testing" ) func TestUUID(t *testing.T) { testRun(100, func(i int) (_break bool) { assert.Equal(t,len(xtest.UUID()), 36) assert.True(t,testMustBool(regexp.MatchString("[a-z0-9]{8}-[a-z0-9]{4}-[a...
// Basic imports import '../assets/main.css'; import { Component } from 'react'; import autoBind from 'react-autobind'; import Footer from '../components/footer'; import Header from '../components/header'; import { Button, Card, CardBody, CardImg, CardSubtitle, CardText, CardTitle, Col, Input, ListGroup, ListGroupItem,...
import chai from "chai"; import { beforeEach, afterEach } from "mocha"; import chaiHttp from "chai-http"; import server from "../../index"; import Article from "../../models/Article"; const { expect } = chai; chai.use(chaiHttp); const getArticles = () => { beforeEach(async () => { await Article.deleteMany({}); ...
<filename>node_modules/ts-toolbelt/out/List/NullableKeys.d.ts<gh_stars>1-10 import { NullableKeys as ONullableKeys } from '../Object/NullableKeys'; import { ObjectOf } from './ObjectOf'; import { List } from './List'; /** * Get the keys of `L` that are nullable * @param L * @returns [[Key]] * @example * ```ts * `...
#!/bin/bash set -e if [ "$1" = "run" ]; then cd /app/configuration exec tas-cli server fi exec "$@"
#!/usr/bin/env bash function describe_actions() { echo " 📦 Install the latest keybase package from Homebrew" } function install() { install_homebrew_package "keybase" }
<reponame>ymx0627/HMap<gh_stars>10-100 /** * Created by FDD on 2017/2/24. * @desc 原作者 Wandergis <https://github.com/wandergis/coordtransform> * 在此基础上添加优化和处理,并改写为es6 */ const PI = Math.PI; // PI const X_PI = PI * 3000.0 / 180.0; const a = 6378245.0; // 北京54坐标系长半轴a=6378245m const ee = 0.00669342162296594323; /** *...