text
stringlengths
1
1.05M
<reponame>kant/taggr<gh_stars>10-100 import React from "react"; import styled from "styled-components"; const Wrapper = styled.div<{ url: string }>` height: 100%; width: 100%; border-radius: 6px; background-image: url("${(props) => props.url}"); background-repeat: no-repeat; background-position: center cen...
import React, { useRef, useEffect, useState, useCallback } from "react"; import { makeStyles } from "@material-ui/core/styles"; import { Grid, Box, Typography } from "@material-ui/core"; import ChatMessage from "./ChatMessage"; import { useScroll, useUpdate, useScrolling, useDebounce } from "react-use"; import ChatUnre...
#!/usr/bin/env bash echo " ______ _" echo " | ___ \ | |" echo " | |_/ / _ ___| |__" echo " | / | | / __| '_ \ " echo " | |\ \ |_| \__ \ | | |" echo " \_| \_\__,_|___/_| |_|"
'use strict'; const arr = [ 'a', 1, true, {value: 'key'}, ['1', '2', '3'], function a() { console.log(`simple function ${a}`); } ]; function SetExample(array) { this.set = array; } SetExample.prototype.iterator = function() { const arr = []; this.set.forEach(el => arr.push({ type: typeof el...
import re class VersionInfo: def __init__(self, major, minor, micro, release_level, serial): self.major = major self.minor = minor self.micro = micro self.release_level = release_level self.serial = serial def parse_version_string(self, version_string): match = ...
use std::sync::Arc; // Define the trait for layers trait Layer { fn any(&self) -> &dyn Layer; } // Define the specific trait for picture layers trait PictureLayer: Layer { fn needs_cache(&self) -> bool; } // Define the ValueBox and its associated functions struct ValueBox<T>(T); impl<T> ValueBox<T> { fn...
<filename>src/material/custom/other/pieces.ts import { PitchValue, Rendering } from '@musical-patterns/material' import { ContourPiece, Thunk } from '@musical-patterns/utilities' import { RenderingName, Renderings, thunkRenderings } from '../../rendering' import { thunkOtherBlocks } from './blocks' import { OtherBlocks...
<filename>AWSteria/builds/RV64ACDFIMSU_Flute_verilator_AWS/Verilog_RTL/vpi_wrapper_c_start_timing.h /* * Generated by Bluespec Compiler, version 2019.05.beta2 (build a88bf40db, 2019-05-24) * * * */ #ifndef __vpi_wrapper_c_start_timing_h__ #define __vpi_wrapper_c_start_timing_h__ #include <vpi_user.h> /* regis...
import { DatePipe } from '@angular/common'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { UtilsServiceService } from '../../../utils-service.service'; @Component({ selector: 'ngx-add-new-bon-livraison', templateUrl: './add-new-bon-livraison.component.html', styleUrls: [...
/* * Copyright [2020-2030] [https://www.stylefeng.cn] * * 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...
import requests url = 'https://www.example.com' response = requests.get(url)
<filename>cmd/compose/parser_test.go package compose import ( "errors" "fmt" "reflect" "strings" "testing" "unsafe" "gopkg.in/yaml.v2" ) const composeFile string = `version: "3.7" services: service: image: service-image volumes: - service:/app:delegated service2: image: service-image2 ...
import { getCurrentUser, logOut } from './core/LogInInteractor' import { deleteAccount } from './core/account/AccountInteractor' export default AppConfig = { initialize: initializeConfiguration, MOCK_SERVICES: { 'react-native-firebase': { shouldUse: true, auth: { ...
*/30 * * * * cd /Users/arpitkjain/Desktop/Data/POC/CoVIDVaccineTracker/cowin_bot && /usr/local/opt/python@3.8/bin/python3 main.py >> /Users/arpitkjain/Desktop/Data/POC/CoVIDVaccineTracker/cowin_bot/cowinBot_output.log 2>&1 */30 * * * * cd /home/arpit/CoVIDVaccineTracker/cowin_bot && /usr/bin/python3 main.py >> /home/a...
import random import numpy as np from sklearn.neural_network import MLPRegressor #create a training and test set from the pseudorandom data random.seed(1) x = np.linspace(0, 1, 200) y = np.array([random.uniform(0,1) for i in range(200)]) #split the data into training and testing x_train = np.reshape(x[:160], (-1, 1)...
const joinArrays = (arr1, arr2) => { return arr1.map(item1 => arr2.find(item2 => item1.id === item2.id)).map(matchingItem => ({ ...matchingItem, ...arr1.find(item1 => item1.id === matchingItem.id) })); };
#include <iostream> #include <vector> struct TeamPoints { int ID; int points; }; std::vector<TeamPoints> teamPoints; // Assuming this vector is initialized with team IDs and initial points void updateTeamPoints(int fTeam, int sTeam, int winner) { for (int i = 0; i < teamPoints.size(); i++) { if (...
var group__sai__sync__control = [ [ "ARM_SAI_ASYNCHRONOUS", "group__sai__sync__control.html#gad123537cb6ab9eefd6feab193ed74655", null ], [ "ARM_SAI_SYNCHRONOUS", "group__sai__sync__control.html#gad2ad5406c30c353e80f54b40b3de5db8", null ] ];
<reponame>NarcisAssignment/SimpleLoadbalancer<gh_stars>0 package controller import ( "net/http" "simpleLoadbalancer/model" "github.com/gin-gonic/gin" ) // It should have pagination and it is not very scalble now func FindBooks(c *gin.Context) { var books []model.Book model.DB.Find(&books) c.JSON(http.StatusOK...
<gh_stars>1-10 #pragma once #ifdef __cplusplus extern "C" { #endif struct RECENT; typedef struct RECENT *PRECENT; PRECENT Recent_New(INT nCapacity); INT Recent_GetCapacity(PRECENT pRecent); INT Recent_GetCount(PRECENT pRecent); LPCTSTR Recent_GetAt(PRECENT pRecent, INT i); void Recent_Print(PRECENT pRecent); INT Rec...
package evilcraft.render.particle; import net.minecraft.block.BlockLiquid; import net.minecraft.block.material.Material; import net.minecraft.client.particle.EntityFX; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; ...
<filename>data-prepper-api/src/main/java/com/amazon/dataprepper/model/sink/Sink.java /* * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ package com.amazon.dataprepper.model.sink; import com.amazon.dataprepper.model.record.Record; import java.util.Collection; /** * Data Prepper sink ...
<gh_stars>0 "use strict"; var candidates = [10, 1, 2, 7, 6, 1, 5]; var target = 8; function combinationSum2(candidates, target) { var results = []; var unique = {}; candidates.sort(); var foo = function (result, ind, sum, str) { if (sum >= target || ind >= candidates.length) { if (su...
<reponame>soarqin/blitzd<filename>blitzd/cache/CheckRevision.cpp #include "Config.h" #include "CheckRevision.h" #include "core/Cfg.h" #include "utils/Memory.h" #include "utils/Random.h" #include "utils/File.h" #include "utils/DataConv.h" #include "text/Parser.h" #include "text/XmlNode.h" namespace Cache { void CheckR...
<reponame>DorinR/Politisense<filename>src/routes/api/ridings.js import express from 'express' const router = express.Router() const controller = require('../../controllers/Controller') // @route post api/ridings/getRidingCode/:riding // @desc get riding code corresponding to the riding name passed in // @access Publi...
<gh_stars>1-10 import datetime from './date'; import stringExtension from './string'; export { datetime, stringExtension };
<filename>src/net/yotvoo/asterd/app/Constants.java package net.yotvoo.asterd.app; class Constants { static final double PREFERED_GAME_SCENE_WIDTH = 1200d; static final double PREFERED_GAME_SCENE_HEIGHT = 800d; static final double MAX_ENEMY_SIZE = 20d; static final double MIN_ENEMY_SIZE = 5d; stati...
<reponame>chrishumboldt/rocket-utility<gh_stars>0 /** * @author <NAME> */ export enum State { ACTIVE = 'active', CLOSED = 'closed', HIDDEN = 'hidden', INACTIVE = 'inactive', LOADING = 'loading', OFF = 'off', ON = 'on', OPEN = 'open', TOGGLED = 'toggled', VISIBLE = 'visible' } export enum Opposin...
<filename>truffle/src/main/java/org/jruby/truffle/language/arguments/ReadCallerFrameNode.java /* * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved. This * code is released under a tri EPL/GPL/LGPL license. You can use it, * redistribute it and/or modify it under the terms of the: * * Ecl...
# This file is supposed to be sourced by each Recipe # that wants to use the functions contained herein # like so: # wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh # . ./functions.sh # RECIPE=$(realpath "$0") # Options for apt-get to use local files rather than the system one...
import time import random from sense_hat import SenseHat sense = SenseHat() while True: for i in ("N", "M", "D"): # Generate random RGB color values c = (random.randint(1, 256), random.randint(1, 256), random.randint(1, 256)) sense.show_letter(str(i), text_colour=c) # Display the letter w...
#!/bin/bash TAG=latest PROJECT=registry.cn-beijing.aliyuncs.com/zkr/kk-addup echo "[GO BUILD] [$PROJECT:$TAG] >>" docker run --rm -v `pwd`:/main:rw -v $GOPATH:/go:rw hailongz/kk-gobuild:latest go build echo "[OK]" echo "[DOCKER BUILD] [$PROJECT:$TAG] >>" docker build -t $PROJECT:$TAG . echo "[OK]" echo "[DOCKER PUSH]...
<gh_stars>1-10 package com.tablebird.serviceproviderbuilder; import androidx.annotation.NonNull; /** * An service achieve builder */ public interface ServiceBuilder<S> { @NonNull S build(); }
#!/bin/bash files=( bin/uptrace_darwin_arm64 bin/uptrace_darwin_amd64 bin/uptrace_linux_arm64 bin/uptrace_linux_amd64 bin/uptrace_windows_amd64.exe dist/uptrace-*.aarch64.rpm dist/uptrace-*.x86_64.rpm dist/uptrace_*_amd64.deb dist/uptrace_*_arm64.deb ); for f in "${files[@]}" do ...
/* * Copyright 2012-2013 <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...
def max_3(n1, n2, n3): max = n1 if n2 > max: max = n2 if n3 > max: max = n3 return max # Example print(max_3(1, 2, 3)) # Output: 3
/// Represents a Process Identifier (PID). type Pid = u32; /// Represents an error number. type Errno = u32; /// Maximum PID value. const MAX_PID: Pid = 65535; /// Represents a PID allocator. struct PidAllocator { used: Vec<bool>, } impl PidAllocator { /// Creates a new PID allocator with the specified capa...
package simix; import clojure.lang.IFn; import com.sun.jna.Pointer; import java.io.Closeable; public class HNSWWrapper implements Closeable { private Pointer ptr; private int nUsers; private boolean closing; public HNSWWrapper(Pointer ptr) { this.ptr = ptr; this.nUsers = 0; this.closing = false;...
#!/bin/bash if [[ "${PY_VER}" =~ 3 ]] then 2to3 -w -n src fi $PYTHON -m pip install . --ignore-installed --no-deps -vv
// Package memwatch provides a memory watcher channel that trips // or suicides when the runtime memory usage is over the limit package memwatch
#!/bin/sh exec docker stop $(cat process.txt)
#!/bin/sh # SPDX-License-Identifier: MIT # Copyright (C) 2021 Roland Csaszar # # Project: Fabulous-TEMPLATE # File: run_sharplint.sh # ################################################################################ # The Nuget token must be saved using `nuget setapikey` to not need to input it. dotnet nuget pus...
/* * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ /* * Reference(s): * - Based on Virtual Texture Demo by Brad Blanchard * http://web.archive.org/web/20190103162638/http://linedef.com/virtual-texture-demo.html */ uniform vec...
package com.scale.invest.data.collection.controller; import com.scale.invest.data.collection.service.InvestFundDataSourceService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RestController; /*...
<filename>test/unit/lib/dropin-error.js const DropinError = require('../../../src/lib/dropin-error'); const BraintreeError = require('braintree-web/lib/braintree-error'); describe('DropinError', () => { test('inherits from Error', () => { const instance = new DropinError({}); expect(instance).toBeInstanceO...
#ifndef _z2c_ZParser_h_ #define _z2c_ZParser_h_ #include <Core/Core.h> using namespace Upp; class ZSource; class ZClass; class Overload; class Def; class Context { public: ZClass* C1 = nullptr; ZClass* C2 = nullptr; Point P; Overload* O = nullptr; Def* D = nullptr; ZSource* S = nullptr; ...
# frozen_string_literal: true require 'rest-gw2/server/action' require 'jellyfish' require 'rack' module RestGW2 CONFIG = ENV['RESTGW2_CONFIG'] || File.expand_path("#{__dir__}/../../.env") def self.extract_env path return {} unless File.exist?(path) Hash[File.read(path).strip.squeeze("\n").each_line.map...
#!/bin/bash echo '=============' echo 'IF STATEMENTS' echo '=============' # basic equality tests # algebraic if [ 3 -eq 3 ]; then echo 'this should print' fi # strings if [ "hi" == "hi" ]; then echo 'strings are equal' fi if [ -n "foo" ]; then echo 'this WILL print b/c string is not empty' fi if [ -z "foo" ]...
from pprint import pprint from cfg.core import ContextFreeGrammar, Terminal, Nonterminal, Marker from cfg.table import END_MARKER, ParseTableNormalForm class GrammarTestCase(object): '''Contains a CFG and optionally a parse table.''' def __init__(self, sections, filename): self.sections = sections ...
<gh_stars>1-10 /* * Gray: A Ray Tracing-based Monte Carlo Simulator for PET * * Copyright (c) 2018, <NAME>, <NAME>, <NAME>, <NAME> * * This software is distributed under the terms of the MIT License unless * otherwise noted. See LICENSE for further details. * */ #include "Gray/Graphics/ViewableParallelepiped....
/// <reference types="react" /> export interface Props { /** * Exit (unmount) the whole Ink app. */ readonly exit: (error?: Error) => void; } /** * `AppContext` is a React context, which exposes a method to manually exit the app (unmount). */ declare const AppContext: import("react").Context<Props>;...
<gh_stars>10-100 package com.imooc.scala.stream.transformation import org.apache.flink.streaming.api.scala.{DataStream, StreamExecutionEnvironment} import org.apache.flink.api.scala._ /** * 分区规则的使用 * Created by xuwei */ object StreamPartitionOpScala { def main(args: Array[String]): Unit = { val env = StreamEx...
#!/bin/sh export PATH="/usr/local/opt/util-linux/bin:$PATH" export PATH="/usr/local/opt/util-linux/sbin:$PATH"
import store, {useAppSelector} from "store"; import {ApplicationState} from "types/store"; import {ActionFactory} from "store/action"; import "../BoardSettings/BoardSettings.scss"; import {useTranslation} from "react-i18next"; import {BoardOption} from "./BoardOption"; import {BoardOptionButton} from "./BoardOptionButt...
const todoLength = document.querySelector('strong'); export const viewActive = (e) => { const $selected = event.target.closest('a'); //resetScreen(); $selected.classList = 'selected' document.querySelectorAll('.todo-list > li').forEach((li) => { li.classList.remove('hidden'); if(...
<reponame>fmi-basel/improc<gh_stars>0 import numpy as np from scipy.ndimage.filters import gaussian_filter from scipy.ndimage import find_objects from skimage.transform import rescale def resample_labels(labels, factor): '''Resample labels one by one with a gaussian kernel''' # TODO check alignment for float...
/* OOP345 Workshop 2 Title : Compound Types Date : 03/01/17 Author : <NAME> Student# : 038515151 Email : <EMAIL> */ #include <iostream> #include <fstream> #include <cctype> #include <iomanip> #include <string> #include "Stations.h" #include "Station.h" using namespace std; namespace w2 { Stations::St...
# # only init if installed. fasd_cache="$HOME/.fasd-init-bash" if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then eval "$(fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install)" >| "$fasd_cache" fi source "$fasd_cache" unset fasd_cache unalias -m "s" # jump ...
public class Connector { // Other members and properties are not shown for brevity /// <summary> /// Returns 'true' if a connection is attached to the connector. /// The other end of the connection may or may not be attached to a node. /// </summary> public bool IsConnectionAttached => Attached...
#!/bin/bash THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source $THIS_DIR/../utils.sh function main() { local crontabFile="$THIS_DIR/crontab" local logFile="$THIS_DIR/cron.log" local updateAll="$THIS_DIR/../../update.sh >> $logFile 2>&1" local logRotate="$THIS_DIR/logRotate.sh >> $logFile 2>&1"...
#!/bin/bash #SBATCH --account=def-lombaert #SBATCH --gres=gpu:1 # Number of GPUs (per node) #SBATCH --cpus-per-task=8 # CPU cores/threads #SBATCH --mem=92G # memory (per node) #SBATCH --time=05-00:00 # time (DD-HH:MM) #SBATCH --mail-user=pierre-luc.delisle@live.com #SBATC...
#!/bin/bash # SPDX-License-Identifier: Apache-2.0 # The model name is passed as an argument -n name source $(dirname $0)/xrs.sh source $(dirname $0)/name_flag.sh xrs_print_status_message "Creating model from meshroom for ${name} with model in ${MODEL_DIR}" # Create the blender folder if it does not exist mkdir -p ${M...
package avardstock import ( "context" "encoding/csv" "encoding/json" "errors" "fmt" "github.com/jinzhu/gorm" . "github.com/qasemt/helper" "golang.org/x/sync/semaphore" _ "golang.org/x/sync/semaphore" "io/ioutil" "os" "path" "strconv" "strings" "sync" "time" ) func floatFromString(raw interface{}) (flo...
<filename>qa/common/rest/lbaas_helper.py from base_rest_helper import * class PoolHelper(BaseRESTHelper): def create_pool(self, parameters=None): """ Create lbaas pool with specified parameters. Almost all parameters are not required to be passed into method - default values will be assig...
#!/usr/bin/env bash set -e # this script is used to update vendored dependencies # # Usage: # vendor.sh revendor all dependencies # vendor.sh github.com/docker/engine-api revendor only the engine-api dependency. # vendor.sh github.com/docker/engine-api v0.3.3 vendor only engine-api at the specified tag/commit. # vendo...
#!/bin/sh set -e /greengrass/ggc/core/greengrassd start daemon_pid=`cat /var/run/greengrassd.pid` # block docker exit until daemon process dies. while [ -d /proc/$daemon_pid ] do # Sleep for 1s before checking that greengrass daemon is still alive daemon_cmdline=`cat /proc/$daemon_pid/cmdline` if awk 'BEGIN{ exit...
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0 and the Server Side Public License, v 1; you may not use this file except * in compliance with, at your election, the Elastic License 2.0 or the Server...
#!/bin/bash while [ -n "$1" ]; do case $1 in -l|--local) kubectl config use-context minikube ;; -p|--prod) kubectl config use-context --namespace=roygi prod_cluster ;; esac shift done
<gh_stars>10-100 import { YarnProcess } from './yarn' import { NpmProcess } from './npm' export { YarnProcess } export { NpmProcess } export const Runners = [YarnProcess, NpmProcess]
#include<iostream> using namespace std; //Node structure struct Node { int data; Node* next; }; //Function to insert a node void insertNode(Node** head, int newData) { Node* newNode = new Node(); newNode->data = newData; newNode->next = (*head); (*head) = newNode; } //Function to print the linked list v...
<reponame>huangbin082/Bin package com.leetcode; public class Solution_1185 { static String[] w = new String[]{"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}; static int[] m = new int[]{0, 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; public String dayOfTheWeek(int day, int...
import java.util.Stack; public int countValidSubarrays(int[] nums) { int ans = 0; Stack<Integer> stack = new Stack<>(); for (int num : nums) { while (!stack.isEmpty() && stack.peek() > num) stack.pop(); stack.push(num); ans += stack.size(); } return ans; }
<filename>src/main/java/bi/ihela/client/dto/init/Merchant.java<gh_stars>1-10 /** * */ package bi.ihela.client.dto.init; import java.io.Serializable; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonRootName;...
# ----------------------------------------------------------------------------- # # Package : html2text/html2text # Version : 4.0.1 # Source repo : https://github.com/mtibben/html2text # Tested on : RHEL 8.3 # Script License: Apache License, Version 2 or later # Maintainer : BulkPackageSearch Automation <sethp@us.ibm.c...
#!/bin/bash NODE_ENV=production node server
<filename>4.2_update.cpp #include "2_Game.hpp" void Game::update() { switch( state ) { case MainMenu: break; case Playing: //myPlayer movements if( (sf::Keyboard::isKeyPressed(sf::Keyboard::A) && myPlayer.getPosition().x > 0) || (sf::Keyboard::isKeyPressed(sf::...
/* Copyright AppsCode Inc. and Contributors 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 writing...
// Define the WalletManagerDisconnectReason enum public enum WalletManagerDisconnectReason { case networkError case authenticationError case insufficientFunds // Add more reasons as needed } // Implement the getDisconnectReason function func getDisconnectReason(state: WalletManagerState) -> WalletManag...
#!/bin/bash set -eo pipefail ARCH="$1" echo "Customize ${ARCH}-bit version of Raspberry Pi OS Lite disk image" if [ "${ARCH}" = "32" ]; then DOWNLOAD_DIR="$(curl --silent 'https://downloads.raspberrypi.org/raspios_lite_armhf/images/?C=M;O=D' | grep --extended-regexp --only-matching 'raspios_lite_armhf-[0-9]{4}-[0-...
import os import numpy as np import tifffile import imctools.external.omexml as ome from xml.etree import cElementTree as ElementTree import sys import warnings from imctools.io import change_dtype, CHANGE_DTYPE_LB_WARNING, CHANGE_DTYPE_UB_WARNING if sys.version_info.major == 3: from io import StringIO uenc ...
<gh_stars>1-10 // 5550. 나는 개구리로소이다 // 2019.07.07 #include<iostream> #include<string> using namespace std; int main() { int test_case; int T; cin >> T; string croak = "croak"; for (test_case = 1; test_case <= T; ++test_case) { string s; cin >> s; int pos = 0; int ans = 0; bool flag = true; // 개구리를 찾았...
<gh_stars>0 package pulse.ui.components.models;
#!/bin/bash # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
#!/bin/bash #SBATCH --account=def-dkulic #SBATCH --mem=8000M # memory per node #SBATCH --time=10:00:00 # time (DD-HH:MM) #SBATCH --output=/project/6001934/lingheng/Double_DDPG_Job_output/discrete_Acrobot-v1_doule_ddpg_softcopy_action_noise_seed4_run1_%N-%j.out # %N for node name, %j for jobID mod...
import { Component, OnInit, Input } from '@angular/core'; @Component({ selector: 'app-carousel', templateUrl: './carousel.component.html', styleUrls: ['./carousel.component.scss'], }) export class CarouselComponent implements OnInit { @Input() images: Array<String>; @Input() minHeight: String; @Input() aut...
#!/usr/bin/env bash export LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL:-''} export DOMAIN=${DOMAIN:-'localhost'} rm -f /etc/nginx/sites-enabled/* /etc/nginx/sites-available/* cp /opt/http.conf /etc/nginx/sites-enabled/http.conf cp /opt/supervisor.conf /etc/supervisor/conf.d/supervisor.conf /usr/bin/supervisord -c /etc/sup...
#!/bin/sh rm bg1cre/ajantd.cre 2>>bgt/bash.debug rm bg1cre/amnis2.cre 2>>bgt/bash.debug rm bg1cre/archdr.cre 2>>bgt/bash.debug rm bg1cre/avery.cre 2>>bgt/bash.debug #rm bg1cre/bandit2.cre - this is now used by bgt-weidu rm bg1cre/bandit3.cre 2>>bgt/bash.debug rm bg1cre/bart8.cre 2>>bgt/bash.debug rm bg1cre/bart9.cre 2>...
# Log activity. echo "===============================================================================" echo "Install db2 client" echo "==============================================================================="
# models.py from django.db import models class SubscriptionPlan(models.Model): name = models.CharField(max_length=100) price = models.DecimalField(max_digits=10, decimal_places=2) automatic_renewal = models.BooleanField(default=False, verbose_name='has automatic renewal') class Quota(models.Model): na...
package edu.washington.cse.instrumentation.analysis.utils; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.yaml.snakeyaml.DumperOptions; import org.ya...
<gh_stars>0 import { Injectable } from '@angular/core'; import { Http } from "@angular/http"; import { ChatMessage } from "./chat-message"; import { Observable } from 'rxjs'; import "rxjs/add/operator/toPromise"; @Injectable() export class ChatService { apiRoot: string = "http://localhost:5000/api/chat"; wsRoot: s...
#include<stdio.h> int main() { int A[2][2], B[2][2], C[2][2]; int i, j; printf("Enter elements of 1st matrix\n"); for (i = 0; i < 2; ++i) for (j = 0; j < 2; ++j) { scanf("%d", &A[i][j]); } printf("Enter elements of 2nd matrix\n"); for (i = 0; i < 2;...
/* * */ package net.community.chest.web.servlet; import javax.servlet.http.HttpServletRequest; import net.community.chest.lang.StringUtil; import net.community.chest.util.AbstractParametersHolder; /** * <P>Copyright as per GPLv2</P> * <P>Provides useful decoding methods to {@link HttpServletRequest} parameters</...
// Package main package main import ( "fmt" ) func search(slice []int, value int) int { for i, v := range slice { if v == value { return i } } return -1 } func main() { slice := []int{21, 23, 24, 25} value := 24 index := search(slice, value) fmt.Printf("Index of %d is %d\n", value, index) }
package tr.com.minicrm.productgroup.data.postgresql; import tr.com.minicrm.productgroup.data.ProductGroup; public class ProductGroupImpl implements ProductGroup { private Long id; private String name; private int version; public ProductGroupImpl(Long id, String name, int version) { super(); this.i...
'use strict'; const childProcess = require('child_process'); const fs = require('fs'); const path = require('path'); function getFiles(cppDir) { return fs .readdirSync(cppDir) .filter(function (item) { const fullPath = path.join(cppDir, item); return fs.lstatSync(fullPath)....
/* * Copyright (c) Open Source Strategies, Inc. * * Opentaps is free software: you can redistribute it and/or modify it * under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Opentap...
#!/bin/bash -x V2="--server https://acme-v02.api.letsencrypt.org/directory" #sudo apt install letsencrypt curl -X POST http://127.0.0.1:31600/api/daemon/stop/$PROXY_DAEMON sudo letsencrypt certonly --standalone -d $PROXY_HOSTNAME --force-renew $V2 curl -X POST http://127.0.0.1:31600/api/daemon/start/$PROXY_DAEMON
export * from './ponyfill';
//// [excessPropertyCheckWithUnions.ts] type ADT = { tag: "A", a1: string } | { tag: "D", d20: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 } | { tag: "T", } let wrong: ADT = { tag: "T", a1: "extra" } wrong = { tag: "A", d20: 12 } wrong = { tag: "D" } ty...