text string |
|---|
#!/bin/bash
udify_config="config/ud/ro/udify_finetune_ro_rrt.json"
udify_original_config="../config/udify_finetune_ro_rrt.json"
save_path="logs/ro_rrt"
function nice_print {
title=$1
printf '\n%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' '#'
printf "\n%*s" $((($(tput cols))/2 - 1 - (${#title})/2 + `if [ $(( $(tp... |
<gh_stars>0
import { Factory } from 'miragejs';
const REQS = ['^0.1.0', '^2.1.3', '0.3.7', '~5.2.12'];
export default Factory.extend({
default_features: i => i % 4 === 3,
features: () => [],
kind: i => (i % 3 === 0 ? 'dev' : 'normal'),
optional: i => i % 4 !== 3,
req: i => REQS[i % REQS.length],
target: n... |
function squareArrayElements(my_arr) {
return my_arr.map(num => num ** 2);
}
const result = squareArrayElements([2, 3, 4]);
console.log(result); |
def find_largest_sum(arr):
max_ending_here = 0
max_so_far = 0
for i in arr:
max_ending_here += i
max_ending_here = max(0, max_ending_here)
max_so_far = max(max_so_far, max_ending_here)
return max_so_far
arr = [-2,1,-3,4,-1,2,1,-5,4]
print(find_largest_sum(arr)) |
import _ from 'lodash';
import Station from '../models/station';
import { workerlog, workerError } from './logger';
/* eslint-disable no-await-in-loop */
export const scanStations = async () => {
const stations = await Station.find(
{ is_delete: false },
{ station_name: 1, created_date: 1, playlist: 1, stati... |
<filename>app/vocab/vocab.js
'use strict';
var vocabModule = angular.module('vocabModule', [
'ngRoute',
]);
vocabModule.config([
'$routeProvider',
function ($routeProvider) {
$routeProvider
.when('/vocab', {
templateUrl: 'app/vocab/vocab.html',
controll... |
"""
Generate a Python script to scrub a list of emails for invalid entries
"""
import re
def validate_email(email):
# Create the regex
email_regex = re.compile(r'[\w\.-]+@[\w\.-]+\.\w+')
# Check whether the email is valid
is_valid = email_regex.match(email)
# Return the result
return is_valid
... |
from typing import Any, Type
def check_exception_chain(err: Exception, object_type: Type) -> bool:
if isinstance(err, object_type):
return True
elif err.__cause__ is not None:
return check_exception_chain(err.__cause__, object_type)
elif err.__context__ is not None:
return check_exc... |
//Function for caltulate the normalized values
function CoverNormalize(c, dec)
{
//Check the number of decimals
if(typeof dec === 'undefined')
{
//Set the number of decimals as 2
var dec = 2;
}
//Count the number of covers
var covers = c[0].length - 2;
//Check the number
if(covers <= 1){ return c; }
//M... |
<reponame>ZiminGrigory/trik-studio
/* Copyright 2007-2015 QReal Research Group
*
* 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
*
* U... |
#!/usr/bin/env bash
function print_usage {
echo ''
echo 'CoreCLR test runner script.'
echo ''
echo 'Typical command line:'
echo ''
echo 'src/tests/run.sh <arch> <configurations>'
echo ''
echo 'Optional arguments:'
echo ' --testRootDir=<path> : Root directory of the test... |
#!/bin/bash
set -eou pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# Build go code
cd ${SCRIPT_DIR}/../
go build -o functions/azure-playground-generator
chmod +x functions/azure-playground-generator
echo "Build complete!" |
#!/bin/bash
set -euxo pipefail
cd "$( dirname "${BASH_SOURCE[0]}" )/../.."
make .bin/hydra
make .bin/yq
export PATH=.bin:$PATH
export KRATOS_PUBLIC_URL=http://127.0.0.1:4433/
export KRATOS_BROWSER_URL=http://127.0.0.1:4433/
export KRATOS_ADMIN_URL=http://127.0.0.1:4434/
export KRATOS_UI_URL=http://127.0.0.1:4456/
e... |
require 'rhc/commands/base'
module RHC::Commands
class Snapshot < Base
summary "Save the current state of your application locally"
syntax "<action>"
description <<-DESC
Snapshots allow you to export the current state of your OpenShift application
into an archive on your local system, and the... |
<filename>test/test_one_worker.js
//Testing to see if I can get data from 1 worker...
var path = require('path'),
net = require('net'),
assert = require('assert');
var fugue = require(path.join(__dirname, '..', 'lib', 'fugue.js'));
var expected_data = 'here is some data';
server = net.createServer(functi... |
import os
import os.path as op
import shutil
def merge(src: str, dst: str) -> None:
for file in os.listdir(src):
f_path = op.join(src, file)
if op.isfile(f_path):
shutil.copy(f_path, dst)
elif op.isdir(f_path):
if file.startswith('.'):
continue
... |
import React from "react"
import { useStaticQuery, graphql } from "gatsby"
import Img from "gatsby-image"
const Image = (props) => {
const data = useStaticQuery(graphql`
query {
allFile {
edges {
node {
base
childImageSharp {
fluid(maxWi... |
import React from 'react';
import { View,TouchableOpacity } from 'react-native'
import Icon from 'react-native-vector-icons/FontAwesome';
export const BackButton = ({onPress}) => {
return (
<TouchableOpacity style={{
alignItems:'center',
justifyContent:'center',
width:50... |
The DataFrame contains the following data types: the 'Name' column is a string, the 'Age' column is an integer and the 'Salary' column is a floating point number. |
<filename>c2d-core/src/test/java/info/u250/c2d/engine/C2dCamera.java
package info.u250.c2d.engine;
import com.badlogic.gdx.graphics.OrthographicCamera;
/**
* @author xjjdog
*/
public class C2dCamera extends OrthographicCamera {
private float rotate;
public float getRotate() {
return rotate;
}
... |
<gh_stars>0
const redis = require('redis')
const redisClient = redis.createClient()
const TOKEN_EXPIRE_TIME = 3600 * 10
function saveToRedis(token) {
redisClient.set(token, 1)
redisClient.expire(token, TOKEN_EXPIRE_TIME)
}
function getToken(headers) {
if (headers && headers.authorization) {
const auth = he... |
public class RoomInfo {
// Define the properties of room information
}
public class ResultMessage {
// Define the properties of the result message
}
public class Room {
public ResultMessage updateRoomInfo(List<RoomInfo> roomInfoList) {
// Implement the logic to update room information
// R... |
import pytest
def resolve_json_id(json_id, default_value):
json_data = {
"valid-id-1": "Value1",
"valid-id-2": "Value2",
"valid-id-3": "Value3"
}
if json_id.isalnum() and '-' in json_id and not json_id.startswith('-') and not json_id.endswith('-'):
return json_data.get(json... |
<gh_stars>1-10
package mezz.jei.config;
import net.minecraftforge.fml.common.eventhandler.Event;
public class OverlayToggleEvent extends Event {
private final boolean overlayEnabled;
public OverlayToggleEvent(boolean overlayEnabled) {
this.overlayEnabled = overlayEnabled;
}
public boolean isOverlayEnabled() {... |
from enum import Enum
class FontHeight(Enum):
SMALL = 1
MEDIUM = 2
LARGE = 3
def get_pixels(self):
if self == FontHeight.SMALL:
return 10
elif self == FontHeight.MEDIUM:
return 15
elif self == FontHeight.LARGE:
return 20
else:
... |
<reponame>saucelabs/travis-core
class AddExtraColumnsToOrganizations < ActiveRecord::Migration
def change
add_column :organizations, :avatar_url, :string
add_column :organizations, :location, :string
add_column :organizations, :email, :string
add_column :organizations, :company, :string
add_column... |
import React, { Component } from 'react'
import PropTypes from 'prop-types';
import {Alert, Row, Col, Container,Table} from 'reactstrap'
import { Line} from 'react-chartjs-2';
const mainChartOpts = {
maintainAspectRatio: false,
legend: {
display: false,
labels:{
fontSize: 0
}
},
scales: {
... |
package com.ideator;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.text.TextUtilsCompat;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import andr... |
<reponame>Hconk/AutoKernel
#include <stdio.h>
#include <math.h>
extern "C"
{
#include "sys_port.h"
#include "tengine_errno.h"
#include "tengine_log.h"
#include "vector.h"
#include "tengine_ir.h"
#include "tengine_op.h"
#include "../../dev/cpu/cpu_node_ops.h"
// include op... |
<filename>molicode-common/src/main/java/com/shareyi/molicode/common/constants/CacheKeyConstant.java<gh_stars>10-100
package com.shareyi.molicode.common.constants;
import com.shareyi.molicode.common.vo.git.GitRepoVo;
import org.apache.commons.lang3.StringUtils;
/**
* 缓存key常量
*
* @author david
* @date 2019/7/5
*/
... |
package internal
import (
"errors"
"net/http"
"github.com/DisgoOrg/log"
"github.com/DisgoOrg/disgo/api"
)
// NewBuilder returns a new api.DisgoBuilder instance
func NewBuilder(token string) api.DisgoBuilder {
return &DisgoBuilderImpl{
token: token,
cacheFlags: api.CacheFlagsDefault,
}
}
// DisgoBuil... |
from typing import List
def power_off(button_presses: List[int]) -> bool:
state = True # True represents ON, False represents OFF
consecutive_presses = 0
for press in button_presses:
if press == 1: # Button pressed
consecutive_presses += 1
if consecutive_presses == 3: # ... |
#!/bin/sh
echo "Change directory to MNN_SOURCE_ROOT/project/ios before running this script"
echo "Current PWD: ${PWD}"
rm -rf ios_64
mkdir ios_64
cd ios_64
cmake -G Xcode ../../../ \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=../../../cmake/ios.toolchain.cmake \
-DMNN_METAL=ON \
-DARCHS="arm64... |
package netty.guide;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import java.util.Date;
import java.util.Iterato... |
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... |
#!/usr/bin/env bash
python setup.py sdist bdist_wheel
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
pip install --index-url https://test.pypi.org/simple/ drz
rm -rf dist |
#!/bin/bash
# VectorMap output directory
VECTOR_MAP_DIR=/tmp/test_lanelet_aisan_converter/aisan_vector_map
# Wait until CSV files are generated
while :
do
if [ -f "$VECTOR_MAP_DIR/.completion_notice" ]; then
rm $VECTOR_MAP_DIR/.completion_notice
break
fi
done
# Collect CSV file names
ARGS=""
for file in ... |
<reponame>pavelsevecek/OpenSPH<filename>core/timestepping/TimeStepping.h
#pragma once
/// \file TimeStepping.h
/// \brief Algorithms for temporal evolution of the physical model.
/// \author <NAME> (sevecek at s<EMAIL>)
/// \date 2016-2021
#include "common/ForwardDecl.h"
#include "objects/containers/Array.h"
#include... |
<reponame>coders-for-labour/dashboard-for-labour
'use strict';
/**
* Dashboard for Labour
*
* @file auth.js
* @description
* @module System
* @author Lighten
*
*/
const Config = require('node-env-obj')('../../');
const passport = require('passport');
const TwitterStrategy = require('passport-twitter').Strate... |
#!/usr/bin/env bash
export JAVA_OPTS='-server -Xms2048m -Xmx2048m -XX:PermSize=1024m -XX:MaxPermSize=1024m -XX:+UseParallelOldGC -XX:+UseAdaptiveSizePolicy -XX:+UseBiasedLocking'
export _JAVA_OPTIONS='-Dsun.java2d.opengl=true -Dsun.java2d.xrender=true'
|
def histogram(values):
"""This function will take a list of numbers and generate a histogram."""
# Get the min and max values of the list
min_val = min(values)
max_val = max(values)
# Iterate over each value in the list
for num in values:
# Get the percentage of the number rela... |
<gh_stars>0
package storage
//Redirect entry declaration
type Redirect struct {
Hostname string //hostname of the redirector
URL string //URL on the hostname
Target string //forwarding address
}
// Redirector interface
type Redirector interface {
GetAllRedirects() []Redirect ... |
<reponame>minuk8932/Algorithm_BaekJoon
package math;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/**
*
* @author minchoba
* 백준 1977번 : 완전 제곱수
*
* @see https://www.acmicpc.net/problem/1977
*
*/
public class Boj1977 {
private static final int MAX = 102;
private static final int NONE = -1;... |
class Animal:
def __init__(self, species, color, age):
self.species = species
self.color = color
self.age = age |
<reponame>naga-project/webfx
package dev.webfx.kit.mapper.peers.javafxgraphics.base;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
/**
* @author <NAME>
*/
public interface ImageViewPeerMixin
<N extends ImageView, NB extends ImageViewPeerBase<N, NB, NM>, NM extends ImageViewPeerMixin<... |
<gh_stars>1-10
/*
* This JavaScript file is strictly for implemen-
* tations on the view file: resources/views/chat.blade.php
*/
(function ($) {
// the chat agent
$.TaskAgent = {};
// domain object model references
$.TaskAgent.Dom = {};
$.TaskAgent.Dom.task_name = null;
$.TaskAgent.Dom.tas... |
#include <iostream>
struct Node
{
int data;
struct Node * next;
};
class LinkedList
{
private:
struct Node *head;
public:
LinkedList() { head = NULL; }
// Prints the current list
void printList()
{
struct Node *temp = head;
while (temp != NULL)
{
std::cout << temp->data << " ";
temp = temp->ne... |
package greedy;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
/**
*
* @author exponential-e
* 백준 18234번: 당근 훔쳐 먹기
*
* @see https://www.acmicpc.net/problem/18234/
*
*/
public class Boj18234 {
private static final long CIPHER = 1_0... |
#!/bin/bash
# Use jq to slurp and sort the keys of the JSON data from person.json
# Use Y2J to convert the YAML data from person.yaml to JSON format and pass it as input to jq
# Compare the JSON data from person.json with the JSON data from person.yaml to check if they are identical
# Use grep to check if the result o... |
<filename>server/config/roles.js
const allRoles = {
user: ['manageBasket','getBaskets'],
admin: ['getUsers', 'manageUsers', 'getLocations', 'manageLocations'],
business: ['getLocations', 'manageLocations', 'manageProducts','manageBasket','getBaskets']
};
const roles = Object.keys(allRoles);
const roleRights = ne... |
export interface Output {
amount: number
address: string
message?: any
}
export interface WalletTransaction {
txid: string
action: string
amount: number
fees: number
time: number
confirmations: number
feePerKb: number
outputs: Output[]
message?: any
creatorName: string
hasUnconfirmedInputs:... |
<reponame>sshrack/nodejs-rest-sample<filename>controllers/userAuth.js
'use strict';
const crypto = require('crypto');
const fs = require('fs');
const http = require('http');
const config = require('../config/config');
const utils = require('../helpers/utils');
module.exports = {
doLogin,
doLogout,
sessionValid
... |
// https://codeforces.com/contest/1300/problem/C
#include <bits/stdc++.h>
using namespace std;
int bits[32];
int main() {
cin.tie(0), ios::sync_with_stdio(0);
int n, m;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
m = 1;
for (int j = 0; j < 32; j++, m *= 2)
if (a... |
class Stack:
def __init__(self):
self.stack = []
def push(self, item):
self.stack.append(item)
def pop(self):
item = self.stack.pop()
return item
def is_empty(self):
return self.stack == []
def peek(self):
if not self.is_empty():
... |
print('Conversor de Unidades')
m = float(input('Tamanho em metros: '))
cm = m * 100
mm = m * 1000
print(f'Quantidade em metros: {m}. \n Convertendo... \n Quantidade em centímetros: {cm} \n Quantidade em milímetros: {mm}.') |
<html>
<head>
<title>Sign Up Form</title>
<script>
function validateForm() {
if (document.getElementById("password").value.length < 8) {
alert("Password must be at least 8 characters long!");
return false;
}
return true;
}
</script>
</head>
<body>
<form onsubmit="return validateForm()">
<input type="email" ... |
#!/bin/bash
set -e
# constants
DEV_CONTAINER_IMAGE="openintegrationhub/dev-connector:latest"
TENANT_1_NAME="Tenant 1"
TENANT_1_ADMIN="ta1@example.com"
TENANT_1_ADMIN_PASSWORD="1234"
TENANT_1_USER="tu1@example.com"
TENANT_1_USER_PASSWORD="1234"
TENANT_2_NAME="Tenant 2"
TENANT_2_ADMIN="ta2@example.com"
TENANT_2_ADMI... |
def is_done(self):
if self._command_data and isinstance(self._command_data, dict) and bool(self._command_data):
return True
elif self._data:
try:
obj = json.loads(self._data)
if obj and isinstance(obj, dict) and bool(obj):
r... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.md in the project root for license information.
*----------------------------------------------------------------... |
/*
* Copyright 2017-2018 IBM Corporation
*
* 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 agree... |
package org.jms.eureka.demo.client.consumer;
import cn.hutool.core.util.URLUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.protocol.RequestUserAgent;
import org.apache.tomcat.util.http.RequestUtil;
import org.jms.eureka.demo.client.consumer.rpac.foeign.ProducerService;
import org.springframework.beans.f... |
from matplotlib import pyplot as plt
from scipy import stats as st
import numpy as np
marks = ("H3K27ac", "H3K4me1", "H3K4me3", "H3K9ac", "H3K36me3", "H2AZ", "H3K79me2", "H3K27me3", "EZH2", "enhancer", "transcription", "polycomb")
datasets = []
for celltype in ("GM12878", "K562"):
for mark in marks:
datasets.append... |
/*
* Copyright 2018 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... |
import numpy as np
import pandas as pd
from sklearn.linear_model import LinearRegression
# Load the data
data = pd.read_csv('house_data.csv')
# Separate the predictors and target
X = data[['area', 'rooms']]
y = data['price']
# Fit the model
model = LinearRegression()
model.fit(X, y)
# Make predictions
predictions =... |
#!/usr/bin/env bats
source "${BATS_TEST_DIRNAME}/test_helper.sh"
@test "It should install PostgreSQL 10.11" {
/usr/lib/postgresql/10/bin/postgres --version | grep "10.11"
}
@test "It should support pg_cron" {
initialize_and_start_pg
sudo -u postgres psql --command "CREATE EXTENSION pg_cron;"
}
|
#!/bin/bash
#SBATCH -t 24:00:00
#SBATCH -J pico
#SBATCH --mail-user=simpson@ukp.informatik.tu-darmstadt.de
#SBATCH --mail-type=FAIL
#SBATCH -e ./pico.err.%j
#SBATCH -o ./pico.out.%j
#SBATCH -n 1
#SBATCH -c 16
#SBATCH --mem-per-cpu=8182
#SBATCH --exclusive
#SBATCH -C avx
# ----------------------------------
module lo... |
#!/bin/bash
set -eo pipefail
shopt -s nullglob
# logging functions
mysql_log() {
local type="$1"; shift
printf '%s [%s] [Entrypoint]: %s\n' "$(date --rfc-3339=seconds)" "$type" "$*"
}
mysql_note() {
mysql_log Note "$@"
}
mysql_warn() {
mysql_log Warn "$@" >&2
}
mysql_error() {
mysql_log ERROR "$@" >&2
exit 1
}
... |
#ifndef __MACH_SUNXI_CLK_PERIPH_H
#define __MACH_SUNXI_CLK_PERIPH_H
#include<clk/clk_plat.h>
#include<clk/clk.h>
/**
* struct sunxi_clk_periph_gate - peripheral gate clock
*
* @hw: handle between common and hardware-specific interfaces
* @flags: hardware-specific flags
* @enable: enable registe... |
import { getMenu } from '@/api/sys';
import { RouteLocationNormalized, Router } from 'vue-router';
import { MenuVO } from '@/api/model/sys-model';
import { MenuOptions } from '@/constant/StoreOption';
import AdminLayout from '@/layout/admin/index.vue';
import store from '@/store';
import { ElMessage } from 'element-plu... |
"""Infobip transport."""
from vumi.transports.infobip.infobip import InfobipTransport, InfobipError
__all__ = ['InfobipTransport', 'InfobipError']
|
package com.example.mypc.esports2.config;
/**
* Created by MyPC on 2016/8/2.
*/
public class UrlConfig {
public static class Path {
public static final String BASE_URL = "http://139.196.106.200/";
}
public static class ThumbnailPath{
public static final String GAMES="match";
publi... |
#
# SPDX-License-Identifier: Apache-2.0
#
echo 'Generating new channel update tx....'
export FABRIC_CFG_PATH=$PWD
/Users/nkl/fabric/fabric-samples/bin/configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ../channel-config/mychannel-org1anchor.tx -channelID mychannel -asOrg Org1MSP
/Users/nkl/fabric/fabric-samp... |
#! /bin/bash
set -e
if [ -z "$OPT" ] || [ "$OPT" -ne "0" ]; then
echo "Debug build"
FILE=ninja_dbg
else
FILE=ninja_opt
fi
rm -f src/ninja_build && ./generate_ninja.py
ninja -C src -f $FILE
|
/*******************************************************************************
* histogram.h - histogram algorithms for voting
*******************************************************************************
* Add license here...
*******************************/
#ifndef HISTOGRAM_H
#define HISTOGRAM_H
#include <... |
public class ConcurrentStack<T>
{
private volatile Node<T> _head;
public void Push(T obj)
{
Node<T> newNode = new Node<T>(obj);
while (true)
{
Node<T> oldHead = _head;
newNode.Next = oldHead;
if (Interlocked.CompareExchange(ref _head, newNode, old... |
###############################################################################
[[ $ZSH_VERBOSE ]] && echo "Mail Defaults"
###############################################################################
# Disable send and reply animations in Mail.app
defaults write com.apple.mail DisableReplyAnimations -bool true
defa... |
#!/bin/bash
url="https://www.example.org"
start=$(date +%s.%N)
wget --spider --quiet $url
end=$(date +%s.%N)
runtime=$(echo "$end - $start" | bc)
echo "The loading time for $url is $runtime seconds" |
#!/bin/bash
#########################################################################################
# License information
#########################################################################################
# Copyright 2018 Jamf Professional Services
#
# Permission is hereby granted, free of charge, to any pers... |
#!/bin/bash
# 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... |
<gh_stars>1-10
package io.casperlabs.benchmarks
import java.io.File
import java.nio.charset.StandardCharsets
import java.nio.file.StandardOpenOption
import cats._
import cats.effect.{Sync, Timer}
import cats.implicits._
import io.casperlabs.client.{DeployRuntime, DeployService}
import io.casperlabs.client.configurati... |
<filename>app/controllers/api/v1/leaderboards_controller.rb
class Api::V1::LeaderboardsController < ApplicationController
before_action :find_leaderboard, only: [:update, :show ]
def index
@leaderboards = Leaderboard.all
render json: @leaderboards
end
def new
@leaderboard = Leaderboard.new
end
def create
@l... |
#!/bin/bash
# LinuxGSM command_test_alert.sh function
# Author: Daniel Gibbs
# Website: https://linuxgsm.com
# Description: Sends a test alert.
local commandname="ALERT"
local commandaction="Alert"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_print_dots "${servername}"
sleep 1
check.s... |
/*-
* Copyright (c) 2019 <NAME> <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of co... |
import os
import utils
def _process_genomic_data(inputs, backgrounds, work_dir):
def _bam_to_outbase(align_bam, raw_work_dir, cur_input):
# Implementation of _bam_to_outbase function
# This function processes the alignment BAM file and returns the output base name
pass
def _get_target_... |
#!/usr/bin/env bash
# Tags: long, no-unbundled, no-fasttest
set -e
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS contributors"
${CLICKHOUSE_CLIENT} --query="CREATE TABLE contributors (na... |
TERMUX_PKG_HOMEPAGE=https://www.isc.org/downloads/bind/
TERMUX_PKG_DESCRIPTION="Clients provided with BIND"
TERMUX_PKG_LICENSE="MPL-2.0"
TERMUX_PKG_VERSION=9.14.1
TERMUX_PKG_SHA256=c3c7485d900a03271a9918a071c123e8951871a219f4c1c4383e37717f11db48
TERMUX_PKG_SRCURL="ftp://ftp.isc.org/isc/bind9/${TERMUX_PKG_VERSION}/bind-... |
<filename>src/vuejsclient/ts/components/dashboard_builder/widgets/page_switch_widget/options/PageSwitchWidgetOptions.ts<gh_stars>0
import DefaultTranslation from "../../../../../../../shared/modules/Translation/vos/DefaultTranslation";
export default class PageSwitchWidgetOptions {
public static TITLE_CODE_PREFIX... |
#!/usr/bin/env bats
load helpers
BATS_TESTS_DIR=test/bats/tests/gcp
WAIT_TIME=60
SLEEP_TIME=1
NAMESPACE=default
PROVIDER_NAMESPACE=kube-system
PROVIDER_YAML=https://raw.githubusercontent.com/GoogleCloudPlatform/secrets-store-csi-driver-provider-gcp/main/deploy/provider-gcp-plugin.yaml
BASE64_FLAGS="-w 0"
export RESO... |
#!/bin/bash
# ==============================================================================
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
# ==============================================================================
set -e
INPUT=${1:-https://github.com/intel-iot-devkit/sample-videos/raw/m... |
#!/bin/bash
#
# 12/10/2010: link and unlink files.
#
if [ $# -ne 3 ]
then
echo "Usage: ./unlink.sh basename suffix count"
exit 0
fi
for ((i=0; i < $3; i++))
do
filename=$1-$i.$2
if [ -e $filename ]
then
echo "$filename exist"
exit 0
fi
... |
#!/usr/bin/env bash
set -ev
docker run --rm -d -p 28080:8080 --name delphix xebialabsunsupported/xl-docker-demo-delphix:latest
./gradlew compileDocker
docker stop delphix
|
#!/bin/bash
# Download latest TEI files, prepare, upload to kiln & reload kiln and django
# Optional argument: jetty port
pushd preprocess && python3 download/download.py dl && cd prepare && bash prepare_and_publish.sh $1 && popd
|
import random
def mutate_individual(individual, mutation_rate):
mutated_individual = list(individual) # Create a copy of the individual to avoid modifying the original
for i in range(len(mutated_individual)):
if random.random() < mutation_rate: # Check if the mutation should occur based on the mutati... |
package com.yan.demo.bean;
import java.util.ArrayList;
import java.util.List;
public class EmployeeExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public EmployeeExample() {
oredCriteria = new ArrayList<Criteria>();
}
pub... |
<reponame>Jasig/ssp-data-importer
/**
* Licensed to Jasig under one or more contributor license
* agreements. See the NOTICE file distributed with this work
* for additional information regarding copyright ownership.
* Jasig licenses this file to you under the Apache License,
* Version 2.0 (the "License"); yo... |
pip freeze
coverage run --source='django_excel' manage.py test && flake8 . --exclude=.moban.d --builtins=unicode
|
#!/usr/bin/env bash
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This script will check out llvm and clang into third_party/llvm and build it.
# Do NOT CHANGE this if you don't know what you're d... |
#!/bin/bash
HELP_NOTIFICATION="use -h argument for detailed information"
function usage {
cat << END
$(basename "$0") -e gtest_exec [-h] [-f \"filter[ filter...]\"] -- script to calculate peak memory usage of google unit tests
where:
-e path to google unit tests executable file
-h show this help text
-f filter... |
const settings = require("./settings.json");
const db = require('./database.js');
const Discord = require('discord.js');
const client = new Discord.Client(
{
presence: {
activity: {
name: 'students',
type: 'WATCHING'
},
status: 'online'
},
messageCacheLife... |
<reponame>fromariz/globo_sport_add_blocker_chrome_extension<gh_stars>0
hideStuff = () => {
$('div[data-tracking-action="esporte"]').hide();
$(".shopping").hide();
$("#tns1-item1").hide();
$(".medium-8").addClass("medium-12").removeClass("medium-8");
$(".columns-container").css(
"grid-template-columns",
... |