text stringlengths 1 1.05M |
|---|
#!/bin/bash
source `dirname $0`/../common.sh
docker run -v `pwd`/cache:/tmp/cache -v `pwd`/builds:/tmp/output -e VERSION=1.9.2-p330 -e BUILD=true -e STACK=cedar hone/ruby-builder:cedar
|
/**
* @license Copyright (c) 2003-2021, CKSource - <NAME>. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/* globals window */
// Display a warning banner when browsing nightly documentation build.
if ( window.location.host === 'ckeditor5.github.io' ) {
... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.$$ = exports.$ = exports.ObjectScanUtility = void 0;
const object_scan_1 = __importDefault(requi... |
# "queue.pl" uses qsub. The options to it are
# options to qsub. If you have GridEngine installed,
# change this to a queue you have access to.
# Otherwise, use "run.pl", which will run jobs locally
# (make sure your --num-jobs options are no more than
# the number of cpus on your machine.
#a) JHU cluster options
#e... |
<gh_stars>0
///////////////////////////////////////////////////////////////////////////////
// Name: src/generic/treebkg.cpp
// Purpose: generic implementation of wxTreebook
// Author: <NAME>, <NAME>
// Modified by:
// Created: 2005-09-15
// Copyright: (c) 2005 <NAME> <<EMAIL>>
// Licence: wxW... |
#! /bin/sh
#PBS -l nodes=1:ppn=1
#PBS -l walltime=1:00:00
#PBS -j oe
if [ -n "$PBS_JOBNAME" ]
then
source "${PBS_O_HOME}/.bash_profile"
cd "$PBS_O_WORKDIR"
module load gcc/5.3.0
fi
prefix=../../gekko-output/no-data-run-9
ecoevolity --seed 768856366 --prefix ../../gekko-output/no-data-run-9 --ignore-data ... |
ALTER TABLE results_metadata ADD COLUMN "group" TEXT; |
function matchControllerAction($url, $config) : string {
$rules = $config['rules'];
foreach ($rules as $pattern => $action) {
if ($pattern === $url) {
return $action;
} elseif (strpos($pattern, '*') !== false) {
$pattern = str_replace('*', '(.*)', $pattern);
i... |
#!/bin/bash
. training.cfg
# Read the training params into this var
args=$(<$TRAINING_PARAMS)
args="${args//$'\n'/ }"
! [[ -f "./_prepared.jsonl" ]] && openai tools fine_tunes.prepare_data -f $TRAIN_DATA $PREPROCESSING_MODE
openai api fine_tunes.create -t "./_prepared.jsonl" -m $MODEL_NAME $args > tmp_file
trained... |
<filename>packages/util/src/lib/model/model.modify.ts
import { ArrayOrValue, asArray } from '../array/array';
import { filterMaybeValues } from '../array/array.value';
import { Maybe, MaybeMap } from '../value/maybe.type';
import { maybeMergeModifiers, ModifierFunction } from '../value/modifier';
import { ModelConversi... |
/*
* Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA
*
* 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 pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from keras.models import Sequential
from keras.layers import Dense
# Load the data
wine_data = pd.read_csv("wine.csv")
# Split the data into training and test sets
X = wine_data... |
<gh_stars>0
/////////////////////////////////////////////////////////////////
// SceneManager Extension
// By <NAME>, April 2016
/////////////////////////////////////////////////////////////////
import SceneManagerPanel from './Viewing.Extension.SceneManager.Panel'
import ViewerToolkit from 'ViewerToolkit'
import Exten... |
#!/bin/bash
#
##################################################################################################################
# Written to be used on 64 bits computers
# Author : Erik Dubois
# Website : http://www.erikdubois.be
#####################################################################################... |
#!/bin/bash -f
#*********************************************************************************************************
# Vivado (TM) v2017.4 (64-bit)
#
# Filename : FIFO16x7.sh
# Simulator : Aldec Riviera-PRO Simulator
# Description : Simulation script for compiling, elaborating and verifying the project ... |
//
// LogonHandler+Logging.h
// TravelAgency_RKT
//
// Created by <NAME> on 8/12/14.
// Copyright (c) 2014 SAP. All rights reserved.
//
#import "LogonHandler.h"
#import "SAPClientLogManager.h"
@interface LogonHandler (Logging)
- (void) setupLogging;
- (void) uploadLogs;
@end
|
<gh_stars>1000+
package com.prisma.api.connector.jdbc.impl
import java.sql.{SQLException, SQLIntegrityConstraintViolationException}
import com.prisma.api.connector._
import com.prisma.api.connector.jdbc.database.JdbcActionsBuilder
import com.prisma.api.connector.jdbc.{NestedDatabaseMutactionInterpreter, TopLevelDatab... |
#!/bin/bash
: '
#SYNOPSIS
Deployment of config and related resources for config based data collection.
.DESCRIPTION
This script will deploy all the services required for the config based data collection.
.NOTES
Copyright (c) Cloudneeti. All rights reserved.
Permission is hereby granted, free of charg... |
import { ErrorHandler, Injectable } from '@angular/core';
import { Store } from '@ngrx/store';
@Injectable()
export class GlobalErrorHandlerService implements ErrorHandler {
constructor( private store: Store<any> ) {}
handleError( error: Error ) {
console.error( 'Unexpected error: ', error );
// TODO: d... |
#!/usr/bin/env bash
bucket='gs://web-scraper-config/config.json'
set -v
apt-get update
apt-get install -y chromium
apt-get install -y libgbm-dev
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -yq git libgconf-2-4 nodejs
git clone https://github.com/sahava/web-scraper-gcp.git
cd web-scrape... |
package com.mybatis.bestPractice.batch;
import com.mybatis.project.mapper.UserMapper;
import com.mybatis.project.po.User;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apa... |
angular.module('<%= appName %>').config(['$stateProvider',
function($stateProvider){
$stateProvider
.state('<%= moduleNameDeCap %>', {
parent: 'root',
url: '/<%= moduleNameDeCap %>',
templateUrl: 'app/client/<%= moduleNameDeCap %>/views/module.ng.html',
controller: '<%= modu... |
#!/bin/bash
while read -r line
do
egrep -i "^Section" $line
#echo "problem!" >&2
done < "${1:-/dev/stdin}"
|
require "test_helper"
class ApplicationTest < ActiveSupport::TestCase
include ApplicationHelper
context "creating an application" do
setup do
@atts = {
name: "Tron-o-matic",
repo: "alphagov/tron-o-matic",
}
end
context "given valid attributes" do
should "be created s... |
<reponame>eSCT/oppfin
package com.searchbox.core.search.query;
import com.searchbox.core.SearchCondition;
import com.searchbox.core.SearchConverter;
import com.searchbox.core.search.AbstractSearchCondition;
@SearchCondition(urlParam = "q")
public class QueryCondition extends AbstractSearchCondition {
String query;... |
#!/bin/bash
pex -r requirements.txt -o lambda_function.zip
lambdex build -s example_function.py lambda_function.zip
lambdex test lambda_function.zip <(echo '{"url": "https://github.com/pantsbuild"}')
|
#!/bin/bash
docker build -t thomas-blog-devel -f Dockerfile ../ |
#!/usr/bin/env python
# -*- coding:UTF-8 -*-
from socket import *
from threading import Thread
def gettime(address):
sock = socket(AF_INET,SOCK_STREAM)
sock.connect(address)
tm = sock.recv(1024)
sock.close()
print("The time is %s" % tm.decode('ascii'))
t1 = [ Thread(target=gettime, args=(('localh... |
# frozen_string_literal: true
module YuukiBot
module Textgen
def self.generate_string(template, parts, variables = nil)
# Choose random template
template_base = template.sample
# Parse variables
variables&.each do |variable|
template_base = template_base.gsub("{#{variable[0]}}", (... |
<filename>custom/styles.js
import glamorous from 'glamorous-native'
const blue = '#335DC6'
const lightBlue = '#12c8fd'
const ITEM_HEIGHT = 60
export const ActionSheetTitleView = glamorous.text({
color: 'gray',
fontSize: 14,
textAlign: 'left',
backgroundColor: 'purple'
})
export const ActionSheetItem... |
#!/bin/sh
# only works using Xorg not Wayland
xinput create-master c1
xinput create-master c2
# need to attach the mouse and keyboard slave to the mt1 master:
xinput reattach "Logitech F710 - Mouse Emulation" "c1 pointer"
xinput reattach "Logitech F710 - Keyboard Emulation" "c1 keyboard"
# same for the other control... |
#!/usr/bin/env bash
set -x
set -e
if [ "${ACTIONS_OS_NAME}" == linux ] || \
[ "${ACTIONS_OS_NAME}" == windows ]; then
sudo apt-get -qq update
sudo apt-get install -yq build-essential
sudo add-apt-repository -y ppa:aacebedo/fasd
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
s... |
<gh_stars>0
export default class DateTools {
public static getTPTDate(date: Date): string {
return date.getDate().toString().padStart(2, '0') +
"." +
(date.getMonth() + 1).toString().padStart(2, '0') +
"." +
date.getFullYear().toString().padStart(4, '0') +
... |
jQuery(document).ready(function(){
/*jQuery('#billing_email').blur(function(){
jQuery('body').trigger('update_checkout');
}); */
jQuery('#arcavis_voucher').off('keyup').on('keyup', function (event) {
if (jQuery('#arcavis_voucher').val() != '' && event.keyCode === 13) {
jQuery('... |
#!/bin/sh
# $Id: calendar.sh,v 1.3 2005/12/27 15:53:06 tom Exp $
#
# Description:
# This demonstrates the CDK command line
# interface to the celendar widget.
#
#
# Create some global variables.
#
CDK_CALENDAR="${CDK_BINDIR=..}/cdkcalendar"
CDK_LABEL="${CDK_BINDIR=..}/cdklabel"
date="${TMPDIR=/tmp}/cal.$$"
tmp="${T... |
The function 'count()' takes a single parameter of type 'int' (integer) and returns the number of digits in the given number. It works by recursively dividing the number by 10 and adding 1 to the count until the number is equal to 0. For example, if the input is 123, the function will recursively divide it by 10 3 time... |
#!/bin/bash
# Prepare Gperf for compilation:
./configure --prefix=/usr --docdir=/usr/share/doc/gperf-3.1
# Compile the package:
make
# The tests are known to fail if running multiple simultaneous tests (-j option greater than 1). To test the results, issue:
make -j1 check
# Install the package:
make install
|
package com.github.chen0040.leetcode.day25.easy;
/**
* Created by xschen on 20/8/2017.
*
* summary:
* Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray scale of each cell becomes the average gray scale (rounding down) of all the 8 surrounding cells... |
#!/bin/sh
set -e
echo $MINIO_ACCESS_KEY
mkdir -p /test-data/my-bucket
mkdir -p /root/.minio/certs
openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj /CN=selfsigned \
-keyout /root/.minio/certs/private.key \
-out /root/.minio/certs/public.crt
/usr/bin/docker-entrypoint.sh -- "$@"
|
#!/usr/bin/env bash
set -euox pipefail
gem install bundler
if [ -v STYLE_CHECKS ]; then
set +ux
exit 0
fi
if [ ! -v IMAGEMAGICK_VERSION ]; then
echo "you must specify an ImageMagick version."
echo "example: 'IMAGEMAGICK_VERSION=6.8.9-10 bash ./before_install_osx.sh'"
exit 1
fi
export HOMEBREW_NO_AUTO_UPD... |
#!/usr/bin/env bash
# for details about how it works see https://github.com/elastic/apm-integration-testing#continuous-integration
srcdir=$(dirname "$0")
test -z "$srcdir" && srcdir=.
# shellcheck disable=SC1090
. "${srcdir}/common.sh"
if [ -n "${APM_AGENT_DOTNET_VERSION}" ]; then
EXTRA_OPTS=${APM_AGENT_DOTNET_VERS... |
<reponame>smagill/opensphere-desktop<filename>open-sphere-base/core/src/main/java/com/bitsys/fade/mist/state/v4/QueryEntryType.java
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.su... |
import styles from './Loading.module.css'
export default () => (
<div className={styles.ldsRing}>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
) |
<reponame>DSM-GRAM/The-Manual-Backend
from flask import Response, abort, request
from flask_restful import Api
from flask_jwt_extended import create_access_token, create_refresh_token
from werkzeug.security import check_password_hash
from app.views import BaseResource, api_blueprint
from app.models.account import User... |
import paho.mqtt.client as mqtt
def on_connect(client, userdata, flags, respons_code):
print("connected")
client.subscribe("#")
def on_message(client, userdata, msg):
print(msg.topic)
print(str(msg.payload))
client = mqtt.Client(transport="websockets")
client.on_connect = on_connect
client.on_mess... |
<filename>lang/py/pylib/10/threading/threading_event.py
#!/usr/bin/env python
# encoding: UTF-8
import threading
import logging
import time
logging.basicConfig(level=logging.DEBUG,
format='(%(threadName)-10s) %(message)s',
)
def wait_for_event(e):
logging.debug('wait_for_... |
<gh_stars>0
import * as tslib_1 from "tslib";
import { ToneEvent } from "./ToneEvent";
import { ToneWithContext } from "../core/context/ToneWithContext";
import { optionsFromArguments } from "../core/util/Defaults";
import { noOp } from "../core/util/Interface";
/**
* Loop creates a looped callback at the
* specified... |
<gh_stars>1-10
package crypto
import (
"bytes"
"encoding/base64"
"io/ioutil"
"strings"
"testing"
)
func readFile(t *testing.T, name string) []byte {
data, err := ioutil.ReadFile(name)
if err != nil {
t.Fatalf("could not get file: %s", err)
}
return data
}
func readB64(t *testing.T, name string) []byte {
... |
<gh_stars>1-10
/* Using MCP9808 ambient temperatute sensor */
'use strict';
const r = require('array-gpio');
var i2c = r.I2C();
/* set data transfer speed to 100 kHz */
i2c.setTransferSpeed(200000);
/* MCP9808 device address */
let slave = 0x18;
/* access MCP9808 device */
i2c.selectSlave(slave);
/* setup write... |
<filename>src/test/java/pro/jiefzz/demo/uow/demo1/aggrGenerate/BankAccountGeneration.java
package pro.jiefzz.demo.uow.demo1.aggrGenerate;
import java.io.IOException;
import com.github.kimffy24.uow.util.GenerateSqlMapperUtil;
import pro.jiefzz.demo.uowdemo.aggr.demo.BankAccount;
@Deprecated
public class BankAccountG... |
#!/bin/bash
set +e
NUM=$1
XDIR="out/pythia8_ttbar"
OUTROOT="tev14_pythia8_ttbar_$NUM.root"
OUT="tev14_pythia8_ttbar_$NUM.promc"
LOG="logfile_$NUM.txt"
rm -f $XDIR/$OUTROOT $XDIR/$OUT
source /opt/hepsim.sh
cp tev14_pythia8_ttbar.py tev14_pythia8_ttbar.py.${NUM}
echo "Random:seed=${NUM}" >> tev14_pythia8_ttbar.py.${N... |
import React, {PureComponent} from 'react';
import AssetGrid from "./Media/AssetGrid";
import {oauthClient} from "../oauth";
import config from "../config";
import CollectionsPanel from "./Media/CollectionsPanel";
import MediaSelection from "./Media/MediaSelection";
import {UserContext} from "./Security/UserContext";
i... |
#!/bin/bash -f
#*********************************************************************************************************
# Vivado (TM) v2021.1 (64-bit)
#
# Filename : design_reciever.sh
# Simulator : Mentor Graphics Questa Advanced Simulator
# Description : Simulation script for compiling, elaborating and verifyi... |
def evaluateRPN(expression):
stack = []
for char in expression:
if char in ['+', '-', '*', '/']:
op1 = stack.pop()
op2 = stack.pop()
if char == '+':
stack.append(op1 + op2)
elif char == '-':
stack.append(op2 - op1)
... |
<filename>src/tools/web/kdb.js<gh_stars>0
/**
* @file
*
* @brief small library to access Elektra’s kdb via node.js
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*/
const { exec } = require('child_process')
const { readFileSync, unlink } = require('fs')
const KDB_COMMAND = process.env... |
#!/bin/bash
INPUT_DIR="/data/marble/cmip6/CMIP6/DCPP/IPSL/IPSL-CM6A-LR/dcppC-atl-control/r1i1p1f1/Amon/tas/gr/v20190110"
~/.local/bin/kernprof -l -v scripts/scratch.py ${INPUT_DIR} &> performance_tests_results/small_crunch_profile.txt
INPUT_DIR="/data/marble/cmip6/CMIP6/CMIP/BCC/BCC-CSM2-MR/historical/r1i1p1f1/Amon... |
#!/bin/sh
exec gunicorn app:APP \
-w 2 -t 120 \
-b 0.0.0.0:5000 \
--max-requests 1000 \
--log-level=info
|
int[] arr = new int[10];
Random random = new Random();
for(int i = 0; i < 10; i++) {
int rand = random.nextInt(101);
while (Arrays.asList(arr).contains(rand)) {
rand = random.nextInt(101);
}
arr[i] = rand;
}
System.out.println(Arrays.toString(arr)); |
<filename>src/main/java/com/github/thebuildteam/obelisk/registries/ItemRegistry.java
package com.github.thebuildteam.obelisk.registries;
import com.github.thebuildteam.obelisk.Obelisk;
import com.github.thebuildteam.obelisk.lists.OBLBlockList;
import com.github.thebuildteam.obelisk.lists.OBLItemGroups;
import com.gith... |
const jwt = require('jsonwebtoken');
const header = {
alg: 'HS256',
typ: 'JWT'
};
const payload = {
"sub": "1234567890",
"name": "John Doe",
"iat": 1516239022
};
const secret = "secret";
const token = jwt.sign(payload,secret,{ header : header });
console.log(token); |
require_relative "helper"
class Test100 < Minitest::Test
def setup
setup_common()
end
# --------------------------------
def test_selfhost
files = [
"addr_deref.pric",
"if.pric"
]
files.each do |file|
file_src = project_path("selfhost/test/selfhost/#{file}")
src = Fi... |
bash run.sh Scripts/shamir.sh dot-100000
|
<filename>src/me/atog/procore/commandos/MensajeGlobalCommand.java<gh_stars>0
package me.atog.procore.commandos;
import com.sun.istack.internal.NotNull;
import me.atog.procore.ProCorePlugin;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecut... |
<reponame>ntrhieu89/YCSB
/**
* Copyright (c) 2012 - 2015 YCSB contributors. 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/LICE... |
<reponame>sethbrasile/Tone.js<gh_stars>0
import * as tslib_1 from "tslib";
import { TimeClass } from "../../core/type/Time";
import { TimelineValue } from "../../core/util/TimelineValue";
import { onContextClose, onContextInit } from "../context/ContextInitialization";
import { Gain } from "../context/Gain";
import { T... |
<reponame>ctuning/ck-spack
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by <NAME>, <EMAIL>, All rights reserved.
# L... |
<gh_stars>1-10
package org.jmotor.validation
/**
* Component:
* Description:
* Date: 2018/8/28
*
* @author AI
*/
trait Validator[T] {
def validate(value: T): Unit
}
|
package com.phoenixnap.oss.ramlplugin.raml2code.github;
import org.junit.Test;
import com.phoenixnap.oss.ramlplugin.raml2code.rules.GitHubAbstractRuleTestBase;
import com.phoenixnap.oss.ramlplugin.raml2code.rules.Spring4ControllerDecoratorRule;
/**
* @author aleksandars
* @since 2.0.5
*/
public class Issue292Rule... |
package com.today.dbreport.utils
import java.io.File
import com.typesafe.config.{Config, ConfigFactory}
/**
* 类功能描述: 配置文件读取
*
* Create by Barry
*
* @version 1.0.0
* Create on 2018/6/25.
*/
object ConfigReader {
/**
* 读取配置文件
* @return
*/
def getConfig(): Config ={
val configFileName... |
BASEDIR=$(dirname $(pwd))
sudo docker run --rm -v ${BASEDIR}:/work -w /work journeymidnight/yig bash -c 'make plugin_internal' |
#!/bin/bash
TMPDIR=$(mktemp -d)
startdir="$PWD"
dirlist=$(mktemp)
function cleanup {
# I use trash-cli here instead of rm
# https://github.com/andreafrancia/trash-cli
# Obviously, substitute rm -f for trash if you want to use it.
find "$TMPDIR/" -iname "OTHER*" -exec trash {} \;
find "$TMPDIR/" -... |
/*
* socket_output.h
*
* Created on: May 30, 2018
* by: <NAME>
*/
#ifndef SRC_MODULES_OUTPUT_SOCKET_OUTPUT_H_
#define SRC_MODULES_OUTPUT_SOCKET_OUTPUT_H_
#include "../../../configure.h"
typedef struct socket_output_struct socket_output_t;
socket_output_t* socket_output_init( const socket_output_conf_... |
# coding: utf-8
from flask import Flask
app = Flask(__name__)
@app.route('/')
def home():
return 'Site em Construção'
if __name__ == '__main__':
app.run()
|
import React from 'react';
import { IProps } from './types';
import Tutorial from '@root/containers/Pages/Game/Tutorial';
import Win from '@root/containers/Pages/Game/Win';
import Field from '@root/containers/Pages/Game/Field';
import If from '@root/components/If';
import s from './styles.scss';
const Content: Reac... |
package testpb
import (
"fmt"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/runtime/protoiface"
"google.golang.org/protobuf/runtime/protoimpl"
"google.golang.org/protobuf/types/dynamicpb"
"math"
"pgregory.... |
#!/bin/bash
#
# Install script to install the operator
#
set -o errexit
set -o nounset
set -o pipefail
operator=ibm-spectrum-scale-csi-operator
installDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
#$APP_TEST_LIBRARY_FUNCTIONS/operatorInstall.sh \
# --cr $CV_TEST_BUNDLE_DIR/operators/${operat... |
#!/usr/bin/env bash
set -euo pipefail
shopt -s nullglob
cd "$(dirname "$0")"
[[ $# -eq 2 ]] || exit 1
DEVICE=$1
BUILD=$2
MOUNT_ROOT="mount"
DL_ROOT="dl"
blob_partitions=(system product system_ext vendor)
# Prints an info message in light green
function msg() {
echo -e "\e[1;32m$*\e[0m"
}
# Prints an error in ... |
import mongoose from 'mongoose';
/*
Job Model
*/
export const JobSchema = mongoose.Schema(
{
name: {
type: String,
required: true,
trim: true,
unique: true
},
axesIds: [mongoose.Schema.Types.ObjectId]
}
);
const Job = mongoose.model('Job', JobSchema);
export default Job;
|
import React, { useRef, useCallback, useEffect } from 'react'
import PropTypes from 'prop-types'
import { isSingleValue, createVisualization } from '@dhis2/analytics'
const ChartPlugin = ({
visualization,
responses,
extraOptions,
legendSets,
id: renderCounter,
style,
onChartGenerated,
a... |
#!/usr/bin/env bash
## Create temporary folder
dir=$(mktemp -d)
## Clone the repo
git clone https://github.com/kamranahmedse/git-standup.git --depth=1 ${dir} || { echo >&2 "Clone failed with $?"; exit 1; }
cd ${dir}
make install || { echo >&2 "Clone failed with $?"; exit 1; }
cd ..
rm -rf ${dir}
|
#!/bin/bash
# Download python
sudo apt-get install python3
# Download pip
sudo apt-get install python3-pip
# install chromedriver
# Download the Chrome Driver
wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE_92.0.4515`/chromedriver_lin... |
#!/bin/sh
# CYBERWATCH SAS - 2017
#
# Security fix for USN-2927-1
#
# Security announcement date: 2016-03-14 00:00:00 UTC
# Script generation date: 2017-01-01 21:05:15 UTC
#
# Operating System: Ubuntu 14.04 LTS
# Architecture: i686
#
# Vulnerable packages fix on version:
# - libgraphite2-3:1.3.6-1ubuntu0.14.04.1
... |
<filename>app/src/main/java/com/ulfy/master/ui/custom_dkplayer/cache/PreloadTask.java<gh_stars>10-100
package com.ulfy.master.ui.custom_dkplayer.cache;
import com.danikula.videocache.HttpProxyCacheServer;
import com.dueeeke.videoplayer.util.L;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.In... |
<reponame>isandlaTech/cohorte-runtime
package org.psem2m.isolates.loggers;
/**
* @author ogattaz
*
*/
public class CLoggersException extends Exception {
/**
*
*/
private static final long serialVersionUID = 1109486025824328252L;
/**
* @param aFormat
* @param aArgs
*/
public CLoggersException(final S... |
set -e
echo "Registry"
curl --fail http://localhost:8080/v1/_internal_ping
echo ""
echo "Verbs"
curl --fail http://localhost:8080/c1/_internal_ping
echo ""
echo "Security scan"
curl --fail http://localhost:8080/secscan/_internal_ping
echo ""
echo "Web"
curl --fail http://localhost:8080/_internal_ping
echo ""
|
<reponame>Martin-BG/Softuni-Java-MVC-Spring-Feb-2019
package org.softuni.residentevil.domain.validation.annotations.composite.user;
import javax.validation.Constraint;
import javax.validation.Payload;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.lang.annotation.Do... |
/**
* <a href="http://www.openolat.org">
* OpenOLAT - Online Learning and Training</a><br>
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except in compliance with the License.<br>
* You may obtain a copy of the License at the
* <a href="http://www.apache... |
import React, { useState, useCallback } from 'react';
import Dragula from 'react-dragula';
const Example = () => {
const [sourceItems, setSourceItems] = useState([
'Item 1',
'Item 2',
'Item 3',
'Item 4'
]);
const [targetItems, setTargetItems] = useState([]);
// Create dragula instance & set event listener... |
# models.py
import pickle
class ClassificationModel(models.Model):
clf = pickle.load(open("classifier.pkl", "rb"))
# views.py
@app.route('/classify', methods=['POST'])
def classify_text():
classification_model = ClassificationModel.objects.get(id=1)
prediction = classification_model.clf.predict(request.data['tex... |
public KCentroid<TScalar, TKernel> GetKCentroid(int index)
{
if (!(0 <= index && index < this.NumberOfCenters))
throw new ArgumentOutOfRangeException();
// Retrieve the data points belonging to the cluster at the given index
List<DataPoint> clusterDataPoints = GetClusterDataPoints(index);
// C... |
#!/bin/bash
set -x
# Compile every and each .cpp file available here - .c also...
CXXFLAGS=" -Iminibu -Isrc -Isrc/functions -Isrc/views -Isrc/conditions -Isrc/misc"
CXX="g++";
FLEX="flex";
BISON="bison";
# Run it.
$FLEX src/build.l
cd src; $BISON build.y; cd ..
find . -name "*.cpp" | while read srcfile; do
if [ -f ... |
def sort_descending(nums):
# Iterate through the array to find the largest number
for i in range(len(nums)):
max_index = i
for j in range(i+1, len(nums)):
# Find the index of the largest number
if nums[j] > nums[max_index]:
max_index = j
# Swap t... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package teorica;
/**
*
* @author PauloCésar
*/
public class Horista extends Empregado{
private double precoHora, horasTrabalh... |
package models
import collection.JavaConversions._
import org.jsoup.Jsoup
import com.mongodb.casbah.Imports._
object IndexPortfolio {
val indexholdings = MongoConnection()("typedynamic")("indexholdings")
def apply(symbol: String): List[String] = {
val query = MongoDBObject("symbol" -> symbol)
ind... |
<filename>archguard/src/api/scanner/evaluations.ts
import axios from "../axios";
export function createEvaluation(type: string) {
return axios<{ isRunning: boolean }>({
url: '/api/scanner/evaluations',
method: "POST",
data: { type },
});
}
|
import java.applet.Applet;
import net.runelite.mapping.Export;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
@ObfuscatedName("ab")
public class class44 {
@ObfuscatedName("f")
@Export("applet")
public static Applet applet;
@ObfuscatedName("o")
public static String fie... |
<filename>src/org/lwjglx/util/glu/GLU.java<gh_stars>1-10
/*
* Copyright (c) 2002-2008 LWJGL Project
* 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 m... |
<gh_stars>10-100
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <rtthread.h>
#include "paho_mqtt.h"
/**
* MQTT URI farmat:
* domain mode
* tcp://iot.eclipse.org:1883
*
* ipv4 mode
* tcp://192.168.10.1:1883
* ssl://192.168.10.1:1884
*
* ipv6 mode
* tcp://[fe80::20c:29ff:fe9a:a07e]:1883... |
<gh_stars>0
import { RuleConfigurationOverride } from '../../../support/Rule'
import BaseConfiguration from '../eslint/no-unused-vars.d'
type Configuration = RuleConfigurationOverride<BaseConfiguration, 'unused-imports/no-unused-vars', 'eslint-plugin-unused-imports'>
export default Configuration
|
#!/bin/bash
# Copyright (c) The Diem Core Contributors
# SPDX-License-Identifier: Apache-2.0
# This script sets up the environment for the Diem build by installing necessary dependencies.
#
# Usage ./dev_setup.sh <options>
# v - verbose, print all statements
# Assumptions for nix systems:
# 1 The running user is the... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.