text
stringlengths
1
1.05M
<reponame>chylex/Hardcore-Ender-Expansion<filename>src/main/java/chylex/hee/tileentity/spawner/SilverfishRavagedSpawnerLogic.java<gh_stars>10-100 package chylex.hee.tileentity.spawner; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.monster.EntitySilverfish; import net.minecraft.util.AxisAlignedBB...
<gh_stars>1-10 import React, {Component} from 'react' import {Form, Input, Icon} from 'semantic-ui-react' import {connect} from 'react-redux' //even though we might have this in an entirely separate page,to me it //makes sense to restrict access at the component level to have the //extra guarantee const mapState = ({u...
#!/bin/bash cd webapi/Guide.ObrasLiterarias.Api/ dotnet restore dotnet publish -c release -o ./publish -r linux-x64 docker build -t guide/webapi:1.0 . cd .. cd .. cd webapp/ObrasLit/ docker build -t guide/webapp:1.0 . cd .. cd .. docker-compose up
#!/bin/bash set -o pipefail # Is arduino-cli installed? arduino-cli version > /dev/null 2>&1 if [ "$?" -ne 0 ]; then go get -u github.com/arduino/arduino-cli # Create a config arduino-cli config init # probably not necessary just after install but just in case - update the # core and library inde...
<filename>modules/dreamview/frontend/src/utils/misc.js<gh_stars>1-10 export function copyProperty(toObj, fromObj) { for (const property in fromObj) { if (fromObj.hasOwnProperty(property)) { toObj[property] = fromObj[property]; } } } export function hideArrayObjects(objects, startIdx...
/* * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect 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 o...
#!/usr/bin/env bash source $WORKSPACE/venv/bin/activate
#!/bin/bash REPO_DIR="$( cd "$(dirname $( dirname "${BASH_SOURCE[0]}" ))" &> /dev/null && pwd )" GEN_YAML_DIR="${REPO_DIR}/.generated-yaml" TEMPLATES_DIR="${REPO_DIR}/scripts/goreleaser-templates" MAIN_TEMPLATE="${TEMPLATES_DIR}/goreleaser.yaml" YQ=$(which yq) while getopts d:y: flag do case "${flag}" in d...
export const environment = { production: true, firebase: { apiKey: '<KEY>', authDomain: 'app-mini-netflix.firebaseapp.com', databaseURL: 'https://app-mini-netflix.firebaseio.com', projectId: 'app-mini-netflix', storageBucket: 'app-mini-netflix.appspot.com', messagingSenderId: '513014570227',...
mkdir build cd build cmake ../ make cd ../ export GAZEBO_PLUGIN_PATH=./build gzserver -u --verbose blank.world
#!/bin/bash # Sleep 30 seconds to allow network to stabalize before attempting package install sleep 30 zypper install -y mdadm n=$(find /dev/disk/azure/scsi1/ -name "lun*"|wc -l) n="${n//\ /}" mdadm --create /dev/md0 --force --level=stripe --raid-devices=$n /dev/disk/azure/scsi1/lun* mkfs.xfs /dev/md0 mkdir /sas echo ...
import Carousel from 'antd/es/carousel' import 'antd/es/carousel/style/css' export { Carousel }
<reponame>Luxcium/redis-json import { promisify } from 'util'; import { Flattener, IFlattener } from './flattener'; import { IOptions, ISetOptions, IResult } from '../interfaces'; import { TYPE } from '../utils/type'; type IPromisified = (...args: any[]) => Promise<any>; type Methods = 'hmset' | 'hmget' | 'hgetall' |...
def is_number(s): try: float(s) return True except ValueError: return False
# # Copyright (c) 2013-2014, 2017 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # # -*- encoding: utf-8 -*- # from cgtsclient.common import base from cgtsclient.common import utils from cgtsclient import exc CREATION_ATTRIBUTES = ['ihost_uuid', 'istor_uuid', 'serial_id', 'device_node', ...
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) from . import shutil_get_terminal_size from . import weakref from . import shlex
<filename>src/components/Basic/PendingTransaction.tsx<gh_stars>0 import React, { useState, useEffect } from 'react'; import styled from 'styled-components'; import { connect } from 'react-redux'; import moment from 'moment'; import LoadingSpinner from 'components/Basic/LoadingSpinner'; import { Setting } from 'types'; ...
import helpers.CertbotDockerTagResolver; import io.homecentr.testcontainers.containers.GenericContainerEx; import io.homecentr.testcontainers.containers.wait.strategy.WaitEx; import io.homecentr.testcontainers.images.PullPolicyEx; import org.junit.Test; import org.testcontainers.containers.ContainerLaunchException; im...
#!/bin/bash xrandr xrandr --auto --output eDP1 --mode 1920x1080 --dpi 94 xrandr --auto --output eDP1 --mode 1920x1080 --same-as DP3 xrandr --auto --output DP1 --mode 1920x1080 --same-as eDP1 gsettings set org.gnome.desktop.interface scaling-factor 2
<filename>applications/physbam/physbam-lib/External_Libraries/Archives/boost/boost/iostreams/detail/vc6/close.hpp // (C) Copyright <NAME> 2005. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) // See http://www.boo...
import { Meta, Story } from '@storybook/react' import { Logo, LogoProps } from '.' export default { title: 'Logo', component: Logo } as Meta export const Default: Story<LogoProps> = (args) => <Logo {...args} /> Default.args = { color: 'white', size: 'normal', hideOnMobile: false }
<filename>src/main/java/com/revature/model/Reimbursement.java package com.revature.model; import java.util.Objects; public class Reimbursement { private int reimbursementId; private double reimbursementAmount; private String reimbursementSubmitted; private String reimbursementResolved; private Stri...
import Vue from "vue"; import Vuex from "vuex"; import vehicle from "./modules/vehicleTypes"; import fee from "./modules/parkFees"; Vue.use(Vuex); export default new Vuex.Store({ state: { loadingScreenStatus: false, totalPrice: "" }, mutations: { setLoadingScreenStatus(state, payload) { state....
(function(){ "use strict"; var regalo = document.querySelector('#regalo'); document.addEventListener('DOMContentLoaded', function(){ /* var map = L.map('mapa').setView([-34.573016, -58.503973], 18); L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { at...
<reponame>Nusushi/Nusushi /// <reference path="../jsx.ts" /> "use strict"; import { VNode, VNodeProperties } from "maquette"; declare var require: any; var velocity: any = require("velocity-animate"); import * as maquette from "maquette"; const h = maquette.h; import { CaliforniaApp, DEFAULT_EXCEPTION, getArrayForEnum...
<filename>client/src/components/Footer.js import React from 'react'; function Footer () { return ( <footer style={{ backgroundColor:"rgba(0,0,0,.7", minHeight:"2rem", alignContent:"center", marginTop:"2rem" }}> <p style={{ fontSize: ".9rem", color: "white", marginTop: "1rem" }}>&copy; bryan<sp...
/* * 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"); you ...
/** * 对websocket相关功能进行封装 */ import { Toast } from 'antd-mobile'; import { getToken } from 'utils/auth' import storage from './storage.js' var utils = { // 处理公司节点数据 handleCompanyNode: function(data){ storage.setItem('companyNode', data); let page = plus.webview.getWebviewById('home'); socket.mui...
cd docker ./docker.sh cd .. ansible-playbook analytics.yml -i vagrant #ansible-playbook analytics.yml -i vagrant --tag hdfs #ansible-playbook analytics.yml -i vagrant --tag spark #ansible-playbook analytics.yml -i vagrant --tag hbase #ansible-playbook analytics.yml -i vagrant --tag kafka
<filename>tests/utils/pracellation.py import unittest as ut import fmridenoise.parcellation from fmridenoise.parcellation import get_parcellation_file_path from os.path import join, dirname class ParcellationHelpers(ut.TestCase): def test_get_MNI152Nlin6Asym(self): path = get_parcellation_file_path('MNI1...
import products.Product; import products.dumplings.Salmon; import products.pasta.Bolognese; import products.pasta.Carbonara; import products.pizza.Italiana; import org.junit.jupiter.api.Test; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.TearDown; import static org.hamcrest.core.IsInstan...
<gh_stars>0 import { Component } from '@angular/core'; import { NavController, NavParams } from 'ionic-angular'; import { MicroClass } from '../../models/microclass'; import { MicroClassVideo } from '../../models/microclassvideo'; import { MicroClassProvider } from '../../providers/micro-class/micro-class'; import { Li...
#!/bin/bash set -euxo pipefail if [ "$(pwd)" = "/latest" ]; then until $(python /local/chromeless/__version__.py); do sleep 5; done fi cp /tests.py ./ cp /example.py ./ pytest tests.py -ra pytest example.py -ra
#!/bin/bash if [ -z $CHANNEL ]; then export CHANNEL='release' fi pushd $(dirname "$0") >/dev/null source config.sh # read nightly compiler from rust-toolchain file TOOLCHAIN=$(cat rust-toolchain) popd >/dev/null if [[ $(rustc -V) != $(rustc +${TOOLCHAIN} -V) ]]; then echo "rustc_codegen_cranelift is build for ...
#!/usr/bin/env bash export PGPASSWORD=$POSTGRES_PASSWORD filename=backup_$(date +'%Y_%m_%dT%H_%M_%S').dump echo "create database backup file $filename" pg_dump -Fc -h database -U $POSTGRES_USER $POSTGRES_DB > /backups/$filename
#!/bin/bash -e cat > /tmp/setup.$$ <<"EOF" mkdir -p /data/kolla df -h dd if=/dev/zero of=/data/kolla/cinder-volumes.img bs=5M count=2048 LOOP=$(losetup -f) losetup $LOOP /data/kolla/cinder-volumes.img parted -s $LOOP mklabel gpt parted -s $LOOP mkpart 1 0% 100% parted -s $LOOP set 1 lvm on partprobe $LOOP pvcreate -y $...
#! /bin/bash cargo build --release --target x86_64-unknown-linux-gnu # scp rust_cms_20200806p1.zip root@www.tianlang.tech:/home/www/web/rust_cms
if (process.env.NODE_ENV === "production") { module.exports = require("./storeProvider.prod") } else { module.exports = require("./storeProvider.dev") }
<reponame>cisocrgroup/ocrd-postcorrection package de.lmu.cis.ocrd.ml.features; public interface BinaryPrediction { boolean getPrediction(); double getConfidence(); }
import numpy as np from sklearn.preprocessing import OneHotEncoder from typing import Tuple def preprocess_data(X: np.ndarray, yFile: str) -> Tuple[np.ndarray, np.ndarray]: # Reshape the input features preprocessed_X = np.reshape(X, (212841, -1)) # Read the label data and perform One-Hot Encoding with...
#!/bin/sh set -e # started as hassio addon HASSIO_OPTIONSFILE=/data/options.json if [ -f ${HASSIO_OPTIONSFILE} ]; then CONFIG=$(grep config_file ${HASSIO_OPTIONSFILE}| cut -d ':' -f 2 | sed s/[\"}]//g ) echo "Using config file: ${CONFIG}" if [ ! -f ${CONFIG} ]; then echo "Config not found. Please...
<filename>acmicpc.net/source/13913.cpp // 13913. 숨바꼭질 4 // 2019.08.04 // BFS // https://tdm1223.tistory.com/89 #include<iostream> #include<queue> using namespace std; bool visit[200001]; // 방문 유무 저장 int dist[200001]; // dist[i] : i에 도착하는 가장 빠른 시간 int from[200001]; // from[i] : i가 어디서 왔는지 저장하는 배열 // 경로 출력하는 함수 void Pr...
package io.opensphere.controlpanels.styles.ui; import static org.junit.Assert.assertEquals; import org.easymock.EasyMock; import org.easymock.EasyMockSupport; import org.junit.Before; import org.junit.Test; import io.opensphere.controlpanels.styles.model.StyleOptions; import io.opensphere.controlpanels.sty...
#!/bin/bash # # launches the unit testing # # Copyright (C) # Honda Research Institute Europe GmbH # Carl-Legien-Str. 30 # 63073 Offenbach/Main # Germany # # UNPUBLISHED PROPRIETARY MATERIAL. # ALL RIGHTS RESERVED. # # source ${TOOLBOSCORE_ROOT}/include/Unittest.bash CWD=$(pwd) cd ${CWD}/ArgsManagerV2 && ./...
#!/bin/bash systemctl disable avahi-daemon
<filename>.storybook/main.js module.exports = { stories: ['../stories/**/*.stories.(ts|tsx)'], addons: [ '@storybook/addon-actions', '@storybook/addon-links', '@storybook/addon-docs', ], typescript: { check: false, reactDocgen: 'react-docgen-typescript', compilerOptions: { module: ...
package bd.edu.daffodilvarsity.classmanager.activities; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.Spinner; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; imp...
import DepotConnection from '../Connections/DepotConnection'; import GuidedCallback from '../Callbacks/GuidedCallback'; export function DepotGuide() { let promise = new Promise(() => { depotGuide(); }); } function depotGuide() { dcn = new DepotConnection(new GuidedCallback()); dcn.Complexity = "Guide";...
package com.iterlife.zeus.demo.entity; import com.iterlife.zeus.starter.annotation.IterLife; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.extern.slf4j.Slf4j; import java.lang.annotation.Annotation; /** * @desc: * @author: lujie * @version: V1.0.0 * @datetime: 2020/10...
# # 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"); you may not...
<reponame>QuidWallet/quid-wallet-app<gh_stars>1-10 import { createSelector } from 'reselect'; import { getActiveWalletTokensWithPrice, getActiveWalletAddress, getActiveWalletTotalBalance } from './wallet'; import { getAllTransfers } from './transfers'; export const portfolioUpdatedAt = createSelector( [getActiv...
. helpers.sh start_test_server \ -line 1 -file data/require-digestauth-close -end -reconnect \ -line 4 -expect 'Authorization: Digest username="testuser",realm="testrealm",nonce="948647427",uri="/testrealm/",response="66481c52735a79763ec8ae9abbec36d7",algorithm=MD5' \ -line 4 -file data/framed trap "stop_test_se...
#!/bin/bash set -e printf "\n[-] Performing final cleanup...\n\n" # get out of the src dir, so we can delete it cd $APP_BUNDLE_DIR # Clean out docs rm -rf /usr/share/{doc,doc-base,man,locale,zoneinfo} # Clean out package management dirs rm -rf /var/lib/{cache,log} # remove app source rm -rf $APP_SOURCE_DIR # remo...
#!/usr/bin/env bash # vim:ts=4:sts=4:sw=4:et # # Author: Hari Sekhon # Date: 2021-09-13 18:05:20 +0100 (Mon, 13 Sep 2021) # # https://github.com/HariSekhon/bash-tools # # License: see accompanying Hari Sekhon LICENSE file # # If you're using my code you're welcome to connect with me on LinkedIn and optionally sen...
import java.util.Scanner; public class UserData { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Please enter your Full Name : "); String fullName = sc.nextLine(); System.out.println("Please enter your Age : "); int age =...
def encrypt(message): encrypted_text = "" for letter in message: encrypted_text += chr(ord(letter) + 3) return encrypted_text def decrypt(message): decrypted_text = "" for letter in message: decrypted_text += chr(ord(letter) - 3) return decrypted_text msg = "This is ...
"use strict"; exports.__esModule = true; exports.BookDto = void 0; var BookDto = /** @class */ (function () { function BookDto() { } return BookDto; }()); exports.BookDto = BookDto;
<reponame>jmccrae/saffron<filename>core/src/test/java/org/insightcentre/nlp/saffron/data/ConceptTest.java<gh_stars>10-100 package org.insightcentre.nlp.saffron.data; import static org.junit.Assert.assertEquals; import java.io.IOException; import java.net.URL; import java.util.HashSet; import java.util.Set; import or...
module.exports = pdf = {} var fs = require('fs') var Prince = require("prince") pdf.generate = function(htmlPath, pdfPath, success, error, license) { var prince = Prince() if (license) { prince = prince.license(license) } prince .inputs(htmlPath) .output(pdfPath) .execute() .then(function(...
export VPC_ID="vpc-deadbeef" export SUBNET_ID="subnet-bad1dea5" export AZ="us-east-9z" export TEMPLATE_ID="lt-abcd0123"
#!/usr/bin/env bash # # 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 # d...
#!/bin/bash # simple script to automate the steps involved in running tests # prerequisites: chmod u+x run-tests.sh clear cd .. echo "==================" echo "CALLING [test_one] in 1 second..." echo "==================" sleep 1 python -m dimschema.tests.test_one sleep 2 clear echo "" echo "==================" ...
#!/bin/bash USER_PATH=/mnt/ethereum MODULE_PATH=$USER_PATH/bitcore/packages NODE_PATH=$USER_PATH/.nvm/versions/node/v10.5.0/bin LOG_PATH=$USER_PATH/bitcore/logs cd $MODULE_PATH/bitcore-wallet-service mkdir -p pids # run_program (nodefile, pidfile, logfile) run_program () { nodefile=$1 pidfile=$2 logfile=$3 ...
<reponame>Bilallbayrakdar/blas // Go implementation of BLAS (Basic Linear Algebra Subprograms) package blas
<filename>7-assets/past-student-repos/LambdaSchool-master/m4/41b1/index.js<gh_stars>0 const express = require('express'); const Hubs = require('./hubs/hubs-model.js'); const server = express(); server.use(express.json()); server.get('/', (req, res) => { res.send(` <h2>Lambda Hubs API</h> <p>Welcome to the...
<filename>traveldb/abstract/out_d_statistik.sql /*D************************************************************/ /* Default: Aktion STATISTIK OUT_D_statistik */ /* Company: Demo */ /* */ /* Copyright...
import graphviz from sklearn import tree # Create a Decision Tree model # ... # Visualize the model dot_data = tree.export_graphviz(model, out_file=None) graph = graphviz.Source(dot_data) graph.render('decision-tree.pdf')
#!/bin/bash status=`/usr/local/bin/etcdctl get /k8s/network/config/` if [ status -ne 0 ];then /usr/local/bin/etcdctl --endpoint=http://192.168.10.247:2379 mk /k8s/network/config '{"Network":"10.211.200.0/16", "SubnetLen":24, "Backend":{"Type":"vxlan"}}' && /usr/local/bin/etcdctl --endpoint=http://192.168.10.247:23...
<reponame>ss-au/xoces //index.js import React from 'react' import ReactDOM from 'react-dom' import { createStore } from 'redux' import { Provider } from 'react-redux' import _ from 'lodash' import './styles/foundation.min.css' import './styles/core.scss' import reducer from './reducers' import {setConfig, setConfigTr...
# Copyright (c) 2014, 2016 Oracle and/or its affiliates. All rights reserved. This # code is released under a tri EPL/GPL/LGPL license. You can use it, # redistribute it and/or modify it under the terms of the: # # Eclipse Public License version 1.0 # GNU General Public License version 2 # GNU Lesser General Public Lic...
var myLocation; var map, placesService, directionsService; var Status = { OK: "", LOADING: "busy", WARNING: "warn" }; function setStatus(message, classname) { document.getElementById("status").className = "title " + classname; document.getElementById("status").innerHTML = message; } function init () { ma...
import Configuration from 'Configuration'; import StringUtils from 'utils/StringUtils'; import URLUtils from 'utils/URLUtils'; import ArgumentError from 'errors/ArgumentError'; /** * Utility functions involving the API */ export default class ParliamentAPIUtils { private static readonly BASE_API_URL = Configuratio...
<reponame>JackWFinlay/data-structures-ts export class AbstractNode<T> { constructor(private _value: T = null) {} public get value(): T { return this._value; } public set value(value: T){ this._value = value; } }
/* * Copyright (C) 2016 The Dagger Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
<filename>lib/ftp4j-1.7.2/src/it/sauronsoftware/ftp4j/connectors/SOCKS4Connector.java /* * ftp4j - A pure Java FTP client library * * Copyright (C) 2008-2010 <NAME> (www.sauronsoftware.it) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser Gener...
# Aliases alias gst='git status' compdef _git gst=git-status alias gl='git pull' compdef _git gl=git-pull alias gup='git fetch && git rebase' compdef _git gup=git-fetch alias gp='git push' compdef _git gp=git-push gdv() { git diff -w "$@" | view - } compdef _git gdv=git-diff alias gc='git commit -v' compdef _git gc=git...
<reponame>mirzak/gui import parse from 'parse-link-header'; import * as DeploymentConstants from '../constants/deploymentConstants'; import DeploymentsApi from '../api/deployments-api'; import { startTimeSort } from '../helpers'; const apiUrl = '/api/management/v1'; const deploymentsApiUrl = `${apiUrl}/deployments`; ...
<reponame>levsthings/somnolence import React, {PureComponent} from 'react' import {dashboardTitle} from '../../common.styles.js' import {compass, compassSection} from './Compass.styles' const compassProps = { fill: 'none', stroke: '#fff', strokeWidth: 3 } export default class Compass extends PureComponent...
### Helpers ### function sr_err { echo \> $'\033[0;31m'$*$'\033[0m' >&2 exit 1 } function sr_call_docker { /usr/bin/env docker > /dev/null 2> /dev/null || sr_err "Please install docker. "$'\n\t'"Ubuntu: https://docs.docker.com/engine/installation/linux/ubuntulinux/"$'\n\t'"Mac: https://docs.docker.com/doc...
<reponame>coding-new-talking/taste-spring<filename>src/main/java/org/cnt/nots/asm/_ClassVisitor.java package org.cnt.nots.asm; import java.util.Arrays; import org.springframework.asm.AnnotationVisitor; import org.springframework.asm.ClassVisitor; import org.springframework.asm.FieldVisitor; import org.springfr...
#!/bin/bash # Copyright 2016 Crunchy Data 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
#!/bin/bash region="default" name="test-cluster" request_body=$(cat<<EOF { "name": "test-cluster", "namespace": "default", "region": "default", "clusterType": "kubernetes", "masterList": [ { "ip": "192.168.1.10" }, { "ip": "192.168.1.11" } ], "nodeList": [ { "ip": "1...
package todolist import ( "regexp" "time" ) type DateFilter struct { Todos []*Todo Location *time.Location } func NewDateFilter(todos []*Todo) *DateFilter { return &DateFilter{Todos: todos, Location: time.Now().Location()} } func filterOnDue(todo *Todo) string { return todo.Due } func filterOnCompletedDat...
# Create the states state0 = { 'name': 'state0', 'message': 'Hello! How can I help you?', 'replies': {'I need some advice': 'state1', 'Can you answer my questions?': 'state2'} } state1 = { 'name': 'state1', 'message': 'Sure, what kind of advice do you need?', 'replies': {'Career advice': ...
def validate_profile(profile): for attr, value in profile.items(): if not (all(x >= 0 for x in value.opt) and all(x >= 0 for x in value.max)): return False if not all(opt <= max for opt, max in zip(value.opt, value.max)): return False return True
export interface Tile { id: string; cols: number; rows: number; } export const CardsColsSize = 2;
<reponame>jrfaller/maracas package main.unused.interfaceAdded; public class InterfaceAdded implements IInterfaceAdded { @Override public int methodAbs() { return 0; } }
# shellcheck shell=bash # run-shellcheck test_audit() { describe Running on blank host register_test retvalshouldbe 0 dismiss_count_for_test # shellcheck disable=2154 run blank /opt/debian-cis/bin/hardening/"${script}".sh --audit-all local test_user="testcrontabduser" describe Tests purpos...
class BankAccount: def __init__(self, account_holder): self.account_holder = account_holder self.balance = 0 def deposit(self, amount): self.balance += amount def withdraw(self, amount): if amount > self.balance: print("Insufficient funds") else: ...
import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; class ProblemTest { @Test void testExampleFromProblem() { // Since solution is probabilistic test many times! for (int i = 0; 1_000 > i; ++i) { assertEquals(3141, (int)(Problem.estimatePi() * 1000)); } } }
export default [ { name: '<NAME>', stationId: 'home', userId: 'hsdgHZY233 ', time: '2:17:06 pm', }, { name: "<NAME>", stationId: 'tulipHQ', userId: 'hsdgHZY233 ', time: '2:15:06 pm', }, { name: "<NAME>", stationId: 'tulipHQ', userId: 'hsdgHZY233 ', time: '2:13:0...
<reponame>1aurabrown/ervell import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Cookies from 'cookies-js'; import HeaderMetadataLinkUnlessCurrent from 'react/components/UI/HeaderMetadata/HeaderMetadataLinkUnlessCurrent'; export default class ProfileLinkUnlessCurrent extends Component ...
#!/bin/sh checkerror() { if test $? -ne 0 then echo "failure: ${cmd}" exit 1 fi } if test $# -eq 0 then echo "Usage: $0 <matchfile>" exit 1 fi # VALGRIND=valgrind.sh matchfile=$1 chainopts="-local 10b" cmd="${VALGRIND} ./chain2dim.x ${chainopts} -silent ${matchfile}" ${cmd} > .tmp1 checkerror cmd="Vmatch...
<reponame>Montimage/mmt-probe /* * dpdk_malloc.c * * Created on: Aug 23, 2018 * by: <NAME> */ #include <stdlib.h> #include <string.h> #include "dpdk_malloc.h"
import { Element } from '../../../../../client/element' export interface Props { value?: string } export default class _Text extends Element<any, Props> { private _text_el: Text constructor($props: Props) { super($props) let { value = '' } = $props const text_node = document.createTextNode(value)...
package pkg import ( "github.com/123shang60/zk" "k8s.io/klog/v2" "strings" "time" ) type ZooKeeper struct { *zk.Conn } type KerberosConfig struct { Keytab []byte Krb5 string PrincipalStr string } func AutoConnZk(quorum string, conf *KerberosConfig) (*ZooKeeper, error) { host := strings.Split(...
#!/bin/sh curl http://$DOCKER_HOST_IP:8083/customer
#!/bin/bash tag="" docker_run_mode="-it" IMAGE="lgsm-test" container="lgsm-test" run_image=(docker run) while [ $# -ge 1 ]; do key="$1" shift case "$key" in -h|--help) echo "[help][run] run.sh [option] [args]" echo "[help][run] " echo "[help][run] options:" ...
<reponame>oueya1479/OpenOLAT /** * <a href="http://www.openolat.org"> * OpenOLAT - Online Learning and Training</a><br> * <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 the ...
StartTest(function (t) { setTimeout(function () { var Grid = new Ext.grid.Panel({ width : 300, height : 200, renderTo : Ext.getBody(), columns : [ { text : 'foo', flex : 1 } ...