text
stringlengths
1
1.05M
package rkentry import ( "context" "github.com/stretchr/testify/assert" "net/http" "net/http/httptest" "net/url" "os" "path" "testing" ) func TestNewStaticFileHandlerEntry(t *testing.T) { // without options entry := RegisterStaticFileHandlerEntry() assert.NotNil(t, entry) assert.NotNil(t, entry.ZapLoggerE...
#!/usr/bin/env bash LOG_DIR=log/ hdd=512 drop=0.2 layer=2 EXPERIMENT_NAME=Tree_Ensemble_v5_hdd_${hdd}_ly_${layer}_drop_${drop}_check RESUME_PATH=./model/${EXPERIMENT_NAME}_best.pt #RESUME_PATH=./model/Tree_Ensemble_v5_best.pt python3 distributed_train.py -lr=0.001 \ -layer=$layer \ ...
#!/bin/bash sudo rsync --progress -avi -e"ssh -i /home/moodle_backup/.ssh/id_rsa" --exclude="tool_heartbeat.test" --exclude="sessions/*" --exclude="cachestore_file/*" moodle_backup@content.midmich.edu:/path/to/moodledata/ /var/moodledata/
#! /usr/bin/env nix-shell #! nix-shell -i "bats -t" -p bats -p coreutils setup () { nix-env -e holochain hc } teardown () { nix-env -e holochain hc } @test "holochain trycp_server install" { echo '# trycp_server should not be instaled at first' >&3 ! [ -x "$( command -v trycp_server )" ] echo '# install trycp...
from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.svm import LinearSVC # Vectorize vectorizer = TfidfVectorizer() X = vectorizer.fit_transform(texts) # Train and evaluate model clf = LinearSVC() clf.fit(X, labels) scores = clf.score(X, labels)
<reponame>tanshuai/reference-wallet<filename>backend/tests/wallet_tests/resources/seeds/one_funds_pull_pre_approval.py import uuid from datetime import datetime from offchain import FundPullPreApprovalStatus from diem_utils.types.currencies import DiemCurrency from wallet.services.offchain.fund_pull_pre_approval impor...
package Chapter1_4High; import edu.princeton.cs.algs4.Stack; public class QueueWithTwoStacks<T> { private Stack<T> stack1; private Stack<T> stack2; public QueueWithTwoStacks() { stack1 = new Stack<T>(); stack2 = new Stack<T>(); } public void enqueue(T item) { stack1.push(...
from sklearn.linear_model import LogisticRegression from sklearn.model_selection import train_test_split from sklearn.preprocessing import LabelEncoder # training data train_data = [[1, 'Honda', 'Accord', 'Silver'], [2, 'Toyota', 'Camry', 'Silver'], [3, 'Nissan', 'Altima', 'Black'], ...
#!/bin/bash # start client python3.9 client/index.py --path ./log/client.log --pkLoc ./keys/pairC/private_key.pem --pbftHost 172.24.100.163 --pbftPort 10004
<reponame>trevorhein-matc/theTwistedLeafSite<filename>src/pages/sources.js import React from "react"; import SourceCard from "../components/SourceCard/SourceCard"; import { graphql } from 'gatsby'; import NavBar from '../components/NavBar' import GridLayout from '../components/GridLayout'; import Grid from '@material-u...
<filename>frontend/src/components/event-overview-dialog/index.js import React, { Component, PropTypes } from 'react' import { connect } from 'react-redux' import { Link } from 'react-router' import { hideEventOverview } from 'actions/event-overview' import Dialog from 'material-ui/Dialog' import EventOverview from 'c...
<filename>packages/src/rocket-punch/rule/readDirectoryPatterns.ts export const readDirectoryPatterns: [string[], string[], string[]] = [ // extensions ['.ts', '.tsx', '.js', '.jsx'], // excludes [ // exclude tests '**/*.(spec|test).(js|jsx|ts|tsx)', '**/__*', // exclude public '**/public', ...
<gh_stars>0 module Elibri module ONIX module Release_3_0 #Klasa reprezentująca produkt #Niektóre pola mogą pozostać bez wartości - zależy to od formy produktu class Product include Inspector #:nodoc: ATTRIBUTES = [ :height, :width, :thickness, :weight...
# export LC_TIME=en_US.UTF-8 if ! vim --serverlist | grep -q -w POST; then vim -g --servername POST & sleep 1 else vim -g --servername POST --remote-sent ":remote_foreground()" fi set -e statef='../_data/article.yml' n=0 eval $(cat $statef 2>/dev/null | eyml ) stamp=$(date +%Y-%m-%d) echo stamp: $stamp file="${stamp...
<reponame>learnforpractice/micropython-cpp import utime import machine from hwconfig import LED, BUTTON # machine.time_pulse_us() function demo print("""\ Let's play an interesting game: You click button as fast as you can, and I tell you how slow you are. Ready? Cliiiiick! """) while 1: delay = machine.time_pul...
#!/bin/bash cd $HOME/aws-panorama-samples export AWS_REGION=us-east-1 export LD_LIBRARY_PATH=$HOME/glibc-2.27-subset:$LD_LIBRARY_PATH jupyter-lab --no-browser --allow-root --port 8888 --notebook-dir ~
model = Sequential() model.add(Conv2D(64, (7, 7,), input_shape=(32, 32, 3), strides=(2,2))) model.add(Activation('relu')) model.add(BatchNormalization()) model.add(MaxPooling2D(pool_size=(2,2))) model.add(Conv2D(64, (3, 3), strides=(2, 2))) model.add(Activation('rel...
rm /tmp/alloctest-pr_rw.ready &>/dev/null rm /tmp/alloctest-pr_rw.done &>/dev/null BM_NAME=$1 THP=$2 BM_PID=$3 echo "mkdir /home/akshaybavisk/work/Yaniv/home/idanyani/hash-vs-radix/benchmarks/$BM_NAME" mkdir /home/akshaybavisk/work/Yaniv/home/idanyani/hash-vs-radix/benchmarks/$BM_NAME PERFOP="/home/akshaybavisk/work...
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: edge.proto package com.ciat.bim.server.edge.gen; /** * Protobuf type {@code edge.UplinkMsg} */ public final class UplinkMsg extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:edge.Upl...
export default /* glsl */ `uniform vec4 geometryResolution; #ifdef POSITION_STPQ varying vec4 vSTPQ; #endif #ifdef POSITION_U varying float vU; #endif #ifdef POSITION_UV varying vec2 vUV; #endif #ifdef POSITION_UVW varying vec3 vUVW; #endif #ifdef POSITION_UVWO varying vec4 vUVWO; #endif // External vec3 getPosition(...
from __future__ import division # ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ---------------...
<filename>2-resources/_External-learning-resources/00-Javascript/Node.js_Design_Patterns/Chapter08/14_universal_data_retrieval/src/components/authorPage.js "use strict"; const React = require('react'); const Link = require('react-router').Link; const xhrClient = require('../xhrClient'); class AuthorPage extends React...
#! /bin/bash mvn -pl com.yahoo.ycsb:mapkeeper-binding -am package -DskipTests dependency:build-classpath -DincludeScope=compile -Dmdep.outputFilterFile=true
import { Home, NotFound, SignUp, Feed, } from '../Pages'; export const PublicRoutes = [ { exact: true, path: '/', component: Home, key: 'home', }, { exact: true, path: '/signup', component: SignUp, key: 'signup', }, { exact: true, component: NotFound, key: ...
<filename>src/apps/terminal/TerminalBuffer.cpp /* * Copyright 2013, Haiku, Inc. All rights reserved. * Copyright 2008, <NAME>, <EMAIL>. * Distributed under the terms of the MIT License. * * Authors: * <NAME>, <EMAIL> * <NAME>, <EMAIL> */ #include "TerminalBuffer.h" #include <algorithm> #include <Message.h>...
sudo pip3 install -r requirements.txt sudo mkdir /var/log/thread/ sudo cp thread_tags.service /lib/systemd/system/ sudo chmod 644 /lib/systemd/system/thread_tags.service sudo chmod +x thread_tags.py sudo systemctl daemon-reload sudo systemctl enable thread_tags.service sudo systemctl start thread_tags.service
#!/usr/bin/env bash ./gradlew distJar mkdir -p /var/log/buck-cache-client # Based by https://ignite.apache.org/docs/latest/perf-and-troubleshooting/memory-tuning # MaxDirectMemorySize should be 4 * walSegmentSize, if we use default walSegmentSize, it will be 256MB /usr/local/opt/openjdk@8/bin/java -Xmx32g -XX:+UseG...
<reponame>nepalez/separator # encoding: utf-8 module Selector # The condition that accepts any value # # @example (see #[]) # class Nothing < Condition include Singleton # @!method [](value) # Returns false # # @example # condition = Selector::Nothing.instance # singleton # ...
# Python program to generate # a unique 6 digit number import random def generate_number(): # Choose a random number # between 10000 and 99999 random_number = random.randint(10000, 99999) # Return the random number return random_number # Driver Code if __name__ == "__main__": ...
#!/bin/sh cat >> /etc/sudoers << EOF # added by Dockerfile datamaps ALL=(ALL) NOPASSWD:ALL EOF
package ca.damocles.Damage; public enum DDamageCause { BLOCK_CONTACT, NATURE, EXPLOSION, ATTACK, POTION, SPELL; }
package health import ( "fmt" "go.opentelemetry.io/otel/trace" ) // Option is the health-container options type type Option func(*Health) error // WithChecks adds checks to newly instantiated health-container func WithChecks(checks ...Config) Option { return func(h *Health) error { for _, c := range checks { ...
#!/bin/bash set -euo pipefail CWD=${PWD} export CGO_ENABLED=0 GO_FLAGS=${GO_FLAGS:-"-tags netgo"} GO_CMD=${GO_CMD:-"build"} VERBOSE=${VERBOSE:-} BUILD_NAME="dgraph-operator" REPO_PATH="github.com/dgraph-io/dgraph-operator" API_VERSION="v1alpha1" OPERATOR_VERSION=$(git describe --always --tags 2> /dev/null || echo ...
<gh_stars>1-10 'use strict'; var expect = require('chai').expect; var hashAdapter = require('../../src/adapters').hash; var differentValidator = require('../../src/validators').different; var MissingArgumentError = require('../../src/errors').MissingArgumentError; describe('different', function () { it('throws an ...
<filename>lib/car/obj/src/cli_init_b_r.c /* **** Notes Initialise. */ # define CAR # include "./../../../incl/config.h" signed(__cdecl cli_init_b_r(signed(cache),signed(arg),signed char(**argp))) { auto signed char *b; if(arg<(0x01)) return(0x00); if(!argp) return(0x00); --arg; if(cache) { embed(0x00,*(arg+(argp...
<reponame>jd0yle/electron-dr // Modules to control application life and create native browser window const { app, BrowserWindow, Menu } = require('electron') const { ipcMain } = require('electron') // to talk to the browser window const path = require('path') const url = require('url') // Keep a global reference of th...
<gh_stars>0 import { Avatar, Box, Button, CircularProgress, Container, CssBaseline, FormControl, Grid, InputLabel, Link, makeStyles, MenuItem, Select, Typography } from "@material-ui/core"; import React, { useEffect, useMemo, useState } from "react"; import { useAppState } from "../../providers/AppStateProvider"; impor...
import {PriceAmountItem} from "./PriceAmountItem"; import {BehaviorSubject} from "rxjs/BehaviorSubject"; import {PriceCalculation} from "../../domain/server/PriceCalculation"; export class PriceDatabase { dataChange: BehaviorSubject<PriceAmountItem[]> = new BehaviorSubject<PriceAmountItem[]>([]); get data(): Price...
<filename>projects/angular-common-components/src/lib/common-components/oc-dropdown-button/oc-dropdown-button.component.spec.ts import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { OcDropdownButtonComponent } from './oc-dropdown-button.component'; import { NgbModule } from '@ng-boots...
<gh_stars>0 package main import ( "crypto/tls" "encoding/json" "log" "math/rand" "os" "time" gomail "gopkg.in/mail.v2" ) type ConfigJSON struct { From string `json:"from"` To []string `json:"to"` Password string `json:"password"` SMTPHost string `json:"smtp_host"` SMTPPort int `json:...
<gh_stars>0 /* eslint-disable no-console */ /* * * BOOK selectors * */ import { createSelector } from "reselect"; import { initialState } from "./reducer"; /** * Direct selector to the book state domain */ const selectBookDomain = state => state.get("book", initialState); /** * Other specific selectors */ cons...
go build -i -v -ldflags="-s -w"
/* Copyright 2017 IBM Corp. 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 distr...
<gh_stars>10-100 import { Request } from '../types/request' import { Response } from '../types/response' export function forwardRequest(request: Request): Promise<Response> { return new Promise((resolve, reject) => { chrome.runtime.sendMessage(request, (response: Response) => { if (!response) return reject...
<reponame>gcusnieux/jooby /** * Apache License * Version 2.0, January 2004 * http://www.apache.org/licenses/ * * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION * * 1. Definitions. * * "License" shall m...
<gh_stars>1-10 import type { CodecHash, Hash } from '../interfaces'; import type { AnyJson, AnyNumber, Constructor, ICompact, InterfaceTypes, Registry } from '../types'; import type { CompactEncodable } from './types'; import BN from 'bn.js'; /** * @name Compact * @description * A compact length-encoding codec wrapp...
<reponame>AttractiveMinki/Alzzabaegi package com.mycom.app.domain.entity; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicUpdate; import ja...
<gh_stars>0 for x, y in map(None, a, b): print x, y
<reponame>abhatikar/training_extensions /** * Copyright (c) 2020 Intel 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 re...
module ChangeSets class MemberRelationshipChangeSet attr_writer :applicable_policies include ::ChangeSets::SimpleMaintenanceTransmitter def applicable?(member, resource, now_or_future_active_policies) return false if member.blank? return false if resource.relationships.empty? # Put a c...
#!/usr/bin/env bash # installer for pyvenv # create directory .pyvenv if it doesn't exist already [ ! -d "~/.pyvenv" ] && mkdir ~/.pyvenv # move pyvenv and create_python there /usr/bin/cp pyvenv create_python ~/.pyvenv # source cat <<EOF >> ~/.bashrc # pyvenv setup #################################################...
package jadx.core.dex.nodes; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.function.Consumer; import java.util.function.Function; import org.jetbrains.annotations.Nullable; import jadx.api.ICodeWriter; import j...
<gh_stars>1-10 import { currentDriver } from '../../../../dataSources'; import { services } from '../../../../dataSources/services'; const getSQLValue = value => { const quotedStringRegex = /^".*"$/; let sqlValue = value; if (!quotedStringRegex.test(value)) { sqlValue = value.toLowerCase(); } return sq...
<filename>exercises/src/test/scala/fpinscala/datastructures/ListSpec.scala package fpinscala.datastructures import org.scalatest.{FlatSpec, Matchers} class ListSpec extends FlatSpec with Matchers { // Exercise 2 "A List" should "fail to get the tail of Nil" in { a[RuntimeException] shouldBe thrownBy(List.tai...
import React from 'react'; import { StyleSheet, View, TextInput, TouchableOpacity } from 'react-native'; const ProfileForm = () => { return ( <View style={styles.container}> <TextInput style={styles.input} placeholder="Name" /> <TextInput style={styles.input} placeholder="Email" /> <TextInput s...
import React from 'react'; import ReactDOM from 'react-dom'; const MovieList = (props) => { return ( <ul> {props.movies.map(movie => <li key={movie.name}>{movie.name}: {movie.year}</li>)} </ul> ); } function App() { const movies = [ {name: "Star Wars", year: 1977}, {name: "Beverly Hills Cop", year: 1984...
#!/usr/bin/env bash echo ">> Provisioning VM for Placeholder Project" export DEBIAN_FRONTEND=noninteractive echo ">> Populating database with default data" cd /home/vagrant/lumenbarebone php artisan migrate --seed echo ">> copying laravel env" cp /home/vagrant/lumenbarebone/.env.example /home/vagrant/lumenbarebone/....
<reponame>zhangyut/wolf<filename>Billiard_2D/app/src/main/java/com/bn/d2/bill/PicLoadUtil.java package com.bn.d2.bill; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; public class PicLoadUtil { public static ...
package commands import ( "provisioner/provisioner" "strings" "provisioner/fs" ) type SetupCFDot struct { CmdRunner provisioner.CmdRunner FS provisioner.FS } func (s *SetupCFDot) Run() error { setupFileContentsBytes, err := s.FS.Read("/var/vcap/jobs/cfdot/bin/setup") if err != nil { return err } r...
#!/bin/bash UTF8_IPADIC_PATH=./db/ipadic SHAPED_CSV_PATH=./db/csv SQL_PATH=./db/sqlite PATH_TO=$UTF8_IPADIC_PATH \ db/pickup-ipadic-csv.bash PATH_FROM=$UTF8_IPADIC_PATH PATH_TO=$SHAPED_CSV_PATH \ db/format-ipadic-csv.bash CSV_PATH=$SHAPED_CSV_PATH SQL_PATH=$SQL_PATH SQL_NAME=$SQL_NAME\ db/csv2sqlite.bash ...
import { Typegoose, prop } from 'typegoose'; export class Category extends Typegoose { @prop({ required: true, index: true }) id?: string; @prop({ required: true }) title?: string; @prop() description?: string; }
<filename>src/main/java/com/example/ui/GetEditRoute.java package com.example.ui; import com.example.appl.CardRepository; import com.example.model.Status; import spark.*; import java.util.HashMap; import java.util.Objects; /** * The {@code GET /editCard} route handler. * Displays the page containing the form for mo...
<gh_stars>0 try: anobj.lower() + anobj + ''
<reponame>yanbowe/taro-vue3-pinia<gh_stars>1-10 export default defineAppConfig({ pages: ['pages/index/index'], window: { backgroundColor: '#fff', backgroundTextStyle: 'light', navigationBarBackgroundColor: '#fff', navigationBarTitleText: 'Taro3', navigationBarTextStyle: 'black' }, subPackage...
<gh_stars>0 import { Component, OnInit, Input, OnChanges, Output, EventEmitter, } from "@angular/core"; import { AuditTransactionService } from "src/app/services/audit/audit-transaction/audit-transaction.service"; import { AppComponent } from "src/app/app.component"; import { DialogService } from "src/app/s...
import { Cookie } from '../types'; class CookieManager { private cookies: Cookie[] = []; public setCookie(name: string, value: string, expirationDate: Date): void { const newCookie: Cookie = { name, value, expirationDate }; this.cookies.push(newCookie); } public getCookie(name: string): Cookie | unde...
<filename>src/context/update.js<gh_stars>10-100 const update = state => { const { _step, _serverDelay, _clientDelay, _scale, _size } = state; const now = Date.now(); state._stop0 = new Date( Math.floor((now - _serverDelay - _clientDelay) / _step) * _step ); state._start0 = new Date(state._stop0 - _size * ...
<filename>libs/product/src/models/shop.interface.ts import { Identifiable } from '@price-depo-ui/data-handling'; import { Address } from './address.interface'; export interface Shop extends Identifiable<string> { name: string; address: Address; chainStoreId?: string; }
#!/bin/bash # Execute 'docker-compose xxx', where the value of xxx is provided by # the first command-line arg, or $1. This script mostly exits for # documentation, and as a shortcut for docker-compose. # # Usage: # $ ./compose.sh up # $ ./compose.sh ps # $ ./compose.sh down # # <NAME>, Microsoft, May 2021 # Check ...
#!/bin/bash # Run this script on a drop.zip file created during a build when figureNNN.png files are created by # failing tests on plotting code. For full instructions, see # libraries/Utilities/psbutils/filecheck.py SCRIPT=$(dirname $0)/../libraries/Utilities/psbutils/install_artifact_files.py if [ ! -e "$SCRIPT" ...
$(function(){ $('#formauditpendinglist').dataTable({ "bPaginate": true, "iDisplayLength": 50, "bProcessing": true, "bServerSide": true, "sAjaxSource": Django.url('form-audit-data') }); });
const Profiles = require('../../models/profileModel'); function checkIfProfileExists(req, res, next) { const { profileId } = req.body; Profiles.findById(profileId).then((profile) => { if (profile) { next(); } else { res.status(404).json({ error: 'ProfileNotFound' }); } }); } module.expo...
package jframe.qcloud.model; import java.util.Map; /** * https://cloud.tencent.com/document/product/436/14048 * * <p> * "expiredTime": 1494563462, * "credentials": { * "sessionToken": "sessionTokenXXXXX", * "tmpSecretId": "tmpSecretIdXXXXX", * "tmpSecretKey": "<KEY>" * } * </p> * * 临时签名 * * @author d...
export CUDA_VISIBLE_DEVICES=1 export export FLAGS_fraction_of_gpu_memory_to_use=0.1 python train.py --data_dir dataset --conf kitti_3d_multi_warmup
import { FilesEngine } from "./common" ; import { PathVar } from "../etc/other/paths" export class Env_FilesLoader extends FilesEngine{ static isLoaded:boolean = false static load(){ if(Env_FilesLoader.isLoaded) return new Env_FilesLoader() // Env_FilesLoader.isLoaded = true } c...
public class PrimeSum { public int sumPrimes(int n) { boolean[] prime = new boolean[n + 1]; Arrays.fill(prime, true); for (int p = 2; p * p <= n; p++) { if (prime[p] == true) { for (int i = p * p; i <= n; i += p) prime[i] = false;...
<filename>src/components/Loading/Loading.tsx import React from "react"; import "./Loading.css"; function Loading(props: any) { return ( <div className="display-card" style={{ padding: "24px", margin: "12px" }}> <div className="card-img-style"></div> <div className="loading-info"> <div></div> ...
import Foundation let xmlString = "<tag>Hello World!</tag>" if let xmlData = xmlString.data(using: .utf8) { do { let xmlDocument = try XMLDocument(data: xmlData) let tag = xmlDocument.rootElement()?.name print(tag!) // Output: "tag" } catch { print(error) } }
function create2DArray(rows, columns) { let array = new Array(rows); for (let i = 0; i < rows; i++) { array[i] = new Array(columns); } return array; }
#-*- coding: UTF-8 -*- ''' Created by WangQL 2019.4.25 aims to select the series suitable for deep learning. get 'B80f', 'I70f', 'B70f', 'B80', 'B70s' from original CT scans and copy them to another dir ''' import pydicom import cv2 import os import shutil import tqdm path = '/home/wangqiuli/Data/pneumonia/chest3/'...
npm install rm -rf ./log rm -rf ./mqtt-server.tar tar -cvf mqtt-server.tar ./ echo "Ifc654321" scp /Users/xplusz/workspace/mqtt-server/mqtt-server.tar root@47.116.75.164:/www/wwwroot/fcity/mqtt-server/ rm -rf ./mqtt-server.tar
import {Injectable} from '@angular/core'; import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, CanLoad, Route, Router, RouterStateSnapshot } from '@angular/router'; import {AuthService} from './auth.service'; @Injectable() export class AuthGuard implements CanLoad, CanActivate, CanActivateChild ...
package io.github.rcarlosdasilva.weixin.api.weixin.impl; import java.util.UUID; import org.apache.commons.codec.digest.DigestUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.common.base.Preconditions; import com.google.common.base.Strings; import io.github.rcarlosdasilva....
<reponame>JLLeitschuh/Symfony-2-Eclipse-Plugin /******************************************************************************* * This file is part of the Symfony eclipse plugin. * * (c) <NAME> <<EMAIL>> * * For the full copyright and license information, please view the LICENSE * file that was distributed with...
#/bin/bash #user="website" #pass="website" #database="website" if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] ; then echo "You need to type import.sh [user] [password] [database]" else user=$1 pass=$2 database=$3 sqls=`ls *.sql` for i in $sqls do echo "mysql -u $user --password=*...
#!/bin/bash ## PubSubDemo [config] `dirname $0`/run.sh org.demo.PubSubDemo2 -props config.xml $*
<reponame>vharsh/cattle2<gh_stars>0 package io.cattle.platform.audit; public enum AuditEventType { delete, update, create, UNKNOWN, reconcile }
/******************************************************************************* * Copyright 2015 InfinitiesSoft Solutions Inc. * * 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 flume-ng agent --name newsAgent --conf-file ./flume_config.cfg -f $FLUME_HOME/conf/flume-conf.properties.template -Dflume.root.logger=DEBUG,console
import math def calculate_torus_volume(R=None, r=None, DV=None, dVMode='abs', ind=None, VType='Tor', VLim=None, Out='(X,Y,Z)', margin=1.e-9): if R is None or r is None: return None # Return None if major or minor radius is not provided volume = 2 * math.pi**2 * R * r**2 # Calculate the volume of the...
<reponame>tuw-eeg/GEOPHIRES-web import { SimulationData } from '@modules/simulation-provider/model'; import { createContext, Dispatch, SetStateAction } from 'react'; export type SimulationContextType = { simulationData?: SimulationData; setSimulationData?: Dispatch<SetStateAction<SimulationData>>; }; export c...
<gh_stars>1-10 "use strict"; const umdModule = require('./umdModule'); console.log(umdModule.sayHello('Server!'));
<reponame>PolymeshNetwork/common<gh_stars>1-10 // Copyright 2017-2021 @polkadot/util-crypto authors & contributors // SPDX-License-Identifier: Apache-2.0 import { sr25519DeriveKeypairSoft } from '@polkadot/wasm-crypto'; import { createDeriveFn } from './derive'; export const schnorrkelDeriveSoft = createDeriveFn(sr2...
echo "Querying the '_fica.fica_status' table on canonical DB" docker exec -it db-canonical psql -P pager=off -h db-canonical -U postgres -p 5432 -d canonical_db -c 'SELECT * FROM _fica.fica_status;' echo "Querying the '_fica.fica_status_history' table on canonical DB" docker exec -it db-canonical psql -P pager=off -...
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-05-09 11:48 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('mapdata', '0065_auto_20170509_1140'), ] operations...
import keras.backend as K from keras.layers import Layer, concatenate class SquareConcatLayer(Layer): def __init__(self, axis, **kwargs): self.axis = axis super(SquareConcatLayer, self).__init__(**kwargs) def build(self, input_shape): super(SquareConcatLayer, self).build(input_shape) ...
<filename>server/admin-api/routes.js const Router = require('@koa/router') const koaJwt = require('koa-jwt') const handle = require('./controllers/index') const { adminSecret } = require('../config') const judge = require('../middlewares/judge') // 实例化路由对象,并设置路由前缀 const router = new Router({ prefix: '/api/admin' }) /...
<reponame>dino993/SeleniumFull var webdriver = require('selenium-webdriver'), chrome = require('selenium-webdriver/chrome'), safari = require('selenium-webdriver/safari'), phantomjs = require('selenium-webdriver/phantomjs'), firefox = require('selenium-webdriver/firefox'), By = webdriver.By, unt...
<filename>0839-Similar String Groups/cpp_0839/Solution1.h /** * @author ooooo * @date 2021/2/26 16:34 */ #ifndef CPP_0839__SOLUTION1_H_ #define CPP_0839__SOLUTION1_H_ #include <iostream> #include <vector> #include <set> using namespace std; class Solution { public: struct UF { vector<int> p; int n; UF(...
# generated from colcon_bash/shell/template/prefix_chain.bash.em # This script extends the environment with the environment of other prefix # paths which were sourced when this file was generated as well as all packages # contained in this prefix path. # function to source another script with conditional trace output...