text
stringlengths
1
1.05M
/* * Copyright 2016-2017 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/LICENSE-2.0 * * Unless required ...
interface CalendarEvent { type: string; row: number; text: number | string; inRange?: boolean; selected?: boolean | Dayjs; start?: boolean; }
import React, { useEffect, useRef } from 'react'; import { View, FlatList, Text } from 'react-native'; import styles from './style'; import { MessageType } from '../../types'; import MessageBubble from '../MessageBubble'; export type ConversationInterfaceProps = { conversation: MessageType[] | null, } const Conv...
module.exports = { async up(db) { await db.collection('ptah-users').updateMany( {}, {'$set': {'isAdmin': false}} ); }, async down(db) { } };
#!/bin/bash cat >/etc/motd <<EOL _____ / _ \ __________ _________ ____ / /_\ \\___ / | \_ __ \_/ __ \ / | \/ /| | /| | \/\ ___/ \____|__ /_____ \____/ |__| \___ > \/ \/ \/ A P P S E R V I C E O N L I N U X Docume...
ALTER TABLE results_processing_failure ADD COLUMN failure_message TEXT; ALTER TABLE results_processing_failure ADD COLUMN failure_type TEXT; ALTER TABLE results_processing_failure ADD COLUMN body_type TEXT; CREATE INDEX results_processing_failure_body_type_idx ON results_processing_failure(body_type); CREATE INDEX r...
<filename>src/api/upload.js import request from '@/utils/request' const url = process.env.FILE_API export function uploadImage(data) { return request({ url: url, method: 'post', data }) }
#!/usr/bin/env bash cd flaskapp export FLASK_APP='flaskapp:create_app' export SQLALCHEMY_DATABASE_URI='sqlite:////data/mint.db' flask db upgrade waitress-serve --port 8000 --call 'flaskapp:create_app'
# frozen_string_literal: true # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
import numpy as np class ElectronMicroscopeControl: def __init__(self): self._beam_tilt = np.zeros(1) # Initialize beam tilt attribute def set_beam_tilt(self, tilt): tilt = np.atleast_1d(tilt) self._beam_tilt[...] = tilt def normalize(self, mode="ALL"): KNOWN_MODES = ["SP...
#!/bin/bash # create the directory to store the raster files in ($rundir) # $LCRFS_LOCALDISC is the location of the local disc # we make it unique using the $JOB_ID and $USER variables rundir="${LCRFS_LOCALDISC}/${JOB_ID}_${USER}" mkdir $rundir # recall some files from son lcrfs_recall /backup/clustermuster/buntingp/...
do_test() { cd "$(dirname "$0")" ./generate.sh PYTHONPATH=$PYTHONPATH:$(pwd) python orwell/messages/test/test_messages.py } do_test
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout localhost.key -out localhost.crt -config localhost.conf
class GeometricShape: def __init__(self, side_length): self.side_length = side_length def lado(self, dx): # Assuming dx is the distance to the base of a right-angled triangle side_length = (self.side_length ** 2 - dx ** 2) ** 0.5 return side_length
import { validate } from '../src/pages/zamestnanie' import { testValidation } from './utils/testValidation' describe('zamestnanie', () => { describe('#validate', () => { testValidation(validate, [ { input: { employed: undefined }, expected: ['employed'], }, { input: { employed: ...
#!/bin/bash # Albert Lombarte # alombarte@gmail.com # This script updates the SIFO code to the latest and the passed instance as well. # It is meant to update your code in production. SCRIPTPATH=$(cd ${0%/*} && echo $PWD/${0##*/}) CORE=`dirname "$SCRIPTPATH"` CORE=`cd "${CORE}/../.." && pwd -P` if [ $# != 1 ] then e...
package com.foxconn.iot.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import com.foxconn.iot.entity.DeviceTypeEntity; import com.foxconn.iot.entity...
<reponame>relativeabsolute/AOTYator #!/usr/bin/env node console.log('hello!');
<gh_stars>1-10 /* * Copyright 2015-2021 <NAME> <<EMAIL>> * * 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...
package com.bigsomething.Decryption.MultipleKeys.OneKey; import com.google.common.collect.ImmutableList; public class ShiftedAlphabetHelper { private static final ImmutableList<String> alphabet = new ImmutableList.Builder<String>() .add("A","B","C","D","E","F","G","H","I","J","K","L","M","N",...
""" Dictionary / HashMap / Map f : integer --> anything index: key --> value: anything dictionary key: anything --> value: anything (unique) not unique {} """ words = { 'i': 100, 'am': 20, 'batman': 87 } print(type(words)) print(words['batman']) words['batman'] = 100 print(words['batman'])...
#!/bin/bash echo "Adding instance to ECS cluster {{ECS_CLUSTER_NAME}}" echo ECS_CLUSTER={{ECS_CLUSTER_NAME}} >> /etc/ecs/ecs.config {{#each DEPENDENCY_SCRIPTS}} {{{this}}} {{/each}} echo "Restarting Docker daemon and ECS service for services such as EFS that require a restart" service docker restart start ecs
import pandas as pd from datetime import datetime def get_stock_data(): # Get the stock data from iex.cloud df = pd.read_json('https://cloud.iexapis.com/stable/stock/market/batch?symbols=AAPL,GOOGL,MSFT,TSLA&types=quote&range=1m&last=10&token=<token>') # Convert the timestamp from Unix to DateTime df["...
from typing import List, Dict def parse_dependencies(dependencies: List[str]) -> Dict[str, str]: parsed_dict = {} for dependency in dependencies: package, version = dependency.split('>=') # Split the dependency string into package name and version package_name = package.split('<')[0] # Extrac...
require 'rails_helper' RSpec.describe Thought, type: :model do describe 'associations' do it { should belong_to(:user) } end describe 'validations' do subject { Thought.create(id: 1, user_id: 1, thought: 'We are testing') } it { should validate_presence_of(:thought) } end end
public class MaxSubArraySum { // function to find maximum subArray sum static int maxSubArraySum(int[] arr) { int max_so_far = 0; int max_ending_here = 0; for (int i = 0; i < arr.length; i++) { max_ending_here = max_ending_here + arr[i]; ...
def find_mean(my_list): """Function to calculate the mean of a list of numbers.""" total = 0 for num in my_list: total += num return total/len(my_list) # Test print(find_mean([2, 4, 6, 8])) # Output 5.0
// 4706. 쌍<NAME> // 2019.09.05 // 수학 #include<iostream> #include<cmath> using namespace std; int main() { while (1) { double ta, tb; cin >> ta >> tb; if (ta == 0 && tb == 0) { break; } // 문제에 써있는 공식 적용 printf("%.3lf\n", sqrt(ta*ta - tb * tb) / ta); } return 0; }
<reponame>dadviegas/frontend-startup import './server' import './register'
def hasOccurrence(inputString, char): for i in range(len(inputString)): if inputString[i] == char: return True return False
#include <iostream> using namespace std; void PrintEvenOdd(int arr[], int n) { int even[n], odd[n]; // To store even and odd numbers int e = 0, o = 0; // Traverse through the array and segregate even and odd elements for (int i = 0; i < n; i++) { /* If a number is divisible by ...
list_of_lines = one_large_string.splitlines()
#! /bin/bash #SBATCH -o fftw_plan_020.txt #SBATCH -J fftw_plan_020 #SBATCH --get-user-env #SBATCH --clusters=mpp2 #SBATCH --ntasks=1 #SBATCH --cpus-per-task=1 #SBATCH --exclusive #SBATCH --export=NONE #SBATCH --time=03:00:00 #declare -x NUMA_BLOCK_ALLOC_VERBOSITY=1 declare -x KMP_AFFINITY="granularity=thread,compact,...
#!/bin/bash # # Copyright (c) 2019-2020 P3TERX <https://p3terx.com> # # This is free software, licensed under the MIT License. # See /LICENSE for more information. # # https://github.com/P3TERX/Actions-OpenWrt # File name: diy-part1.sh # Description: OpenWrt DIY script part 1 (Before Update feeds) # # Uncomment a feed...
<reponame>joelmoss/concerned_validations # frozen_string_literal: true require 'active_model' # module ActiveModel::Validations::HelperMethods # def validate_attribute(attribute) # puts "validate_attribute :#{attribute}" # end # end module ConcernedValidations class Error < StandardError; end autoload :...
import { Randomizer, newRandomizer, resolveSeed } from 'dumbfound'; export type Runner = (random: Randomizer) => any; export type AsyncRunner = (random: Randomizer, cb: jest.DoneCallback) => any; export interface RandomizedTest { (name: string, runner: Runner | AsyncRunner, timeout?: number): void; only: Randomize...
import React from "react" import Link from "gatsby-link" import styled from "styled-components" import Fade from "react-reveal/Fade" import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" const JumboContainer = styled.div` display: flex; flex-direction: row; justify-content: space-between; ${"" /* al...
#!/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.ice.restring; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; import org.robolectric.RuntimeEnvironment; import java.util.LinkedHashMap; import java.util.Map; import static org.junit.Assert.assertEquals; @RunWith(RobolectricT...
<filename>src/stack/Boj23253.java<gh_stars>1-10 package stack; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.*; /** * * @author exponential-e * 백준 23253번: 자료구조는 정말 최고야 * * @see https://www.acmicpc.net/problem/23253 * */ public class Boj23253 { private static List<Deque<...
<reponame>ayrzjy/00.ayr-studio /** * */ package org.ayr.main; /** * @author ayrzjy */ public class Bootstrap { /** * @param args */ public static void main(String[] args) { System.out.println("Hello remote"); for (int i = 0; i < 100; i++) { System.ou...
#!/bin/bash -x # # Generated - do not edit! # # Macros TOP=`pwd` CND_CONF=default CND_DISTDIR=dist TMPDIR=build/${CND_CONF}/${IMAGE_TYPE}/tmp-packaging TMPDIRNAME=tmp-packaging OUTPUT_PATH=dist/${CND_CONF}/${IMAGE_TYPE}/logic_gate.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} OUTPUT_BASENAME=logic_gate.X.${IMAGE_TYPE}.${OUTPUT_SU...
# Generated by Django 2.2.4 on 2019-09-09 19:37 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('samvrombinator', '0001_initial'), ] operations = [ migrations.RenameField( model_name='mot', old_name='voc', new...
<filename>tests/basics/int_big_add.py # tests transition from small to large int representation by addition # 31-bit overflow i = 0x3fffffff print(i + i) print(-i + -i) # 63-bit overflow i = 0x3fffffffffffffff print(i + i) print(-i + -i)
public void retainStringsContainingSubstring(Collection<String> strings, String substring) { strings.removeIf(s -> !s.contains(substring)); }
#!/bin/bash for folder in "application"; do find ./ -name '*.php' | xargs sed -i "" 's/Yaf_Application/Yaf\\Application/g' find $folder -name '*.php' | xargs sed -i "" 's/Yaf_Application/Yaf\\Application/g' find $folder -name '*.php' | xargs sed -i "" 's/Yaf_Bootstrap/Yaf\\Bootstrap/g' find $folder -na...
var request = window.requestAnimationFrame || window.webkitRequestAnimationFrame || function (cb) { window.setTimeout(cb, 1000 / 60) } var cancel = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || function (index) { clearTimeout(index); } export defau...
<filename>tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/ClientDataWrapper.java<gh_stars>10-100 package org.apache.tapestry5.integration.app1; import java.io.Serializable; public class ClientDataWrapper implements Serializable { private String value; public ClientDataWrapper(String value)...
#!/bin/bash # # Install linux kernel for TCP BBR and BBR Plus # # Copyright (C) 2021-2023 JinWYP # # 4.4 LTS 4.9 LTS 4.14 LTS 4.19 LTS # 5.4 LTS 5.10 LTS # 4.x版本内核最新的longterm版本是4.19.113,安装的话只能找个4.19的rpm包来安装了 # 从 Linux 4.9 版本开始,TCP BBR 就已经成为了 Linux 系统内核的一部分。因此,开启 BBR 的首要前提就是当前系统内核版本大于等于 4.9 # Linux 内核 5.6 正式发布了,内...
#!/bin/bash # # Copyright 2017-2020 O2 Czech Republic, a.s. # # 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>src/ml/association/HashTree.java package ml.association; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class HashTree<E> { static final int DEFAULT_NUM_BRANCHES = 3; static class Node<E> { List<ItemSet<E>> bucket; HashMap<Integer, Node<E>> children; pu...
/* * Description: Tools for creating the databases * License: Apache-2.0 * Copyright: x-file.xyz */ package tools; /** * Date: 2021-06-16 * Place: Zwingenberg, Germany * @author brito */ public class DatabaseTools { }
from fontTools.pens.basePen import BasePen from fontTools.ttLib import TTFont from fontTools.ttLib.tables._g_l_y_f import Glyph from string import ascii_letters class TTGlyphPen(BasePen): def __init__(self, glyphSet): super(TTGlyphPen, self).__init__(glyphSet) self.points = [] def _moveTo(self...
#!/usr/bin/env bash # # Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
#!/bin/bash curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=1Pad37X7GjZF30DqSlESqQoh_mW-JWSy0" > /dev/null CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)" curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=1Pad37X7GjZF30DqSlESqQoh_mW-JWSy0" -o resources.tar.gz...
<reponame>Juanitoclement/FE-SmartHome<gh_stars>1-10 import axios from "axios/index"; import { AC_ON, AC_OFF, GET_AC, GET_AC_STATUS, SET_TIMER, SET_TEMPERATURE } from "./actionType"; const apiUrl = "http://api.myhomie.me:8000/homie/device/AC/"; const httpOptions = { headers: { "Content-type": "application/form-d...
#!/bin/bash #------------------------------------------------------------------ # setup #------------------------------------------------------------------ set -e scriptdir=$(cd $(dirname $0) && pwd) source ${scriptdir}/common.bash header C# #------------------------------------------------------------------ # Run the...
<reponame>suhuanzheng7784877/ParallelExecute package org.para.distributed.master; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.concurrent.CopyOnWriteArraySet; import org.para.distributed.dto.WorkerNode; import org.para.distributed.util.SortStrategy; /** * worker资源机器的管理者 ...
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
package com.drugbox.Bean.CommentInfo; import com.drugbox.Bean.IBeanOperation; /** * Created by 44247 on 2016/2/22 0022. */ public class CommentZanIBean extends IBeanOperation { private int commentId; public int getCommentId() { return commentId; } public void setCommentId(int commentId) {...
<filename>build/esm/shaders/glsl/point.alpha.generic.js export default /* glsl */ `varying float vPixelSize; float getGenericAlpha(float mask) { return vPixelSize * 2.0 * (1.0 - mask); } `;
<gh_stars>0 import { IsString } from "class-validator"; export class ReactionContentDto { @IsString() type: string; @IsString() username: string; @IsString() id_content: string; }
# 스크립트에서 권한을 지정해서 파일을 작성하고 싶을 때 umask 077 # echo 명령어 출력을 권한 600인 임시 파일로 작성 echo "ID: abcd123456" > idinfo.tmp # 파일 권한 값은 sh로 만들어지면 666 # 디렉터리는 777 # umask 가 1인 곳을 0으로 바꾼다 # 666 --> 1 1 0 1 1 0 1 1 0 # 022 --> 0 0 0 0 1 0 0 1 0 # 결과 --> 1 1 0 1 0 0 1 0 0 # 즉 077 하게 된 결과는 600이 된다.
#!/bin/sh echo "Balandroid v2.0 By Kevin N. Omyonga" SCRIPT_PATH="./scripts/setup.sh" read -r -p "Begin the setup?[y/N] " choice case "$choice" in [yY][eE][sS]|[yY]) source "$SCRIPT_PATH" ;; *) echo "Program Terminated" ;; esac
<filename>zillowAPI/ZillowError.py class NetworkRequestFail(Exception): pass class ZillowRequestError(Exception): """ the error code and information returned by zillow api see: https://www.zillow.com/howto/api/GetZestimate.htm """ def __init__(self,code,message): """ :param co...
#! /bin/bash #export GSOCKET_IP=127.0.0.1 #export GSOCKET_PORT=31337 # Simulate bad network # https://medium.com/@docler/network-issues-simulation-how-to-test-against-bad-network-conditions-b28f651d8a96 # DEV=wlan0 # tc qdisc add dev ${DEV} root netem loss 1% # tc qdisc change dev ${DEV} root netem corrupt 2% # tc q...
""" Write a code to detect the similarity between two sentences. """ import nltk from nltk.corpus import wordnet def compute_similarity(sentence1, sentence2): """ Computes the similarity between two sentences. Args: sentence1: The first sentence. sentence2: The second sentence. Return...
#!/bin/bash i=$1 current=$2 while [ $i -gt $current ] do instance=worker cat > ${instance}-$i-csr.json <<EOF { "CN": "system:node:${instance}-$i", "key": { "algo": "rsa", "size": 2048 }, "names": [ { "C": "US", "L": "Portland", "O": "system:nodes", "OU": "clinco Hard Way"...
#!/bin/bash # # Copyright (c) 2017-2021 VMware, Inc. or its affiliates # SPDX-License-Identifier: Apache-2.0 set -eux -o pipefail # NOTE: All these steps need to be done in the same task since each task is run # in its own isolated container with no shared state. Thus, installing the RPM, # and making isolation2 need...
(defn first-ten [lst] (println (take 10 lst))) (first-ten [1 2 3 4 5 6 7 8 9 10 11 12]) # Output: (1 2 3 4 5 6 7 8 9 10)
# Creates a compact diff between two reflect json files java -classpath `dirname $0`/../spring-graalvm-native-feature/target/spring-graalvm-native-tools-*.jar org.springframework.graalvm.support.ReflectionJsonComparator $1 $2
#!/usr/bin/env bash # Exit on errors set -e if [ -z "$1" ]; then echo "Usage requires one argument which is location of the input file" exit 1 fi declare serviceHost if [ -z "${SD_URL}" ]; then echo "Require variable SD_URL to be set" exit 1 fi echo "Signal detection Service URL: ${SD_URL}" # Check file ex...
package model import "github.com/ungerik/go-start/reflection" // ConvertIterator returns an Iterator that calls conversionFunc // for every from.Next() result and returns the result // of conversionFunc at every Next(). func ConversionIterator(from Iterator, fromResultPtr interface{}, conversionFunc func(interface{})...
// Create an OpenCL buffer for the vector to be updated viennacl::ocl::context & ctx = viennacl::ocl::get_context(0); viennacl::vector<NumericT> result(vec_size); viennacl::ocl::handle<cl_mem> result_mem = viennacl::ocl::current_context().create_memory(CL_MEM_READ_WRITE, vec_size * sizeof(NumericT)); // Set the argume...
#!/bin/bash # $@ - all command line params # $ 1 - first param (no space) # $# - number of command line params # Exports the display so you can run remotely, kills any existing instances, turns off screen saver, runs the app. # # Should be run on the remote machine. You can use a command like the following # on your l...
<filename>server/src/intercept/server/components/NewStubCommand.java package intercept.server.components; import intercept.configuration.StubRequest; import intercept.framework.Command; import intercept.server.WebContext; public class NewStubCommand implements Command { public void executeCommand(WebContext conte...
#!/bin/bash kill -s SIGKILL $(ps axg | grep "[l]ightpulse" | awk '{print $1}') echo "LED128,128,128;" > /dev/ttyAMA0 python server.py
# # Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foun...
def convert_to_hex_escaped(input_string): # Step 1: Break up large Unicode characters into multiple UTF-8 hex characters s_1 = input_string.encode("utf-8").decode("latin-1") # Step 2: Escape all special characters return s_1.encode("unicode-escape").decode("latin-1")
#!/bin/bash set -e # Exit with nonzero exit code if anything fails SOURCE_BRANCH="master" TARGET_BRANCH="master" SHA=`git rev-parse --verify --short HEAD` # Pull requests and commits to other branches shouldn't try to deploy, just build to verify if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$SOURCE_...
#!/bin/sh # Test: # Cli tool: test listing hooks from local shared repos if ! sh /var/lib/githooks/install.sh; then echo "! Failed to execute the install script" exit 1 fi mkdir -p /tmp/test117/shared/.githooks/pre-commit && cd /tmp/test117/shared/.githooks/pre-commit && touch example-01 || exit...
#!/bin/bash geopmread --cache
<filename>vault_test.go package sshvault import ( "bytes" "fmt" "io/ioutil" "net/http" "net/http/httptest" "os" "path/filepath" "strings" "syscall" "testing" "github.com/kr/pty" "github.com/ssh-vault/crypto" "github.com/ssh-vault/crypto/aead" ) // These are done in one function to avoid declaring global...
'use strict'; const axios = require('axios'); const fs = require('fs'); const { get } = require('lodash'); const { services } = require('coinstac-common'); const config = require('./config'); axios.defaults.baseURL = `${config.protocol}://${config.apiServer}:${config.port}`; const compspecUpload = (username, passwo...
<reponame>IzaacBaptista/ads-senac import java.util.ArrayList; public class Materia { int id; String descricao; ArrayList<Professor> professores; ArrayList<Aluno> alunos; public Materia(int id, String descricao) { this.id = id; this.descricao = descricao; this.professores = ...
package com.ergdyne.tasktimer; import android.app.AlertDialog; import android.app.DatePickerDialog; import android.app.TimePickerDialog; import android.content.DialogInterface; import android.database.Cursor; import android.os.Bundle; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatAct...
def sum_list(numbers): """Find the sum of all numbers in the list.""" total = 0 if isinstance(numbers, list): for n in numbers: total += n else: raise TypeError("Input must be a list of numbers!") return total
#!/bin/bash # unset variables are errors set -o nounset; # any failed commands are errors set -o errexit; # this will bail with "unbound variable" if no arg provided VERSION="$1"; DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"; ROOT="${DIR}/../../"; sed -i "$ROOT/flirt/Cargo.toml" -e "...
import testSubject from './myAtoi' /** * @file Unit Tests - myAtoi * @module myAtoi/tests */ describe('08/myAtoi', () => { const cases = { 1: { expected: 42, s: '42' }, 2: { expected: -42, s: ' -42' }, 3: { expected: 4193, s: '4193 with words' }, 4: { expected: 0, s: 'words and 987' }, 5: {...
#!/bin/bash SGX_AGENT_DIR=sgx_agent TAR_NAME=$(basename $SGX_AGENT_DIR) # Check OS and VERSION OS=$(cat /etc/os-release | grep ^ID= | cut -d'=' -f2) temp="${OS%\"}" temp="${temp#\"}" OS="$temp" VER=$(cat /etc/os-release | grep ^VERSION_ID | tr -d 'VERSION_ID="') OS_FLAVOUR="$OS""$VER" create_sgx_agent_tar() { \cp -p...
#!/bin/bash # # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
<reponame>jmccrae/saffron<filename>web/src/main/java/org/insightcentre/saffron/web/Executor.java package org.insightcentre.saffron.web; import com.fasterxml.jackson.databind.ObjectWriter; import org.insightcentre.nlp.saffron.run.InclusionList; import java.io.*; import java.net.URL; import java.util.Collection; import...
package binary_search; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; /** * * @author exponential-e * 백준 18113번: 그르다 김가놈 * * @see https://www.acmicpc.net/problem/18113/ * */ public class Boj18113 { public static void main(String[] args) throws Exception{ ...
<!DOCTYPE html> <html> <head> <title>Weather Update</title> <script type="text/javascript" src="js/main.js"></script> </head> <body> <h1>Weather Update</h1> <div id="weather-info"> <!-- Weather info is added by JavaScript --> </div> </body> </html> //...
#!/usr/bin/env bash example_dir=$1 python label_studio/server.py init --template=sentiment_analysis sentiment_analysis_project python label_studio/server.py start sentiment_analysis_project -p ${PORT:-8200}
<reponame>Shock451/devalert /* eslint-disable no-param-reassign */ var Validator = require('validator'); var isEmpty = require('./is-empty'); const validateQueryText = data => { const errors = {}; // data.advert_header = !isEmpty(data.advert_header) ? data.advert_header : ''; data.company_name = !isEmpty(data.comp...
<filename>docs/theme/styles/colors.js /** * 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 Licens...
#!/usr/bin/env bash home=`echo $HOME` jobJarPath="${home}/etl-jobs-1.0/etl-jobs-1.0.jar" jobConfPath="${home}/etl-jobs-1.0/resources/cassandraRedis.conf" spark/bin/spark-submit \ --conf spark.driver.extraJavaOptions="-Dconfig.file=${jobConfPath}" \ --class org.ekstep.analytics.jobs.CassandraRedisIndexer \ ${jobJarPat...
import './registerServiceWorker' import './filters' import Vue from 'vue' import App from './app.vue' import { isCordova } from './const' import vuetify from './plugins/vuetify' import router from './router' import store from './store' Vue.config.productionTip = false const ignoredMessage = 'The .native modifier fo...
<gh_stars>0 #cDCheck: A Python script to check for, and delete duplicate files in a directory #(C) <NAME> - MIT License import os #for directory access import sys #for args import threading #for threading import re #for regex matching #processes the files in range def processRange(r1, r2, file_di...