text
stringlengths
1
1.05M
<reponame>zju-3dv/multi-person3dpose # encoding: utf-8 """ @author: <NAME> @contact: <EMAIL> """ import zmq import multiprocessing as mp from config import config from utils.dpflow.serialize import loads, dumps import dataset def data_sender(id, name, *args): context = zmq.Context() sender = context.socket(zm...
#!/bin/sh -e NAME="$(basename $0)" CWD="$(pwd)" TMP_PATH="/tmp/.shotcut.$$" SHOTCUT_VERSION="" if [ "$(which rpmbuild)" == "" ]; then printf "Unable to find rpmbuild, please use yum or zypper to install the package\n" >&2 exit 1 fi if [ "$(which curl)" == "" ]; then printf "Unable to find curl, please use yum or z...
from wtforms import ( StringField, PasswordField, BooleanField, IntegerField, DateField, TextAreaField, SubmitField, ) from flask_wtf import FlaskForm from wtforms.validators import InputRequired, Length, EqualTo, Email, Regexp ,Optional, ValidationError import email_validator from werkzeug....
<filename>src/main/resources/static/book.js var panX = 0 var panY = 0 var swipeStart = false function touchGestureStartPan(event) { if (event.touches.length == 1 && window.getSelection().type != "Range") { panX = event.touches[0].pageX panY = event.touches[0].pageY swipeStart = true } }...
TERMUX_PKG_HOMEPAGE=https://github.com/danmar/cppcheck TERMUX_PKG_DESCRIPTION="tool for static C/C++ code analysis" TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION=2.7.4 TERMUX_PKG_AUTO_UPDATE=true TERMUX_PKG_SRCURL=https://github.com/danmar/cppcheck/archive/$TERMUX_PKG_VERSION.tar.gz TE...
<reponame>uditgupta002/StringProblems import java.util.*; import java.lang.*; import java.io.*; class LongestCommonPrefix { public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int testCases = Integer.parseInt(br.readLine()); for(...
#!/bin/bash -e SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd) cd "$SCRIPT_DIR" function compile_by_gcc() { echo -e "\nCompile souce files by gcc\n" find src -type f | grep -E '*\.c' | while read -r C_FILE do ASM=$(echo "$C_FILE" | sed 's#c$#s#g') echo "gcc -S \"$C_FILE\" -o \"$ASM\"" gcc -S "$C_FILE" -o "$...
#!/bin/bash while read p; do line=$p if ! [[ $line == *"apples"* ]] then echo "$line" >> newfile.txt fi done <myfile.txt mv newfile.txt myfile.txt
public static String convertToCamelCase(String str){ str = str.trim().toLowerCase() StringBuilder sb = new StringBuilder(); String[] splitStr = str.split(" "); for(String s : splitStr){ if(s.length() > 0){ sb.append(s.substring(0, 1).toUpperCase() + s.substring(1) + ""); } } return sb.toString(); }
#!/bin/bash # This script sets up a Ubuntu host to be able to create the image by # installing all of the necessary files. It assumes an EC2 host with # passwordless sudo # Install a bunch of packages we need read -d '' PACKAGES <<EOT bc libtool-bin gperf bison flex texi2html texinfo help2man gawk libtool build-esse...
<gh_stars>0 /* * Copyright 2014-2016 CyberVision, 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 appl...
<gh_stars>0 import { Link } from "gatsby"; import React from "react"; import Title from "../Typography/Title/Title"; import "./Header.css"; import { colors } from "../../constants/colors"; interface HeaderProps { siteTitle: string; } const Header: React.FC<HeaderProps> = ({ siteTitle }) => ( <header className="He...
#!/bin/sh # CYBERWATCH SAS - 2017 # # Security fix for USN-2578-1 # # Security announcement date: 2015-04-27 00:00:00 UTC # Script generation date: 2017-01-01 21:04:29 UTC # # Operating System: Ubuntu 14.10 # Architecture: i686 # # Vulnerable packages fix on version: # - libreoffice-core:1:4.3.7~rc2-0ubuntu1 # # ...
<reponame>RSpace/spree-heroku # encoding: utf-8 Spree::FileUtilz.class_eval do class << self # Patch mirror_files method to be silent when using r/o Heroku FS alias_method :mirror_files_old, :mirror_files def mirror_files(source, destination, create_backups = false) return mirror_files_old(source, d...
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from .kyototycoon import KyotoTycoonCheck from .__about__ import __version__ __all__ = [ '__version__', 'KyotoTycoonCheck' ]
<filename>basicJava/singletonPattern/kr.co.singleton1/SingletonMainTest.java package kr.co.singleton1; public class SingletonMainTest { public static void main(String[] args) { /* * ์‹ฑ๊ธ€ํ†ค ํด๋ž˜์Šค ์—ฐ์Šต * */ //Singleton obj=new Singleton(); // >์—๋Ÿฌ , ์ƒ์„ฑ์ž ํ•จ์ˆ˜๋ฅผ private๋กœ ๋ง‰์•„๋†“์•˜๊ธฐ ๋•Œ๋ฌธ์— // new ์—ฐ์‚ฐ์ž๋กœ ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑํ• ...
# ubuntu username="your_user_name" password="your_password" branch="your_branch_name" project_dir="your_project_dir" url="https://$username:$password@github.com/doong-jo/membership-todo.git" cd $project_dir git remote set-url origin $url git fetch find_origin="git rev-parse origin/$branch" origin_hash=$($find_origi...
#include <torch/extension.h> std::vector<at::Tensor> attn_score_backward( const at::Tensor &grad_output, const at::Tensor &attn_query, const at::Tensor &attn_keys, const at::Tensor &bias, const at::Tensor &linear_attn) { // Compute gradients of input tensors using chain rule and grad_output ...
#!/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...
<filename>pkg/smartcontract/trigger/trigger_type_test.go package trigger import ( "testing" "github.com/stretchr/testify/assert" ) func TestStringer(t *testing.T) { tests := map[Type]string{ System: "System", Application: "Application", Verification: "Verification", } for o, s := range tests { as...
#!/usr/bin/env bash # Copyright 2018 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 applicab...
#!/bin/bash PSQL_IP=$DB_PORT_5432_TCP_ADDR PSQL_PORT=$DB_PORT_5432_TCP_PORT echo " CREATE ROLE $APP_USER WITH LOGIN PASSWORD '$APP_PASS' VALID UNTIL 'infinity'; CREATE DATABASE $APP_DB WITH ENCODING 'UNICODE' TEMPLATE=template0;" \ | PGPASSWORD="$DB_PASS" psql -h $PSQL_IP -p $PSQL_PORT -d postgres -U $DB_USER -w
/* The MIT License Copyright (c) 2020 headwire.com, Inc https://github.com/headwirecom/jsonforms-react-spectrum-renderers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restr...
import React from 'react'; import isEqual from 'lodash/lang/isEqual'; class PaginationLink extends React.Component { componentWillMount() { this.handleClick = this.handleClick.bind(this); } shouldComponentUpdate(nextProps) { return !isEqual(this.props, nextProps); } handleClick(e) { this.props...
/* jshint indent: 1 */ module.exports = function(sequelize, DataTypes) { return sequelize.define('delSaleinfo', { recid: { type: DataTypes.INTEGER, allowNull: false, primaryKey: true, autoIncrement: true, field: 'RECID' }, salekey: { type: DataTypes.INTEGER, allowNull: true, defaultValue...
#!/bin/bash # # 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");...
<filename>example/example-service/src/main/java/com/company/example/util/Config.java package com.company.example.util; /** * ็ณป็ปŸ้…็ฝฎ็ฑป * * @author ่ฐญๆตทๆฝฎ * */ public class Config { }
curl "https://api.m3o.com/v1/search/Vote" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $M3O_API_TOKEN" \ -d '{ "message": "Launch it!" }'
echo '' >> /home/vagrant/ansible/hosts echo '[clients]' >> /home/vagrant/ansible/hosts echo 'client-node1' >> /home/vagrant/ansible/hosts cd /usr/share/ceph-ansible/group_vars/ cp clients.yml.sample clients.yml sed -i "/^#.*user_config: false/s/^#//" /usr/share/ceph-ansible/group_vars/clients.yml sed -i "/user_conf...
#!/bin/sh create_etcd_cert() { echo "generate $1 certificates" /usr/local/bin/cfssl gencert -ca=ca.pem -ca-key="ca-key.pem" --config="ca-config.json" -profile=$1 "$1-csr.json" | /usr/local/bin/cfssljson -bare $1 } /usr/local/bin/cfssl gencert -initca ca-csr.json | /usr/local/bin/cfssljson -bare ca create_etcd_cer...
#!/bin/sh # Copyright 2005-2019 ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an in...
<gh_stars>0 // ============================================================================ // // Copyright (C) 2006-2021 Talend Inc. - www.talend.com // // This source code is available under agreement available at // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt // // You...
<gh_stars>0 /* * 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"); y...
"""The tests for the demo light component.""" import pytest from homeassistant.components import light from homeassistant.setup import async_setup_component from tests.components.light import common ENTITY_LIGHT = "light.bed_light" @pytest.fixture(autouse=True) def setup_comp(hass): """Set up demo component.""...
import { baseApi } from '../../app/api/base'; export const blogApi = baseApi({ entityTypes: ['blogs'], reducerPath: 'blogs', resolvers: (builder) => ({}) }); export const { useLoadBlogsQuery, useLoadPagingBlogsQuery, useUpdateBlogsMutation, useDeleteBlogsMutation, useCreateBlogsMutation } = blogApi; ...
#!/usr/bin/env sh set -e jsdir="${TMPDIR:-/tmp}" jsfile="$jsdir"/htmlviewer_searcher.js echo "temporary file: $jsfile" cd "$(dirname "$0")" # extract source sed '/^const SEARCH_/p /^ \/\/ Testable searcher/,/^ \/\/ @}/p d ' ../htmlviewer > "$jsfile" exports=$(sed -E '/^ ? ?const/!d;s/^ ? ?const ([a-zA-Z0-9_]+).*...
#!/bin/bash # # Copyright IBM Corp All Rights Reserved # # SPDX-License-Identifier: Apache-2.0 # # This script defines the main capabilities of this project declare -A OPNAMES LINE0='imageget,certgen,netup,netstats,channelcreate,channeljoin,anchorupdate,' LINE1='profilegen,ccinstall,ccapprove,cccommit,ccinstantiate,d...
#!/usr/bin/env bash # # Description: carries out walkthrough as described in `pdp` documentation, # and provides alternative workflows, where primer design locations are filtered. # Usage: walkthrough.sh # 1. Clean walkthrough output OUTDIR=tests/walkthrough rm ${OUTDIR}/*.json rm -rf ${OUTDIR}/blastn* ${OUTDIR}/class...
import React, { Component } from 'react'; export class ModalContact extends Component { state = { name: '', email: '', message: '', formEmailSent: false, loading: false }; onChange = (e) => { // e.persist(); this.setState({ [e.target.name]: e.target.value }); }; onSubmit = (e) => { e.preventDefa...
<filename>_/Foodfact/grunt-foodfact-video-5.4/tasks/foodfact.js var _ = require('lodash'); var path = require('path'); var async = require('async'); var download = require('../lib/download.js'); var parse = require('../lib/parse.js'); module.exports = function(grunt) { grunt.registerMultiTask('fo...
class FractalTree: """ This class defines a Fractal Tree object. """ def __init__(self, curvelength, width, angle): """ Arguments: curvelength (float): This argument will define the current length of the branches of the tree. width (float): This argument will defi...
<filename>src/vuejsclient/login/AccessPolicy/recover/AccessPolicyRecoverComponent.ts import { Component } from "vue-property-decorator"; import ModuleAccessPolicy from '../../../../shared/modules/AccessPolicy/ModuleAccessPolicy'; import ModuleParams from '../../../../shared/modules/Params/ModuleParams'; import ModuleSA...
#!/bin/bash ## strict check set -euo pipefail DOCDIR='/Users/mtang/Dropbox (Partners HealthCare)/github_repos/CIDC-bioinformatics-computation-wiki' #### DANGER #### ## MAKE SURE TO HAVE VALID PATH HERE AS SCRIPT WILL NOT CHECK FOR PATH ## rsync may overwrite or worse, delete files on remote node. if [[ ! -d "$DOCDIR...
#import <Foundation/Foundation.h> int main() { @autoreleasepool { NSString *string1 = @"Hello"; NSString *string2 = @"World"; NSString *concatenatedString = [NSString stringWithFormat:@"%@ %@", string1, string2]; NSLog(@"%@", concatenatedString); } return 0; }
<reponame>Daniel201618/git_learning package com.cwl.service.part_1; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; /** * @author cwl * @description: TODO * @date 2019/12/1717:37 */ public class ThreadJoin { public static void main(String[] args) throws InterruptedExc...
def find_most_common(list_of_strings) count = Hash.new(0) list_of_strings.each { |str| count[str] += 1 } count.max_by { |k, v| v }&.first end list_of_strings = ['foo', 'bar', 'foo', 'baz', 'foo', 'qux'] most_common_string = find_most_common(list_of_strings) puts most_common_string #Output: "foo"
<reponame>bbc/hive_mind<filename>spec/controllers/api/devices_controller_spec.rb require 'rails_helper' require 'timecop' RSpec.describe Api::DevicesController, type: :controller do let(:valid_attributes) { { name: 'Device 1' } } let(:valid_attributes_with_id) { { name: 'Device 1', ...
import argparse def parse_args(): parser = argparse.ArgumentParser(description='Command-line utility for managing shortcuts') parser.add_argument('--shortcuts', nargs='+', help='List of shortcuts to run') parser.add_argument('--test', action='store_true', help='Run a test for the utility') return parse...
let res = 0 let index const test = () => { let a = 1 index++ res = res + a console.log('res', res) if(res > 10){ return res }else{ test.call(this) } } console.log('test', test()) //es7่ฏญๆณ• // import('./src/info').then(()=>{ // console.log('hello') // })
#!/bin/sh # shellcheck disable=SC2086 # FIXME: fix these globing warnings set -e die() { echo "die: $*" exit 1 } #SERENITY_PACKET_LOGGING_ARG="-object filter-dump,id=hue,netdev=breh,file=e1000.pcap" [ -e /dev/kvm ] && [ -r /dev/kvm ] && [ -w /dev/kvm ] && SERENITY_VIRT_TECH_ARG="-enable-kvm" [ -z "$SERENIT...
<reponame>uzelac92/jsPDF-AutoTable /* eslint-disable @typescript-eslint/no-unused-vars */ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign export function assign<T, U, V, W, X>( target: T, s: U, s1?: V, s2?: W, s3?: X ): T & U & V & W & X { if (target == nul...
#!/bin/bash id jaspy && userdel jaspy || true
# Version 1.2 # Copyright (c) 2019 pilisir.tw@gmail.com # Under MIT Licesne, please go to "https://en.wikipedia.org/wiki/MIT_License" to check license terms. escapePath() { resultValue=$(echo "$@" | sed 's@[\]@\\\\@g;s/"/\\"/g;s/\ /\\ /g;s/'"'"'/\'"\'"'/g;s/`/\\`/g;s/:/\\:/g;s/?/\\?/g;s/!/\\!/g;s/</\\</g;s/>/\\>/g;s/...
<gh_stars>0 package pl.coderslab.spring01hibernate.entity.examples; import pl.coderslab.spring01hibernate.repository.examples.UczenRepository; import javax.persistence.*; import java.util.List; @Entity public class Nauczyciel { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private long id; ...
use App\Tenant; use Carbon\Carbon; class TenantFilter { // Existing method to get tenants ordered based on supplied filters public function getTenants($sortField, $orderBy) { // Implementation to retrieve tenants based on sortField and orderBy // ... } // New method to filter tenan...
<gh_stars>0 function addBorder(picture) { let framedPicture = []; picture.forEach((line, index) => { if (index === 0) { framedPicture.push("*".repeat(line.length + 2)); } framedPicture.push(`*${line}*`); if (index === picture.length - 1) { framedPicture.push("*".repeat(line.length + 2))...
#!/bin/bash pip install --user bcolz mxnet tensorboardX matplotlib easydict opencv-python einops --no-cache-dir -U | cat pip install --user scikit-image imgaug PyTurboJPEG --no-cache-dir -U | cat pip install --user scikit-learn --no-cache-dir -U | cat pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 -f https://...
<reponame>jelly/patternfly-react<filename>packages/react-core/src/components/DatePicker/examples/DatePickerControlledCalendar.tsx<gh_stars>0 import React from 'react'; import { Button, DatePicker } from '@patternfly/react-core'; export const DatePickerControlledCalendar: React.FunctionComponent = () => { const dateR...
-- Combined Lua script for incrementing key value and setting expiration, and batch deletion of keys local function delBatch(keys, start, batchSize) local endIdx = math.min(start + batchSize - 1, #keys) return redis.call('del', unpack(keys, start, endIdx)) end local function incrExpire(key, expireTime, increme...
<gh_stars>10-100 # Generated by Django 3.0.8 on 2020-07-31 18:22 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('mail', '0001_initial'), ] operations = [ migrations.RenameField( model_name='email', old_name='time', ...
var username = String(getCookie('username')); $(document).ready(function(){ $("#send").click(function(){ console.log("sent") var ul = document.getElementById("messages"); var li = document.createElement("li"); if (document.getElementById("messageinput").value == "/showloc"){ li.appe...
<filename>src/scripts/index.js const reminder = require('./reminder'); module.exports = { reminder }
<filename>2-resources/__DATA-Structures/Data-Structures-Algos-Codebase-master/ALGO/UNSORTED/Pig Latin.js //Pig Latin is a way of altering English Words. The rules are as follows: //If a word begins with a consonant, take the first consonant or consonant cluster, move it to the end of the word, and add "ay" to it. // If...
#!/bin/sh . ./build/tfs/common/node.sh . ./scripts/env.sh . ./build/tfs/common/common.sh export VSCODE_MIXIN_PASSWORD="$1" export AZURE_STORAGE_ACCESS_KEY="$2" export AZURE_STORAGE_ACCESS_KEY_2="$3" export MOONCAKE_STORAGE_ACCESS_KEY="$4" export AZURE_DOCUMENTDB_MASTERKEY="$5" VSO_PAT="$6" echo "machine monacotools....
#pragma once #include <KAI/Language/Language.h>
package be.kwakeroni.parameters.adapter.jmx.api; import be.kwakeroni.parameters.definition.api.DefinitionVisitor; import java.util.function.Consumer; /** * Created by kwakeroni on 09/05/17. */ public interface JMXGroupMBeanFactory extends DefinitionVisitor<JMXGroupBuilder> { public void register(Registry regi...
package app.services; import app.conf.AppConfig; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.c...
#!/bin/bash # Copyright 2021 Dialpad, Inc. (Shreekantha Nadig, Riqiang Wang) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) if [ "$#" -ne 3 ]; then echo "Usage: $0 <src-dir> <dst-dir> <audio-dir-name>" echo "e.g.: $0 downloads/hindi/train/ data/hindi/train/ Audios" exit 1 fi src=$1 dst=$2 audio_di...
#include <iostream> int main() { int n; std::cin >> n; int a = 0, b = 1, c; std::cout << a << " " << b << " "; for (int i = 2; i < n; i++) { c = a + b; std::cout << c << " "; a = b; b = c; } return 0; }
<filename>test/kennel/api_test.rb # frozen_string_literal: true require_relative "../test_helper" SingleCov.covered! describe Kennel::Api do let(:api) { Kennel::Api.new("app", "api") } describe "#show" do it "fetches monitor" do stub_datadog_request(:get, "monitor/1234") .with(body: nil, header...
package io.dronefleet.mavlink.matrixpilot; import io.dronefleet.mavlink.annotations.MavlinkFieldInfo; import io.dronefleet.mavlink.annotations.MavlinkMessageBuilder; import io.dronefleet.mavlink.annotations.MavlinkMessageInfo; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.uti...
/** OSM server classes. */ package io.opensphere.osm.server;
def list_sum(list1, list2): if len(list1) == len(list2): sum_list = [] for i in range(len(list1)): sum_list.append(list1[i] + list2[i]) return sum_list else: return None
<gh_stars>1-10 'use strict' /** * Represents a TagRenderer. * @constructor * @param {Object} options - Options for TagRenderer. * Valid options: * - pretty - defines if rendering is pretty or not */ function TagRenderer (options = {}) { this.pretty = (options.pretty === undefined) ? false : options.pretty th...
package io.opensphere.core.util.swing; import java.awt.GridLayout; import java.awt.Insets; import java.awt.event.ActionListener; import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.Map; import javax.swin...
import pywingchun from enum import IntEnum class Source: CTP = "ctp" XTP = "xtp" OES = "oes" class Exchange: SSE = "SSE" SZE = "SZE" SHFE = "SHFE" DCE = "DCE" CZCE = "CZCE" CFFEX = "CFFEX" INE = "INE" class Region: CN = 'CN' HK = 'HK' class ValuationMethod(IntEnum):...
<gh_stars>100-1000 'use strict'; const progressInfo = document.querySelectorAll( '.progress_info_bold' ); if( progressInfo.length > 0 ) { let apps = 0; let drops = 0; let match; for( let i = 0; i < progressInfo.length; i++ ) { match = progressInfo[ i ].textContent.match( /([0-9]+) card drops? remaining/ ); ...
#!/bin/env bash # Copyright 2017-2018 by SDRausty. All rights reserved. ๐ŸŒŽ ๐ŸŒ ๐ŸŒ ๐ŸŒ ๐Ÿ—บ # Hosting https://sdrausty.github.io/TermuxArch courtesy https://pages.github.com # https://sdrausty.github.io/TermuxArch/CONTRIBUTORS Thank you for your help. # https://sdrausty.github.io/TermuxArch/README has information about thi...
package com.report.adapter.persistence.repository; import com.report.application.domain.vo.CharacterPhrase; import com.report.application.domain.vo.PlanetName; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.Ext...
<filename>src/publisher.cpp #include <Interface/SimulationGUI.h> #include <IO/ROS.h> int main(int argc,const char** argv) { // Create world RobotWorld world; SimGUIBackend backend(&world); WorldSimulation& sim = backend.sim; // Load world file if (!backend.LoadAndInitSim(argc,argv)) { ...
def find_longest_word(string): words = string.split(" ") longest_word = ' ' for cur_word in words: if len(cur_word) > len(longest_word): longest_word = cur_word return longest_word # Driver Code string = "The quick brown fox jumps over the lazy dog" longest_word = find_longest_word(string) print(f"The lo...
#!/usr/bin/env bash set -e VERSIONS_FILE="$(dirname $(realpath $0))/../kafka-versions.yaml" # Gets the default Kafka version and sets "default_kafka_version" variable # to the corresponding version string. function get_default_kafka_version { finished=0 counter=0 default_kafka_version="null" while [ ...
use regex::Regex; fn count_test_functions(rust_source_code: &str) -> usize { let test_function_pattern = Regex::new(r"(?m)(?s)\#\s*\[test\]\s*fn\s+\w+\s*\(\s*\)").unwrap(); test_function_pattern.find_iter(rust_source_code).count() }
import scipy.optimize as opt # stocks is an array of tuples, # each tuple contains the stock ticker, current price, and allocated capital stocks = [ ('MSFT', 200.00, 1000), ('AMZN', 1800.00, 1000), ('AAPL', 500.00, 1000) ] # Define objective function # which minimizes the difference between target stock values ...
<reponame>ab2005/provider /* * Copyright (c) 2015. Seagate Technology PLC. All rights reserved. */ package com.seagate.alto.provider.lyve.response; import com.google.gson.Gson; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class Location { @SerializedNam...
#!/usr/bin/env sh set -eu echo 'test default install' ./src/sh/scripts/install-dotnet echo 'test channel install' ./src/sh/scripts/install-dotnet --channel lts echo 'test version install' ./src/sh/scripts/install-dotnet --version latest
<gh_stars>10-100 module.exports = { copyFirebaseUiCss: { src: ['./node_modules/firebaseui/dist/firebaseui.css'], dest: '{{BUILD}}' } };
<filename>src/containers/Content.js import React from 'react'; import Carousel from './components/Carousel'; import './css/Content.css'; function Content(){ return( <div className="content bg-light border-dark"> <Carousel/> </div> ) } export default Content;
<gh_stars>10-100 package org.yarnandtail.andhow.valid; import org.yarnandtail.andhow.api.Validator; /** * A collection of Long validation types * * @author ericeverman */ public abstract class LngValidator implements Validator<Long> { @Override public boolean isSpecificationValid() { return true; } @O...
#!/bin/sh yarn concurrently \ --prefix-colors blue,green \ --names FE,TEST \ --kill-others \ "yarn start" "yarn test"
#!/bin/bash # Module specific variables go here # Files: file=/path/to/file # Arrays: declare -a array_name # Strings: foo="bar" # Integers: x=9 ############################################### # Bootstrapping environment setup ############################################### # Get our working directory cwd="$(pwd)"...
import React from 'react'; import styled from 'styled-components'; interface IProps {} const Styled = styled.button` width: 17px; height: 17px; `; const ScanVector = React.memo((props: any) => { return ( <svg width={17} height={17}> <path d="M15.703 5.86c.508 0 .781-.2...
#!/bin/bash # Copyright 2017, Google Inc. # 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 the above copyright # notice, this list of conditio...
#!/usr/bin/env bash # ########################################################################### # # # Generate the debian repository and sign it with a given GPG key # # ########################################################################### # TMP_PROGRAM_VERSION="0.2"; # .........................................
<filename>modules/coverage-report/src/test/java/org/jooby/EnvEmpyCallbackFeature.java package org.jooby; import org.jooby.test.ServerFeature; import org.junit.Test; public class EnvEmpyCallbackFeature extends ServerFeature { { on("dev", () -> { }); get("/", () -> "empty"); on("dev", () -> { }...
# Get current work dir WORK_DIR=$(pwd)/PipeSwitch # Import global variables source $WORK_DIR/scripts/config/env.sh PYTHONPATH=$PYTHONPATH:$WORK_DIR python $WORK_DIR/scripts/figures/figure7/per_layer_no_pipeline_bert_base/remote_run_data.py
#!/bin/sh # # Vivado(TM) # runme.sh: a Vivado-generated Runs Script for UNIX # Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. # echo "This script was generated under a different operating system." echo "Please update the PATH and LD_LIBRARY_PATH variables below, before executing this script" exit if [ -z "$...
import { mount } from '@vue/test-utils' import LoginWallet from '@/components/LoginWallet.vue' import { expect, vi } from 'vitest' test('Login directly should fail', async () => { // mock the $message method inside const $message = vi.fn() const $router = { push: vi.fn() } const wrapper = mo...
<gh_stars>10-100 import "./test_util"; import "./test_tree"; import "./test_jqtree"; QUnit.config.testTimeout = 5000;
#!/bin/bash set -e -x ls -lah pwd export | sort ./gradlew --no-daemon --info build test check