text
stringlengths
1
1.05M
#!/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin cd /opt/progs rm map.sql wget http://ts19.travian.com/map.sql if [ "$?" != "0" ] then exit 1 fi sed -i "s/\`x_world\`/ts19com/g" map.sql PGPASSWORD=123456 psql tr -U www-data -c "DELETE FROM ts19com;"; PGPASSWORD=123456 ...
/* * <NAME> * 11/13/16 * EmployeeType.java */ package edu.greenriver.it.hr.employees; /** * Enumeration for employee type. */ public enum EmployeeType{ HOURLY, SALARY }
<filename>src/main/java/domainentitites/PrivilegesMethods.java package domainentitites; import generalmethods.DeleteRequest; import generalmethods.GetRequest; import generalmethods.PostRequest; import io.restassured.response.Response; public class PrivilegesMethods { GetRequest getRequest = new GetRequest(); ...
package scanner; import org.jooby.mvc.GET; import org.jooby.mvc.Path; @Path("/") public class MyController { @GET public String index() { return "It works!"; } }
/* * Copyright 2021 HM Revenue & Customs * * 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 a...
# SPDX-License-Identifier: BSD-3-Clause source helpers.sh cleanup() { if [ "$1" != "no-shut-down" ]; then shut_down fi } trap cleanup EXIT start_up cleanup "no-shut-down" # Storage hierarchy tpm2_hierarchycontrol -C p shEnable set tpm2_hierarchycontrol -C p shEnable clear tpm2_hierarchycontrol -C p shEn...
#ifndef _MENUITEMSPINNER_H_ #define _MENUITEMSPINNER_H_ /* MenuItemSpinner is based on MenuItemNumeric. https://github.com/lovyan03/M5Stack_TreeView/blob/master/src/MenuItemNumeric.h */ #include <MenuItem.h> #include <WString.h> class MenuItemSpinner : public MenuItem { public: int value = 0; bool canLoop = true...
class Solution { public boolean isIdealPermutation(int[] A) { int min = A[A.length - 1]; for(int i = A.length - 3;i >= 0;i--) { if(min < A[i]) { return false; } min = Math.min(min, A[i + 1]); } return true; } }
<gh_stars>0 import os import itertools import sys #dmdcategories = ['acpa', 'concdel','danais', 'dcppc', 'doris', 'styx'] nmin_ngram, nmaxngram = 1, 2 local_weights = ['tf'] global_weights = ['chi2', 'idf'] nfolds = 4 def main(dmd_category, wd): print(dmd_category) raw_path = os.path.join(wd, 'raw', dmd_cat...
#!/bin/bash # Copyright 2014 The Kubernetes 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...
from django.contrib.auth.models import Group from rest_framework import serializers from .models import Status, Criticality class StatusSerializer(serializers.ModelSerializer): """.""" class Meta: model = Status fields = "__all__" class GroupSerializer(serializers.ModelSerializer): """...
package cormoran.pepper.primitives; public interface IIntAppendable { void appendInt(int value); }
def calculate_radar_position(offset, car_coordinate_system): # Assuming the car's coordinate system is defined elsewhere car_position_in_global = get_global_position(car_coordinate_system) # Function to get the global position of the car's coordinate system radar_position_in_car_cs = (offset[0], offset[1],...
#!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2019 Petr Vorel <pvorel@suse.cz> # Copyright (c) 2018-2019 ARM Ltd. All Rights Reserved. . tst_test.sh # Find mountpoint to given subsystem # get_cgroup_mountpoint SUBSYSTEM # RETURN: 0 if mountpoint found, otherwise 1 get_cgroup_mountpoint() { lo...
public static string CapitalizeFirstLetter(string inputString) { return inputString.First().ToString().ToUpper() + inputString.Substring(1); } string inputString = "This is a string"; string outputString = CapitalizeFirstLetter(inputString); Console.WriteLine("Input String: " + inputString); Console.WriteLine("Out...
// Binary Search def binarySearch(arr, target): low = 0 high = len(arr) - 1 while low <= high: mid = (low + high)//2 if (arr[mid] == target): return mid elif target < arr[mid]: high = mid - 1 else: low = mid + 1 return -1
package com.androidapp.share.dialog; import android.annotation.SuppressLint; import android.app.Dialog; import android.content.Context; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.os.Build; import android.support.annotation....
<reponame>idjevm/FightPandemics import React, { useState, createContext, useContext } from "react"; import { Row, Col } from "antd"; import { Container, Option, TitleStep, OptionButton, BackButton, CreateProfileButton, CreateOrgLink, } from "components/CreatePost/StyledPostAs"; import SubmitButton from "c...
#!/bin/sh sudo docker build -t node-images-server . sudo docker run -p 9090:9090 -d -it --rm --name node-images-server node-images-server
import { commit, modify } from '@collectable/core'; import { CONST, ListStructure, OFFSET_ANCHOR, appendValues } from '../internals'; /** * Appends a new value to the end of a list, growing the size of the list by one. * * @template T - The type of value contained by the list * @param value - The value to append t...
#!/bin/sh # # strip.sh # # Copyright (c) 2013 repk # # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # <repk@triplefau.lt> wrote this file. As long as you retain this notice you # can do whatever you want with this stuff. If we meet some day, and y...
<reponame>serginij/project-manager import { styled } from 'linaria/react' export const FormTitle = styled.h3` text-align: left; `
<filename>console/src/boost_1_78_0/libs/spirit/example/qi/nabialek.cpp<gh_stars>1-10 /*============================================================================= Copyright (c) 2003 <NAME> Copyright (c) 2001-2010 <NAME> Distributed under the Boost Software License, Version 1.0. (See accompanying file...
import { Component, OnInit } from '@angular/core'; import { UtilService } from 'src/app/util/util.service'; import { Router, ActivatedRoute } from '@angular/router'; import { ProjectService } from '../service/project.service'; import { Team } from './team'; import { User } from '../user/user'; import { Modal } from '.....
# settings.py ... INSTALLED_APPS = [ ... 'cart', ... ] # urls.py from django.contrib import admin from django.urls import path from cart.views import cart_view urlpatterns = [ path('admin/', admin.site.urls), path('cart/', cart_view), ] # views.py from django.shortcuts import render def cart_view(requ...
/** * hub-detect * * Copyright (C) 2018 Black Duck Software, Inc. * http://www.blackducksoftware.com/ * * 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 copyrig...
module Webpack # :nodoc: module Rails VERSION = "0.9.12" end end
python -m domainbed.scripts.train\ --data_dir=./domainbed/data/\ --algorithm ERM\ --dataset DomainNet\ --holdout_fraction 0.2\ --skip_model_save False\ --tensorboard_use True\ --output_dir=../result_domainbed/ERM_DNET/5\ --test_env 0 1 2 3 4\ --gpu 3\
class User { private $slug; private $login; private $password; public function __construct($slug, $login, $password) { $this->slug = $slug; $this->login = $login; $this->password = $password; } public function getSlug() { return $this->slug; } public fu...
<gh_stars>0 print list(all_files('*.pye', os.environ['PATH']))
package integration import ( "fmt" "net" "net/http" "strconv" "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" restclient "k8s.io/client-go/rest" kapi "k8s.io/kubernetes/pkg/api" kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" "github.com/openshift/origin/pkg/authorization/authorizer/scope" au...
import React from 'react'; import { registerRootComponent } from 'expo'; import App from './storybook'; const ExampleApp = () => { return <App />; }; // registerRootComponent calls AppRegistry.registerComponent('main', () => App); // It also ensures that whether you load the app in the Expo client or in a native b...
<reponame>duncte123/botAudioManager /* * MIT License * * Copyright (c) 2018 <NAME> * * 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 restriction, including without limitation t...
#!/bin/bash LIBVPX_REPO="https://chromium.googlesource.com/webm/libvpx" LIBVPX_COMMIT="16154dae714c3e88bfa17c25d5d6ad8198fac63a" ffbuild_enabled() { return 0 } ffbuild_dockerstage() { to_df "ADD $SELF /stage.sh" to_df "RUN run_stage" } ffbuild_dockerbuild() { git-mini-clone "$LIBVPX_REPO" "$LIBVPX_C...
<reponame>waleedmashaqbeh/freequartz /* Copyright 2010 Smartmobili SARL * * 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 * ...
<gh_stars>1-10 import React from 'react'; import Navbar from '../components/Navbar'; import styles from '../styles/main.scss'; import PostLink from '../components/PostLink'; import { Helmet } from 'react-helmet'; import { graphql } from 'gatsby'; const IndexPage = ({ data: { allMarkdownRemark: { edges }, }, })...
export const MANDARINE_GET_FILE_PATH = (path: string | URL): string => { let filePath = undefined; if(path instanceof URL) { filePath = path.toString(); } else { filePath = path; } return filePath; } export const getFilePathString = ["getFilePath", MANDARINE_GET_FILE_PATH.toString(...
package main import ( "bytes" "github.com/stretchr/testify/assert" "log" "os" "testing" "github.com/bjartek/go-with-the-flow/v2/gwtf" ) /* Tests must be in the same folder as flow.json with contracts and transactions/scripts in subdirectories in order for the path resolver to work correctly */ func TestTransa...
<gh_stars>0 package es.redmic.test.integration.common; import java.io.IOException; import java.io.InputStream; /*- * #%L * API * %% * Copyright (C) 2019 REDMIC Project / Server * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Licen...
import mldag def test_args(): @mldag.returns(['some_result']) def foo(a, a_default=None, *var_pos, b, b_default=None, **var_key): return a, a_default, var_pos, b, b_default, var_key p = mldag.mldag.MLDag() a = mldag.as_node(foo, name='a') p['a'] >> a['a'] p['a_default'] >> a['a_defau...
#!/bin/bash if [[ ! -d build ]]; then rm -rf build/ mkdir -p build fi cd build # build also eclipse files. cmake .. -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug make -j8
def decimalToBinary(num): if num > 1: decimalToBinary(num // 2) print(num % 2, end = '') # Driver code decimal = 10 decimalToBinary(decimal)
export VER=`cat ../../.version` dotnet nuget push FlowerBI.Engine/nupkg/FlowerBI.Engine.$VER.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json dotnet nuget push FlowerBI.Tools/nupkg/FlowerBI.Tools.$VER.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json
<gh_stars>0 /** * Copyright 2018-2020 Dynatrace LLC * * 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...
<reponame>msh9/shorturl package main func main() { return }
#!/bin/bash [ "$DEBUG" = "true" ] && set -x CRON_LOG=/var/log/cron.log # Setup Magento cron echo "* * * * * root /usr/local/bin/php ${MAGENTO_ROOT}/bin/magento cron:run | grep -v \"Ran jobs by schedule\" >> ${MAGENTO_ROOT}/var/log/magento.cron.log" > /etc/cron.d/magento # Get rsyslog running for cron output touch $...
package io.opensphere.core.control; import java.awt.Point; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import java.awt.event.MouseWheelEvent; import java.util.Collection; import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; import ...
import { expect } from 'chai'; import { mount } from 'enzyme'; import React from 'react'; import sinon from 'sinon'; import TakeSnapshot from '~/linodes/linode/backups/components/TakeSnapshot'; import { expectDispatchOrStoreErrors, expectRequest } from '@/common'; import { testLinode } from '@/data/linodes'; descri...
<filename>hyperparameter_hunter/feature_engineering.py """This module is still in an experimental stage and should not be assumed to be "reliable", or "useful", or anything else that might be expected of a normal module""" ################################################## # Import Own Assets ##########################...
package Operations; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; public class SieveOfEratosthenes { public static void main(String [] args) throws IOException { BufferedReader br = new BufferedR...
import React, { Fragment } from 'react'; import { Route, Switch } from 'react-router-dom'; import Collection from '../Components/Collection'; import Collections from '../Components/Collections'; import Base from '../Components/Base'; import NavBar from '../Components/Navbar'; import NotFound from '../Components/NotFo...
#include <stdio.h> #include "ConfigFile.h" #include "../Utilities/Operations.h" namespace DivaHook::FileSystem { ConfigFile::ConfigFile(const std::string &path) : TextFile(path) { return; } ConfigFile::ConfigFile(const std::string &directory, const std::string &file) : TextFile(directory, file) { ...
#!/bin/bash # This script downloads and installs the latest available Oracle Java 8 JDK CPU release or PSU release for compatible Macs # Save current IFS state OLDIFS=$IFS IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)" # restore IFS to previous state IFS=$OLDIF...
<reponame>lklots/fungi-quiz-api<filename>mock.js const _ = require('lodash'); function mockQuestion(taxonId) { const answer = taxonId || 47347; return { questionId: `questionId-${answer}`, photos: [{ url: 'mushroom1.jpg', origWidth: 500, origHeight: 500, }, { url: 'mushroom2...
require 'rubygems' require 'rake' require 'rake/clean' require 'rake/testtask' begin require 'rubygems/package_task' rescue LoadError require 'rake/gempackagetask' rake_gempackage = true end spec = Gem::Specification.load('rhc.gemspec') # Define a :package task that bundles the gem if rake_gempackage Rake::...
const [day1Part1, day1Part2] = require('./src/day1'); const [day2Part1, day2Part2] = require('./src/day2'); const [day3Part1, day3Part2] = require('./src/day3'); const [day4Part1, day4Part2] = require('./src/day4'); const [day5Part1, day5Part2] = require('./src/day5'); const [day6Part1, day6Part2] = require('./src/day6...
package org.niuzuo.criminalintent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.Window; import android.view.WindowManager; /** * Created by zdns on 16/7/13. */ public class CrimeCameraActivity extends SingleFragmentActivity { @Override protected Fragment createFragme...
import "./src/components/styles/global.css"
/*********************************************************************************************************************** * OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without m...
<gh_stars>0 /** * Handle domain zones database * */ 'use strict'; const path = require('path'), fs = require('fs'), child_process = require('child_process'); const ZONE_REC = 'zone "${domain}" { type master; file "${data_folder}/${domain}"; };\n', ZONE_START = 'zone "${domain}"', // sta...
/** * */ package models; import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.persistence.Entity; import javax.persistence.CascadeType; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.OneToMany; import javax.persistence.ManyToMany;...
#!/bin/bash scriptDir="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)" # Start via Ambari echo "Starting the Kafka service" curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo": {"context" :"Start Kafka"}, "Body": {"ServiceInfo": {"state": "STARTED"}}}' http://sandbox-hdf.hortonworks.com:8080/ap...
#!/usr/bin/env bash # Bundle components/modules gulp dev-aws-1 npm run start-developing-aws-1
#!/usr/bin/env bash set -o errexit set -o pipefail set -o nounset SCRIPT_VERSION=0.1.0 # Required external tools to be available on PATH. REQUIRED_TOOLS=("az") LOG_LEVELS=([0]="emerg" [1]="alert" [2]="crit" [3]="err" [4]="warning" [5]="notice" [6]="info" [7]="debug") function .log() { local LEVEL=${1} shift ...
chmod 777 -R .
import express from 'express'; import { getArticles, getAllArticles, getArticleDetail, deleteArticle, addTag, removeTag, } from '../controller/controller.article'; const router = express.Router(); router.get('/article/all', getAllArticles); router.get('/article/user', getArticles); router.get('/article/:id...
import React, {PropTypes} from 'react'; import {observer, inject} from 'mobx-react'; import Select from 'components/lib/Select'; const Option = Select.Option; import styles from './index.less'; function DateSelect({consumeStore, type}) { const handleSelect = (value) => { consumeStore.updateValue(`${type}.mothFil...
import { MR } from "./movieRatingConstants" const initialState = { dataSet: [], columns: [], submittedReportRequest: false, }; export const initialRatingsFormUserState = { user: '', }; const movieRatingReducer = (state = initialState, action) => { switch (action.type) { case MR.UPDATE_DATASET: { ...
import { Injectable } from '@nestjs/common'; import { Repository, DeepPartial } from 'typeorm'; import { OAuthClient } from './oauth-client.entity'; import { InjectRepository } from '@nestjs/typeorm'; import { OAuthCode } from './oauth-code.entity'; import { AuthorizationCode } from 'oauth2-server'; @Injectable() expo...
from scipy.optimize import fmin def f(x, y): return 3*x**2 + 2*x*y + 5*y**2 x, y = fmin(f, 0, 0) print(f'The maximum of f(x,y) is {f(x, y)} at (x, y) = ({x:0.5f}, {y:0.5f})')
mkdir -p /etc/systemd/system environment_proxy="" if [ ! -z "$HTTP_PROXY" ]; then environment_proxy="\"HTTP_PROXY=${HTTP_PROXY}\" " fi if [ ! -z "$HTTPS_PROXY" ]; then environment_proxy="\"HTTPS_PROXY=${HTTPS_PROXY}\" " fi if [ ! -z "${environment_proxy}" ]; then environment_proxy="Environment=${environment_prox...
<gh_stars>1-10 package com.aqzscn.www.global.controller; import com.aqzscn.www.global.config.validation.ValidationGroup1; import com.aqzscn.www.global.config.validation.ValidationGroup2; import com.aqzscn.www.global.domain.co.AppException; import com.aqzscn.www.global.domain.dto.MyPage; import com.aqzscn.www.global.do...
#!/usr/bin/env bash export PATH=/sbin:/opt/bin:/usr/local/bin:/usr/contrib/bin:/bin:/usr/bin:/usr/sbin:/usr/bin/X11 ### Create .update-cloudflare-dns.log file of the last run for debug parent_path="$(dirname "${BASH_SOURCE[0]}")" FILE=${parent_path}/update-cloudflare-dns.log if ! [ -x "$FILE" ]; then touch "$FILE" ...
<gh_stars>0 package com.gemmano.dtm.repositories; import org.springframework.data.mongodb.repository.MongoRepository; import com.gemmano.dtm.entities.DeviceData; public interface DeviceDataRepository extends MongoRepository<DeviceData, String> { }
<filename>src/data/countries.js import germany from '../data/countries/germany.json'; import turkey from '../data/countries/turkey.json'; import brazil from '../data/countries/brazil.json'; export default { germany, turkey, brazil, }
<reponame>majioa/knigodej<gh_stars>0 module Knigodej VERSION = "0.0.1" NAME = 'knigodej' end
'use strict' const path = require('path') const debug = require('debug')('mojoin:Mojoin') const Datasource = require('./datasource') const Cache = require('./cache') const Report = require('./report') /** * Sync all kinds of datasources into a central SQL database * and perform queries/ joins on the gathered data ...
#!/bin/sh # Parameter to named parameter git_commit_message=`[ ! -z "$1" ] && echo "$1" || [ ! -z "$GIT_PUSH_COMMIT_MESSAGE" ] && echo "$GIT_PUSH_COMMIT_MESSAGE" || echo ""` git_author_email=`[ ! -z "$2" ] && echo "$2" || [ ! -z "$GIT_PUSH_AUTHOR_EMAIL" ] && echo "$GIT_PUSH_AUTHOR_EMAIL" || echo ""` git_author_name=`[...
package android.example.com.split.ui.tabfragment; import android.example.com.split.R; import android.example.com.split.data.entity.Group; import android.example.com.split.data.entity.User; import android.example.com.split.ui.recycleradapter.MembersRecyclerAdapter; import android.os.Bundle; import android.support.annot...
package org.apache.tapestry5.plastic.test; public interface IndirectAccess<T> { T get(); void set(T newValue); }
<filename>config/dbqueue.js /** Copyright 2019 University of Denver 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 ...
// Importações. const express = require('express'); const router = express.Router(); // Conexões. const database = require('../../configs/database').connection; // Models. const Animal = require('../models/Animal'); const AlbumAnimal = require('../models/AlbumAnimal'); const Fo...
buildSystem="" buildType=$2 project="" ######################################### # Clean # ######################################### function Clean() { rm ./build/* -rf } ######################################### # Build lib # ######################################### function Lib() { project="libsq....
<filename>Code/MeshImporter/ImporterUtil.cpp // Copyright 2001-2017 Crytek GmbH / Crytek Group. All rights reserved. #include "StdAfx.h" #include "ImporterUtil.h" #include "FileUtilNew.h" #include "PathUtil.h" #include <QCoreApplication> //#include <ThreadingUtils.h> //#include "FileUtil.h" #include <CrySystem/...
#!/bin/bash source ~/.bashrc conda install --yes -c conda-forge jupyter_contrib_nbextensions
<filename>test/list/get-styles.test.js /* eslint-env mocha */ import { expect } from 'chai'; import getStyles from '../../src/list/get-styles'; import styles from '../../src/list/styles'; describe('List.getStyles', () => { describe('root', () => { it('should get styles', () => { const style = getStyles.roo...
import axios from 'axios'; const astromatch = axios.create({ baseURL: 'https://us-central1-missao-newton.cloudfunctions.net/astroMatch/victorgutierrez', }); export default astromatch;
<filename>programmers/skill-test-lv1/sum_between_two_int.py # https://programmers.co.kr/learn/courses/30/lessons/12912 def solution(a, b): if a > b: a, b = b, a return sum(range(a, b+1)) # Test # a, b = 3, 5 # a, b = 3, 3 a, b = 5, 3 print(solution(a, b))
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.u1F500 = void 0; var u1F500 = { "viewBox": "0 0 2600 2760.837", "children": [{ "name": "path", "attribs": { "d": "M300 1990l-31-1q-18 0-56-2v-192l69 3h11q220 0 425-116t385.5-324 375.5-333.5T1874 854V523l513 415-513...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; //import CurrentlyReading from './CurrentlyReading'; //import WantToRead from './WantToRead'; import Shelf from './Shelf'; const MyReads = ({books_curr_reading, books_want_to_read, books_read, onChan...
import React from 'react'; import { BrowserRouter as Router, Switch, Route, Link } from "react-router-dom"; import { Table, Form } from './Components'; const App = () => { return ( <Router> <div> <Link to="/table">View Table</Link> | <Link to="/form">Add New Data</Link> <hr /> ...
class Inventory: def __init__(self): self.products = {} def add_product(self, product_id, name, price, quantity): if product_id in self.products: print("Product ID already exists. Use update_product to modify the product.") else: self.products[product_id] = {'nam...
#!/bin/bash set -eo pipefail source scripts/setup-env.sh cat <<EOL bwt is running: - HTTP API server on http://$BWT_HTTP_ADDR - Electrum RPC server on $BWT_ELECTRUM_ADDR - Bitcoin Core RPC server on 127.0.0.1:$BTC_RPC_PORT - Logs at $DIR/{bwt,check}.log You can access bitcoind with: $ bitcoin-cli -datadir=$BTC_DIR ...
TEMPLATE_FILENAME="template.yml" ls . | grep .yml | while read FILE_NAME ; do if [ ! $FILE_NAME = $TEMPLATE_FILENAME ];then #echo $FILE_NAME cp $TEMPLATE_FILENAME $FILE_NAME'.copy' #cp $FILE_NAME $FILE_NAME'.copy' cat $FILE_NAME'' | grep "ENV_" | while read ENV_VARIABLE ; do ...
#!/bin/bash SELINUX_CONF="/etc/selinux/config" SSH_CONF="/etc/ssh/sshd_config" SSH_PORT=22 echo "========= setting SSH and internat ip and ipsec secrets ======" echo "please input SSH PORT: " read SSH_PORT echo "========= SSH PORT =============" echo "${SSH_PORT}" echo "please input SSH: " read SSH_KEY echo "=========...
#!/bin/bash set -e # be verbose if $DEBUG=1 is set if [ ! -z "$DEBUG" ] ; then env set -x fi THIS="$0" # http://stackoverflow.com/questions/3190818/ args=("$@") NUMBER_OF_ARGS="$#" # please do not change $VENDORPREFIX as it will allow for desktop files # belonging to AppImages to be recognized by future AppImage...
// Neural network model model = tf.keras.Sequential([ tf.keras.layers.Input(shape=(NUM_FEATURES,)), tf.keras.layers.Dense(128, activation='relu'), tf.keras.layers.Dropout(0.2), tf.keras.layers.Dense(128, activation='relu'), tf.keras.layers.Dropout(0.2), tf.keras.layers.Dense(NUM_CLASSES, activat...
#!/bin/bash set -o errexit set -o nounset set -o pipefail set -x # shellcheck disable=SC1091 source "/workspace/gcb_env.sh" # This script updates helm config files and add helm charts to the release tarballs. # switch to the root of the istio repo ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" cd "$ROOT"...
<filename>main.go<gh_stars>1-10 package main import ( "log" "net/http" ) const port = ":3000" func main() { go broadcastMessages() http.HandleFunc("/spam", spam) http.HandleFunc("/listen", listen) http.HandleFunc("/squawk", squawk) http.HandleFunc("/squawker", transmitter) log.Println("Server is running on ...
#!/bin/sh mvn deploy:deploy-file -Dfile=target/bide.jar -DpomFile=pom.xml -DrepositoryId=clojars -Durl=https://clojars.org/repo/