text
stringlengths
1
1.05M
helm repo add argo https://argoproj.github.io/argo-helm helm install argocd argo/argo-cd
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }...
#!/bin/bash #SBATCH -p main #SBATCH -J param_stats #SBATCH -N 1 #SBATCH --ntasks-per-node=1 #SBATCH -t 01:00:00 #SBATCH --mem=64G cd /gpfs/space/home/holgerv/gis_holgerv/river_quality/scripts/grqa_processing module purge module load python-3.7.1 source activate river_quality ~/.conda/envs/river_quality/bin/python p...
import React, { useState, useEffect } from 'react'; import axios from 'axios'; const ProductSearch = () => { const [products, setProducts] = useState([]); const [searchTerm, setSearchTerm] = useState(""); const [error, setError] = useState(null); const handleChange = (event) => { setSearchTerm(event.target.value...
<gh_stars>0 import React, { Component, PropTypes } from 'react' import { connect } from 'react-redux' import { browserHistory } from 'react-router' import NavBar from '../components/NavBar' class App extends Component { render() { const { children } = this.props return ( <div className="app-wrapper"> ...
package com.partyrgame.authservice.controller; import java.util.Map; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.partyrgame.authservice.service.AuthService; import com.partyrgame.userservice.model.PartyrUser; import org.sp...
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi if which plenv > /dev/null; then eval "$(plenv init -)"; fi if which pyenv > /dev/null; then eval "$(pyenv init --path)"; fi if which nodenv > /dev/null; then eval "$(nodenv init -)"; fi if which goenv > /dev/null; then eval "$(goenv init -)"; fi if which jenv...
import type { AccountId } from '@polkadot/types/interfaces'; import type { AnyJson } from '@polkadot/types/types'; import { ApiPromise } from '@polkadot/api'; import { Abi } from '../Abi'; import { Contract as BaseContract } from '../base'; export declare class Contract extends BaseContract<'promise'> { constructor...
<reponame>troopaloop8/react-speech-1<filename>src/style.js<gh_stars>0 module.exports = { container: { width: '100%' }, text: { width: '100%', display: '' }, play: { hover: { backgroundColor: 'GhostWhite' }, button: { width: '50', height: '44', cursor: 'pointer',...
phenotype=/vol/bmd/meliao/data/psychiatric_trait_phenotypes/2020-04-10_collected-phenotypes.txt covariate=/vol/bmd/data/ukbiobank/psychiatric_traits/2019-12-17_psychiatric-trait_covariates.csv idp=/vol/bmd/yanyul/UKB/ukb_idp_genetic_arch/prediction/pred_idp.gw_ridge.parquet indiv_list=/vol/bmd/yanyul/UKB/predicted_expr...
public static String reverseString(String str) { char[] strArray = str.toCharArray(); int left = 0; int right = strArray.length - 1; while (left < right) { // Swap values of left and right char temp = strArray[left]; strArray[left] = strArray[right]; strArray[right] = t...
<gh_stars>1-10 <?hh // strict namespace Waffle\Log\__Private; use namespace HH\Lib\Str; use type Waffle\Lib\Json; use type DateTimeInterface; use type Throwable; use function is_object; use function get_resource_type; use function get_class; use function gettype; final class VariableNormalizer { const string SIM...
#include <stdio.h> int main() { int arr[] = {5, 6, 4, 8, 9}; int n = sizeof(arr)/sizeof(arr[0]); int i; int max = arr[0]; for (i = 1; i < n; i++){ if (arr[i] > max) max = arr[i]; } printf("Largest element = %d", max); return 0; }
#!/usr/bin/env bash docker run --rm -it -v ${PWD}:/docs squidfunk/mkdocs-material:$(grep 'MKDOCS_VERSION:' .cirrus.yml | cut -d\ -f4) build
from django.db import models from response.core.models import Incident class Notification(models.Model): incident = models.ForeignKey(Incident, on_delete=models.CASCADE) key = models.CharField(max_length=30) time = models.DateTimeField() repeat_count = models.IntegerField(default=0) completed = m...
var fs = require('fs'); var _ = require('underscore'); module.exports = { //handle errors in express routers handleError: function(err,res) { if(err) { if (_.has(err,'message')) print(err.message,'ERROR'); else print(err,'ERROR'); //if res defined, also give server answer if...
<filename>viewer/javascript/lib/highchart-7.2.0/es-modules/mixins/centered-series.js /* * * * (c) 2010-2019 <NAME> * * License: www.highcharts.com/license * * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!! * * */ 'use strict'; import H from '../parts/Globals.js'; /** * @private * ...
def convert_list_to_string(list_of_words): return ", ".join(list_of_words)
<reponame>alklimenko/calculator package ru.alklimenko.calculator; public class Number extends Term { private final double value; Number(double value) { this.value = value; } double getValue() { return value; } public String toString() { return " " + Double.toString(va...
<reponame>YoffieYF/yf_album<filename>android/src/main/java/plugin/album/utils/downloader/AsyncDownLoader.java<gh_stars>1-10 package plugin.album.utils.downloader; import java.io.File; public class AsyncDownLoader { public static DownLoadTask downLoad(String url, File file, DownLoaderListener listener) { D...
<gh_stars>1-10 // โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” // โ”‚ Copyright (c) 2021 by the author of the React-weather project. All rights reserved. โ”‚ // โ”‚ This owner-supplied source code has no limitations on the condition imposed on the โ”‚ // โ”‚ ...
package nl.pvanassen.steam.store.history; import java.util.Date; /** * A row in the steam history * * @author <NAME> */ public class HistoryRow { private final String rowName; private final Date listed; private final Date acted; private final int price; HistoryRow(String rowName, Date listed...
const postcss = require('postcss') module.exports = postcss.plugin('trim', function (opts) { return function (css) { css.walk(function (node) { if (node.type === 'rule' || node.type === 'atrule') { node.raws.before = node.raws.after = '\n' } }) } })
<gh_stars>0 #include <pybind11/pybind11.h> #include <iostream> #include <sstream> #include <pybind11/numpy.h> #include "nifty/python/graph/undirected_list_graph.hxx" #include "nifty/python/graph/undirected_grid_graph.hxx" #include "nifty/graph/node_weighted_watersheds.hxx" #include "nifty/python/converter.hxx" nam...
<reponame>JoshFrankfurth/ecal<filename>app/rec/rec_server_core/src/rec_server.cpp /* ========================= eCAL LICENSE ================================= * * Copyright (C) 2016 - 2019 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except ...
/* * * PromosPage actions * */ import { DEFAULT_ACTION, } from './constants'; export function defaultAction() { return { type: DEFAULT_ACTION, }; }
// // Created by devilox on 11/20/20. // //-----------------------------// #include <stdexcept> #include "dVulkanMesh.h" //-----------------------------// dVulkanMesh::dVulkanMesh( VkPhysicalDevice tGPU, VkDevice tLogicalGPU, VkQueue tTransferQueue, VkComma...
<filename>genie_pkg/delimited_genie.py import csv from genie_pkg.generators import (generate_email_id, one_of, random_date_from_today, random_float, random_geo_coords, random_integer, random_mastercard_number, random...
<gh_stars>0 import numpy as np from sparse_time_approx import Approx from matplotlib import pyplot as plt import seaborn as sns sns.set_theme() def find_best_k(A, k): u, s, v = np.linalg.svd(A, full_matrices=False) u = u[:, : k] v = v[: k, :] s = s[: k] A_k = np.dot(np.dot(u, np.diag(s)), v) retur...
package x import ( "net/http" "github.com/ory/herodot" ) var PseudoPanic = herodot.DefaultError{ StatusField: http.StatusText(http.StatusInternalServerError), ErrorField: "Code Bug Detected", ReasonField: "The code ended up at a place where it should not have. Please report this as an issue at https://github.c...
#!/usr/bin/env bash # shellcheck disable=SC2154,SC2034 # these top lines are moved during build # --- Modified Version --- # Name : checksec.sh # Version : 1.7.0 # Author : Brian Davis # Date : Feburary 2014 # Download: https://github.com/slimm609/checksec.sh # # --- Modified Version --- # Name : checksec.sh...
package com.ibm.socialcrm.notesintegration.ui.dialogs; /**************************************************************** * IBM OpenSource * * (C) Copyright IBM Corp. 2012 * * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * **************************************************...
<reponame>neuling/fso-livetest-chrome-extension<gh_stars>10-100 function(page,done) { var do_not_run_string = '%DO_NOT_RUN_DOMAINS%'; //some websites have request limits that block your IP if you do to many requests, these domains can be added here, comma seperated i.e. ecco-verde,vitalabo let do_not_run = []; v...
// @ts-nocheck import { Modifier } from '../types'; /** * @param modifiers */ export default function mergeByName(modifiers: Partial<Modifier<any, any>>[]): Partial<Modifier<any, any>>[] { const merged = modifiers.reduce((merged, current) => { const existing = merged[current.name]; merged[current.name] = e...
import random def check_palindrome(num): """Function to check if a number is a palindrome. """ num_str = str(num) rev_str = num_str[::-1] if num_str == rev_str: return True else: return False # Generate a random 6-digit number num = random.randint(100000, 999999) # Check if i...
<reponame>Ren1336621051/2020FSD_Milestone5_backend package com.carson.cloud.business.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotat...
#include <iostream> #include <string> // Define the ComponentInfo data structure struct ComponentInfo { std::string component_name; std::string version; std::string description; }; // Define the findLocalComponent function class ComponentInfoRepository { public: bool findLocalComponent(const std::stri...
#!/bin/sh # --quiet # (ะธะปะธ -q) ะฟะพะดะฐะฒะปัะตั‚ ะฒั‹ะฒะพะด ะปะธัˆะฝะตะน ะธะฝั„ะพั€ะผะฐั†ะธะธ, ะฟั€ะธะฒะพะดั ะบ ะฒั‹ะฒะพะดัƒ ั‚ะพะปัŒะบะพ ะธะฝั„ะพั€ะผะฐั†ะธะธ ะพะฑ ะพัˆะธะฑะบะฐั…. # --verbose # (ะธะปะธ -v) ะทะฐัั‚ะฐะฒะปัะตั‚ valgrind ะฒั‹ะฒะพะดะธั‚ัŒ ะฟะพะดั€ะพะฑะฝัƒัŽ ะธะฝั„ะพั€ะผะฐั†ะธัŽ ะพ ัะฒะพะตะน ั€ะฐะฑะพั‚ะต. # --log-file # ะฟะพะทะฒะพะปัะตั‚ ะทะฐะดะฐั‚ัŒ ะธะผั ั„ะฐะนะปะฐ ะฒ ะบะพั‚ะพั€ั‹ะน ะฑัƒะดะตั‚ ะฒั‹ะฒะพะดะธั‚ัŒัั ะพั‚ั‡ะตั‚ ะพ ั€ะฐะฑะพั‚ะต. ะ’ ะทะฐะดะฐะฝะฝะพะผ ะธะผะตะฝะธ ะผะพะณัƒั‚ ะธัะฟะพะปัŒะทะพะฒ...
<gh_stars>0 import React, { Component } from 'react'; import reactAutobind from 'react-autobind'; import { Card, Col, Row, CardBody, CardHeader, Button, Modal, ModalHeader, ModalBody, ModalFooter, Table } from "reactstrap" import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faMedal } from '@fortaw...
#! @shell@ # - make Nix store etc. # - copy closure of Nix to target device # - register validity # - with a chroot to the target device: # * nix-env -p /nix/var/nix/profiles/system -i <nix-expr for the configuration> # * install the boot loader # Ensure a consistent umask. umask 0022 # Re-exec ourselves in a pr...
package com.leetcode; import org.testng.annotations.Test; public class Solution_125Test { @Test public void testIsPalindrome() { Solution_125 solution_125 = new Solution_125(); solution_125.isPalindrome("A man, a plan, a canal: Panama"); } }
package com.java.study.offset; import com.java.study.util.KafkaUtil; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.apache.kafka.clients.consumer.ConsumerRecords; import org.apache.kafka.clients.consumer.OffsetAndMetadata; import org.apache.kafka.common.TopicPartition; import java.time.Duration; ...
<filename>test/e2e/ingress_default.go package e2e import ( "net/http" "time" api "github.com/appscode/voyager/apis/voyager/v1beta1" "github.com/appscode/voyager/test/framework" "github.com/appscode/voyager/test/test-server/client" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" extensions "k8s.io/api/ex...
#!/usr/bin/env bash source npu_set_env.sh /usr/local/Ascend/driver/tools/msnpureport -d 0 -g error /usr/local/Ascend/driver/tools/msnpureport -d 4 -g error currentDir=$(cd "$(dirname "$0")";pwd) currtime=`date +%Y%m%d%H%M%S` train_log_dir=${currentDir}/result/training_8p_job_${currtime} mkdir -p ${train_log_dir} cd $...
FIGURE=figure_complex_analysis.png montage -pointsize 24 -geometry 'x400' -tile 2x3 -font Liberation-Sans-Bold -label 'A' rmsd_histo_c_apdtrpap.png -label 'B' rmsd_histo_c_apdtrpap_Tn.png -label 'C' endtoend_c_apdtrpap.png -label 'D' endtoend_c_apdtrpap_Tn.png -label 'E' ramachandran_c_apdtrpap.png -label 'F' ramach...
# This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). # # Examples: # # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) # Mayor.create(name: 'Emanuel...
<gh_stars>1-10 import * as G from './utils' export { G }
package com.serchinastico.mechrunner.schedule.service; import android.content.Context; import android.media.MediaPlayer; import com.serchinastico.mechrunner.R; import com.serchinastico.mechrunner.schedule.domain.model.Schedule; import com.serchinastico.mechrunner.schedule.domain.model.Step; import java.util.Iterator...
#pragma once #include <cpp11/external_pointer.hpp> #include <cpp11/strings.hpp> // required to avoid link error only #include <cpp11/list.hpp> #include <cpp11/integers.hpp> #include <cpp11/doubles.hpp> #include <cpp11/protect.hpp> #include <dust/random/random.hpp> #include <dust/r/random.hpp> #include <dust/utils.hp...
<filename>controllers/location.ts import { plainToClass } from 'class-transformer'; import { getSquareup } from './http-requests'; import { ISquareupListLocationsResponse } from '../models/endpoints/location/i-squareup-list-locations'; import { ISquareupLocation, ISquareupLocationCapability } from '../models/i-squareup...
#!/bin/bash # # This script is just to test the IRIS image outside of Kubernetes # source ./buildtools.sh docker run --rm -it --name sds_iris_template \ -p 1972:1972 -p 52773:52773 \ -v $PWD/license:/external/license \ $LOCAL_IMAGE_NAME --key /external/license/iris.key
<gh_stars>0 package org.firstinspires.ftc.teamcode.hardware.devices; import android.support.annotation.NonNull; import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; import com.qualcomm.robotcore.hardware.DcMotor; import com.qualcomm.robotcore.hardware.DcMotorSimple; import org.firstinspires.ftc.teamcode.hard...
<filename>LeetCodeSolutions/152 - Maximum Product Subarray(medium) - Java.java class Solution { public int maxProduct(int[] nums) { int max_elem = nums[0]; for(int i = 1;i < nums.length;i++){ int temp = nums[i]; if(nums[i]>max_elem){ max_elem = nums[i]; ...
class ArgumentParser: def __init__(self): self.arguments = {} def add_argument(self, name, action, nargs): self.arguments[name] = {'action': action, 'nargs': nargs, 'values': []} def parse_args(self, args): parsed_args = {'arg_opt_' + k: 0 if v['action'] == 'store_true' else [] for...
<gh_stars>10-100 import React from 'react' import { shallow } from 'enzyme' import AddLocation from './AddLocation' describe('AddLocation', () => { it('renders correctly', () => { const wrapper = shallow(<AddLocation />) expect(wrapper).toMatchSnapshot() }) })
#!/bin/bash # Builds documentation for each release in both HTML and PDF versions sh utils/build.sh myreleases=$(cat website/_data/releases.yml | grep release | cut -d ":" -f 2- | sort -u -r) mydocs=$(cat website/_data/releases.yml | grep name | cut -d ":" -f 2- | sort -u) mystaticreleases=$(cat website/_data/static...
<reponame>JKusiak/isshu import axios from 'axios'; import { useContext, useState } from 'react'; import { useParams } from 'react-router-dom'; import AddColumnButton from '../../components/Column/AddColumnButton'; import { ActionTypes } from '../../reducers/BoardReducer'; import { BoardReducerContext } from '../Board/G...
<filename>src/main/java/chylex/hee/entity/projectile/EntityProjectilePotion.java package chylex.hee.entity.projectile; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.projectile.EntityPotion; import net.minecraft.init.Items; import net.minecraft.item.Item; i...
def linear_search(input_arr, search_term): for i in range(len(input_arr)): if input_arr[i] == search_term: return i return -1
#!/bin/bash # Copyright (c) 2019, NVIDIA CORPORATION. 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 ...
package org.brapi.test.BrAPITestServer.service.geno; import java.util.List; import org.brapi.test.BrAPITestServer.model.entity.geno.MarkerPositionEntity; import org.brapi.test.BrAPITestServer.repository.geno.MarkerPositionRepository; import org.brapi.test.BrAPITestServer.service.PagingUtility; import org.brapi.test.B...
import { Component } from '@angular/core'; @Component({ selector: 'app-registration-form', template: ` <form> <div> <label>First Name:</label> <input type="text" name="firstName"> </div> <div> <label>Last Name:</label> <input type="text" name="lastName"> </div> ...
#!/bin/sh set -eu /usr/bin/env python3 "$@" -Dq='2**414 - 17' -Dmodulus_bytes='32' -Da24='121665'
/* * 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...
#!/bin/sh wget -O data/OpenJDK11U-jdk_x64_linux_hotspot_11.0.14.1_1.tar.gz https://mirrors.tuna.tsinghua.edu.cn/AdoptOpenJDK/11/jdk/x64/linux/OpenJDK11U-jdk_x64_linux_hotspot_11.0.14.1_1.tar.gz wget -O data/hadoop-3.3.2.tar.gz https://mirrors.tuna.tsinghua.edu.cn/apache/hadoop/common/hadoop-3.3.2/hadoop-3.3.2.tar.gz
#!/usr/bin/env bash set -e stack="trio" root=$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." >/dev/null 2>&1 && pwd ) project=$(grep -m 1 '"name":' "$root/package.json" | cut -d '"' -f 4) # make sure a network for this project has been created docker swarm init 2> /dev/null || true docker network create --attachable --dr...
antigen use oh-my-zsh antigen bundle urbainvaes/fzf-marks antigen bundle git antigen bundle lein antigen bundle command-not-found antigen bundle zsh-users/zsh-autosuggestions antigen bundle zsh-users/zsh-syntax-highlighting antigen bundle asdf antigen theme romkatv/powerlevel10k antigen apply
TERMUX_PKG_HOMEPAGE=https://github.com/kevinlawler/kona TERMUX_PKG_DESCRIPTION="Open-source implementation of the APL-like K programming language" TERMUX_PKG_LICENSE="ISC" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION=20211225 TERMUX_PKG_SRCURL=https://github.com/kevinlawler/kona/archive/Win64-${TERMUX_PKG_VERSION...
#!/bin/sh ### BEGIN INIT INFO # description: Starts the python based OT scan handler as background process # processname: startotscan ### END INIT INFO DAEMON_PATH="/usr/bin/" DAEMON=python3 DAEMONOPTS=/opt/scan/scan-ot-devices-to-iot-hub.py NAME=startotscan DESC="startotscan" PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/...
<reponame>OpenHFT/Chronicle-Values /* * Copyright 2016-2021 chronicle.software * * https://chronicle.software * * 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.apa...
#!/usr/bin/env bash set -e if [ -f "$TMUX_PLUGIN_MANAGER_PATH"/tpm/bindings/install_plugins ]; then # tpm "$TMUX_PLUGIN_MANAGER_PATH"/tpm/bindings/install_plugins fi
package com.project.godseye.app; import java.util.regex.Matcher; import java.util.regex.Pattern; public class LogUtil { private static final int CALL_STACK_INDEX = 1; private static final Pattern ANONYMOUS_CLASS = Pattern.compile("(\\$\\d+)+$"); public static String prependCallLocation(String message) {...
#Copyright (c) 2015 Intel Corporation # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #Unless required by applicable law or agreed to in writin...
echo "Enter version" read version echo "Enter next submit comment" read comment echo "Allow warning? (y/[n])" read alw if [ "$version" == '' ] ; then echo "nothing" else if [ "$comment" == '' ] ; then git add -A && git commit -m $version else git add -A && git commit -m "'$comment'" fi git pus...
// This file is to show how a library package may provide JavaScript interop features // wrapped in a .NET API namespace JSInteropWithTypeScript { class ExampleJsFunctions { public showPrompt(message: string): string { return prompt(message, 'Type anything here'); } } export f...
from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import padding from cryptography.hazmat.primitives import hashes from lxml import etree from requests import Session class Services: def __init__(self, certificateContent, rsaKeyContent, privateKeyContent): ...
#!/bin/bash docker run \ --name=piper \ --link postgres:postgres \ --rm \ -it \ -e spring.datasource.url=jdbc:postgresql://postgres:5432/piper \ -e spring.datasource.initialization-mode=always \ -e logging.level.com.creactiviti=INFO \ -e piper.worker.enabled=true \ -e piper.coordinator.enabled=true \...
const reverseName = name => { let reversedName = ''; for(let i = name.length - 1; i >= 0; i--) { reversedName += name[i]; } return reversedName; }; const name = prompt('What is your name?'); console.log(reverseName(name));
#!/bin/bash local="0" # Example value for the variable local stack_name="example-stack" # Example value for the stack name aws_profile="example-profile" # Example value for the AWS profile if [ "$local" == "0" ]; then temp_file=$(mktemp) eval aws lambda invoke \ --invocation-type RequestResponse \ --fu...
#!/usr/bin/env bash set -xe FUXI_DIR="$BASE/new/fuxi" TEMPEST_DIR="$BASE/new/tempest" SCRIPTS_DIR="/usr/os-testr-env/bin/" venv=${1:-"fullstack"} function generate_test_logs { local path="$1" # Compress all $path/*.txt files and move the directories holding those # files to /opt/stack/logs. Files with ....
<reponame>alphagov/locations-api require "spec_helper" RSpec.describe "Locations V1 API" do before do ENV["OS_PLACES_API_KEY"] = "some_key" ENV["OS_PLACES_API_SECRET"] = "some_secret" end context "Successful call" do let(:postcode) { "E1 8QS" } let(:locations) do [ Location.new(pos...
/* Copyright 2007-2015 QReal Research Group * * 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...
<gh_stars>10-100 package Chapter2_5High; import java.io.File; import java.util.Arrays; public class FileSorter { //Exercise 2.5.28๏ผŒไปŽๅ‘ฝไปค่กŒๆŽฅๅ—ไธ€ไธช็›ฎๅฝ•ๅๅนถๆ‰“ๅฐๅ‡บๆŒ‰็…งๆ–‡ไปถๅๆŽ’ๅบๅŽ็š„ๆ‰€ๆœ‰ๆ–‡ไปถ public static void main(String[] args) { File directory = new File(args[0]); if (!directory.exists()) { System.out.println...
./upload_to_S3.pl --profile wormbase --bucket wormbase-modencode --local /home/scain/scain/275_build/jbrowse_build/jbrowse/tools/genome/jbrowse/data/b_malayi_PRJNA10729/ --remote docker/WS275/b_malayi_PRJNA10729 ./upload_to_S3.pl --profile wormbase --bucket wormbase-modencode --local /home/scain/scain/275_build/jbrowse...
import * as BB from "bbcode-tags"; import { SearchEngine, searchURL } from "~src/search-engines"; import * as SITE from "~src/site"; import { selectedTextIn, wrapIn } from "../logic/textarea"; export default (engine: SearchEngine) => (textarea: HTMLTextAreaElement, _: boolean) => { const tagName = SITE.TAG.url; ...
package com.boot; import com.boot.config.GenerateProperties; import com.boot.config.ScanClassProperties; import com.boot.config.SwaggerConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.context.properties.Enabl...
<filename>src/brdf.hpp /*#ifndef __BRDF_HPP__ #define __BRDF_HPP__ #include "glm.hpp" #include "radiance.hpp" #include <iostream> #include <tuple> class BRDF{ public: virtual float PdfSpec(glm::vec3 N, glm::vec3 Vi, glm::vec3 Vr, bool debug = false) const = 0; virtual float PdfDiff() const = 0; Spectrum A...
#if !defined(RESPONSE_HEADER_H) #define RESPONSE_HEADER_H #include "utils.h" #include <map> #include <string> #include <sys/stat.h> using std::map; using std::string; using std::to_string; class response_header { public: static map<int, string> code2phrase; static string STR_VERSION_HTTP_1_1; static con...
<filename>packages/bus-rdf-resolve-quad-pattern/lib/ActorRdfResolveQuadPatternSource.ts import type { ActionContext, IActorArgs, IActorTest } from '@comunica/core'; import type * as RDF from '@rdfjs/types'; import type { AsyncIterator } from 'asynciterator'; import type { Algebra } from 'sparqlalgebrajs'; import type {...
<gh_stars>0 from django import forms from .models import Vocabularies class CreateVocForm(forms.Form): voc_name = forms.CharField(label='Titre', max_length=20, widget=forms.TextInput(attrs={'class': 'form-control'})) words = forms.CharField(label='Vocabulaire', widget=forms.Textare...
<gh_stars>0 package frc.robot.subsystems; import edu.wpi.first.wpilibj.VictorSP; import edu.wpi.first.wpilibj.command.Subsystem; import frc.robot.commands.Feed; public class Feeder extends Subsystem { private static Feeder instance; public static Feeder getInstance(){ if(instance == null) i...
#include <cppunit/extensions/HelperMacros.h> class YourTestClass : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(YourTestClass); CPPUNIT_TEST(testInitializationExceptionOnInvalidLiquidMass); CPPUNIT_TEST(testInitializationExceptionOnInvalidReferenceSpeed); CPPUNIT_TEST_SUITE_END(); public: void...
#!/usr/bin/env bash # Run this from the root project dir with scripts/run_all_tests.sh . .venv/bin/activate python -m pytest tests/local
<reponame>dengyifei/netty-proxy package com.efei.proxy.common.face; @FunctionalInterface public interface CallBack<T> { void accept(T t); }
import {modules} from '../../container' import {ApiOperationGet, ApiPath, SwaggerDefinitionConstant} from 'swagger-express-ts' import {inject, LazyServiceIdentifer} from 'inversify' import * as express from 'express' import {controller, httpGet} from 'inversify-express-utils' import {workerLogger} from '../../utils/wor...
<reponame>GGolfz/cscms-url-shortener import axios from '../axios/axios' import { GET_ORIGINAL, CREATE_SHORTEN } from './type' export const createShorten = url => async dispatch => { let response = { answer: null, success: false } try { const res = await axios.post('/api/newUrl', { url: url }) let host = win...
// const configBase = ; /** * Prettier internal configuration for this repository. Use on your own risk ;) */ module.exports = { ...require('../includes/prettier-config'), printWidth: 120, tabWidth: 4, overrides: [ { files: ['LICENSE'], options: { parser: 'markdown',...
<gh_stars>1-10 #pragma once #include <lua/lua.hpp> #include <SFML/Graphics.hpp> #include "Scenes/Scene.h" #include "Scenes/ModalWindow.h" #include "Screen.h" #include "AnimatedSprite.h" #include "Player.h" #include "TTLua.h" #include "TTUtils.h" #include "TooterLogger.h" namespace tt { namespace { int Utils_open...
import pkg.mod print(pkg.__name__) print(pkg.mod.__name__) print(pkg.mod.foo()) # Import 2nd time, must be same module objects pkg_ = __import__("pkg.mod") print(pkg_ is not pkg.mod) print(pkg_ is pkg) print(pkg_.mod is pkg.mod) # import using "as" import pkg.mod as mm print(mm is pkg.mod) print(mm.foo())
function moveTower(height, fromPole, toPole, withPole){ if (height >= 1) { moveTower(height - 1, fromPole, withPole, toPole); moveDisk(fromPole, toPole); moveTower(height - 1, withPole, toPole, fromPole); } } function moveDisk(fromPole, toPole){ console.log('moving disk from', fromP...