text stringlengths 1 1.05M |
|---|
export MESOS_zk=zk://mesos-master-1.example.com:2181,mesos-master-2.example.com:2181,mesos-master-3.example.com:2181/mesos
export MESOS_quorum=2
export MESOS_work_dir=/var/lib/mesos
export MESOS_log_dir=/var/log/mesos
|
const express = require('express');
const app = express();
const port = 8000;
const movies = [
{
name: 'Iron Man',
genre: 'Action',
rating: 8
}
];
app.get('/movies', (req, res) => {
res.json(movies);
});
app.listen(port, () => {
console.log(`Server is running on port ${port}`);
}); |
#!/bin/bash
TASK=8
SHOT=1
LANG=es
MODEL=ctrl_xuniter
MODEL_CONFIG=ctrl_xuniter_base
TASKS_CONFIG=iglue_fewshot_tasks_boxes36.dtu
TRTASK=RetrievalxFlickrCO${LANG}_${SHOT}
TEXT_TR=/home/projects/ku_00062/data/xFlickrCO/annotations/${LANG}/train_${SHOT}.jsonl
FEAT_TR=/home/projects/ku_00062/data/xFlickrCO/features/xflick... |
const config = require('@bedrockio/config');
const { promises: fs } = require('fs');
const path = require('path');
const os = require('os');
const crypto = require('crypto');
const { logger } = require('@bedrockio/instrumentation');
const mime = require('mime-types');
async function uploadLocal(file, hash) {
const d... |
#mount /system
#rm -rf /vendor
#ln -s /system/vendor /vendor
#qseecomd&
cd /data/local/tmp
echo 1 > /sys/class/power_supply/battery/charging_enabled
/sbin/charger &
/sbin/bruteforce hw < wordlist.txt
BLKDEV=/dev/block/bootdevice/by-name/userdata
BLKDEVSSD=/dev/block/bootdevice/by-name/ssd
BLKDEV_SIZE=$(blockdev --gets... |
<reponame>ningxiaojiang/guns-wq<gh_stars>0
package com.stylefeng.guns.modular.manage.controller;
import javax.annotation.Resource;
import javax.validation.Valid;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.sprin... |
import Vue from 'vue'
import ToggleButton from '@d14na/vue-js-toggle-button'
Vue.use(ToggleButton)
|
#coding: utf-8
require 'gmail' # for more info -> http://dcparker.github.com/ruby-gmail/
require 'readline' # for email confirmation
require 'date'
Signal.trap(:INT){
puts "logout Gmail ..."
@gmail.logout if defined? @gmail
puts "loged out!"
exit
}
def check_file(filename)
if File.exist?(filename)
puts ... |
<reponame>zaidmukaddam/linkto<filename>packages/gamut/src/icons/VerifiedBadge.tsx
import * as React from "react";
import { CustomSVGProps } from "@/types";
export default function VerifiedBadge({
size = 18,
...otherProps
}: CustomSVGProps) {
return (
<svg
width={size}
height={size}
xmlns="h... |
print_usage()
{
echo "Usage: $0 <app_path> <exp_path> <conda_path>"
echo "e.g: $0 /Scratch/ng98/CL/avalanche_nuwan_fork/exp_scripts/train_pool.py /Scratch/ng98/CL/results/ /Scratch/ng98/CL/conda"
echo "e.g: $0 ~/Desktop/avalanche_nuwan_fork/exp_scripts/train_pool.py ~/Desktop/CL/results/ /Users/ng98/miniconda... |
/*
* Copyright 2015-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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
<reponame>i-a-n/eui
/*
* 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 Licen... |
#!/usr/bin/env bash
#
# 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, software
# d... |
<gh_stars>1-10
package entity
import (
"fmt"
"time"
)
type SiteStats struct {
New bool `db:"-" json:"-" `
SiteID int64 `db:"site_id" json:"-"`
Visitors int64 `db:"visitors"`
Pageviews int64 `db:"pageviews"`
Sessions int64 `db:"sessions"`
BounceRate ... |
<gh_stars>0
import { Convert } from "./convert";
import { Wave } from "./wave";
export class Generate {
static inclusive(from: number, to: number) {
return from > to
? Generate.range(from, to - from - 1)
: Generate.range(from, to - from + 1)
}
static range(from: number, len... |
package com.wyp.materialqqlite.qqclient.protocol.protocoldata;
import java.util.ArrayList;
public class RecentList {
public int m_nRetCode;
public ArrayList<RecentInfo> m_arrRecentInfo = new ArrayList<RecentInfo>();
public void reset() {
m_nRetCode = 0;
m_arrRecentInfo.clear();
}
public boolean addRecent... |
function transformKeys($data) {
$unwarpItem = [];
foreach ($data as $key => $value) {
if(preg_match('/Category([\d]+)CustomField(?<field_name>[\w\d]+)$/', $key, $match)) {
$key = $match["field_name"];
}
$unwarpItem[$key] = $value;
}
return $unwarpItem;
}
// Test
$dat... |
<reponame>jiuyue8888/zbb
// import Vue from "vue/types/vue";
var MD5 = require('./md5.js');
const CryptoJS = require('crypto-js');
import { JSEncrypt } from 'jsencrypt'
import Vue from 'vue';
import router from "../router";
const vue = new Vue({
router
});
/*
* 自定义公共函数
*/
function tt() {
c... |
def find_closest_two_sum_pairs(arr):
# sort the given array
arr.sort()
min_diff = float('inf')
pairs = []
# consider each element in the array
for i in range(len(arr)):
for j in range(i+1, len(arr)):
diff = abs(arr[i] + arr[j] - (arr[i + 1] + arr[j - 1]))
if... |
#!/bin/sh
try() {
luaenv local $1
cd cc
git checkout $2
cd ..
echo lua = $1
echo cc = $2
lua -v
unset key
read -rsp $'Press any key to continue...\n' -n1 key
lua cli.lua .
}
for lv in luajit-2.0.4 luajit-2.1.0-beta1; do
for cv in master 1.77 1.74 1.74pr17 1.74pr16 1.74pr14 1.74pr13 1.73 1.64 1.6 1.58 1.5 1.4... |
import { container } from 'tsyringe';
import ICustomerRepository from '@modules/customer/Repositories/ICustomerRepository';
import CustomerRepository from '@modules/customer/infra/typeorm/repositories/CustomerRepository';
import IUsersRepository from '@modules/users/Repositories/IUsersRepository';
import UsersReposit... |
#include <DTBFile.hpp>
namespace HighELF {
void DTBFile::Load(std::string filename) {
fileEndianness = Endianness::Big;
// TODO everything lol
}
} // namespace HighELF
|
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the... |
package com.github.robindevilliers.welcometohell.steps;
import org.openqa.selenium.WebDriver;
import com.github.robindevilliers.cascade.annotations.Demands;
import com.github.robindevilliers.cascade.annotations.Narrative;
import com.github.robindevilliers.cascade.annotations.Step;
import com.github.robindevilliers.ca... |
#!/bin/bash
if ! git remote -v | grep -q 'upstream'; then
# echo 'not found upstream'
git remote add upstream https://github.com/philipwalton/solved-by-flexbox.git
fi
git fetch upstream master
git checkout master
git merge upstream/master
|
def rgb_to_hex(r, g, b):
# Convert each color component to its two-digit hexadecimal representation
hex_r = format(r, '02X')
hex_g = format(g, '02X')
hex_b = format(b, '02X')
# Concatenate the hexadecimal representations and return the result
return f"#{hex_r}{hex_g}{hex_b}" |
#!/usr/bin/env -S bash -euET -o pipefail -O inherit_errexit
SCRIPT=$(readlink -f "$0") && cd $(dirname "$SCRIPT")
# --- Script Init ---
mkdir -p log
rm -R -f log/*
touch log/stderror.err
ktools_monitor.sh $$ & pid0=$!
exit_handler(){
exit_code=$?
kill -9 $pid0 2> /dev/null
if [ "$exit_code" -gt 0 ]; then
... |
#!/bin/sh
#find . -name "*.php" -print | xargs etags -
exec exctags \
--languages=PHP \
-h ".php" -R \
--exclude="\.git" \
--exclude="\.svn" \
--exclude="Incubator" \
--totals=yes \
--tag-relative=yes \
--PHP-kinds=+cdf \
--regex-PHP='/abstract class ([^ ]*)/\1/c/' \
--regex-PHP='/interface ([^ ]*)/\1/c/' \
--regex-P... |
package com.jellehuibregtse.cah.cardservice.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
import java.util.Objects;
@Entity
public class Card {
@Id
@Generated... |
The Shunting-Yard algorithm is a better algorithm for converting an infix expression to a postfix expression. This algorithm first parses the expression from left to right, constructs a prefix expression and finally converts it to a postfix expression. |
package com.java.study.algorithm.zuo.bbasic.class_04;
public class Code_03_SuccessorNode{
} |
import React, { Component } from 'react';
class Avatar extends Component {
constructor(props) {
super(props);
this.state = {
name: '',
avatar: null
};
}
handleChange(event) {
const newState = {};
newState[event.target.name] = event.target.value;
this.setState(newState);
}
... |
package br.com.matheuslino.pacman;
import java.util.List;
import br.com.matheuslino.pacman.game.LabyrinthObjectVisitor;
public abstract class Player extends LabyrinthObject {
// Attributes
private Direction currentDirection;
private Coordinate initialCoordinate = new Coordinate(0,0);
Player(int x, int y) {
... |
package internal
import (
"fmt"
"strings"
"github.com/hashicorp/vault/api"
"gopkg.in/yaml.v2"
)
type SSHRole struct {
Name string `yaml:"name"`
Key_type string `yaml:"key_type"`
Default_user string `yaml:"default_user"`
Cidr_list []string `yaml:"cidr_list"`
Allow... |
<filename>services/server/src/models/middlewares/verifyUser.ts<gh_stars>0
import { NextFunction, Request, Response } from "express";
import { verify } from "jsonwebtoken";
import { getConnection } from "typeorm";
import { User } from "../../entity/User";
import { Payload } from "../../types/Payload";
export const veri... |
<gh_stars>1-10
import axios, { AxiosInstance, AxiosPromise } from "axios";
export default class API {
key: string;
client: AxiosInstance;
constructor(apiKey: string) {
this.key = apiKey;
this.client = axios.create({
baseURL: "https://api.flipsidecrypto.com/api/v1",
params: { api_key: apiKey ... |
<reponame>leSamo/vuln4shift-frontend<gh_stars>0
import { getRegistry } from '@redhat-cloud-services/frontend-components-utilities/Registry';
import promiseMiddleware from 'redux-promise-middleware';
import notificationsMiddleware from '@redhat-cloud-services/frontend-components-notifications/notificationsMiddleware';
i... |
#!/bin/bash
#SBATCH --job-name=/data/unibas/boittier/amide_graph_2
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --partition=short
#SBATCH --output=/data/unibas/boittier/amide_graph_2_%A-%a.out
hostname
# Path to scripts and executables
cubefit=/home/unibas/boittier/fdcm_project/mdcm_bin/cubefit.x
fdcm=/home/unibas/bo... |
var classdroid_1_1_runtime_1_1_prototyping_1_1_evaluation_1_1_rest_in_area =
[
[ "InternalEvaluate", "classdroid_1_1_runtime_1_1_prototyping_1_1_evaluation_1_1_rest_in_area.html#a3d893f5a24c43689d847d5b37c6870d6", null ],
[ "InternalReset", "classdroid_1_1_runtime_1_1_prototyping_1_1_evaluation_1_1_rest_in_area... |
#!/usr/bin/env bash
# Copyright (c) 2014 The Bitcoin Core developers
# Copyright (c) 2014-2015 The Dash developers
# Copyright (c) 2015-2017 The ORO developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Functions used b... |
<gh_stars>1-10
##############################################################################
# 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.
# LLNL-CODE-647... |
import "./Title.css"
export default function Title(){
return(
<div className="Title">
<div className="trai">
<h1>Học tập tr<NAME>ến</h1>
</div>
<div className="phai">
<button>Login</button>
<button>Sign up</button>
... |
export $(cat env/env-${HW_ENV})
export SW_ENV=dev
docker-compose --project-name calvincaulfield-bench "$@" |
<reponame>wolverineks/react-query<filename>src/react/useBaseQuery.js
import React from 'react'
//
import { useQueryCache } from './ReactQueryCacheProvider'
import { useMountedCallback } from './utils'
export function useBaseQuery(queryKey, config = {}) {
// Make a rerender function
const rerender = useMountedCal... |
<filename>Demo/Classes/DemoAppDelegate.h
//
// DemoAppDelegate.h
// Demo
//
// Created by <NAME> on 10/22/10.
// Copyright 2010 Results Direct. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
//... |
# coding=utf-8
import pytest
import logging
from data_packer import checker
from data_packer import err
from data_packer.err import DataPackerCheckError
from _common import verify
log = logging.getLogger()
class TestIPChecker:
"""
testcase, see also: https://en.wikipedia.org/wiki/Module:IPAddress/testcases
... |
package com.createchance.imageeditor.transitions;
import com.createchance.imageeditor.drawers.RadialTransDrawer;
/**
* Radial transition.
*
* @author createchance
* @date 2019/1/1
*/
public class RadialTransition extends AbstractTransition {
private static final String TAG = "RadialTransition";
private... |
def reverseBitwiseAnd(result: int) -> int:
return result | 0xffffff00 # Performing bitwise OR with 0xffffff00 to set the higher 24 bits to 1, effectively reversing the original bitwise AND operation |
<reponame>modax/ssh-vault<gh_stars>100-1000
package sshvault
import "bytes"
// Encode return base64 string with line break every 64 chars
func (v *vault) Encode(b string, n int) []byte {
a := []rune(b)
var buffer bytes.Buffer
for i, r := range a {
buffer.WriteRune(r)
if i > 0 && (i+1)%64 == 0 {
buffer.Write... |
class EnrichedAirCalculator {
func bestBlend(for depth: Int, fractionOxygen: Double) throws -> String {
guard depth >= 0 else {
throw EnrichedAirCalculationError.invalidDepth
}
guard fractionOxygen >= 0 && fractionOxygen <= 1 else {
throw EnrichedAirCalculati... |
git config --global user.email "victor.alveflo@gmail.com"
git config --global user.name "Travis CI"
cd app
rm -rf .git
cd _site
git init
git add --all
git commit -m "Travis CI deploy (Build $TRAVIS_BUILD_NUMBER)"
git push --force https://${TOKEN}@github.com/alveflo/alveflo.github.io.git master |
#!/bin/bash
# Copyright Istio 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 by applicable law or agreed to in ... |
/*
* Copyright 2019 Wultra s.r.o.
*
* 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... |
import React from 'react'
import {Link, withRouter} from 'react-router-dom'
import {connect} from 'react-redux'
const mapState = (state, ownProps) => {
return {
isLoggedIn: !!state.user.id,
...ownProps
}
}
// AuthLink: works just like a Link, only it's smarter about
// the logged in user. Only logged in u... |
package version
import (
"fmt"
"runtime"
)
var (
// GitVersion returns the git version
GitVersion = "UNKNOWN"
// BuildDate returns the build date
BuildDate = "UNKNOWN"
// GitCommit returns the short sha from git
GitCommit = "UNKNOWN"
)
// version returns information about the release.
func Version() string {... |
#!/bin/bash
## output usage
usage () {
echo "usage: github-events [-h]"
echo " or: github-events"
echo " or: github-events <user|org>"
echo " or: github-events <user|org>/<repo> [-n|--network] [-o|--org]"
return 0
}
## main
github_events () {
return 0
}
## export
if [[ ${BASH_SOURCE[0]} != $0 ]]; t... |
<reponame>Garciaj007/AEngine
#pragma once
class Window
{
public:
Window();
~Window();
Window(const Window&) = delete;
Window(Window&&) = delete;
Window& operator=(const Window&) = delete;
Window& operator=(Window&&) = delete;
// ====================================================
bool Create(std::string, s... |
class ReadmeModel:
def __init__(self,
project_name: str =None,
version: str =None,
description: str=None,
snap_store_name: str=None,
icon_src: str=None,
screenshot_src: dict=None,
author: str=None,... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_emoji_emotions = void 0;
var ic_emoji_emotions = {
"viewBox": "0 0 24 24",
"children": [{
"name": "g",
"attribs": {},
"children": [{
"name": "rect",
"attribs": {
"fill": "none",
"height... |
import { interfaces } from 'inversify';
import { Component } from './component';
export const Rpc = (id: interfaces.ServiceIdentifier<any>) => Component({ id, rpc: true, proxy: true });
|
export * from './favorite-dish.model';
export * from './dish.model';
export * from './dish-rating.model';
|
<reponame>mighteejim/manager<gh_stars>0
import React, { PropTypes } from 'react';
import SecondaryButton from './SecondaryButton';
export default function CancelButton(props) {
return (
<SecondaryButton {...props} >
{props.children}
</SecondaryButton>
);
}
CancelButton.propTypes = {
children: Pro... |
/**
* 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.
*/
#include "ProxyBase.h"
#include "mcrouter/CarbonRouterInstanceBase.h"
#include "mcrouter/config-impl.h"
#include "mcrouter/config.... |
#!/bin/sh
#
#Copyright (c) 2021, Oracle and/or its affiliates.
#
#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
#
if type dnf > /dev/null 2>&1; then
echo packageManager=DNF
elif type yum > /dev/null 2>&1; then
echo packageManager=YUM
elif type microdnf > /de... |
<filename>dyno-core/src/main/java/com/netflix/dyno/connectionpool/DecoratingFuture.java<gh_stars>0
package com.netflix.dyno.connectionpool;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
public cla... |
#!/bin/bash
# Load Exp Settings
source exp_setting.sh
# Remove previous files
echo $exp_path
# Search Universal Perturbation and build datasets
cd ../../../../
pwd
rm -rf $exp_path
python3 perturbation.py --config_path $config_path \
--exp_name $exp_path ... |
from collections import deque
tasks = deque()
def add_task(name):
tasks.appendleft(name)
def remove_task(index):
tasks.pop(index)
def list_tasks():
for task in tasks:
print("- {}".format(task)) |
import * as core from '../../core';
import generateBlurVertSource from './generateBlurVertSource';
import generateBlurFragSource from './generateBlurFragSource';
import getMaxBlurKernelSize from './getMaxBlurKernelSize';
/**
* The BlurYFilter applies a horizontal Gaussian blur to an object.
*
* @class
* @extends P... |
package org.pantsbuild.testproject.dummies;
import org.junit.Test;
public class PassingTest {
@Test
public void testPass1() {
// used in JunitTestsIntegrationTest#test_junit_test_suppress_output_flag
System.out.println("Hello from test1!");
}
@Test
public void testPass2() {
// used in JunitTest... |
#!/bin/bash
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
F1=${LOCAL_TEST_DIR}/test_global_modules_cfg.py
F2=${LOCAL_TEST_DIR}/test_stream_modules_cfg.py
F3=${LOCAL_TEST_DIR}/test_one_modules_cfg.py
(cmsRun $F1 ) || die "Failure using $F1" $?
(cmsRun $F2 ) || die "Failure using $F2" $?
(cm... |
package rawhttp.core.body.encoding;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent... |
<gh_stars>0
// 1º exercício
console.log('=============== 1º exercício ===============')
function checaIdade(idade) {
return new Promise((resolve, reject) => {
setTimeout(() => {
if (idade > 18) {
resolve("Maior de 18");
} else {
reject("Menor de 18");
}
}, 2000);
});
}
ch... |
#!/usr/bin/env bash
set -e
# TODO: Set to URL of git repo.
PROJECT_GIT_URL='git@github.com:MrNtlu/DjangoBackend.git'
PROJECT_BASE_PATH='/usr/local/apps/profiles-rest-api'
echo "Installing dependencies..."
apt-get update
apt-get install -y python3-dev python3-venv sqlite python-pip supervisor nginx git
# Create pro... |
<gh_stars>1-10
import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);
import InitCom from '@/components/InitCom.vue'
import User from '@/components/User.vue'
import UserProfile from '@/components/UserProfile.vue'
import UserPosts from '@/components/UserPosts.vue'
const routes = [
{
pat... |
#!/bin/bash
# Should be launched by cron (every nights)
# How to use : /path/to/scripts/clonescheduled.sh /path/to/v_env
if [ "$1" == "" ]
then
echo "ERROR : Virtualenv path is required"
exit 1
else
V_ENV_PATH=$1
fi
source "$V_ENV_PATH"/bin/activate
cd "$(dirname "$0")/.."
python manage.py clonescheduled --s... |
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-N-VB/model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-N-VB/512+0+512-SS-N-VB-1 --do_eval --per_device_eval_bat... |
<reponame>alinz/baker.go
package docker
import (
"encoding/json"
"fmt"
"strconv"
"github.com/alinz/baker.go"
)
type Watcher struct {
unixClient Client
remoteClient Client
closed chan struct{}
}
var _ baker.Watcher = (*Watcher)(nil)
func (w *Watcher) load(id string) (*Container, error) {
r, err := w... |
if [[ -z ${dontAddGeobacterRustFlags-} ]]; then
export RUSTFLAGS="-Z always-encode-mir -Z always-emit-metadata ${RUSTFLAGS-}";
fi
# Fix 'failed to open: /homeless-shelter/.cargo/.package-cache' in rust 1.36.
if [[ -z ${IN_NIX_SHELL-} && -z ${CARGO_HOME-} ]]; then
export CARGO_HOME=$TMPDIR
fi
|
#!/bin/sh
# Install libdb4.8 (Berkeley DB).
export LC_ALL=C
set -e
if [ -z "${1}" ]; then
echo "Usage: $0 <base-dir> [<extra-bdb-configure-flag> ...]"
echo
echo "Must specify a single argument: the directory in which db4 will be built."
echo "This is probably \`pwd\` if you're at the root of the luckcoin rep... |
<filename>docs/cvs/structdroid_1_1_runtime_1_1_utilities_1_1_structs_1_1_points_1_1_string_point.js
var structdroid_1_1_runtime_1_1_utilities_1_1_structs_1_1_points_1_1_string_point =
[
[ "StringPoint", "structdroid_1_1_runtime_1_1_utilities_1_1_structs_1_1_points_1_1_string_point.html#a96a7181c78880ed81f3dca9e22b9... |
import threading
def execute_build_tasks(tasks):
results = []
# Function to execute a build task and append the result to the results list
def execute_task(task):
result = task() # Execute the build task
results.append(result) # Append the result to the results list
threads = [] # ... |
#!/usr/bin/env bash
Describe "node src/get-workspaces.sh" get-workspaces
It "should return empty string if insufficient argument is given"
When run command node "./src/get-workspaces.js"
The output should equal ''
The status should equal 1
End
It "should return the error status indicating the module... |
var MAX_WEIGHT = 100;
var MAX_RADIUS = 50;
var weightMutation = d3.random.normal(0, C.WEIGHT_MUTATION_CONSTANT);
var radiusMutation = d3.random.normal(0, C.RADIUS_MUTATION_CONSTANT);
var colorMutation = d3.random.normal(0, C.COLOR_MUTATION_CONSTANT);
function bound(x, a, b) {
if (x < a) return a;
if (x > b) return ... |
<filename>src/configuration/Model.ts
import { keypair } from "@o1labs/client-sdk";
export interface PaymentConfiguration {
commissionRate: number
stakingPoolPublicKey: string,
payoutMemo: string,
payorSendTransactionFee : number,
senderKeys: keypair,
minimumConfirmations : number,
minimumHe... |
/**
* Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.analytics.financial.model.volatility.surface;
import org.apache.commons.lang.Validate;
/**
* This is defined as strike/forward
*/
public class Moneyness im... |
package com.ricky.project.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import or... |
<gh_stars>0
package com.winterbe.java8.samples.stream.optional;
import com.winterbe.java8.samples.stream.optional.exceptions.PersonNotFoundException;
import java.util.ArrayList;
import java.util.List;
public class OptionalOrElseThrow {
public static String getPersonById(List<Person> persons, Long personId) throw... |
<gh_stars>1-10
const LoadingBlock = () => <div style={{ height: "256px" }}></div>;
export default LoadingBlock;
|
#include <iostream>
using namespace std;
int main()
{
int sum = 0;
int nums[] = {2, 5, 9, 3};
int n = sizeof(nums)/sizeof(nums[0]);
// Iterate through all elements of nums
// and add the element to sum
for (int i=0; i<n; i++)
sum += nums[i];
cout << "Sum = " << sum;... |
import java.util.List;
public class UserRepositoryImpl implements UserRepository {
private UserDataDAO userDataDAO; // Assume the existence of a UserDataDAO for data access
public UserRepositoryImpl(UserDataDAO userDataDAO) {
this.userDataDAO = userDataDAO;
}
// Implement the count method to ... |
import os
from tensorflow_asr.augmentations.augments import Augmentation
from tensorflow_asr.featurizers.speech_featurizers import read_raw_audio
from tensorflow_asr.configs.config import Config
def process_audio_data(audio_path, augmentation_type, config_path):
os.environ["CUDA_VISIBLE_DEVICES"] = "-1" # Set CUD... |
#!/bin/bash
# This script will install the latest version of MongoDB
# Check if MongoDB is installed
if which mongod >/dev/null; then
echo "MongoDB is already installed!"
exit 0
fi
# OS detection
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
# Determine which Linux distribution we are running
... |
const axios = require('axios');
class StatusTracker {
/**
* @typedef StatusTrackerOpts
* @property {boolean} userInitialized
* @property {IThimbleBot} client
*/
/**
* @constructor
* @param {StatusTrackerOpts} opts
*/
constructor(opts) {
this.config = opts.client.config.custom && opts.cli... |
<filename>dubbo-afi/src/main/java/com/zebra/net/NIOClient.java<gh_stars>0
package com.zebra.net;
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.SocketChannel;
import java.util.... |
package com.qweex.openbooklikes.fragment;
import android.app.Activity;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.PorterDuff;
import android.net.Uri;
import android.os.Bundle;
import android.su... |
<reponame>muddessir/framework<filename>machine/qemu/sources/u-boot/test/py/tests/test_ofplatdata.py
# SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2016 Google, Inc
import pytest
import u_boot_utils as util
@pytest.mark.boardspec('sandbox')
@pytest.mark.buildconfigspec('spl_of_platdata')
def test_spl_devicetree(u... |
export * from './buildQueryURL'
export * from './buildRepositoryURL'
export * from './defaultEndpoint'
export * as predicate from './predicate'
export * as cookie from './cookie'
export * from './types'
export * as Response from './types-response'
|
public static void sortAscending(int[] array) {
int temp;
for (int i = 0; i < array.length; i++) {
for (int j = i; j < array.length; j++) {
if (array[j] < array[i]) {
temp = array[i];
array[i] = array[j];
array[j] = temp;
}
... |
<gh_stars>0
package org.adligo.models.core.shared;
import org.adligo.models.core.shared.util.VersionedValidator;
import org.adligo.models.core.shared.util.VersionValidator;
public class OrgVersionedMutant extends OrgMutant implements I_OrgVersionedMutant {
private Integer version;
public OrgVersionedMutant() {
... |
#!/bin/bash
sudo apt-get update
sudo apt-get install -y \
bison \
ccache \
cmake \
curl \
flex \
git-core \
gcc \
g++ \
inetutils-ping \
krb5-kdc \
krb5-admin-server \
libapr1-dev \
libbz2-dev \
libcurl4-gnutls-dev \
libevent-dev \
libkrb5-dev \
libpam-dev \
libperl-dev \
libreadline-dev \
libssl-d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.