text stringlengths 1 1.05M |
|---|
#!/usr/bin/env bash
function __cmt_source_filetree_validate {
local FILE_MARKER=.clunky-migration-tool-source-filetree
local FILE_MARKER2=.cmt.env
if [ ! -f "$FILE_MARKER" -a ! -f "$FILE_MARKER2" ]; then
>&2 cat <<-EOM
Error CMT-FILETREE002: The working directory is not marked as a ... |
<reponame>nightskylark/DevExtreme<gh_stars>0
/**
* @name chartSeriesObject
* @publicName Series
* @type object
* @inherits baseSeriesObject
*/
var chartSeriesObject = {
/**
* @name chartSeriesObjectFields_axis
* @publicName axis
* @type string
*/
axis: null,
/**
* @name chartSeriesObject... |
<filename>gsi/_gsi_.c
#ifdef ___LINKER_INFO
; File: "_gsi_.c", produced by Gambit v4.9.3
(
409003
(C)
"_gsi_"
(("_kernel" (preload . #t)) ("_system" (preload . #t)) ("_num" (preload . #t)) ("_std" (preload . #t)) ("_eval" (preload . #t)) ("_io" (preload . #t)) ("_nonstd" (preload . #t)) ("_thread" (preload . #t)) ("_re... |
<filename>sort/Insertion.java<gh_stars>0
public class Insertion {
public static void main(String[] args) {
int[] arr = {55, 33, 77, 11, 38, 55, 58, 11, 2, 9};
arr = insertion(arr);
for (int i = 0; i < arr.length; i++) {
System.out.println(arr[i]);
}
}
... |
#ifndef __TCREWRITE_ACTION_MAPPINGS_XML__H_
#define __TCREWRITE_ACTION_MAPPINGS_XML__H_
#include "apache_typedefs.h"
#include "oidc_core_constants.h"
#include "cookie.h"
typedef struct action_header_xml{
char* name;
char* value;
char* regex;
header_actions action;
}action_header_xml;
// custom response
t... |
package br.com.Uana.farmacia.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.Mi... |
# #!/usr/bin/env bats
# # shellcheck shell=bats
# # shellcheck disable=SC2294,SC2004
# load "$GAUDI_TEST_DIRECTORY/helper.bash"
# load "$GAUDI_BASH/components/completions/lib/gaudi-bash.completions.bash"
# local_setup() {
# prepare
# }
# __check_completion() {
# # Get the parameters as a single value
# COMP_LINE... |
<filename>Calandria/static/sql/doscompuestos.sql
INSERT INTO [squeegee].[dbo].[receta]
([pliego_goma] ,[pliego_mesa_alta] ,[green_tire]
,[presion_rodillo] ,[velocidad_maxima]
,[compuesto_a]
,[calibre_caliente_a] ,[ancho_squeegee_a] ,[ancho_pliego_a] ,[dima_a] ,[dimb_a]
,[compuesto_b]
... |
var searchData=
[
['cid_2eh',['cid.h',['../cid_8h.html',1,'']]],
['cmap_2eh',['cmap.h',['../cmap_8h.html',1,'']]]
];
|
def find_max(arr):
'''This function returns the maximum element in the given array.'''
maxval = arr[0]
for num in arr:
if num > maxval:
maxval = num
return maxval |
<gh_stars>1-10
//
// DDMICircleIndicator.h
// HMLoginDemo
//
// Created by lilingang on 15/8/5.
// Copyright (c) 2015年 lilingang. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface DDMICircleIndicator : UIView
- (instancetype)initWithFrame:(CGRect)frame;
- (instancetype)initWithFrame:(CGRect)frame imageN... |
// The MIT License (MIT)
// Copyright (c) 2017 <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 Software without restriction, including without limitation the
// rights to use, copy, modif... |
<filename>ph-jdmc-example/src/main/java/com/helger/aufnahme/businessobj/EExDeadwoodCategoryBO.java
/*
* Copyright (C) 2018-2019 <NAME> (www.helger.com)
* philip[at]helger[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
... |
#!/bin/bash
# to support context window = 1, 2, 4, 8, 16
./trans_psyc_padding.sh MISC11 ML 17
./trans_psyc_padding.sh MISC11 EL 17
./trans_psyc_padding.sh MISC11 WOE 17
|
import pdb
from django.db import models
# import io3d
from datetime import datetime
from django.urls import reverse
from django.conf import settings
from django.contrib.auth import get_user_model
from loguru import logger
import os.path as op
from . import scaffanweb_tools
from django.contrib.auth.models import User
f... |
#!/bin/sh
sentry_properties="defaults.url=https://sentry.io
defaults.org=${SENTRY_ORG}
defaults.project=${SENTRY_PROJECT_IOS}
auth.token=${SENTRY_AUTH_TOKEN}
cli.executable=../node_modules/sentry-cli-binary/bin/sentry-cli"
if [[ "${SENTRY_ENABLED}" = "true" ]]; then
if [[ ! -f "sentry.properties" ]]; then
echo "Cr... |
<gh_stars>0
import React from 'react';
import { Link } from 'react-router-dom';
import Logo from './Logo_alps.svg';
import {
LoginFieldHeaderWrapper,
LogoWrapper,
MsgWrapper,
MsgFirst,
MsgSecond,
} from './styles';
const LoginFieldHeader = () => (
<LoginFieldHeaderWrapper>
<LogoWrapper>
<Link to=... |
#include "guibase.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
void GenericHandleKeyboard( struct GUIBase * b, int c, int down, int focused )
{
if( b->focused )
{
if( c == '\n' || c == ' ' )
{
if( b->depressed && !down )
{
b->ProcessClick( b );
}
else if( down )
{
b->depr... |
public class ReverseWord {
public static void main(String[] args) {
String word = "Hello";
String reversedWord = "";
for (int i = word.length() - 1; i >= 0; i--) {
reversedWord = reversedWord + word.charAt(i);
}
System.out.println("Reversed Word: " + reversedWord... |
def setCompilerEnv(compilerType, version):
if compilerType == "GXX":
os.environ["GXX"] = f"{version} -m64"
return f'GXX set to "{version} -m64"'
elif compilerType == "CLANG":
os.environ["CLANG"] = f"llvm/{version}/build-64/bin/clang"
os.environ["LLVM_CONFIG"] = f"llvm/{version}/b... |
<filename>controllers/Auth/model.js
response_handler = require('../../tools/response_handler')
const MODEL = require('../models/user')
function signUp(opts){
MODEL.findOne({ email: opts.email}, (err, res) => {
const userRequest = new MODEL(opts);
userRequest.save((err)=>{
return... |
package com.codepath.apps.restclienttemplate.models;
import android.util.Log;
import com.codepath.apps.restclienttemplate.TwitterApp;
import com.codepath.apps.restclienttemplate.TwitterClient;
import com.loopj.android.http.JsonHttpResponseHandler;
import org.json.JSONArray;
import org.json.JSONException;
import org.... |
CQChartsTest -tcl -exec sea_level.tcl
#CQChartsTest -ceil -exec sea_level.cl
#CQChartsTest -script -exec sea_level.script
|
<reponame>muthukumaravel7/armnn
var _convolution2d_8cpp =
[
[ "BOOST_AUTO_TEST_CASE", "_convolution2d_8cpp.xhtml#ad1bbdfb7f84728a260a85977ed9d2b66", null ],
[ "BOOST_FIXTURE_TEST_CASE", "_convolution2d_8cpp.xhtml#ad52ea914207c4b931ce66e10e41a23b1", null ],
[ "BOOST_FIXTURE_TEST_CASE", "_convolution2d_8cpp.x... |
<reponame>tenebrousedge/ruby-packer
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../../../shared/enumerator/with_object', __FILE__)
describe "Enumerator#with_object" do
it_behaves_like :enum_with_object, :with_object
end
|
<filename>7-assets/mout/array/join.js
"use strict";
exports.__esModule = true;
var filter_1 = require("./filter");
function isValidString(val) {
return val != null && val !== '';
}
/**
* Joins strings with the specified separator inserted between each value.
* Null values and empty strings will be excluded.
*/
f... |
#!/bin/bash
if [ "$TASKLIST" = "" ]; then
TASKLIST="correlation heat bfs markov gaussblur"
fi
if [ "$TYPE" = "" ]; then
TYPE="time energy"
fi
if [ "$RESLIST" = "" ]; then
RESLIST="IntelXeon MaxelerVectis NvidiaTesla"
fi
if [ "$SIZELIST" = "" ]; then
SIZELIST="128
256
512
1024
2048
4096
8192
16384"
fi
export LD_PRE... |
#!/bin/bash
# Script to deploy a very simple web application.
# The web app has a customizable image and some text.
cat << EOM > /var/www/html/index.html
<html>
<head><title>Meow!</title></head>
<body>
<div style="width:800px;margin: 0 auto">
<!-- BEGIN -->
<center><img src="http://${PLACEHOLDER}/${WIDTH}/$... |
def validate_boundary_pairs(pBd):
if not isinstance(pBd, dict):
return False
bnPOOL = set()
for pair in pBd:
if '=' not in pair or pair.count('=') > 1:
return False
bn1, bn2 = pair.split('=')
if (bn1, bn2) in bnPOOL or (bn2, bn1) in bnPOOL:
return Fal... |
#!/bin/bash
source ../../../.dbFlow/lib.sh
# target environment
source ../../../build.env
source ../../../apply.env
# ------------------------------------------------------------------- #
echo " ============================================================================="
echo " == Installing osalvador/tePLSQL: M... |
#Linear search function
def linear_search(list, x):
for i in range(len(list)):
if list[i] == x:
return i
return -1 |
<filename>service/healthlake/api.go
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package healthlake
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github... |
def load_buf(buf, frequency):
N_SAMPLES = 44100 # Example value for the total number of audio samples
SAMPLE_RATE = 44100 # Example value for the sample rate
PERIOD_SIZE = 1024 # Example value for the period size
wave = [...] # Example array containing audio wave samples
step = N_SAMPLES * freq... |
<reponame>cn2oo8/molicode<filename>molicode-web/src/main/java/com/shareyi/molicode/controller/sys/AcUserController.java
/**
* Copyright(c) 2004-2018 bianfeng
*/
package com.shareyi.molicode.controller.sys;
import com.shareyi.molicode.common.annotations.UserAuthPrivilege;
import com.shareyi.molicode.common.web.Com... |
#!/bin/bash
# Copyright 2012 Vassil Panayotov
# 2016 Cristina Espana-Bonet
# 2018 Idiap Research Institute (Author: Enno Hermann)
# Apache 2.0
. ./cmd.sh
. ./path.sh
stage=0
train=true
DYS_SPEAKERS="F01 F03 F04 M01 M02 M03 M04 M05"
CTL_SPEAKERS="FC01 FC02 FC03 MC01 MC02 MC03 MC04"
ALL_SPEAKE... |
/*
* 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 hermes.client;
/**
*
* @author <NAME> (d120041) <<EMAIL>>
*/
public class ClientStatus {
public static final String Al... |
#network interface on which to limit traffic
IF="eth0"
#limit of the network interface in question
LINKCEIL="1gbit"
#limit outbound Bitcoin protocol traffic to this rate
LIMIT="160kbit"
#defines the address space for which you wish to disable rate limiting
LOCALNET="192.168.0.0/16"
#delete existing rules
tc qdisc del ... |
function sort(arr) {
for (let i = 0; i < arr.length - 1; i++) {
let minIndex = i;
for (let j = i + 1; j < arr.length; j++) {
if (arr[j] < arr[minIndex]) {
minIndex = j;
}
}
let temp = arr[minIndex];
arr[minIndex] = arr[i];
arr[i] = temp;
}
return arr;
}
let sortedArr =... |
def closest_prime(n):
if is_prime(n):
return n
#check if n+1 is prime
if is_prime(n+1):
return n+1
#check if n-1 is prime
elif is_prime(n-1):
return n-1
else:
#check if n+2 is prime
if is_prime(n+2):
return n+2
#check if n-2 is prime
elif is_prime(n-2):
return n-2
#if nothing works, keep incrementing... |
<reponame>guozefei/xueba<gh_stars>1-10
var schoolList = [{
"id": 1,
"school": [{
"id": 1001,
"name": "\u6e05\u534e\u5927\u5b66"
},
{
"id": 1002,
"name": "\u5317\u4eac\u5927\u5b66"
},
{
"id": 1003,
"name": "\u4e2d\u56fd\u4eba\u6c11\u5927\u5b66"
... |
# --coding--:utf-8 --
import cv2
import mediapipe as mp
import time
class PoseDetector:
def __init__(self, mode = False, upBody = False, smooth=True, detectionCon = 0.5, trackCon = 0.5):
self.mode = mode
self.upBody = upBody
self.smooth = smooth
self.detectionCon = detectionCon... |
// ======================批量执行Promise.all======================
// Promise.all([p1,p2,p3])用于将多个Promise实例,包装成一个新的Promise实例
// 参数是一个数组,数组里可以是Promise对象也可以是别的值,只有Promise会等待状态改变
// 当所有子Promise都完成后,该Promise完成,返回值是全部值的数组
// 有任意一个失败,该Promise失败,返回第一个失败的子Promise的结果
console.log('satrt');
Promise.all([1, 2, 3])
.then(all => {... |
gpu=$1
W2V_PATH=../libri/wav2vec2_small.pt
GPT='gpt2'
SAVE_DIR=exp/finetune_w2v_cif2_gpt2V2_en
DATA_DIR=data/en/gpt2_style
label_type=word
TOKENIZERS_PARALLELISM=false CUDA_VISIBLE_DEVICES=$gpu fairseq-train $DATA_DIR \
--save-dir $SAVE_DIR --tensorboard-logdir $SAVE_DIR \
--train-subset train --valid-subset dev --no-... |
import {PrefsAction, PrefsState} from "./types"
const init: PrefsState = {
jsonTypeConfig: "",
timeFormat: "",
suricataRunner: "",
suricataUpdater: "",
zeekRunner: "",
dataDir: ""
}
export default function reducer(
state: PrefsState = init,
action: PrefsAction
): PrefsState {
switch (action.type) {
... |
<gh_stars>0
const moment = require('moment');
const fs = require('fs');
const prettyBytes = require('pretty-bytes');
const { toString: prettyCron } = require('prettycron');
const { instance: cron } = require('./CronService');
const { compact, isEmpty } = require('../util/ArrayUtils');
const imageExtensions = require('i... |
export default function($ionicNativeTransitionsProvider){
'ngInject';
$ionicNativeTransitionsProvider.setOptions({
"duration": 400, // in milliseconds (ms), default 400
"slowdownfactor": 4, // overlap views (higher number is more) or no overlap (1), default 4
"iosdelay": 60, // ms to wa... |
#!/bin/bash
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# if version not passed in, default to latest released version
VERSION=2.4.1
# if ca version not passed in, default to latest released version
CA_VERSION=1.5.2
ARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mi... |
(( $+commands[apt] )) && APT=apt || APT=apt-get
alias acs='apt-cache search'
alias afs='apt-file search --regexp'
# These are apt/apt-get only
alias ags="$APT source"
alias acp='apt-cache policy'
#List all installed packages
alias agli='apt list --installed'
# superuser operations ################################... |
package main;
/**
* @author <NAME>
*
*/
public class TestBMI
{
public static void main(String[] args)
{
BMI bmi1 = new BMI("<NAME>", 18, 145, 70);
System.out.println("The BMI for " + bmi1.getName() + " is " + bmi1.getBMI() + " " + bmi1.getStatus());
BMI bmi2 = new BMI("<NAME>", 215, 70);
System.o... |
function countCharacters(str) {
const counts = {};
for (char of str) {
counts[char] = counts[char] ? counts[char] + 1 : 1;
}
return counts;
} |
# -*- coding: utf-8 -*-
# @Author: Administrator
# @Date: 2019-05-23 22:59:59
# @Last Modified by: Administrator
# @Last Modified time: 2019-05-26 05:51:52
__all__ = [
"FollowEnemyBehindBrickDecision",
]
from ..abstract import SingleDecisionMaker
from ...global_ import np
from ...action import Action
fr... |
import { BigInt } from '@graphprotocol/graph-ts'
import {
Basset,
FeePaidTransaction,
StakingRewardsContractClaimRewardTransaction,
StakingRewardsContractStakeTransaction,
StakingRewardsContractWithdrawTransaction,
SwapTransaction,
} from './../../generated/schema'
import {
RewardPaid,
Staked,
Withdra... |
<gh_stars>1000+
from flask import Blueprint
from flask import render_template
from app import db
from app.models import Playlist
# Setup the Blueprint
playlists_bp = Blueprint(
"playlists_bp",
__name__,
template_folder="templates",
static_folder="static",
)
@playlists_bp.route("/playlists", methods=... |
<reponame>helm100/2d-cdt
// Copyright 2020 <NAME> and <NAME>
#include <string>
#include <vector>
#include "hausdorff_dual.hpp"
void HausdorffDual::process() {
std::string tmp = "";
max_epsilon = Universe::nSlices;
for (int i = 1; i < max_epsilon; i++) {
auto t = randomTriangle();
std::vector<Triang... |
<gh_stars>1-10
/*
* Copyright 2018-2020 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
*
* https://www.apache.org/licenses/LICENSE-2.0
... |
"""
Create a function that returns a list of all the primes from 1 to a given number
"""
def primes(max_prime):
primes = []
for number in range(2, max_prime + 1):
prime = True
for i in range(2,number):
if (number % i == 0):
prime = False
if prime:
... |
package com.github.mlworthing.rl.problems
import com.github.mlworthing.rl.environments.{FiniteEnvironment, StaticFiniteEnvironment}
/**
* Based on "Reinforcement Learning: An Introduction. Second edition"
* by <NAME> and <NAME>, Example 3.3
* The recycling robot example was inspired by the can-collecting robot
... |
#!/bin/bash
INIT="shiny gold"
if [ -z "$1" ]; then
rm results
touch results
else
INIT="$1"
fi
echo $INIT
LINES=$(grep "$INIT bags\?[\\.,]" input | cut -d' ' -f1-2 | tee -a results)
if [ -z "$LINES" ]; then
echo "exiting"
exit
fi
while IFS= read line; do
./bags.sh "$line"
done <<< "$LINES"
if [ -z "$1... |
<reponame>3beca/cep-ui
import * as React from 'react';
import { Router } from 'react-router-dom';
import { createMemoryHistory, History } from 'history';
import { render } from '@testing-library/react';
import { MainMenuProvider } from '../services/main-menu-provider';
import { APIProviderMock } from './api-provider-mo... |
/*
* Copyright The Stargate 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 ... |
from subprocess import run, CalledProcessError
from typing import List
def run_services(service_names: List[str]) -> None:
for service in service_names:
try:
run(['docker-compose', 'run', '--rm', service], check=True)
except CalledProcessError as e:
print(f"Error running ser... |
import numpy as np
import cv2
import os
def colorify(img):
print("[INFO] loading model... ")
net = cv2.dnn.readNetFromCaffe("model/colorization_deploy_v2.prototxt", "model/colorization_release_v2.caffemodel")
pts= np.load("model/pts_in_hull.npy")
print("done......")
class8 = net.getLayerId("class8_ab")
conv8 ... |
<reponame>Grasea/Grandroid2
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.grasea.grandroid.database;
import android.content.ContentValues;
import android.content.Context;
import android.util.Log;
/**
*
* @author Rovers
*/
public class FaceData exten... |
echo "create the directory and set the required ownerships and permissions. \
The directory is used for configuring the ***-site.xml files under 'hadoopConfSitesSettings'"
su - akin
sudo mkdir -p /app/hadoop/tmp
cd /
sudo chown hduser:hadoop /app/hadoop/tmp
sudo chmod 750 /app/hadoop/tmp
echo "permissions: 0 = no oper... |
#!/bin/bash
python3 -m pip install boto3
python3 /bin/processor.py
|
<reponame>jrfaller/maracas
package com.github.maracas.compchangestests;
import static com.github.maracas.brokenuse.APIUse.METHOD_INVOCATION;
import static com.github.maracas.brokenuse.APIUse.METHOD_OVERRIDE;
import static japicmp.model.JApiCompatibilityChange.METHOD_RETURN_TYPE_CHANGED;
import org.junit.jupiter.api.D... |
<gh_stars>1-10
import { h } from "../h";
import { createToken } from '@virtualstate/x';
import { Template } from '../template';
const Select = createToken(
Symbol("Select"),
{
defaultValue: "",
class: "select"
},
<option disabled>No options available</option>
);
interface PersonUpdateOptions {
first... |
#!/bin/bash
# arrumar DNS
# ethernet_984fee0554ed_cable
ETHERNET="$(connmanctl services | sed 's/^.*Wired //')"
connmanctl config ${ETHERNET} --nameservers 8.8.8.8
# atualizar repositorios
opkg update
# instalar http file server
opkg install nodejs-npm
npm install http-server -g
# instalar pip
easy_i... |
def euclidean_distance(x1, y1, x2, y2):
dx = x2 - x1
dy = y2 - y1
return math.sqrt(dx*dx + dy*dy)
euclidean_distance(2, 3, 5, 7) |
from django.views.generic import DetailView
from django.urls import reverse
from django.shortcuts import redirect
from django import forms
from devilry.apps.core.models import Assignment
from devilry.devilry_gradingsystem.pluginregistry import gradingsystempluginregistry
from .base import AssignmentSingleObjectMixin
... |
<reponame>AmyE29/Cookie-stand<gh_stars>0
'use strict';
var shopHours = ['6am', '7am', '8am', '9am', '10am', '11am', '12pm', '1pm', '2pm', '3pm', '4pm', '5pm', '6pm', '7pm', '8pm'];
CookieStores.locationHoursTotal = [];
function randomNumber(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
var al... |
#!/bin/bash
ffmpeg -f x11grab -r 15 -s 3840x2160 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -vf scale="1280x720" -f v4l2 /dev/video1
|
package cn.zqgx.moniter.center.server.portal.trans.mapper;
import cn.zqgx.moniter.center.server.portal.trans.bean.DataAir;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface DataAirMapper extends BaseMapper<DataAir> {
}
|
#!/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... |
<filename>common/forms.py
from django import forms
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.forms import UserCreationForm
from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import gettext as _
from common.models import Sem... |
package org.jooby.issues;
import java.util.Date;
import org.jooby.Parser;
import org.jooby.test.ServerFeature;
import org.junit.Test;
public class Issue408 extends ServerFeature {
public static class Bean408 {
public Integer id;
public String title;
public Date releaseDate;
@Override
public... |
<reponame>minuk8932/Algorithm_BaekJoon<filename>src/math/Boj2896.java
package math;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
/**
*
* @author minchoba
* 백준 2896번: 무알콜 칵테일
*
* @see https://www.acmicpc.net/problem/2896/
*
*/
public class Boj2896 {
privat... |
<gh_stars>0
import React, { ChangeEvent, FormEvent } from 'react';
import styled from 'styled-components';
import { Button, Title, Input } from 'woly';
import { createStore, createEvent } from 'effector-root';
import { reflect } from 'effector-reflect/ssr';
import Logo from 'logo.svg';
import { CenterCardTemplate } fr... |
<gh_stars>1-10
package rest_test
import (
"bytes"
"encoding/json"
"net/http/httptest"
"net/url"
"testing"
"github.com/GabrielCarpr/cqrs/bus"
"github.com/GabrielCarpr/cqrs/ports/rest"
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/suite"
)
type TestCmd struct {
bus.CommandType
TestVal string
T... |
#!/bin/bash
# input folders:
# version : contains a file called number with the current version
# source-code : contains the source code
# output folders:
# build: contains the built jar
set -e
export ROOT_FOLDER=$( pwd )
source ./pipeline/tasks/common.sh
#VERSION=$(build_version "./version" "number" "./source-code... |
<filename>service/preset_responses.go<gh_stars>1-10
package service
import (
"net/http"
"github.com/NYTimes/video-transcoding-api/swagger"
)
type newPresetResponse struct {
baseResponse
}
type deletePresetResponse struct {
baseResponse
}
// error returned when the given preset data is not valid.
//
// swagger:... |
#!/bin/bash
# Copyright (c) 2020 Intel Corporation.
# All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
set -eE
#--------- Global variable -------------------
reboot_required=0
QEMU_REL="qemu-4.2.0"
CIV_WORK_DIR=$(pwd)
CIV_GOP_DIR=$CIV_WORK_DIR/GOP_PKG
#--------- Functions --------------... |
TERMUX_PKG_HOMEPAGE=https://www.openssl.org/
TERMUX_PKG_DESCRIPTION="Library implementing the SSL and TLS protocols as well as general purpose cryptography functions"
TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_DEPENDS="ca-certificates"
TERMUX_PKG_VERSION=1.1.1c
TERMUX_PKG_REVISION=2
TERMUX_PKG_SHA256=f6fb3079ad15076154eda9413... |
"use strict";
function FixedCamera(options)
{
this.origin = options.origin || [0, 0, 0]
this.target = options.target || [0, 0, -1]
this.fov = options.fov || Math.PI * 0.5
this.shake = options.shake || 0
}
FixedCamera.prototype.render = function(time, renderParameters)
{
renderParameters.camera.origin... |
#!/usr/bin/env sh
# 确保脚本抛出遇到的错误
set -e
# 生成静态文件
npm run docs:build
# 进入生成的文件夹
cd docs/.vuepress/dist
# 如果是发布到自定义域名
# echo 'www.example.com' > CNAME
git init
git add -A
git commit -m 'deploy'
# 如果发布到 https://<USERNAME>.github.io
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master
# 如果发布到 https... |
<reponame>dwicao/naturia
const fetch = require("node-fetch");
const runner = () =>
fetch("https://api.adviceslip.com/advice").then(response => response.json());
module.exports = {
runner,
name: "advice",
description: "Generate a random advice",
async execute(message, args) {
const result = await runner(... |
/*
* Copyright (c) Open Source Strategies, Inc.
*
* Opentaps is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Opentap... |
public class Search {
public static void main(String[] args) {
int x = 99;
int[] nums = {87, 54, 23, 99, 66};
// search for the element
int index = -1;
for (int i = 0; i < nums.length; i++) {
if (nums[i] == x) {
index = i;
break;
}
}
if (index != -1)
System.out.println("Element x... |
# -*- coding: utf-8 -*-
# Librerias Django:
from __future__ import unicode_literals
from django.db import models
# Otros Modelos:
from activos.models import Equipo
# from activos.models import Odometro
class Programa(models.Model):
PERIODICIDAD = (
('DIA', 'DIA'),
('SEM', 'SEMANAL'),
(... |
package io.github.tehstoneman.cashcraft.command;
public class CommandCashCraft// extends CommandBase
{
/*
* @Override
* public String getName()
* {
* // TODO Auto-generated method stub
* return "cash";
* }
*/
/*
* @Override
* public String getUsage( ICommandSender sender )
* {
* // TODO Auto-g... |
#! /bin/bash
# This script expects to be executed with the current working directory:
#
# kgtk/datasets/time-machine-20101201
source common.sh
# ==============================================================================
# Setup working directories:
mkdir --verbose ${DATADIR}
mkdir --verbose ${TEMPDIR}
mkdir --ver... |
def multiplication_table(size):
# Print the header
print(" x |", end='')
for i in range(1, size + 1):
print("{:>3d}".format(i), end='')
print()
# Print separator
print("-----------------------------------------")
# Generate multiplication table
for i in range(1... |
# frozen_string_literal: true
module RunningStation
class ApplicationJob < ActiveJob::Base
end
end
|
#!/bin/bash
sudo apt-get update
sudo apt-get install docker.io
sudo systemctl enable docker
sudo systemctl status docker
sudo curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add
sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main"
sudo apt-get install kubeadm kubel... |
using System;
namespace HelloWorld {
class Program {
static void Main(string[] args) {
Console.WriteLine("Hello World!");
}
}
} |
package com.dubture.symfony.ui.preferences;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.Path;
import org.eclipse.dltk.internal.ui.wizards.dialogfields.SelectionButtonDialogField;
import org.eclipse.php.internal.ui.preferences.IStatusChangeListene... |
<reponame>minuk8932/Algorithm_BaekJoon
package breadth_first_search;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.LinkedList;
import java.util.Queue;
import java.util.StringTokenizer;
/**
*
* @author minchoba
* 백준 2146번 : 다리만들기
*
* @see https://www.acmicpc.net/problem/2146
... |
#!/bin/bash -e
# Shell script to initialize a pip-accel test environment.
#
# Author: Peter Odding <peter.odding@paylogic.com>
# Last Change: March 14, 2016
# URL: https://github.com/paylogic/pip-accel
#
# This shell script is used in tox.ini and .travis.yml to prepare
# virtual environments for running the pip-accel ... |
#!/bin/bash
#SBATCH --partition=batch --time=00:30:00 --mem-per-cpu=1000 --cpus-per-task=4
module load git
module load miniconda
# For conda environment
LOCAL_DIR="/dev/shm/$SLURM_JOB_ID"
LOCAL_CONDA_DIR="$LOCAL_DIR/miniconda/"
mkdir -p "$LOCAL_CONDA_DIR" || exit 1
# Set up trap to remove my results on exit from th... |
<reponame>sillyhong/whongjiagou-learn
require('./utils/utility1.js');
require('./utils/utility2.js');
require('lodash'); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.