text
stringlengths
1
1.05M
""" Support for hydrological data from the Federal Office for the Environment FOEN. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.swiss_hydrological_data/ """ from datetime import timedelta import logging import voluptuous as vol from homeassis...
#!/bin/bash #Define a default pattern for limiting the branches to be removed pattern="" #Define a default branch to check against target="origin/master" #Define xterm control code variables green="\033[1;32m" yellow="\033[1;33m" red="\033[1;31m" end="\033[m" #parse the options while getopts ":fghp:t:" opt; do cas...
import numpy as np class get_config(object): def __init__(self, args): self.dataset = args.dataset self.datapath = args.data_path # data list self.trn_lst = None self.trn_lb = None self.val_lst = None self.val_lb = None # data dimension self.i...
# OBSS SAHI Tool # Code written by <NAME>, 2020. import glob import json import ntpath import os import pickle import re import urllib.request import zipfile from os import path from pathlib import Path import numpy as np def create_dir(_dir): """ Creates given directory if it is not present. """ if...
<filename>coca-co/src/main/java/coca/co/ins/VoidCoIns.java /** * */ package coca.co.ins; /** * What? * * @author dzh * @date Sep 2, 2017 5:44:31 PM * @since 0.0.1 */ public class VoidCoIns extends BasicCoIns<Void> { public static final VoidCoIns VOID = new VoidCoIns(); public VoidCoIns() { ...
#!/bin/sh # Install Docker curl -sSL get.docker.com | sh && \ sudo usermod pi -aG docker # Disable Swap sudo dphys-swapfile swapoff && \ sudo dphys-swapfile uninstall && \ sudo update-rc.d dphys-swapfile remove echo Adding " cgroup_enable=cpuset cgroup_enable=memory" to /boot/cmdline.txt sudo cp /boot/cmdline.t...
package com.report.adapter.persistence.converter; import com.report.application.entity.FilmCharacter; import org.modelmapper.AbstractConverter; public class FilmCharacterValueObjectToEntityConverter extends AbstractConverter<com.report.application.domain.vo.FilmCharacter, FilmCharacter> { @Override protected ...
<reponame>v-gu/flume<gh_stars>0 /* Copyright 2013 Vincent.Gu 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 app...
export default function(ngapp, fileHelpers) { ngapp.directive('settingsModal', function () { return { restrict: 'E', templateUrl: 'directives/settingsModal.html', controller: 'settingsModalController', scope: false } }); ngapp.controller('sett...
<gh_stars>0 /* eslint-disable @typescript-eslint/no-var-requires */ const fs = require('fs'); const pythagoras = (x1, x2, y1, y2) => Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)); const islands = JSON.parse(fs.readFileSync('./data/islands.json')).islands; const distances = []; for (let i = 0; i < islands...
#!/bin/bash SCRIPT_NAME=$(basename $0) . load-config.sh ADB=adb GDB=${GDB:-prebuilt/$(uname -s | tr "[[:upper:]]" "[[:lower:]]")-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gdb} B2G_BIN=/system/b2g/b2g GDBINIT=/tmp/b2g.gdbinit.$(whoami) GONK_OBJDIR=out/target/product/$DEVICE SYMDIR=$GONK_OBJD...
import android.graphics.Color; import android.graphics.Bitmap; public static String detectColor(Bitmap image) { int color = Color.parseColor(Color.red(image)); String hexColor = String.format("#%06x", (0xFFFFFF & color)); return hexColor; }
tell application "Safari" open location "www.example.com" end tell
function calculateAverage(arr) { var sum = 0; for (var i = 0; i<arr.length; i++) { sum += arr[i]; } return sum/arr.length; } var arr = [1, 4, 2 ,6]; var average = calculateAverage(arr); console.log(average); // 3.5
# rubocop:disable Metrics/LineLength # == Schema Information # # Table name: media_ignores # # id :integer not null, primary key # media_type :string indexed => [media_id] # created_at :datetime not null # updated_at :datetime not null # media_id :integer index...
def ascending_sum(nums): nums.sort() total = 0 for i in nums: total += i return total print(ascending_sum([1, 2, 3, 4, 5]))
type Query { contacts: [Contact] contact(id: ID!): Contact } type Mutation { addContact(name: String!, phoneNumber: Int!): Contact updateContact(id: ID!, name: String!, phoneNumber: Int!): Contact deleteContact(id: ID!): Contact } type Contact { id: ID! name: String! phoneNumber: Int! }
#!/bin/bash # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # #WARNING: must have compiled PyTorch and caffe2 #check if extra argument is passed to the test if [[ $# == 1 ]]; then dlrm_e...
# oh-my-zsh's keybindings come with such "features" as making up-arrow default to prefix searching. Remove these entirely
package main import "testing" func Benchmarkch1ch2(b *testing.B) { done := make(chan struct{}) ch1 := make(chan int) ch2 := make(chan int) // TODO 又不死锁了。。。。。 go func() { for i := 0; i < b.N; i++ { ch1 <- 1 <-ch2 } done <- struct{}{} }() go func() { for i := 0; i < b.N; i++ { ch2 <- 2 <-ch1...
import React, { PureComponent } from 'react'; import { connect } from 'dva'; import { Card, Form, Icon, Button, Dropdown, Menu, Table, Modal, Input } from 'antd'; import PageHeaderWrapper from '@/components/PageHeaderWrapper'; import styles from './List.less'; import { getCategory, createCategory, deleteCategory } from...
class ElementUtils { static classListAdd(element, ...classNames) { for (let i = 0; i < classNames.length; i += 1) { const className = classNames[i]; element.classList.add(className); } } static classListRemove(element, ...classNames) { for (let i = 0; i < cl...
<filename>src/bus/management/AssignBus.java /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package bus.management; import java.sql.Connection; import java.sql.DriverManager; import ...
#!/bin/sh docker run --rm --net=host lensesio/fast-data-dev
const express = require('express') const crypto = require('crypto') const app = express() app.use(function (req, res, next) { res.header('Access-Control-Allow-Origin', '*') res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept') next() }) app.get('/', function (req, res) { ...
#!/bin/bash # Script to assist in correcting rotations # (c) Silas S. Brown 2006-2008,2019-2021, v1.1215 # 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/...
#!/bin/sh # # Android # # This installs Android studio from the stable channel #echo "› brew cask install android-studio" #brew cask install android-studio pwd #ls $ZSH/android/path.zsh #source $ZSH/android/path.zsh #echo "› sdkmanager --update" #$ANDROID_HOME/tools/bin/sdkmanager --update
#include <bits/stdc++.h> using namespace std; typedef long long ll; void printSubset(vector<int> vec, int n) { for (int i = 0; i < (1 << n); i++) { for (int j = 0; j < n; j++) { if (i & (1 << j)) { cout << vec[j] << " "; } } co...
<filename>AutoRotate/app/src/main/java/com/prat/autorotate/MainActivity.java package com.prat.autorotate; import android.app.Activity; import android.app.Service; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import androi...
<filename>enterprise-modules/charts/src/charts/chartComp/chartTranslator.ts import { Bean, BeanStub } from "@ag-grid-community/core"; @Bean("chartTranslator") export class ChartTranslator extends BeanStub { private static DEFAULT_TRANSLATIONS: { [name: string]: string; } = { pivotChartTitle: 'Pivot Chart'...
<reponame>zrwusa/expo-bunny import React from 'react'; import {makeStyles} from './styles'; import {IcoMoon} from '../UI'; import {LinearGradientIconProps} from './LinearGradientIcon'; import {useBunnyKit} from '../../hooks/bunny-kit'; export function LinearGradientIcon(props: LinearGradientIconProps) { const {siz...
#!/bin/bash nohup /home/pi/grid-antenna-control/cpp/sp4t_control
from django.conf.urls import url from easy_auth.views import ( LoginAuthView, LogoutAuthView, PasswordChangeAuthView, PasswordChangeDoneAuthView, PasswordResetAuthView, PasswordResetConfirmAuthView, PasswordResetDoneAuthView, PasswordResetCompleteAuthView ) urlpatterns = [ url(r'^c...
#!/usr/bin/env bash # Copyright 2019 The Knative Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
<filename>drivers/chainex.js<gh_stars>10-100 const Driver = require('../models/driver'); const request = require('../lib/request'); const Ticker = require('../models/ticker'); const { parseToFloat } = require('../lib/utils'); /** * @memberof Driver * @augments Driver */ class ChainEx extends Driver { /** * @au...
<gh_stars>0 package route import ( "math/rand" "time" pb "github.com/gotway/service-examples/pkg/route/pb" ) var ValidPoint = &pb.Point{Latitude: 409146138, Longitude: -746188906} var InvalidPoint = &pb.Point{Latitude: 0, Longitude: 0} var Rect = &pb.Rectangle{ Lo: &pb.Point{Latitude: 410000000, Longitude: -74...
<reponame>saucelabs/travis-core require 'data_migrations' class CreateRequestsCommitsAndTasks < ActiveRecord::Migration def self.up change_table :builds do |t| t.references :commit t.references :request t.string :state end create_table :commits, :force => true do |t| t.references...
import UrlParser from '../../routes/url-parser'; import RestaurantSource from '../../data/restaurant-source'; import { restaurantDetailTemplate } from '../templates/template-html'; import LikeButtonPresenter from '../../utils/like-button-presenter'; import PostReview from '../../utils/post-review'; import Spinner from ...
<filename>gatsby-config.js module.exports = { siteMetadata: { title: `Luke Willis`, description: `Just some dude`, author: `@lukemwillis`, linkedinUsername: "lukemwillis", stackOverflowUserId: "2479481", }, plugins: [ { resolve: `gatsby-plugin-google-analytics`, options: { ...
#!/bin/sh process_stanford_scene() { DATA_NAME=$1 GDRIVE_ID=$2 ./gdrive_download.sh $GDRIVE_ID unzip --qq $DATA_NAME"_png.zip" -d ../dataset/stanford/$DATA_NAME rm $DATA_NAME"_png.zip" } mkdir ../dataset/stanford process_stanford_scene "burghers" "0B6qjzcYetERgUU0wMkhnZVNCa28" process_stanford_scen...
public class ExampleClass { public static void main(String[] args) { // Code logic goes here } }
def perform_substitutions(text, substitutions): for key, value in substitutions.items(): text = text.replace("{0} ".format(key), u"\xb7{0} ".format(value)) # added a trailing space to only replace exact name matches return text
#!/bin/bash nohup redis-server &
# Run this file as source local-testing.sh from sweater-comb root, then you can run sweater-comb-local anywhere during testing :) CURRENT_ROOT=$(pwd) alias sweater-comb-local='ts-node $CURRENT_ROOT/src/index.ts'
<filename>ipythonblocks/ipythonblocks.py """ ipythonblocks provides a BlockGrid class that displays a colored grid in the IPython Notebook. The colors can be manipulated, making it useful for practicing control flow stuctures and quickly seeing the results. """ # This file is copyright 2013 by <NAME> and covered by t...
package com.netcracker.ncstore.exception; /** * Exception when it is unable to create a user */ public class UserServiceCreationException extends RuntimeException { public UserServiceCreationException(String message) { super(message); } public UserServiceCreationException(String message, Throwab...
#!/bin/bash export PETSC_DIR=$SRC_DIR export PETSC_ARCH=arch-conda-c-opt if [[ $(uname) == Darwin ]]; then SO=dylib else SO=so fi $PYTHON ./configure \ --with-fc=0 \ --with-debugging=0 \ --COPTFLAGS=-O3 \ --CXXOPTFLAGS=-O3 \ --LIBS=-Wl,-rpath,$PREFIX/lib \ --with-blas-lapack-lib=libopenblas.$SO \...
package net.jackofalltrades.idea.db; import net.jackofalltrades.idea.IntellijBuildVersionFormatException; import org.junit.Test; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public class IntellijVersionHelperTest { @Test public void verifyIntellijBuildVersionCanBeVe...
def calculate_result(arr): if not arr: return 0 elif len(arr) == 1: return arr[0] else: return arr[0] + arr[-1]
BUILD_DKPRO_PACKAGE=1 BUILD_DKPRO_AUTOMATED=1 BUILD_DKPRO_INSTALLDIR=/devkit export MAKEFLAGS="$MAKEFLAGS -j$(getconf _NPROCESSORS_ONLN)"
import { Component, ViewChild } from '@angular/core'; import { IonicPage, Content, ActionSheetController } from 'ionic-angular'; /** * Generated class for the FounderPage page. * * See https://ionicframework.com/docs/components/#navigation for more info on * Ionic pages and navigation. */ @IonicPage() @Component...
require 'spec_helper' describe CFMicro::McfCommand do shared_examples 'micro common inputs' do describe 'inputs' do subject { command.inputs } it { expect(subject[:vmx][:description]).to eq "Path to micro.vmx" } it { expect(subject[:password][:description]).to eq "Cle<PASSWORD> password for gue...
#!/bin/bash cd /Mythic/mythic export PYTHONPATH=/Mythic:/Mythic/mythic python3.8 mythic_service.py
<reponame>glowroot/glowroot-instrumentation /** * Copyright 2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICE...
import multiprocessing def create_and_start_worker(routine, pid): name = "worker-" + str(pid) # Create a unique name for the worker process worker_process = multiprocessing.Process(name=name, target=routine) # Create a new worker process worker_process.daemon = False # Set the worker process as non-daem...
class AuthenticationSystem { currentUser: any; get isLogged() { return !!this.currentUser; } constructor() { this.currentUser = localStorage.getItem('currentUser') || false; } login(username: string) { this.currentUser = username; localStorage.setItem('currentUser', username); } logo...
'use strict'; const log = require('npmlog'); const tty = require('tty'); log.addLevel('debug', -Infinity, {fg: 'grey'}); log.addLevel('verbose', 1000, {fg: 'green'}); log.addLevel('info', 2000, {fg: 'blue'}); log.addLevel('warn', 4000, {fg: 'yellow'}); log.addLevel('error', 5000, {fg: 'red'}); log.prefixStyle = { f...
<gh_stars>0 class AddCascadingToRunSegments < ActiveRecord::Migration[5.0] def change remove_foreign_key :segments, :runs add_foreign_key :segments, :runs, on_delete: :cascade remove_foreign_key :segment_histories, :segments add_foreign_key :segment_histories, :segments, on_delete: :cascade end end...
// Semmle test case for CWE-190: Integer Overflow or Wraparound // http://cwe.mitre.org/data/definitions/190.html package test.cwe190.semmle.tests; public class Holder { public int dat; public Holder(int d) { dat = d; } public void setData(int d) { dat = d; } public int getData() { return dat; } }
// Your JavaScript
<reponame>OzTamir/RubiksCube var stats, scene, renderer, composer; var camera, cameraControls; var cube = new THREE.Object3D(); var cubeBurst = false; var cameraDistance = 15; var partsInCubeFace = 3; var cubePartSize = 1.5; var cubePartDepth = 0.5; var colors = [0xffffff, 0x00ffff, 0xff0000, 0x00ff00, 0x0000ff, 0xf...
import '@polymer/paper-button'; import '@polymer/paper-input/paper-textarea'; import { html, PolymerElement } from '@polymer/polymer'; import '@radi-cho/star-rating'; import { ReduxMixin } from '../mixins/redux-mixin'; import { feedbackActions, toastActions } from '../redux/actions'; import { store } from '../redux/sto...
package test; import me.insidezhou.southernquiet.FrameworkAutoConfiguration; import me.insidezhou.southernquiet.file.web.controller.FileWebController; import me.insidezhou.southernquiet.file.web.model.FileInfo; import me.insidezhou.southernquiet.file.web.model.IdHashAlgorithm; import me.insidezhou.southernquiet.filesy...
<filename>backend/src/test/java/fr/inra/urgi/faidare/api/brapi/v1/StudyControllerTest.java<gh_stars>1-10 package fr.inra.urgi.faidare.api.brapi.v1; import fr.inra.urgi.faidare.domain.data.phenotype.ObservationUnitVO; import fr.inra.urgi.faidare.domain.data.study.StudyDetailVO; import fr.inra.urgi.faidare.domain.respon...
<reponame>JoshLuong/Trippo import styled from "styled-components"; import * as c from "../../colors/colors"; import { Grid } from "@material-ui/core"; import WarningIcon from "@material-ui/icons/Warning"; import { IconButton } from "@material-ui/core"; interface ButtonProps { $edit?: boolean; $hasMarginTop?: boolea...
'use strict'; // used for connecting to mysql - host/user/password // must be changed according to system settings module.exports.mysql = { host: 'localhost', user: 'root', password: '<PASSWORD>', charset: 'UTF8MB4', database: 'planner', };
#!/usr/bin/env bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH # set -euxo pipefail cur_dir=$( cd "$(dirname "$0")" pwd ) DATE="$(echo $(TZ=UTC date '+%Y-%m-%d %H:%M:%S'))" check_dir="${cur_dir}/check" tmpFile="./action.tmp" Green_font_prefix="\033[32m" && Red_font_pre...
# Import the necessary Tello SDK library from djitellopy import Tello # Create a Tello object tello = Tello() # Connect to the Tello drone tello.connect() # Takeoff the drone tello.takeoff() # Prompt the user for input user_input = input("Enter command: ") # Check if the user input is 'q' if user_input == 'q': ...
<reponame>valitydev/sink-common-lib package dev.vality.sink.common.serialization.impl; import dev.vality.damsel.payment_processing.EventPayload; public class PaymentEventPayloadDeserializer extends AbstractThriftBinaryDeserializer<EventPayload> { @Override public EventPayload deserialize(byte[] bin) { ...
#!/bin/bash set -e set -x # Dependencies yarn add react-native-camera@4.2.1 yarn add react-native-qrcode-scanner yarn add react-native-permissions # Podfile cd ios if grep -q "Permission-Camera" Podfile then echo "Permission-Camera already supported, nothing to do here" else sed -i.bak '/RNCPushNotificationIOS/a\ ...
<reponame>vintprox/3dd-widget import Widget from './classes/Widget'; import Service from './classes/Service'; export { Widget, Service };
function validateEmail(email) { // Regex for email validation var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; if(re.test(String(email).toLowerCase())) { return true; } else { return false; ...
# Copyright 2019, Google, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
/* PrintDDL.cpp */ //---------------------------------------------------------------------------------------- // // Project: CCore 3.00 // // Tag: Desktop // // License: Boost Software License - Version 1.0 - August 17th, 2003 // // see http://www.boost.org/LICENSE_1_0.txt or the local copy // // Copyrig...
package com.learn.demomarket.product.service; import com.baomidou.mybatisplus.extension.service.IService; import com.learn.common.utils.PageUtils; import com.learn.demomarket.product.entity.AttrEntity; import com.learn.demomarket.product.vo.AttrGroupRelationVo; import com.learn.demomarket.product.vo.AttrRespVo; import...
# # Copyright 2016-2017 The OpenTracing Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
<gh_stars>0 // Copyright 2008, 2009 The Apache Software Foundation // // 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 requir...
#!/bin/bash # Script to deploy a very simple web application. # The web app has a customizable image and some text. cat << EOM > /var/www/html/index.html <html> <head><title>Meow!</title></head> <body> <div style="width:800px;margin: 0 auto"> <!-- BEGIN --> <center><img src="http://${PLACEHOLDER}/${WIDTH}/$...
<div class="timeline"> <div class="timeline-item"> <div class="timeline-content"> <h3>Activity 1</h3> <p>April 10, 2020 - August 3, 2020</p> </div> </div> <div class="timeline-item"> <div class="timeline-content"> <h3>Activity 2</h3> <p>August 10, 2020 - October 1, 2020</p> ...
struct Closure { closures: Vec<Box<dyn Fn()>>, } impl Closure { fn new() -> Self { Closure { closures: Vec::new() } } fn register<F>(&mut self, closure: F) where F: Fn() + 'static, { self.closures.push(Box::new(closure)); } fn trigger(&self) { for c in ...
#!/bin/bash #### Liam: Add LSF tags here! #------------------------------------------------------------------------------ # GEOS-Chem Global Chemical Transport Model ! #------------------------------------------------------------------------------ #BOP # # !MODULE: intTestExecute_lsf...
#!/bin/sh # install-unifi.sh # Installs the Uni-Fi controller software on a FreeBSD machine (presumably running pfSense). # The latest version of UniFi: UNIFI_SOFTWARE_URL="http://dl.ubnt.com/unifi/6.0.28/UniFi.unix.zip" # The rc script associated with this branch or fork: RC_SCRIPT_URL="https://raw.githubuserconten...
module.exports = { '**/*.+(js|json|ts|md|eslintrc|prettierrc)': ['prettier --write'] }
<filename>0-frameworks/mrpc/example/test_server.cpp #include "server.h" double Add(double a, double b) { return a + b; } int main(int argc, char* argv[]) { short port = 8080; asio::io_context io_context; mrpc::Server server(io_context, port); // Bind functions. server.Bind<float, float, float>("add", Add)...
# This shell script executes Slurm jobs for thresholding # predictions of convolutional # neural network with adaptive threshold on BirdVox-70k full audio # with logmelspec input. # Augmentation kind: none. # Test unit: unit05. # Trial ID: 2. sbatch 045_aug-none_test-unit05_predict-unit05_trial-2.sbatch sbatch 045_aug...
<reponame>anticore/automaton export interface Serializable<T> { serialize: () => T; deserialize: ( data: T ) => void; }
<reponame>BaristaFramework/crema /** * @class BlockItem */ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import styles from './styles.css'; // TODO import { TYPES_LABEL_POSITION, TYPES_LAYOUT } from './consts'; import { qualitativeColorFormatter } from './utils'; class BlockItem...
#!/usr/bin/env bash # Copyright (c) 2017, 2019, Oracle Corporation and/or its affiliates. All rights reserved. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # # When the customer enables the operator's external REST api (by setting # externalRestEnabled to tru...
const html = require('choo/html') module.exports = () => html` <section id="community" class="w-100 center bg-light-gray pa3 mv3 tl"> <h1 class="dark-gray f2 tc">Community</h1> <p class="f3 w-80-ns lh-copy ph5-ns mid-gray center"> ScienceFair v1 was developed by <a class="no-underline bg-animate hover-bg-...
#!/bin/sh # Use the command below to parse multiple dtoverlay statements in config.txt using the SV API # cat /mnt/boot/config.txt | grep -r "dtoverlay" /mnt/boot/config.txt | awk -F= 'BEGIN { ORS="" }; {print "\""$2"\""}' | head -c -1 # Use the command below to parse through a single line of dtoverlay in the config...
def quick_sort(array): if len(array) <= 1: return array else: left, right, pivot = [], [], array[0] for i in array[1:]: if i <= pivot: left.append(i) else: right.append(i) return quick_sort(left) + [pivot] + quick_sort(right) if __name__ == '__main__': array = [2, 4,...
<reponame>tvalodia/battletron<filename>webapp/src/app/spectate-game/spectate-game.component.ts import {Component, OnInit, ViewChild} from '@angular/core'; import {GameService} from "../api/game.service"; import {WebsocketService} from "../game-view/websocket.service"; import {Game, GameViewService} from "../game-view/g...
var assert = require('assert') var P = require('./index.js') var a = { a: 1 } var b = { b: 1 } var t = require('tap') t.jobs = 64 process.env.TAP_BUFFER = 1 t.test(function removeFirstItem (t) { var p = new P p.add(a) p.add(b) p.remove(a) t.equal(p.length, 1) t.equal(p.head, p.tail) t.equal(p.head.data,...
<filename>Modules/IO/ImageIO/include/otbScalarBufferToImageFileWriter.hxx /* * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) * * This file is part of Orfeo Toolbox * * https://www.orfeo-toolbox.org/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use thi...
TERMUX_PKG_HOMEPAGE=https://github.com/termux/science-packages TERMUX_PKG_DESCRIPTION="Package repository containing science software" TERMUX_PKG_LICENSE="Apache-2.0" TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91" TERMUX_PKG_VERSION=1.0 TERMUX_PKG_DEPENDS="termux-keyring" TERMUX_PKG_SKIP_SRC_EXTRACT=true TERMUX_PKG_...
/** * Copyright 2020 DreamWorks Animation L.L.C. * 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...
"use strict"; exports.index = function *() { yield this.render('/home/index', {}); };
#!/usr/bin/env bash set -o errexit set -o nounset set -o pipefail set -o xtrace INTEGRATION_OUTPUT_JUNIT=${INTEGRATION_OUTPUT_JUNIT:-false} if [ "$INTEGRATION_OUTPUT_JUNIT" == true ] then echo "Running integration tests with junit output" mkdir -p reports/ go get github.com/jstemmer/go-junit-report g...
import React from "react" import Container from "../components/Container" import Content from "../components/Content" import SEO from "../components/SEO" export default () => { return ( <React.Fragment> <SEO title={'Datenschutzerklärung'}/> <Container> <Content> <h1>Datenschutzerklä...
#!/bin/bash set -e cargo clean # verify using KLEE # this should detect an error cargo-verify --tests --verbose | tee out1 || true grep -q -F "test t1 ... ASSERT_FAILED" out1 # replay input values cargo-verify --tests --replay | tee out2 || true grep -q -F "Test values: a = 1000, b = 1000" out2