text
stringlengths
1
1.05M
public class Average { public static double mean(int[] numbers) { double sum = 0; for (int i = 0; i < numbers.length; i++) sum += numbers[i]; return sum / numbers.length; } public static void main(String args[]) { int[] numbers = {1, 2, 3, 4, 5}; S...
import socket import threading # Create a network socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Bind socket to port server_address = ('127.0.0.1', 10000) s.bind(server_address) # Wait for incoming connection s.listen() # Thread for handling incoming connection def client_thread(conn): while Tru...
<gh_stars>0 import { PipeTransform } from '@angular/core'; import * as ɵngcc0 from '@angular/core'; export declare class HeadPipe implements PipeTransform { transform(input: any): any; static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<HeadPipe, never>; static ɵpipe: ɵngcc0.ɵɵPipeDeclaration<HeadPipe, "head">; } expo...
#!/bin/bash #wget http://atlas.nmfs.hawaii.edu/cgi-bin/reynolds_extract.py?lon1=150\&lon2=180\&lat1=0\&lat2=30\&year1=2003\&day1=2\&year2=2004\&day2=57 -O test.zip #R --vanilla < get.sst.from.server.R #for #> mdy.date(1,1,2003) #[1] 1Jan2003 #> mdy.date(1:12,1,2003)-mdy.date(1,1,2003) # [1] 0 31 59 90 120 151 1...
<reponame>sonasingh46/maya /* Copyright 2019 The OpenEBS Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
<reponame>thirdkindgames/PlayFabSdk #pragma once #include <PlayFabComboSdk/PlayFabError.h> #include <PlayFabComboSdk/PlayFabMatchmakerDataModels.h> #include <PlayFabComboSdk/PlayFabHttp.h> namespace PlayFabComboSdk { class PlayFabMatchmakerApi { public: // ------------ Error callback sta...
<filename>src/shared/rest/index.ts<gh_stars>1-10 import { RESTDataSource } from 'apollo-datasource-rest'; import { SuitablePlanetsResponse } from 'modules/planets/types/suitablePlanets.type'; // eslint-disable-next-line import/no-extraneous-dependencies import { DataSourceConfig } from 'apollo-datasource'; import { Se...
import Employee from './Employee'; import Patient from './Patient'; class Database { private employees : Array<Employee>; private patients: Array<Patient>; constructor () { this.employees = []; this.patients = []; } getAllEmployees () { return this.employees; } ...
#!/bin/bash -xe INPUT_PATH=$1 VERSION=$2 OUTPUT_PATH=${3:-.} PACKAGE_VERSION=${4:-$VERSION} PACKAGE_NAME=indy-plenum # copy the sources to a temporary folder TMP_DIR=$(mktemp -d) shopt -s dotglob cp -r ${INPUT_PATH}/. ${TMP_DIR} # prepare the sources cd ${TMP_DIR}/build-scripts/ubuntu-1604 ./prepare-package.sh ${TM...
<reponame>mvaliev/gp2s-pncc /* * Copyright 2018 Genentech 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 ...
<reponame>OhFinance/oh-app import BigNumber from "bignumber.js"; export type MethodArg = string | number | BigNumber; export type MethodArgs = Array<MethodArg | MethodArg[]>; export type OptionalMethodInputs = | Array<MethodArg | MethodArg[] | undefined> | undefined; export interface Call { address: string; ...
<reponame>Damian070/pimp-my-pr<filename>libs/server/repository/core/domain/src/lib/entities/reviewer.entity.ts import { ContributorEntity } from './contributor.entity'; export class ReviewerEntity extends ContributorEntity {}
#======= # Author: <NAME> (<EMAIL>) #======= require 'logger' require 'pp' require 'yaml' module UICov GEM_HOME = File.expand_path("#{File.dirname(__FILE__)}/..") $LOAD_PATH.unshift GEM_HOME require 'lib/uicov/consts' def self.gather_coverage(opts={}) UICoverage.new.gather_coverage(opts) end end #####...
<filename>src/components/mobileheader.js import React, { useState } from 'react' import '../styles/mobileheader.scss' import {Link} from 'gatsby' import * as FaIcons from 'react-icons/fa' import * as AiIcons from 'react-icons/ai' import * as HiIcons from "react-icons/hi"; export default () => { const [sidebar, se...
#!/usr/bin/env bash oc get routes --all-namespaces | awk 'NR>1' | python check_urls_parallel.py
public class MainActivity extends AppCompatActivity { private List<Question> questions; private ListView listView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //Get the data from the...
Implement a decision tree algorithm using a greedy approach to determine the best attribute to split a node at each step. The algorithm should use Gini index as the metric to select the best attributes and should run in O(n^2) time. After training, the algorithm should be able to classify test data with accuracy greate...
import numpy as np def sigmoid(x): return 1 / (1 + np.exp(-x)) def calculate_gamma(policy_num, gamma0, gamma1, gamma2): if policy_num == 0: return gamma0 elif 1 <= policy_num <= 6: g = 10 * ((2 * policy_num - 6) / 6) g = gamma1 + (gamma0 - gamma1) * sigmoid(g) return g ...
<reponame>Zac-Garby/Radon package runtime const initialStorePoolSize = 32 // A StorePool contains a number of Stores, which can be released quickly. This avoids // creating stores, which is slower than just reusing existing ones. type StorePool struct { stores []*Store } // NewStorePool makes a new store pool with ...
<reponame>ritaswc/wechat_app_template Page({ data: { src: '', controls: true, loading: true, }, hideControl() { this.setData({ controls: !this.data.controls, }); }, onLoad(params) { //console.log(params); this.setData({ src: params.videoUrl, loading: false, }); }, // 当开始/继续播放时触发pla...
package generic import ( "github.com/benthosdev/benthos/v4/internal/bundle" "github.com/benthosdev/benthos/v4/internal/component/metrics" "github.com/benthosdev/benthos/v4/internal/docs" "github.com/benthosdev/benthos/v4/internal/log" ) func init() { _ = bundle.AllMetrics.Add(func(metrics.Config, log.Modular) (m...
#!/bin/sh echo "*** Initial system setup" apt update -y apt upgrade -y apt install -y docker.io echo "" echo "*** Setup script" echo "#!/bin/bash" > ~/run echo "" >> ~/run echo "docker stop presearch-node ; docker rm presearch-node ; docker stop presearch-auto-updater ; docker rm presearch-auto-updater ; docker run ...
import { assert } from 'chai' import * as jsdocx from '../dist/jsdocx' describe('#ES6', () => { describe('#import', () => { it('should import the library', () => { let doc = new jsdocx.Document() assert.equal(doc.hasOwnProperty('files'), true) assert.equal(typeof doc.files, 'object') }) }...
import Vue from 'vue' import Vuex from 'vuex' import { firebaseMutations, firebaseAction } from 'vuexfire' import { db } from '@/store/utils/firestore' import auth from './auth' import user from './user' import roles from './roles' import attendance from './attendance' import markattendance from './attendance/mark' i...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
(((1))) (((1 * 2))) ((1 * (2 + 3))) (( (2 + 3) / 2 )) (( (2 + 3) / (1/2 + (3*4) / 5) )) # Error: (( (3) * ))
/** * Created by desaroger on 26/02/17. */ module.exports = require('require-dir')();
<filename>electron/lib/errhandler.ts import log from 'electron-log'; export function errHandler(err: never): void { log.error(err); }
<gh_stars>1000+ function $(str){ return page.getHtml().$(str).toString(); } function xpath(str){ return page.getHtml().xpath(str).toString(); } function urls(str){ links = page.getHtml().links().regex(str).all(); page.addTargetRequests(links); }
#!/usr/bin/env sh set -e cd /etc/shlink echo "Creating fresh database if needed..." php bin/cli db:create -n -q echo "Updating database..." php bin/cli db:migrate -n -q echo "Generating proxies..." php vendor/doctrine/orm/bin/doctrine.php orm:generate-proxies -n -q echo "Clearing entities cache..." php vendor/doct...
# frozen_string_literal: true DiscourseDev::Engine.routes.draw do get ':username_or_email/become' => 'admin/impersonate#create', constraints: AdminConstraint.new end
<reponame>Preeti240/Online-Proctoring # -*- coding: utf-8 -*- import cv2 import numpy as np import math from face_detector import get_face_detector, find_faces from face_landmarks import get_landmark_model, detect_marks def get_2d_points(img, rotation_vector, translation_vector, camera_matrix, val): ""...
<reponame>fernandosev/Tetris---React-Native-Expo import React, { useState, useEffect } from 'react'; import { SafeAreaView, View, Text, TouchableOpacity, StyleSheet, Image, AsyncStorage } from 'react-native'; //animacoes import * as Animatable from 'react-native-animatable'; import logo fr...
# Prompt the user to input the counting direction direction = input('Which direction do you want to count? (up/down)').strip().lower() # Check the user's input and perform the counting accordingly if direction == 'up': for i in range(1, 11): print(i) elif direction == 'down': for i in range(10, 0, -1):...
class Solution { public: bool containsDuplicate(vector<int>& nums) { sort(nums.begin(),nums.end()); int i=0; int flag = 0; for(int j=1;j<nums.size();j++){ if(nums[i]!=nums[j] && i!=j){ i=j; } else if(nums[i]==nums[j] && i!=j){ ...
#!/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 applica...
def on_line(points): x1, y1 = points[0] x2, y2 = points[1] x3, y3 = points[2] x4, y4 = points[3] # Calculating line equation a = x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2) # Slope of line b = (x1**2 + y1**2) * (y3 - y2) + (x2**2 + y2**2) * (y1 - y3) + (x3**2 + y3**2) * (y...
#!/usr/bin/env sh python3 -m unittest discover tests ./polyprofile.py --config cfg/server_config.yaml --serverInfo --destination .
/* eslint no-unused-vars: "off" */ const Discord = require('discord.js'); const ytdl = require('ytdl-core'); const YouTube = require('simple-youtube-api'); const urlCheck = require('is-playlist'); const youtube = new YouTube(process.env.API_TOKEN); module.exports = { name: 'play', category: 'Music', usage: '<video ...
<reponame>addcolouragency/craft_storefront import { Repository } from "typeorm"; import { ShippingProfile } from "../models/shipping-profile"; export declare class ShippingProfileRepository extends Repository<ShippingProfile> { }
import { expect } from 'chai'; import { shallowMount } from '@vue/test-utils'; import Header from '@/components/Header.vue'; describe('Header.vue', () => { it('mounts and creates the nav element', () => { const wrapper = shallowMount(Header); expect(wrapper.find('nav').exists()).to.be.true; }); });
<reponame>oliverselinger/failsafe-executor package os.failsafe.executor; import java.sql.Connection; /** * This is a functional interface which represents a lambda, accepting a connection and a parameter. */ public interface TransactionalTaskFunction<T> { void accept(Connection connection, T param) throws Excep...
<filename>src/main/java/io/github/theindifferent/completionresult/ResultError.java /* * BSD 3-Clause License * * Copyright (c) 2018, Stanislav "The Indifferent" Baiduzhyi * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that...
#!/usr/bin/env bash set -Eeuo pipefail # usage: mkdir -p output && ./run-script.sh ./examples/debian.sh output ... thisDir="$(readlink -f "$BASH_SOURCE")" thisDir="$(dirname "$thisDir")" source "$thisDir/scripts/.constants.sh" \ --flags 'image:' \ --flags 'no-bind' \ --flags 'no-build' \ -- \ '[--image=foo/bar:...
<gh_stars>100-1000 var searchData= [ ['page_5f4k',['PAGE_4k',['../core__ca_8h.html#gab184b824a6d7cb728bd46c6abcd0c21aa99ce0ce05e9c418dc6bddcc47b2fa05a',1,'core_ca.h']]], ['page_5f64k',['PAGE_64k',['../core__ca_8h.html#gab184b824a6d7cb728bd46c6abcd0c21aafc53512bbf834739fcb97ad1c0f444fc',1,'core_ca.h']]], ['privtim...
#!/bin/bash bootstrap_dnf() { systemctl enable postfix.service systemctl start postfix.service } group_repo_post() { # Nothing to do for EL : } distro_custom() { # install avocado dnf -y install python3-avocado{,-plugins-{output-html,varianter-yaml-to-mux}} \ clustershell ...
import React, { Component } from 'react'; import PlayerAlbumArt from './album-art'; import PlayerTrack from './player-track'; import PlayerArtists from './artists'; import PlayerBackgroundAlbumArt from './background-album-art'; import Slider from '../slider'; export default class Player extends Component { construct...
import {AsyncSocketConnection} from "../AsyncSocketConnection"; import {uuid} from "uuidv4"; import {Room} from "./Room"; import {IPlayerData} from "../../_types/game/IPlayerData"; import {AnswerCard} from "./cards/AnswerCard"; import {withErrorHandling} from "../services/withErrorHandling"; export class Player { ...
import { html, LitElement } from 'lit-element/lit-element.js'; import { ButtonMixin } from '../button-mixin.js'; class TestButtonElem extends ButtonMixin(LitElement) { render() { return html` <button>Test Button</button> `; } } customElements.define('test-button-elem', TestButtonElem);
<gh_stars>1-10 import React from 'react'; import { CodeDemo, Api } from '../CommonDispalyComponents'; import './avatar.example.scss'; import CodeDemo1 from './avatar.codeDemo1'; const code1 = require('!!raw-loader!./avatar.codeDemo1.tsx'); import CodeDemo2 from './avatar.codeDemo2'; const code2 = require('!!raw-loader...
<gh_stars>0 package simulator.fitness; import simulator.Node; public class ImprovedFitnessCalculator extends AbstractFitnessCalculator { @Override public void updateFitnessForNode(Node n) { double current_fittness_value = n.getEs().getEnergy_spent_sad_from_last_update()-(n.getEs().getEnergy_spent_coopera...
#!/bin/sh test -f /data/.shadow/.etc/wpa_supplicant.enabled -a -f /data/.shadow/.etc/wpa_supplicant.conf
def generatePolicy(principalId, userDetails, effect, methodArn): policy = { 'principalId': principalId, 'policyDocument': { 'Version': '2012-10-17', 'Statement': [ { 'Action': 'execute-api:Invoke', 'Effect': effect, ...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
<reponame>afilippov-ua/data-validation-tool /* * Copyright 2018-2020 the original author or 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 * * https://www.apac...
<filename>lib/ftp4j-1.7.2/src/it/sauronsoftware/ftp4j/NVTASCIIReader.java /* * ftp4j - A pure Java FTP client library * * Copyright (C) 2008-2010 <NAME> (www.sauronsoftware.it) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public Li...
import imaplib import email import os # Source mailbox settings, assuming IMAP source_mailbox = "<path to source mailbox>" source_mailbox_username = "<source mailbox username>" source_mailbox_password = "<source mailbox password>" # Destination mailbox settings, assuming IMAP destination_mailbox = "<path to destinati...
import { URI } from "../../primitives"; import { CaptionDescriptor } from "../images/caption-descriptor"; /** * Signature/interface for a `GalleryItem` object * @see https://developer.apple.com/documentation/apple_news/galleryitem */ export interface GalleryItem { URL: URI; accessibilityCaption?: string; capt...
#!/usr/bin/etc/ bash set -e # get or locate the project # build it as a shared library cd ./FooBar sh build.sh # library is here => ./FooBar/build/libfoobar.so # copy the .so file to a convinient location echo echo "copying raw native library for convinience ... ...." cp ./build/libfoobar.so ../java_api_build/lib/ ...
<filename>src/main/java/cc/javajobs/buildtools/JavaVersion.java package cc.javajobs.buildtools; /** * An index of Java version names to their respective class versions. * <p> * Thanks to: https://en.wikipedia.org/wiki/Java_class_file#General_layout * </p> * * @author <NAME> * @since 11/07/2021 - 11:39 */ p...
#!/bin/bash source /environment.sh source /opt/ros/noetic/setup.bash source /code/catkin_ws/devel/setup.bash source /code/exercise_ws/devel/setup.bash python3 /code/solution.py & roslaunch --wait car_interface all.launch veh:=$VEHICLE_NAME &
<gh_stars>1-10 from rofl import setUpExperiment, retrieveConfigYaml import argparse import sys def argParser(args): parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, description="Parse arguments for Train RoLas Experiments", epilog="python train.py -a d...
<filename>dist/providers/database/ResourceManager.d.ts import { CollectionReference } from "@firebase/firestore-types"; import { RAFirebaseOptions } from "../RAFirebaseOptions"; import { IFirebaseWrapper } from "./firebase/IFirebaseWrapper"; import { User } from "@firebase/auth-types"; import { messageTypes } from ...
#!/bin/bash #### Download code from GitHub sudo rsync -r /home/ec2-user/.aws /opt/datavirtuality/ sudo chown -R datavirtuality:datavirtuality /opt/datavirtuality/.aws
<gh_stars>10-100 export const { DIP_API_KEY = '', DIP_API_ENDPOINT = 'https://search.dip.bundestag.de' } = process.env; export const PORT = process.env.PORT ? parseInt(process.env.PORT) : 3101; export const RATE_LIMIT = process.env.RATE_LIMIT ? parseInt(process.env.RATE_LIMIT) : 1;
<gh_stars>0 #include "CashShopBarter.h" namespace Lunia { namespace XRated { namespace Database { namespace Info { void CashStampInfo::Serialize(Serializer::IStreamWriter& out) const { out.Begin(L"AllM::XRated::Database::Info::CashStampInfo"); out.Write(L"ItemHash", Hash); out.Write(L"Fee",...
<gh_stars>0 $(document).ready(function() { var wrcbc, n; try { if (typeof(Storage) !== "undefined") { wrcbc = JSON.parse(localStorage.getItem("wrcbc")); n = wrcbc.chain.length - 1; if (n > 0) { $("#wrc-no").attr("placeholder", "Please enter wrc no (1...
<html> <head> <title>Input Validation</title> <script> function validateForm() { var name = document.forms['myForm']['name'].value; var age = document.forms['myForm']['age'].value; if (name == "" || age == "") { alert("Name and age must be filled out"); return false; } if (isNaN(age) || age < 0 || age > ...
def max_of_two(x, y): if x > y: return x else: return y x = 3 y = 6 maximum = max_of_two(x, y) print('The maximum of', x, 'and', y, 'is', maximum)
<reponame>Wlisfes/lisfes-service<gh_stars>1-10 import { Injectable, HttpException, HttpStatus } from '@nestjs/common' import { InjectRepository } from '@nestjs/typeorm' import { Repository, Brackets, getManager } from 'typeorm' import { CloudEntity } from '@/entity/cloud.entity' import { ArticleEntity } from '@/entity/...
PASSWORD="hussein15" #PASSWORD=$varname3 #username=jack #ADDR="cosmos1fz0vzrc5kawwa343tcu84hcglmcsgj4xcyuzxz" RECEIVER="cosmos1cjlufmfz03rd6r74jcmdesth3yf268467x8c0q" VALIDATOR="cosmosvaloper1fz0vzrc5kawwa343tcu84hcglmcsgj4xasgh23" AMOUNT="1000000stake" CHAIN="smartcity" #PROPOSALID="2" #HOME="~/.sd" file="/root/go/sr...
<filename>d6p2.py def stringify(banks): return ' '.join([str(x) for x in banks]) # the final banks in part 1, # have to find how many cycles it takes to get back to this configuration banks = [1, 1, 0, 15, 14, 13, 12, 10, 10, 9, 8, 7, 6, 4, 3, 5] num_banks = len(banks) found = [] while True: print(banks) ...
import React from 'react'; export default ({ className = '', style = {} }) => ( <svg className={className} style={style} version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140" > <path fill="#39A1B7" d="M123.57,23.09l3.43-8.64H13l3.11,7.85c2.58,6.5,3.9,13.42,3.9,2...
<reponame>michael-conway/policy-domains<gh_stars>0 /** * */ package org.angrygoat.domain.ingest.config; import java.util.ArrayList; import java.util.List; import org.angrygoat.domainmachine.exception.PolicyDomainRuntimeException; import org.irods.jargon.core.connection.IRODSAccount; import org.irods.jargon.core.ex...
#!/bin/bash set -o nounset errexit pipefail # Collect the API Proxy and Hosted Target (Sandbox server) # files into build/apiproxy/ and deploy to Apigee rm -rf build/proxies mkdir -p build/proxies/sandbox mkdir -p build/proxies/live cp -Rv proxies/sandbox/apiproxy build/proxies/sandbox cp -Rv proxies/live/apiproxy b...
<reponame>mist8kengas/mal-ts enum API { V2 = 'https://api.myanimelist.net/v2', } enum Type { Anime = '/anime', Manga = '/manga', } export { API, Type }; export default function malURL( api: API, endpoint: Type, id: string | number, fields?: string[] ) { const malURL = new URL(`${api}${e...
from typing import Any class content_property: def __init__(self): self.send_on = None self.resources = [] class GenericRecipientCollection: def __init__(self, session: Any, type: str): self.session = session self.type = type self.recipients = [] class ResourceRecipien...
macro_rules! impl_bit_count { ($t:ty, $w:expr) => { #[cfg(target_pointer_width = "64")] impl BitCount for $t { fn bit_count() -> usize { $w } } }; } trait BitCount { fn bit_count() -> usize; } #[cfg(target_pointer_width = "64")] impl_bit_coun...
def group_by_criteria(list_obj, criteria): grouped = {} for obj in list_obj: key = obj[criteria] if key not in grouped: grouped[key] = [] grouped[key].append(obj) return grouped groups = group_by_criteria([{'name': 'Alice', 'age': 20}, {'name': 'Bob', 'age': 22}, {'name'...
#!/bin/sh echo "START: insmod" sudo /sbin/modprobe uio sudo /sbin/insmod $RTE_SDK/build/kmod/igb_uio.ko sudo /sbin/insmod $RTE_SDK/build/kmod/rte_kni.ko
<filename>app/src/main/java/com/weilaiweather/android/gsons/Suggestion.java package com.weilaiweather.android.gsons; /** * Created by Lucky on 2017/6/27. */ public class Suggestion { public Comf comf; public CW cw; public Drsg drsg; public Flu flu; public Sport sport; public Trav trav; ...
#!/usr/bin/env bash # Copyright 2019 The Tekton Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
import { Field, ObjectType, ID } from '@nestjs/graphql'; import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { Document, Types } from 'mongoose'; import { TypeEnum } from './project.dto'; @ObjectType() @Schema({ timestamps: true }) export class Project extends Document { @Field(() => ID) id:...
#!/bin/bash #SBATCH --account=def-dkulic #SBATCH --mem=8000M # memory per node #SBATCH --time=23:00:00 # time (DD-HH:MM) #SBATCH --output=/project/6001934/lingheng/Double_DDPG_Job_output/continuous_BipedalWalkerHardcore-v2_ddpg_hardcopy_action_noise_seed1_run1_%N-%j.out # %N for node name, %j for ...
<reponame>10088/spring-data-mongodb<gh_stars>0 /* * Copyright 2017-2022 the original author or 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 * * https://www.apache.org/...
name=Ableitung path=/tmp/$name-dc40 mkdir -p $path pdflatex -output-format dvi -output-directory $path $name.tex dvipdfmx $path/$name.dvi # mv $path/$name.pdf ./
public class HSVtoRGB { public static int[] hsvToRgb(float[] hsv){ float r = 0, g = 0, b = 0; int h = (int) hsv[0]; float s = hsv[1], v = hsv[2]; if( s == 0 ) { r = v; g = v; b = v; } else { float var_h = h * 6; ...
function maxProfit(prices) { let maxProfit = 0; for (let i = 0; i <= prices.length - 1; i++) { for (let j = i + 1; j <= prices.length; j++) { let profit = prices[j] - prices[i]; if (profit > maxProfit) maxProfit = profit; } } return maxProfit; } ...
package dk.kvalitetsit.hjemmebehandling.service.access; import dk.kvalitetsit.hjemmebehandling.constants.Systems; import dk.kvalitetsit.hjemmebehandling.context.UserContext; import dk.kvalitetsit.hjemmebehandling.context.UserContextProvider; import dk.kvalitetsit.hjemmebehandling.fhir.FhirClient; import dk.kvalitetsit...
<gh_stars>0 /** * Created by amirbakhtiari on 6/1/17. */ (function() { 'use strict'; angular.module('admin.controllers', []) .controller('LoginController', ['$scope', 'User', '$state', function($scope, User, $state) { $scope.login = function() { User.login($scope.loginForm...
#!/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"); yo...
import React, { ReactElement, ReactNode } from 'react'; import { renderHook } from '@testing-library/react-hooks'; import { render, screen } from '@testing-library/react'; import '@testing-library/jest-dom/extend-expect'; import { useLoading, LoaderProvider } from '../src'; describe('useLoading', () => { test('rend...
package edu.mdamle.beans; import java.time.LocalDate; import java.time.Period; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class TuitionReimbursementRequest { private static Logger log = LogManager.getLogger(TuitionReimbursementRequest.class); public enum GradingFor...
set -x echo "start running" for i in {1..5} do echo "##### run for test ${i} #####" bash run.sh mv *.npz out mv out/* ../train/test-right-y done for i in {1..15} do echo "##### run for train ${i} #####" bash run.sh mv *.npz out mv out/* ../train/train-right-y done #cd ../train #python preproce...
<reponame>andreiox/challenges import util import functools class Loteria: def __init__(self, quantidade_dezenas, total_jogos): if quantidade_dezenas < 6 or quantidade_dezenas > 10: raise Exception('Quantidade de dezenas deve ser entre 6 e 10') self.__quantidade_dezenas = quantidade_de...
<!DOCTYPE html> <html> <head> <title>Input Form</title> </head> <body> <form> <input type="text" id="textInput" name="inputValue" /> <input type="submit" value="Submit" onClick="alertInputValue()" /> </form> <script> function alertInputValue() { let inputValue = document.getElementById("textInput").value;...
#!/usr/bin/env bash cd "$(dirname "$0")" PBJS=./node_modules/protobufjs/bin/pbjs PBTS=./node_modules/protobufjs/bin/pbts OUTDIR=./src/generated rm -r $OUTDIR mkdir $OUTDIR $PBJS -t static-module -w commonjs -o $OUTDIR/grpc_gcp.js protos/grpc_gcp.proto echo "Generated src/generated/grpc_gcp.js" $PBTS -o $OUTDIR/grpc...
#!/bin/sh ### # # This is my script for ArchLinux # I'll install Arch specific stuff here. # ## # https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html if [ ! -f /etc/zsh/zshenv ]; then mkdir -p /etc/zsh cp etc/zsh/zshenv /etc/zsh/zshenv source /etc/zsh/zshenv echo "file /et...
<gh_stars>1-10 import React, { Component } from 'react'; import { TimelineLite } from 'gsap'; class Header extends Component { componentDidMount() { const animationHeaders = new TimelineLite(); const header = this.header; const headerTitle = this.headerTitle; const headerAuthor = this.headerAuthor; ...
<reponame>samueltan3972/spring-petclinic-rest<filename>report/reports/data/problem_summary_df25451e-e5b6-4bf9-baf8-d2a72a9dea7b.js<gh_stars>0 MIGRATION_ISSUES_DETAILS["df25451e-e5b6-4bf9-baf8-d2a72a9dea7b"] = [ {description: "<p>The application embeds a Swagger library.<\/p>", ruleID: "integration-00005", issueName: "E...