text
stringlengths
1
1.05M
#!/bin/bash . ./defaults.sh . ../../include/common.sh . .envrc DOMAIN=$(kubectl get configmap -n kube-system cap-values -o json | jq -r '.data["domain"]') export DOMAIN DEPLOYED_CHART=$(kubectl get configmap -n kube-system cap-values -o json | jq -r '.data["chart"]') info info "@@@@@@@@@" info "Running CATs on depl...
package com.github.peacetrue.beans.modify; import com.github.peacetrue.beans.properties.modifiedtime.ModifiedTimeAware; import com.github.peacetrue.beans.properties.modifierid.ModifierIdAware; /** * @author peace * @since 1.0 **/ public interface ModifyAware<T, S> extends ModifierIdAware<T>, ModifiedTimeAware<S> {...
#! /usr/bin/env sh ############################################################################### # touch sources files from template ############################################################################### readonly today=$(date +%Y-%m-%d) readonly prefix='https://raw.githubusercontent.com/Shylock-Hg/config....
#!/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...
const express = require('express'); const routes = express.Router(); const aqis = require('./aqis'); // NOTE: aqis === air quality indexes routes.use('/aqis', aqis); routes.get('/', (req, res) => { res.status(200).json({ message: 'OK' }); }); module.exports = routes;
#!/bin/bash rm -rf ~/work/Developer/moodle/mod/opendsa cp -r ~/work/AthabascaUniversity/COMP689AdvancedDistributedSystems/comp689project/moodle-plugin/opendsa ~/work/Developer/moodle/mod
#!/bin/bash # Copyright 2013 The Shenzhen Key Laboratory of Intelligent Media and Speech, # PKU-HKUST Shenzhen Hong Kong Institution (Author: Wei Shi) # 2014-2016 Johns Hopkins University (Author: Daniel Povey) # Apache 2.0 # Combine MFCC and online-pitch features together # Note: Th...
#!/bin/bash cd $(dirname $0) ## For Kibana kibana_port=$1 [ -z "$kibana_port" ] && kibana_port=5601 if [ ! -e /tmp/kibana_dashboard.$UID ]; then curl -u elastic:changeme -k -XPOST "http://localhost:${kibana_port}/api/kibana/dashboards/import" -H 'Content-Type: application/json' -H "kbn-xsrf: true" -d @export.jso...
while True: num = int(input("Please input a number between 1 and 10: ")) if num in range(1, 11): print(num + 1) else: print("Invalid number!")
#!/bin/bash BATCH_DIR=`dirname $0` . $BATCH_DIR/update_common.sh if [ -f $BATCH_DIR/.bashrc ]; then . $BATCH_DIR/.bashrc $YOMOU secondrank $1 download log $0 $1 "execute secondrank $1 download" else echo "$0 $1 failed to execute secondrank $1 download" 1>&2 fi
#include <iostream> #include <cctype> #include <algorithm> #include <nx/request.hpp> #include <nx/http_status.hpp> #include <nx/utils.hpp> namespace nx { request::request() : http_msg() {} request::request(const nx::method& m) : http_msg(), method_(m.str) {} request::request(const std::string& method) : http_msg()...
#!/bin/bash # # mount_blobfuse.sh --- simple wrapper to mount azure blobstorage as filesystem # # # Author: Arul Selvan # Version: Apr 17, 2021 # # PreReq: apt-get install blobfuse fuse # Source: https://github.com/Azure/azure-storage-fuse # # Steps: # ------ # create a credential file to pass to the driver as shown ...
package sample.sadashiv.examplerealmmvp.presenter; import io.realm.RealmList; import sample.sadashiv.examplerealmmvp.model.Book; import sample.sadashiv.examplerealmmvp.model.realm.RealmService; import sample.sadashiv.examplerealmmvp.ui.author.AuthorView; public class AuthorPresenter extends BasePresenter<AuthorView> ...
<gh_stars>0 package org.tarantool.orm.internals.operations; import org.tarantool.TarantoolClient; import org.tarantool.orm.internals.Meta; import java.util.List; import java.util.concurrent.CompletionStage; public final class DeleteOperation<T> implements Operation<T> { private final TarantoolClient tarantoolCli...
<gh_stars>0 # Copyright (c) 2017 Sony Corporation. 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 ...
<gh_stars>1-10 import { combineReducers } from 'redux'; import { ReducersMap } from 'shared/types/redux'; import { editReducer } from './edit'; import uiReducer from './ui'; import * as NS from '../../namespace'; export default combineReducers<NS.IReduxState>({ edit: editReducer, ui: uiReducer, } as ReducersMap<...
#!/usr/bin/env bash SUBDOMAIN=$1 aws cloudformation describe-stacks --stack-name $SUBDOMAIN --query 'Stacks[].Outputs[]' --output table
<filename>src/main/java/com/ineor/countrypopulation/web/rest/CountryResource.java package com.ineor.countrypopulation.web.rest; import com.ineor.countrypopulation.domain.Item; import com.ineor.countrypopulation.services.CountryService; import org.springframework.http.ResponseEntity; import org.springframework.web.bind...
/* * Contacts Service * * Copyright (c) 2010 - 2012 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: <NAME> <<EMAIL>> * * 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 ...
#!/bin/bash VOLUME_PREFIX=${VOLUME_PREFIX:-puppetindocker} volumes=" ${VOLUME_PREFIX}_ca_data ${VOLUME_PREFIX}_ca_ssl ${VOLUME_PREFIX}_db_ssl ${VOLUME_PREFIX}_haproxy_ssl ${VOLUME_PREFIX}_nats_ssl ${VOLUME_PREFIX}_postgres ${VOLUME_PREFIX}_r10k_cache ${VOLUME_PREFIX}_r10k_env ${VOLUME_PREFIX}_r10k_ssl ${VOLUME_PREFIX}_...
import { IWidget, IOrderHistorySettings, IOrderHistoryFormSettings } from 'shared/types/models'; import { orderHistorySettingsFormEntry } from '../../../redux/data/reduxFormEntries'; // tslint:disable-next-line:max-line-length import ordersTableHeaderLeftPartFactory from '../../factories/OrdersTableHeaderLeftPartFacto...
<filename>packages/styles/src/input-label.ts import { InputLabelStyleObj } from "@revind/types"; export const inputLabelStyleObj: InputLabelStyleObj = { default: { start: "overflow-ellipsis whitespace-nowrap peer-focus:text-inherit transition-all", }, variants: { "material-floating": ...
docker images |grep paipai |sed -n "3,+100p" |awk '{print $3}' | xargs docker rmi
#!/bin/bash -xe cd `cd \`dirname $0\`;pwd` IMAGE=opengsn/cli #build docker image of cli tools rm -rf ../../dist && npx tsc perl -pi -e 's/^#.*//; s/.*(start|run).*//' ../../dist/src/cli/commands/gsn.js rm -rf dist && npx webpack docker build -t $IMAGE . test -z "$VERSION" && VERSION=`jq < ../../package.json -r .ve...
#!/bin/bash source .env echo "SHUTDOWN: tetris-server" curl -XPOST http://localhost:${X_SERVER_PORT}/shutdown echo
./venv/bin/pip freeze > requirements.txt git add . git commit -m "some fix" git push origin master
<gh_stars>1-10 /* * Copyright (C) 2017-2019 Dremio Corporation * * 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 ...
<reponame>vchoudhari45/codingcargo package com.vc.medium case class DoublyLinkedList(var prev: DoublyLinkedList, var next: DoublyLinkedList, value: Int) class MyCircularDeque(k: Int) { /** Initialize your data structure here. Set the size of the deque to be k. */ val head = new DoublyLinkedList(null, null, -1) ...
import React from 'react'; import { shallow, mount, render } from 'enzyme'; import { MarkdownTextBox } from "../src/index"; describe('A suite', function() { it('should have full elements', function(){ const wrapper = shallow(<MarkdownTextBox />); expect(wrapper.find('.description').length).toBe(1);...
<reponame>JayElPo/react-native /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the ...
<reponame>mcollina/torrent-docker-registry<filename>dolphin.js #! /usr/bin/env node 'use strict'; var commist = require('commist') var registry = require('./registry') var pull = require('./pull') var fs = require('fs') var path = require('path') function cli(args) { var program = commist() program.register('re...
# Just run the following cells to scrape data from your LinkedIn profile (or anyone's, if you know their password :) ). # Replace the content of "config.txt" file with the desired username or password to let it automatically fill duing login. # Also remember to change the path of driver (mentioned in the cell), to ...
$(document).ready(function(){ $(".clickable1").click(function(){ $(".img1").toggle(); $(".design1").toggle(); }); $(".clickable2").click(function(){ $(".img2").toggle(); $(".dev").toggle(); }); $(".clickable3").click(function(){ $(".img3").toggle(); $(...
<gh_stars>1-10 #ifndef F5529_BLDC_SETTINGS_H_ #define F5529_BLDC_SETTINGS_H_ #ifdef __cplusplus extern "C" { #endif // ---------------------------------------------------------------------- // info and license // ---------------------------------------------------------------------- // // filename: F5529_BL...
#!/bin/bash # LinuxGSM install_squad_license.sh module # Author: Daniel Gibbs # Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Configures the Squad server's license. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" echo -e "" echo -e "${lightyellow}Squad Se...
#!/usr/bin/env bash set -e set -x shopt -s dotglob readonly name="yaml-cpp" readonly ownership="yaml-cpp Upstream <robot@adios2>" readonly subtree="thirdparty/yaml-cpp/yaml-cpp" readonly repo="https://github.com/jbeder/yaml-cpp.git" readonly tag="yaml-cpp-0.6.3" readonly shortlog="true" readonly paths=" " extract_so...
// find tag values pub fn get_values(tags: &[Tag], keys: &[String]) -> Vec<String> { let mut result: Vec<String> = vec!["".to_string(); keys.len()]; for tag in tags { if let Some(index) = keys.iter().position(|k| *k == tag.key) { result[index] = tag.value.clone(); } } resul...
<reponame>lheureuxe13/oppia # Copyright 2019 The Oppia 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 # # Un...
<reponame>alexandremcp/Papyrus package br.com.papyrus.controller; import br.com.papyrus.model.CriarConexao; import br.com.papyrus.view.ViewDevolucoes; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.time.LocalDate; import java.time.format.Date...
<filename>src/Register.js import React from 'react'; import { StyleSheet, View, Text, ScrollView, ToastAndroid, TextComponent, Alert } from 'react-native'; import { widthPercentageToDP as wp, heightPercentageToDP as hp, } from 'react-native-responsive-screen'; import Icon from 'react-native-vector-ico...
def max_profit(stock_prices): max_profit = 0 for i in range(len(stock_prices) - 1): for j in range(i + 1, len(stock_prices)): if stock_prices[j] - stock_prices[i] > max_profit: max_profit = stock_prices[j] - stock_prices[i] return max_profit if __name__ == "__main__": ...
#!/bin/sh # Install go curl -o go.tar https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz tar -xvf go.tar 1>/dev/null # Install git sudo apt-get update #sudo apt-get upgrade sudo apt-get -y install git mkdir gopath 2>/dev/null # setup our environment . ~/setenv.sh echo "Installing NATS components." go get github....
<gh_stars>0 #include <iostream> #define ll long long using namespace std; int csb(ll n) { int res = 0; while (n > 0) { ll rsb = n & -n; n -= rsb; res++; } return res; } ll ncr(ll n, ll r) { if (n < r) { return 0; } ll res = 1; for (ll i = 0; i...
def to_binary(n): return bin(n).replace("0b", "")
#! /bin/bash PRGNAME="perl-test-fatal" ARCH_NAME="Test-Fatal" ### Test::Fatal (simple helpers for testing code) # Test::Fatal Perl модуль # Required: perl-try-tiny # Recommended: no # Optional: no ROOT="/root/src/lfs" source "${ROOT}/check_environment.sh" || exit 1 source "${ROOT}/unpack_so...
<reponame>BIGCATDOG/communityBackend<filename>src/vess-service/handler.go package main import ( "context" pb "github.com/vess-service/proto/vess" ) // 定义货船服务 type service struct { repo Repository } // 实现服务端 func (s *service) FindAvailable(ctx context.Context, spec *pb.Specification, resp *pb.Response) error { ...
# This file is based on part of the Dython package (https://github.com/shakedzy/dython) # Because I only needed Cramér's V, adding a whole dependency # did not make sense. import warnings from typing import Union, List import numpy as np import pandas as pd import scipy.stats as ss def cramers_v( x: Union[pd.Se...
#!/bin/sh -e CROSS_BASE=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi CROSS_INCLUDE=${CROSS_BASE}/arm-fsl-linux-gnueabi/multi-libs/usr/include/ #/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi CROSS_CC=${CROSS_BASE}/bin/arm-fsl-linux-gnueabi-gc...
<reponame>vharsh/cattle2 package io.cattle.platform.api.auth; import java.util.Set; public interface Policy { String AGENT_ID = "agentId"; String LIST_ALL_ACCOUNTS = "list.all.accounts"; String AUTHORIZED_FOR_ALL_ACCOUNTS = "all.accounts"; String OVERRIDE_ACCOUNT_ID = "override.account.id"; Strin...
# One-time setup for the cluster and persistent volume # System setup kubectl expose deployment hello-world --type=NodePort --name=example-service gcloud config set compute/zone us-west1-c gcloud config set project bike-rental-system gcloud container clusters create brs-cluster --num-nodes 1 kubectl create -f brs-pe...
#!/bin/sh LIB=compiler_bg # Builds the NPM package wasm-pack build --release # Run wasm-opt on binary for platforms where wasm-pack didn't do it for us automatically # (currently M1 macs). # We can safely run it again on a .wasm file that's already been optimized though. which wasm-opt > /dev/null if [ $? -eq 0 ]; t...
import { Heading } from 'components/Heading' import { Logo } from 'components/Logo' import Link from 'next/link' import * as S from './styles' export const Footer = () => ( <S.Wrapper> <Logo color="blue" /> <S.Content> <S.Column> <Heading color="black" size="small" lineBottom lineColor="second...
#!/bin/bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if [ "$#" -ne 2 ]; then echo "Usage: $0 <paragraph-source-directory> <release_tarball_name>" exit 1 fi set -e if [[ ! -f $2 ]]; then echo "Build tarball file does not exist." exit 1 fi realpath() { [[ $1 = /* ]] && echo "$1" ||...
/** * Created by user on 30/06/2017. */ //Function taken from crypto.js export function hexToBytes(hex) { if (hex === undefined) { return false; } let bytes; let c; for (bytes = [], c = 0; c < hex.length; c += 2) bytes.push(parseInt(hex.substr(c, 2), 16)); return bytes; } //Function taken from c...
# frozen_string_literal: true require_relative './reference_note' require_relative './utils' # reference note that reads from # an already existing generated reference note class OpenedReferenceNote < ReferenceNote attr_reader :contents def initialize(filename, dir_path) @dir_path = dir_path referencing_...
export CC_NAME="grade-book"; export CC_LANGUAGE="typescript"; export CC_CHANNEL="grade-book-channel"; export CC_PATH="$PWD/grade-book-chaincode"; cd ./test-network || exit sudo rm -rf channel-artifacts/ sudo rm -rf organizations/fabric-ca/ordererOrg sudo rm -rf organizations/fabric-ca/ordererOrg sudo rm -rf organiza...
#!/usr/bin/env bash #================================================ # install ide vscode on debian family #================================================ echo 'install ide vscode start' # install aria2 if [ -z $(apt list aria2|awk '{print $4}') ] then sudo apt-get update sudo apt-get install -y aria2 su...
{{- define "shoot-cloud-config.execution-script" -}} #!/bin/bash -eu DIR_KUBELET="/var/lib/kubelet" DIR_CLOUDCONFIG_DOWNLOADER="/var/lib/cloud-config-downloader" DIR_CLOUDCONFIG="$DIR_CLOUDCONFIG_DOWNLOADER/downloads" PATH_CLOUDCONFIG_DOWNLOADER_SERVER="$DIR_CLOUDCONFIG_DOWNLOADER/credentials/server" PATH_CLOUDCONFIG...
package sql import ( "fmt" "strings" ) type DependecyNode struct { Name string Edges []*DependecyNode } func (d *DependecyNode) String() string { depNames := []string{} for _, e := range d.Edges { depNames = append(depNames, e.Name) } return fmt.Sprintf("%v -> (%v)", d.Name, strings.Join(depNames, ",")) }...
#!/bin/bash echo `git show --format="%h" HEAD | head -1` > build_info.txt echo `git rev-parse --abbrev-ref HEAD` >> build_info.txt docker build -t $USER_NAME/post .
<gh_stars>0 import Element from "./Element.js" export default class Social extends Element{ constructor(title,list){ super() var t = document.createElement("div"); t.innerHTML = title; t.style.textAlign= "right"; t.style.fontWeight = "bold"; t.style.paddingTop = "5px" for (let node of lis...
<reponame>InsideZhou/southern-quiet package me.insidezhou.southernquiet.filesystem; public class PathAlreadyExistsException extends FileSystemException { private final static long serialVersionUID = -3641435326452253077L; public PathAlreadyExistsException(String message) { super(message); } p...
#! /bin/bash echo -e "Enter a characters = \c" read char case $char in [a-z] ) echo "You entered lower case character.";; [A-Z] ) echo "You entered upper case character.";; [0-9] ) echo "You entered digits";; ? ) echo "You entered special character";; * ) echo "You entered unknown charac...
<gh_stars>0 package com.udacity.jdnd.course3.critter.pet; import com.udacity.jdnd.course3.critter.common.Creature; import com.udacity.jdnd.course3.critter.common.IEntity; import com.udacity.jdnd.course3.critter.user.Customer; import javax.persistence.*; import javax.validation.constraints.NotNull; import java.time.Lo...
#!/bin/bash -l set -eu # SUBMIT SH THIS=$( readlink --canonicalize $( dirname $0 ) ) DIRECTORY=$THIS OUTPUT=$THIS/output.txt source $THIS/settings.sh if [[ -f $OUTPUT ]] then mv --backup=numbered $OUTPUT $OUTPUT.bak fi set -x qsub -n $WORKERS \ -t $WALLTIME \ -A $PROJECT \ -q $QUEUE \ -o $OU...
import { ComponentAnnotation, DirectiveAnnotation, ComponentArgs, DirectiveArgs } from './annotations'; import {ViewAnnotation, ViewArgs} from './view'; import { SelfAnnotation, ParentAnnotation, AncestorAnnotation, UnboundedAnnotation } from './visibility'; import {AttributeAnnotation, QueryAnnotation}...
<filename>src/test/java/org/apache/sling/scriptingbundle/plugin/capability/CapabilityTest.java<gh_stars>1-10 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more contributor license agreements. See the NOTICE file ~ d...
<gh_stars>1-10 import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Row, Col, Button, ButtonDropdown, DropdownToggle, DropdownMenu, DropdownItem, Card, CardHeader, CardFooter, CardBody, Collapse, Form, FormGroup, FormText, ...
package br.indie.fiscal4j.mdfe3.classes.def; /** * @Author <NAME> on 30/05/17. */ public enum MDFTipoProprietario { /** * 0-TAC – Agregado; * 1-TAC Independente; ou * 2 – Outros. */ TAC_AGREGADO("0", "TAC – Agregado"), TAC_INDEPENDENTE("1", "TAC – Independente"), OUTROS("2", "Out...
<filename>src/components/profile/profile.tsx import React, { useState, useEffect } from "react"; import { useObserver } from "mobx-react-lite"; import { useStores, useTheme } from "../../store"; import { View, Text, StyleSheet, TouchableOpacity, Image, ToastAndroid, ScrollView, Dimensions, } from "react...
#!/bin/bash #>>>>>>>>>> prepare source prepare.sh #<<<<<<<<<< set -e # See: latest stable version from https://nodejs.org/ja/download/ at 2018-11-19 declare -r MAJOR_VER=${1:-"10.16"} declare -r MINOR_VER=${2:-"3"} declare -r VER=${MAJOR_VER}.${MINOR_VER} : "----- install ndenv" declare -r NDENV_DIR=${HOME}/.ndenv...
cur_path="$HOME/.config/Alfred/Alfred.alfredpreferences" preference_path="$HOME/Library/Application Support/Alfred/Alfred.alfredpreferences" rm "$preference_path" ln -s "$cur_path" "$preference_path"
<reponame>dmitry-korolev/gfm-json<gh_stars>1-10 import { expect } from 'chai' import { MDJ } from 'core/MDJ' const { parse } = MDJ() const singleQuotes = '[single quotes](http://example.com \'Title\')' const doubleQuotes = '[double quotes](http://example.com "Title")' const singleQuotesBlank = '[single quotes blank](...
#!/usr/bin/env bash function __sdkman_pre_installation_hook { echo "Inside pre-install hook..." cookie="$SDKMAN_DIR/var/cookie" if [[ -f "$cookie" ]]; then rm "$cookie"; fi echo "oraclelicense=accept-securebackup-cookie" > "$cookie" echo "Dropped cookie..." }
#!/bin/bash # Gibs me access <3 sudo /root.sh # turn on bash's job control set -m # Start the primary process and put it in the background ROCKET_ADDRESS="0.0.0.0" \ PUBLIC_PATH="/home/steam/ark-manager-web/dist" \ /home/steam/ark-manager-web/server & # Start the helper process /home/steam/ark-manager-web/agent ...
#!/usr/bin/env bash set -eu -o pipefail if [[ $# -lt 1 ]]; then echo "$0: version" >&2 exit 1 fi VERSION=$1 declare -A SYSTEMS SYSTEMS=( [i686-linux]=linux-ia32 [x86_64-linux]=linux-x64 [armv7l-linux]=linux-armv7l [aarch64-linux]=linux-arm64 [x86_64-darwin]=darwin-x64 [aarch64-darwi...
#! /bin/bash BUCKET="imjacobclark-artifacts" if [ $1 = "update" ] then zip -r api-crime-rate.zip ./* aws s3 cp api-crime-rate.zip s3://$BUCKET/api-crime-rate.zip aws lambda update-function-code --function-name api-crime-rate --s3-bucket $BUCKET --s3-key api-crime-rate.zip --publish python troposphere/api.py ...
<reponame>Esther-Anyona/Pass_Locker #!/usr/bin/env python3.8 from User import User from Credentials import Credentials def create_useraccount(firstName, lastName, userName, password): """ Function to create a new user account """ new_user = User(firstName, lastName, userName, password) return new_u...
const express = require('express'); const indexRouter = express.Router(); indexRouter.get('/', (req, res) => { res.render('index'); }); indexRouter.get('/login', (req, res) => { res.render('login'); }); // This route serves your `/signup` form indexRouter.get('/signup', (req, res) => { res.render('signup'); }...
// Copyright 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WebLayerTreeViewImpl_h #define WebLayerTreeViewImpl_h #include "base/memory/scoped_ptr.h" #include "cc/layer_tree_host_client.h" #include "third_...
<filename>odps-data-carrier/network-measurement-tool/src/main/java/com/aliyun/odps/datacarrier/network/Endpoint.java package com.aliyun.odps.datacarrier.network; public class Endpoint { private String odpsEndpoint; private String tunnelEndpoint; private String location; public Endpoint(String odpsEndpoint, St...
// // Created by ooooo on 2019/12/5. // #ifndef CPP_0231_SOLUTION1_H #define CPP_0231_SOLUTION1_H #include <iostream> using namespace std; class Solution { public: bool isPowerOfTwo(int n) { return n > 0 && (n & n - 1) == 0; } }; #endif //CPP_0231_SOLUTION1_H
#!/bin/bash WORKSPACEDIR="/workspace" pushd . cd $WORKSPACEDIR echo "Installing NPM dependencies..." npm install --silent echo "Starting datatracker server..." ietf/manage.py runserver 0.0.0.0:8000 --settings=settings_local > /dev/null 2>&1 & serverPID=$! echo "Waiting for server to come online ..." wget -qO- https...
#! /bin/bash GPUS_PER_NODE=8 # Change for multinode config MASTER_ADDR=127.0.0.1 MASTER_PORT=2000 NNODES=1 NODE_RANK=1 export DLWS_NUM_WORKER=${NNODES} export DLWS_NUM_GPU_PER_WORKER=${GPUS_PER_NODE} # DATA OPTIONS: DATA_PATH=data/enron/enron_text_document # data/webtext/webtext_text_document VOCAB_PATH=data/gpt2-...
<filename>spec/fastbill_spec.rb require 'spec_helper' describe Fastbill do # puts MY_CONFIG['test'] # pending end
import numpy as np def mandelbrot(x, y): X, Y = np.meshgrid(x, y) C = X + 1j*Y Z = np.zeros_like(C, dtype=complex) M = np.full(C.shape, True, dtype=bool) for _ in range(30): Z = Z**2 + C M = M & (np.abs(Z) < 2) return M
<gh_stars>1-10 'use strict'; const Command = require("../../structure/Command.js"); const moment = require('moment') class Userinfo extends Command { constructor() { super({ name: 'userinfo', category: 'utils', description: 'Cette commande donne des informations sur des ...
package com.huatuo.activity.personal; import org.json.JSONObject; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.text.TextUtils; import android.view.LayoutInflater; im...
package com.telpoo.frame.utils; public class Cons { public class Defi { public static final String SPR_GET_FALL = "get reference fall"; public static final String SPR_NAME = "TAG_FM_TEST"; } public static final String urlCheckApp="http://vilandsoft.com/api/mobile/getsetting.php?app_id="; public class Id{ ...
package uk.org.ulcompsoc.ld32.util; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import uk.org.ulcompsoc.ld32.components.EntityLink; import uk.org.ulcompsoc.ld32.components.Position; import uk.org.ulcompsoc.ld32.components.Renderable; import com.badlogic.ashley.c...
parallel --jobs 6 < ./results/exp_node/run-3/sea_mem_4n_6t_6d_1000f_617m_10i/jobs/jobs_n0.txt
/* * Copyright (C) 2012 Atlassian * * 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 t...
/** * @author <NAME> / https://github.com/Leeft */ import MapGeometry from '../map-geometry'; import JumpPoint from '../../jump-point'; import LineSegments from './line-segments'; import config from '../../config'; import THREE from 'three'; //const MATERIALS = { // NORMAL: new THREE.LineBasicMaterial({ // color...
/******************************************************************************* * Copyright Searchbox - http://www.searchbox.com * * 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 * * ...
#!/bin/bash sudo cd /opt git clone https://github.com/gohugoio/hugo.git cd hugo go install --tags extend
#!/usr/bin/env bash pushd "$(dirname "$0")" > /dev/null || exit cd .. dart ./util/lib/main.dart "$@" popd > /dev/null || exit
module.exports = (req, res, next) => { const matchingToken = (req.headers || {})['x-api-key']; const validToken = process.env.API_TOKEN; if (!validToken) throw new Error('Internal Server Error'); if (matchingToken !== validToken) { res.status(401).json({}); } else { next(); } };
#!/usr/bin/env bash set -e sbt ++${TRAVIS_SCALA_VERSION} publishM2 publishLocal # Downloads maven schema file which will be used to validate the generated pom file wget -c http://maven.apache.org/xsd/maven-4.0.0.xsd # Use xmllint to validate the generated pom.xml find . -name *.pom -exec xmllint --noout -schema mav...
<gh_stars>0 /* * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The OpenAirInterface Software Alliance licenses this file to You under * the A...
package com.twitter.finatra.json.tests.internal.caseclass.validation import com.twitter.finatra.json.FinatraObjectMapper import com.twitter.finatra.json.internal.caseclass.exceptions.CaseClassValidationException.PropertyPath import com.twitter.finatra.json.internal.caseclass.exceptions.{CaseClassMappingException, Case...