text stringlengths 1 1.05M |
|---|
<reponame>nebulatgs/cli
package ui
import (
"errors"
"fmt"
"reflect"
"sort"
"strings"
"github.com/manifoldco/promptui"
"github.com/railwayapp/cli/entity"
)
type Prompt string
type Selection string
const (
InitNew Selection = "Empty Project"
InitFromTemplate Selection = "Starter Template"
)
func P... |
string = "This is a sample string!";
for (let i=0; i<string.length; i++){
if (string[i].valueOf() === '!') {
string = string.replace("!", "");
}
}
console.log(string); |
#!/bin/bash
set -e
readonly NAMESPACE=${1}
readonly ITERATION=${2}
readonly TMP_FOLDER=${3}
output_dir=$4
readonly GIT_URL=https://github.com/eclipse/che.git
readonly WORK_GIT_DIR=/data/repo
echo "NAMESPACE: ${NAMESPACE}"
echo "ITERATION: ${ITERATION}"
echo "TMP_FOLDER: ${TMP_FOLDER}"
echo "output_dir: ${output_di... |
#! /bin/sh
if [ -n "$PBS_JOBNAME" ]
then
source "${PBS_O_HOME}/.bash_profile"
cd "$PBS_O_WORKDIR"
module load gcc/5.3.0
fi
prefix=../../data/genomes/msg/ecoevolity-output/run-6-
ecoevolity --seed 732264873 --prefix "$prefix" --relax-missing-sites --relax-constant-sites --relax-triallelic-sites ../../data... |
exports.up = function(knex) {
return knex.schema.createTable('cards', table => {
table.integer('base_link')
table.increments('code').primary()
table.integer('deck_limit')
table.text('faction_code')
table.integer('faction_cost')
table.text('flavor')
table.text... |
#!/bin/bash
LIBS="${LDFLAGS}" make CC="${CC}" CXX="${CXX}" multi
mkdir -p $PREFIX/bin
cp bwa-mem2* $PREFIX/bin
|
def is_divisible_by_5_and_7(num):
if (num % 5 == 0 and num % 7 == 0):
return True
else:
return False
print(is_divisible_by_5_and_7(50)) |
<reponame>mtwilliams/vigilant
require File.expand_path "../helpers", __FILE__
context "Vigilant Test Generation" do
setup do
@path = File.join(File.dirname(__FILE__), "fixtures")
@generator = Vigilant.new(@path)
@generator.generate_tests
end
test "can parse tests" do
assert_equal 1, @generator.n... |
package sri.mobile.examples.uiexplorer.components
import org.scalajs.dom
import sri.core._
import sri.universal.apis.{Layout, LayoutAnimation, LayoutEvent}
import sri.universal.components._
import sri.universal.styles.InlineStyleSheetUniversal
import scala.scalajs.js
import scala.scalajs.js.{JSON, undefined, UndefOr ... |
#!/bin/bash
set -euo pipefail
: ${TOKEN:?}
: ${COLUMN_ID:?}
: ${BRANCH:?}
: ${DESCRIPTION:?}
curl \
-X POST \
-H "Accept: application/vnd.github.inertia-preview+json" \
-H "Authorization: token $TOKEN" \
https://api.github.com/projects/columns/$COLUMN_ID/cards \
-d @- << EOF 2>/dev/null | jq -r '.url'
{
... |
import org.testng.ITestResult;
import org.testng.Reporter;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
public class ExtendReportsClass {
@Test
public void exampleTest() {
// TestNG test method implementation
}
@AfterMethod
public void generateCustomRepor... |
<gh_stars>1-10
from fbchat import Client
from fbchat.models import *
# Change this to your group id
old_thread_id = "1234567890"
# Change these to match your liking
old_color = ThreadColor.MESSENGER_BLUE
old_emoji = "👍"
old_title = "Old group chat name"
old_nicknames = {
"12345678901": "User nr. 1's nickname",
... |
#!/usr/bin/env bash
# -ethi 8 ; default intensity, lower for OS rendering
# -erate ; submit hashrate
# -r 1 ; restart on failure
# -tt 1 ; only show temp and fan speed; dop not manage; not possible on linux with nvidia gpu
# -tstop 89 ; stop mining on this temp
# -fanmax 70 ;fan max speed; does not work on linux nvidi... |
#!/bin/bash
NODE_CONFIG_JSON="/root/nodeconfig.json"
DEFAULT_CAPABILITIES_JSON="/root/defaultcapabilities.json"
APPIUM_LOG="/var/log/appium.log"
CMD="xvfb-run appium --log $APPIUM_LOG"
if [ ! -z "${SALT_MASTER}" ]; then
echo "[INIT] ENV SALT_MASTER it not empty, salt-minion will be prepared"
echo "master: ${S... |
"""
Create an HTML table containing rows 1 to 10, each cell being a multiple of the row number.
"""
print("<table>")
for i in range(1, 11):
print("<tr>")
for j in range(1, 11):
print("<td>" + str(i * j) + "</td>")
print("</tr>")
print("</table>") |
<reponame>ownrecipes/ownrecipes-web<gh_stars>0
import IngredientGroups from '../components/IngredientGroups';
import createComponentWithIntlAndRouter from '../../test/createComponentWithIntlAndRouter';
import data from './data';
import { PendingState } from '../../common/store/GenericReducerType';
test('Ingredient Gr... |
<reponame>mevoly/-
// pages/order/index.js
import{ request } from "../../request/index.js";
import regeneratorRuntime from '../../lib/runtime/runtime';
Page({
data: {
orders:[],
tabs:[
{
id:0,
value:"全部",
isActive:true
},
{
id:1,
value:"待付款",
is... |
package com.ulfy.master.application.vm;
import com.ulfy.android.mvvm.IView;
import com.ulfy.android.task.LoadDataUiTask;
import com.ulfy.android.task.LoadListPageUiTask;
import com.ulfy.android.utils.LogUtils;
import com.ulfy.master.application.base.BaseVM;
import com.ulfy.master.ui.view.TaskView;
import java.util.Ar... |
class ShoppingCart {
constructor() {
this.productList = {};
this.quantityList = [];
this.totalPrice = 0;
}
addItems(productItems) {
for (const item of productItems) {
if (this.productList.hasOwnProperty(item)) {
const existingProduct = this.productList[item];
const newProduct = Object.assign({quantity: exi... |
package org.insightcentre.nlp.saffron.data;
import java.util.HashSet;
import java.util.Set;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import ... |
// 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
// distributed unde... |
<reponame>uk-gov-mirror/alphagov.support-api
class ContentItemEnrichmentWorker
include Sidekiq::Worker
def perform(problem_report_id)
problem_report = ProblemReport.find(problem_report_id)
path = URI(problem_report.path).path # normalise the path before looking it up
problem_report.content_item = fetch... |
#!/bin/bash
create_network() {
export NETWORK_NAME="${1}"
envsubst <"./templates/network.xml" >"./templates/network_tmp.xml"
if [ -z "$(virsh net-info "${NETWORK_NAME}")" ]; then
# Network not found, create network NETWORK_NAME
virsh net-create --file ./templates/network_tmp.xml
ech... |
#!/usr/bin/env bash
set -eo pipefail
UNAME=$(command -v uname)
SORT=$(command -v sort)
GREP=$(command -v grep)
CUT=$(command -v cut)
WC=$(command -v wc)
TR=$(command -v tr)
if [ "" = "${CHECK}" ] || [ "0" = "${CHECK}" ]; then
if [ "" = "${CHECK_DNN_MB}" ]; then CHECK_DNN_MB=64; fi
if [ "" = "${CHECK_DNN_ITERS}" ]... |
# 動詞の原形をすべて抽出せよ.
require_relative '30'
res = NEKO_MORPHS_LIST.map do |morphs|
morphs
.select { |morph| morph[:pos] == '動詞' }
.map { |morph| morph[:base] }
end.flatten
p res.first(20)
File.open(File.expand_path('../output/32.txt', __dir__), 'w') { |f| f.puts res }
|
#!/bin/bash
eeyoreFile="./MiniC_to_Eeyore/eeyore"
optimizeFile="./optimization/optimize"
tiggerFile="./Eeyore_to_Tigger/tigger"
riscv32File="./Tigger_to_RISCV32/riscv32"
optimize_flag=0
minic_file=""
output_file=""
if [ ! -f "$eeyoreFile" ]; then
cd ./MiniC_to_Eeyore/
make
cd ..
fi
if [ ! -f "$optimizeFile" ]; the... |
#!/bin/bash
#SBATCH -J Act_swish_1
#SBATCH --mail-user=eger@ukp.informatik.tu-darmstadt.de
#SBATCH --mail-type=FAIL
#SBATCH -e /work/scratch/se55gyhe/log/output.err.%j
#SBATCH -o /work/scratch/se55gyhe/log/output.out.%j
#SBATCH -n 1 # Number of cores
#SBATCH --mem-per-cpu=6000
#SBATCH -t 23:59:00 # Hours, minutes an... |
<filename>Card.java
import java.util.Random;
/**
* @author <NAME>
* TODO:
* 1. Declare and initiliaze list of suits in arrays
* 2. Declare and initiliaze list of ranks in arrays
* 3. Declare and initiliaze list of card values in arrays
* 4. Shuffle deck of cards
* 5. Remove first card in deck
*/
public class Ca... |
<filename>resources/js/store/getters.js
let getters = {
newEvent: state => {
return state.newEvent;
},
datesArr: state => {
return state.datesArr;
},
eventList: state => {
return state.eventList;
},
calendarDate: state => {
return state.calendarDate;
}
}
export default getters; |
#!/usr/bin/env bash
help(){
echo "SciELO Usage COUNTER - Batch script Parse Log"
echo "Please, inform:"
echo " 1. The file MMDB (parameter -m)"
echo " 2. The file robots (parameter -r)"
echo " 3. The output directory (parameter -o)"
echo " 4. The list of files paths (parameter -f)"
echo ""
echo "For exa... |
# Add .js and .css files to the page
<head>
<meta charset="utf-8">
<title>My Webpage</title>
<!-- Add .js and .css files to the page -->
<link rel="stylesheet" href="styles.css">
<script src="script1.js"></script>
<script src="script2.js"></script>
</head>
# Compress images
<body>
<!-- Compress images -->
<img... |
#!/usr/bin/env bash
CUDA_VISIBLE_DEVICES=3 taskset -c 0-2 python main.py --policy PytorchSAC --env dm.walker.run --start_timesteps 5000 --hidden_dim 1024 --batch_size 1024 --n_hidden 2 --lr 1e-4 --network_class FourierMLP --concatenate_fourier --train_B --sigma 0.001 --fourier_dim 1024 --seed 10 --max_timesteps 100000... |
#!/bin/bash
set -xe
SCRIPTDIR=$(readlink -f $(dirname $0))
# TODO : This should be removed once PATH contains sbin
# https://review.openstack.org/#/c/91655/
export PATH=$PATH:/usr/local/sbin:/usr/sbin
sudo useradd -U -s /bin/bash -d /opt/stack/new -m stack || true
sudo useradd -U -s /bin/bash -m tempest || tru... |
<filename>parquet-hive/parquet-hive-storage-handler/src/test/java/parquet/hive/TestMapredParquetOuputFormat.java
/**
* Copyright 2013 Criteo.
*
* 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... |
/******************************************************************************
* Copyright 2011 Kitware Inc.
*
* 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.... |
<filename>angular/src/app/service/blog.service.ts<gh_stars>0
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { CommonResponse } from '../util/response/commonResponse';
import { HttpLocation } from '../util/httpLocation';
@Injectable({
providedIn: 'root'
})
export... |
<reponame>twipixel/pixi
'use strict';
describe('PIXI.Point', function ()
{
it('should create a new point', function ()
{
const pt = new PIXI.Point();
expect(pt.x).to.equal(0);
expect(pt.y).to.equal(0);
});
it('should clone a new point', function ()
{
const p1 = new... |
<reponame>MrBattary/ncstore-back<filename>src/main/java/com/netcracker/ncstore/dto/OrderGetDTO.java<gh_stars>0
package com.netcracker.ncstore.dto;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.UUID;
@AllArgsConstructor
@Getter
public class OrderGetDTO {
private final UUID orderId;
... |
#!/bin/bash
set -e
curl http://localhost:8060/$1/photo
|
#!/bin/bash
CVM_HOME=$(pwd)
log(){
printf "$1\n"
}
main(){
log "Dependency grab started on $(date +"%x %I:%M %p").";
if [[ ! -f "$CVM_HOME/setup.exe" ]];then log "Please copy the Cygwin setup file to $CVM_HOME/setup.exe before running this script.";else
$CVM_HOME/setup.exe -X -q -W -P libvncserver-devel,l... |
/**
* ngTable: Table + Angular JS
*
* @author <NAME> <<EMAIL>>
* @url https://github.com/esvit/ng-table/
* @license New BSD License <http://creativecommons.org/licenses/BSD/>
*/
import angular from 'angular';
ngTableFilterConfigProvider.$inject = [];
function ngTableFilterConfigProvider(){
var config;
... |
/*
* @Description:
* @Author: jumbo
* @Date: 2021-11-03 10:28:15
* @LastEditors: jumbo
* @LastEditTime: 2021-11-03 12:09:25
*/
import { requireEnv } from '@app/core';
import { Injectable } from '@nestjs/common';
const SERVE_ENV = requireEnv('SERVE_ENV');
@Injectable()
export class LoggerService {
log(index: str... |
#!/bin/bash
pred_src=data_pred/pred_src
pred_res=data_pred/pred_res
cat labeling/unlabeled/data_cln.tsv | sort -R | head -1000 > $pred_src
python 5_Pred.py $pred_src | sort -t$'\t' -k1,1gr > $pred_res
cat $pred_res | awk -F'\t' '{if($1>0.4 && $1<0.6) print $2}' > labeling/unlabeled/iter2_boundary
|
#!/bin/sh -x
. /etc/sysconfig/heat-params
echo "configuring kubernetes (minion)"
_prefix=${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/}
_addtl_mounts=''
if [ "$NETWORK_DRIVER" = "calico" ]; then
mkdir -p /opt/cni
_addtl_mounts=',{"type":"bind","source":"/opt/cni","destination":"/opt/cni","options":["... |
#!/bin/bash
cd /metacat
export METACAT_SERVER_CFG=/config/config.yaml
export PYTHONPATH=/metacat/product/server:/metacat/product/lib:/metacat/wsdbtools
httpd
while true; do
sleep 1
done
|
<reponame>tizenorg/platform.core.pim.contacts-service
/*
* Contacts Service
*
* Copyright (c) 2010 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
*
* Contact: <NAME> <<EMAIL>>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the... |
<filename>src/main/java/malte0811/controlengineering/blocks/placement/HorizontalStructurePlacement.java
package malte0811.controlengineering.blocks.placement;
import blusunrize.immersiveengineering.api.utils.DirectionUtils;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import com.... |
echo -e "\n\t **** buiding k8s-client-python latest image *********** \n\t"
docker build -t k8s-client-python .
echo -e "\n\t **** buiding k8s-client-python latest image *********** \n\t"
docker build -t k8s-client-python:stable .
#docker build -t amitbachar/k8s-client-python .
|
#!/bin/sh
mkdir -p rawnetworkmodels/REPLACEME-networkmodel
seriationct-build-clustered-network.py --experiment REPLACEME --outputdirectory rawnetworkmodels/REPLACEME-networkmodel --numclusters 3 --slices 5 --nodespercluster 10 --interconnectfraction 0.2 --centroidmin 100 --centroidmax 1000 --clusterspread 10 --interc... |
#include <unistd.h>
class User {
public:
User(const char* username) {
// Implementation to initialize user based on username
}
bool operator bool() const {
// Implementation to check if user exists
}
uid_t uid() const {
// Implementation to retrieve user ID
}
gid_... |
<gh_stars>1-10
package webapp.controller.more;
import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.extend.cors.annotation.CrossOrigin;
/**
* @author noear 2021/5/22 created
*/
@Mapping("/demo2/cross")
@CrossOrigin(origins = "*")
@Controller
public class Cr... |
#!/bin/bash
# LinuxGSM mods_list.sh module
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Lists and defines available mods for LinuxGSM supported servers; works along with mods_core.sh.
# Usage: To add a mod, you need to add an array variable following ... |
python3 run.py --data_dir ../data/ --output_path ./output/ --target "virginica" --criterion "entropy" --max_depth None --min_samples_split 2
|
package com.common.base.dialog;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.common.R;
import com.common.R2;
import androidx.annotation.NonNull;
import androidx.... |
# -*- coding: utf-8 -*-
"""
Created on Tue Aug 6 16:42:29 2019
@author: tslin
"""
from pyparsing import Literal,Word, White, alphas, nestedExpr, quotedString, cStyleComment, alphanums, nums, StringStart, StringEnd
class SmilesPattern:
def __init__(self):
pass
def addRawStr(... |
#!/bin/bash
#root privileges are needed
cd /var/log
cat /dev/null > messages
cat /dev/null > wtmp
echo "Лог-файлы очищены."
|
def celsius_to_fahrenheit(celsius):
return (celsius * 1.8) + 32 |
<filename>SQL/HowToSQL.sql
/* List of best-selling games
* from the Microsoft Store
*/
-- Create
CREATE TABLE IF NOT EXISTS Games (
GameID INTEGER PRIMARY KEY AUTOINCREMENT,
Name TEXT NOT NULL,
Ratings INTEGER,
Price REAL DEFAULT 0
);
CREATE TABLE IF NOT EXISTS Reviews (
ReviewID INTEGER PRIMARY ... |
package org.softuni.residentevil.service;
import org.modelmapper.ModelMapper;
import org.softuni.residentevil.domain.api.Bindable;
import org.softuni.residentevil.domain.api.Identifiable;
import org.softuni.residentevil.domain.api.Viewable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.sprin... |
import itertools
d = dict(itertools.izip(the_keys, the_values))
|
<filename>radiaTest-server/server/schema/framework.py
from typing import Optional
from pydantic import BaseModel, validator
from pydantic.networks import HttpUrl
from server.schema.base import PermissionBase
from server.schema import PermissionType
class FrameworkBase(PermissionBase):
name: str
url: HttpUrl
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_5k = void 0;
var ic_5k = {
"viewBox": "0 0 24 24",
"children": [{
"name": "path",
"attribs": {
"d": "M0 0h24v24H0V0z",
"fill": "none"
},
"children": []
}, {
"name": "path",
"attribs": {
... |
#!/bin/bash
while true; do
sleep 1m
su debian-spamd -c 'sa-update' && kill -HUP `cat /var/run/spamd.pid`
sleep 1d
done
|
/**
* Copyright 2021 The IcecaneDB Authors. 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
# Copyright 2015 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
HOST_BUILD_DIR=${WORK_DIR}/build_host
HOST_INSTALL_DIR=${WORK_DIR}/install_host
export ac_cv_func_getrlimit=no
export EXTRA_AM_CPPFLAGS="-Dmain=nacl_ma... |
import React from 'react';
import selectedReducer from '../reducers';
import types from '../../SmartComponents/modules/types';
import fixtures from './reducer.fixtures';
import { ServerIcon } from '@patternfly/react-icons';
import DriftTooltip from '../../SmartComponents/DriftTooltip/DriftTooltip';
describe('compare r... |
#!/bin/bash -x
# -e " Exit immediately if a command exits with a non-zero status.
# -x Print commands and their arguments as they are executed.
: ${BASE_URL:=https://127.0.0.1}
: ${USERNAME_CLI:=admin@example.com}
: ${PASSWORD_CLI:=cloudbreak}
: ${CLI_TEST_FILES:=spec/integration/*.rb}
: ${CLUSTER_DEFINITION_URL:? re... |
#!/bin/sh
export LD_LIBRARY_PATH=/usr/local/lib
# Start the DI tool.
/cvdi-stream-build/ppm -m /ppm_data/road_file.csv -c /ppm_data/${PPM_CONFIG_FILE} -b ${DOCKER_HOST_IP}:9092
|
import Web3 from "web3";
export default new Web3(Web3.givenProvider || new Web3.providers.HttpProvider('https://rinkeby.infura.io/')); |
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
SOURCEPATH="${SCRIPTPATH}/../../.lib/conf.sh"
BINARY="${SCRIPTPATH}/../../../bin/pwncat"
# shellcheck disable=SC1090
source "${SOURCEPATH}"
# ------------------------------------------------------------... |
pyscenic grn \
./Data/DC_exp.csv \
./Data/hs_hgnc_curated_tfs.txt \
--num_workers 8 \
-o ./Data/exp_matrix.adjacencies.tsv
|
/*
* File: NameSurfer.java
* ---------------------
* When it is finished, this program will implements the viewer for
* the baby-name database described in the assignment handout.
*/
import acm.graphics.GCanvas;
import acm.program.*;
import javafx.scene.control.RadioButton;
import java.awt.Color;
import java.aw... |
class MediaEntity {
let displayUrl: String
let expandedUrl: String
let idStr: String
let indicies: [Int]
let mediaUrl: String
let mediaUrlHttps: String
let sizes: [String: Any]
let sourceStatusId: Int?
let sourceStatusIdStr: String?
init?(displayUrl: String, expandedUrl: String,... |
#!/bin/bash
set -euxo pipefail
# Start an agent using the testing account API key to send some data
docker run -d --name sysdig-agent --restart always --privileged --net host --pid host -e ACCESS_KEY=$PYTHON_SDC_TEST_ACCESS_KEY -e COLLECTOR=collector-staging.sysdigcloud.com -e SECURE=true -e TAGS= -v /var/run/docker.... |
package com.mounacheikhna.decor;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget... |
# Copyright 2016-present CERN – European Organization for Nuclear Research
#
# 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... |
package disgo
import (
"github.com/DisgoOrg/disgo/api"
"github.com/DisgoOrg/disgo/internal"
)
// New Initialises a new Disgo client
func New(token string, options api.Options) (api.Disgo, error) {
return internal.New(token, options)
}
// NewBuilder creates an api.DisgoBuilder for the client
func NewBuilder(token ... |
def gaussianElimination(eqtn):
# Create matrix
matrix = createMatrix(eqtn)
# Reduce matrix to reduced echelon form, keeping track of the transformation
transformationMatrix, reducedMatrix = reduceMatrix(matrix)
# Solve the system of linear equations
solutions = solveReducedMatrix(r... |
/**
* Created by ferdi on 06.02.17.
*/
package com.yahoo.ycsb.db; |
# Copyright 2022 The ML Fairness Gym 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 agree... |
/* Only the outmost loop can be parallelized
*/
#include "omp.h"
void foo()
{
int n = 100;
int m = 100;
double b[n][m];
int i;
int j;
#pragma omp parallel for private (i,j) firstprivate (n,m)
for (i = 0; i <= n - 1; i += 1) {
for (j = 0; j <= m - 1; j += 1) {
b[i][j] = b[i][j - 1];
}
}... |
const IRC = require('irc');
const Commands = require('./commands');
const { API, DB, Log } = require('./utility');
const FIVE_MINUTES = 5 * 60 * 1000;
const BOT_NAME = 'bbqbot';
const IRC_NET = 'irc.libera.chat';
const CHANNEL = '##bbq';
const IRC_OPTS = {
userName: BOT_NAME,
realName: 'BBQ Bot for r/BBQ: Low an... |
package kr.co.gardener.admin.service.forest.impl;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import kr.co.gardener.admin.dao.u... |
<reponame>yano3/chitanda-san-v2<gh_stars>1-10
require 'faraday'
require 'faraday_middleware'
module ChitandaSan
module SyoboiCalendar
module Connection
def get(uri, params = nil)
request(:get, uri, params)
end
def request(method, uri, params)
connection.send(method, uri, params... |
import cn.hutool.core.date.DateUtil;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
/**
* @author zs
*@date 2021/9/26.
*/
public class Test8 {
public static void main(String[] args) {
String r = DateUtil.parse("2021-10-10 20:01:01").toString("yyyy-MM-dd");
System.out.printl... |
#!/usr/bin/env bash
# Install location of UCSF Chimera
CHIMERA_HOME=/opt/UCSF/Chimera64-1.10.2
# Command location of UCSF Chimera
chimera=$CHIMERA_HOME/bin/chimera
# ligand preparation location of Autodock vina
prepare_ligand4=$CHIMERA_HOME/lib/python2.7/site-packages/AutoDockTools/Utilities24/prepare_ligand4.py
if (... |
<gh_stars>0
var structarmnn_1_1_abs_queue_descriptor =
[
[ "Validate", "structarmnn_1_1_abs_queue_descriptor.xhtml#a041e495449e22774a34d92b0904c10bf", null ]
]; |
#!/usr/bin/env bash
# Functions to interact with a container that includes the client caasp4
# binaries and terraform
_set_env_vars() {
JSON=$(skuba_container terraform output -json)
LB="$(echo "$JSON" | jq -r '.ip_load_balancer.value|to_entries|map(.value)|@tsv')"
export LB
MASTERS="$(echo "$JSON" |... |
const adder = (nums) => {
let sum = 0;
for (let i = 0; i < nums.length; i++) {
sum += nums[i];
}
return sum;
};
module.exports = adder; |
#!/bin/bash
for i in {0..3}
do
s=""
if [ $i -lt 3 ]
then
s=$i
fi
CMD="llvm-as aes/aes\_ac\_tx$s.ll";
echo $CMD;
eval $CMD;
CMD="clang++ -O3 aes/aes\_ac\_tx$s.bc -o aes/aes\_tx$s.exe";
echo $CMD;
eval $CMD;
done
if [ $1 != "none" ]
then
CMD="rsync -avz --exclude-from ~/Dropbox/rsy... |
#!/bin/bash -ex
[ -f MicrosoftJIRASSO6x7x.obr ] || wget https://download.microsoft.com/download/3/C/9/3C94C886-0C89-4182-A758-6DB982E1F398/MicrosoftJIRASSO6x7x.obr
if [ ! -f MicrosoftJIRASSO6x7x/MSSsoJiraPlugin-1.0.1.jar ]
then
mkdir -p MicrosoftJIRASSO6x7x
cd MicrosoftJIRASSO6x7x
jar xf ../MicrosoftJIRASSO6x7x... |
#!/bin/bash
LSDIR='/usr/local/lsws'
OWASP_DIR="${LSDIR}/conf/owasp"
RULE_FILE='modsec_includes.conf'
LS_HTTPD_CONF="${LSDIR}/conf/httpd_config.xml"
OLS_HTTPD_CONF="${LSDIR}/conf/httpd_config.conf"
EPACE=' '
echow(){
FLAG=${1}
shift
echo -e "\033[1m${EPACE}${FLAG}\033[0m${@}"
}
help_message(){
e... |
#!/bin/bash
# reference: wenet
# To be run from one directory above this script.
. ./path.sh
#
root=corpus/aishell1
text=corpus/aishell1/local/lm/text
lexicon=corpus/aishell1/local/dict/lexicon.txt
for f in "$text" "$lexicon"; do
[ ! -f $x ] && echo "$0: No such file $f" && exit 1;
done
# Check SRILM tools
if ! ... |
#!/usr/bin/env bash
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_DIR/variables.sh"
source "$CURRENT_DIR/helpers.sh"
source "$CURRENT_DIR/process_restore_helpers.sh"
source "$CURRENT_DIR/spinner_helpers.sh"
# delimiter
d=$'\t'
# Global variable.
# Used during the restore: if a pan... |
class Position2D {
constructor(x, y) {
this.x = x;
this.y = y;
}
distanceTo(otherPosition) {
let deltaX = otherPosition.x - this.x;
let deltaY = otherPosition.y - this.y;
return Math.sqrt((deltaX * deltaX) + (deltaY * deltaY));
}
} |
#!bin/bash
##Update data
Rscript R/update-data.R
##Update delays
Rscript R/update-delays.R
##Update Rt estimates
Rscript R/update-rt.R
##Update report
Rscript -e "rmarkdown::render('docs/index.Rmd')"
|
<gh_stars>1-10
import React, { Component } from 'react';
class MasterSwitch extends Component {
powerOn() {
fetch("http://" + window.location.hostname +":3000/api/control/" + this.props.deviceInfo._id + "/switch/" + 255);
}
powerOff() {
fetch("http://" + window.location.hostname +":3000... |
// Copyright 2017 The TIE Authors. 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/LICENSE-2.0
//
// Unless required by appl... |
# this must be SOURCE'd, not EXECUTED
# BS_HOME should be set globally
#export BS_HOME=/somewhere
export LUA_PATH="$BS_HOME/lua/share/lua/5.2/?.lua;$BS_HOME/lua/share/lua/5.2/?/init.lua;;"
export LUA_CPATH="$BS_HOME/lua/lib/lua/5.2/?.so;;"
|
#!/usr/bin/env bash
# Copyright 2020 The Knative 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.