text
stringlengths
1
1.05M
# This script should be sourced in the context of your shell like so: # source $HOME/.homeshick/repos/.homeshick/homeshick.sh # Once the homeshick() function is defined, you can type # "homeshick cd CASTLE" to enter a castle. function homeshick() { if [ "$1" = "cd" ] && [ -n "$2" ]; then cd "$HOME/.homesick/repos/$...
import {appPathSetup} from "./appPathSetup" import userTasks from "./userTasks" // app path and log setup should happen before other imports. appPathSetup() import {app} from "electron" import log from "electron-log" import "regenerator-runtime/runtime" import {setupAutoUpdater} from "./autoUpdater" import {Brim} fro...
def convert_list_dict(strings): # Convert the list to a dictionary with unique key-value pairs dict_ = {string: string for string in strings} return dict_ # Sample Usage strings = ["apple", "ball", "cat", "dog"] convert_list_dict(strings) # returns {'apple': 'apple', 'ball': 'ball', 'cat': 'cat', 'dog': '...
<reponame>bcgov/citz-imb-sp-vdr import { Alert, AlertTitle } from '@material-ui/lab' import { useList } from 'components/Hooks' import React from 'react' import { SPTable } from '../SPTable/SPTable' export const SPList = (props) => { const { listName, showTitle, columnFiltering, title, noRecordsText, ...listProps } ...
import { IPath } from './ElementInterface'; import { ICanvasState } from '../components/Canvas/CanvasInterfaces'; export default class Path implements IPath { public points: nj.NdArray[]; constructor(points: nj.NdArray[], public radius: number) { if (points.length < 2) { throw new Error('Pa...
<filename>mobile/src/main/java/com/serchinastico/mechrunner/schedule/domain/model/Schedule.java<gh_stars>0 package com.serchinastico.mechrunner.schedule.domain.model; import java.io.Serializable; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class Schedule implements Serializabl...
<gh_stars>0 REM FILE NAME: tbsp_exp.sql REM LOCATION: Backup Recovery\Utilities REM FUNCTION: Creates a basic shell script to perform tablespace level exports REM TESTED ON: 8.1.5, 8.1.7, 9.0.1 REM PLATFORM: non-specific REM REQUIRES: dba_tables, dba_tablespaces, v$database REM REM This is a part of the Know...
#!/usr/bin/env bash # Terminate already running bar instances killall -q polybar # If all your bars have ipc enabled, you can also use # polybar-msg cmd quit # Launch bottom and top echo "---" | tee -a /tmp/polybar1.log /tmp/polybar2.log #polybar black >>/tmp/polybar1.log 2>&1 & disown polybar botbar -r >>/tmp/polyb...
#!/usr/bin/env bash set -ex if [ "${TRAVIS_OS_NAME}" != "windows" ]; then ccache --max-size=2G ccache --show-stats fi declare -A CMD_TIMEOUT_MAP CMD_TIMEOUT_MAP[osx]=gtimeout CMD_TIMEOUT_MAP[linux]=timeout CMD_TIMEOUT="${CMD_TIMEOUT_MAP[${TRAVIS_OS_NAME}]}" declare -A BUILD_TIMEOUT_MAP BUILD_TIMEOUT_MAP[osx...
var assert = require("assert"); var Yatzy = require("../lib/yatzy.js"); describe("Chance", function () { it("scores sum of all dice", function () { assert.equal(15, Yatzy.chance(2, 3, 4, 5, 1)); assert.equal(16, Yatzy.chance(3, 3, 4, 5, 1)); }); }); describe("Yatzy", function () { it("scores 50", functi...
#!/usr/bin/env -S bash -euET -o pipefail -O inherit_errexit SCRIPT=$(readlink -f "$0") && cd $(dirname "$SCRIPT") # --- Script Init --- mkdir -p log rm -R -f log/* # --- Setup run dirs --- find output -type f -not -name '*summary-info*' -not -name '*.json' -exec rm -R -f {} + rm -R -f /tmp/%FIFO_DIR%/fifo/* rm -R ...
import React from "react"; import {Link} from "react-router-dom"; import Logo from "../logo.png"; import {GithubCorner} from "../components/GithubCorner"; function Home() { return ( <div className="text-center min-h-screen bg-gray-100"> <GithubCorner /> <div className="flex flex-col...
<reponame>proc7ts/hatsy<gh_stars>1-10 import type { ErrorMeans, RequestHandler } from '../core'; import type { HttpMeans } from './http.means'; /** * HTTP processing configuration. * * @typeParam TMeans - A type of supported HTTP request processing means. */ export interface HttpConfig<TMeans extends HttpMeans = H...
from unittest import TestCase, mock import pytest from django.contrib.auth import get_user_model from rest_framework.authtoken.models import Token from custom_auth.oauth.serializers import OAuthAccessTokenSerializer UserModel = get_user_model() @pytest.mark.django_db class OAuthAccessTokenSerializerTestCase(TestCa...
/* * Copyright 2016 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 by applica...
package main import ( "bytes" "encoding/hex" "flag" "io/ioutil" "log" "github.com/pilosa/pilosa/v2/roaring" ) // small tools to show number present in a postings. // To procude a .hex file: // Run in cqlsh: // * select bitset from squirreldb.index_postings where shard = -1 and name = '__global__all|metrics__';...
// ******************************************************************************* // © The Pythian Group Inc., 2017 // All Rights Reserved. // ******************************************************************************* import {AbstractSkeletosState} from "../../extendible/AbstractSkeletosState"; import {SkeletosCu...
#!/bin/bash # # LICENSE UPL 1.0 # # Copyright (c) 1982-2018 Oracle and/or its affiliates. All rights reserved. # # Since: February, 2018 # Author: sergio.leunissen@oracle.com # Description: Installs Docker engine using Btrfs as storage # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. # echo 'Installing an...
#! /bin/bash npm run build:server heroku container:push web heroku container:release web
docker run -d \ -p 8080:8080 \ --name "dags-ml-workspace" -v "/${PWD}:/workspace" \ --env AUTHENTICATE_VIA_JUPYTER="dagshub_savta" \ --shm-size 2G \ --restart always \ dagshub/ml-workspace-minimal:latest
#!/bin/bash dataset=USPTO-50k_no_rxn model_name=reproduce_wo_rxn_class python graph_mask_max.py -data data/${dataset} python preprocess.py -train_src data/${dataset}/src-train.txt \ -train_tgt data/${dataset}/tgt-train.txt \ -valid_src data/${dataset}/src-val.txt \ ...
/* * Tencent is pleased to support the open source community by making 蓝鲸 available. * Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the Li...
#!/bin/bash declare -r TRUE=0 declare -r FALSE=1 die() { echo "$1" >&2; exit 1 } has_root_permission() { [ $(id -u) -eq 0 ] && return $TRUE || return $FALSE } does_user_exit() { local username="$1" grep -q "^${username}" /etc/passwd && return $TRUE || return $FALSE } is_valid_file() { local giv...
#!/bin/bash # Add local user # Either use the LOCAL_USER_ID if passed in at runtime or # fallback USER_ID=${LOCAL_USER_ID:-10001} echo "Starting with UID : $USER_ID" useradd --shell /bin/bash -u $USER_ID -o -c "" -m app export HOME=/home/app exec /usr/local/bin/gosu app "$@"
#! /bin/bash echo "Starting offline!" TMPFILE=.offline$$.log if [ -f .offline.pid ]; then echo "Found file .offline.pid. Not starting." exit 1 fi npx serverless offline start 2>1 > $TMPFILE & PID=$$ echo $PID > .offline.pid while ! grep "server ready" $TMPFILE do echo $TMPFILE && sleep 1; done rm $TMPFILE
<reponame>moonthecoolest/amazon-connect-chat-ui-examples var AWS = require('aws-sdk'); AWS.config.update({region: process.env.REGION}); var connect = new AWS.Connect(); exports.handler = (event, context, callback) => { console.log("Received event: " + JSON.stringify(event)); var body = JSON.parse(event["body"]...
#!/bin/bash set -ex if [ "$TRAVIS_OS_NAME" = "linux" ]; then CUDA_REPO_PKG="cuda-repo-ubuntu1604_10.0.130-1_amd64.deb" CUDA_PKG_VERSION="10-0" CUDA_VERSION="10.0" wget "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/$CUDA_REPO_PKG" sudo dpkg -i "$CUDA_REPO_PKG" CUD...
#!/usr/bin/env bash # constants DOKKU_ROOT=${DOKKU_ROOT:=~dokku} TEST_APP=my-cool-guy-test-app # test functions flunk() { { if [ "$#" -eq 0 ]; then cat - else echo "$*" fi } return 1 } assert_success() { if [ "$status" -ne 0 ]; then flunk "command failed with exit status $status" elif [ "$#" -g...
<filename>app/src/main/java/com/qtimes/pavilion/base/mvp/MvpListView.java package com.qtimes.pavilion.base.mvp; import java.util.List; /** * 列表数据 * Created by liuj on 2016/6/20. * 流列表 */ public interface MvpListView<T> extends MvpStatusView { /** * 加载成功 * @param dataList * @param isReload 是否重新...
#!/usr/bin/env bash echo "--- Good morning, master. Let's get to work. Installing now. ---" echo "--- Editing sources for raring ---" #cp -R /vagrant/sources.list /etc/apt/sources.list echo "--- Updating packages list ---" sudo apt-get update echo "--- MySQL time ---" sudo debconf-set-selections <<< 'mysql-server...
<reponame>albanobattistella/PDF4Teachers package fr.clementgre.pdf4teachers.utils.dialogs.alerts; import fr.clementgre.pdf4teachers.utils.panes.PaneUtils; import javafx.geometry.Insets; import javafx.scene.control.Label; import javafx.scene.control.Spinner; import javafx.scene.layout.HBox; public class DoubleInputAle...
#!/bin/sh mkdir build cd build install_git_repo () { if [ -d "./$1" ] then echo "Library $1 already installed" else git clone $2 cd $1 if [ -z "$3" ] # Is parameter #1 zero length? then git checkout "$3" fi mkdir build ; cd build cmake .. make -j$(nproc) sudo make install cd ../.....
<reponame>eengineergz/Lambda import React, { useState } from "react"; export default function SearchForm({ onSearch }) { // STRETCH TODO: Add stateful logic for query/form data return ( <section className="search-form"> <form onSubmit={() => onSearch(name)}> <input onChange={handleInput...
<reponame>holidahHM/my-react-app<gh_stars>0 export function unzip(...restArr: any[]): any[];
/* * Copyright 2014-2016 CyberVision, 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 o...
import path from 'path'; import process from 'process'; import type {Configuration} from 'webpack'; import nodeExternals from 'webpack-node-externals'; import {inspectLoader} from './inspectLoader'; interface CommonWebpackParams { isProduction: boolean; isClient: boolean; entry: string; outputFile: string; rules?...
# IMOSH_PREDICATE declares the number of predicates. unset IMOSH_PREDICATE
import pandas as pd def process_points(dataframe): """ Process the given pandas DataFrame containing points and return an array of tuples representing the coordinates of these points. Args: dataframe: pandas DataFrame with columns 'x' and 'y' representing the x and y coordinates of the points. Re...
/* * 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 shopcar.entities; import java.util.Objects; import javax.persistence.Entity; /** * * @author Aluno */ @Entity public clas...
#!/bin/bash # See "Flashing and Booting the Target Device" at # https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fflashing.html%23 cd `dirname $0` cd Linux_for_Tegra sudo ./flash.sh jetson-tx2 mmcblk0p1
#!/bin/sh # # Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana # University Research and Technology # Corporation. All rights reserved. # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee R...
<gh_stars>0 const cars: string[] = ['Ford', 'Audi']; const cars2: Array<string> = ['Ford', 'Audi'] // Generic string позволяет вызывать autocomplete для data ниже разрешения промиса. const promise = new Promise<string>((resolve) => { setTimeout(() => { resolve('Promise resolved') }, 2000); }) promise...
import { Button, Flex, useColorModeValue } from '@chakra-ui/react' import { navigate } from '@reach/router' import React from 'react' import Container from '~components/common/container' import Layout from '~components/common/layout' import SEO from '~components/common/seo' import PuzzleAnimation from '~components/inde...
#!/bin/bash export CPATH=${PREFIX}/include export LD_LIBRARY_PATH=${PREFIX}/lib export LDFLAGS="-L${PREFIX}/lib" ./bootstrap ./configure --prefix=${PREFIX} make make install
""" Construct a code that takes text input and replaces all the vowels with "*". """ def replace_vowels(text): vowels = 'aeiou' new_text = '' for char in text.lower(): if char in vowels: new_text += '*' else: new_text += char return new_text if __name__ == '__...
/* * Copyright (c) 2002 TwelveMonkeys. * All rights reserved. * * $Log: JspFragment.java,v $ * Revision 1.2 2003/10/06 14:25:36 WMHAKUR * Code clean-up only. * * Revision 1.1 2002/10/18 14:02:16 WMHAKUR * Moved to com.twelvemonkeys.servlet.jsp.droplet * * */ package com.twelvemonkeys.servlet.jsp.drople...
<gh_stars>1-10 // // UIAlertController+Block.h // MeiYiQuan // // Created by 任强宾 on 16/10/14. // Copyright © 2016年 任强宾. All rights reserved. // #import <UIKit/UIKit.h> @protocol AlertTitleAble <NSObject> - (NSString *)alertTitle; @end @interface UIAlertController (Block) + (UIAlertController *)qb_showAlertWit...
sudo apt install mysql-server sudo mysql_secure_installation
import torch import torch.nn as nn class EntityEmbedding(nn.Module): def __init__(self, hidden_dim, gamma, epsilon, double_entity_embedding): super(EntityEmbedding, self).__init__() self.gamma = gamma self.epsilon = epsilon self.embedding_range = nn.Parameter( torch.Tens...
#!/bin/bash ########## # Custom servercow.de DNS API v1 for use with [acme.sh](https://github.com/Neilpang/acme.sh) # # Usage: # export SERVERCOW_API_Username=username # export SERVERCOW_API_Password=password # acme.sh --issue -d example.com --dns dns_servercow # # Issues: # Any issues / questions / suggestions can be...
const fetch = require('node-fetch'); /** * Function to fetch details of a service order for the equipment * @param {string} accessToken - valid access token * @param {string} equipmentId - ID of the equipment for which service order details are to be fetched * @returns {Promise<object>} - A promise that resolves t...
def is_anagram(str1, str2): n1 = len(str1) n2 = len(str2) if n1 != n2: return 0 str1 = sorted(str1) str2 = sorted(str2) for i in range(0, n1): if str1[i] != str2[i]: return 0 return 1
package io.opensphere.core.common.shapefile.shapes; public interface MeasureMinMax { public double getMeasurementMin(); public double getMeasurementMax(); }
rm _nbt.pyd py.test test/nbt_test.py python setup.py build_ext --inplace py.test test/nbt_test.py
#!/bin/sh -e # Options passed to this script are passed on to pip-compile. Therefore, # dependencies can be upgraded to their latest version with: # # ./requirements/update.sh -U export CUSTOM_COMPILE_COMMAND=./requirements/update.sh python -m piptools compile --allow-unsafe \ --output-file=requirements/pr...
#!/bin/sh NAME=los VERSION=0.1-1 echo building $NAME $VERSION luarocks make $NAME-$VERSION.rockspec luarocks pack $NAME $VERSION
#!/usr/bin/env bash set -e set -u set -o pipefail SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" SOURCEPATH="${SCRIPTPATH}/../../.lib/conf.sh" BINARY="${SCRIPTPATH}/../../../bin/pwncat" # shellcheck disable=SC1090 source "${SOURCEPATH}" # ------------------------------------------------------------...
const fxy = require('fxy') const template = require('./template') const script_folders = { modules:['poly'] } const script_names = { modules:{ poly:[ 'lodash', 'fxy', 'manifest', 'element' ] } } module.exports = function(polyball){ //const logic = fxy.join(polyball.folder,polyball.data.modules |...
import React from "react"; export default function PaymentDetailsHeader() { return ( <div className="payment__details__container__entry__content__header"> <div className="payment__details__container__entry__content__header__entry"> Receipts </div> <div className="payment__details__conta...
#!/bin/bash if which nproc > /dev/null; then MAKEOPTS="-j$(nproc)" else MAKEOPTS="-j$(sysctl -n hw.ncpu)" fi ######################################################################################## # general helper functions function ci_gcc_arm_setup { sudo apt-get install gcc-arm-none-eabi libnewlib-arm...
#!/bin/bash #SBATCH -t 24:00:00 #SBATCH -J conv_rand #SBATCH --mail-user= #SBATCH --mail-type=FAIL #SBATCH -e ./conv_pers_rand.err.%j #SBATCH -o ./conv_pers_rand.out.%j #SBATCH -n 1 #SBATCH -c 24 #SBATCH --mem-per-cpu=16384 #SBATCH --exclusive #SBATCH -C avx # ---------------------------------- # enable this if runni...
<filename>src/main/java/NormalMergeSort.java public class NormalMergeSort { // utf8: "Köpfchen in das Wasser, Schwänzchen in die Höh." -CIA-Verhörmethode public static void mergeSort(int[] arr) { mergeSort(arr, 0, arr.length - 1); } public static void mergeSort(int[] arr, int low, int high) { if...
#!/bin/sh install_packages() { printf '\033[91m%s\033[m\n' 'installing packages...' brew upgrade brew bundle --file ./Brewfile tfenv install printf '\033[36m%s\033[m\n' 'install packages completed.' } setup_git_secrets() { git secrets --register-aws --global git secrets --install ~/.git-templates/git-se...
<reponame>andphp/antd-dashboard import React, { FC, ReactNode } from 'react' import { Route, useNavigate } from 'react-router-dom' import { Result, Button } from 'antd' import { useLocale } from '@/locales' import { RouteProps, useLocation } from 'react-router' import { Logged } from '@/utils/helper' export interface P...
public static int findMax(int[] arr) { int max = arr[0]; for (int i = 1; i < arr.length; i++) if (arr[i] > max) max = arr[i]; return max; }
#!/bin/bash # Copyright Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://aws.amazon.com/apache2.0 # # or in the "license" file ...
package io.gridgo.bean.test; import io.gridgo.bean.BArray; import io.gridgo.bean.BObject; import io.gridgo.bean.BReference; import io.gridgo.bean.BValue; import io.gridgo.bean.test.support.Bar; public class TestPrinter { public static void main(String[] args) { var raw = BValue.of(new byte[] { 1, 2, 3, 4...
/* _____ _ __ ________ ___ *\ ** / ___/(_) |/ / ___/ |__ \ Simple Mechanics Simulator 2 ** ** \__ \/ / /|_/ /\__ \ __/ / copyright (c) 2011 <NAME> ** ** ___/ / / / / /___/ / / __/ ** ** /____/_/_/ /_//____/ /___...
<filename>FPSLighting/Dependencies/DIRECTX/Utilities/Source/dxtex/dxtexdoc.cpp // dxtexDoc.cpp : implementation of the CDxtexDoc class // #include "stdafx.h" #include "dxtex.h" #include "dxtexDoc.h" #include "dialogs.h" #include "formats.h" #include "dds.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static...
#!/usr/bin/env bash HOSTNAME="${1}" PASSWORD="${2}" USER=root PORT="${3:-38944}" SCRIPT_DIR=$(dirname ${0}) if [ -z "${HOSTNAME}" ]; then echo "Target system hostname or ip address is not specified" exit 1 fi if [ -z "${PASSWORD}" ]; then echo "Target system ssh password is not specified" exit 1 fi ...
package com.vc.easy object L408 { def validWordAbbreviation(word: String, abbr: String): Boolean = { var i = 0 var j = 0 val n = word.length val m = abbr.length while(i < n && j < m) { if(!Character.isDigit(abbr(j))) { if(word(i) == abbr(j)) { i += 1 j += 1 ...
#!/bin/bash # get-svn-revision - Determine Subversion repository revision number. # This tries to work both for "real" Subversion repositories, and for # SVK local copies of Subversion repositories (the kind of copy that # can be used for offline work). # If an .svn directory exists, this is a Subversion repository. ...
package com.acmeair; public class AcmeAirSpringIT extends AcmeAirApplicationIntegrationBase { }
<gh_stars>1-10 import L from 'leaflet' import 'leaflet/dist/leaflet.css' import '../node_modules/leaflet-measure/dist/leaflet-measure' import '../node_modules/leaflet-measure/dist/leaflet-measure.css' import 'leaflet.nontiledlayer' import 'leaflet.gridlayer.googlemutant' import 'leaflet.locatecontrol' import {MAX_ZOOM}...
<filename>src/actions/index.js import types from './types'; import styles from './mapStyles'; export function getCoordinates(location,props){ return async dispatch => { let lat, long, map; if(location === 'current location'){ await navigator.geolocation.getCurrentPosition(functio...
sap.ui.define([ "sap/ui/test/opaQunit", "./pages/DeliveryItemPage", "./pages/TrackingTimeline", ], function (opaQunit) { "use strict"; QUnit.module("Delivery Item"); opaQunit("Should display delivery item sections", function (Given, When, Then) { // Arrangements Given.iStartMyUIComponent({ c...
unsigned long long factorial(int n) { if (n == 0 || n == 1) { return 1; } else { return n * factorial(n - 1); } }
#!/bin/bash #SBATCH --job-name=sphere_performance_direct #SBATCH --output=sphere_%A_%a.out #SBATCH --error=sphere_%A_%a.err #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --partition defq #SBATCH --array=0,1,2,3,4 module load openblas module load intel/parallel_studio_xe REFINE_ARR=(5 6 7 8 9) REFINE=${REFINE_ARR[${SLU...
class MyForm extends React.Component { constructor(props) { super(props); this.state = { fieldValues: {}, }; } handleChange(field, e) { var fieldValues = this.state.fieldValues; fieldValues[field] = e.target.value; this.setState({ fieldValues }); } handleSubmit(event) { con...
#!/usr/bin/env bash echo "Note: this will only work on machines where we can install to the user's bin or lib path" echo "Else just download llv.h" curl -s https://api.github.com/repos/BraedonWooding/LLV/releases/latest \ | grep "browser_download_url" \ | cut -d '"' -f 4 \ | wget -qi - mv libLLV.a /usr/l...
#!/usr/bin/env bash set -ex SCRIPTS_DIR="$(dirname $0)" "${SCRIPTS_DIR}/deploy.sh" kubectl rollout restart deployment/capi-kpack-watcher -n cf-system kubectl rollout status deployment/capi-kpack-watcher -w -n cf-system
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git export PATH=$PATH:$(pwd)/depot_tools fetch --nohooks --force webrtc gclient sync pushd src # M70 git checkout ca221eabcaed7580663e3727f092e278ac56bb68 gn gen out/Release "--args=is_debug=false is_official_build=true symbol_level=0 rtc_...
""" Train a machine learning algorithm on the given dataset with 80% accuracy """ import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression # Read the dataset df = pd.read_csv('data.csv') # Split the dataset X = df[["Weight", "Age"]] y = df["ID"] X_tra...
const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); //index template /** * dotenv-webpack wraps dotenv and Webpack.DefinePlugin. * As such, it does a text replace in the resulting bundle for any instances of process.env. */ const Dotenv = require('dotenv-webpack'); const ...
#!/bin/bash # Dependency: This script requires `brightness` cli installed: http://bergdesign.com/brightness/ # Install via homebrew: `brew install brightness` # Required parameters: # @raycast.schemaVersion 1 # @raycast.title Brightness # @raycast.mode silent # # Optional parameters: # @raycast.icon ☀️ # @raycast.pac...
import os import sys import logging from flask import * log_level = getattr(logging, os.environ.get('APP_LOG_LEVEL', 'DEBUG')) logging.basicConfig(stream=sys.stdout, level=log_level) log = logging.getLogger('simple_app') app = Flask(__name__) @app.route("/", methods=['GET','POST']) def home(): if request.method...
// Code generated by go-swagger; DO NOT EDIT. package subtenant_custom_groups // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" ...
#!/usr/bin/env bash clear RELEASE_TYPE=patch PS3='Select the type of release to perform: ' releaseTypes=("Major" "Minor" "Patch" "Quit") select opt in "${releaseTypes[@]}" do case $opt in "Major") RELEASE_TYPE=major break ;; "Minor") RELEASE_TYPE=mino...
def find_anagrams(words): #create an empty dictionary anagrams = {} #loop through the words for word in words: #sort the word alphabetically sorted_word = ''.join(sorted(word)) #check if the sorted word is already in the dictionary if sorted_word in anagrams: #if the sorted word ...
// Define the AST node and evaluation function enum Expression { Identifier(String), Addition(Box<Expression>, Box<Expression>), Subtraction(Box<Expression>, Box<Expression>), Multiplication(Box<Expression>, Box<Expression>), Division(Box<Expression>, Box<Expression>), Negation(Box<Expression>),...
import os import shutil import subprocess from typing import List, Dict, Tuple def process_config_files(config_files: List[str], working_dir: str, extra_args: List[str]) -> Dict[str, Tuple[int, bool]]: results = {} for file in config_files: try: # Copy the configuration file to the working ...
#!/bin/bash # update the OS sudo add-apt-repository -y ppa:graphics-drivers/ppa sudo apt-get -y update sudo apt-get -y upgrade # Download capture card drivers and SDK wget https://hellavision.s3-us-west-2.amazonaws.com/Blackmagic_DeckLink_SDK_10.10.zip wget https://hellavision.s3-us-west-2.amazonaws.com/Blackmag...
import { Mark } from '../prosemirror-model' import { NodeSelection } from '../prosemirror-state' import { scrollRectIntoView, posAtCoords, coordsAtPos, endOfTextblock, storeScrollPos, resetScrollPos } from './domcoords' import { docViewDesc } from './viewdesc' import { initInput, destroyInput, dispatchEvent, ensureLis...
#!/bin/bash ROOT_DIR=$(cd $(dirname $0); pwd) set +e while true do echo "start" $ROOT_DIR/bark_jobs.sh 2>&1 rcode=$? echo "end $rcode" rm -rf $ROOT_DIR/nohup.out sleep 60 done set -e
#!/bin/bash dockerPHPExtEnable() { iniName="docker-php-ext-$1.ini" iniPath="$PHP_ETC_ROOT/mods-available/$iniName" echo "extension=$1.so" > "$iniPath" ln -s "$iniPath" "$PHP_ETC_ROOT/fpm/conf.d/$iniName" ln -s "$iniPath" "$PHP_ETC_ROOT/cli/conf.d/$iniName" } installExtensionFromTgz() { tgzName=$1 ex...
#!/usr/bin/env bash # Use the unofficial bash strict mode: http://redsymbol.net/articles/unofficial-bash-strict-mode/ set -euo pipefail; IFS=$'\n\t' ERROR=false while IFS= read -r -d '' file; do if test "$(tail -c 1 "$file" | wc -l)" -eq 0; then echo -e "\tError: No newline at end of $file" ERROR=true fi ...
#!/bin/bash set -e set -u set -o pipefail # # This is a hack for development and assembly. Eventually there should be a single template # to deploy MODE=${1:-"create"} case $MODE in create|update) echo "Deploy mode: $MODE" ;; delete) echo "Deleting all stacks not curently implemented...
<reponame>saphewilliam/saphe-packages import { renderHook } from '@testing-library/react-hooks'; import React from 'react'; import useRecaptcha from '../src/hooks/useRecaptcha'; import { matchSnapshot } from './testHelpers'; describe('useRecaptcha', () => { it('renders', async () => { const { result: { ...
package interpreter.lexer; import java.util.HashMap; /** * Created by Thomas on 2-3-2015. */ public class Lexer { private final char[] buffer; private final int length; private boolean endOfFile = false; private final HashMap<String, Integer> registeredKeywords; private int index; priv...
var gulp = require('gulp'), gutil = require('gulp-util'), plumber = require('gulp-plumber'), sass = require('gulp-sass'), handleErrors = require('./utils/handleErrors'), autoprefixer = require('gulp-autoprefixer'), minifyCSS = require('gulp-minify-css'), argv = require('yargs').argv; var en...