text
stringlengths
1
1.05M
#!/bin/sh set -e set -u set -o pipefail function on_error { echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" } trap 'on_error $LINENO' ERR if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy # frameworks to, so exit 0 (signalling the...
package com.knavic.nehakakkar; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Environment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; im...
#!/bin/bash lua main.lua '(' lua main.lua '(())' lua main.lua '()()' lua main.lua '(((' lua main.lua '(()(()(' lua main.lua '))(((((' lua main.lua '())' lua main.lua '))(' lua main.lua ')))' lua main.lua ')())())'
import tensorflow as tf # Define model hyperparameters batch_size = 128 embedding_dim = 16 hidden_dim = 32 # Define input and output shapes text_input = tf.keras.layers.Input(shape=(None,)) category_input = tf.keras.layers.Input(shape=(10,)) # Embedding layer embedding_layer = tf.keras.layers.Embedding(batch_size, e...
<gh_stars>0 import {Pipe, PipeTransform} from '@angular/core' @Pipe({ name: 'sort' }) export class SortPipe implements PipeTransform { transform<A>(array: Array<A>, f: (a: A, b: A) => number): Array<A> { if (!Array.isArray(array)) { return [] } array.sort(f) retur...
package graph // ShortestPath computes a shortest path from v to w. // Only edges with non-negative costs are included. // The number dist is the length of the path, or -1 if w cannot be reached. // // The time complexity is O((|E| + |V|)⋅log|V|), where |E| is the number of edges // and |V| the number of vertices in t...
#! /bin/sh # Copyright (C) 2010-2017 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program ...
<reponame>foxdog-studios/pitch-shifter-chrome-extension function sendMessageToActiveTab(message, callback) { chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { tab = tabs[0]; chrome.tabs.sendMessage(tab.id, message, callback); }); }; function init() { var transpose = false; var e...
import time # Function to calculate the Nth Fibonacci number using recursion with memoization def fib_recursion_memo(n, memo={}): if n in memo: return memo[n] if n <= 2: return 1 memo[n] = fib_recursion_memo(n-1, memo) + fib_recursion_memo(n-2, memo) return memo[n] # Function to calcul...
#!/bin/bash cd "$(dirname "$0")" while : do name=$(osascript GetNameAndTitleOfActiveWindow.scpt) echo "name=\"$name\";" > name.js sleep 1 done
#!/bin/bash dieharder -d 4 -g 30 -S 980071245
<filename>FuzzTest/FuzzTest/FTImageTableViewCell.h // // FTImageTableViewCell.h // FuzzTest // // Created by <NAME> on 3/4/15. // Copyright (c) 2015 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> #import "FTObject.h" @interface FTImageTableViewCell : UITableViewCell @property (strong, nonatomic) FTObjec...
#!/bin/bash NRT_SITE="http://nrt-status.gina.alaska.edu/products.txt?" QUERY="" usage() { cat << EOF usage: $0 options This script mirrors data from the NRT Status available products OPTIONS: -h Show this message -s Fetch data for SATELLITE -i Fetch data for SENSOR -f Fetch data for FACILITY -p Fetch...
<filename>components/Form.tsx import React, { useState } from "react"; type Props = { contactId: string; createComment: Function; }; const Form: React.FC<Props> = (props) => { const [title, setTitle] = useState(''); const [content, setContent] = useState(''); const reset = () => { setContent(''); ...
sudo rm -fr /bin/ideone /bin/ideoneSearcher
<reponame>kallsave/vue-router-cache<filename>examples/base/src/plugins/vi-ui/common/helpers/dom.js import { camelize } from './utils.js' export function hasClass(el, className) { const reg = new RegExp('(^|\\s)' + className + '(\\s|$)') return reg.test(el.className) } export function addClass(el, className) { /...
<reponame>Akad1070/ipl_gerasmus package domaine.bizz; import core.exceptions.AppException; import core.exceptions.BizzException; import dal.dao.core.DbEntity; import dal.dao.core.DbEntityColumn; import dal.dao.core.DbEntityColumnTransient; import dal.dao.core.DbEntityFk; import domaine.bizz.interfaces.UserBizz...
#!/bin/sh getRamMb() { ram_kb=$(grep MemTotal /proc/meminfo | awk '{print $2}') ram_mb=$(( ram_kb / 1024 )) echo "${ram_mb}" } getMaxConcurrentProc() { ram_mb=$(getRamMb) proc_count=$(( (ram_mb - 400) / 200 )) proc_count=$(( proc_count > 0 ? proc_count : 1 )) echo "${proc_count}" } # first arg is...
<reponame>MuhammedOzby/GraphQL-Konu-islenmesi-NestJS import { Field, ID, InputType } from '@nestjs/graphql'; @InputType() export class UpdateLocationInput { @Field(() => ID) id: number; @Field() name: string; @Field() desc: string; @Field() lat: number; @Field() lng: number; }
from typing import List, Dict class IoTComponentManager: def __init__(self): self.components = {} def add_component(self, component_name: str) -> None: if component_name not in self.components: self.components[component_name] = set() def remove_component(self, componen...
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { LoginFormComponent } from './login-form.component'; import { ReactiveFormsModule, FormsModule } from '@angular/forms'; import { AngularFireModule } from '@angular/fire'; import { AngularFireAuthModule } from '@angular/fire/auth'; import...
public class BMICalculator { public static void main(String[] args) { double height = 180.0; // in cm double weight = 75.0; // in kg double bmi = (weight / (height * height)) * 10000; System.out.println("Your BMI is: " + bmi); } }
#!/bin/sh set -e echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then local source="${BUILT_PRO...
// Copyright 2020-2021 <NAME>, <NAME>, and other contributors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required b...
<?php class DomainRegistrar { public function processRegistrationData($inputData) { if (isset($inputData['domain']) && isset($inputData['owner']) && isset($inputData['registrar']) && isset($inputData['referrer'])) { $domain = trim($inputData['domain']); $owner = trim($inputData['owne...
def find_divisors(num): divisors = [] for i in range(2,num+1): if num % i == 0: divisors.append(i) return divisors num = 48 divisors = find_divisors(num) print("The divisors of {} are: {}".format(num, divisors))
def evaluate_expressions(n, expressions): results = [] for exp in expressions: try: exp = exp.replace('^', '**') result = eval(exp) results.append(str(result)) except: results.append("Invalid expression") return results # Test the function n =...
// // Copyright 2020 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
#!/bin/bash # Example: # ./launch-suite.sh 06:00.0,07:00.0,85:00.0,86:00.0 1m 0,0,1,1 # Arguments time=$1 # e.g. 1m ids=$2 # e.g. 05:00.0,06:00.0,55:0.0,56:00.0 numa_nodes=$3 # e.g. 0,0,1,1 superpage_sizes=(32Ki 64Ki 128Ki 256Ki 512Ki 1Mi 2Mi 4Mi 8Mi 16Mi 32Mi 64Mi 128Mi 256Mi 512Mi 1Gi) for superpage_size in "${s...
<filename>sshd-common/src/main/java/org/apache/sshd/client/auth/AuthenticationIdentitiesProvider.java /* * 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....
#!/bin/bash source ../setup.env CONNECT_NAME=${CONNECT_NAMES[0]} num=0 echo ========================== $CONNECT_NAME PUBLIC_IPS=`curl -sX GET http://$RESTSERVER:1024/spider/publicip/publicipt${num}-powerkim?connection_name=$CONNECT_NAME |json_pp |grep "\"PublicIP\"" |awk '{print $3}' |sed 's/"//g' |sed 's/,//g'` # ...
package io.opensphere.core.help.data; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * This class holds informat...
<reponame>mannyatico/urban-octo-carnival import React from 'react'; import { BookCover } from './BookCover' import { BookInfo } from './BookInfo' export const Book = (props) => { return ( <div className="media"> <BookCover cover={props.cover} title={props.title} /> <BookInfo title={props.title}...
/* * 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 * "License"); you ...
<reponame>tombartkowski/phonestreamer-server import { Repository } from '../../core/repository'; import { Result, unwrap } from '../../core/resolve'; import { Session } from './session'; import { MongooseQueryParser, QueryOptions } from 'mongoose-query-parser'; import { HTTP } from '../../networking/http'; import { Api...
<filename>src/main/java/io/github/rcarlosdasilva/weixin/core/cache/Lookup.java<gh_stars>1-10 package io.github.rcarlosdasilva.weixin.core.cache; public interface Lookup<V extends Cacheable> { boolean isYou(String key, V obj); }
/** * Created by <NAME> on 05.08.2014. */ import { IPersistable } from '../base/IPersistable'; import { IDataType } from '../data/datatype'; import { Range } from '../range/Range'; import { IEventHandler, EventHandler } from '../base/event'; import { ITransform } from './ITransform'; import { ILocateAble } from './IL...
<filename>src/main/java/chylex/hee/mechanics/enhancements/types/TNTEnhancements.java<gh_stars>10-100 package chylex.hee.mechanics.enhancements.types; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import chylex.hee.init.BlockList; import chylex.hee.mechanics.enhancem...
<filename>TripPlannerApp/controllers/saveItinerary.js /** * Created by rkapoor on 16/09/15. */ var getClient = require('../lib/UtilityFunctions/redisConnection'); var conn = require('../lib/database'); var insertItinerary = require('../lib/insertItinerary'); var updateItinerary = require('../lib/updateItinerary'); m...
/******************************************************************************* * Copyright (c) 2016 comtel 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.or...
# Exception chaining is not supported, but check that basic # exception works as expected. try: raise Exception from None except Exception: print("Caught Exception")
#!/bin/bash #SBATCH --job-name=xlnet2-mask195 # create a short name for your job #SBATCH --output=log_xlnet2-mask195.txt #SBATCH --nodes=1 # node count #SBATCH --ntasks-per-node=1 # total number of tasks across all nodes #SBATCH --cpus-per-task=24 # cpu-cores per task (>1 if multi-threaded...
import importlib import json import logging def load_modules_from_config(): try: with open('module_config.json', 'r') as config_file: module_list = json.load(config_file) for module_name in module_list: try: module = importlib.import_module(module...
class RideQueue: def __init__(self, capacity): self.capacity = capacity self.queue = [] def join_queue(self, visitor_id): if len(self.queue) < self.capacity: self.queue.append(visitor_id) def next_group(self): if self.queue: group = self.queue[:self....
#!/bin/bash #SBATCH --time=30:00:00 #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --cpus-per-task=1 #SBATCH --mem-per-cpu=4gb #SBATCH --partition=bluemoon # Outputs ---------------------------------- #SBATCH --output=log/%x_%j.out #SBATCH --error=log/%x_%j.err # ------------------------------------------ pwd; hos...
<reponame>jianghw/DrugHousekeeper<gh_stars>0 package com.cjy.flb.activity; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.ConnectivityManager; import android.net.NetworkInfo; import an...
'use strict'; N.wire.once('navigate.done:' + module.apiPath, function page_once() { // Enable "OK" button if checkbox checked // N.wire.on(module.apiPath + ':change', function checkbox_state_change(data) { $('#dialogs-unsubscribe').prop('disabled', !data.$this.prop('checked')); }); // Disable dialog ...
<gh_stars>0 import helpers from typing import Iterable, Tuple import itertools import collections def sign(n: int) -> int: if n < 0: return -1 if n > 0: return 1 return 0 def trajectory(xv: int, yv: int) -> Iterable[Tuple[int, int, int]]: x, y = 0, 0 step = 0 while True: ...
#!/bin/bash #bdereims@vmware.com helm repo add bitnami https://charts.bitnami.com/bitnami helm repo update kubectl create namespace kubeapps helm install kubeapps --namespace kubeapps bitnami/kubeapps kubectl -n kubeapps create serviceaccount kubeapps-operator kubectl create clusterrolebinding kubeapps-operator --clu...
#!/bin/sh # Copyright (c) 2015, Plume Design 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: # 1. Redistributions of source code must retain the above copyright # notice, this list o...
function JSONParseSafe(jsonString: string, defaultValue: any = {}) { if (!jsonString) { return defaultValue; } try { return JSON.parse(jsonString); } catch (error) { return defaultValue; } } export { JSONParseSafe };
<reponame>maxime/blog-slice<filename>app/views/posts/trackback_failure.xml.builder xml.instruct! xml.response do |response| response.error '1' response.message "An error occured" end
<gh_stars>0 moreInfo New Window [ Name: "More Info"; Left: Get ( WindowDesktopWidth ) - (Get ( WindowDesktopWidth ) / 2 ) ] Go to Layout [ “moreInfo” (budget) ] Adjust Window [ Resize to Fit ] Pause/Resume Script [ Indefinitely ] February 6, 平成26 9:28:43 Budget Planner.fp7 - moreInfo -1-
/* * Copyright 2015 Textocat * * 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 la...
import java.util.HashSet; import java.util.Set; public class Subsets { public static void main(String[] args) { Set<Integer> set = new HashSet<Integer>(); set.add(1); set.add(2); set.add(3); Set<Set<Integer>> subsets = new HashSet<Set<Integer>>(); subsets.add(set);...
// Save dialog filter settings // 'use strict'; module.exports = function (N, apiPath) { N.validate(apiPath, { hide_answered: { format: 'boolean', required: true } }); // Check auth // N.wire.before(apiPath, function check_auth(env) { if (!env.user_info.is_member) throw N.io.FORBIDDEN; }); ...
#!/usr/bin/env bash JDK_VERSION=110 JDK_PKG=openjdk-11-jdk PROJECT_PATH=. PATH_PROFILE=/etc/profile ANDROID_HOME=$HOME/Android/Sdk ANDROID_HOME_CACHE=$ANDROID_HOME/.cache # Get JDK Version javaVersion() { echo $(java -version 2>&1 | sed -n ';s/.* version "\(.*\)\.\(.*\)\..*".*/\1\2/p;') } # Check and install p...
from enum import Enum class ProjectTypeAPI(str, Enum): all = "all" template = "template" user = "user" @classmethod def get_available_project_types(cls): return [project_type.value for project_type in cls]
<filename>orchestrate/orchestrate/handler/rendezvous_test.go package handler import ( "testing" "github.com/jmoiron/sqlx" "gopkg.in/DATA-DOG/go-sqlmock.v1" ) func TestGetTestHelpers(t *testing.T) { mockDB, mock, err := sqlmock.New() if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub ...
package io.gridgo.bean; import java.util.Map; import java.util.function.BiFunction; import java.util.function.Function; public interface ImmutableBObject extends BObject { static final UnsupportedOperationException UNSUPPORTED = new UnsupportedOperationException("Instance of ImmutableBObject cannot be modified")...
#!/bin/bash -eu BG=`cat /setup.dat | sed '1q;d'` SETUP_SCRIPT_LOCATION=`cat /setup.dat | sed '2q;d'` TESTSYSTEM=`cat /setup.dat | sed '3q;d'` INSTALLHEAD=`cat /setup.dat | sed '4q;d'` source /arch_func.sh echo " Geany" PKGS="geany geany-plugins" AURPKGS="geany-themes-git" install_packs "$PKGS" install_packs_aur "$...
def compute_average(list_of_numbers): total = 0 for num in list_of_numbers: total += num return total/len(list_of_numbers)
#!/bin/sh . bin/activate cd examples export FLASK_APP=auth_basic #export FLASK_APP=auth_database #export FLASK_APP=auth_withrole #export FLASK_APP=email_account #export FLASK_APP=starter_1 export FLASK_ENV=development flask run
#!/usr/bin/env bats load helpers/general export SCRIPT_LOCATION="scripts/roxe_build.sh" export TEST_LABEL="[roxe_build_centos]" [[ $ARCH == "Linux" ]] || exit 0 # Exit 0 is required for pipeline [[ $NAME == "CentOS Linux" ]] || exit 0 # Exit 0 is required for pipeline # A helper function is available to show output ...
# Oil Blocks #### cd with block shopt -s oil:all # OLDPWD is NOT defined cd / { echo $PWD; echo OLDPWD=${OLDPWD:-} }; echo done echo $(basename $PWD) # restored cd /tmp { echo PWD=$PWD echo -sep ' ' pwd builtin: $(pwd) } echo $(basename $PWD) # restored ## STDOUT: / OLDPWD= done oil-blocks.test.sh PWD=/tmp pwd ...
class DataHandler: def __init__(self, format, length, text=None, data=None): if format.startswith("Fortran"): self.format = FortranFormat(format) else: self.format = format self.length = length if text is None: self._output() if data is Non...
<filename>old-katas/btree-kata/btree-kata-day-2/src/main/java/kata/java/BTreeSet.java package kata.java; import java.util.Arrays; public class BTreeSet { private final int pageSize; private Page root; private int height; public BTreeSet(int pageSize) { this.pageSize = pageSize; ...
#!/bin/bash # # Usage: # ./src/admission_control_sim.R [--] [--help] [--consider-mem] [--opts opts] [--cpu-capacity-factor factor] \ # [--mem-capacity-factor factor] [--cpu-load-factor factor] [--mem-load-factor factor] \ # [--slo-scenario scenario] [--output...
#!/bin/bash # publish to bin directory dotnet publish $1/$1.csproj -o ../bin --framework netcoreapp2.0 # create an executable script echo "dotnet $PWD/bin/$1.dll \"\$@\"" > bin/$1 chmod 777 bin/$1
#!/usr/bin/env bash set -x echo -e "\n\nInstalling a fresh version of Miniforge." if [[ ${CI} == "travis" ]]; then echo -en 'travis_fold:start:install_miniforge\\r' fi MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" MINIFORGE_FILE="Miniforge3-MacOSX-x86_64.sh" curl -L -O "${MINIFOR...
package com.treetasks.application.data.service; import com.treetasks.application.data.entity.Category; import org.springframework.data.jpa.repository.JpaRepository; import java.time.LocalDate; public interface CategoryRepository extends JpaRepository<Category, Integer> { }
public static boolean isPrime(int num) { //check if input is less than or equal to 1 if (num <= 1) { return false; } //check for all numbers below the given number for (int i = 2; i < num; i++) { if (num % i == 0) { return false; } } //if it passes all tes...
<reponame>nanov/cqrs-examples-core 'use strict'; module.exports = require('cqrs-domain').defineContext({ // optional, default is the directory name name: 'hr', });
<gh_stars>0 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fileCode = void 0; var fileCode = { "viewBox": "0 0 12 16", "children": [{ "name": "path", "attribs": { "fill-rule": "evenodd", "d": "M8.5 1H1c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h10c.55 0 1-.45 1-1...
<filename>elements/lisk-elements/src/index.ts /* * Copyright © 2019 Lisk Foundation * * See the LICENSE file at the top-level directory of this distribution * for licensing information. * * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, * no part of this software, including thi...
<gh_stars>0 package server /* * mimi * * Copyright (c) 2018 beito * * This software is released under the MIT License. * http://opensource.org/licenses/mit-license.php **/ import ( "errors" "path/filepath" "strings" "github.com/beito123/mimi/util" ) type LoaderManager struct { Loaders map[string]Loader }...
import sqlite3 conn = sqlite3.connect('example.db') cursor = conn.cursor() cursor.execute('SELECT * FROM table') num_records = len(cursor.fetchall()) print(num_records)
#!/bin/bash # Copyright 2017 The 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 t...
#ifndef LITE_PACK_ENDIAN_H #define LITE_PACK_ENDIAN_H #include "lite_pack/compiler.h" #include <arpa/inet.h> #include <stdbool.h> #if __APPLE__ #include <machine/endian.h> #else #include <endian.h> #endif #if BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN #error We are supporting little and big endian only ...
import xml.etree.ElementTree as ET def parse_ofx_data(ofx_data: str) -> dict: root = ET.fromstring(ofx_data) ledger_bal = root.find('.//LEDGERBAL') balance_amount = float(ledger_bal.find('BALAMT').text) date_as_of = ledger_bal.find('DTASOF').text return { 'balance_amount': balance_amount, ...
#!/bin/bash # TYPO3 Installation Backup Restore Script # written by Oliver Salzburg set -o nounset set -o errexit SELF=$(basename "$0") # Show the help for this script function showHelp() { cat << EOF Usage: $0 [OPTIONS] [--file=]<FILE> Core: --help Display this help and exit. --verbose ...
#!/bin/bash # wait-for-grid.sh set -e cmd="$@" while ! curl -sSL "${SELENIUM_URL}/status" 2>&1 \ | jq -r '.value.ready' 2>&1 | grep "true" >/dev/null; do echo "Waiting for the Grid ${SELENIUM_URL}" sleep 1 done >&2 echo "Selenium Grid is up - executing parser" exec $cmd
#!/bin/bash docker build --pull -t docker-opensuse-osc-client . docker tag docker-opensuse-osc-client fbartels/docker-opensuse-osc-client docker login docker push fbartels/docker-opensuse-osc-client
#!../lib/test-in-container-environs.sh set -ex [ -d mirrorbrain ] ./environ.sh pg9-system2 ./environ.sh ap9-system2 ./environ.sh ap8-system2 ./environ.sh ap7-system2 ./environ.sh mb9 $(pwd)/mirrorbrain pg9*/start.sh mb9*/configure_db.sh pg9 mb9*/configure_apache.sh ap9 ap9=$(ls -d ap9*) # populate test data for x...
package com.pucrs.sensores_plantas.model; import static org.junit.Assert.assertEquals; import org.junit.Test; public class SensorTest { @Test public void DeveCriarUmSensor() { Sensor sensor = new Sensor(); sensor.setId("10"); sensor.setHumidity(50); assertEquals(10, (int)sensor.getId()); a...
SELECT country, AVG(salary) FROM employees GROUP BY country;
<reponame>kieranroneill/KRPulsingOverlayView<filename>example/KRPulsingOverlayViewDemo/KRPulsingOverlayViewDemo/KRPulsingOverlayViewController.h // // KRPulsingOverlayViewController.h // KRPulsingOverlayViewDemo // // Created by <NAME> on 07/01/2015. // Copyright (c) 2015 <NAME>. All rights reserved. // #import <U...
#!/bin/bash #set -x START_DIR=`dirname $0` cd $START_DIR export SYSREPO_REPOSITORY_PATH=`pwd`/sysrepo export LIBYANG_EXTENSIONS_PLUGINS_DIR=`pwd`/lib/libyang/extensions export LIBYANG_USER_TYPES_PLUGINS_DIR=`pwd`/lib/libyang/user_types export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH # busibox version of 'ps' doesn't...
#!/bin/bash cat $1 $2 > tmpfile mv tmpfile $2
package mg.security.token; import io.jsonwebtoken.*; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.web....
package de.bitbrain.braingdx.ai.pathfinding.heuristics; import de.bitbrain.braingdx.tmx.TiledMapContext; import de.bitbrain.braingdx.world.GameObject; /** * A heuristic that uses the tile that is closest to the target * as the next best tile. In this case the sqrt is removed * and the distance squared is used inst...
#!/bin/bash set -e DINGTALK_ACCESS_TOKEN=${DINGTALK_ACCESS_TOKEN:-} DINGTALK_SECRET=${DINGTALK_SECRET:-} MSGTYPE=${MSGTYPE:-"markdown"} TITLE=${TITLE:-} TEXT=${TEXT:-} echo "## Sending message ##################" dingtalk -accessToken "${DINGTALK_ACCESS_TOKEN}" -secret "${DINGTALK_SECRET}" -msgtype "${MSGTYPE}" -tit...
#!/bin/bash #SBATCH --account=def-dkulic #SBATCH --mem=8000M # memory per node #SBATCH --time=23:00:00 # time (DD-HH:MM) #SBATCH --output=/project/6001934/lingheng/Double_DDPG_Job_output/continuous_BipedalWalkerHardcore-v2_ddpg_hardcopy_action_noise_seed4_run4_%N-%j.out # %N for node name, %j for ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.arrowUp2 = void 0; var arrowUp2 = { "viewBox": "0 0 16 16", "children": [{ "name": "path", "attribs": { "fill": "#000000", "d": "M13.707 6.293l-5-5c-0.39-0.391-1.024-0.391-1.414 0l-5 5c-0.391 0.391-0.391 1.02...
<filename>code/Python/vtk_development/VTK_Example/Visualization/TextSource.py import vtk # Create a sphere textSource = vtk.vtkTextSource() textSource.SetText("Hello") textSource.SetForegroundColor(1.0, 0.0, 0.0) textSource.BackingOn() textSource.Update() # Create a mapper and actor mapper = vtk.vtkPolyDataMapper() ...
def levenshtein_distance(word1, word2): m = len(word1) n = len(word2) dp = [[0] * (n + 1) for _ in range(m + 1)] for i in range(m + 1): for j in range(n + 1): if i == 0: dp[i][j] = j elif j == 0: dp[i][j] = i elif word1[i-1] ==...
#!/usr/bin/env bash gcloud config set project gke-c2 gcloud beta container --project gke-c2 clusters delete gke-c2 --zone=us-central1-a
<gh_stars>0 export * from './user-factory.service'; export * from './user-services.service';
import React from 'react'; import SectionHeading from '../components/SectionHeading'; import Button from '../components/Button'; import Product from '../components/Product'; import products from '../config/products'; function RecommendedSection() { return ( <div id="recommended"> <SectionHeading>Polecane p...
import React from 'react'; const BookList = ({books}) => { return ( <div> <h4>Books</h4> {books.map(book => ( <div key={book.title}> <p>{book.title} by {book.author}</p> </div> ))} </div> ); }; export default BookList;