text
stringlengths
1
1.05M
<filename>src/components/uielements/confirmIcon/confirmIcon.js<gh_stars>10-100 import React, { Component } from 'react'; import { CheckOutlined } from '@ant-design/icons'; import { IconWrapper } from './confirmIcon.style'; class ConfirmIcon extends Component { render() { // eslint-disable-next-line react/prop-...
<reponame>youaxa/ara-poc-open<gh_stars>0 package com.decathlon.ara.configuration; import java.util.concurrent.Executor; import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.AsyncConfigurer...
<filename>src/components/AdminPanel/ChangeApiKey.js import React, { useEffect, useState, useRef } from "react"; import axios from "axios"; import Dialog from "@material-ui/core/Dialog"; export default function ChangeApiKey(ac) { const [inputApiKey, setinputApiKey] = useState([]); const [loadingButton, setloadingB...
<reponame>reflexology/client-V2 import React, { useEffect, useState } from 'react'; import ReactInputMask from 'react-input-mask'; import { Alert, Button, Form, Input, InputNumber, Radio, Row, Select, Space, Typography } from 'antd'; import Dictionary from 'dictionary/dictionary'; import CommonService from 'services/c...
<reponame>bizmaercq/eda-reporting<gh_stars>0 SELECT * FROM detb_batch_master b where b.last_oper_id ='LTAH' and b.batch_no ='9839' FOR UPDATE NOWAIT; select * from detb_upload_detail w where w.batch_no = '9839' and w.branch_code='050' FOR UPDATE NOWAIT; select * from detb_upload_master d where d.batch_no = '9...
/*! * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * Unless required ...
import React from 'react'; import './About.css'; import logo from './logo.png'; export default () => { return ( <div className = "about"> <img src={logo} alt="logo" /> <h3>A Finite loop product.</h3> </div> ) }
#!/usr/bin/ruby require 'csv' results = CSV.open(ARGV[1], 'w') do |csv| csv << ['Id', 'Expected'] File.open(ARGV[0], 'r') do |file_handle| index = 1 file_handle.each_line do |line| csv << ["test_#{index}.jpg", line.to_f.round(2)] index += 1 end end end
#!/bin/sh # CYBERWATCH SAS - 2017 # # Security fix for USN-2447-1 # # Security announcement date: 2014-12-12 00:00:00 UTC # Script generation date: 2017-01-01 21:04:09 UTC # # Operating System: Ubuntu 14.04 LTS # Architecture: i686 # # Vulnerable packages fix on version: # - linux-image-3.16.0-28-lowlatency:3.16....
<reponame>DiegoVictor/gorestaurant-web import faker from 'faker'; import factory from 'factory-girl'; factory.define( 'Food', {}, { id: faker.random.number, name: faker.name.title, description: faker.lorem.paragraph, price: () => String(faker.finance.amount()), available: true, image: fak...
function compareObjects(obj1, obj2){ var differences = []; // iterate through properties of the first object for (var k in obj1){ // if there is no same property in the second object if (!(k in obj2)){ differences.push(k); } else if (obj1[k] != obj2[k]){ // check for inequality of the property value ...
#! /bin/sh # 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 m...
<filename>gui/ui/mainwindow.cpp #include "mainwindow.h" #include "ui_mainwindow.h" #include <QDesktopWidget> #include <QScreen> #include <QFileDialog> #include <QInputDialog> #include <QMessageBox> #include <QDebug> #include <fstreemodel.h> #include "languagetablewindow.h" #include "modeleditwindow.h" using mcrtlib:...
function rm_hacktool { docker rm -f "dsp_hacktool_$1" } rm_hacktool netcat rm_hacktool scapy rm_hacktool wireshark rm_hacktool masscan rm_hacktool nmap rm_hacktool python rm_hacktool sqlmap rm_hacktool nikto rm_hacktool arachni rm_hacktool firefox
export default { root : { backgroundColor : 'white', border : '1px solid black', borderRadius : '5px', padding : '0.5rem', position : 'relative', overflow : 'hidden', cursor : 'pointer', '&:hover svg' : { opacity : 1 } }, ...
/* mintop Copyright (c) 2021 <NAME>. All rights reserved. Licensed under the MIT License. See LICENSE file in the project root for full license information. */ package main import ( "fmt" "log" "math" "time" "github.com/distatus/battery" ui "github.com/gizak/termui/v3" "github.com/gizak/termui/v3/wid...
#!/bin/bash keys_file="keys.json" if [[ $(< "$keys_file") = "{}" ]]; then echo "no keys to unpack" exit fi echo "unpacking $keys_file" # extract the keys from .user.json for keyname in $(jq -S -r 'keys[]' "$keys_file"); do echo "unpacking: $keyname" user=$(jq -r ".\"$keyname\".\"user\"" < "$keys_file") gr...
package models; import java.util.ArrayList; import java.util.Date; import java.util.List; import com.avaje.ebean.Page; import play.data.format.Formats; import play.data.validation.Constraints; import controllers.Products; import java.util.LinkedList; // can de dung linkedlist import play.mvc.PathBindable; //impo...
<reponame>Eugenia-d/goit-js-hw-06<gh_stars>0 const ingredients = [ "Potatoes", "Mushrooms", "Garlic", "Tomatos", "Herbs", "Condiments", ]; const ulEl = document.getElementById("ingredients"); const elements = ingredients.map((ingredient) => { const ingredientsEl = document.createElement("li"); ingredi...
<gh_stars>0 import { Model } from "./Model"; import { IDictionary } from "common-types"; // tslint:disable-next-line:no-implicit-dependencies import { RealTimeDB } from "abstracted-firebase"; import { Record } from "./Record"; import { IFmModelPropertyMeta } from "./decorators"; import { fbKey } from "./index"; import ...
#!/bin/bash if [ "$1" == "-h" ]; then echo "Usage: ./script [-h] subnet filename repeat_minutes [somestuff]" exit 0 fi funk () { nh="$( nmap -sn $1 | grep -c 'up' )" nh=$(($nh -1)) echo -n `date` >> "$2.csv" echo -n "," >> "$2.csv" echo -n $2 >> "$2.csv" echo -n "," >> "$2.csv" echo -n $1 >> "$2.csv" echo -n ","...
<gh_stars>0 export default class Sliders { constructor(instance) { this.inst = instance; if (typeof this.inst !== 'function') { throw new Error('There is a problem with slider instance. Are you sure Swiper installed?'); } } make(sliders) { this.sliders = sliders; this.sliders.forEach(slider => { ...
<reponame>ksmit799/POTCO-PS # File: S (Python 2.4) from SCTerminal import SCTerminalSelectedEvent from SCTerminal import SCTerminalLinkedEmoteEvent from SCStaticTextTerminal import SCStaticTextMsgEvent from SCGMTextTerminal import SCGMTextMsgEvent from SCCustomTerminal import SCCustomMsgEvent from SCEmoteTerminal impo...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.u1F48A = void 0; var u1F48A = { "viewBox": "0 0 2600 2760.837", "children": [{ "name": "path", "attribs": { "d": "M2360.5 1191.5Q2313 1311 2218 1406l-532 531q-21 22-45 29.5t-46 7.5l-362 362q-87 87-198 132.5T801 251...
#!/bin/bash -e IMAGE="xeon-ubuntu1804-media-gst" VERSION="1.1" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../../script/build.sh"
<filename>lib/neo4j/driver/types/offset_time.rb # frozen_string_literal: true module Neo4j module Driver module Types class OffsetTime < Time class << self FIELDS = %i[hour min sec nsec utc_offset].freeze def significant_fields FIELDS end end ...
<filename>frontend/admin/src/store/modules/district.js /* * @Author: @vedatbozkurt * @Date: 2020-06-27 20:29:22 * @Last Modified by: @vedatbozkurt * @Last Modified time: 2020-07-09 15:15:32 */ import axios from "axios"; const namespaced= true; const state = { citiesDistrictsData: [], cityDistrictsDa...
package br.com.controle.financeiro.controller.api.linkbuilder; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.util.UUID; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import or...
/* Copyright 2017 <NAME> * * 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 writin...
// import React from "react"; // // import Layout from "../../components/layout"; // // import Hero from "../../components/home/hero"; // // import Search from "../../components/home/search"; // // import FeaturedPosts from "../../components/home/feature-posts"; // // import LatestPosts from '../../components/home/late...
import sys if sys.version_info.major >= 3: from collections import UserDict class CustomDict(UserDict, dict): pass else: import UserDict as _UserDict class CustomDict(_UserDict.DictMixin, dict): pass
import * as React from 'react'; import styles from '@patternfly/react-styles/css/components/MultipleFileUpload/multiple-file-upload'; import { css } from '@patternfly/react-styles'; import { MultipleFileUploadTitleIcon } from './MultipleFileUploadTitleIcon'; import { MultipleFileUploadTitleText } from './MultipleFileUp...
package weather_repo import "fmt" type Record struct { ID int64 DateStr string Location LocationRecord HourlyTemperature []float64 } type LocationRecord struct { Lat float64 Lon float64 City string State string } type QueryFilter struct { Date string } type ErrorDupl...
curl "https://api.m3o.com/v1/forex/History" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $M3O_API_TOKEN" \ -d '{ "symbol": "GBPUSD" }'
<gh_stars>0 const path = require('path'); const _ = require('lodash'); const util = require('./util'); class TestRecord { constructor(dwtPath, config = {}) { // DWT(DevOps for Web Test) 目录,流水线式执行web自动化测试和输出测试产物的路径,如果插件传入了相对路径,则是相对于该路径而言 this.dwtPath = util.getAbsolutePath(dwtPath); // 测试产物...
package main import ( "fmt" "strconv" ) func main() { var x int = 5 str := "Hello world " + strconv.Itoa(x) // int to ascii fmt.Println(str) } /* [Running] go run "c:\Users\li-370\ForkGitW\LearnGolang\GolangTraining-master\27_code-in-process\26_playing-with-type\00_types\03_strconv\01_itoa\main.go" Hello world ...
from docopt import docopt import schema args = docopt(__doc__) # Define the schema for command-line arguments arg_schema = schema.Schema({ '--algos': schema.And(list, [lambda n: n in ['BFS', 'parallel_coloring']]), '--help': bool, '--has-GRU': bool, '--num-seeds': schema.Use(int), '--num-nodes': s...
/* * @author <NAME> * @description - Validation functions for forms */ /* * @module moment * @usage - Uses moment for date of birth validation */ import moment from 'moment' /** * REMOVE_SPACES * @description Removes spaces * @type {RegExp} */ const REMOVE_SPACES = /\s/g /** * Positive lookahead assertio...
# create a function to calculate median def median(data): # sort the list data.sort() #get the length of the list n= len(data) # check if the length is odd or even if n%2 != 0: #if odd, return the middle element return data[int(n/2)] else: #if even, return the average of two middle elements return (dat...
package brainFuckInterpreter.ast.visitor; import brainFuckInterpreter.ast.*; public interface AstNodeVisitor<T> { void visit(Ast ast, T state); void visit(AstIncrementCellStatement incrementCellStatement, T state); void visit(AstDecrementCellStatement decrementCellStatement, T state); void visit(As...
#!/bin/bash #判断shell环境 if [ "$SHELL" == "/bin/zsh" ]; then #添加命令补全 COMP_FILE="$HOME/ztool/$1/$2" ZSH_VERSION=$(zsh --version | cut -d " " -f2) TARGET_FILE="/usr/local/share/zsh/site-functions/$2" if [ "$(md5 $COMP_FILE | cut -d "=" -f2)" != "$(md5 $TARGET_FILE | cut -d "=" -f2)" ]; then sudo cp "$COMP_FILE" "$...
package com.example.android.sunshine.sync; import android.content.ContentResolver; import android.content.ContentValues; import android.content.Context; import android.net.Network; import com.example.android.sunshine.data.WeatherContract; import com.example.android.sunshine.utilities.NetworkUtils; import com.example....
from django.db import models class User(models.Model): name = models.CharField(max_length=40) email = models.EmailField(max_length=255, unique=True) password = models.CharField(max_length=128) class Address(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) street = models.Ch...
const retry = require("async-retry"); const sleep = require("sleep-promise"); const albertsonsAuth = require("./auth"); module.exports = async function albertsonsFetch(callback) { return retry( async () => { let response; try { response = await callback(); } catch (err) { consol...
<gh_stars>0 package com.solvd.carfactory.services; import com.solvd.carfactory.models.client.Client; public interface IClientService { Client getClientById(long id); }
#!/bin/bash usage="$(basename "$0") [-h] [-d dir] -- program to install the koinos contract development toolkit where: -h show this help text -d the installation directory" while getopts ':d:h' flag do case "${flag}" in h) echo "$usage" exit ;; d) install_dir=${OPTARG};; ...
#--variantCount=2 explain=( '*** Wrong output schema at port 0 ***' '*** Wrong output schema at error port 1 ***' ) PREPS=( 'echo "${explain[$TTRO_variantCase]}"' 'copyAndMorphSpl' ) STEPS=( "splCompile" 'executeLogAndError output/bin/standalone -t 2' 'linewisePatternMatchInterceptAndSuccess "$TT_evaluationFi...
<filename>src/lib/plane.ts import { Geometry, Point, shapetypesSettings, Transform, Vector } from '../index'; /** * A 2d frame with a center point ([[origin]]) and two perpendicular axes ([[xAxis]] and [[yAxis]]). * The axes are always right-handed. * * ### Example * ```js * import { Plane, Point, Vect...
#!/bin/sh . ../.function rm -f out/userver_tcp.out err/userver_tcp.err \ web_socket_proxy.log web_server_echo.log tmp/UWebSocketPlugIn.err \ trace.*userver_tcp*.[0-9]* object.*userver_tcp*.[0-9]* stack.*userver_tcp*.[0-9]* UTRACE="0 10M 0" #UOBJDUMP="0 1M 10" #USIMERR="error.sim" export UTRACE UOBJDUMP USIMERR...
#!/bin/sh -eux PREFIX=`opam config var prefix` PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig" export PKG_CONFIG_PATH # WARNING: if you pass invalid cflags here, zarith will silently # fall back to compiling with the default flags instead! CFLAGS="$(pkg-config --cflags gmp-freestanding ocaml-freestanding)" \ LDFLAGS="$(pkg-c...
<filename>functional_tests/tests/constant.js const selectors = taiko => { return { languageDropdown: taiko.dropDown({ id: 'languageDropDown' }), asrLink: taiko.button('TTS Initiative', taiko.below(taiko.dropDown({ id: 'languageDropDown' }))), asrActiveLink: taiko.button('TTS Initiative', { class: ...
#!/bin/bash set -o pipefail function finish { sync_unlock.sh } if [ -z "$TRAP" ] then sync_lock.sh || exit -1 trap finish EXIT export TRAP=1 fi > errors.txt > run.log GHA2DB_PROJECT=spire PG_DB=spire GHA2DB_LOCAL=1 structure 2>>errors.txt | tee -a run.log || exit 1 ./devel/db.sh psql spire -c "create extensio...
<filename>gearman-common/src/main/java/net/johnewart/gearman/net/codec/EncoderTest.java package net.johnewart.gearman.net.codec; import net.johnewart.gearman.common.packets.Packet; import net.johnewart.gearman.common.packets.request.EchoRequest; import org.junit.Test; import java.util.Arrays; import static junit.fra...
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2018...
<gh_stars>0 import VowelKeyTypePage from "./VowelKeyTypePage"; export default VowelKeyTypePage;
<filename>GeometryApp/Geometrical figures/Area/Rectangle/script.js function perimeter (l, w) { var p = l*w; return p; }
#!/bin/sh # # Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC") # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVID...
/* $Id$ */ /*************************************************************************** * (C) Copyright 2003-2010 - Stendhal * *************************************************************************** *************************************************************************** ...
if [[ "$(command -v sudo)" == "" ]]; then _sudo="" else _sudo="sudo" fi install_grpc() { INSTALL_DIR=/usr ${_sudo} apt-get install -y build-essential autoconf libtool pkg-config cmake git clone --recurse-submodules -b "$(curl -L https://grpc.io/release)" https://github.com/grpc/grpc INITIAL_DIR=$(pwd) cd...
import useSWR from "swr" import repackData from "./repack-data" const fetcher = (url) => fetch(url).then(r => r.json()) function useData (url) { const { data, error } = useSWR(url, fetcher) return { data: repackData(data), isLoading: !error && !data, isError: error } } export default useData
import SendInBlueFolderDetailVO from './SendInBlueFolderDetailVO'; export default class SendInBlueFoldersVO { public count: number; public folders: SendInBlueFolderDetailVO[]; }
<filename>dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/importobject/ImportObjectServiceTest.java package org.hisp.dhis.importexport.importobject; /* * Copyright (c) 2004-2012, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms,...
/* - Coeus web framework ------------------------- * * Licensed under the Apache License, Version 2.0. * * Author: <NAME> */ package com.tzavellas.coeus package mvc import org.junit.Test import org.junit.Assert._ import org.springframework.mock.web.MockHttpServletResponse import test.Assertions.assertThrows impor...
# ----------------------------------------------------------------------------- # # Package : v8-to-istanbul # Version : 4.1.4 # Source repo : https://github.com/istanbuljs/v8-to-istanbul # Tested on : RHEL 8.3 # Script License: Apache License, Version 2 or later # Maintainer : BulkPackageSearch Automation <sethp@us.ib...
#!/bin/bash #for val in {100..129} for val in {2..3} 12 19 {23..28} 30 32 34 37 {61..62} {84..87} {90..93} 95 {97..98} {105..106} 108 do scp /whale/jars/basic/storm-client-2.0.0-SNAPSHOT.jar node$val:/whale/storm/apache-storm-2.0.0-SNAPSHOT/lib scp /whale/jars/basic/storm-client-2.0.0-SNAPSHOT.jar node$val:/whale/sto...
mvn package -Dmaven.test.skip=true docker build -t louyi-admin:latest .
<reponame>PioTech6719/RelicRecovery1718 package org.firstinspires.ftc.teamcode.hardware.controllers; import android.support.annotation.NonNull; import com.qualcomm.robotcore.hardware.ServoController; import org.firstinspires.ftc.teamcode.hardware.RobotHardwareDevice; import org.firstinspires.ftc.teamcode.hardware.de...
package media import ( "fmt" // "github.com/ungerik/go-start/debug" "github.com/ungerik/go-start/model" "github.com/ungerik/go-start/view" ) type BlobRefController struct { view.SetModelValueControllerBase } func (self BlobRefController) Supports(metaData *model.MetaData, form *view.Form) bool { _, ok := meta...
#!/bin/sh set -e set -u set -o pipefail function on_error { echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" } trap 'on_error $LINENO' ERR if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy # frameworks to, so exit 0 (signalling the...
class CocktailMenu: def __init__(self): self.menu = [] def add_cocktail(self, name, ingredients, recipe): cocktail = {"name": name, "ingredients": ingredients, "recipe": recipe} self.menu.append(cocktail) def get_cocktails(self): return self.menu def find_cocktail_by_i...
<filename>common-extend-utils/common-office/src/main/java/com/atjl/office/util/ExcelCommonUtil.java<gh_stars>0 package com.atjl.office.util; import com.atjl.util.character.StringCheckUtil; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermo...
def _multiple_choice_postprocessing(self, outputs, y_true, metadata): num_choices = metadata['task_metadata']['num_choices'] # Determine the number of choices metadata['labels'] = [str(i) for i in range(num_choices)] # Create a list of labels from 0 to num_choices - 1 y_true = self.convert_strings_to_labe...
# Program Number: 12 # Student Name: Aman; Register Number: IMT2018006 # Date:12th Jan 2020 # Description: This program will implement cp command using file system # related system calls. #!/bin/bash read var case $var in IIT) echo "NIT" ;; NIT) echo "IIT" ;; *) echo ...
<filename>homeassistant/components/environment_canada/__init__.py<gh_stars>0 """The Environment Canada (EC) component.""" from datetime import timedelta import logging import xml.etree.ElementTree as et from env_canada import ECAirQuality, ECRadar, ECWeather, ec_exc from homeassistant.config_entries import ConfigEntr...
package gov.cms.bfd.pipeline.rda.grpc.source; import com.google.common.collect.ImmutableSet; import com.google.protobuf.ProtocolMessageEnum; import gov.cms.mpsm.rda.v1.EnumOptions; import java.util.Set; import java.util.function.Function; import java.util.function.Predicate; import javax.annotation.Nullable; import lo...
package org.jooby.test; import static com.google.common.base.Preconditions.checkState; import java.io.IOException; import org.apache.http.client.utils.URIBuilder; import org.jooby.Jooby; import org.junit.Before; import org.junit.Rule; import org.junit.runner.RunWith; import com.google.common.base.Joiner; /** * In...
const Field = require('../Field'); module.exports = class EditableDiv extends Field { constructor(options) { super(options); } get value() { return this.input.textContent; } set value(value) { this.input.innerHTML = value; } reset() { this.input.innerHTML = this.standardValue || ''; } sta...
<reponame>Usarneme/gatsby-portfolio<gh_stars>0 import React from "react" function Journey() { return ( <section className="container nine journey"> <h2>Software Developer Journey</h2> <div className="card beginner"> <h4>Early Learning and Application</h4> <ul> <li>Hello Worl...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Entity = exports.DB = void 0; var DB = require("./DB"); exports.DB = DB; var Entity = require("./Entity"); exports.Entity = Entity;
import cirq def validate_circuit(device, circuit): """Validate the given Cirq circuit for the specified quantum device.""" # Check if the operations in the circuit are supported by the quantum device for moment in circuit: for op in moment.operations: if not device.is_supported_operatio...
<filename>cmd_inventory.go package main // import ( "bytes" "flag" "fmt" "text/template" "github.com/mitchellh/cli" ) // Implement the "inventory" command type CmdInventory struct { CmdDefault List bool Host string } func CmdInventoryFactory(ui cli.Ui) func() (cli.Command, error) { return func() (cli.Comm...
<filename>src/main/java/evilcraft/entities/tileentities/tickaction/bloodinfuser/ItemBucketTickAction.java package evilcraft.entities.tileentities.tickaction.bloodinfuser; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftfo...
<filename>wrk2-cmd/script/src/index.ts import { Argv, Wrk2Cmd } from './wrk2cmd'; // Parse arguments. const argv = new Argv(process.argv); // Run command. const cmd = new Wrk2Cmd(argv); cmd.run().catch((error: Error) => { console.error(error); });
<filename>src/main/java/com/github/shaquu/networking/tcp/TCPCLient.java package com.github.shaquu.networking.tcp; import com.github.shaquu.networking.IpPort; import com.github.shaquu.networking.NetworkNode; import com.github.shaquu.networking.packets.Packet; import com.github.shaquu.networking.packets.PushFilePartsPac...
#!/bin/bash IP=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}') xhost + $IP docker run --read-only -it --rm -e DISPLAY=$IP:0 -v /tmp/.X11-unix:/tmp/.X11-unix rhancock/burc-lite /bin/bash xhost - $IP
""" Calculates the payment of a loan given the principal, the interest rate, and the number of years for repayment """ def calculateLoanPayment(principal, rate, years): #calculate monthly rate rate = rate/100/12 #calculate payment payment = principal * ((rate * (1 + rate)**(12 * years)) / ((1 + rate)...
<filename>src/integrationtest/remote.ts import * as assert from "assert"; import * as Rx from "rxjs/Rx"; import { IRecipe } from "../recipe"; import { transformRecipe as transformGW2Efficiency } from "../remoteparsers/gw2efficiency"; import { transformRecipe as transformGW2Profits } from "../remoteparsers/gw2profits"; ...
#!/usr/bin/env bash # # Mount an OSS bucket with OSSFS. # # Required global variables: # - ALICLOUD_ACCESS_KEY # - ALICLOUD_SECRET_KEY # - GITLAB_BUCKET_NAME # - GITLAB_BUCKET_ENDPOINT # - BUCKET_LOCAL_PATH # echo "Mounting the OSS bucket ${GITLAB_BUCKET_NAME} (endpoint ${GITLAB_BUCKET_ENDPOINT}) into ${BUCK...
import numpy as np import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.model_selection import train_test_split from sklearn.svm import LinearSVC data = pd.read_csv('articles.csv') X = data['Text'] y = data['Category'] vectorizer = TfidfVectorizer() X_vec = vectorizer.fit_tr...
var lex = require('pug-lexer') var parse = require('pug-parser') var linker = require('pug-linker') var load = require('pug-load') var fs = require('fs') function buildAst (filename, basedir, options) { if (filename.substr(-4) !== '.pug') { filename = filename + '.pug'; } var buf = fs.readFileSync(filename, ...
#!/usr/bin/env bash base_url = "https://github.com/limebrains/sufler/archive/master.zip" if [ -z "$install_dir" ]; then install_dir="${HOME}" else if [ "${install_dir:0:1}" == "~" ]; then install_dir="${HOME}${install_dir:1}" fi if [ "${install_dir: -1}" == "/" ]; then install_dir="${i...
package com.bn.box2d.sndls; import static com.bn.box2d.sndls.Constant.*; import static com.bn.box2d.sndls.MainMenuDrawThread.*; import java.util.ArrayList; import java.util.List; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; i...
package com.atjl.util.thread.domain; public class ThreadStatus { private String id; private String state; private Long startTs; public Long getStartTs() { return startTs; } public void setStartTs(Long startTs) { this.startTs = startTs; } publi...
def findMidElementLL(head): slow = head fast = head while fast is not None and fast.next is not None: slow = slow.next fast = fast.next.next return slow ll = LinkedList(2) ll.next = LinkedList(3) ll.next.next = LinkedList(1) ll.next.next.next = LinkedList(4) print(findMidElementLL(l...
<reponame>EastsidePreparatorySchool/Ephemera<gh_stars>1-10 package org.eastsideprep.spacecritters.gamelogic; import org.eastsideprep.spacecritters.alieninterfaces.IntegerPosition; import org.eastsideprep.spacecritters.alieninterfaces.Position; import static org.eastsideprep.spacecritters.gamelogic.GridDisk.disk; impor...
class TreeNode: def __init__(self, value=0, left=None, right=None): self.value = value self.left = left self.right = right def zigzagLevelOrder(root): if not root: return [] result = [] queue = [root] level = 0 while queue: level_nodes = [] next...
#!/bin/bash failed="0" for d in $(ls $WORKDIR) ; do pushd ${WORKDIR}/${d} echo bundle exec rake test echo if [ "$?" != "0" ] ; then failed="1" fi popd done exit $failed
mpirun -np 2 python -m ytopt.search.ppo_a3c --prob_path=/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/test/../problems//powell_cat/problem.py --exp_dir=experiments/powell_cat/powell_cat_PPO --prob_attr=problem --exp_id=powell_cat_PPO --max_evals=1000 --max_time=60 --base_estimator='PPO'
/* * malloc_ext.h * * Created on: Aug 24, 2018 * by: <NAME> * * This is a wrapper of malloc.h * This enables using DPDK memory allocation. * The functions in this file must not be called before rte_eal_init. */ #ifndef SRC_LIB_MEMORY_EXT_H_ #define SRC_LIB_MEMORY_EXT_H_ /* * Do not use dpdk_mal...
package ru.cbrrate.services; import org.junit.jupiter.api.Test; import ru.cbrrate.clients.HttpClientJdk; import ru.cbrrate.clients.TelegramClientImpl; import ru.cbrrate.config.JsonConfig; import ru.cbrrate.config.TelegramClientConfig; import ru.cbrrate.model.GetUpdatesRequest; import ru.cbrrate.model.GetUpdatesRespons...