text
stringlengths
1
1.05M
<filename>captcha.go package vaptcha import ( "bytes" "errors" "io" "net/http" "net/url" "strings" ) var ( ErrIllegalServer = errors.New("illegal server") ErrWrongUserID = errors.New("userid error") ErrEmptyID = errors.New("id empty") ErrWrongID = errors.New("id error") ErrWrongScene ...
#!/bin/bash set -ex export AWS_DEFAULT_REGION=us-west-2 services="cart \ catalogue \ dispatch \ load-gen \ mongo \ mysql \ payment \ ratings \ shipping \ user \ web" for service in $services; do aws ecr create-re...
<reponame>garrylachman/GoodDAPP import { first, omit } from 'lodash' import Config from '../../../../config/config' import logger from '../../../../lib/logger/pino-logger' import Torus from './torus' import { Auth0Strategy, FacebookStrategy, GoogleLegacyStrategy, GoogleStrategy, PaswordlessEmailStrategy, ...
#!/bin/bash ( cd $(dirname "${BASH_SOURCE[0]}") ../../build/MoonGen perf-mac.lua 14 15 )
import {execVim} from "./exec_vim"; export type RTPProvider = () => string[]; export class VimHelp { helplang: string[]; rtpProvider?: () => string[]; constructor( public vimBin = "vim", ) { this.vimBin = vimBin; this.helplang = []; } search(word: string): Promise<string> { const safeWor...
import random def rock_paper_scissors(): choices = ['rock', 'paper', 'scissors'] user_choice = input("Enter your choice (rock, paper, scissors): ").lower() while user_choice not in choices: user_choice = input("Invalid choice. Please enter rock, paper, or scissors: ").lower() computer_choi...
import useSWR from 'swr' import { get } from 'lib/common/fetch' import { JwtSecretUpdateStatus } from '@supabase/shared-types/out/events' import { API_URL } from 'lib/constants' export function useJwtSecretUpdateStatus(projectRef: string | string[] | undefined) { const url = `${API_URL}/props/project/${projectRef}/j...
import * as NS from '../../namespace'; import { ITwoFactorInfo } from 'shared/types/models'; export function setTwoFactorInfo(data: ITwoFactorInfo): NS.ISetTwoFactorInfo { return { type: 'AUTH:SET_TWO_FACTOR_INFO', payload: data }; }
<gh_stars>10-100 import React from "react"; import CardBody from "../CardBody"; import CardBtn from "../CardBtn"; import CardImg from "../CardImage"; import CardHeading from "../CardHeading"; import "./style.css"; function Card() { return ( <div> <CardHeading /> <CardImg /> <CardBody /> <...
const Component = require('./component'); class Diode extends Component { constructor(key) { super('diode', `D_${key.compositeName}`, 2); this.setPad(1, `col${key.col}`); } getAdditionalData(x, y, options) { return { x: ((x + 0.5) * 1905) / 100, y: ((y + 0.5) * 1905) / 100, }; } } ...
<reponame>AustinSanders/usgscsm<filename>tests/EigenUtilitiesTests.cpp #include "EigenUtilities.h" #include <gtest/gtest.h> #include <cmath> // See if fitting a projective transform to points which were created // with such a transform to start with can recover it. TEST(EigenUtilitiesTests, createProjectiveApproxima...
x86_64-w64-mingw32-gcc -Os -shared -std=c99 src/dllmain.c -o DINPUT8.dll.2016 -DHITMAN2016 -Wall -Wno-missing-braces -static-libstdc++ -static-libgcc #-static -lpthread
<filename>lc0041_first_missing_positive.py """Leetcode 41. First Missing Positive Hard URL: https://leetcode.com/problems/first-missing-positive/ Given an unsorted integer array, find the smallest missing positive integer. Example 1: Input: [1,2,0] Output: 3 Example 2: Input: [3,4,-1,1] Output: 2 Example 3: Input:...
#!/usr/bin/env bash # read-menu: a menu driven system information program clear cat << EOF Please Select: 1. Display System Information 2. Display Disk Space 3. Display Home Space Utilization 0. Quit EOF echo -n 'Enter selection [0-3]: ' read -r sel case $sel in 0) echo "Program terminated.";; 1) ech...
int linearSearch(int data[], int size, int key) { for (int i=0; i<size; i++) { if (data[i] == key) { return i; } } return -1; }
module.exports = (api) => ({ presets: [ [ '@babel/env', { bugfixes: true, loose: true, modules: api.env() === 'esm' ? false : 'commonjs', }, ], ], });
#!/bin/bash python -m py_compile multicursor.py && ./install.sh && gedit test.txt
/* tslint:disable */ export type NetSuiteResponseLog = { name: string; type: string; externalId: string; internalId: string; success: boolean; };
<reponame>mattiolato98/reservation-ninja # Generated by Django 3.2.7 on 2021-10-01 10:11 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_M...
<gh_stars>10-100 import { StyleSheet, Dimensions } from 'react-native'; const styles = StyleSheet.create({ container: { minHeight: 40, alignItems: 'flex-start', justifyContent: 'center', margin: 15, marginHorizontal: 5, }, inputLabelWrapper: { height: 56, ...
/** * Created by <NAME> on 9/16/2021. */ var execSync = require('./execSync'); var prepareCommandOptions = require('./prepareCommandOptions'); /** * @module GitSync * @param {object} options * @param {string} options.cwd - Working path to set git to work in * @param {string} options.dryRun - Do not run command,...
<gh_stars>0 const mongoose = require("mongoose"); const Schema = mongoose.Schema; const movieSchema = new Schema({ backdrop_path: { type: String }, genre_ids: { type: Number }, id: { type: Number }, original_title: { type: String }, overview: { type: String }, poster_path: { type: String }, vote_average:...
<filename>doxall/search/files_1.js<gh_stars>0 var searchData= [ ['barriermodelregion_2ecpp',['BarrierModelRegion.cpp',['../_barrier_model_region_8cpp.html',1,'']]], ['barriermodelregion_2ehpp',['BarrierModelRegion.hpp',['../_barrier_model_region_8hpp.html',1,'']]] ];
<filename>src/www/src/views/projection_item_view.js 'use strict'; /* * @Author: <NAME>, Design Research Lab, Universität der Künste Berlin * @Date: 2016-05-04 11:38:41 * @Last Modified by: lutzer * @Last Modified time: 2016-07-14 17:06:19 */ import Marionette from 'marionette' import _ from 'underscore' import Co...
def avg(a, b, c): return (a + b + c)/3 a = 21 b = 15 c = 10 average = avg(a, b, c) print("Average of three numbers is:", average)
wsk -i action invoke --result fat-go --param name Jack
<reponame>nkmrshn/jquery.ganttView<gh_stars>1-10 const Holidays = [ // // 2010年 { name: "元旦", at: new Date(2010,00,01), color: "#777777", backgroundColor: "#ffe4e1" }, { name: "成人の日", at: new Date(2010,00,11), color: "#777777", backgroundColor: "#ffe4e1" }, { name: "建国記念日", at: new Da...
#!/bin/sh # This is a generated file; do not edit or check into version control. export "FLUTTER_ROOT=/Users/hututu/Dev/AndroidStudio/flutter" export "FLUTTER_APPLICATION_PATH=/Users/hututu/Dev/AndroidStudio/WorkFlutter/facebook_audience_IOS_Android/example" export "FLUTTER_TARGET=/Users/hututu/Dev/AndroidStudio/WorkFl...
def find_primes(numb): for i in range(2, numb + 1): for j in range(2, i): if i%j == 0: break else: print(i) find_primes(100)
<gh_stars>1-10 import {FETCH, GET} from '../actions/types'; export interface IRootState { salutation: string; } const initialState: IRootState = { // Add properties to the initial state. salutation: '' }; export default function(state: IRootState = initialState, action: { type: string; payload: any }) { swi...
import { RemoteData } from './RemoteData'; import { isDefined } from './internal/isDefined'; import { MaybeCancel } from './internal/MaybeCancel'; export interface RemoteDataStore<T> { readonly triggerUpdate: () => MaybeCancel; readonly invalidate: () => void; readonly current: RemoteData<T>; // you ca...
<filename>src/admin/admin.controller.ts import { Controller, Get, Render } from '@nestjs/common'; import { config } from '../config.service'; @Controller('admin') export class AdminController { @Get() @Render('admin/index') index() { return { title: 'P' }; } @Get('login') @Render(config....
function generateCardStyles(theme, elevation) { const { palette, typography, shadows } = theme; const { text, divider } = palette; const { fontSize } = typography.body1; let styles = ` color: ${text.primary}; font-size: ${fontSize}; display: flex; justify-content: center; align-items: cente...
const axios = require('axios'); async function convertCurrency(amount, fromCurrency, toCurrency) { const response = await axios.get(`https://api.exchangeratesapi.io/latest?base=${fromCurrency}&symbols=${toCurrency}`); const exchangeRate = response.data.rates[toCurrency]; const convertedAmout = (amount * exchangeRat...
import CoreGraphics struct SizeRange { var min: CGSize var max: CGSize init(min: CGSize, max: CGSize) { self.min = min self.max = max } init(width: CGFloat, height: CGFloat) { let size = CGSize(width: width, height: height) self.init(min: size, max: size) ...
let data = [ {id: 1, name: "John", score: 50}, {id: 2, name: "Bob", score: 80}, {id: 3, name: "Alice", score: 70} ]; let property = 'score'; // Sort the data in descending order based on the given property data.sort((a,b) => b[property] - a[property]); console.log(data); // [ {id: 2, name: "Bob", score: 80}, {i...
package com.jdc.app.entity; import lombok.Data; @Data public class Category { private int id; private String name; public Category() {} public Category(String name) { this.name = name; } @Override public String toString() { return name; } }
<reponame>xcfox/react-tile-pane import React, { useEffect, useState } from 'react' import './App.css' import '../static/style.css' import { LeftTabDemo, SimpleDemo } from './demo' const demos = { 'tab-bar in left demo': <LeftTabDemo />, 'simple demo': <SimpleDemo />, } const color: Record<keyof typeof demos, [str...
import * as observable from '@nativescript/core/data/observable'; import * as builder from '@nativescript/core/ui/builder'; import * as app from '@nativescript/core/application'; import * as utils from "@nativescript/core/utils"; export class ChartExamplesDataModel { private _categoricalSource; private _cate...
import pytest from mixer.backend.django import mixer from projects.models import Project, ProjectMembership from users.models import User @pytest.mark.django_db class TestProject: def test_project_create(self): user = mixer.blend(User, username='test') proj = mixer.blend(Project, owner = user) ...
#!/bin/sh export IP=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}') echo "host is $IP" echo "starting nixos container..." # enable for GUI apps # xhost + $IP docker run -it --rm \ -e DISPLAY=$IP:0 \ -e NIXPKGS_ALLOW_BROKEN=1 \ -e ROBOT_SSH_KEY="$ROBOT_SSH_KEY" \ -v "$(pwd):/app" \ -v "nix:/nix" \ ...
"""Top-level package for ACM DL HCI Searcher.""" from acm_dl_searcher.__main__ import _search from acm_dl_searcher import search_operations __author__ = """<NAME>""" __email__ = '<EMAIL>' __version__ = '0.1.0-alpha.3' search = _search __all__ = [search, search_operations]
/** * Created by liubinbin on 16/08/2016. */ import emitter from "../functions/emitter"; import * as React from "react"; import {IArticle} from "../../definitions/storage/article"; import * as HistoryStorage from "../storage/history" import * as ArticleStorage from "../storage/article" import History from "../storage...
/** * @license * Copyright 2016 Google Inc. 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. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
<reponame>schinmayee/nimbus //##################################################################### // Copyright 2004-2009, <NAME>, <NAME>. // This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt. //##########################################...
@@ -1,12 +1,12 @@ jQuery(window).load(function($) { var $ = jQuery; $('img').each(function() { if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) { // image was broken, replace with your new image this.src = "http://placehold.it/" + ($(this).attr('width') || th...
<reponame>MultiDigital/gatsby-starter-default import React from "react" import { useStaticQuery, graphql } from "gatsby" import { LanguageSwitcherContext } from "../context/languageSwitcherContext" export const useFooter = () => { const menu = useStaticQuery(graphql` query FooterQuery { allDatoCmsFooter( ...
(function() { 'use strict'; angular .module('app.services') .factory('stationVideos', stationVideos); stationVideos.$inject = ['$resource']; function stationVideos($resource) { var customInterceptor = { response: function(response) { ...
<gh_stars>0 // // ModesInfoViewController.h // raspberryCar // // Created by <NAME> on 29.02.2016. // Copyright © 2016 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> #import "TCPConnection.h" @interface ModesInfoViewController : UIViewController @property TCPConnection* tcpConnection; @property (strong, ...
HTTP_PORT=3004 P2P_PORT=6004 PEERS=ws://localhost:6001 npm start
// Code to convert from Fahrenheit to Celsius #include <iostream> int main() { float fahrenheit; std::cout << "Enter temperature in fahrenheit: "; std::cin >> fahrenheit; float celsius = (fahrenheit - 32.0) / 1.8; std::cout << celsius << " C"; return 0; }
<reponame>ojcastaneda/osu-stamina-trainer-web import {faCheck, faTrashAlt} from '@fortawesome/free-solid-svg-icons'; import LanguageContext from '../../../contexts/languageContext'; import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; import {Button, Card, Col, Row, Table} from 'react-bootstrap'; import Sess...
package com.ashok.csv.typeinference; import org.junit.Assert; import org.junit.Test; public class InferTypeImplTest { @Test public void inferTypeTest() throws Exception { String [] firstDataRow = {"2019-05-15 09:15:02","2105","2125.55","2084.6","2090.2"}; InferType inferType = new InferTypeI...
#!/bin/sh -x # Change Me: base directory configuation # SDK Release ID export RELEASE_ID=SDK10.0-PR2003 # Platform ID (cn83xx,cn81xx,cn913x etc) export SOC_PLATFORM=cn83xx # TODO: delete me # Build directory; place all tarballs here #export BASE_HOME=$HOME/build_${SOC_PLATFORM} # Work directory ; change this accor...
<filename>test/fragments/custom/nowarn/obsolete/deprecated-usage.d.ts /** * @deprecated use something else */ interface I {} type T = string | I;
#!/bin/bash JBMC_PATH=$1 shift JQ_COMMAND=$1 shift $JBMC_PATH "$@" | jq -c "$JQ_COMMAND"
import sys import atexit def override_exception_hooks(): def excepthook(*args): import traceback traceback.print_exception(*args) sys.excepthook = excepthook def restrict_module_access(): if 'PyQt4.QtGui' in sys.modules: sys.modules['PyQt4.QtGui'].QApplication = None sys.module...
<reponame>yuansfer/yuansfer-payment-android package com.yuansfer.paysdk.model; import android.os.Parcel; import android.text.TextUtils; import java.util.HashMap; /** * @Author Fly * @CreateDate 2019/5/29 15:44 * @Desciption 订单状态 */ public class DetailInfo extends SignInfo { private String reference; pri...
#!/usr/bin/env bash function helm_package() { chart_dir="$1" chart_name="$(basename "${chart_dir}")" echo "==> Packaging chart: ${chart_name}" ${HELM} package \ --debug \ --destination ./archives \ ${chart_dir} } function main() { echo "==> Helm version: ${HELM_VERSION}" export -f helm_package find ./c...
def preOrder(root): if root: # First print the data of node print(root.val) # Then recur on left child preOrder(root.left) # Finally recur on right child preOrder(root.right)
def words = ["level", "radar", "giraffe", "kayak"] words.each { word -> def reversedWord = word.reverse() if (word == reversedWord) { println(word) } }
<reponame>Spark-DS/logic-schema-demo package sparkDS.logicSchema.demo.dataSpec import org.scalatest._ import sparkDS.logicSchema.demo.dataSpec.dataFiles.OrderFile import sparkDS.logicSchema.demo.testData.TestDataFile class DataValidationTest extends FlatSpec with Matchers with BeforeAndAfterAll { "================...
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../shared/to_i', __FILE__) require File.expand_path('../shared/integer_rounding', __FILE__) describe "Integer#ceil" do it_behaves_like(:integer_to_i, :ceil) it_behaves_like(:integer_rounding_positive_precision, :ceil) ruby_vers...
#ifndef INCLUDED_PLATFORM_SERIALIZE_VEC4_H #define INCLUDED_PLATFORM_SERIALIZE_VEC4_H #include "platform/i_platform.h" namespace boost { namespace serialization { template<class Archive> void serialize( Archive & ar, glm::vec4 & g, const unsigned int version ) { ar & g.x; ...
function replacePlaceholders(string $template, array $values): string { foreach ($values as $key => $value) { $placeholder = '{$' . $key . '}'; $template = str_replace($placeholder, $value, $template); } return $template; }
#include <stdio.h> #include <drivers/gpio.h> #include "gpio.h" static const struct device *dev = NULL; void dutchess_gpio_init () { #ifdef CONFIG_BOARD_MIMXRT1020_EVK dev = device_get_binding("GPIO_1"); #endif } void dutchess_gpio_configure (int pin) { #ifdef CONFIG_BOARD_MIMXRT1020_EVK gpio_pin_configure(d...
import React from 'react'; import { FaFacebook, FaInstagram, FaYoutube, FaTwitter, FaLinkedin } from 'react-icons/fa'; import { FooterContainer, SocialMedia, SocialMediaWrap, WebsiteRights, SocialIcons, SocialIconLink } from './footerElement'; function Footer() { return ( <FooterContainer> ...
# NOTE - the arguments: $1 should be the serverId and $2 should be the number of servers cd .. && mvn clean package sudo -u postgres psql -d sec$1 -a -f secure-server/src/main/java/META-INF/drop-tables.sql java -jar secure-server/target/secure-server-1.0.jar --server.port=920$1 $1 $2 --spring.datasource.url=jdbc:pos...
#!/bin/sh F=/tmp/delivery_count if [ ! -f $F ] ; then echo "1" > $F else i=`cat $F` i=$(($i+1)) echo $i > $F fi
<gh_stars>1-10 package cucumber.runtime.io; import org.junit.Test; import java.io.File; import static org.junit.Assert.assertEquals; public class FileResourceTest { @Test public void get_path_should_return_short_path_when_root_same_as_file() { // setup FileResource toTest = new FileResource...
<filename>src/api/interfaces/IConfig.ts interface IConfig { ip: string; port: string; environment: string; mongodb: { uri: string; }, auth: { secret: string; }, email: { host: string; port: number; secure: boolean; pool: boolean; secureConnection: boolean; auth: { u...
<reponame>domagojlatecki/fnc-lab package at.doml.fnc.lab1 import java.text.DecimalFormat import at.doml.fnc.lab1.domain.{Domain, DomainElement} import at.doml.fnc.lab1.set.FuzzySet object Debug { private val formatter = new DecimalFormat("0.000000") def print(domain: Domain, heading: String): Unit = { ...
<reponame>tanishq-arya/Rotten-Scripts import os import platform if(platform.system()[1].lower() == 'windows'): # For Windows Operating System. try: os.system("pip install -r Windows/requirements.txt") except Exception: print("Something went Wrong.!") else: # Unix Based Systems i.e inclu...
#!/bin/bash ########################################################################## #Aqueduct - Compliance Remediation Content #Copyright (C) 2011,2012 # Vincent C. Passaro (vincent.passaro@gmail.com) # Shannon Mitchell (shannon.mitchell@fusiontechnology-llc.com) # #This program is free software; you ca...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+512+512-shuffled/model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+512+512-shuffled/512+512+512-NER-first-256 --do_eval --p...
#!/bin/bash # Copyright 2017-2020 Authors of Cilium # SPDX-License-Identifier: Apache-2.0 set -o errexit set -o pipefail set -o nounset MAKER_IMAGE="${MAKER_IMAGE:-quay.io/cilium/image-maker:ca3f9135c0c8cb88c979f829d93a167838776615@sha256:b64f9168f52dae5538cd8ca06922e522eb84e36d3f727583c352266e3ed15894}" root_dir="...
#!/bin/bash # De DEM wordt uitgeknipt uit de gebiedsdekkende DEM, de verrasterde watervlakken worden gebruikt om de DEM # dicht te smeren. # Een masker wordt gemaakt van de DEM om data/nodata pixels te onderscheiden. Gebiedsdekkende bodemberging # (ghg, glg, ggg), frictie en infiltratie raster worden op dit masker g...
<gh_stars>1-10 import should from 'should' import BigNumber from 'bignumber.js' import jibrelContractsApi from '../index.js' if (process.env.JSON_PATH == null) { throw (new Error('JSON_PATH env variable not found')) } const testParams = require(process.env.JSON_PATH) const controller = jibrelContractsApi.contract...
<gh_stars>0 import React from "react"; import styled from "styled-components"; const Overlay = ({ show, closeSideDrawer }) => show ? <Container onClick={closeSideDrawer} /> : null; const Container = styled.div` position: fixed; top: 0; left: 0; height: 100%; width: 100%; background-color: rgba(0, 0, 0, ...
<filename>vendor/plugins/geocoder/lib/geocoder/lookups/yandex.rb require 'geocoder/lookups/base' require "geocoder/results/yandex" module Geocoder::Lookup class Yandex < Base def map_link_url(coordinates) "http://maps.yandex.ru/?ll=#{coordinates.reverse.join(',')}" end private # -----------------...
import UIKit class WaterViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Set up UI elements setupUI() } func setupUI() { // Create text fields to record water intake let waterIntake = UITextField(frame: CGRect(x...
package registrationclass; import products.Product; import products.dumplings.Salmon; import products.pasta.Bolognese; import products.pizza.Italiana; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.HashMap; import java.util.Map; public class ReflectionFact...
#! /usr/bin/env bash set -e # # The follow block is based on code from tiangolo/gunicorn-uvicorn-docker # MIT License: https://github.com/tiangolo/gunicorn-uvicorn-docker/blob/master/LICENSE # if [ -f /app/app/worker.py ]; then DEFAULT_MODULE_NAME=app.worker elif [ -f /app/worker.py ]; then DEFAULT_MODULE_NAM...
<gh_stars>0 import React from 'react'; import { storiesOf } from '@storybook/react'; import { Title } from './Title'; import { BlueTitle } from './BlueTitle'; const stories = storiesOf('Button', module); stories.add('Default', () => <Title>Title</Title>); stories.add('Blue Title', () => <BlueTitle>Title</BlueTitle>);...
module Travis module Addons module Sqwiggle require 'travis/addons/sqwiggle/instruments' require 'travis/addons/sqwiggle/event_handler' class Task < ::Travis::Task; end end end end
<reponame>blkmajik/hyperglass<filename>hyperglass/ui/components/table/main.tsx<gh_stars>100-1000 // This rule isn't needed because react-table does this for us, for better or worse. /* eslint react/jsx-key: 0 */ import dynamic from 'next/dynamic'; import { Flex, Icon, Text } from '@chakra-ui/react'; import { usePagina...
# Action: # Kill clients by ssh-ing into client machines export APT=1 if [ $APT -eq 1 ] then for i in `seq 2 110`; do ssh -oStrictHostKeyChecking=no node-$i.RDMA.fawn.apt.emulab.net "cd HERD; ./local-kill.sh" & done else for i in `seq 2 20`; do ssh anuj$i.RDMA.fawn.susitna.pdl.cmu.local "cd HERD; ./local-kill...
mkdir -p ~/facs-seq_test/joined/models nohup python ~/facs-seq/models/model_trainer.py train_model_joined_CV.cfg 5 > ~/facs-seq_test/joined/models/train.log &
<reponame>wkma/bk-sops # -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use...
<filename>pkg/version/version.go package version var Version="UNKNOWN"
class MetricManager: def __init__(self): self.metrics = set() def add_metric(self, metric): self.metrics.add(metric) def clear(self): self.metrics.clear() def delete_metric(self, metric): if metric in self.metrics: self.metrics.remove(metric) else: ...
<reponame>glowroot/glowroot-instrumentation /* * Copyright 2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICEN...
#!/usr/bin/env bash cd $(dirname $0) && source ./.env if ! docker ps | grep -q "${CONTAINER_NAME}"; then if docker ps -a | grep -q "${CONTAINER_NAME}"; then docker start ${CONTAINER_NAME} else ./networks/setup.sh docker run -d \ --name ${CONTAINER_NAME} \ --network=${BACKEND_NETWORK_NAME...
#!/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...
class BaseAbility include CanCan::Ability cattr_accessor :precondition attr_reader :user def initialize(user, **options) @user = user @options = options create_action_aliases user ? draw(user) : draw_guest end protected def draw(user) if precondition.nil? || precondition.call(user...
pathToData=$1 company=$2 seq=$3 params=$4 reverseComplement=$5 makePlots=$6 for region in LOW-chr2 AVG-chr20 AVG-chr7 AVG-chr8; do #HIGH-chr12 ## Removing HIGH region cos broken for hifi time ../scripts/phaseTest.sh ${pathToData} ${region} ${company} ${seq} $params $reverseComplement $makePlots >&out_${company}_${se...
SELECT Name, Price FROM Table ORDER BY Price LIMIT 3;
#!/bin/bash # ... source /$PROJECT/.env/$PROJECT/bin/activate cd /$PROJECT ./manage.py syncdb ./manage.py migrate
#!/bin/bash set -e echo "===Pull & Run postgres container" docker run --rm --name pg-docker -e POSTGRES_USER=user -e POSTGRES_PASSWORD=docker -d -p 5432:5432 -v c:/Docker/postgres postgres:11 echo "===Copy SQL DB scheme to postgres container" docker cp final.SQL pg-docker:/final.SQL echo "===Waiting for database up...
/* * 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 ...