text stringlengths 1 1.05M |
|---|
import util from '../../util';
import chimXHR from './xhr';
const {
isFunction,
isString
} = util;
/**
* @callback ResponseCallback
* @param {*} [body] - response body
*/
/**
* Required and optional arguments for chimAJAX
* request validated and mapped to object.
* @typedef {object} RequestArgs
* @pr... |
<filename>C2CRIBuildDir/projects/C2C-RI/src/jameleon-test-suite-3_3-RC1-C2CRI/jameleon-core/tst/java/net/sf/jameleon/event/TestFunctionListener.java
/*
Jameleon - An automation testing tool..
Copyright (C) 2005 <NAME> (<EMAIL>)
This library is free software; you can redistribute it and/or
modify it... |
<reponame>codeaholicguy/coderschool-restaurant
json.extract! @coupon, :id, :code, :discount_rate, :created_at, :updated_at
|
import { Injectable } from '@angular/core';
import { User, UserData } from '../models/user';
import { UserFactoryService } from '../factories/user-factory.service';
import 'rxjs/add/operator/toPromise';
import { ApiResponse } from '../responses/api-response';
import * as Bluebird from 'bluebird';
import { PromisedHttpS... |
from rest_framework import serializers
from .models import Player
class PlayerSerializer(serializers.HyperlinkedModelSerializer):
POSITION_CHOICES = (
('F', 'Forward'),
('M', 'Midfielder'),
('D', 'Defender'),
('GK', 'Goalkeeper'),
)
position = serializers.ChoiceField(choice... |
#!/bin/bash
#SUB_FOLDER="/home/ubuntu/cloud-automation/"
MAGIC_URL="http://169.254.169.254/latest/meta-data/"
if [ $# -eq 0 ]
then
echo "No arguments supplied"
else
#OIFS=$IFS
IFS=';' read -ra ADDR <<< "$1"
for i in "${ADDR[@]}"; do
if [[ $i = *"account_id"* ]];
then
ACCOUNT_ID=... |
import Application from './app/Application';
var app = new Application();
|
<reponame>ringingmaster/ringingmaster-util-javafx
package org.ringingmaster.util.javafx.grid.model;
/**
* TODO comments ???
*
* @author <NAME>
*/
public interface CellModel extends Iterable<CharacterModel> {
int getLength();
CharacterModel getCharacterModel(int index);
void insertCharacter(int index... |
<reponame>acidicMercury8/xray-1.5<gh_stars>1-10
////////////////////////////////////////////////////////////////////////////
// Module : smart_cover.cpp
// Created : 16.08.2007
// Author : <NAME>
// Description : Smart cover class
////////////////////////////////////////////////////////////////////////////
... |
<filename>CounterP2.java
import greenfoot.*;
import java.awt.Color;
public class CounterP2 extends Actor
{
int score = 0;
int life = 20;
public void act()
{
setImage(new GreenfootImage("Player 2: " + (35 - score) + " HP: " + life, 24, Color.GREEN, Color.BLACK));
if(score >= 3... |
<reponame>PetukhovVictor/compiler2
from ...Helpers.environment import Environment
from ...Helpers.common import BoxedArrayWrap, UnboxedArrayWrap
def object_val(env, node):
if node.object_name == 'this':
value = Environment.context_objects[-1].get_var(node.prop_name)
else:
obj = Environment(env... |
ls -t /home/ubuntu/src/reinforcement_learning/output | grep "weight.*\.h5" | tail -n +6 | xargs -I {} rm /home/ubuntu/src/reinforcement_learning/output/{}
ls -t /home/ubuntu/src/reinforcement_learning/output | grep "model.*\.json" | tail -n +6 | xargs -I {} rm /home/ubuntu/src/reinforcement_learning/output/{}
|
import App from "./App";
import Callout from "./Callout";
import Form from "./Form";
import ShoutboxLauncher from "./ShoutboxLauncher";
export { App, Callout, Form, ShoutboxLauncher };
|
#!/bin/bash
base=$(dirname $(readlink -f $(which java)))
if [ -e $base/../../include ]; then
echo $base/../../include
elif [ -e $base/../include ]; then
echo $base/../include
else
echo 'Java include not found.' >&2
echo 'Use "make JAVA_INC=<folder with jni.h>"' >&2
exit 1
fi
|
/**
* @author ooooo
* @date 2021/4/10 11:48
*/
#ifndef CPP_10_03__SOLUTION1_H_
#define CPP_10_03__SOLUTION1_H_
#include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
int search(vector<int> &arr, int target) {
int n = arr.size();
int l = 0, r = n - 1;
int ans = INT_MAX;
whi... |
#!/bin/sh
sudo apt-get install build-essential gcc gfortran scons \
liblapack-pic liblapack-dev libnetcdf-dev libnetcdfc7 netcdf-bin \
libscotch-dev libscotchmetis-dev libscotch-5.1 \
python2.7 python2.7-dev cython python-numpy python-nose gmsh python-vtk \
python-pygraphviz python-sphinx python-sphinxcontrib.issuetrac... |
// Copyright (c) 2017, <NAME>.
// All rights reserved.
// License: "BSD-3-Clause"
var results = [];
var expected = [];
var r = eval("var x=0; \
L1:{'A'; \
while(true){ \
if(++x === 1) 'B'; \
else break L1; \
} \
}");
results.push(r);
expected.push('A');
[results, expected, "DONE"];
|
<filename>src/components/vn/ItemCard.tsx<gh_stars>100-1000
/**
* TODO: in Vulcan Meteor we already have a Card component, we will need to make it
* available in Vulcan NPM as well
*
* This component will be removed when this is done
*/
import { getReadableFields } from "@vulcanjs/schema";
export const ItemCard =... |
# bin/bash
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd )"
PLAN="infrastructure.plan"
GOOGLE_KEY_FILE=$ROOT/infrastructure/google-sa.json
if [ -f ${GOOGLE_KEY_FILE} ]; then
export GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_KEY_FILE
fi
command cd "$ROOT/infrastructure"
command terraform apply -input=fal... |
python translate.py -gpu 1 \
-batch_size 8 \
-beam_size 4 \
-model model_himap_new500/himap_2_step_20000.pt \
-src /home/mkrilov/Thesis/data/multi_news/multi-news-original-src-cleaned-no-newlinechar-word_tokenizer_500/test.src.cleaned.token... |
import React from 'react';
export default function Banner() {
return (
<div>
<h1><NAME></h1>
<p>Freelance Frontend Web Developer</p>
</div>
);
}
Banner.displayName = 'Banner';
|
#!/bin/bash
OPENJPEG_REPO="https://github.com/uclouvain/openjpeg.git"
OPENJPEG_COMMIT="6a29f5a9e3a1e2dbf1e3df22b7e449bc1db20b5c"
ffbuild_enabled() {
return 0
}
ffbuild_dockerbuild() {
git-mini-clone "$OPENJPEG_REPO" "$OPENJPEG_COMMIT" openjpeg
cd openjpeg
mkdir build && cd build
cmake -DCMAKE_T... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
import { Http, Response, Headers, RequestOptions } from '@angular/http';
import { Injectable } from '@angular/core';
import 'rxjs/add/operator/map';
import { Observable } from 'rxjs';
@Injectable ()
export class ApiService {
url: string;
headers: Headers;
options: RequestOptions;
constructor (private... |
<reponame>unixing/springboot_chowder<gh_stars>10-100
package com.oven.log;
import lombok.extern.slf4j.Slf4j;
import org.joda.time.DateTime;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
import java.util.concurrent.TimeUnit;
@Slf4j
@Component
public class InfoLog ... |
import { Injectable } from '@angular/core';
import { HttpClient } from "@angular/common/http";
@Injectable({
providedIn: 'root'
})
export class NetworkOperatorService {
constructor(private http: HttpClient) { }
/**
* gibt ein JSON Objekt mit allen Netzbetreibern zurück / returns a JSON object with all netwo... |
require('./config/config');
const express = require('express');
const path = require('path');
const bodyParser = require('body-parser');
const cookieParser = require('cookie-parser');
const logger = require('morgan');
const {mongoose} = require('./db/mongoose');
const indexRouter = require('./routes/index');
const ap... |
#include <vtkSmartPointer.h>
#include <vtkAssignAttribute.h>
#include <vtkAlgorithmOutput.h>
#include <vtkDataSetAttributes.h>
#include <vtkDataObject.h>
class AttributeAssigner {
public:
void assignAttribute(vtkSmartPointer<vtkDataObject> validPart, const std::string& attributeName, vtkSmartPointer<vtkAlgorithmOu... |
package com.github.robindevilliers.welcometohell.wizard.expression.function;
import com.github.robindevilliers.welcometohell.wizard.expression.Function;
import java.util.Map;
public class PathFunction implements Function<Object> {
private String path;
public PathFunction(String path) {
this.path = ... |
func extractTestNames(_ testSuite: [(String, () -> Void)]) -> [String] {
return testSuite.map { $0.0 }
} |
<filename>src/main/java/com/sbsuen/fitfam/user/UserController.java
package com.sbsuen.fitfam.user;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
... |
dependencies() {
echo
command -v zip > /dev/null 2>&1 || { echo -e >&2 "\e[94m➟ \e[92mNeed ZIP installing it....." && apt install zip > /dev/null 2>&1;}
command -v php > /dev/null 2>... |
a = tf.placeholder(tf.float32, shape=[None, 2])
b = tf.placeholder(tf.float32, shape=[2, 2])
# Create prefetching tensor
prefetch_signal = tf.Variable(initial_value=0, dtype=tf.int64, trainable=False)
a_prefetch = tf.data.Dataset.from_tensor_slices(a).prefetch(1).make_one_shot_iterator().get_next()
b_prefetch = tf.dat... |
<filename>src/main/java/org/hiro/mapper/InitWeaponMapper.java
package org.hiro.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.hiro.InitWeapon;
@Mapper
public interface InitWeaponMapper {
InitWeapon findById(int Id);
}
|
<reponame>kostasxerv/movierama
var express = require('express')
const router = express.Router()
const { ensureLoggedIn } = require('connect-ensure-login')
const { movieController } = require('../controllers')
router.post('/movie', ensureLoggedIn(), movieController.createMovie)
router.post('/movie/like', ensureLoggedI... |
#!/bin/sh
echo "OpenCV installation by learnOpenCV.com"
#Specify OpenCV version
cvVersion="3.4.3"
# Clean build directories
rm -rf opencv/build
rm -rf opencv_contrib/build
# Create directory for installation
mkdir installation
mkdir installation/OpenCV-"$cvVersion"
# Save current working directory
cwd=$(pwd)
sud... |
#!/usr/bin/env bash
TIMEOUT=8000
LAYER_ID="sea_level.sla"
VARIABLE_ID="sla"
LAYER_TYPE="image"
VERSION="1.1.1"
LON_RES="1440"
LAT_RES="720"
ZOOM_LEVELS="0-3"
MIN_LON="-180"
MAX_LON="180"
MIN_LAT="-90"
MAX_LAT="90"
MIN="-0.5"
MAX="0.5"
if [ ! -f ./package.json ]; then
echo "You have to be in the root folder of the... |
def add_matrix(A, B):
"""Add two matrices of the same size."""
n = len(A)
m = len(A[0])
result = [[0 for _ in range(m)] for _ in range(n)]
for i in range(n):
for j in range(m):
result[i][j] = A[i][j] + B[i][j]
return result
# Output
print(add_matrix(A,B)) |
<gh_stars>0
package Enums;
public enum FindElementBy {
XPath,
Id
} |
../android-ndk-r8/ndk-build
|
import tkinter
# initialise a tkinter window
window = tkinter.Tk()
window.title("Bank Calculator")
# define functions
def calculate_interest():
# get user inputs
amount = float(amount_entry.get())
rate = float(rate_entry.get())
years = int(years_entry.get())
simple_interest = amount * rate * years... |
<filename>src/main/java/malte0811/controlengineering/logic/schematic/symbol/SchematicSymbols.java
package malte0811.controlengineering.logic.schematic.symbol;
import com.google.common.collect.ImmutableList;
import com.mojang.datafixers.util.Unit;
import malte0811.controlengineering.ControlEngineering;
import malte0811... |
package org.ruogu.learn.lang.reflect;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* ReflectTest2
*
* @author xueyintao 2016年2月6日 下午8:13:15
*/
public class ReflectTest2 {
/**
* @param args
*/
... |
<reponame>leotangram/lo-product-card
import { ProductCardHOCProps } from '../interfaces/interfaces'
import ProductCardHOC from './ProductCard'
import { ProductButtons } from './ProductButtons'
import { ProductImage } from './ProductImage'
import { ProductTitle } from './ProductTitle'
const ProductCard: ProductCardHOCP... |
import os
from celery import Celery
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'BPPRC.settings')
celery_app = Celery('BPPRC')
celery_app.config_from_object('django.conf.settings', namespace='CELERY')
celery_app.autodiscover_tasks()
|
package com.genersoft.iot.vmp.gb28181.utils;
/**
* 数值格式判断和处理
* @author lawrencehj
* @date 2021年1月27日
*/
public class NumericUtil {
/**
* 判断是否Double格式
* @param str
* @return true/false
*/
public static boolean isDouble(String str) {
try {
Double num2 = Double.valueO... |
<reponame>gitaalekhyapaul/cowin-ticket
import { createHash } from "crypto";
import axios from "axios";
import { decode } from "jsonwebtoken";
import PDFDocument from "pdfkit";
import moment from "moment";
import { ToWords } from "to-words";
import { join } from "path";
import { errors } from "../error/error.constants"... |
package main
import "fmt"
func main() {
input1 := "Hello"
input2 := "World!"
longestString := ""
if len(input1) > len(input2) {
longestString = input1
} else {
longestString = input2
}
fmt.Println("The longest string is:", longestString)
} |
def process_json_objects(json_objects):
deleted_ids = []
for obj in json_objects:
if obj.get("action") == "motion_comment_section.delete":
id_to_delete = obj.get("data")[0].get("id")
# Perform model deletion operation using id_to_delete
# For example: self.assert_mode... |
<reponame>catperso/looking-for-group
import rootReducer from "../../reducers";
import { createStore } from "redux";
import formVisibleReducer from "../../reducers/form-visible-reducer";
import gameListReducer from "../../reducers/game-list-reducer";
import * as c from './../../actions/ActionTypes';
let store = createS... |
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { from } from 'rxjs';
import { LoginService } from '../services/login.service';
import {MatDialog} from '@angular/material/dialog';
import { EmotionDialogComponent } from '../emotion-dialog/emotion-dialog.component';
@... |
#!/bin/sh
# Copyright 2005-2018 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an int... |
/*
* Copyright [2018] [<NAME>]
*
* 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 agreed to i... |
#!/usr/bin/env bash
rex='dxx-(.*).txt'
_guid() {
arr=(
'0' '1' '2' '3' '4' '5' '6' '7' '8'
'9' 'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H'
'J' 'K' 'M' 'N' 'P' 'Q' 'R' 'S' 'T'
'U' 'W' 'X' 'Y' 'Z'
)
local out=""
for I in `seq 21`; do
rand=$[$RA... |
from flask import jsonify
from fref.models import db, commit, Foo
def init_app(app):
@app.route('/')
def root():
foo = Foo()
db.session.add(foo)
commit()
return jsonify({'message': 'Hello, World!'})
|
travis_terminate() {
if [[ ! "${TRAVIS_OS_NAME}" ]]; then
return
fi
"_travis_terminate_${TRAVIS_OS_NAME}" "${@}"
}
_travis_terminate_linux() {
_travis_terminate_unix "${@}"
}
_travis_terminate_osx() {
_travis_terminate_unix "${@}"
}
_travis_terminate_unix() {
set +e
[[ "${TRAVIS_FILTERED}" == redi... |
#!/bin/sh
VERSION="1.0.0-SNAPSHOT"
MAINTAINERS="Zak Hassan"
COMPONENT="recommend-service"
cat << 'EOF'
______ ____ __ ______ _ __ _____
/ / __ )____ __________ / __ \____ _/ /_____ _/ ____/____(_)___/ / /__ / __
__ / / __ / __ \/ ___/ ___/ / / / / ... |
/*
PDFSecurity - represents PDF security settings
By <NAME> <<EMAIL>>
Translated to ts by <NAME>
*/
import { PDFDocument } from './document';
import { PDFReference } from './reference';
import * as CryptoJS from 'crypto-js';
import { PDFInfo, PDFOptions, PDFPermissions, UtilEncDict } from './types';
import { ... |
package cm.xxx.minos.leetcode;
/**
* 394. 字符串解码
* 测试用例:
* "3[a]2[bc]"
* "3[a2[c]]"
* "2[abc]3[cd]ef"
* "2[abc]3[cd]ef4[f]3[a3[gk]]"
* "100[leetcode]"
* "3[a]2[b4[F]c]"
* "3[a3[gk]]"
* Author: lishangmin
* Created: 2018-08-23 10:16
*/
public class Solution80 {
public String decodeString(String s) {
... |
# Common shell script code to get input and output files.
INPUT=
OUTPUT=
while [ -n "$1" ]; do
case "$1" in
-o) shift; OUTPUT="$1";;
*) INPUT="$1";;
esac
shift
done
if [ -z "$INPUT" -o -z "$OUTPUT" ]; then
echo "Usage: $0 INPUT -o OUTPUT"
exit
fi
|
<filename>src/main/java/marioandweegee3/flax/FlaxMod.java
package marioandweegee3.flax;
import java.util.HashSet;
import java.util.Collections;
import java.io.IOException;
import java.io.Writer;
import java.io.BufferedInputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
impo... |
SELECT *
FROM Students
ORDER BY name ASC
LIMIT 5; |
import React from 'react';
import renderer from 'react-test-renderer';
import RecipeDetails from './RecipeDetails';
describe('<RecipeDetails />', () => {
it('renders correctly', () => {
const flavors = [
{
id: 1,
name: '<NAME>',
abbreviation: 'TPA',
percent: 1,
inSt... |
<reponame>Rohitm619/Softuni-Python-Basic
boot_capacity = float(input())
entries = 0
capacity = 0
suitcases_inside = 0
command = input()
while command != "End":
suitcases = float(command)
entries += 1
suitcases_inside += 1
command = input()
if entries % 3 == 0:
capacity += suitcases + sui... |
#! /bin/bash
# include helper.bash file: used to provide some common function across testing scripts
source "${BASH_SOURCE%/*}/helpers.bash"
# function cleanup: is invoked each time script exit (with or without errors)
# please remember to cleanup all entities previously created:
# namespaces, veth, cubes, ..
functio... |
#!/bin/sh
#BSUB -J edgeconv-hyperopt #The name the job will get
#BSUB -q gpuv100 #The queue the job will be committed to, here the GPU enabled queue
#BSUB -gpu "num=1:mode=exclusive_process" #How the job will be run on the VM, here I request 1 GPU with exclusive access i.e. only my c #BSUB -n 1 How many CPU cores my jo... |
<reponame>m-nakagawa/sample<gh_stars>0
/*
* 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 Licens... |
import {Component, OnDestroy, OnInit} from '@angular/core';
import {interval, Subject, Subscription} from 'rxjs';
import {takeUntil} from 'rxjs/operators';
import {SocketService} from '../../services/socket.service';
import {DataStoreService} from '../../../../core/services/data-store.service';
import {GameViewService}... |
#!/bin/sh
### currently, looks for either a virtualenv or anaconda install
LIBNAME=$1
INCNAME=$2
UNAME=`uname`
if [ "${UNAME}" = "Darwin" ]; then
SOEXT=dylib
else
SOEXT=so
fi
if [ -n "${VIRTUAL_ENV}" ]; then
if [ -f "${VIRTUAL_ENV}/lib/lib${LIBNAME}.${SOEXT}" ] && [ -d "${VIRTUAL_ENV}/include/${INCNAME}... |
<gh_stars>1-10
import {DefinitionNode, DocumentNode, NameNode, visit} from "graphql/language";
import {IMPORT_ALL} from "./matchers";
export function expandDocumentImports(
document: DocumentNode,
imports: ResolvedImport<IMPORT_ALL | string[]>[],
): DocumentNode {
return {
...document,
definitions: impor... |
<filename>mc-gateway/zuul-gateway/src/main/java/com/mc/gateway/config/ResourceServerConfiguration.java
package com.mc.gateway.config;
import com.mc.common.config.DefaultPasswordConfig;
import com.mc.oauth2.common.config.DefaultResourceServerConf;
import org.springframework.context.annotation.Configuration;
import org.... |
<filename>plugins/pantun.js
const { default: makeWASocket, BufferJSON, WA_DEFAULT_EPHEMERAL, generateWAMessageFromContent, downloadContentFromMessage, downloadHistory, proto, getMessage, generateWAMessageContent, prepareWAMessageMedia } = require('@adiwajshing/baileys')
let fs = require('fs')
let handler = async (m) =>... |
<filename>src/example-components/BlocksIcons/BlocksIcons6/index.js
import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Grid, Card, CardContent, Button } from '@material-ui/core';
export default function LivePreviewExample() {
return (
<>
<div className="mb... |
<reponame>LesterCerioli/Umbriel<gh_stars>100-1000
import { InMemoryTemplatesRepository } from '../../repositories/in-memory/InMemoryTemplatesRepository'
import { CreateTemplate } from './CreateTemplate'
let templatesRepository: InMemoryTemplatesRepository
let createTemplate: CreateTemplate
describe('Create Message', ... |
#! /bin/bash
NAME=$1
FILE_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")/../packages" && pwd)
re="[[:space:]]+"
if [ "$#" -ne 1 ] || [[ $NAME =~ $re ]] || [ "$NAME" == "" ]; then
echo "Usage: yarn gc \${name} with no space"
exit 1
fi
DIRNAME="$FILE_PATH/$NAME"
INPUT_NAME=$NAME
if [ -d "$DIRNAME" ]; then
echo "$N... |
module Neo4j::Driver
module Internal
class InternalSession
extend AutoClosable
include Ext::ConfigConverter
include Ext::ExceptionCheckable
include Ext::RunOverride
java_import org.neo4j.driver.internal.util.Futures
attr_reader :session
delegate :open?, :last_bookmark, ... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
declare const process: any;
// TODO: there are currently two definitions of isProduction active,
// this one, and o... |
use std::collections::HashSet;
#[derive(Debug, PartialEq, Eq, Hash)]
struct TestClient {
keys: HashSet<String>,
}
impl TestClient {
fn new() -> TestClient {
TestClient {
keys: HashSet::new(),
}
}
fn generate_rsa_sign_key(&mut self, name: String) -> Result<(), String> {
... |
#!/usr/bin/env bash
mypass="${mypass:-BadPass#1}"
db_root_password="${mypass}"
sudo yum -y -q install mysql-server mysql-connector-java
sudo chkconfig mysqld on
sudo service mysqld start
sudo ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar
cat << EOF | mysql -u root
GRANT ... |
/*
* The MIT License
*
* Copyright 2018 Josh.
*
* 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 the rights
* to use, copy, mo... |
<reponame>boubad/CygProjects
#include "../include/indiv.h"
///////////////////////////////
namespace info {
////////////////////////////////////////
extern bool info_global_get_random_indivs(const size_t n,
IIndivProvider *pProvider,
info_indivs_vector &oVec){
assert(n > 0);
assert(pProvider != nullptr);
assert(... |
import React, {useState} from 'react';
import {View, Text, Button, TextInput, FlatList} from 'react-native';
const App = () => {
const [text, setText] = useState('');
const [items, setItems] = useState([]);
const onPress = () => {
setItems([...items, text]);
setText('');
};
return (
<View style={{flex: 1, ju... |
<filename>src/plugins/orbbec_hand/hnd_debug_handstream.hpp
// This file is part of the Orbbec Astra SDK [https://orbbec3d.com]
// Copyright (c) 2015 Or<NAME>
//
// 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... |
try:
from fonticon_fa5 import FA5S
except ImportError as e:
raise type(e)(
"This example requires the fontawesome fontpack:\n\n"
"pip install git+https://github.com/tlambert03/fonticon-fontawesome5.git"
)
from qtpy.QtCore import QSize
from qtpy.QtWidgets import QApplication, QPushButton
fr... |
<reponame>jpaproject/wilmar-plant-reporting<gh_stars>1-10
'use strict';
// Load Date class extensions
var CronDate = require('./date');
// Get Number.isNaN or the polyfill
var safeIsNaN = require('is-nan');
/**
* Cron iteration loop safety limit
*/
var LOOP_LIMIT = 10000;
/**
* Detect if input range fully matche... |
import { Injectable } from '@nestjs/common';
import { CreateDeveloperInput,DeveloperType } from './developer.types';
@Injectable()
export class DeveloperService {
create(CreateDeveloperInput: CreateDeveloperInput):CreateDeveloperInput {
console.log(CreateDeveloperInput)
return CreateDeveloperInput;
}
... |
default="-O2 -msse"
sse="-O2 -ftree-vectorize -msse2 -msse3 -msse4 -ffast-math"
avx='-O2 -ftree-vectorize -mavx -mavx2 -mfma -ffast-math'
# avx2='-O2 -mavx2'
# native='-O2 -march=native'
# change here
from=$sse
to=$avx
find . -name "Makefile" -exec sed -i -e "s/$from/$to/" {} \;
# opencv
if [ "$to" == "-O2 -msse" ];... |
#!/usr/bin/env bash
# Cause the script to exit if a single command fails.
set -e
# Show explicitly which commands are currently running.
set -x
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
platform="unknown"
unamestr="$(uname)"
if [[ "$unamestr" == "Linux" ]]; then
echo "Platform is linux."
platform="l... |
import { Link } from "@reach/router";
import React from "react";
import Avatar from "Components/Avatar";
import HeaderNavNotifications from "./HeaderNavNotifications";
import HeaderNavLanguages from "./HeaderNavLanguages";
import HeaderNavMenu from "./HeaderNavMenu";
import HeaderNavMessages from "./HeaderNavMessages";... |
import subprocess
# Read configuration parameters from file
with open('stream_config.txt', 'r') as file:
config = dict(line.strip().split('=', 1) for line in file)
# Validate and apply settings to the streaming application
try:
gopmin = int(config['GOPMIN'])
outres = config['OUTRES']
fps = int(config[... |
<reponame>Andy4495/ConnectedStatusMonitor<gh_stars>0
struct Coord {
int x;
int y;
};
struct Layout {
Layout();
Coord WeatherTitle;
Coord WeatherTempValue;
Coord WeatherTempUnits;
Coord WeatherLuxValue;
Coord WeatherLuxUnits;
Coord WeatherRHValue;
Coord WeatherRHUnits;
Coord WeatherPValue;
Coord... |
#
#-----------------------------------------------------------------------
#
# This file defines and then calls a function that sets parameters
# associated with the external model used for initial conditions (ICs)
# and the one used for lateral boundary conditions (LBCs).
#
#-----------------------------------------... |
<filename>src/index/middleware/identity.ts
/*
* Copyright (c) 2019, FinancialForce.com, 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 retai... |
import * as numjs from 'numjs';
import { ICanvasState } from '../components/Canvas/CanvasInterfaces';
import { ICreature, IEnvironment } from "../elements/ElementInterface";
import { width, height } from '../constants/world';
import Vehicle from '../elements/Vehicle';
import Path from '../elements/Path';
import FlowFie... |
#!/bin/bash
#MSUB -l nodes=1:ppn=16
#MSUB -l walltime=5:00:00
#MSUB -l pmem=2000mb
#MSUB -N k5-v250-r19.5
#MSUB -o k5-v250-r19.5.out
#MSUB -M sascha.rechenberger@uni-ulm.de
#MSUB -m bea
#MSUB -q singlenode
module load devel/python/3.5.2
python main.py k5-v250-r19.5 --input_root $WORK/formulae --output_root $WORK/sat_... |
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... |
/*
* Copyright ConsenSys AG.
*
* 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 agreed to in writing... |
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
package org.museautomation.ui.steptask;
import org.junit.jupiter.api.*;
import org.museautomation.ui.steptask.execution.*;
import org.museautomation.builtins.step.*;
import org.museautomation.core.events.*;
import org.museautomation.core.events.matching.*;
import org.museautomation.core.execution.*;
import org.museaut... |
import React from 'react';
export default function SvgInlineInfo(props) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
viewBox="0 0 32 32"
{...props}
>
<defs>
<clipPath id="inline-info_svg__a">
<path d="M0 0h32v32H0z" />
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.