text
stringlengths
1
1.05M
#!/bin/bash : " This script waits for the creation of a stack for a given ticket id. IMPORTANT: It requires that you have active session via assume-role. If you don't, it will not give any error leaving you waiting for nothing. Note: For Team City, sleep first for about 5 minutes before triggering this script beca...
#!/bin/bash set -u # First check if the OS is Linux. if [[ "$(uname)" = "Linux" ]]; then HOMEBREW_ON_LINUX=1 fi # On macOS, this script installs to /usr/local only. # On Linux, it installs to /home/linuxbrew/.linuxbrew if you have sudo access # and ~/.linuxbrew otherwise. # To install elsewhere (which is unsupporte...
#!/bin/bash # Copyright 2015 The Kubernetes 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 appli...
package org.cloudfoundry.samples.music.config.data; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; import org.springframework.data.gemfire.config.annotation.EnableEntityDefinedRegions; import org.springframework.data.gemfire.repository.config.EnableG...
/** * Created by <NAME> on 11/8/15. */ /*globals define*/ /*jshint node:true, browser:true*/ define([ 'plugin/PluginConfig', 'plugin/PluginBase', 'jszip', 'xmljsonconverter' ], function ( PluginConfig, PluginBase, JSZip, Converter) { 'use strict'; /** * Initializes a ne...
package dbtest import ( "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestOpen(t *testing.T) { db := Open(t) session := db.Open() count := 0 err := session.Get(&count, `SELECT COUNT(*) FROM gorp_migrations`) require.NoError(t, err) assert.Greater(t, count, 0) }...
<reponame>opentaps/opentaps-1<filename>opentaps/opentaps-common/src/common/org/opentaps/common/domain/order/SalesOrderLookupRepository.java /* * Copyright (c) Open Source Strategies, Inc. * * Opentaps is free software: you can redistribute it and/or modify it * under the terms of the GNU Affero General Public Licen...
#!/bin/bash PID=`ps -eaf | grep "OvenSpace" | grep -v grep | awk '{print $2}'` if [[ "" != "$PID" ]]; then echo "killing $PID" sudo kill -9 $PID fi ./run.sh
//给你一份旅游线路图,该线路图中的旅行线路用数组 paths 表示,其中 paths[i] = [cityAi, cityBi] 表示该线路将会从 //cityAi 直接前往 cityBi 。请你找出这次旅行的终点站,即没有任何可以通往其他城市的线路的城市。 // // 题目数据保证线路图会形成一条不存在循环的线路,因此恰有一个旅行终点站。 // // // // 示例 1: // // //输入:paths = [["London","New York"],["New York","Lima"],["Lima","Sao Paulo"]] //输出:"Sao Paulo" //解释:从 "London" 出发,最后抵达终点站 "...
cm.setMessages('Com.AbstractFormField', { 'required' : 'Пожалуйста, заполните поле выше.', 'too_short' : 'Значение должно содержать минимум %count% символов.', 'too_long' : 'Значение не должно быть больше %count% символов.', '*' : '*' });
<filename>src/example-components/ElementsButtons/Buttons7/index.js import React from 'react'; import { Button } from '@material-ui/core'; export default function LivePreviewExample() { return ( <> <div className="d-flex align-items-center justify-content-center flex-wrap"> <Button variant="contain...
<reponame>ddallaire/Adaptone-app import Controller from '@ember/controller'; import {inject as service} from '@ember/service'; import {readOnly} from '@ember/object/computed'; export default Controller.extend({ connection: service('connection'), isConnected: readOnly('connection.isConnected') });
#!/bin/sh # createTeleporterPodest.sh # # Creates an 5x5 teleporter podest around the given position. # The acting component, the command_block has to be set seperatly! # (See subscript setCommand) # # Use setCommand at the very end of your script - sometimes the inbuild # command fires instantly, your player is...
#!/usr/bin/env bash bmk_home=${ALADDIN_HOME}/integration-test/with-cpu/test_multiple_invocations gem5_dir=${ALADDIN_HOME}/../.. ${gem5_dir}/build/X86/gem5.opt \ --debug-flags=HybridDatapath,Aladdin \ --outdir=${bmk_home}/outputs \ ${gem5_dir}/configs/aladdin/aladdin_se.py \ --num-cpus=1 \ --enable_prefetche...
<reponame>bentlyedyson/HEARTY-HEARTY """Simple script to read wfdb file and outputs it as json""" from wfdb import rdsamp from json import dumps from sys import argv, stdout file_dir = argv[1] stdout.write(dumps(rdsamp(file_dir)[0].T.tolist(), separators=(',', ':'))) stdout.flush()
#!/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...
<reponame>achintya-kumar/mq-consume-to-file package com.ultratendency; import com.ibm.mq.jms.JMSC; import com.ibm.mq.jms.MQConnectionFactory; import com.ibm.mq.jms.MQQueue; import org.apache.log4j.LogManager; import org.apache.log4j.Logger; import javax.jms.*; import javax.net.ssl.KeyManagerFactory; import javax.net....
<reponame>manoela-reis/pxt-calliope let item = pins.i2cReadNumber(123, NumberFormat.Int8LE) pins.i2cWriteNumber(123, 0, NumberFormat.Int8LE) let item = pins.i2cReadNumber(123, NumberFormat.Int8LE, true) pins.i2cWriteNumber(123, 0, NumberFormat.Int8LE, true)
<filename>go/comments_test.go<gh_stars>0 package swagger /* import ( "fmt" //my "github.com/simple-web-app/Server/go" "testing" ) func TestCreateComment(t *testing.T) { fmt.Println("Testing for creating comments...") test := []struct { name string }{ {name: "testcase1: "}, } for _, tt := range test { t...
<reponame>GuRuGuMaWaRu/CodeProblems<gh_stars>0 /* Determine whether the given string can be obtained by one concatenation of some string to itself. Example For inputString = "tandemtandem", the output should be isTandemRepeat(inputString) = true; For inputString = "qqq", the output should be isTandemRepeat(inputStrin...
#ifndef B2G_TIMER_H #define B2G_TIMER_H int timer_Init(long rate); #endif
<gh_stars>10-100 package io.opensphere.wfs.state.activate; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.awt.Color; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.commons.lang3.StringU...
package ch.raiffeisen.openbank.common.repository.model; import java.math.BigDecimal; import javax.persistence.Column; import javax.persistence.Embeddable; /** * This embeddable represents the fee value object. * * @author <NAME> */ @Embeddable public class Fee { @Column(name = "FEE", nullable = false) priv...
import Promise from 'bluebird'; import async from 'async'; import jwt from 'jsonwebtoken'; import moment from 'moment'; import { getUser } from './firebase-admin'; import settings from '../../config'; import { createClient } from './redisClient'; import api from './server'; let pubClient; let jwtCert; createClient().t...
#!/usr/bin/env bash # fail fast settings from https://dougrichardson.org/2018/08/03/fail-fast-bash-scripting.html set -eov pipefail ORIG_DIR="$(pwd)" cd "$(dirname "$0")" BIN_DIR="$(pwd)" trap "cd '${ORIG_DIR}'" EXIT # Check presence of environment variables TRAVIS_BUILD_NUMBER="${TRAVIS_BUILD_NUMBER:-0}" # obtain...
package io.github.vampirestudios.obsidian.minecraft.obsidian; import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.ArmorMaterial; import net.minecraft.recipe.Ingredient; import net.minecraft.sound.SoundEvent; import net.minecraft.util.registry.Registry; public record CustomArmorMaterial(io.github.vamp...
import sys def usage(): print("Usage: utility.py [options]") print("Options:") print(" --help, -h Display usage information and exit.") print(" --version, -v Display the version of the utility and exit.") print(" --action, -a Perform a specific action based on the provided argument.") ...
<gh_stars>1-10 import * as t from "io-ts"; import { optional } from "../../../../util/io-ts"; import { rpcUnsignedInteger } from "../base-types"; export const rpcForkConfig = optional( t.type( { jsonRpcUrl: t.string, blockNumber: optional(t.number), }, "RpcForkConfig" ) ); export type Rpc...
#!/bin/bash # # Copyright 2019 IBM Corp. 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 by applic...
<filename>app/src/main/java/com/acmvit/acm_app/ui/profile/ProfileViewModel.java package com.acmvit.acm_app.ui.profile; import android.app.Application; import androidx.lifecycle.LiveData; import androidx.lifecycle.MutableLiveData; import com.acmvit.acm_app.model.User; import com.acmvit.acm_app.model.UserData; import co...
def check_permission(user, action, user_permissions): if user in user_permissions: return action in user_permissions[user] return False # Example usage users = { "user1": ["read", "write"], "user2": ["read"], "user3": ["write"] } print(check_permission("user1", "read", users)) # Output: True pr...
<filename>src/main/java/seedu/address/model/util/SampleDataUtil.java package seedu.address.model.util; import java.time.DayOfWeek; import java.time.LocalTime; import java.time.format.DateTimeFormatter; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Optional; import java.util...
#!/usr/bin/env bash { echo ' - "-test.coverprofile=/workspace/data/e2e-profile.out"' echo ' - "__DEVEL__E2E"' echo ' - "-test.run=E2EMain"' echo ' - "-test.coverpkg=$(go list ./pkg/...| tr '"'"'\n'"'"' '"'"','"'"'| sed '"'"'s/,$//g'"'"')"' } > tmp_add.txt sed '/ ...
<filename>navigation/arena_local_planner/learning_based/arena_local_planner_drl/rl_agent/utils/reward.py import numpy as np from numpy.lib.utils import safe_eval import rospy from typing import Tuple class RewardCalculator(): def __init__(self, robot_radius: float, safe_dist:float, goal_radius:float, rule:str = 'r...
from time import time from tables.check.base import CheckBase from tables.models import SimpleTable class CheckUpdate(CheckBase): name = 'update' graph_title = 'Update' def check_rows(self, rows): m = SimpleTable.objects.create(name='testname') start_time = time() for i in range(...
/******************************************************************************* * 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 this source code. ****************************...
#!/usr/bin/env bash # Copyright 2020 Google LLC # # 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 a...
import requests import asyncio class ProjectManager: def create_project(self, project, body, **kwargs): """Create project with project name This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True """ async_re...
function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function(e) { document.getElementById('blah').setAttribute('src', e.target.result); }; reader.readAsDataURL(input.files[0]); } }
<gh_stars>100-1000 package example; import javax.persistence.AttributeConverter; import javax.persistence.Converter; import java.time.LocalDate; import java.time.MonthDay; import java.sql.Date; @Converter public class MonthDayDateAttributeConverter implements AttributeConverter<MonthDay, Date> { @Override pub...
def generate_squares(perimeter): squares = [] n = int(perimeter / 4) for i in range(2, n+1): for j in range(2, n+1): if i + j == n: squares.append((i,j)) return squares print(generate_squares(16)) # Prints [(2, 7), (3, 6), (4, 5)]
#!/bin/bash set -e globalTests+=( utc cve-2014--shellshock no-hard-coded-passwords override-cmd ) # for "explicit" images, only run tests that are explicitly specified for that image/variant explicitTests+=( [:onbuild]=1 [:nanoserver]=1 [:windowsservercore]=1 ) imageTests[:onbuild]+=' override-cmd ' testAlia...
#!/bin/bash if [ $# != 2 ]; then echo "USAGE: ./removesmalls.sh <fasta-file> <threshold>" exit fi filename=$1 threshold=$2 awk -v min="$threshold" 'BEGIN {RS = ">" ; ORS = ""} length($2) >= min {print ">"$0}' $filename
struct PuzzleSolver { moves: Vec<char>, } impl PuzzleSolver { fn new() -> PuzzleSolver { PuzzleSolver { moves: Vec::new() } } fn solve(&mut self, moves: &str) { self.moves = moves.chars().collect(); // Implement the puzzle-solving logic here (omitted for brevity) } fn ...
package alvi17.klooni1010.game; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.audio.Sound; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.math.Interpolation; import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.math.Rectangle; import com.badlogic.gdx.math.Vector2; import co...
import { Column, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn } from 'typeorm'; import { Tweeter } from '../twitter/tweeter'; import { DiscordChannelsEntity } from './discord-channels.entity'; @Entity('twitter-streamers') export class TwitterStreamersEntity { @PrimaryGeneratedColumn() id: number; @Colu...
import { action, Action } from 'easy-peasy'; export interface UserChapter { userId: string | null; setUserId: Action<UserChapter, string | null>; } export const userChapter: UserChapter = { userId: null, setUserId: action((state, payload) => { state.userId = payload; }) };
package com.netcracker.ncstore.config; import org.springframework.boot.web.servlet.ServletListenerRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.web.session.HttpSessionEventPublisher; @Configuration...
public int[,] CountSurroundingWalls(int[,] map) { int rows = map.GetLength(0); int cols = map.GetLength(1); int[,] wallCount = new int[rows, cols]; for (int i = 0; i < rows; i++) { for (int j = 0; j < cols; j++) { if (map[i, j] == 0) // Empty space tile { ...
#!/bin/sh # {# jinja-parse #} INSTALL_PREFIX={{INSTALL_PREFIX}} [ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1 OPTS_FILE=/var/run/udhcpc_$interface.opts set_classless_routes() { local max=128 local type while [ -n "$1" -a -n "$2" -a $max -gt 0 ]; do [ ${1##*/} -eq 32 ] && type=hos...
// This file is part of BenchExec, a framework for reliable benchmarking: // https://github.com/sosy-lab/benchexec // // SPDX-FileCopyrightText: 2019-2020 <NAME> <https://www.sosy-lab.org> // // SPDX-License-Identifier: Apache-2.0 import React from "react"; import { faTrash } from "@fortawesome/free-solid-svg-icons"; ...
/* ============================================================================== This file was auto-generated! It contains the basic framework code for a JUCE plugin processor. ============================================================================== */ #include "PluginProcessor.h" #include "Plugi...
<reponame>a1098832322/JWSysAssistant-2.0<filename>login/src/main/java/com/wishes/assistant/net/LibraryCrawler.java package com.wishes.assistant.net; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Handler; import android.os.Message; import android.util.Log; import com.wishes.a...
#ifndef ACCOUNT_H #define ACCOUNT_H #include <string> #include <vector> #include "date.h" using namespace std; class Loan; class AccountException : public exception { public: AccountException() : message{""} {} explicit AccountException(const string& msg) : message{msg} {} explicit AccountException(const...
#!/bin/sh python3 -m venv py_env && source py_env/bin/activate && pip3 install -r requirements.txt && deactivate && yarn
<gh_stars>1-10 package processor.misc.operands; /** * Created by lionell on 24.02.16. * * @author <NAME> */ public enum Operands { Address, Number }
export type Props = { children?: JSX.Element onClickHandler?: () => void href: string }
module Embulk module Parser class ActiveSupportParser attr_accessor :log_format attr_accessor :decoder attr_accessor :current_data_record # データを取り扱う箱 DataRecord = Struct.new(:pid, :message, :start_at, :end_at) DataItem = Struct.new(:severity_id, :timestamp, :pid, :severity, :m...
#!/bin/bash ######################################################################## # # Linux on Hyper-V and Azure Test Code, ver. 1.0.0 # Copyright (c) Microsoft Corporation # # All rights reserved. # Licensed under the Apache License, Version 2.0 (the ""License""); # you may not use this file except in compliance w...
<filename>frontend/src/routes/Deployer/DeployPage/DeployConsole/SignerManager/SignerManager.tsx import { UserOutlined, UserSwitchOutlined } from '@ant-design/icons'; import { useQuery } from '@apollo/client'; import { BeaconWallet } from '@taquito/beacon-wallet'; import { TezosToolkit } from '@taquito/taquito'; import ...
<filename>src/main/java/top/luozhou/classpath/impl/DirClassEntry.java package top.luozhou.classpath.impl; import top.luozhou.classpath.ClassEntry; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; /** * @description: 文件夹形式class入口 * @author: luozhou <EMAI...
import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; import { CrudService } from '@app/core'; import { Device } from '../entities'; import { OmitType } from '@nestjs/swagger'; import { ServiceName } from '../enums'; export class NewDevic...
import {Injectable} from '@angular/core'; import {HttpClient, HttpHeaders} from '@angular/common/http'; import {environment} from '../../environments/environment'; import {Connection} from '../util/connection'; import {Project} from '../db/entities/project'; import {Observable} from 'rxjs'; import {map} from 'rxjs/oper...
package nl.dulsoft.demo.schedulingjobs; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTes...
#!/bin/bash set_current() { current="$1" current_replacement=$(sed 's/[/&]/\\&/g' <<< "$1") sed -i "s/\(^current[^\"]*\"\)[^\"]*/\1$current_replacement/" $0 } back() { [[ $current =~ / ]] && current="${current%/*}" || current='' set_current "$current" } notify_on_finish() { while kill -0 $pid 2> /dev/null; do ...
import 'directives/queryBuilder/queryBuilder.directive'; declare var CPALS: any; declare var autosize: any; declare var document: any; let moduleName = CPALS.modules.directives.MAIN, directiveName = 'queryBuilder', tpl = require('directives/queryBuilder/queryBuilder.html'); describe(moduleName + ...
TERMUX_PKG_HOMEPAGE=https://xorg.freedesktop.org/ TERMUX_PKG_DESCRIPTION="X.org 75dpi fonts" TERMUX_PKG_LICENSE="MIT" TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>" TERMUX_PKG_VERSION=1.0.3 TERMUX_PKG_REVISION=24 TERMUX_PKG_SRCURL=("https://xorg.freedesktop.org/releases/individual/font/font-adobe-7...
import sklearn import numpy as np # load the classifier clf = sklearn.svm.SVC() # load the pre-trained classifier with open('classifier.pkl', 'rb') as f: clf = pickle.load(f) def classify_text(texts): # compile the inputs into a single array data = np.array(texts) # predict the labels labels...
<reponame>Kristopher38/LuaCPU /****************************************************************************** * * * License Agreement * * ...
import java.util.*; public class APISessionManager { private Logger logger; private Set<APISession> sessions; private Map<String, List<APISession>> chatTakers; private Map<String, List<APISession>> snitchTakers; public APISessionManager() { logger = new Logger(); // Initialize the logger ...
<reponame>mohamedkhairy/dhis2-android-sdk /* * Copyright (c) 2004-2021, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain t...
import * as React from 'react'; import * as ReactDOM from 'react-dom'; import block from 'bem-cn'; import { bind } from 'decko'; import './Menu.scss'; type EntryContent = JSX.Element | string; interface IEntry { content: EntryContent; onClick(): void; } interface IDisabledEntry { content: EntryContent; rend...
import json def read_and_write_config(config: dict) -> int: modified_config = {int(k): v for k, v in config.items()} with open("config.json", 'w') as f: json.dump(modified_config, f) return len(modified_config)
#include<iostream> #include<stack> #include<string> using namespace std; int evaluateExpression(string expression) { // Stack to store operands stack <int> st; // Stack to store operators stack <char> opst; // Iterate over the expression for (int i=0; i<expression.length(); ) { // Ch...
package com.blog.board.service; import java.util.List; import java.util.Map; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.blog.board.dao.MemberDAO; import com.blog.board.domain.MemberVO; @Service("MemberService") public class MemberServiceImpl implements MemberServic...
<reponame>rav3r/flutter // // Copyright 2016 Google 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 app...
import pprint import os.path import json import time import ipdb all_cities_raw = None with open(os.path.join("datasource", "all_cities_full.json"), "r") as f: all_cities_raw = list(map(lambda x: json.loads(x), f.readlines())) # -------------------------------------------------- # Find cities with best matches to...
SELECT name, age FROM employees WHERE salary > 5000;
<gh_stars>0 import defineDependentFunctions from './internal/react/defineDependentFunctions.js'; import defineStandardComponent from './api/defineStandardComponent.js'; import defineAdvancedComponent from './api/defineAdvancedComponent.js'; import hyperscript from './api/hyperscript.js'; import Component from './api/Co...
#!/usr/bin/env bash # exit immediately when a command fails set -e # only exit with zero if all commands of the pipeline exit successfully set -o pipefail # error on unset variables set -u [ "$#" -eq 1 ] || echo "One argument required, $# provided." REF_CURRENT="$(git rev-parse --abbrev-ref HEAD)" REF_TO_COMPARE=$1 ...
<reponame>smagill/opensphere-desktop package io.opensphere.core; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.Enumeration; import java.util.List; import javax.xml.XMLConstants; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import ja...
<reponame>muthukumaravel7/armnn var _serializer_8cpp = [ [ "GetFlatBufferActivationFunction", "_serializer_8cpp.xhtml#aac3bf4453f8a909ca23f290089df8ff1", null ], [ "GetFlatBufferArgMinMaxFunction", "_serializer_8cpp.xhtml#a6fcb1eefde815b0b7465a689c8d26b50", null ] ];
const expect = require('expect.js'); const $ = require('../scripts/utils.js'); // for existy expect($.existy(null)).to.be(false); expect($.existy(undefined)).to.be(false); expect($.existy(false)).to.be(true); expect($.existy({})).to.be(true); expect($.existy([])).to.be(true); expect($.existy(0)).to.be(true); // for...
package baubles.api; public enum BaubleType { RING, AMULET, BELT }
<reponame>MissionBit/missionbit.org<gh_stars>1-10 import * as React from "react"; import { SvgIconProps } from "@material-ui/core/SvgIcon"; import { createSvgIcon } from "@material-ui/core"; const Windows = createSvgIcon( <path d="M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V26...
#!/usr/bin/env bash realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" } APP_HOME=$(dirname "$(realpath "$0")") APP_PID=$(<"$APP_HOME/app.pid") if ps -p $APP_PID > /dev/null then echo "Failed to start, service already started!" exit 1 fi nohup java -jar -Dfile.ecoding=UTF-8 -Xmx512M "$APP_HO...
package com.uumind.log4j.appender.redis; import org.apache.log4j.Logger; public class RedisAppenderTest { private final static Logger log = Logger.getLogger(RedisAppenderTest.class); public static void main(String[] args) throws Exception { for(int i=0;i<10000;i++) { log.info("Log Test"); } System.out...
<reponame>Ian3110/stock-diary-lab-stock-diary-server<gh_stars>0 const axios = require('axios'); const cheerio = require('cheerio'); /* const getHtml = async () => { try { return await axios.get( 'https://finance.naver.com/sise/sise_index.naver?code=KOSPI', ); } catch (error) { console.error(error)...
#!/usr/bin/env bash echo "Running pre-push hook" ./scripts/run-brakeman.bash ./scripts/run-tests.bash # $? stores exit value of the last command if [ $? -ne 0 ]; then echo "Brakeman and Tests must pass before pushing!" exit 1 fi
package com.company.project.common.result; import cn.hutool.core.util.StrUtil; import com.company.project.common.exception.BusinessException; import com.company.project.common.util.RequestContextHolderUtil; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; im...
<reponame>stephenhu/nbad package main import ( "encoding/json" //"fmt" //"log" "net/http" "github.com/gorilla/mux" "github.com/stephenhu/stats" ) func liveApiHandler(w http.ResponseWriter, r *http.Request) { switch r.Method { case http.MethodPut: case http.MethodGet: d := stats.RedisLastGame() if d...
#!/usr/bin/env bash # Copyright 2020 Amazon.com Inc. or its affiliates. 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....
def powers_of_two(n): list_power = [] for i in range(n + 1): list_power.append(2 ** i) return list_power
<gh_stars>1-10 import { ExternalProxyConfigObject } from '../external-proxy-config'; export abstract class AbstractContext { public externalProxy: ExternalProxyConfigObject | undefined | null; protected status_startTime: number | undefined; protected status_endTime: number | undefined; public markStart(): v...
<reponame>alexis35115/graphical-dice-microbit def calibrate(): """Starts the calibration process. An instructive message will be scrolled to the user after which they will need to rotate the device in order to draw a circle on the LED display.""" def is_calibrated(): """Returns True if the compass has been suc...
require("@nomiclabs/hardhat-waffle"); require("@nomiclabs/hardhat-etherscan"); require('dotenv').config(); // This is a sample Hardhat task. To learn how to create your own go to // https://hardhat.org/guides/create-task.html task("accounts", "Prints the list of accounts", async (taskArgs, hre) => { const accounts =...
import React from "react"; import { bazel_config } from "../../proto/bazel_config_ts_proto"; import authService from "../auth/auth_service"; import capabilities from "../capabilities/capabilities"; import rpcService from "../service/rpc_service"; import SetupCodeComponent from "./setup_code"; interface Props {} inter...
<reponame>seratch/junithelper /* * Copyright 2009-2010 junithelper.org. * * 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...
<reponame>Ashindustry007/competitive-programming // https://www.aceptaelreto.com/problem/statement.php?id=442 #include<bits/stdc++.h> using namespace std; int main() { for (;;) { string a, b, s, r; getline(cin, s); if (s.empty()) break; stringstream in(s); in >> a >> b; vector<string> w; i...
#!/bin/sh checkside() { echo "scale=400;ibase=16;bs=$2;ibase=A;pow=$3;dpow=$1;estimate(dpow,bs,pow);" | bc -l analyze.bc } i=0 while read -r decpower base power; do i=$(($i+1)) # echo "decpower: $decpower" # echo "base: $base" # echo "power: $power" # echo $(($i%4)) checkside $decpower $base $power if [ $(($i%4))...