text
stringlengths
1
1.05M
#!/usr/bin/env bash usage() { echo "Usage: $0 [-u]"; exit 1 } make_sdist() { python setup.py sdist } sign_sdist() { gpg --detach-sign -a dist/${1}-${2}.tar.gz } upload_sdist() { [ -z "${3}" ] || repo="--repository-url ${3}" twine upload ${repo} dist/${1}-${2}.tar.gz* } # --- Main --- pkg=p...
/* * This file is part of inertia, licensed under the MIT License (MIT). * * Copyright (c) vectrix.space <https://vectrix.space/> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), t...
// $URL: svn+ssh://mrwhat@ssh.boim.com/home/mrwhat/svn/Walker/trunk/com/boim/walker/WalkerMetric.java $ // $Id: WalkerMetric.java 402 2014-02-21 17:20:14Z mrwhat $ // Implement a QualityMetric for optimization of a Walker linkage. // This should be abstract, but for now it may have a little // code specific to Klann or...
#!/bin/sh #PBS -q batch #PBS -l walltime=500:00:00 #PBS -l nodes=1:ppn=1 #PBS -l pmem=14gbs # -- run in the current working (submission) directory -- cd $PBS_O_WORKDIR chmod g=wx $PBS_JOBNAME export SUBJECTS_DIR=/home/pmurphy/meg_data/surprise/MRIs/fs_converted/ IDs=( 'KSV' 'EXJ' 'TSJ' 'JTB' 'EXF' 'ECB' 'EMB' 'TFD...
/** * Launcher classes to start up new HUD windows. */ package io.opensphere.hud.launcher;
#!/bin/sh file="../cloud-utils/environment.properties" if [ -f "$file" ] then echo "$file found." while IFS="=" read -r key value; do case "$key" in "opc.identity.domain") OPC_DOMAIN="$value" ;; "dbcs.dba.password") DBA_PASS="$value" ;; "ssh.privatekey") PK_FILE="$value" ;; ...
<gh_stars>10-100 package com.roadrover.btservice.bluetooth; import android.os.Parcel; import android.os.Parcelable; import android.text.TextUtils; /** * 蓝牙设备对象 </br> * 1) 用户调用 searchNewDevice 接口时,返回该对象 </br> * 2) 用户调用 getPairedDevice 接口时,返回该对象列表 </br> */ public class BluetoothDevice implements Parcelable { ...
<gh_stars>1-10 "use strict"; /** * Utility module for validating email addresses * * @module email-validator */ module.exports = { messages: { format: "Invalid email format.", localPart: "Invalid local-part.", hostname: "Invalid hostname.", required: "Email address is required.", }, /** * ...
#include <iostream> using namespace std; class array { private: int length; int size; int *a; public: array() { cout << "enter length: "; cin >> length; size = length; a = new int[length]; cout << "enter the elements: "; for (int i = 0; i < length; i++) ...
from picode import picode from os import listdir from os.path import isfile, join import os dir = os.path.dirname(__file__) codes_dir = os.path.join(dir, "codes") images_dir = os.path.join(dir, "images") if not os.path.exists(images_dir): os.makedirs(images_dir) code_files = [f for f in listdir(codes_dir) if isf...
<filename>src/main/scala/Algorithms/Sorting/CountingSort.scala<gh_stars>0 package Algorithms.Sorting /** * Created by MikBac on 31.08.2020 */ object CountingSort { /** * Generates an array [0, max] * * @param list : List[Int] * @return sorted list */ def sort(list: List[Int]): List[Int] = { v...
<filename>src/authoring/panels/tabbable/ConsolePanel.java package authoring.panels.tabbable; import authoring.Panel; import authoring.PanelController; import javafx.scene.control.TextArea; import javafx.scene.layout.Pane; import javafx.scene.layout.Region; import util.Console; public class ConsolePanel implements Pan...
<filename>node_modules/react-icons-kit/ionicons/alertCircled.js "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.alertCircled = void 0; var alertCircled = { "viewBox": "0 0 512 512", "children": [{ "name": "g", "attribs": {}, "children": [{ "name": "path", ...
#!/bin/bash set -e source $(dirname $0)/helpers.sh it_can_check_from_head() { local repo=$(init_repo) local ref=$(make_commit $repo) check_uri $repo | jq -e " . == [{ref: $(echo $ref | jq -R .)}] " } it_can_check_from_head_only_fetching_single_branch() { local repo=$(init_repo) local ref=$(make_com...
# # DIST.sh # # David Janes # IOTDB # 2016-10-30 # exit 0 PACKAGE=homestar-onvif DIST_ROOT=/var/tmp/.dist.$$ if [ ! -d "$DIST_ROOT" ] then mkdir "$DIST_ROOT" fi echo "==================" echo "NPM Packge: $PACKAGE" echo "==================" ( NPM_DST="$DIST_ROOT/$PACKAGE" echo "NPM_DST=$NPM_DST" ...
<reponame>tbo72787/bamazon var mysql = require("mysql"); var inquirer = require("inquirer"); var idNum = 0; var quantity = 0; var newQuantity = 0; var moneySpent = 0; var connection = mysql.createConnection({ host: "localhost", // Your port; if not 3306 port: 3306, // Your username user: "root", // Your...
#include <bits/stdc++.h> #include <cctype> using namespace std; class Solution { public: string toLowerCase(string s) { transform(s.begin(), s.end(), s.begin(), ::tolower); return s; } }; int main() { return 0; }
#!/bin/bash TOP="/path/to/source" DEST="/path/to/destination" SIDECAR="/path/to/sidecar" # Copy env-init.sh to DEST directory cp "${TOP}/env-init.sh" "${DEST}/" || { echo "Failed to install env-init.sh"; exit 1; } # Copy sidecar.sh to SIDECAR directory cp "${TOP}/sidecar.sh" "${SIDECAR}/" || { echo "Failed to instal...
#!/bin/tcsh #!/bin/tcsh #PBS -A NTDD0005 #PBS -N testb #PBS -q regular #PBS -l walltime=12:00:00 #PBS -j oe #PBS -M apinard@ucar.edu #PBS -l select=1:ncpus=1 module load conda conda activate ...
#import "SBHUDView.h" @interface SBHUDController : NSObject + (SBHUDController *)sharedHUDController; - (void)presentHUDView:(SBHUDView *)hud autoDismissWithDelay:(double)delay; @end
<reponame>jing-si/plant package kr.co.gardener.admin.service.user; import java.util.List; import kr.co.gardener.admin.model.user.Bookmark; import kr.co.gardener.admin.model.user.list.BookmarkList; import kr.co.gardener.util.Pager; public interface BookmarkService { List<Bookmark> list(); void add(Bookmark item);...
#!/bin/sh <<<<<<< HEAD python3 main.py ======= python3 main.py >>>>>>> b83d194... Installations for Windows and Linux (issue #3)+ updating README.md (issue #23)
/* * 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...
import React from "react"; import TweetHeader from "./tweet-header"; import TweetInfo from "./tweet-info"; const TweetContext = React.createContext(); export const useTweet = () => React.useContext(TweetContext); export default function Tweet({ children, data }) { return ( <div className="tweet"> <blockq...
#!/bin/bash #------------------------------------------------------------------------------ # [Syspixel] Check ELK Methods # Nagios check for ELK API # # Dependencies: https://stedolan.github.io/jq/ # # #------------------------------------------------------------------------------ VERSION=0.2 # Exit codes...
<filename>cmd/dialect-import/main.go<gh_stars>10-100 package main import ( "fmt" "io/ioutil" "net/http" "net/url" "os" "path/filepath" "regexp" "sort" "strconv" "strings" "text/template" "gopkg.in/alecthomas/kingpin.v2" ) var ( reMsgName = regexp.MustCompile("^[A-Z0-9_]+$") reTypeIsArray = regexp.M...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.skipForward = void 0; var skipForward = { "viewBox": "0 0 512 512", "children": [{ "name": "style", "attribs": { "type": "text/css" }, "children": [] }, { "name": "path", "attribs": { "class...
<reponame>nicobo/ciform /*! Copyright 2004 by <NAME>, www.haneWIN.de Original code : http://www.hanewin.net/encrypt/rsa/rsa.js About this package : http://ciform.google.com */ // // NOTE : The original code is wrapped so that the defined functions don't collide with existing ones. // See http://micha...
#!/usr/bin/env 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 # "Lic...
/*************************************************************************** * (C) Copyright 2003-2016 - Marauroa * *************************************************************************** *************************************************************************** * ...
package com.scand.realmbrowser; import android.view.View; import com.scand.realmbrowser.view.DragOverlayView; import com.scand.realmbrowser.view.RowView; import java.util.ArrayList; import java.util.List; /** * Created by Slabodeniuk on 3/31/16. */ public class ColumnWidthMediator implements RowView.OnCol...
<filename>hwpy_modules/i2c_rapi.py """ Raspberry Pi hardware i2c part of hwpy: an OO hardware interface library home: https://www.github.com/wovo/hwpy """ from hwpy_modules.i2c_interface import * import smbus class _rapi_i2c_hardware(i2c_interface): """Hardware i2c interface. This is the hardware i2c inter...
#!/bin/bash wget -r http://web.corral.tacc.utexas.edu/utcompling/fieldspring-data/wistr-models-cwardev-gt wget -r http://web.corral.tacc.utexas.edu/utcompling/fieldspring-data/wistr-models-cwartest-gt wget -r http://web.corral.tacc.utexas.edu/utcompling/fieldspring-data/wistr-models-trdev-gt wget -r http://web.corral....
/** * Licensed under the Artistic License; you may not use this file * except in compliance with the License. * You may obtain a copy of the License at * * http://displaytag.sourceforge.net/license.html * * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT...
'use strict'; var binary = require('binary'); var jspack = require('jspack').jspack; exports.flt64 = function(buf, o) { return jspack.Unpack("<d", buf, o | 0); }; exports.int8 = function(buf, o) { return binary.parse(buf.slice(o | 0)).word8lu('n').vars.n; }; exports.int16 = function(buf, o) { return binar...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "pal_x509.h" #include <assert.h> #include <openssl/pem.h> #include <openssl/x509v3.h> static_assert(PAL_X509_V_OK == X509_V_OK, ""); static_assert(PAL_X509_V...
# GitHub Labels # # A simple shell script that loops through an array of repositories in the # ProctorU organization, removes the default labels (if applicable), then # adds our Organization-wide labels. # # Usage: # # Add your repository to the variable, REPOS, below. # Example: # => REPOS("repository-one" "repository...
/* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * * 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 * the rights to use...
export interface ISendQueueMessageOptions { readonly replyTo: string; readonly correlationId: string; }
import matplotlib.image as mpimg import matplotlib.pyplot as plt import numpy as np import cv2 import glob from skimage.feature import hog from skimage import color, exposure import random from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.svm im...
SPM_MODEL_PATH="/data/10/litong/NICT-MT/all-4-sentencepiece-en_ja-32000.model" BASE_PATH="/data/temp/litong/fairseq/data-bin" #CUDA_VISIBLE_DEVICES=${1} BASE_SAVE_PATH=${1} RESULT_FILE=${BASE_SAVE_PATH}/results.txt mkdir -p ${BASE_SAVE_PATH} for LANG_PAIR in $(echo "en_ja ja_en" | tr " " "\n") do echo ${LANG_PAIR} ...
#!/bin/bash rm -rf bin mkdir bin gcc -w src/icd/* src/lib/* -o bin/icd -std=c99 -I inc/ -lpthread -lnfnetlink -lnetfilter_queue -lm -Wfatal-errors gcc -w src/isd/* src/lib/* -o bin/isd -std=c99 -I inc/ -lpthread -lnfnetlink -lnetfilter_queue -Wfatal-errors gcc -w src/ird/* src/lib/* -o bin/ird -std=c99 -I inc/ -lpthre...
#!/bin/bash set -e cd $(dirname ${0}) PAWPAW_ROOT="${PWD}" JACK2_VERSION=${JACK2_VERSION:=git} JACK_ROUTER_VERSION=${JACK_ROUTER_VERSION:=6c2e532bb05d2ba59ef210bef2fe270d588c2fdf} QJACKCTL_VERSION=${QJACKCTL_VERSION:=0.9.5} # ------------------------------------------------------------------------------------------...
import unittest from unittest.mock import patch from tmc import points from tmc.utils import load, load_module, reload_module, get_stdout, check_source from functools import reduce import os import textwrap from random import randint exercise = 'src.longest_string' function = 'longest' @points('5.longest_string') cl...
<filename>src/apps/opc/src/com/sun/j2ee/blueprints/opc/transitions/QueueHelper.java /* * Copyright 2002 Sun Microsystems, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistri...
#!/bin/bash source "$TEST_SRCDIR/envoy/test/integration/test_utility.sh" # TODO(htuch): In this test script, we are duplicating work done in test_environment.cc via sed. # Instead, we can add a simple C++ binary that links against test_environment.cc and uses the # substitution methods provided there. JSON_TEST_ARRAY...
import Foundation func bubbleSort(_ numbers: [Int]) -> [Int] { var numbers = numbers for i in 0..<numbers.count { for j in 1..<numbers.count - i { if numbers[j] < numbers[j-1] { let temp = numbers[j] numbers[j] = numbers[j-1] numbers[j-1] = te...
import test from "ava"; import m from "."; test("format brackets", t => { t.is(m("(x)"), String.raw`\left(x\right)`); t.is(m("[x]"), String.raw`\left[x\right]`); t.is(m("(x]"), String.raw`\left(x\right]`); t.is(m("[x)"), String.raw`\left[x\right)`); }); test("format absolute value", t => { t.is(m("|x|"), String....
<filename>src/main/java/com/aveng/wapp/service/StringDiffer.java package com.aveng.wapp.service; import java.util.ArrayList; import java.util.List; import java.util.Objects; import org.springframework.lang.NonNull; import org.springframework.stereotype.Service; import com.aveng.wapp.service.dto.StringDiff; import co...
#!/usr/bin/env bash DIR=$(dirname "${BASH_SOURCE[0]}") MACHINE_TYPE=n1-standard-4 GCP_PROJECT=$(gcloud config list --format='value(core.project)') NETWORK="projects/${GCP_PROJECT}/global/networks/default" NODE_NUMBER=1 USER=0track@gmail.com create_cluster() { if [ $# -ne 3 ]; then echo "usage: create_cl...
#!/bin/bash set -e ADMIN_EMAIL="info@matteomattei.com" DOMAIN=${1} FTP_PASSWORD="$(apg -n 1 -m 8 -d)" if [ $# -lt 1 ]; then echo "USAGE: ${0} DOMAIN.TLD" exit 1 fi if [ -d /var/www/vhosts/${DOMAIN} ] then echo "DOMAIN ALREADY PRESENT!" exit 1 fi DOMAINUSER="${DOMAIN}" if echo "${DOMAI...
#ifndef INCLUDED_CORE_AUDIBLE_EVENT_H #define INCLUDED_CORE_AUDIBLE_EVENT_H #include "platform/event.h" namespace core { struct AudibleEvent : public Event { int32_t const mActorGUID; int32_t const mId; bool const mIsOneShot; bool const mIsAddition; AudibleEvent( int32_t ActorId, int32_t Id, bool ...
#!/bin/bash set -o errexit set -o nounset set -o pipefail LIST_NEWEST_VERSION_OUTPUT=$1 # Package|Installed|Candidate FLAVOR=$2 PACKAGE=$(echo $LIST_NEWEST_VERSION_OUTPUT | cut -f 1 -d "|") grep -E -R "^$PACKAGE\|" "$FLAVOR"
#!/bin/bash #source /broad/software/scripts/useuse #reuse Perl-5.8 #reuse .samtools-0.1.19 #reuse GCC-4.9 CMD="`dirname $0`/run_Trinity_eval.pl $*" eval $CMD exit $?
<reponame>ContentPI/ui-k import React from 'react' import Radio from './index' const stories = { component: 'Radio', props: [ { name: 'children', type: 'Node', default: '', description: 'The content of the component', }, { name: 'color', type: 'Color', default:...
python -m torch.distributed.launch --nproc_per_node=4 train0.py > train0.txt python valid0.py > valid0.txt python save_valid_features0.py > save_valid_features0.txt python save_train_features0.py > save_train_features0.txt
import { Component } from '@angular/core'; @Component({ selector:'login-component', template:` <h1>ogin</h1> ` }) export class loginComponent { }
import axios from "axios"; import { API_URL, TOKEN_TTL } from "../constants"; import { storageSet, storageGet } from "../store"; import { getTokenDuration } from "./utils"; export const validateToken = token => { const duration = getTokenDuration(token.created_at, token.expiry); let isValid = duration <= TOKEN_TTL...
#!/bin/bash #---------------------------------------------------- # Sample SLURM job script # for TACC Stampede2 KNL nodes # # *** Serial Job on Normal Queue *** # # Last revised: 27 Jun 2017 # # Notes: # # -- Copy/edit this script as desired. Launch by executing # "sbatch knl.serial.slurm" on a Stampede2 l...
class Node { int data; Node next; Node(int d) {data = d; next = null; } } public class LinkedList { Node head; // Function to reverse the linked list Node reverse(Node node) { Node prev = null; Node current = node; Node next = null; while (...
<gh_stars>0 #include "f.hpp" int main() { f1(); f2(); }
use PHPUnit\Framework\TestCase; class XPathCountTest extends TestCase { protected $xmlDocument; protected function setUp(): void { // Initialize the XML document for testing $xmlString = '<root><element>1</element><element>2</element><element>3</element></root>'; $this->xmlDocument...
package io.cattle.platform.condition.deployment; import io.cattle.platform.core.addon.DependsOn; import io.cattle.platform.core.addon.metadata.InstanceInfo; import io.cattle.platform.core.addon.metadata.ServiceInfo; import io.cattle.platform.core.addon.metadata.StackInfo; public interface ServiceDependency { boo...
/** * Contains classes for tool tip and call out bubbles. */ package io.opensphere.core.callout;
<gh_stars>1-10 package jua.ast; import jua.evaluator.LuaRuntimeException; import jua.evaluator.Scope; import jua.objects.LuaNumber; import jua.token.TokenOperator; public class ExpressionDivision extends ExpressionBinary { ExpressionDivision(TokenOperator token, Expression lhs, Expression rhs) { super(token, l...
<reponame>sorah/binpkgbot require 'binpkgbot/version' require 'binpkgbot/cli'
rm /etc/redis/redis.conf 2> /dev/null cp /var/www/svv-handball/redis.conf /etc/redis/ systemctl restart redis systemctl status redis
<gh_stars>0 class User < ActiveRecord::Base include Clearance::User after_create :setup_timetable before_validation :set_default_name_if_blank has_many :timetables, dependent: :destroy validates :name, presence: true private def setup_timetable #confirm there is no timetable linked to this...
#!/bin/sh # Copy all vimiv icons to the correct icon directory DESTDIR=$1 for i in 16 32 64 128 256 512; do install -Dm644 icons/vimiv_${i}x${i}.png ${DESTDIR}/usr/share/icons/hicolor/${i}x${i}/apps/vimiv.png done install -Dm644 icons/vimiv.svg ${DESTDIR}/usr/share/icons/hicolor/scalable/apps/vimiv.svg
import glob import heapq from typing import List, IO import tempfile import shutil from constants import PAGE_SIZE def _partition(arr: List[int], low: int, high: int): i = (low-1) pivot = arr[high] for j in range(low, high): if arr[j] <= pivot: i = i+1 arr[i], arr[j] = arr[...
import string str = "This, is a test-string." str = str.translate(str.maketrans('', '', string.punctuation)) print(str)
SELECT c.customer_id, c.name FROM customers c INNER JOIN orders o ON o.customer_id = c.customer_id WHERE o.date_ordered > NOW() - INTERVAL 1 MONTH;
function contar() { var valor = document.querySelector('input#valor_total') var total = document.querySelector('span.total') var umReal = document.querySelector('span#um_real') var cinquentaCentavos = document.querySelector('span#cinquenta_centavos') var vinteECinco = document.querySele...
// Copyright 2019 Google Inc. 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 required by appl...
package engine; import database.ObjectFactory; import database.firebase.TrackableObject; import database.jsonhelpers.JSONDataFolders; import engine.camera.Camera; import engine.entities.Entity; import engine.events.*; import javafx.collections.FXCollections; import javafx.collections.MapChangeListener; import javafx.c...
/*jshint -W053 */ import mx from '../../multiplex'; import { qmodule, qtest } from '../../qunit'; qmodule('equals'); qtest('basic equals', function (assert) { assert.ok(mx.equals(null, null), 'null values are equals'); assert.ok(mx.equals(undefined, undefined), 'undefined values are equal'); assert.ok(mx...
def num_occurrences(text, substring): count = 0 for i in range(len(text)-len(substring)+1): if text[i:i+len(substring)] == substring: count += 1 return count
<gh_stars>1-10 from math import floor import copy import genes import genetic_tree as gt from config import * # Dicen que hacer esto es feo, pero me parece necesario from aliment import Aliment, AlimentSource class Procedures(): # Convertir en alimento def be_eaten(self, territory): aliment_units = sel...
from typing import List, Optional from dataclasses import dataclass from enum import Enum from pathlib import Path from rich.table import Table from rich import box from rich.align import Align class TaskStatus(Enum): """Enum for setting the state of tasks""" WAITING = 0 RUNNING = 1 DONE = 2 ERR...
<reponame>ferclaverino/bots<gh_stars>0 'use strict'; function streamEndPoint(req, res, camera) { res.redirect(camera.url); } module.exports = streamEndPoint;
# frozen_string_literal: true module Clinvoice module RenderItems def self.call(pdf, data_items) pdf.move_down 20 pdf.table(items(data_items), width: pdf.bounds.width) do style(row(1..-1).columns(0..-1), padding: [4, 5, 4, 5], borders: [:bottom], border_color: 'dddddd') style(row(0),...
<filename>tests/engine/FileWatcher/tst_FileWatcherTest.cpp /** * @author <NAME> <<EMAIL>> * * @section LICENSE * See LICENSE for more informations. * */ #include <QString> #include <QtTest> #include <QCoreApplication> #include <QScopedPointer> #include <QSignalSpy> #include <QFile> #include <QTextStream> #inclu...
<reponame>FernanddoSalas/blog-api """Users Permissions.""" # Django REST Framework from rest_framework.permissions import BasePermission class IsAccountOwner(BasePermission): """Is Account Owner.""" def has_object_permission(self, request, view, obj): """Verify that requesting user is equal than obj...
/******************************************************************************* * Copyright 1993-2008 NVIDIA Corporation. All rights reserved. * * NOTICE TO USER: * * This source code is subject to NVIDIA ownership rights under U.S. and * international Copyright laws. * * This software and the informa...
<gh_stars>0 package io.hnfmr.tagless import scala.language.higherKinds import cats._ import cats.implicits._ import cats.data.Const object OptimizingFinalTagless extends App { trait KVStore[F[_]] { def get(key: String): F[Option[String]] def put(key: String, a: String): F[Unit] } def program0[M[_]: Fl...
package com.umd.ece552.utils; /** * * @author ingegarcia * */ public interface Iterator { public boolean hasNext(); public Object next(); public boolean isLast(); public boolean isFirst(); public int size(); public int getIndex(); public void restart(); }
<reponame>cugg/BusinessParameters package be.kwakeroni.evelyn.client; import be.kwakeroni.evelyn.model.DatabaseAccessor; import be.kwakeroni.evelyn.model.Event; import java.util.HashMap; import java.util.Map; import java.util.function.BinaryOperator; import java.util.function.Function; import java.util.stream.Collect...
// https://www.codechef.com/DEC19A/problems/CHFRAN #include <bits/stdc++.h> using namespace std; using ii = tuple<int, int>; using vii = vector<ii>; using qii = priority_queue<ii, vii, greater<ii>>; int main() { int t, n, l, r; cin >> t; while (t--) { cin >> n; vii a(n); int m = 2e9, M = 0; qii ...
import os def use_bigquery() -> bool: return ( os.environ.get('BIGQUERY') and os.environ.get('GOOGLE_APPLICATION_CREDENTIALS') and os.environ.get('BIGQUERY_LOCATION') and os.environ.get('BIGQUERY_DATASET') )
import pytest import time from selenium import webdriver @pytest.fixture def driver(request): wd = webdriver.Chrome() request.addfinalizer(wd.quit) return wd def test_login_admin(driver): driver.get('http://localhost/litecart/admin/') driver.find_element_by_name('username').send_keys('admin') ...
#!/usr/bin/env bash # link the uploaded nginx config to enable it echo -e "\e[0m--" rm -rf /etc/nginx/sites-enabled/* for vhost in default pma; do ln -sf /etc/nginx/sites-available/$vhost /etc/nginx/sites-enabled/020-$vhost test -L /etc/nginx/sites-enabled/020-$vhost && echo -e "\e[0mLinking nginx $vhost confi...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/1024+0+512-N-VB-ADJ/13-model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/1024+0+512-N-VB-ADJ/13-512+512+512-NER-256 --do_eval --per...
#!/bin/sh if [ ! -d "$HOME/.yadr" ]; then echo "Installing YADR for the first time" git clone --depth=1 https://github.com/stinoga/dotfiles-1.git "$HOME/.yadr" cd "$HOME/.yadr" [ "$1" = "ask" ] && export ASK="true" rake install else echo "YADR is already installed" fi
import { SearchResult } from "../models/home/reserves-lib"; export const MOCK_RESERVES_LIB_SEARCH = { bookCount: 0, pageCount: 0, data: [], } as SearchResult;
# Get a high-level overview of your instances, optionally limited by VPC function instancenames () { filter="" # POSIX if statement so it works regardless of shell if [ ! -z $1 ] ;then filter="Name=vpc-id,Values=${1}" fi aws ec2 describe-instances --filters $filter --query 'Reservations[*].Instances[*].{N...
#!/usr/bin/env bash # Source: https://github.com/tttapa/RPi-Cpp-Toolchain/blob/103eb26a24a7e03b9672638ece72881311a6c9df/toolchain/toolchain.sh set -e cd "$(dirname "${BASH_SOURCE[0]}")" function print_usage { echo echo "Usage" echo " $0 <board> [--push] [--pull] [--build-toolchain] [--export] [--exp...
<gh_stars>0 /* * Copyright (c) 2010, <NAME> * All rights reserved. * * Made available under the BSD license - see the LICENSE file */ package sim.stats; public class Average { int m_numSamples; double m_x; double m_sum; double m_min; double m_max; double m_error; public Average() { clear(); } ...
<gh_stars>0 import { AnyExtension, EnableRules } from '../types' export default function isExtensionRulesEnabled(extension: AnyExtension, enabled: EnableRules): boolean { if (Array.isArray(enabled)) { return enabled.some(enabledExtension => { const name = typeof enabledExtension === 'string' ? enab...
#!/usr/bin/env bash app_install_node() { parse_node_args "$@" if [[ "$SKIP_DEPS" != "Y" ]]; then heading "Checking Dependencies..." check_program_dependencies "${DEPENDENCIES_PROGRAMS[@]}" check_nodejs_dependencies "${DEPENDENCIES_NODEJS[@]}" fi app_uninstall_node "$@" he...
<reponame>joef551/camel-cql /** * 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 wr...