text stringlengths 1 1.05M |
|---|
integer = str(578)
max_integer = ''.join(sorted(integer, reverse=True))
print(max_integer) |
import React from 'react'
import { useState } from 'react'
import ReactDom from 'react-dom'
import { updateProfileImg, removeProfileImg } from '../../services/userServices'
export default function PIModal({ open, user, onClose, setProfile }) {
const [profileImg, setProfileImg] = useState()
if (!open) ... |
#!/bin/bash
#SBATCH --job-name=run_Arrays
#SBATCH --ntasks=2 --nodes=1 --mem-per-cpu 5g --partition scavenge --requeue
#SBATCH --mail-type=FAIL
#SBATCH --time=04:35:00
#SBATCH --output=logs/Arrays.out # Standard output and error log
#source /gpfs/loomis/home.grace/jat89/.bash_cuoreMC
module load miniconda
conda ac... |
require 'sham/util'
module Sham
module Shammable
def add_sham_config(name, config)
@sham_configs ||= {}
@sham_configs[name] = config
end
def sham_config(name)
if @sham_configs && @sham_configs.has_key?(name)
@sham_configs[name]
elsif superclass.respond_to?(:sham_config)
... |
#!/bin/bash
# -------------------------------------------------------------------------------------- #
# ___ _ ___ #
# | | \/ | ) | | This software may be modified and distri- #
# O- |- | | - | | |- ... |
# frozen_string_literal: true
require 'bundler/setup'
Bundler.require(:default)
Bundler.require(Sinatra::Base.environment)
ActiveRecord::Base.dump_schema_after_migration = false if ENV['RACK_ENV'] == 'production'
set :database_file, ENV['DATABASE_CONFIG'] || 'default_database.yml'
set :cache, ActiveSupport::Cache:... |
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 查询推荐银行渠道
*
* @author <NAME>
* @since 1.0, 2021-03-23 11:23:09
*/
public class AlipayTradeServiceRecommendbankQueryModel extends AlipayObject {
private static final long serialV... |
#!/bin/bash
emcc cryptonight.c crypto/*.c -O0 \
-s DISABLE_EXCEPTION_CATCHING=1 \
-s BINARYEN_ASYNC_COMPILATION=1 \
-s ALIASING_FUNCTION_POINTERS=0 \
-s ALLOW_MEMORY_GROWTH=1 \
-s VERBOSE=1 \
-s WASM=1 \
-s BINARYEN=1 \
-s NO_EXIT_RUNTIME=1 \
-s ASSERTIONS=1 \
-s SAFE_HEAP=0 \
... |
#!/usr/bin/env python3
from .arduino import HexUploaderWizard
from .pizero import PairingWizard, SetupSDWizard
from .first import FirstLaunchWizard
|
<gh_stars>0
function translatePigLatin( str ) {
const first = str[ 0 ];
const vowels = [ 'a', 'e', 'i', 'o', 'u', 'y' ]; //ignores that 'y' is only sometimes a vowel...
if ( vowels.indexOf( first ) == -1 ) { //if the first letter is not a vowel
const findVowel = [];
for ( let i = 0; i < vowels.length; i++... |
class Stack[T] {
private var elements: List[T] = Nil
def push(x: T) { elements = x :: elements }
def peek: T = elements.head
def pop(): T = {
val currentTop = peek
elements = elements.tail
currentTop
}
} |
<gh_stars>0
(function() {
'use strict';
angular
.module('raws.routes')
.config(routeConfig);
routeConfig.$inject = ['$stateProvider', 'appInformation'];
function routeConfig($stateProvider, appInformation) {
$stateProvider
.state('soos', {
url: appInformation.view + '/raws',
... |
#!/bin/bash
date '+keyreg-teal-test start %Y%m%d_%H%M%S'
set -e
set -x
set -o pipefail
export SHELLOPTS
PYTHON=python3
gcmd="goal -d ../../net1/primary"
ACC1=$(${gcmd} account list | awk '{ print $3 }' | head -n 1)
PYTEAL_APPROVAL_PROG="../../contracts/roller.py"
PYTEAL_CLEAR_PROG="../../contracts/clear.py"
TEAL_AP... |
<gh_stars>1-10
import type {LocalDate} from '@js-joda/core';
import {toDate, toLocalDate} from '@thx/date';
import debug from 'debug';
import React from 'react';
import type {ReactDatePickerProps} from 'react-datepicker';
import type {InputProps} from 'semantic-ui-react';
import {DatePicker} from '../DatePicker/index';... |
<filename>open-sphere-base/analysis/src/main/java/io/opensphere/analysis/binning/package-info.java
/**
* Contains all the necessary classes used for binning {@link io.opensphere.mantle.data.element.DataElement}.
*/
package io.opensphere.analysis.binning;
|
from flask import Flask, request
app = Flask(__name__)
products = {
'A': {'price': 10.00},
'B': {'price': |
const expect = require('expect');
const sinon = require('sinon');
const omit = require('lodash/omit');
const Boom = require('@hapi/boom');
const { ObjectId } = require('mongodb');
const moment = require('moment');
const Event = require('../../../src/models/Event');
const User = require('../../../src/models/User');
cons... |
/*
* Copyright (c) 2010, <NAME>
* All rights reserved.
*
* Made available under the BSD license - see the LICENSE file
*/
package sim.topology;
import sim.components.Node;
public class Torus {
private static int _k;
private static int _n;
private Torus() {}
/*
* For each node and each dimension, mak... |
<filename>src/generators/postman.js<gh_stars>1-10
const _ = require('lodash'),
fs = require('fs'),
path = require('path'),
Handlebars = require('handlebars');
function getPartialPath(name) {
return path.resolve(__dirname, '../', '../', 'templates', 'postman', name);
}
Handlebars.registerPartial('i... |
<filename>lib/rules/currency.js<gh_stars>0
"use strict";
const CURRENCY_REGEX = `(?=.*\\d)^(-?~1|~1-?)(([0-9]\\d{0,2}(~2\\d{3})*)|0)?(\\~3\\d{1,2})?$`;
/** Signature: function(value, field, parent, errors, context)
*/
module.exports = function ({schema, messages}, path, context) {
const currencySymbol = schema.curre... |
<gh_stars>0
# frozen_string_literal: true
module Lark
module RecordParsers
##
# A paser for JSON content input through the API.
class JSONParser
##
# @see Lark::RecordParser#parse
def parse(input)
data = input.is_a?(String) ? input : input.read
json = JSON.parse(data)
... |
#!/bin/bash
# load gromacs
module load icc_17-impi_2017
source /gscratch/pfaendtner/cdf6gc/codes/PRG_USE/JUNE13_2017/ARUSHI/gromacs-2016.3/bin/bin/GMXRC
#make directories for polymer/acetone or polymer/DMSO only simulations
counter=4
declare -a bsize
bsize=(4.3 5.0 5.7 9.3 9.3)
declare -a n_size
n_size=(4.5 5.2 5.9... |
<filename>src/Autoreload/WatcherHandler.ts
import { path_normalize } from '../util/path'
import { io, logger, mask, include, Uri } from '../dependency'
import { class_EventEmitter } from 'atma-utils';
interface IWatcherEvents {
fileChange(rel, absPath?, reqPath?)
}
export class WatcherHandler extends class_EventE... |
export JAVA_HOME=/usr/java/default
export EXPORT_PREFIX=/export
export HADOOP_PREFIX=/usr/local/hadoop
export HADOOP_COMMON_HOME=$HADOOP_PREFIX
export HADOOP_HDFS_HOME=$HADOOP_PREFIX
export HADOOP_MAPRED_HOME=$HADOOP_PREFIX
export HADOOP_YARN_HOME=$HADOOP_PREFIX
export HADOOP_CONF_DIR=$HADOOP_PREFIX/etc/hadoop
export... |
#!/bin/bash
rm work/*.html
docker-compose exec notebook sh -c "jupyter nbconvert work/*.ipynb --to html"
docker-compose exec notebook sh -c "jupyter nbconvert work/answer/*.ipynb --to html"
|
#!/bin/bash
# Copyright (C) 2019 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
X86_TARGET="x86"
STM32_TARGET="stm32"
ESP32_TARGET="esp32"
QEMU_CORTEX_A53="qemu_cortex_a53"
QEMU_XTENSA_TARGET="qemu_xtensa"
QEMU_RISCV64_TARGET="qemu_riscv64"
QEMU_RISCV32_TARGET="qemu... |
<reponame>jbwyme/action-destinations
/**
* Lightweight alternative to lodash.get with similar coverage
* Supports basic path lookup via dot notation `'foo.bar[0].baz'` or an array ['foo', 'bar', '0', 'baz']
*/
export function get<T = unknown, Default = undefined>(
// eslint-disable-next-line @typescript-eslint/no-... |
#!/bin/bash
java MergeSort
|
const { describe } = require("mocha");
describe("E2E - 🃏 Card tests", () => {
require("./card-crud.test");
}); |
package com.ruiyun.example;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import com.ruiyun.jvppeteer.core.browser.Browser;
import com.ruiyun.jvppeteer.core.browser.BrowserFetcher;
import com.ruiyun.jvppeteer.core.page.P... |
const express = require('express');
const fetch = require('node-fetch');
const db = require('../../models/models.js');
const router = express.Router();
/* ***********************************************************
publicRouter
-----------------------------------------------------------
This file ser... |
#!/bin/bash
# pwd is the git repo.
set -e
# For XVFB Selenium tests.
export DISPLAY=:99.0
python manage.py test \
--noinput --logging-clear-handlers \
--no-skip \
--with-nicedots
echo 'Booyahkasha!'
|
<gh_stars>0
package com.quant.common.config.cache;
import org.springframework.boot.autoconfigure.cache.RedisCacheManagerBuilderCustomizer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import o... |
# frozen_string_literal: true
require 'kickin_ristretto/version'
require 'prawn'
require 'prawn/table'
#require 'prawn-table'
module KickinRistretto
if defined?(Rails)
ROOT_PATH = File.expand_path '../../', __FILE__
module ::Rails
class Application
rake_tasks do
Dir[File.join(ROOT_PA... |
#!/bin/sh
############################################################################
# material-node.sh
#
# This script takes the environment variables ambient{0,1,2},
# diffuse{0,1,2}, specular{0,1,2}, emissive{0,1,2}, shininess0, and
# transparency0, and outputs an Inventor file containing a Material
# node with th... |
#!/usr/bin/env bash
# Copyright 2019 Oticon A/S
# SPDX-License-Identifier: Apache-2.0
# GATT regression tests based on the EDTTool
SIMULATION_ID="edtt_gatt"
VERBOSITY_LEVEL=2
PROCESS_IDS=""; EXIT_CODE=0
CWD=`pwd`"/"`dirname $0`
function Execute(){
if [ ! -f $1 ]; then
echo -e " \e[91m`pwd`/`basename $1` cannot... |
#!/bin/bash
# Check if JDK 11 home path is configured
JAVA11_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
if [ ! -d "${JAVA11_HOME}" ]; then
echo "Please configure JDK 11 home path."
exit 1
fi
# Set JAVA_HOME environment variable
export JAVA_HOME="${JAVA11_HOME}"
# Define build options
BUILD_OPTS="--fail-at-end $@"... |
docker run -d -p 3306:3306 --name yaframysql --volumes-from yafradata yafraorg/docker-yafradb:mysql
#docker run --rm -t -p 3306:3306 --name yaframysql --volumes-from yafradata -i yafraorg/docker-yafradb:mysql /bin/bash
|
import { PartialObserver } from 'rxjs/internal/types';
import { Notification } from 'rxjs';
import { RxLetTemplateNames } from '../../../template/directives/let/model';
/**
* @description
*
* Callbacks for the templates main states: suspense, next, error, complete
*/
export type RxTemplateObserver<T> = {
suspens... |
package com.example.opensorcerer.ui.main.create;
import android.content.Context;
import android.os.Bundle;
import android.os.Looper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.... |
public class EventProcessorBuilder
{
private const int DefaultCapacity = 100; // Default capacity value
private int _capacity; // Field to store the capacity
/// <summary>
/// Sets the capacity of the event processor.
/// </summary>
/// <param name="capacity">The capacity to be set</param>
... |
/*
* 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 this file except in compliance with the License.
* You may obtain a copy of ... |
import XCTest
@testable import DiceApp
class DiceTests: XCTestCase {
func testRoll() {
let dice = Dice()
var rollResults = Set<Int>()
for _ in 1...1000 {
let result = dice.roll()
XCTAssertTrue((1...6).contains(result), "The result of the roll should be between 1 and ... |
#!/bin/bash
#SBATCH --account=def-dkulic
#SBATCH --mem=8000M # memory per node
#SBATCH --time=10:00:00 # time (DD-HH:MM)
#SBATCH --output=/project/6001934/lingheng/Double_DDPG_Job_output/discrete_Acrobot-v1_ddpg_softcopy_epsilon_greedy_seed4_run2_%N-%j.out # %N for node name, %j for jobID
module ... |
'use strict';
angular.module('ticketmonster').factory('flash', ['$rootScope', function ($rootScope) {
var messages = [];
var currentMessage = {};
$rootScope.$on('$routeChangeSuccess', function() {
currentMessage = messages.shift() || {};
});
return {
getMessage: function () {
... |
# Copyright © 2018 Software AG, Darmstadt, Germany and/or its licensors
#
# SPDX-License-Identifier: Apache-2.0
#
# 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.apac... |
mkdir -p build_linux64 && cd build_linux64
cmake ../
cd ..
cmake --build build_linux64 --config Release
|
#!/bin/bash
echo
./clean.sh
echo
echo "Rebuilding package list..."
echo "--------------------------"
rm -f Packages*
dpkg-scanpackages -m ./debs /dev/null > Packages
bzip2 -k Packages
dpkg-scanpackages -m ./debs/ /dev/null > Packages
echo "--------------------------"
echo "Done."
echo
|
<gh_stars>0
function combs(c1, c2) {
/* convert combs to binary string and parse int values. */
var a = parseInt(
c1.replace(/./g, a => (a == '*' ? 1 : 0)),
2
),
b = parseInt(
c2.replace(/./g, a => (a == '*' ? 1 : 0)),
2
),
i = 0,
j = 0;
/* find first non-crossing poin... |
def min_distance_words(s, w1, w2):
list_str = s.split(" ")
index1 = -1
index2 = -1
min_dist = float("inf")
for i in range(len(list_str)):
if list_str[i] == w1:
index1 = i
if index2 != -1:
min_dist = min(min_dist, abs(index1 - index2))
elif list_... |
<filename>src/components/notice/shownotice/style.ts
import styled from "styled-components";
export const Wrapper = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 100px;
`;
export const NoticeHeadDiv = styled.div`
width: 1196px;
display: fl... |
<gh_stars>0
import pyperclip
text = pyperclip.paste()
# print(text)
lines_list = text.split('\n')
print(type(lines_list))
for i in range(len(lines_list)):
lines_list[i] = '* ' + lines_list[i]
print(lines_list[i])
print(lines_list)
new_lines = '\n'.join(lines_list)
pyperclip.copy(new_lines)
|
#!/bin/bash
## getting current filename and basedir
THIS=`basename $0`
THIS_NOEXT="${THIS%.*}"
THISDIR=`dirname $0`; THISDIR=`cd $THISDIR;pwd`
BASEDIR="$THISDIR/../.."
##set specific vars
TEMPLATE_PATH_DEFAULT="sag-mws/template-content.yaml"
TEMPLATE_PROPS_DEFAULT="mws-content"
TEMPLATE_ENV_TYPE_DEFAULT="default"
##... |
<reponame>brauliodiez/lcFormValidation
import { actionsDef } from './actionsDef';
export const signupUIOnInteractionCompleted = (fieldName, value, fieldValidationResult) => {
return {
type: actionsDef.signup.SIGNUP_PROCESS_UI_INTERACTION_COMPLETED,
fieldName,
value,
fieldValidationResult
}
};
|
#!/bin/bash
set -ex
pidfile="$HOME/tpcc-bench.pid"
f_force=''
f_wait=''
f_active=800
f_warehouses=1200
f_skip_load=''
f_duration="30m"
f_inc=200
function usage() {
echo "$1
Usage: $0 [-f] [-w] [-s server] [pgurl,...]
-f: ignore existing pid file; override and rerun.
-w: wait for currently running benchmark to c... |
#!/bin/bash
# sudo apt install webp
# sudo ln -s ~/Desktop/www/shell-scripts/img-and-code-for-web.sh /usr/local/bin/img-and-code-for-web
# sudo chmod a+x /usr/local/bin/img-and-code-for-web
# Define error reporting level, file seperator, and init direcotry.
function init(){
set -Eeuo pipefail; # set -o xtrace;
... |
<reponame>sintefneodroid/droid<filename>docs/cvs/search/files_7.js
var searchData=
[
['hellorotationspeedcomponent_2ecs',['HelloRotationSpeedComponent.cs',['../_hello_rotation_speed_component_8cs.html',1,'']]],
['hellorotationspeedsystem_2ecs',['HelloRotationSpeedSystem.cs',['../_hello_rotation_speed_system_8cs.htm... |
const router = require('express').Router();
const verifyUser = require('./auth').verifyUser;
const controller = require('./controller');
// before we send back a jwt, lets check
// the password and username match what is in the DB
router.route('/')
.post(verifyUser(), controller.signin);
module.exports = router; |
<gh_stars>10-100
import { EventEmitter } from '@angular/core';
import { Vector } from '@app/structures/vector';
import { Point2D, Point3D } from '@app/structures/point';
import { Painter } from '@app/canvas/drawing-board/painter';
import { InputSeries } from '@app/canvas/drawing-board/input-series';
export class Final... |
import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Grid, Card, Button } from '@material-ui/core';
import GaugeChart from 'react-gauge-chart';
export default function LivePreviewExample() {
return (
<>
<Grid container spacing={6}>
<Grid item xl={4... |
import random
def random_num_generator():
return random.randint(0, 9)
# Print a number
print(random_num_generator()) |
def max_words_in_string(arr):
max_len = 0
for string in arr:
num_words = len(string.split())
if num_words > max_len:
max_len = num_words
return max_len
result = max_words_in_string(arr)
print(result) # output 3 |
// @flow
import _ from 'lodash';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { GS } from '../style';
import { D, i18n } from '../../i18n/index';
import type { IfThenPlan, MCII } from '../../types';
function complementText(text) {
return text || i18n(D().common.untitled... |
<reponame>SysRay/ccls<filename>src/lsp.cc<gh_stars>0
/* Copyright 2017-2018 ccls 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 require... |
import React from 'react';
export default function LivePreviewExample() {
return (
<>
<div className="d-flex align-items-center justify-content-center flex-wrap">
<div className="mb-4">
<div className="avatar-icon-wrapper avatar-initials avatar-icon-xl">
<div className="avatar... |
// Create the express app
const express = require('express');
const app = express();
// Route for getting the time
app.get('/time', (req, res) => {
const currentTime = new Date();
res.send({
day: currentTime.getDate(),
month: currentTime.getMonth() + 1,
year: currentTime.getFullYear(),
hour: curren... |
<filename>egov/egov-ptisweb/src/main/java/org/egov/ptis/actions/edit/AddDemandAction.java
/*
* eGov SmartCity eGovernance suite aims to improve the internal efficiency,transparency,
* accountability and the service delivery of the government organizations.
*
* Copyright (C) 2017 eGovernments Foundation... |
<filename>src/math/Boj17103.java
package math;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
/**
*
* @author minchoba
* 백준 17103번: 골드바흐 파티션
*
* @see https://www.acmicpc.net/problem/17103/
*
*/
public class Boj17103 {
private static boolean[] prime = new boolean[1_0... |
<reponame>iCHEF/gypcrete
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import keycode from 'keycode';
import getComponentName from '../utils/getComponentName';
const createEscapeListener = callback => (event) => {
if (event.keyCode === keycode('Escape')) {
callback(event);
}
};... |
<filename>src/js/constants.js
export const MediaUIEvents = {
MEDIA_PLAY_REQUEST: 'mediaplayrequest',
MEDIA_PAUSE_REQUEST: 'mediapauserequest',
MEDIA_MUTE_REQUEST: 'mediamuterequest',
MEDIA_UNMUTE_REQUEST: 'mediaunmuterequest',
MEDIA_VOLUME_REQUEST: 'mediavolumerequest',
MEDIA_SEEK_REQUEST: 'mediaseekrequest... |
<reponame>mich8bsp/basespace-java-sdk
package com.illumina.basespace.property;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.illumina.basespace.util.TypeHelper;
public class MapProperty extends Property<Map<Stri... |
public boolean isInsideAnonymous() {
PsiElement parent = myReferencedElement.getParent();
if (parent instanceof PsiAnonymousClass) {
return true;
}
return false;
} |
#!/bin/bash
#
# Copyright © 2016-2020 The Thingsboard 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... |
#!/bin/bash
cd /usr/share/grafana.trickster
grafana-server -config /etc/grafana.trickster/grafana.ini cfg:default.paths.data=/var/lib/grafana.trickster 1>/var/log/grafana.trickster.log 2>&1
|
<reponame>KingJMS1/MathIA
import os
from pylab import *
import numpy as np
import bokeh
from LoadGame import LoadGame
import scipy as sp
def removeOutliers(xdata, ydata, fencelow=None, fencehigh=None):
if fencelow == None:
iqr = sp.stats.iqr(ydata)
median = sp.median(ydata)
qthree = medi... |
import { Store } from 'pullstate';
import { NotebookPanel } from '@jupyterlab/notebook';
import { NotebookDIDAttachment } from '../types';
export interface ExtensionState {
activeNotebookPanel?: NotebookPanel;
activeNotebookAttachment?: NotebookDIDAttachment[];
}
export const initialState: ExtensionState = {};
e... |
<filename>lib/core/messenger/index.js
'use strict';
const LocalMessenger = require('./local');
const IPCMessenger = require('./ipc');
/**
* @class Messenger
*/
exports.create = egg => {
return egg.options.mode === 'single'
? new LocalMessenger(egg)
: new IPCMessenger(egg);
};
|
#!/bin/bash
#SBATCH --qos=blanca-ccn
#SBATCH --mem=32G
#SBATCH --time=72:00:00
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --ntasks-per-node 1
#SBATCH --cpus-per-task=16
export HOME=`getent passwd $USER | cut -d':' -f6`
export PYTHONUNBUFFERED=1
echo Running on $HOSTNAME
source /pl/active/ccnlab/conda/etc/profile.d/... |
#!/usr/bin/env bash
mkdir -p ./test-output
yarn --frozen-lockfile && yarn build
yarn test:compile
readonly TSC_VERSIONS=(2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 next)
EXIT_CODE=0
for v in ${TSC_VERSIONS[*]}; do
echo "================= TESTING VERSION $v ======================="
yarn upgrade types... |
#!/bin/bash
# Copyright 2021 dfuse Platform 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 a... |
#!/bin/bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
source ${DIR}/../../scripts/utils.sh
#############
${DIR}/../../ccloud/environment/start.sh "${PWD}/docker-compose-executable-onprem-to-cloud.yml" -a -b
if [ -f /tmp/delta_configs/env.delta ]
then
source /tmp/delta_configs/env... |
<gh_stars>10-100
require_relative 'cloud_foundry'
module ServerEnv
def self.instance_index
CloudFoundry.instance_index || 0
end
def self.first_instance?
instance_index.zero?
end
end
|
#!/bin/bash
function nextstep {
echo 'Next step?'
read letssee
}
function step {
echo "##############"
echo "oc apply -f" $1
oc apply -f $1
head -1 $1
nextstep
erasestep $1
}
function erasestep {
echo "oc delete -f" $1
oc delete -f $1
}
echo '#####################################################... |
(node_modules/.bin/tslint -c tslint.json .src/**/*.ts{,x} &&
echo "No lint errors found!") |
package com.unascribed.buzzyspeech.synth;
public class Oscillator {
public static final int SAMPLE_RATE = 44100;
public static final float TAU = (float)(Math.PI*2d);
private float volumeAttack = 0.001f;
private float volumeDecay = 0.0001f;
/** This is the "target" volume that end-users set. */
private float ... |
#!/usr/bin/env bash
clear
echo "================================================================================"
echo "Installing phpBB 3"
echo "================================================================================"
# Install pbpBB 3
cd /var/www
wget https://www.phpbb.com/files/release/phpBB-3.0.12.zip
sud... |
<filename>app/assets/javascripts/modules/doc-upload.js
'use strict';
moj.Modules.docUpload = {
form_id: 'dz_doc_upload',
uploaded_files: '.uploaded-files',
preview_template: '.dz-file-preview',
$form: null,
$fileList: null,
init: function() {
var self = this,
previewTemplate,
dzOptions... |
#!/bin/bash -e
npm run clean
|
<gh_stars>0
package main
import "github.com/popmedic/go-logger/examples"
func main() {
examples.Run1()
examples.Run2()
}
|
<filename>jwx/src/main/java/weixin/weicar/service/impl/CarSalesServiceImpl.java
package weixin.weicar.service.impl;
import weixin.weicar.service.CarSalesServiceI;
import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
import weixin.weicar.entity.CarSalesEntity;
import org.springframework.stereotype.Servi... |
def list_difference(list_a, list_b):
return [x for x in list_a if x not in list_b] |
<gh_stars>0
import {Array2} from "./array2";
import {ChallengeFromFile} from "./challenge";
import {ChallengeRegistry} from "./challenge_registry";
import {findMin, popCountU32} from "./common";
type Coord = [number, number];
interface IMaze {
map: Array2<Uint8Array>;
starts: Coord[]; // Start positions ... |
#!/bin/bash
source "${SH_LIBRARY_PATH}/common.sh"
source "${SH_LIBRARY_PATH}/manta.sh"
check_env PREFIX REPOSITORY PULL_NUMBER
export HOME=$PWD
manta_setup_environment
DIRECTORY="$MANTA_USER/public/$PREFIX/$REPOSITORY/pull/$PULL_NUMBER"
NUMBER=$(manta_get_next_number_for_directory "$DIRECTORY")
log_must mmkdir -p ... |
<reponame>vcalendars/internal-season-api<filename>knexfile.ts
module.exports = {
development: {
client: 'mysql2',
connection: {
host: process.env.MYSQL_HOST || 'localhost',
user: process.env.MYSQL_USER || 'internal_season',
password: process.env.MYSQL_PASS || '<PASSWORD>',
database: pr... |
def compute_sum(x, y):
return x + y
a = int(input("Enter the first number: "))
b = int(input("Enter the second number: "))
print("The sum of the 2 numbers is:", compute_sum(a, b)) |
#!/bin/bash
function pause_task_wrong_arg() {
run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"pause-task" \
"pause-task \[-w worker ...\] <task_name> \[flags\]" 1
}
function pause_task_while_master_down() {
task_name="any_task_name"
run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \
... |
#!/bin/bash
# Start the web server! (This is for hardware acceleration)
(sleep 1 && sudo env "PATH=$PATH" emulator -avd test -noaudio -no-boot-anim -gpu swiftshader_indirect) & \
bash /chimpcheck/ChimpWebDemo/start_adb_stream.bash & wait
# Start the web server! (Not hardware acceleration)
# bash /chimpcheck/ChimpWebD... |
class Routes {
constructor() {
this.routes = new Map();
}
addRoute(url, handler) {
this.routes.set(url, handler);
}
match(url) {
for (let [route, handler] of this.routes) {
if (url === route) {
return handler;
}
}
return null;
}
removeRoute(url) {
if (this.ro... |
<gh_stars>1-10
package main
import (
"flag"
"log"
"os"
"os/signal"
"syscall"
clientset "github.com/interma/programming-k8s/pkg/client/clientset/versioned"
"github.com/interma/programming-k8s/pkg/controller"
"k8s.io/client-go/kubernetes"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp" // for google cloud aut... |
#!/bin/bash
if ioreg | grep "AppleEmbeddedOSSupportHost"; then
touch_bar="Yes"
else
touch_bar="No"
fi
echo "<result>$touch_bar</result>"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.