text stringlengths 1 1.05M |
|---|
#!/bin/bash
#TODO:
# - fix all the hard-coding
STARTDIR=`pwd`
find $STARTDIR -iname '*.h' -type f -exec sed -i 's/\t/ /g' {} +
find $STARTDIR -iname '*.cpp' -type f -exec sed -i 's/\t/ /g' {} +
clang-format -i $STARTDIR/modules/*.cpp $STARTDIR/modules/*.h
clang-format -i $STARTDIR/examples/*/*.cpp
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Utils = /** @class */ (function () {
function Utils() {
}
Utils.prototype.isNoEmptyString = function (value) {
return typeof value === 'string' && value.length > 0;
};
return Utils;
}());
var utils = new Utils()... |
using System.Runtime.Serialization;
public class Processor
{
public string Name { get; set; }
[DataMember(Name = "NumberOfCores", Order = 2)]
public int NumberOfCores { get; set; }
[DataMember(Name = "NumberOfLogicalProcessors", Order = 3)]
public int NumberOfLogicalProcessors { get; set; }
... |
/*
* 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 License, Version 2.0
* (the "License"); you may ... |
/**
* Test Server for ajax-client
*
* npm run test-server
*
* @type {createApplication}
*/
const server = {
// Example class constructor definition
//Edit Class Name
TestServer: function(originalPort) {
var me = this;
const cookieParser = require('cookie-parser');
const express = require('exp... |
<filename>ciat-bim-cesium/src/main/java/org/jeecg/modules/bim/service/impl/BimModelAttrsServiceImpl.java
package org.jeecg.modules.bim.service.impl;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.bim.entity.BimModelAttrs;
import org.jeecg.modu... |
<reponame>779789571/gin-vue-admin<filename>server/collect/online/utils2.go
package online
import "strings"
func IsContain(items []string, item string) bool {
for _, eachItem := range items {
if eachItem == item {
return true
}
}
return false
}
//将规则内占位符生成可用规则
func ReplaceStringWithInfos(list []string, stri... |
class State:
def __init__(self, substance, T, P):
self.substance = substance
self.T = T
self.P = P
self.properties = {} # Placeholder for properties like u, v, s
def define(self):
# Implementation to define the properties of the state
# Return True if properties... |
#! /usr/bin/bash
masterhost="192.168.16.1"
masterport="9000"
masterredis="/root/lina/redis-4.0-deg/redis-test/redis-4.0.0-volatile/src"
slavehost="192.168.16.100"
slaveport="9000"
slaveredis="/root/lina/redis-4.0.0-volatile/src"
nvm_maxcapacity=20
master_nvm_dir="/mnt/pmem4"
nvm_threshold="64"
slave_nvm_dir="/mnt/p... |
jQuery(function($) {
$.ajaxSetup({
beforeSend: function(xhr, settings) {
xhr.setRequestHeader('X-CSRFToken', window.__csrf_token);
}
});
});
|
<reponame>zhoujiagen/learning-algorithms
/*
* TThread.java
*
* Created on January 3, 2007, 9:01 PM
*
* From "The Art of Multiprocessor Programming",
* by <NAME> and <NAME>.
*
* This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.
* http://i.creativecommons.org/l/by-... |
/*
* This file is part of the \BlueLaTeX project.
*
* 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 l... |
sumDigits : Int -> Int
sumDigits n =
if n <= 0 then
0
else
(rem n 10) + (sumDigits (quot n 10)) |
#!/bin/bash
CUDA_VISIBLE_DEVICES=2,3,4,5,6,7 PYTHONPATH=.. python3 ../examples/run_glue.py \
--task_name ssc \
--do_train \
--do_eval \
--do_lower_case \
--data_dir ~/data-eval \
--model_type bert \
--model_name_or_path bert-base-uncased \
--max_seq_length 512 \
--per_gpu_train_batch_size 128 \
--p... |
#!/bin/sh
unset IFS
set -euf
rm -f conanbuildinfo.cmake || :
rm -f graph_info.json || :
rm -f conan.lock || :
rm -f conanbuildinfo.txt || :
rm -f conaninfo.txt || :
|
<reponame>Nedson202/Harvard-arts
import { WithApolloClient } from 'react-apollo';
export interface IBackToTopState {
displayBackToTop: boolean;
}
export interface IPlacesProps {
center: {
lat: number;
lng: number;
};
zoom: number;
coordinates: any[];
}
export interface IPlaceIDObject {
parentPlac... |
import {
black,
blue,
green,
nameLabelCrop,
purple,
red,
subtitleFifthCrop,
subtitlePartialCrop,
yellow
} from '../constants';
import cv from 'opencv4nodejs';
import makeNameLabel from '../mainFunctions/makeNameLabel';
import { paintMat } from '../utils/utilityCv';
import subtitleFinder from './subti... |
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { environment } from '../../environments/environment';
import {
IGetNewsAuthorsResponse, IGetNewsResponse
} from '../core/news';
@Injectable({
providedIn: 'root'
})
export class NewsService {
//#region Lifecy... |
<filename>chest/base-utils/math/src/main/java/net/community/chest/math/functions/eval/PositionalArgumentPropertyAccessor.java<gh_stars>1-10
/*
*
*/
package net.community.chest.math.functions.eval;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import net.community.chest.resources.... |
<gh_stars>100-1000
import click
from virl.api import VIRLServer, ViewerPlugin, NoPluginError
from virl.cli.views import node_def_list_table
from virl.helpers import get_cml_client
@click.command()
@click.option("--node", default=None)
def ls(**kwargs):
"""
list all node definitions or the details of a specifi... |
def flatten(lst):
#Empty list to add the flatten items
flat_list = []
#Loop through the list items
for item in lst:
#If the item is a list, then call the flatten function recursively
if type(item) is list:
flat_list.extend(flatten(item))
# Else append the item to the list
else:
flat_... |
<gh_stars>10-100
/**
*
*/
package jframe.core.plugin;
/**
* 一组plugin的集合
* <p>
* <li>向plugin广播消息</li>
* <li>管理一组plugin</li>
* </p>
*
* @author dzh
* @date Sep 13, 2013 1:29:18 AM
* @since 1.0
*/
public interface PluginSession {
}
|
package org.prime.graphql.mutation;
import com.coxautodev.graphql.tools.GraphQLMutationResolver;
import graphql.GraphQLException;
import graphql.schema.DataFetchingEnvironment;
import org.prime.graphql.model.AuthData;
import org.prime.graphql.model.User;
import org.prime.graphql.repository.UserRepository;
import org.p... |
#!/usr/bin/env bash
#SBATCH --job-name=bdd_source_and_HP18k_remap_cityscapes_hist
#SBATCH -o gypsum/logs/%j_bdd_source_and_HP18k_remap_cityscapes_hist.txt
#SBATCH -e gypsum/errs/%j_bdd_source_and_HP18k_remap_cityscapes_hist.txt
#SBATCH -p 1080ti-long
#SBATCH --gres=gpu:4
#SBATCH --mem=100000
##SBATCH --cpus-per-task=4... |
<reponame>siyingpoof/main
package seedu.address.ui;
import java.util.Optional;
import org.junit.Rule;
import guitests.GuiRobot;
import guitests.guihandles.exceptions.NodeNotFoundException;
import javafx.scene.Node;
import seedu.address.ui.testutil.UiPartRule;
/**
* A GUI unit test class for DocX.
*/
public abstra... |
function largestObject(arrayOfObjects) {
let max = 0;
let maxObj;
for (let i = 0; i < arrayOfObjects.length; i++) {
if (arrayOfObjects[i].count >= max) {
max = arrayOfObjects[i].count;
maxObj = arrayOfObjects[i];
}
}
return maxObj;
} |
import java.io.PrintStream;
import java.util.List;
public class ListCommand extends Command {
private Library library;
public ListCommand(String listKinds, PrintStream printStream, Library library) {
super(listKinds, printStream);
this.library = library;
}
@Override
public void e... |
#!/bin/sh
python3 -m venv venv && venv/bin/pip install -U pip && venv/bin/pip install -r requirements-dev.txt
|
0=${(%):-%x}
@echo "=== ${0:t:r} ==="
autoload -Uz ${0:a:h}/functions/setup && setup
source $PRJ_HOME/antidote.zsh
repo="ohmyzsh/ohmyzsh"
antidote path $repo &>/dev/null
@test "'antidote path' fails when a bundle doesn't exist" $? -ne 0
expected="antidote: error: $repo does not exist in cloned paths"
actual=$(antid... |
package com.artist.web.bookstore;
import android.app.Application;
import com.artist.web.bookstore.network.ApiManager;
public class LaunchApplication extends Application {
public static ApiManager sApiManager;
@Override
public void onCreate() {
super.onCreate();
sApiManager = ApiManager.... |
#!/bin/bash
curdir=$pwd
mydir="${0%/*}"
cd $mydir
# TODO: add progress bar, -q is quite, if removing it the progress bar is in
# multiple lines
echo "downloading boost"
wget -q https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.gz
echo "unzipping boost"
tar xzvf boost_1_68_0.tar.gz >> /dev/null
ec... |
#!/bin/bash
device=2,3
batch_size=256
noise_type=dropout
data=cifar10
n_ensemble=1
for levels in 1 2 3 4 5
do
for sigma in 0.5
do
test_sigma=0.0
echo "nonadv testing" "sigma =" ${sigma} "test_sigma =" ${test_sigma}
echo "level = " ${levels}
ckpt_f=./ckpt/sde_${data}_${sigma}_${noise_type}.pth
CUDA_VISIBL... |
<gh_stars>1-10
package org.nikkii.alertify4j.util;
import java.util.NoSuchElementException;
/*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/**
* A container object which may or may not contain a non-null val... |
package com.foxconn.iot.core.repository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
imp... |
import pprint
def process_peers(omp_peers: list, json: bool) -> None:
if json:
pp = pprint.PrettyPrinter(indent=2)
pp.pprint(omp_peers)
else:
for peer in omp_peers:
# Perform a specific action for each peer when json is False
# Example: print(peer) or perform any... |
package com.objectway.stage.converter;
import java.util.ArrayList;
import java.util.List;
import com.objectway.stage.model.AccountServiceBean;
import com.objectway.stage.model.TransactionServiceBean;
import com.objectway.stage.viewbeans.AccountViewBean;
import com.objectway.stage.viewbeans.TransactionViewBean;
publi... |
#!/bin/bash
###############################################################
# -p <producing nodes count>
# -n <total nodes>
# -s <topology>
# -d <delay between nodes startup>
###############################################################
pnodes=10
topo=star
delay=0
args=`getopt p:n:s:d: $*`
if [ $? == 0 ]; then
... |
import React from 'react';
import PropTypes from 'prop-types';
import Share from 'react-native-share';
import TouchableOpacity from '~/components/TouchableOpacity'
import Icon from 'react-native-vector-icons/FontAwesome';
import { scale, colors } from '~/configs/styles';
class ShareButton extends React.PureComponent {... |
<reponame>carlosjhr64/mdserver<filename>plug/restart.rb
module Markita
class Base
get '/restart.html' do
Thread.new do
sleep 1
Kernel.exec($0, *ARGV)
end
<<~RESTART
<!DOCTYPE html>
<html>
<head><title>restart</title></head>
<body>
<h1>MDServer restart</h1>
<... |
from picturate.config import CAttnGANConfig
from picturate.nets import CAttnGAN
config = CAttnGANConfig('bird')
gan = CAttnGAN(config, pretrained=True)
caption = "This little bird is blue with short beak and white underbelly"
filename = 'bird'
gan.generate_image(caption, filename)
|
import Article from './article'
import Audio from './audio'
import Book from './book'
import Code from './code'
import Event from './event'
import Instagram from './instagram'
import JS from './js'
import ReactIcon from './react'
import Tech from './tech'
import Video from './video'
export {
Article,
Audio,
Book... |
public static int findFirstNumberPos(String s) {
int pos = -1;
for (int i = 0; i < s.length(); i++) {
if (Character.isDigit(s.charAt(i))) {
pos = i;
break;
}
}
return pos;
} |
package org.opentele.server.dgks.monitoringdataset.version1_0_1.generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import jav... |
/*
* Copyright (C) 2016 Google 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.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
#!/usr/bin/env bash
docker build -t claudiofahey/nvidiagpubeat:20180925 .
|
import React from 'react';
import { PNG, Diagram, GeneralIcon } from 'rediagram';
import {
GCP,
CloudLoadBalancing,
InvizGCP,
CloudDNS,
ComputeEngine,
Zone,
CloudStorage,
CloudSQL,
} from '@rediagram/gcp';
PNG(
<Diagram title="Content Management">
<InvizGCP>
<GeneralIcon name="iOS/Android/W... |
#!/bin/bash
. $(dirname ${BASH_SOURCE})/../../util.sh
rm -fr $(relative project/api-router)
oc delete dc api-router-app --namespace=demos
oc delete bc api-router-app --namespace=demos
oc delete svc api-router-app --namespace=demos
oc delete svc api-router --namespace=demos
oc delete is api-router-app --namespace=de... |
#!/bin/bash
python app.py ./config.json ./issuance_request_config.json ./presentation_request_config.json |
<gh_stars>0
import { API } from 'aws-amplify'
export const GET_FRIDGE = 'GET_FRIDGE'
export const GET_FRIDGE_SUCCESS = 'GET_FRIDGE_SUCCESS'
export const GET_FRIDGE_FAILURE = 'GET_FRIDGE_FAILURE'
export const ADD_ITEM_TO_FRIDGE = 'ADD_ITEM_TO_FRIDGE'
export const AUTHORIZED_USER = 'AUTHORIZED_USER'
export const GET_PRO... |
"use strict;"
/* Classes */
const Game = require('./game.js');
const Player = require('./player.js');
const Log = require('./log.js');
const Log2 = require('./log2.js');
const Car = require('./car.js');
/* Global variables */
var canvas = document.getElementById('screen');
var game = new Game(canvas, update, render);... |
<reponame>darrendanvers/exp-download
package blog.drmidnite.expdownloadapi;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.... |
// global variables below
let inner, tileWidth, tileHeight;
let radius = 100;
let tiles = 1;//tiles per side
let height = 100 * radius / 2 * 3 ** 0.5 * tiles;
let width = 30 * radius * tiles;
while(width > height) {
width -= radius
}
function mouseClicked() {
background(random(80, 180), random(60, 100), 100)... |
import {NestFactory} from '@nestjs/core';
import {AppModule} from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule, {cors: true});
app.use(function (req, res, next) {
const allowedOrigins = ['http://127.0.0.1:3000', 'http://localhost:3000', 'http://localhost:... |
<filename>src/app/libs/date.spec.ts
import * as date from './date';
describe('a date module', () => {
it('should contain method now', () => {
expect(date.now).toEqual(jasmine.any(Function));
});
describe('method now', () => {
it('should return a number', () => {
expect(date.now()).toEqual(jasmine.... |
#!/bin/sh
#
# Copyright (c) 2012-2015 Andrea Selva
#
echo " "
echo " ___ ___ _ _ ___ ________ _____ _____ "
echo " | \/ | | | | | | \/ | _ |_ _|_ _| "
echo " | . . | ___ ... |
def calculateFrameTime():
fps = 60
frame_time = 1000 / fps # Calculate the time in milliseconds for each frame
return frame_time |
<gh_stars>0
import shutil
import pathlib
import pytest
@pytest.fixture
def doculect_dir(tmp_path):
d = tmp_path / 'doculect'
shutil.copytree(pathlib.Path(__file__).parent / 'doculect', d)
return d
|
def generate_list(n):
lst = []
for i in range(1, n+1):
lst.append(i)
return lst |
/*
*
*/
package net.community.chest.awt.event;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import net.community.chest.util.collection.CollectionsUtils;
/**
* <P>Copyright GPLv2</P>
*
* @author <NAME>.
* @si... |
package io.dronefleet.mavlink.common;
import io.dronefleet.mavlink.annotations.MavlinkEntryInfo;
import io.dronefleet.mavlink.annotations.MavlinkEnum;
/**
* Bitmap to indicate which dimensions should be ignored by the vehicle: a value of
* 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoin... |
def reverseSort(string):
string_list = string.split()
string_list.sort(reverse=True)
return string_list
if __name__ == '__main__':
string = "The quick brown fox jumps over the lazy dog"
result_list = reverseSort(string)
print(result_list)
Output: ['over', 'lazy', 'jumps', 'fox', 'brown', 'quic... |
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=8
#SBATCH --mem=16gb
module load sra-tools
cd /gpfs/group/pipkin/hdiao/T_Cell_ChIP/0_fastq
fastq-dump -I --split-files SRR5217328 &
fastq-dump -I --split-files SRR5217329 &
fastq-dump -I --split-files SRR4437321 &
fastq-dump -I --split-files SRR4437322 &
fastq-dump -I --... |
#!/bin/bash
# change the environment name to OpenCabinetDoor, OpenCabinetDrawer, PushChair, or MoveBucket
# change the network config
# increase eval_cfg.num_procs for parallel evaluation
model_list=$(python -c "import mani_skill, os, os.path as osp; print(osp.abspath(osp.join(osp.dirname(mani_skill.__file__), 'assets... |
package route
import (
httpRoute "github.com/quicklygabbing/http/pkg/http/route"
"github.com/quicklygabbing/users/internal/pkg/http/request"
internalRoute "github.com/quicklygabbing/users/internal/pkg/http/route"
)
type route struct {
request request.Interface
}
func NewRoute() internalRoute.Interface {
return ... |
<reponame>lucasliet/casa_do_codigo<gh_stars>0
package br.com.casadocodigo.loja.daos;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import br.com.casadocodigo.loja.models.Autor;
public class AutorDao {
@PersistenceContext
private EntityManager manager;... |
<filename>artifacts/spring-workshop/dao/src/main/java/com/vmware/spring/workshop/dao/api/BranchDao.java
package com.vmware.spring.workshop.dao.api;
import java.util.List;
import org.springframework.data.repository.query.Param;
import com.vmware.spring.workshop.dao.IdentifiedCommonOperationsDao;
import com.vmware.spr... |
echo "####################################################################"
echo "## Full Test Scripts for CB-Spider IID Working Version - 2020.04.22."
echo "## 1. VPC: Create -> List -> Get"
echo "## 2. SecurityGroup: Create -> List -> Get"
echo "## 3. KeyPair: Create -> List -> Get"
echo "## 4. VM: multiple ... |
#!/bin/bash
sudo apt-get update
sudo apt-get install -y mongodb
sudo rm /etc/mongodb.conf
|
import { shadow } from '../../src/enhancers/'
import { buildEmptyThemeFn, buildStyleParamFn } from '../../src/themes/util'
test('returns shadow styles', () => {
const theme = {
...buildEmptyThemeFn(),
siteVariables: {
shadows: {
small: '0 1px 4px rgba(0, 0, 0, .125)',
},
}
}
const... |
function findLongestWordLength(string) {
let words = string.split(' ');
let maxLength = 0;
for (let i = 0; i < words.length; i++) {
if (words[i].length > maxLength) {
maxLength = words[i].length;
}
}
return maxLength;
} |
<gh_stars>10-100
#include "precompiled.h"
#pragma hdrstop
#include "BulletMotionState.h"
#include <utility>
#include "Modules/Graphics/GraphicsSystem/TransformComponent.h"
BulletMotionState::BulletMotionState(const btTransform& transform)
: m_btTransform(transform)
{
}
BulletMotionState::~BulletMotionState() = ... |
/* // The characteristic of the reference types is expressed in the assignment operation! For example:
const num = {
n: 1
};
console.log(`num = ${num.n}`);
const num1 = num;
console.log(`num1 = ${num1.n} and num = ${num.n}`);
num1.n = 100;
console.log(`After change num1: num1 = ${num1.n} and num = ${num.n}`); */
... |
<reponame>DPNT-Sourcecode/CHK-ojia01
'use strict';
module.exports = function (x, y) {
return x+y;
};
|
<filename>src/components/DocWrapper/DocInlineCode/index.tsx
import React, {FC} from 'react';
import clsx from 'clsx';
import './DocInlineCode.scss';
interface ComponentProps {
className?: string;
}
const DocInlineCode: FC<ComponentProps> = ({children, className}) => {
return (
<code className={cls... |
AUTHOR='@xer0dayz'
VULN_NAME='CVE-2020-5405 - Spring Directory Traversal 2'
URI="/a/a/..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f../etc/resolv.conf"
METHOD='GET'
MATCH="root\:|nameserver|\[extensions\]"
SEVERITY='P1 - CRITICAL'
CURL_OPTS="--user-agent '' -s -L --insecure"... |
<reponame>rds0751/fec-cms<gh_stars>10-100
(function() {
(function($) {
// Force hallotoolbar to be full width when possible
$(document.body).on('halloactivated', function() {
var $toolbar = $('.hallotoolbar');
$toolbar.width('auto');
// Remove re-undo buttons
$toolbar.fin... |
<reponame>alisdair/slack-time-zones<gh_stars>10-100
import hbs from 'htmlbars-inline-precompile';
import { moduleForComponent, test } from 'ember-qunit';
import Ember from 'ember';
function shallowText($element) {
return $element.contents()
.filter((i, e) => e.nodeType === window.Node.TEXT_NODE).text().trim();
}
... |
#!/bin/bash
if [ -n "$SUDO_COMMAND" ]; then
user=$SUDO_USER
uid=$SUDO_UID
gid=$SUDO_GID
else
user=$(whoami)
uid=$(id --user)
gid=$(id --group)
fi
label_prefix=local
container_name=
image=ubuntu:18.04
while [ $# -gt 0 ]
do
case $1 in
--)
shift;
... |
#!/bin/bash
# this script is called from scripts like run_ms.sh; it does the common stages
# of the build, such as feature extraction.
# This is actually the same as local/online/run_nnet2_common.sh, except
# for the directory names.
. cmd.sh
mfccdir=mfcc
stage=1
. cmd.sh
. ./path.sh
. ./utils/parse_options.sh
if... |
from typing import List
def absolute_differences_sum(arr: List[int]) -> int:
abs_diff_sum = 0
for i in range(len(arr) - 1):
abs_diff_sum += abs(arr[i] - arr[i+1])
return abs_diff_sum
# Test cases
print(absolute_differences_sum([4, 1, 7, 3])) # Output: 12
print(absolute_differences_sum([2, 2, 2, 2... |
#!/bin/bash
#
# Since running everything at once yields inconsistent result, this script
# runs each benchmark one by one.
# An optional numeric argument can be used to run multiple iterations.
#
if [ ! -z $1 ]; then
QPB_BENCH_EXTRA_ARG="-iterations $1"
fi
OUT=$(cd $(dirname ${BASH_SOURCE[0]}) && pwd)/out
$OUT/bin... |
#ifndef MUSE_MCL_2D_UPDATE_MODEL_2D_HPP
#define MUSE_MCL_2D_UPDATE_MODEL_2D_HPP
#include <ros/node_handle.h>
#include <cslibs_math_ros/tf/tf_provider.hpp>
#include <cslibs_plugins/plugin.hpp>
#include <cslibs_plugins_data/data.hpp>
#include <muse_mcl_2d/instance/sample_2d.hpp>
#include <muse_smc/smc/traits/update_mod... |
TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')
echo $TF_INC
TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())')
CUDA_PATH=/usr/local/cuda
cd hough_voting_gpu_layer
nvcc -std=c++11 -c -o hough_voting_gpu_op.cu.o hough_voting_gpu_op.cu.cc \
-I $TF_INC -I$TF_... |
<reponame>rovedit/Fort-Candle<filename>src/systems/ParticleSystem.hh
#pragma once
#include <glow/fwd.hh>
#include "advanced/World.hh"
#include "ecs/Engine.hh"
#include "ecs/System.hh"
#include "types/Particle.hh"
namespace gamedev
{
// Inspired by https://github.com/TheCherno/OneHourParticleSystem
class ParticleSyst... |
#!/bin/bash
####################################################################################################
#
# Copyright (c) 2017, Jamf, LLC. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditio... |
def find_fibonacci(N):
if N == 0 or N == 1:
return N
else:
a = 0
b = 1
for i in range(2, N+1):
c = a + b
a = b
b = c
return c
# Example Usage
N = 8
print(find_fibonacci(N)) # 21 |
package cn.icepear.dandelion.upm.api.domain.dto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* @author rim-wood
* @description 部门树
* @date Created on 2019-04-18.
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class DeptTree extends TreeNode<De... |
python tools/adv_test_cifar.py --model_path ./results/defense_0.1_0.1/robust_model_g_epoch82.pth --vae_path ./results/defense_0.1_0.1/robust_vae_epoch82.pth --batch_size 256 \
"NoAttack()" \
"AutoLinfAttack(cd_vae, 'cifar', bound=8/255)" \
"AutoL2Attack(cd_vae, 'cifar', bound=1.0)" \
"JPEGLinfAttack(cd_vae, 'cifar'... |
<gh_stars>1-10
package edu.mtu.cabals.model.marketplace;
import java.awt.Point;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.javatuples.Pair;
import ec.util.MersenneTwisterFast;
import edu.mtu.cabals.model.Parameters;
import edu.mtu.cabals.model.TimberMarketplace;... |
import re
def parse_field_descriptors(code_snippet):
field_descriptors = []
fields = re.findall(r"(\w+)=(.*?)(?=(\w+=)|\))", code_snippet)
field_descriptor = {}
for field in fields:
key = field[0].strip()
value = field[1].strip().strip(",")
if value.startswith("_b"):
... |
#!/bin/bash
#defines
NC='\033[0m'
RED='\033[0;31m'
GREEN='\033[0;32m'
### Setup database
psql -h ${POSTGIS_HOSTNAME} -U ${POSTGIS_USER} \
-c "DROP DATABASE IF EXISTS ${DATABASE_NAME};" >/dev/null \
-c "COMMIT;" 2>&1 >/dev/null \
-c "CREATE DATABASE ${DATABASE_NAME} WITH ENCODING='UTF8' CONNECTION LIMIT=-1... |
import React from 'react'
export default function StarRating(props) {
const stars = [0, 0, 0, 0, 0]
let key = 0
stars.fill(1, 0, props.rating)
if (!props.rating) {
return <p>No reviews yet</p>
} else if (props.showReviewNumber) {
return (
<p>
Rating:{' '}
{stars.map(star => {
... |
import type {MojoApp, MojoContext} from '../../../../../lib/types.js';
export default function helpersPlugin(app: MojoApp): void {
app.addHelper('testHelper', testHelper);
}
async function testHelper(ctx: MojoContext, partial: string): Promise<string> {
const language: string = ctx.models.bar.language();
return... |
//
// Created by johnathan on 07/07/18.
//
#ifndef VSS_SIMULATOR_ICONTROLRECEIVERADAPTER_H
#define VSS_SIMULATOR_ICONTROLRECEIVERADAPTER_H
class IControlReceiverAdapter {
public:
virtual void loop() = 0;
};
#endif //VSS_SIMULATOR_ICONTROLRECEIVERADAPTER_H
|
<filename>trunk/src/main/java/org/osgeo/proj4j/UnknownAuthorityCodeException.java
package org.osgeo.proj4j;
/**
* Signals that an authority code is unknown
* and cannot be mapped to a CRS definition.
*
* @author mbdavis
*
*/
public class UnknownAuthorityCodeException extends Proj4jException
{
public Unknown... |
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source $DIR/../bashdb.sh
bashdb_set testdb a 1
value=$(bashdb_contains testdb a)
if [ "$value" != "1" ]; then
exit -1
fi
|
export interface RiskState {
riskQueryResult: any[];
isLoading: boolean;
error: Error;
}
export const initialState: RiskState = {
riskQueryResult: [],
isLoading: false,
error: null
};
|
#!/bin/sh -e
printf "Running test_matlab_devices... "
DIME_SOCKET="`mktemp -u`"
../server/dime -l "unix:$DIME_SOCKET" &
DIME_PID=$!
env MATLABPATH="../client/matlab" matlab -batch "test_matlab_devices('$DIME_SOCKET')"
kill $DIME_PID
printf "Done!\n"
|
SELECT users.name FROM users
WHERE users.last_login_date >= CURDATE() - INTERVAL 7 DAY; |
#!/usr/bin/env bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title World Time
# @raycast.mode inline
# @raycast.refreshTime 5s
# @raycast.packageName Dashboard
# Optional parameters:
# @raycast.icon 🗺
#
# Documentation:
# @raycast.description Show the time from elsewhere in the world
# @raycast.a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.