text stringlengths 1 1.05M |
|---|
<reponame>NosCoreLegend/Launcher
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const HtmlWebpackHotPlugin = require('html-webpack-hot-plugin')
let htmlHotPlugin = new HtmlWebpackHotPlugin({ hot: true });
let mode = ... |
/*
* Copyright (c) 2009, <NAME>, Inc.
* Copyright (c) 2012-2015, <NAME>
* 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 retain the above copyr... |
#SBATCH -t 00:20:00
#SBATCH --nodes=1
#SBATCH --tasks-per-node=1
#SBATCH --cpus-per-task=24
#SBATCH -A p_readex
#SBATCH --mem-per-cpu=2500M
if [ "$PBS_ENVIRONMENT" == "PBS_BATCH" ]; then
export FM_DIR=$PBS_O_WORKDIR
else
export FM_DIR=$(pwd)
fi
source readex_env/set_env_ptf.source
source scripts_$READEX_MACHINE/env... |
install-docker-compose() {
sudo /bin/bash -c 'curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-c... |
import { Component } from '@angular/core';
import { NotificationsService } from 'angular2-notifications';
import { NotificationConfig } from '../../../../config/notification.config';
@Component({
selector: 'notification',
templateUrl: './view/simple-notification.html',
providers: [NotificationsService, N... |
<reponame>equal-l2/cvpn
package subcmd
import (
"encoding/json"
"errors"
"fmt"
"log"
"os"
"path"
"github.com/Shizuoka-Univ-dev/cvpn/api"
"github.com/Shizuoka-Univ-dev/cvpn/pkg/config"
"github.com/Shizuoka-Univ-dev/cvpn/pkg/util"
"github.com/spf13/cobra"
)
func NewLoginCmd() *cobra.Command {
return &cobra.... |
exports.run = (client, message, Discord) => {
message.channel.send("huh?...")
setTimeout(() => {
message.channel.send("IT'S YOU?")
message.channel.send("¿Tú, ahora?")
}, 1000);
setTimeout(() => {
message.channel.send("Leon forgot to tell me you'll arrive... Let me give him a **friendly** call")
... |
package testapp
import (
"testing"
"time"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store"
sdk "github.com/cosmos/cosmos-sdk/types"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
bankkeeper "github.com/cosmos/cosmos-sdk/x/... |
<reponame>osteele/skillz<gh_stars>0
import request from 'supertest';
import { app, client, getRealAddress } from './server';
beforeAll(() => client.connect());
afterAll(() => client.end());
describe('app', () => {
test('GET /home', async () => {
await request(app).get('/')
.expect(200);
});
test('POS... |
import AbstractCommand from "./AbstractCommand";
export default class InsertTableCommand
extends AbstractCommand
{
async execute(): Promise<void>
{
// get column count
const columnsInput = await this
.showInputBox("Number of columns", "2");
if (columnsInput === undefine... |
import json
def serialize_dag(dag):
# Convert the DAG dictionary to a JSON serializable format
serializable_format = json.loads(json.dumps(dag))
return serializable_format |
#!/bin/bash
SYS_NAME="$(uname -s)";
SYS_NAME="$(basename $SYS_NAME)";
CC=gcc;
CXX=g++;
CCACHE="$(which ccache)";
CMAKE_OPTIONS="";
CMAKE_CLANG_TIDY="";
CMAKE_CLANG_ANALYZER=0;
CMAKE_CLANG_ANALYZER_PATH="";
BUILD_DIR=$(echo "build_jobs_$SYS_NAME" | tr '[:upper:]' '[:lower:]');
CUSTOM_BUILD_DIR=;
CMAKE_BUILD_TYPE=Debug... |
<reponame>arkav/open-oryx
package dev.arkav.openoryx.impl;
import dev.arkav.openoryx.game.StatusParser;
import dev.arkav.openoryx.game.appspot.Endpoints;
import dev.arkav.openoryx.game.models.*;
import dev.arkav.openoryx.net.PacketIO;
import dev.arkav.openoryx.net.crypto.RSA;
import dev.arkav.openoryx.net.data.MoveRec... |
<gh_stars>10-100
/*eslint-disable*/
/* global Phaser, players
*/
/*eslint-enable*/
var Horizontal = function (game, x, y) {
this.game = game
this.x = x
this.y = y
this.w = 224
this.h = 32
this.dist = 160
this.sprite = null
this.spriteAxis = null
this.isDoor = false
}
Horizontal.pr... |
<filename>app/static/js/utils/form_utils.js<gh_stars>0
function clearValidityIndicators(element) {
element.removeClass('is-invalid')
element.removeClass('is-valid')
}
function callOnEnter(func) {
return ev => {
let enterPressed = false
// have to check both for portability
if (ev.k... |
<filename>Examples/FeatureExtraction/LocalHoughExample.cxx
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except i... |
<table>
<tr>
<th>Name</th>
<th>Email</th>
<th>Phone</th>
</tr>
<tr>
<td contenteditable="true"></td>
<td contenteditable="true"></td>
<td contenteditable="true"></td>
</tr>
</table> |
# Sample usage of the RpiPrimary class
# Create a primary node with id 'P1'
primary_node = RpiPrimary('P1')
# Connect secondary nodes 'S1' and 'S2' to the primary node
primary_node.connect_secondary('S1')
primary_node.connect_secondary('S2')
# Handle incoming data from 'S1' and 'S2'
primary_node.handle_connection('S1... |
import argparse
import os
class ArgumentValidator:
def __init__(self):
self.parser = argparse.ArgumentParser(description='Argument Validator')
def parse_arguments(self):
self.parser.add_argument('--config', help='Configuration file path')
self.parser.add_argument('--model', help='Model... |
#!/bin/bash
#SBATCH --mail-user=ar.aamer@gmail.com
#SBATCH --mail-type=BEGIN
#SBATCH --mail-type=END
#SBATCH --mail-type=FAIL
#SBATCH --mail-type=REQUEUE
#SBATCH --mail-type=ALL
#SBATCH --job-name=proto_conv64_birds_5shot
#SBATCH --output=%x-%j.out
#SBATCH --nodes=1
#SBATCH --gres=gpu:1
#SBATCH --ntasks-per-node=32
#SB... |
<filename>apps/common/src/test/java/net/community/apps/common/test/gridbag/ModifiedGridLayout.java
/*
*
*/
package net.community.apps.common.test.gridbag;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.Insets;
import net.community.chest.a... |
package weixin.lottery.controller;
import org.apache.log4j.Logger;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.jeecgframework.core.common.controller.BaseController;
import org.jeecgframework.core.common.exception.BusinessException;
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
im... |
<reponame>xinjiayu/SimServerUnicom
package utils
import (
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/util/gconv"
"time"
)
//1G计算单位
const G1 int64 = 1024 * 1024 * 1024
//1MB计算单位
const MB1 int64 = 1024 * 1024
//统一存储流量统计的时候所用的日期相关信息
type FlowUseDate struct {
Year string
LastYear string
M... |
'use strict';
var chai = require('chai');
var nodemailer = require('../src/nodemailer');
var sinon = require('sinon');
var http = require('http');
var fs = require('fs');
var expect = chai.expect;
var SMTPServer = require('smtp-server').SMTPServer;
var crypto = require('crypto');
chai.config.includeStack = true;
var... |
module Travis
module Api
module V0
module Pusher
class Job
class Started < Job
end
end
end
end
end
end
|
<gh_stars>0
package com.didi.drouter.service;
import androidx.annotation.NonNull;
/**
* Created by gaowei on 2019/3/28
*/
public interface ICallService {
<T> T call(Object... params);
interface Type0<Result> {
Result call();
}
interface Type1<Param1, Result> {
Result call(Param1 pa... |
#!/bin/bash -xe
function on_exit {
rc=$?
info "Exiting with rc=$rc"
exit $rc
}
trap on_exit EXIT
function info {
echo "$(date):INFO: $1"
}
function error {
echo "$(date):INFO: $1"
}
info "Starting $0"
# User customization code below
|
<filename>proj/src/keyboard.c
#include "keyboard.h"
/* Global variables */
int kbd_hook_id = KBD_IRQ;
uint8_t scancode;
uint32_t sys_inb_counter = 0;
bool status_error = false;
// will only count the uses of sys_inb when in LAB3, because of the flag
#ifdef LAB3
int sys_inb_with_count(int port, uint8_t *value) {
sys... |
package com.katus.common.io;
import com.katus.common.util.IOUtils;
import java.io.*;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
/**
* @author <NAME>
* @version 1.0, 2021-05-24
*/
... |
#!/bin/sh
set -e
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
local source="${BUILT_PRO... |
<filename>native/native.go
package main
import (
"encoding/binary"
"encoding/json"
"errors"
"io"
"io/ioutil"
"log"
"os"
"sync"
"time"
)
func debug(v ...interface{}) {
log.Println("kindred | pid:", os.Getpid(), v)
}
type inputJSON struct {
Type string `json:"type"`
Files []string `json:"files"`
}
type... |
<reponame>IzaacBaptista/ads-senac
package view;
import java.awt.Container;
import java.awt.GridLayout;
import java.awt.FlowLayout;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing... |
<gh_stars>10-100
package event_bus
import(
)
type(
)
func Emit(event string, args... interface{}) {
}
|
<filename>backend/src/main/java/com/pharmacySystem/DTOs/PatientDTO.java<gh_stars>1-10
package com.pharmacySystem.DTOs;
import com.pharmacySystem.model.user.User;
public class PatientDTO {
private long id;
private String name;
private String surname;
private String email;
public PatientDTO() {
super();
}
... |
#!/bin/sh
_sps_hostname=$(hostname | sed 's/\..*//')
_e=$(printf "\033")
_esc= _end=
[ -n "$BASH_VERSION" ] && _esc=$(printf '\001') _end=$(printf '\002')
_SPS_detect_distro() {
[ -f /etc/os-release ] || return
distro=$(sed -nE 's/^ID="([^"]+)".*/\1/p' /etc/os-release)
normalized=$(echo "$distro" | sed... |
#pragma once
#include <eosiolib/utility.hpp>
#include <eosiolib/preprocessor/seq/for_each.hpp>
#include <eosiolib/preprocessor/seq/enum.hpp>
#include <eosiolib/preprocessor/seq/size.hpp>
#include <eosiolib/preprocessor/seq/seq.hpp>
#include <eosiolib/preprocessor/stringize.hpp>
namespace eosio {
template<typename T>... |
package org.fasttimepicker;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.format.Time;
public final class ParcelableTime implements Parcelable {
// ////////////////////////////
// Parcelable apis
// ////////////////////////////
public static final Parcelable.Creator<Parc... |
#Class to represent a booking system
class Booking:
def __init__(self, name, date, time):
self.name = name
self.date = date
self.time = time
def view_details(self):
print("Name: ", self.name)
print("Date: ", self.date)
print("Time: ", self.time)
def ... |
import React, { useReducer } from 'react'
import { v4 as uuid } from 'uuid';
import StrainSelectContext from './strainSelectContext';
import StrainSelectReducer from './StrainSelectReducer'
import {
ADD_STRAINSELECTION,
DELETE_STRAINSELECTION,
SET_CURRENT,
CLEAR_CURRENT
} from '../types';
const Strain... |
<gh_stars>0
package com.nortal.spring.cw.core.support.user;
import java.io.Serializable;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.stereo... |
// ==UserScript==
// @namespace https://tampermonkey.myso.kr/
// @name 네이버 블로그 보유키워드 분석
// @description 네이버 블로그 프로필에서 보유키워드를 확인할 수 있습니다.
// @copyright 2021, myso (https://tampermonkey.myso.kr)
// @license Apache-2.0
// @version 1.1.10
// @updateURL https://github.com/myso-kr/kr.myso.tampermo... |
<filename>applications/physbam/physbam-lib/Public_Library/PhysBAM_Dynamics/Level_Sets/PARTICLE_LEVELSET_RLE.cpp
#ifndef COMPILE_WITHOUT_RLE_SUPPORT
//#####################################################################
// Copyright 2005-2006, <NAME>, <NAME>, <NAME>.
// This file is part of PhysBAM whose distribution i... |
# This will guess the User class
FactoryBot.define do
factory :image_scratch, class: MediaGallery::ImageScratch do
association :ownable, factory: :user
association :image_version, factory: :image_version
end
end
|
#!/bin/bash
# -------------------------------------------------------------------------- #
# Copyright 2015-2017, CSIR Centre for High Performance Computing #
# Author: David Macleod & Israel Tshililo #
# ... |
// @flow
// Sample comment
/**
* @flow
*/
/**
* Sample comment
*/
|
<reponame>ZicklePop/dash-pi
import dateAsObject from '../utils/dateAsObject'
const mockDateEpoc = new Date('Jan 19 1990')
const mockDateObj = {
day: 19,
hours: 12,
minutes: '00',
month: 'Jan'
}
describe('util - dateAsObject', () => {
it('returns null when no date passed in', () => {
expect(dateAsObject(... |
'use strict';
const assert = require('assert');
const path = require('path');
const mdbPath = path.resolve(__dirname + '/media/Northwind2003.mdb');
const connStr = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + mdbPath;
describe('Connection', function() {
it('parseDateFn правильно парсит даты', function() {
... |
<filename>codes/src/main/java/org/glamey/training/codes/strings/LongestPalindromicSubstring.java
package org.glamey.training.codes.strings;
import org.glamey.training.codes.Utils;
/**
* 给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。
* <p>
* 示例 1:
* 输入: "babad"
* 输出: "bab"
* 注意: "aba" 也是一个有效答案。
* <p>
* 示例 2:
* ... |
import { ISong } from "./Audio";
const songList: ISong[] = [
{
src: "/audio/mogul.mp3",
title: "MOGUL",
artist: "Saint Marshall (Inspired by <NAME> & <NAME>)"
},
{
src: "/audio/sunshine.mp3",
title: "Can you feel the sunshine?",
artist: "Sonic R"
},
{
src: "/audio/countwhat.mp3",
title: "Count Wha... |
<filename>sys/admin/py/ping2_advanced.py
#! /usr/bin/env python3
# -*-coding:utf-8 -*-
# @Time : 2019/06/16 16:44:29
# @Author : che
# @Email : <EMAIL>
# 多队列和多线程池, 会把活动的结果加入到arping队列
import re
from threading import Thread
import subprocess
from queue import Queue
num_ping_threads = 3
num_arp_threads = 3
in_queu... |
java -Xmx1G -jar craftbukkit.jar |
# Copyright (c) 2012 Bingo Entreprenøren AS
# Copyright (c) 2012 Teknobingo Scandinavia AS
# Copyright (c) 2012 <NAME>
# Copyright (c) 2012 <NAME>
#
# 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 Sof... |
<filename>oilisoft/src/main/java/frontend/labels/clickmenus/NodeClickMenuItem.java
package frontend.labels.clickmenus;
import frontend.labels.NodeLabel;
import javax.swing.*;
/** Custom JMenuItem for click menus
* @author <NAME>
* @since 1.0
* @version 1.0
*/
public class NodeClickMenuItem extends JMe... |
#!/bin/bash
echo "===== RUNNING SMOKE SUITE IOS ====================="
cucumber -p ios -p html_report -t @smoke
|
#!/bin/sh
for x in 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
do
echo "stopping pc$x"
ssh pc$x 'sudo init 0'
done
|
<reponame>felipebaloneker/Practice<gh_stars>0
function number(x,y,z){
if(x > 0 && y > 0 && z > 0){
if(x % 10 == y % 10 && y % 10 == z % 10 && x % 10 == z % 10 ){
return true;
}
else{
return false;
}
}
}
console.log(number(100,200,300));
console.log(number(... |
const Discord = require("discord.js");
const fetch = require("node-fetch");
module.exports = {
name: "wiki",
cooldown: 8000,
category: "info",
uimage:'',
usage: "`wiki <query>`",
description: "Returns the article from Wikipedia",
run: async (client, message, args) => {
const body = await fetch(
... |
<reponame>mplushnikov/doctor-jim
package de.plushnikov.doctorjim.javaparser;
import de.plushnikov.doctorjim.ElementPosition;
import java.util.Collection;
import java.util.HashSet;
import java.util.TreeSet;
/**
* Baseclass of generated JavaParser.
* This class provides functionality for collection of impo... |
<filename>src/main/java/org/la4j/inversion/NoPivotGaussInverter.java
/*
* Copyright 2011-2015, by <NAME> and Contributors.
*
* This file is part of la4j project (http://la4j.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the License.
... |
package cn.cerc.jbean.book;
public interface IBook extends IBookEnroll {
// 初始化(仅调用一次)
public void init(IBookManage manage);
// 初始化( 会被每月调用)
public void ready();
// 将帐本的更新,保存到数据库中
public void save();
}
|
from django.urls import path
from . import views
urlpatterns = [
path("controlpanel/courses/", views.controlpanel_course_list, name="controlpanel_course_list"),
path("controlpanel/courses/<int:id>/delete/", views.controlpanel_course_delete, name="controlpanel_course_delete"),
path("controlpanel/courses/<in... |
package com.yin.springboot.user.center.domain;
import java.io.Serializable;
import javax.persistence.*;
import lombok.Data;
@Data
@Table(name = "clientdetails")
public class Clientdetails implements Serializable {
@Id
@Column(name = "appId")
private String appid;
@Column(name = "resourceIds")
pri... |
#!/bin/zsh
N=2000000
cmd=ls
TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S'
echo
echo "type:"
time (repeat $N {type $cmd &>/dev/null})
echo
echo "hash:"
time (repeat $N {hash $cmd &>/dev/null})
echo
echo "command -v:"
time (repeat $N {command -v $cmd &>/dev/null})
echo
echo "which:"
time (repeat $N {which $cmd &>/dev/nu... |
<gh_stars>0
with open("input_files\day08_input_mp_txt") as file:
instructions = file.read().split("\n")
# part 1
cleaned_instructions = [instruction.split(" ") for instruction in instructions]
passed_instructions = set()
accumulator = 0
current_position = 0
while current_position not in passed_instructions:
... |
<filename>src/test/java/th/ac/kmitl/it/prip/fractal/ParametersFromToTest.java
package th.ac.kmitl.it.prip.fractal;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.ru... |
<gh_stars>0
export class GLSLVertexOptions
{
// "Vertex-like shader" here is any shader stage that can write BuiltInPosition.
// GLSL: In vertex-like shaders, rewrite [0, w] depth (Vulkan/D3D style) to [-w, w] depth (GL style).
// MSL: In vertex-like shaders, rewrite [-w, w] depth (GL style) to [0, w] depth.
... |
#!/bin/tcsh
#PBS -N sg_sg_input
#PBS -j oe
#PBS -q DEFAULT
#PBS -l select=1:ncpus=64:mpiprocs=1
source /etc/profile.d/modules.csh
module purge
module load oneapi-intel/2021.1.1
module load oneapi/mpi/2021.1.1
setenv OMP_NUM_THREADS 1
cd ${PBS_O_WORKDIR}
#cat ${PBS_NODEFILE} > nodelist
#activate shry
setenv PATH "/h... |
#!/usr/bin/env bash
docker-compose build quantumleap-db-setup
docker-compose pull crate
docker-compose pull timescale
docker-compose pull redis
docker-compose up -d
sleep 20
# Set test QL config file
export QL_CONFIG='src/reporter/tests/ql-config.yml'
cd ../../../
pytest src/reporter/ \
--cov-report= --cov-co... |
<gh_stars>100-1000
export * from './common';
export * from './theme';
|
sudo apt install p7zip-full
mkdir -p .data/inria_ail
wget --no-check-certificate https://files.inria.fr/aerialimagelabeling/aerialimagelabeling.7z.001
wget --no-check-certificate https://files.inria.fr/aerialimagelabeling/aerialimagelabeling.7z.002
wget --no-check-certificate https://files.inria.fr/aerialimagelabeling/... |
#!/bin/bash
function cronScheduleMoreOftenThan30Minutes() {
#takes a unexpanded cron schedule, returns 0 if it's more often that 30 minutes
MINUTE=$(echo $1 | (read -a ARRAY; echo ${ARRAY[0]}) )
if [[ $MINUTE =~ ^(M|H|\*)\/([0-5]?[0-9])$ ]]; then
# Match found for M/xx, H/xx or */xx
# Check if xx is smal... |
#####################################################################
#####################################################################
# script: scratch.sh
# author: Lincoln Harris
# date: 7.16.18
#
#####################################################################
##############################################... |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { SykmeldingUtdrag as SykmeldingUtdragForArbeidstakere, sykmelding as sykmeldingPt } from '@navikt/digisyfo-npm';
import { settErOppdelt } from '../../utils/settErOppdelt';
import { ARBEIDSTAKERE, SELVSTENDIGE_O... |
import RPi.GPIO as GPIO
import time
def blink_led(pin, frequency, duration):
GPIO.setmode(GPIO.BCM) # Set the pin numbering mode to BCM
GPIO.setup(pin, GPIO.OUT) # Set the pin as an output
try:
while duration > 0:
GPIO.output(pin, GPIO.HIGH) # Turn the LED on
time.sleep(... |
#! /bin/bash
#SBATCH -o /home/hpc/pr63so/di69fol/workspace/SWEET_2015_12_26/benchmarks_performance/rexi_tests_lrz_freq_waves/2016_01_06_scalability_rexi_fd_new_up_to_2048/run_rexi_fd_par_m2048_t001_n0128_r0014_a1.txt
###SBATCH -e /home/hpc/pr63so/di69fol/workspace/SWEET_2015_12_26/benchmarks_performance/rexi_tests_lrz... |
<gh_stars>1-10
package neuralNetworks.objects;
import dataTypes.DoubleVector;
import java.util.List;
import java.util.stream.Stream;
public class MiniBatch {
private final List<NetworkPattern> networkPatterns;
public MiniBatch(List<NetworkPattern> networkPatterns) {
this.networkPatterns = networkPa... |
<filename>common-utils/common-util/src/test/java/com/atjl/util/number/NumberHelperTest.java
package com.atjl.util.number;
import org.junit.Test;
import java.util.HashMap;
import static junit.framework.TestCase.assertEquals;
/**
* NumberUtil Tester.
*
* @author <Authors name>
* @version 1.0
*/
public class Numb... |
using System;
using System.Data;
using System.Data.SqlClient;
namespace DatabaseReader
{
class Program
{
static void Main(string[] args)
{
string connectionString = "Data Source=YourServer;Initial Catalog=YourDatabase;Integrated Security=True";
string query = "SELECT * F... |
<reponame>opit7/fhem-docker<filename>fhemExtended/core/RPiSensors/max6675.py
#!/usr/bin/env python
# Copyright 2014 IIJ Innovation Institute 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:
# ... |
#include <vector>
#include <stack>
#include <limits>
namespace elang {
namespace {
typedef std::vector<int> IntVector;
class MinStack {
private:
std::stack<int> dataStack;
std::stack<int> minStack;
public:
void push_back(int val) {
... |
#!/bin/bash
# shellcheck disable=SC2086
set -xeo pipefail
retval=0
cd algebra
cargo $CARGOARGS check --features "parallel" || retval="$?"
cargo $CARGOARGS check --features "fft" || retval="$?"
cargo $CARGOARGS check --features "n_fold" || retval="$?"
cargo $CARGOARGS check --features "bls12_377" || retval="$?"
cargo ... |
<reponame>pulsar-chem/BPModule
import pulsar as psr
def load_ref_system():
""" Returns toluene as found in the IQMol fragment library.
All credit to https://github.com/nutjunkie/IQmol
"""
return psr.make_system("""
C 1.2264 0.0427 0.0670
C 1.0031 -1.3293 ... |
<filename>src/app/components/EditorCont/RangeSelectDialog.tsx<gh_stars>0
import React, { useState } from "react";
import {makeStyles} from '@material-ui/core/styles';
import WrapWithDialog from "../WrapWithDialog";
import Button from "@material-ui/core/Button";
import TextField from '@material-ui/core/TextField';
cons... |
package com.redislabs.lettusearch.aggregate;
public enum Order {
Asc, Desc
} |
<gh_stars>0
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package servlet.kondisjon;
import crypto.ValidSession;
import html.Div;
import html.DivForm;
import html.Input;
import htm... |
#!/bin/bash
set -e
command=$1
arguments=${*:2}
show_help() {
echo """
Available commands:
srtm : start SRTM subsystem (DEM)
healthsites : start healthsites subsystem (health facilities)
osm : start OSM subsystem (water/transport)
copernicus_glc : start Coppernicus GLC sub... |
<filename>powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/entity/data/OperationReferenceAttribute.java
package io.getlime.security.powerauth.lib.nextstep.model.entity.data;
import io.getlime.security.powerauth.lib.nextstep.model.converter.OperationTextNormalizer;
/**
* Referen... |
'use strict';
/**
* @ngdoc directive
* @name hatshopApp.directive:bsPanes
* @description
* # bsPanes
*/
angular.module('hatshopApp').directive('hsPage', function () {
return {
require: '^hsPages',
templateUrl: 'views/hs-page.html',
restrict: 'E',
transclude: true,
scope: {
route: '@'
... |
package org.jfteam.web.controller;
import org.jfteam.service.LookupItemService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
/**
* Created with IntelliJ IDEA.
* Description:
* U... |
class Stack:
def __init__(self):
self.items = []
def push(self, item):
self.items.append(item)
def pop(self):
if not self.isEmpty():
return self.items.pop()
return None
def isEmpty(self):
return len(self.items) == 0 |
#!/bin/bash -eu
cat event-* | jq -s .
|
#!/usr/bin/env bash
if [ -z `which sed` ]; then
echo "Missing sed"
exit 1
fi
if [ -z "$1" ]; then
echo "Missing type"
exit 1
fi
THISMOD="covalent"
DATAROOT="../src/main/resources/data"
ASSETS="../src/main/resources/assets/${THISMOD}"
DATA="${DATAROOT}/${THISMOD}"
A=(${1//:/ })
if [ -z "${A[1]}" ]; then
NA... |
_complete_repo_name () {
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
comp_ccd_an_dirs=$(ls ${HOME}/go/src/bitbucket-eng-sjc1.cisco.com/an)
repos=""
for i in ${comp_ccd_an_dirs}
do
i=${i#ui-an-}
i=${i#ucs-}
repos="${repos} ${i}"
done
comp_bitbucket_context_paths="branches browse commits compare pull-reque... |
/*
UdpClient.java
Firefly Luciferin, very fast Java Screen Capture software designed
for Glow Worm Luciferin firmware.
Copyright (C) 2020 - 2022 <NAME> (https://github.com/sblantipodi)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Lice... |
<reponame>tvaisanen/embeddedGraphWidget
/**
* Created by toni on 20.7.2017.
*/
(function () {
// A list of all QUnit test Modules. Make sure you include the `.js`
// extension so RequireJS resolves them as relative paths rather than using
// the `baseUrl` value supplied above.
var testModules = ... |
<filename>js/cart.js
function setCart(){
//fonction qui affiche/actualise les valeurs du panier sur la page cart.html
var result = document.getElementById('resultCart');
result.style.backgroundColor="WhiteSmoke";
result.style.padding="0.3em";
result.innerHTML ='';
if(addProduct('quantity_golf')){
res... |
from pso.analyzers import AbstractAnalyzer
from pso.fields import FieldType
from pso_solr import tokenizers
class |
<reponame>maschnetwork/spring-todo
package at.joanneum.swd.esamvc.repository;
import at.joanneum.swd.esamvc.entity.Todo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface TodoRepository extends JpaRepos... |
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export PYTHONPATH=$PYTHONPATH:$DIR
export FLASK_APP=${DIR}/site/index.py
LC_ALL=zh_CN.UTF-8 flask run
|
<reponame>fuji-nakahara/nlp100<gh_stars>0
# テンプレートの内容を利用し,国旗画像のURLを取得せよ.
# (ヒント: MediaWiki APIのimageinfoを呼び出して,ファイル参照をURLに変換すればよい)
require 'json'
require 'open-uri'
require 'uri'
require_relative '20'
flag_file_name = BRITISH_ARTICLE_BODY[/国旗画像\s*=\s*(.*)/, 1]
uri = URI.parse('https://ja.wikipedia.org/w/api.p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.