text stringlengths 1 1.05M |
|---|
<reponame>igor-buzhinsky/nusmv_counterexample_visualizer
package nusmv_counterexample_visualizer;
/**
* Created by buzhinsky on 9/3/17.
*/
class VarNameCause {
private final int position;
private final String varName;
VarNameCause(int position, String varName) {
this.position = position;
... |
#!/usr/bin/env sh
# A script that is executed when `tem env` is run. The file name must not have a .pre
# or .post suffix.
#
# In order to be run correctly, it must be executable by the user (you might
# need a shebang).
# Alternatively, if you want to source this file using your current shell, you
# must have the app... |
#include <iostream>
#include <unordered_map>
enum Interrupt {
SYSCTL,
FLASH,
GPIOF,
UART2,
SSI1,
TIMER3A,
TIMER3B,
I2C1,
QEI1,
CAN0,
CAN1,
};
int getInterruptNumber(Interrupt interrupt) {
static const std::unordered_map<Interrupt, int> interruptMap = {
{Interrup... |
def pick_first_round():
global first_round_post_iss, rounds_avail
reducer = lambda x, y: x.intersection(y) # Define a set intersection reducer function
first_round_post_iss = min(reduce(reducer, rounds_avail.values())) # Find the minimum common number |
#!/bin/sh
### BEGIN INIT INFO
# Provides: scsitools
# Required-Start: checkroot
# Required-Stop:
# X-Start-Before: checkfs
# Default-Start: S
# Default-Stop:
# Short-Description: Create aliases for SCSI devices under /dev/scsi
### END INIT INFO
#
# This is the second part of populating /dev/scsi. No... |
#!/bin/sh
echo "[`date`] hello dropin test" >> /tmp/dropin.txt
echo "[`date`] arg1=$1, arg2=$2, env1=${env1}, env2=${env2}" >> /tmp/dropin.txt
|
#!/bin/sh
set -euf
stuffDir=$HOME/.local/share/thoughts
binDir=$HOME/.local/bin
###
### This script must handle *all* "update" steps
### because it reinstalls its own caller (thoughts itself)
###
cp "$stuffDir"/thoughts-temp/.foot.html "$stuffDir"
echo "copied footer"
cp "$stuffDir"/thoughts-temp/README.md "$stuffDi... |
from dataclasses import dataclass
from datetime import datetime as Datetime
from h5py import File
from stactools.goes.enums import ProductionEnvironment
from stactools.goes.errors import GOESRAttributeError
from stactools.goes.utils import get_nc_str_attr, get_nc_datetime_attr
@dataclass
class GlobalAttributes:
... |
#!/bin/bash
fecha=$(yad --calendar \
--center \
--width=200 \
--height=150 \
--show-weeks \
--title="https://www.atareao.es" \
--text="Elige una fecha")
ans=$?
if [ $ans -eq 0 ]
then
echo "Has elegido este fecha: ${fecha}"
else
echo "No has... |
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
template: `
<h1>{{ title }}</h1>
<button (click)="onButton1Click()">Button 1</button>
<button (click)="onButton2Click()">Button 2</button>
`,
styles: [`
body {
background-color: {{ backgroundColor }};
}
`]
})
export class AppCompo... |
#!/bin/bash
if [ ! "$1" ]; then
echo "This script requires either amd64 of arm64 as an argument"
exit 1
elif [ "$1" = "amd64" ]; then
#PLATFORM="$1"
REDHAT_PLATFORM="x86_64"
DIR_NAME="beer-blockchain-linux-x64"
else
#PLATFORM="$1"
DIR_NAME="beer-blockchain-linux-arm64"
fi
pip install setuptools_scm
# The envi... |
package ke.co.technovation.converter;
public class ConverterException extends Exception {
/**
*
*/
private static final long serialVersionUID = 2067113606317706726L;
private Throwable throwable;
private String message;
public Throwable getThrowable() {
return throwable;
}
public Strin... |
/**
* Copyright (c) 2015, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved.
*
* WSO2.Telco Inc. licences this file to you 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://ww... |
<reponame>SamuelThulin/SensingSugar<filename>src/components/Footer.tsx<gh_stars>0
import { Box, Button } from '@mui/material';
import React, { FC } from 'react';
import { useTranslation } from 'react-i18next';
const Footer: FC = () => {
const { t } = useTranslation('common');
return (
<Box sx={{ marginTop: 'au... |
<reponame>lauw70/Sparta<filename>s3site_awsbinary.go<gh_stars>100-1000
// +build lambdabinary
package sparta
// NewS3Site returns a new S3Site pointer initialized with the
// static resources at the supplied path. If resources is a directory,
// the contents will be recursively archived and used to populate
// the n... |
#!/bin/bash
###
# Setup script to be executed in a bpmn.io project root (some empty folder chosen by YOU). Use if you do not want to rely on npm link.
###
base=`pwd`
echo cloning repositories
git clone git@github.com:bpmn-io/diagram-js.git
git clone git@github.com:bpmn-io/bpmn-js.git
git clone git@github.com:bpmn-i... |
export interface ReportHeaderCpu {
model: string;
speed: number;
user: number;
nice: number;
sys: number;
idle: number;
irq: number;
}
export interface ReportHeader {
event: string;
trigger: string;
filename: string;
dumpEventTime: string;
dumpEventTimeStamp: string;
processId: number;
thre... |
#!/bin/bash
# this script checks for env variable HTTP_PROXY and add them to settings.xml
#
if [[ $HTTP_PROXY != "" ]]; then
mvn_proxy="<proxy><id>internal</id><active>true</active><protocol>http</protocol>"
proxy=$(echo $HTTP_PROXY | sed -e "s|https://||g" | sed -e "s|http://||g")
proxy_hostp=$(echo $proxy | cut ... |
package com.github.sauilitired.loggbok;
import java.lang.management.ManagementFactory;
import java.lang.management.ThreadMXBean;
import java.time.format.DateTimeFormatter;
@SuppressWarnings({"WeakerAccess", "unused"}) public abstract class SimpleLogger
implements Logger, AutoCloseable {
private final ThreadM... |
# LSTM example from https://machinelearningmastery.com/lstm-autoencoders/
import numpy as np
from math import pi
from keras.models import Sequential
from keras.layers import LSTM
from keras.layers import Dense
from keras.layers import RepeatVector
from keras.layers import TimeDistributed
from keras.utils import plot_m... |
<reponame>zzz-s-2020/s-2020
package ru.zzz.demo.sber.shs.server.impl;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.util.concurrent.Future;
import org.springframework.lang.NonNull;
import ru.zzz.demo.sber.shs.config.ServerConfig;
import java.util.concurrent.CompletableFuture;
import java.util.concurr... |
/*
* Copyright (c) 2010, <NAME>, <NAME>, Cryms sagl - Switzerland. All Rights Reserved.
*
* This file is part of goGPS Project (goGPS).
*
* goGPS is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, e... |
#ifndef CONF_SPI_H_INCLUDED
# define CONF_SPI_H_INCLUDED
# define CONF_SPI_MASTER_ENABLE true
# define CONF_SPI_SLAVE_ENABLE false
# define CONF_SPI_TIMEOUT 10000
#endif /* CONF_SPI_H_INCLUDED */
|
//Declare package
package org.firstinspires.ftc.teamcode;
//Import Hardware
import com.qualcomm.hardware.bosch.BNO055IMU;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.HardwareMap;
import com.qualcomm.robotcore.hardware.NormalizedColorSensor;
import com.qualcomm.robotcore.hard... |
#!/bin/bash
set -e
srcdir="$1"
dstdir="$2"
DJB2BIN=out/bin/djb2
[[ ! -f ${DJB2BIN} ]] && echo "error ** please build ${DJB2BIN} at first." && exit -1;
[[ "x$srcdir" = "x" ]] && echo "usage $0 srcdir dstdir" && exit -2;
[[ "x$dstdir" = "x" ]] && echo "usage $0 srcdir dstdir" && exit -2;
mkdir -p $dstdir
function djb... |
sudo singularity pull docker://quay.io/biocontainers/gatk4:4.0.1.2--0
sudo singularity pull docker://quay.io/biocontainers/bwa:0.7.16--pl5.22.0_0
|
class SessionNotFound(Exception):
def __init__(self, sessid):
self.sessid = sessid
def __str__(self):
return "Session %s not found!" % self.sessid
|
<reponame>imos/icfpc2017
#pragma once
#include "heap/heap.h"
// http://pgkiss.web.fc2.com/cxx/parameterize-code.html
namespace agl {
// TODO: specialize for |unweighted_graph|
template<typename GraphType>
class visitor_by_distance {
public:
using W = typename GraphType::W;
visitor_by_distance(const GraphType &g... |
import pytest
from opentrons.drivers.smoothie_drivers.constants import SMOOTHIE_COMMAND_TERMINATOR
from smoothie_connection import SmoothieConnection # Assuming the class is defined in smoothie_connection module
@pytest.fixture
def mock_serial_connection() -> AsyncMock:
"""Mock serial connection."""
return As... |
<reponame>trailofbits/spf-query
module SPF
module Query
#
# Represents an SPF string macro.
#
class Macro
# The macro letter.
#
# @return [Symbol]
attr_reader :letter
# Number of times the macro must be repeated.
#
# @return [Integer, nil]
attr_reader ... |
<reponame>diyerland/saveAll
package Test;
import auxiliary.DataSet;
import auxiliary.Evaluation;
import auxiliary.NaiveBayes;
/**
*
* @author daq
*/
public class Test {
public static void main(String[] args) {
// String[] dataPaths = new String[]{"breast-cancer.data", "segment.data"};
// for (St... |
#!/bin/bash
set -ex
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
NAMESPACE=${NAMESPACE:-default}
WORKER_NS=${WORKER_NS:-test-pods}
# re-generate config
echo "#======================================
# This configuration is auto-generated.
# To update:
# Modify files in the config direc... |
/*
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... |
import random
def random_string():
chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
random_string = ""
for i in range(40):
random_string += random.choice(chars)
return random_string
random_str = random_string()
print(random_str) |
package ca.nova.gestion.controller;
import ca.nova.gestion.model.Task;
import ca.nova.gestion.services.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.a... |
#!/bin/bash
# Itilialize global variables.
APPNAME="backolo"
APPVERSION=0.0.1
RUNLOG="./$APPNAME-run.log" # Log file for script run creates in same folder as script is running from. resets on new run.
backupdest="/$APPNAME-backups"
backupname="backup"
excludes="$backupdest"
includes="/"
backuplog="$backupdest/$backu... |
python main.py --config-file configs/pretrain.yml \
DATASETS.DIR "Data" \
DATASETS.SOURCE "market1501" \
DATASETS.TARGET "msmt17" \
OUTPUT_DIR "log/market2msmt/pretrain" \
GPU_Device [0,1,2,3] \
MODE 'pretrain' \
MODEL.ARCH "resnet50"
|
#!/bin/sh
if [ -z "$1" ]
then
echo "Usage: fixnet.sh [ssh alias]"
fi
ssh $1 "rm /Library/Preferences/com.apple.networkextension*.plist; killall CommCenter" |
<reponame>ACsBlack/Tkinter-GUI-Application-Development-Blueprints-Second-Edition<gh_stars>100-1000
"""
Code illustration: 8.09
Vornoi Diagrams
*** Warnig - this code takes up to a few minutes to compute ***
Tkinter GUI Application Development Blueprints
"""
from tkinter import Tk, Canvas
import random
import ... |
from typing import List
from ..mapper.types import Timestamp, AnyType, ApiInterfaceBase
class UserPresence(UserPresenceInterface):
def __init__(self):
self.presence_data = {}
def update_activity(self, user_id: int, last_activity_at_ms: str, is_active: bool, in_threads: List[str]):
self.presenc... |
func animateObject(fromX: CGFloat, toX: CGFloat, duration: TimeInterval) {
// Assuming the use of UIView for iOS platform
UIView.animate(withDuration: duration, animations: {
// Update the object's frame to move it to the final X position
object.frame.origin.x = toX
})
} |
<gh_stars>0
package com.infinities.skyport.proxy.network;
import java.io.Serializable;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlTransient;
import org.dasein.cloud.VisibleScope;
import org.dasein.cl... |
#!/bin/bash
set -e
BUILD_DIR=${1:?}
export GOOGLE_APPLICATION_CREDENTIALS=$BUILD_DIR/client_secrets.json
echo $GCLOUD_KEY > $GOOGLE_APPLICATION_CREDENTIALS
if [ ! -d $HOME/gcloud/google-cloud-sdk ]; then
mkdir -p $HOME/gcloud &&
wget -q https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk... |
<reponame>fujunwei/dldt
// Copyright (C) 2018-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <gtest/gtest.h>
#include <ie_preprocess.hpp>
using namespace std;
class PreProcessTests : public ::testing::Test {
protected:
virtual void TearDown() {
}
virtual void SetUp() {
}
... |
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-STG/model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-STG/512+0+512-rare-256 --do_eval --per_device_eval_batch_... |
#!/bin/bash
set -e
# ====== Log helpers ======
info()
{
echo '[INFO] ' "$@"
}
warn()
{
echo '[WARN] ' "$@" >&2
}
fatal()
{
echo '[ERROR] ' "$@" >&2
exit 1
}
|
function QueueHandler(delay) {
this.delay = delay || 0;
this.tasks = [];
}
QueueHandler.prototype.submit = function (task) {
this.tasks.push(task);
if (this.tasks.length == 1) this.start();
};
QueueHandler.prototype.start = function () {
var thiz = this;
var next = function() {
if (thi... |
#!/bin/bash
# Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# t... |
/etc/init.d/ssh start
rm -rf /tmp/hadoop-root/dfs/name
hdfs namenode -format
bash /opt/hadoop/sbin/start-dfs.sh
bash start-yarn.sh
hdfs dfs -mkdir /tmp
hdfs dfs -chmod 777 /tmp
hdfs dfs -mkdir /user
hdfs dfs -mkdir /user/root
echo
echo ======================================
echo
echo Hadoop Name... |
##Documentation
#This program automatically performs all alignments. Nucleotide and Amino acids alingments need to be performed.
rm -f alignments/*
rm -f alignments_translated/*
mkdir alignments
mkdir alignments_translated
cd fasta_resultaten
fa=$( ls | wc -l ) #Determine how many files are present in the file.
for (... |
<reponame>weltam/idylfin<filename>src/de/erichseifert/gral/plots/colors/ContinuousColorMapper.java
package de.erichseifert.gral.plots.colors;
import java.awt.Paint;
import de.erichseifert.gral.util.MathUtils;
/**
* Class that maps floating point numbers to Paint objects. This can be used to
* generate colors or gr... |
#!/bin/bash
# This script builds a container image to inject the Thales Luna HSM
# PKCS11 driver and related utilties into a specified target directory.
# See thales-injector/README.md for background.
set -euxo pipefail
script_dir="$(dirname $(readlink -f "$0"))"
fatal() {
>&2 echo "fatal: $*"
exit 1
}
verify_c... |
Create an AIChatbot using existing NLP frameworks and training the Chatbot with customer service related intents and questions. Provide the AIChatbot with the existing customer service data such as FAQs, customer interactions, and user feedback. Train the Chatbot using this data to enable it to generate appropriate res... |
SELECT c.id, c.name
FROM customer c
INNER JOIN orders o ON o.customer_id = c.id
GROUP BY c.id, c.name
HAVING COUNT(o.id) >= 4; |
from .skybet import skybet
from .teams import teams
from .games import games
|
#!/bin/bash
set -euxo pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
SHORT_GIT_HASH=$(git rev-parse --short HEAD)
DOCKER_TAG=modern_cmake:$SHORT_GIT_HASH
docker build $SCRIPT_DIR/docker --tag $DOCKER_TAG --network host
docker run --volume /tmp/conan_download_cache:/tmp/con... |
<html>
<head>
<title>Login</title>
<script>
function validateUsername(username) {
return username.length >= 5;
}
function validatePassword(password) {
return password.length >= 8;
}
function validateForm() {
let username = document.forms['loginForm']['username'].value;
let password = document.forms['... |
CREATE TABLE Names (
ID INT AUTO_INCREMENT PRIMARY KEY,
Name VARCHAR(255) NOT NULL,
Age INT NOT NULL
); |
<filename>fallen/Source/EngWind.cpp
// EngWind.cpp
// <NAME>, 27th July 1998.
#include <MFStdLib.h>
#include <windows.h>
#include <windowsx.h>
#include <ddlib.h>
#include <commctrl.h>
#include "resource.h"
#include "fmatrix.h"
#include "inline.h"
#include "gi.h"
#include "MapView.h"
#include "Mission.h"
#include "Way... |
docker build -f ./Dockerfile -t backend:1.0 . |
#!/bin/bash
function deploy
{
echo "Try to deploy to docker: " $1
docker build -t codeabovelab/$1:$2 target
docker push codeabovelab/$1:$2
}
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
deploy $1 $2
exit
|
def get_cavg(pairs, lang_num, min_score, max_score, bins=20, p_target=0.5):
''' Compute Cavg, using several threshold bins in [min_score, max_score].
'''
cavgs = [0.0] * (bins + 1)
precision = (max_score - min_score) / bins
for section in range(bins + 1):
threshold = min_score + section * pr... |
# Exception CompilationError
class CompilationError(object):
pass
|
const tap = require("tap");
const test = tap.test;
const { getDom, getBooon, getAdapt } = require("./dom");
const dom = getDom();
const booon = getBooon(dom);
const adapt = getAdapt(booon);
test("model", t => {
t.plan(13);
setTimeout(() => {
const c1Node = booon("#main>.model>.c1")[0];
t.equal... |
public class Rounding {
public static void main(String[] args) {
double n = 3.403497;
// Format and round n to two decimal places
DecimalFormat df = new DecimalFormat("#.##");
double rounded = Double.valueOf(df.format(n));
System.out.println(rounded); // Output: 3.4
}
} |
<filename>util/time.go
package util
import (
"fmt"
"regexp"
"strconv"
"strings"
"time"
)
const (
Hours = 1
Day = 24
Week = 24 * 7
)
// used for duration parsing for h, d, w instead of
// compiling all of them on the fly
var regexpTokens = []*regexp.Regexp{
regexp.MustCompile("([0-9]+?)h"),
regexp.MustCo... |
# Copyright 2012, 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... |
import requests.compat
def encode_unix_socket_url(url):
encoded_url = requests.compat.quote_plus(url)
return f"http+unix://{encoded_url}" |
model.add(layers.Conv2D(filters=4, kernel_size=(3, 3), strides=(2, 2), padding='same', input_shape=(32, 128, 128, 3)))
model.add(layers.BatchNormalization())
model.add(layers.ReLU())
model.add(layers.MaxPooling2D(pool_size=(2, 2)))
model.add(layers.Conv2D(filters=8, kernel_size=(3, 3), strides=(2, 2), padding='same'))
... |
// Jest file stub
module.exports = 'test-file-stub'
|
def print_numbers(n):
for i in range(1, n + 1):
print(i) |
def generate_collapsible_list(item_categories):
html_code = '<div>\n'
html_code += ' <li class="collapsable startCollapsed"><strong>Items</strong> <a href="/item/add">+</a></li>\n'
for category in item_categories:
html_code += ' <div>\n'
html_code += f' <li class="section"><a href=... |
package es.upm.etsisi.cf4j.data;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class TestUserTest {
private static TestUser testUser;
private static User wiredUser;
private static Item item;
private static Item wiredItem;
priva... |
from typing import List
class Transaction:
def __init__(self, amount: float, type: str):
self.amount = amount
self.type = type
def calculate_total_profit(transactions: List[Transaction]) -> float:
total_income = sum(transaction.amount for transaction in transactions if transaction.type == "inc... |
package org.glamey.training.codes.leetcode;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import com.google.common.collect.Lists;
/**
* https://leetcode.com/problems/replace-words/description/
*
* @author zhouyang.zhou. 2017.09.04.15.
*/
public class ReplaceWordsDemo {
public static... |
// Copyright 2016 Stellar Development Foundation and contributors. Licensed
// under the Apache License, Version 2.0. See the COPYING file at the root
// of this distribution or at http://www.apache.org/licenses/LICENSE-2.0
package archivist
import (
"bytes"
"errors"
"io"
"io/ioutil"
"strings"
"sync"
)
type Mo... |
import Service from '@ember/service';
let parseItem = function (item) {
let value;
if (item) {
value = JSON.parse(item)
}
return value;
}
export default Service.extend({
getLocalStorageItem: function (key) {
let value = window.localStorage.getItem(key);
return parseItem(val... |
python wait_postgres.py
python manage.py makemigrations storages things
python manage.py migrate
python manage.py loaddata test_data
gunicorn korobasy.wsgi:application --bind 0.0.0.0:8000 |
export * from './storage';
export * from './http-status';
export * from './header';
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.batteryEmpty = void 0;
var batteryEmpty = {
"viewBox": "0 0 512 512",
"children": [{
"name": "path",
"attribs": {
"d": "M469.9,192H433v-54c0-5.5-4.3-10-9.9-10H42.1c-5.6,0-10.1,4.5-10.1,10v236c0,5.5,4.5,10,10.1,10h3... |
import React, { useEffect, useState } from 'react';
import { Button, Grid, Input, Row, Spacer, Text } from '@nextui-org/react';
import useDesignContext, { EDesignAction } from '../../context/DesignContext';
import Dropdown from '../atoms/Dropdown';
import {
GOOGLE_FONTS_URL,
SCALE_OPTIONS,
TABLE_HEADERS,
WEIGHT... |
import { dispatch } from 'd3-dispatch';
import { scaleTime } from 'd3-scale';
import { select, event } from 'd3-selection';
import apiStart from './apiStart';
import apiStop from './apiStop';
import apiOn from './apiOn';
import apiFocus from './apiFocus';
import apiClientDelay from './apiClientDelay';
import apiServerD... |
import Vue from 'vue'
import VueRouter from 'vue-router'
import store from "../store";
const Home = ()=> import('../views/home/Home')
const Car = ()=> import('../views/car/Car')
const Category = ()=> import('../views/category/Category')
const Info = ()=> import('../views/info/Info')
const Detail = ()=> import('../view... |
// Copyright (c) Yugabyte, Inc.
package com.yugabyte.yw.forms;
import com.yugabyte.yw.common.alerts.SmtpData;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Map;
import play.data.validation.Constraints;
/** This class will be used by the API and UI Form Eleme... |
<reponame>TerracottaMC/Terracotta
package org.terracottamc.logging;
import lombok.extern.log4j.Log4j2;
/**
* @author Kaooot
* @version 1.0
*/
@Log4j2
public class Logger {
/**
* Prints an information message on the terminal
*
* @param message which should be printed
*/
public void info... |
<reponame>kjg531/react-bluekit<filename>src/libraries/__test__/parseHighlightedMenu.js
import parseHighlightedMenu from '../parseHighlightedMenu';
import test from 'ava';
test('parse highlighted', t => {
const result = parseHighlightedMenu('<bstyle=\"color:red\">Text</b>')
t.true(result === '<b style=\"color:red\"... |
#!/bin/bash
set -e
if [ -z ${DF_HOME+x} ]; then
echo "[INFO] \$DF_HOME is unset, exit"
exit
else
echo "[INFO] \$DF_HOME Not Found, use DF_HOME=$DF_HOME ";
fi
if [ -z ${DF_APP_MNT+x} ]; then
DF_APP_MNT=/mnt
fi
if [ -z ${DF_APP_DEP+x} ]; then
DF_APP_DEP=/opt
fi
if [ -z ${DF_CONFIG+x} ]; then
DF_CONFIG=$DF_HOME/co... |
<gh_stars>0
'use strict';
let Mdns;
let dns;
const methodName = 'mdns';
function browse(self) {
try {
Mdns = Mdns || require('mdns-discovery');
dns = dns || require('dns');
} catch (e) {
if (typeof self !== 'object') {
self.log.warn('skipping mdns method, because no binar... |
<filename>movies/view/hot/View.js
import React, {Component} from 'react';
import {FlatList, View, Text, Image, TouchableOpacity} from 'react-native';
import styles from './style';
import {connect} from 'react-redux';
import {getSetHostListAction, getSetRefreshingAction} from './actionCreator';
class Hot extends Compon... |
The Internet of Things (IoT) is a rapidly advancing technology making physical objects more connected to each other through the internet, revolutionizing the way people interact with their environment and do business. It will have a great impact on the healthcare, manufacturing and automotive industries. IoT will empow... |
<reponame>r-woo/elfai
# Copyright (c) 2018-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
from elf.options import import_options, PyOptionSpec
class EvalCount(object):
''' Eval Coun... |
#!/bin/sh
echo " Welcome to deehuck's dotfiles for linux. big ups to mharington for the legwork"
echo " - -- --- ----- --- -- - -- --- ----- --- -- -"
echo " "
echo " .___.__ __ /\ "
echo " __| _/| |__ __ __ ____ | | _)/ ______ "
echo " / __ | | | \| | \_/ ___... |
<reponame>MagedMilad/knowledge-base<gh_stars>0
// Sum Lists: You have two numbers represented by a linked list, where each node contains a single
// digit. The digits are stored in reverse order, such that the 1 's digit is at the head of the list. Write a
// function that adds the two numbers and returns the sum as a ... |
if [ -f "/var/lib/u2up-images/u2up-pc-installer.tgz" ]; then
if [ ! -f "/var/lib/u2up-images/u2up-pc-installer_ready" ]; then
tar xzvf /var/lib/u2up-images/u2up-pc-installer.tgz -C /
if [ $? -eq 0 ]; then
touch /var/lib/u2up-images/u2up-pc-installer_ready
else
rm -f /var/lib/u2up-images/u2up-pc-installer_r... |
#!/bin/bash
# Input from user
read -p "Enter Project Name : " playground
# Check if the project aleady exists?
PLAYGROUND_PATH="./src/$playground"
if [ -d $PLAYGROUND_PATH ]; then
echo "Project Already Exists!!!"
exit 1;
fi
# Create Project Folder
mkdir $PLAYGROUND_PATH
# Copy Sample Files to Project F... |
exports.seed = function (knex) {
// Deletes ALL existing entries
return knex('projects').del()
.then(function () {
// Inserts seed entries
return knex('projects').insert([
{
title: 'To-do List',
description: "It's a to-do list",
is_approved: true,
fro... |
<gh_stars>0
import pandas as pd
# Function to add date variables to DataFrame.
def add_date_info(df):
df['Timestamp'] = pd.to_datetime(df['millis'], unit='ms')
df['Year'] = pd.DatetimeIndex(df['Timestamp']).year
df['Month'] = pd.DatetimeIndex(df['Timestamp']).month
df['Day'] = pd.DatetimeIndex(df['Timestamp'])... |
#!/bin/sh
set -e
if [ "$1" = configure ]; then
/bin/systemctl daemon-reload
/bin/systemctl enable proton-server
fi |
#!/bin/bash -eu
cmd="$1"
function running_as_root
{
test "$(id -u)" = "0"
}
function secure_mode_enabled
{
test "${SECURE_FILE_PERMISSIONS:=no}" = "yes"
}
function containsElement
{
local e match="$1"
shift
for e; do [[ "$e" == "$match" ]] && return 0; done
return 1
}
function is_readable
{
# t... |
package org.datacontract.schemas._2004._07.EEN_Merlin_Backend_Core_BO_PODService;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
/**
* <p>J... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.