text
stringlengths
1
1.05M
CREATE TABLE student_records ( id int AUTO_INCREMENT PRIMARY KEY, name varchar(255) NOT NULL, age int NOT NULL, height double NOT NULL, weight double NOT NULL );
#!/usr/bin/env bash set -e project="`cat package.json | grep '"name":' | awk -F '"' '{print $4}'`" docker container stop ${project}_builder 2> /dev/null || true docker stack rm $project 2> /dev/null || true echo -n "Waiting for the $project stack to shutdown." # wait until there are no more containers in this stack ...
import React from "react"; export const ErrorMessage = ({ error }) => ( <div className="alert alert-danger" role="alert"> <span>{error.message}</span> </div> ); export const SuccessMessage = ({ formVerb = "updated", formType = "Data" }) => ( <div className="alert alert-success" role="alert"> <span> ...
<filename>src/types/index.d.ts declare module "*.vue" { import { ComponentOptions } from "vue"; let component: ComponentOptions; export default component; } declare module "*.md" { import { ComponentOptions } from "vue"; let component: ComponentOptions; export default component; }
<filename>apkanalyser/src/andreflect/sign/ApkSign.java /* * Copyright (C) 2012 Sony Mobile Communications AB * * This file is part of ApkAnalyser. * * 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 ...
<filename>src/peersafe/app/storage/impl/TableStorageItem.cpp //------------------------------------------------------------------------------ /* This file is part of chainsqld: https://github.com/chainsql/chainsqld Copyright (c) 2016-2018 Peersafe Technology Co., Ltd. chainsqld is free software: you can redistribu...
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _a...
#!/bin/bash # # Thesis Ch4: When does UC matter Grid HEADER # ERCOT 2007, min 200MW gen, Year as 52 weeks # Full Ops w/ Maintenance, 80MW min UC integer, non-parallel # No B&B priority, No cheat, No cap limit helper # # To actually submit the job use: # qsub SCRIPT_NAME #+++++++++++++++++ TEMPLATE GAMS-CPLEX ...
<reponame>EchoofthePast/Dub<filename>handlers/edithandler.go package handlers import( "os" "fmt" "html" "strings" "net/http" "html/template" "github.com/Creator/Dub/static/goget" ) //EditHandler Edit Page Handler Function func EditHandler(w http.ResponseWriter, r *http.Request) { r.ParseF...
#include "tests.h" #include <chrono> #include <gtest/gtest.h> #include <memory> #include <thread> CryptoFixture::CryptoFixture() : _certPath(CERTIFICATES_PATH) {} CryptoFixture::~CryptoFixture() {} void CryptoFixture::SetUp() { std::string keyPairPath = _certPath + "peer1/mykeypair.pem"; std::string peerPublicKe...
------------------------------------------------------------------------------- -- -- Script: containing_chunk.sql -- Purpose: to find the X$KSMSP chunk that contains a particular address -- -- Copyright: (c) Ixora Pty Ltd -- Author: <NAME> -- ----------------------------------------------------------------------------...
/* mbed Microcontroller Library * Copyright (c) 2016 u-blox * * 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 ...
#!/bin/bash ##################################################################### # # Linux on Hyper-V and Azure Test Code, ver. 1.0.0 # Copyright (c) Microsoft Corporation # # All rights reserved. # Licensed under the Apache License, Version 2.0 (the ""License""); # you may not use this file except in compliance with...
public class BubbleSort { // Bubble sort by switching adjacent elements public static void bubbleSort(int arr[]) { int n = arr.length; for (int i = 0; i < n-1; i++) { // Traverse through all array elements for (int j = 0; j < n-i-1; j++) { // Swap...
docker build -t rtsp-samsung-tv . docker tag rtsp-samsung-tv vassio/rtsp-samsung-tv:1.1.18 docker push vassio/rtsp-samsung-tv:1.1.18 docker tag rtsp-samsung-tv vassio/rtsp-samsung-tv:latest docker push vassio/rtsp-samsung-tv:latest
import nltk def synonyms_words(text): text_tokens = nltk.word_tokenize(text) replacement_words = [] for token in text_tokens: synonyms = nltk.wordnet.synsets(token) if synonyms: replacement_words.append(synonyms[0].name().split('.')[0]) else: replacement...
const { initAccount, getAccountInfo, getTotalPageList, } = require('../../src/telegraph/telegraph'); const {publishImgs} = require('../../src/telegraph/publish'); const path = require('path'); const fs = require('fs'); (async () => { const ret = await initAccount('cfg/telegraph.yaml'); console.log(JSON.strin...
#!/bin/bash -e # NOTE: the 5.5 and 5.6 versions do not have SSL enabled versions="5.5 5.6 5.7 8.0" function launch() { VERSION=$1 CONTAINER_NAME="zgrab_mysql-$VERSION" if docker ps --filter "name=$CONTAINER_NAME" | grep -q $CONTAINER_NAME; then echo "mysql/setup: Container $CONTAINER_NAME already running --...
import Ux from "ux"; import * as U from 'underscore'; import Cmd from './Op.Command'; const initToolbar = (reference) => { const toolbar = Ux.fromHoc(reference, "toolbar"); let toolbarArray = []; if (U.isArray(toolbar)) { const commands = Cmd.initCommand(reference); toolbarArray = Cmd.initC...
function processInput(value, trim) { if (trim) { return value.trim(); } else { return value; } }
import java.security.*; public class MyPayload implements PrivilegedExceptionAction { public MyPayload() { try { AccessController.doPrivileged(this); } catch(PrivilegedActionException e) { //e.printStackTrace(); } ...
<reponame>hnjolles1/CasperLabs package io.casperlabs.models.bytesrepr import cats.arrow.FunctionK import cats.data.StateT import cats.free.Free import cats.implicits._ import io.casperlabs.catscontrib.RangeOps.FoldM import java.nio.charset.StandardCharsets import scala.util.{Failure, Success, Try} import scala.util.Tr...
import java.util.Arrays; public class Main { public static void main(String[] args) { // Get the list of numbers int[] nums = {2, 1, 5, 4, 3}; // Sort the list Arrays.sort(nums); // Print the result System.out.println("Sorted list in ascending order:"); for (int num: nums) System.out.print(num + " "...
#!/bin/bash set -euo pipefail echo "Copy generated JavaDoc API from projects into /docs - must been built earlier with 'mvn install'..." rm -rf ../../docs/api/schema2template mv ../../generator/schema2template/target/apidocs ../../docs/api/schema2template rm -rf ../../docs/api/odfdom mv ../../odfdom/target/apidocs ....
<gh_stars>1-10 hour, minute = input().split(':') print(f'{hour}:{minute}')
var LinkedList = require('./output-linked-list'); LinkedList = LinkedList.LinkedList; describe('LinkedList', () => { it('pop single item', () => { const list = new LinkedList(); list.push(10); expect(list.shift()).toBe(10); }); it('push/pop', () => { const list = new LinkedList(); list.push(1...
<gh_stars>0 package main import ( "bufio" "bytes" "io" "strconv" "strings" ) // DdProgress is a struct containing progress of the dd operation. type DdProgress struct { Bytes int Error error } // CopyConvert is a wrapper around the `dd` Unix utility. func CopyConvert(iff string, of string) (chan DdProgress, e...
<reponame>s4id/swagger-codegen /// <reference path="api.d.ts" /> module API.Client { 'use strict'; export class Tag { id: number; name: string; } }
export { default } from './components/User';
# Open the input file in read mode with open("input.txt", "r") as file_object: # Read the contents of the file and store each line as a separate element in a list called lines lines = file_object.readlines() # Create an empty dictionary to store student names and their test scores student_scores = {} # Iterat...
import React from 'react'; import { Card } from '@material-ui/core'; import { HashLoader, BarLoader, BeatLoader, BounceLoader, CircleLoader, ClimbingBoxLoader, ClipLoader, ClockLoader, DotLoader, FadeLoader, GridLoader, MoonLoader, PacmanLoader, PropagateLoader, PulseLoader, RingLoader...
<script> function toggleDivVisibility() { let myDiv = document.getElementById("myDiv"); if (myDiv.style.display == "none") myDiv.style.display = "block"; else myDiv.style.display = "none"; } </script>
/** * Setting parameters as default config. * object's members names will be used for * @param {*} default_params object with default_parameters * @param {*} params */ function params_setter(default_params, params){ for(let param_name in default_params){ try{ if(typeof(params[param_name]) ...
def recommend_content(data): # create a dictionary to store every item with its relevance score relevance_scores = {} # calculate relevance scores for item in data: relevance_score = 0 if item['likes'] > 0: relevance_score += item['likes'] if item['views'] > 0: relevance_score += item[...
/******************************************************************************* * Copyright 2015 InfinitiesSoft Solutions 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 * * ...
class AddStartOffsetMsToVideos < ActiveRecord::Migration[6.0] def change add_column :videos, :start_offset_ms, :integer change_column_default :videos, :start_offset_ms, from: nil, to: 10_000 end end
def calculate_total_images(dataset, imgs_per_gpu, workers_per_gpu, cfg): num_gpus_test = len(cfg['gpus']['test']) total_images = dataset * num_gpus_test * imgs_per_gpu * workers_per_gpu return total_images
#!/bin/bash # https://github.com/koalaman/shellcheck/wiki/SC2034 # shellcheck disable=2034 true PWD_CMD="pwd" # get native Windows paths on Mingw uname | grep -qi mingw && PWD_CMD="pwd -W" cd "$(dirname "$0")" SIM_ROOT="$($PWD_CMD)" # Set a default value for the env vars usually supplied by a Makefile cd "$(git re...
<reponame>vharsh/cattle2<filename>modules/model/src/main/java/io/cattle/platform/core/dao/impl/DataDaoImpl.java package io.cattle.platform.core.dao.impl; import io.cattle.platform.core.dao.DataDao; import io.cattle.platform.core.model.Data; import io.cattle.platform.core.model.tables.records.DataRecord; import io.catt...
#include <fmt/core.h> auto main() -> int { fmt::print("Hello world\n"); }
<reponame>b0rgbart3/myGoogleBooks import React,{ useEffect } from "react"; import { useBookContext } from "../utils/GlobalState"; import { Redirect } from "react-router-dom"; import API from "../utils/API"; import { GET_ALL_BOOKS, DELETE_BOOK } from "../utils/actions"; const Styles = { // nav: { // fontWei...
def find_frequent(list): dictionary = {} for element in list: if element not in dictionary: dictionary[element] = 1 else: dictionary[element] += 1 frequency = max(dictionary.values()) most_frequent = [key for key in dictionary if dictionary[key] == frequency] return { most_frequent[0] :...
<gh_stars>0 package org.yarnandtail.andhow.compile; /** * Utilities for the AndHow AnnotationProcessor. */ public class CompileUtil { /** * Determine the correct 'Generated' annotation class name based on the current Java runtime. * * This method fetches the version of the current runtime via getMajorJavaVer...
package com.oven.netty.exception; /** * 参数错误异常 */ public class ErrorParamsException extends RuntimeException { private static final long serialVersionUID = -623198335011996153L; public ErrorParamsException() { super(); } public ErrorParamsException(String message) { super(message);...
/* This file is part of the JitCat library. Copyright (C) <NAME> 2019 Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). */ #include "jitcat/CatIfStatement.h" #include "jitcat/ASTHelper.h" #include "jitcat/CatLog.h" #include "jitcat/CatRuntimeContext.h" #include "jitca...
#!/bin/bash # Run with: go run core.go udp-client.go [HOST:PORT] go run core.go udp-client.go $1
let num = [5, 6, 7, 8, 9, 10, 11]; num.sort(); for(let c in num) { console.log(num[c]); } let pos = num.indexOf(20); if(pos == -1) { console.log(`Valor não encontrado!`) }else{ console.log(`Valor esta na posição ${pos}`); }
class Security(dict): pass class BasicAuth(Security): name = 'Basic' def __init__(self): super().__init__( type='http', scheme='basic' )
#!/bin/sh USER=${1:?A user is needed} PERMISSIONS="create,clone,destroy,hold,mount,release,rename,snapshot,canmount,mountpoint" if ! [ "$(uname -o)" = "FreeBSD" ] ; then exit 0 fi ZPOOL_NAME=$(zfs list -o name,mountpoint | grep -E '/$' | awk -F'/' '{print $1;}') if ! [ "${ZPOOL_NAME}" ] ; then exit 0 fi CREATE_TE...
cut -f 1-3
package com.java.study.algorithm.zuo.emiddle.class08; public class Code06_PosArrayToBST{ }
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) echo $parent_path if ! echo $parent_path | grep -p "daas-common"; then cd ../daas-common fi current_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) echo $current_path echo "now swithching back" cd $parent_path
#!/bin/bash echo "Switching to Stable..." systemctl stop pavlov runuser -l steam -c '~/Steam/steamcmd.sh +login anonymous +force_install_dir /home/steam/pavlovserver +app_update 622970 -beta shack +exit' systemctl start pavlov
<form action="/survey" method="post"> <div> <label for="name">Name:</label> <input type="text" name="name"> </div> <div> <label for="email">Email:</label> <input type="email" name="email"> </div> <div> <label for="age">Age:</label> <input type="number" name="age"> </div> <div> ...
require 'test_helper' class PeriodTest < ActiveSupport::TestCase test "the Period requires a timetable_id" do assert Period.new(name: "test1", start_time: Time.now, end_time: Time.now).invalid? end test "the Period's name is not allowed to be blank" do assert Period.new(name: "", start_time: Time.now,...
# Node Version Manager # Implemented as a POSIX-compliant function # Should work on sh, dash, bash, ksh, zsh # To use source this file from your bash profile # # Implemented by Tim Caswell <tim@creationix.com> # with much bash help from Matthew Ranney # "local" warning, quote expansion warning, sed warning, `local` wa...
<reponame>Ks89/javascript-on-things const five = require('johnny-five'); const board = new five.Board(); board.on('ready', () => { const compass = new five.Compass({ controller: 'HMC5883L' }); compass.on('change', () => { console.log(compass.bearing); }); });
#!/usr/bin/env bash set -e MSG="[GEN_TEST_CERTS]" KEY="test_renderer.key.pem" KEY_B64="${KEY}.b64" CERT="test_renderer.cert.pem" CERT_B64="${CERT}.b64" CA_KEY="test_ca.key.pem" CA_CERT="test_ca.cert.pem" CA_CERT_B64="${CA_CERT}.b64" CLIENT_KEY="test_client.key.pem" CLIENT_CSR="test_client.csr" CLIENT_CERT="test_clien...
import * as core from '@actions/core' export const checkUser = (): boolean => { const input = core.getInput('user', { required: false }) const user = input?.length > 0 ? input : 'dependabot[bot]' const actor = process.env.GITHUB_ACTOR const result: boolean = actor === user return result }
#!/bin/bash if [[ -z $1 ]]; then echo "Must pass URL as first arg" exit 1 fi if [[ ! -f $2 ]]; then echo "Must pass path to all-balances.json as second arg" exit 1 fi export ETH_RPC_URL=$1 all_balances=$2 supply=$(seth call 0x4200000000000000000000000000000000000006 'totalSupply()(uint256)') echo "t...
<reponame>tignear/bot<filename>packages/presentation/web/src/components/layout.tsx import Header from "./header"; import styled from "styled-components"; import tw from "tailwind.macro"; const Layout = styled.div``; const Inner = styled.div` ${tw`mx-auto mt-4`} `; type Props = { children: React.ReactNode; }; const...
#!/bin/bash FN="benchmarkfdrData2019_1.6.0.tar.gz" URLS=( "https://bioconductor.org/packages/3.13/data/experiment/src/contrib/benchmarkfdrData2019_1.6.0.tar.gz" "https://bioarchive.galaxyproject.org/benchmarkfdrData2019_1.6.0.tar.gz" "https://depot.galaxyproject.org/software/bioconductor-benchmarkfdrdata2019/bioc...
<filename>codejam/2019-qualification/a.cc // https://codingcompetitions.withgoogle.com/codejam/round/0000000000051705/0000000000088231 #include<bits/stdc++.h> using namespace std; using vi=vector<int>; int main(){ ios::sync_with_stdio(0); cin.tie(0); int t; cin>>t; for(int T=1;T<=t;T++){ string s; cin...
def reverseString(s): return s[::-1] s = "Hello" print(reverseString(s))
#!/bin/bash # #SBATCH --job-name=iwslt_grid_0021_05 #SBATCH --partition=1080ti-long #SBATCH --gres=gpu:1 #SBATCH --ntasks-per-node=24 #SBATCH --mem=47GB #SBATCH -d singleton #SBATCH --open-mode append #SBATCH -o /mnt/nfs/work1/miyyer/simengsun/synst/experiments/iwslt_grid_0021_05/output_train.txt #SBATCH --mail-type=AL...
/** * <a href="http://www.openolat.org"> * OpenOLAT - Online Learning and Training</a><br> * <p> * Licensed under the Apache License, Version 2.0 (the "License"); <br> * you may not use this file except in compliance with the License.<br> * You may obtain a copy of the License at the * <a href="http://www.apache...
<filename>include/LLVMCodeGen.h // -*- mode: c++ -*- #pragma once #include "llvm/IR/IRBuilder.h" #include "llvm/IR/Module.h" #include "llvm/PassManager.h" #include "AST.h" #include "ContextManager.h" #include "Driver.h" class LLVMCodeGen { const Driver *_driver; std::unique_ptr<llvm::Module> _module; st...
#!/usr/bin/env python from __future__ import print_function from __future__ import absolute_import from optparse import OptionParser import numpy as np import flydra_analysis.a2.core_analysis as core_analysis import flydra_core.align as align from flydra_core.reconstruct import Reconstructor, DEFAULT_WATER_REFRACTIVE_I...
#!/bin/bash set -e # # The minimal test case: Only building dune-common with the default build directory # DUNECONTROL_OPTS="--opts=./testcases/common-build/config.opts --module=dune-common" ./dune-common/bin/dunecontrol $DUNECONTROL_OPTS all # Testing the Python code ./dune-common/bin/dunecontrol $DUNECONTROL_OPTS...
#!/bin/bash RESULT_FILE=$1 if [ -f $RESULT_FILE ]; then rm $RESULT_FILE fi touch $RESULT_FILE checksum_file() { echo $(openssl md5 $1 | awk '{print $2}') } FILES=() while read -r -d ''; do FILES+=("$REPLY") done < <(find . -type f \( -name "build.gradle*" -o -name "dependencies.kt" -o -name "gradle-wrapper.prop...
#!/bin/bash set -eu docker-compose -f run-redash/docker-compose.yaml run --rm server create_db docker-compose -f run-redash/docker-compose.yaml run --rm server /app/manage.py users create_root octocat@users.noreply.github.com root_user --password root_password docker-compose -f run-redash/docker-compose.yaml run --rm ...
# # For use by Private Cloud team. May safely be removed. # # # Executing over ssh, don't be so noisy or needy [ $TERM == "dumb" ] && S=1 Q=1 if [ ! "$OS_USERNAME" ]; then echo "Source your credentials first." return fi [ ${Q=0} -eq 0 ] && echo [ ${Q=0} -eq 0 ] && echo "Importing Private Cloud Common Functions...
/* This file is part of the JitCat library. Copyright (C) <NAME> 2018 Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). */ #include "jitcat/CustomTypeInfo.h" #include "jitcat/CatClassDefinition.h" #include "jitcat/CatRuntimeContext.h" #include "jitcat/Configuration.h"...
#!/bin/bash BIN_DIR=`./define_bin_dir.sh` cat > fsp.tmp << EOF % ---------------------------------- FINITE-SOURCE RUPTURE MODEL -------------------------------- % % Event : NEAR COAST OF CENTRAL CHILE 2010/02/27 [Hayes (NEIC,2014)] % EventTAG: p000h7rfHAYES % % Loc : LAT = -36.2200 LON = -73.1740 DEP = 25.0 % Siz...
<filename>logx/log.go package logx import ( "fmt" "go.uber.org/zap" "go.uber.org/zap/zapcore" ) func NewZap(level string, production bool) (*zap.Logger, error) { var c zap.Config if production { c = zap.NewProductionConfig() } else { c = zap.NewDevelopmentConfig() c.EncoderConfig.EncodeLevel = zapcore.C...
/* eslint-disable no-undef */ const { getFirstItem, getLength, getLastItem, sumNums, multiplyNums, contains, removeDuplicates } = require('../src/project-4'); describe('Project 4', () => { describe('getFirstItem', () => { it('should pass the first item from the collection to the cb', () => { ...
const a=1; const b=()=>{ alert(1) } const sum=(a,b)=> a+b; console.log(0)
package com.github.daggerok.client; import com.github.daggerok.employee.Employee; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import java.util.List; import static javax.ws.rs.core.MediaType.APPLICATION_JSON; @P...
<reponame>zenglongGH/spresense var searchData= [ ['theory_20of_20operation',['Theory of Operation',['../theoryOperation.html',1,'']]] ];
<reponame>eengineergz/Lambda // https://repl.it/student/assignments/395908/model_solution?fromSubmissionId=1559885 // https://youtu.be/wNPKVuKBWxo function isTwinPrime( n ) { function isPrime( num ) { for ( let i = 2; i <= Math.sqrt( num ); i++ ) { console.log( `${num} % ${i} === not zero` ); if ( nu...
<gh_stars>1-10 package string_handle; import java.io.BufferedReader; import java.io.InputStreamReader; /** * * @author minchoba * 백준 2386번: 도비의 영어공부 * * @see https://www.acmicpc.net/problem/2386/ * */ public class Boj2386 { private static final char EXIT = '#'; private static final char SPACE = ' '; privat...
<filename>src/app/admin/admin.component.ts import {Component, OnDestroy} from '@angular/core'; import {UserService} from '../user-service/user.service'; import {User} from '../entity/user'; import {Subscription} from 'rxjs'; @Component({ selector: 'admin', templateUrl: './admin.html', styleUrls: ['./admin....
function filterSolidProviders(providers: SolidProvider[], keyword: string): SolidProvider[] { const lowerCaseKeyword = keyword.toLowerCase(); return providers.filter(provider => provider.name.toLowerCase().includes(lowerCaseKeyword) || provider.desc.toLowerCase().includes(lowerCaseKeyword) )...
<gh_stars>0 exports.up = function (knex) { return knex.schema .createTable("zipcodes", (tbl) => { tbl.increments("id").unsigned(); tbl.integer("zipCode").unsigned().notNullable(); }) .createTable("users", (tbl) => { tbl.increments("id").unsigned(); tbl.text("email").unique().notNul...
lsblk --output NAME,LABEL,MODEL -nr | awk '{print $1}'
/* * Copyright © 2016 <<EMAIL>> http://io7m.com * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE ...
#!/bin/bash echo 'Cleaning up leftover files from upgrade...' rm -rf /var/opt/gitlab/postgresql/data.9.2.18
<gh_stars>1-10 package com.report.application.service; import com.report.application.domain.Report; import com.report.application.domain.snapshot.ReportSnapshot; import com.report.application.domain.vo.CharacterPhrase; import com.report.application.domain.vo.FilmCharacter; import com.report.application.domain.vo.Plane...
#!/bin/zsh # # Run script template for Mille jobs # # Adjustments might be needed for CMSSW environment. # # In the very beginning of this script, stager requests for the files will be added. # these defaults will be overwritten by MPS RUNDIR=$HOME/scratch0/some/path MSSDIR=/castor/cern.ch/user/u/username/another/pat...
import deepFreeze from 'deep-freeze'; import { expect } from 'chai'; import sinon from 'sinon'; import { beregnVarighet } from './metrikkerUtils'; import { TID_INNSENDING_SYKEPENGESOKNAD_SELVSTENDIG, UTFYLLING_STARTET } from '../enums/metrikkerEnums'; describe('metrikkerUtils', () => { let state; let event1; ...
import { integration } from '../testing/index.js'; const { Tester } = integration(); let device; let deviceId; beforeEach(async () => { device = await Tester.hasDevice({ name: '<NAME>' }); deviceId = device.id; }); it('should get all records', async () => { const [record1, record2] = await Tester.hasRecords([...
<reponame>NATroutter/HubCore<filename>src/net/natroutter/hubcore/features/SelectorItems/HubItem.java package net.natroutter.hubcore.features.SelectorItems; import net.natroutter.natlibs.objects.BaseItem; public record HubItem(String id, Integer slot, BaseItem item) { }
#!/bin/bash # # Build jekyll site and store site files in ./_site # v2.0 # https://github.com/cotes2020/jekyll-theme-chirpy # © 2019 Cotes Chung # Published under MIT License set -eu CMD="JEKYLL_ENV=production bundle exec jekyll b" WORK_DIR=$(dirname $(dirname $(realpath "$0"))) CONTAINER=${WORK_DIR}/...
<reponame>lheureuxe13/oppia # coding: utf-8 # # Copyright 2018 The Oppia 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/...
<gh_stars>1-10 from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker import os try: from ..secrets import * except ModuleNotFoundError: DB_USER = os.environ.get('DB_USER') DB_PASS = os.environ.get('DB_PASS') DB_HOST = os.environ.get('DB_HOST') SQLALCHEMY_DATABASE_URL = "postgre...
import json def read_task_from_jsonl(data_file): '''This function will read a .jsonl file and return the ``task`` fields in all the lines.''' with open(data_file) as fin: return [json.loads(line)['task'] for line in fin]
#! /bin/bash grep "Simulation time (seconds)" script_*/output.out
#!/usr/bin/env bash # ------------------------------------------------------------------------------ # # Program: initpost.sh # Author: Vitor Britto # Description: script to create an initial structure for my posts. # # Usage: ./initpost.sh [options] <post name> # # Options: # -h, --help output instructions ...
#!/bin/bash netq decommission oob-mgmt-switch netq decommission oob-mgmt-server netq decommission netq-ts netq decommission spine01 netq decommission spine02 netq decommission spine03 netq decommission spine04 netq decommission fw1 netq decommission fw2 netq decommission leaf01 netq decommission leaf02 netq decommissi...
<reponame>liugangtaotie/vue-admin-box import request from '@/utils/system/request' // 获取数据api export function getData(data: object) { return request({ url: '/system/user/list', method: 'post', baseURL: '/mock', data }) } // 新增 export function add(data: object) { return request({ ...