text stringlengths 1 1.05M |
|---|
<reponame>destenson/tensorflow--tensorflow
/*
Copyright 2016 The TensorFlow 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-... |
#!/usr/bin/env bash
nsml run \
-m 'kaist korquad open' \
-d korquad-open-ldbd \
-g 1 \
-c 1 \
-e run_squad_base_finetuned.py \
-a "--model_type electra
--model_name_or_path monologg/koelectra-base-v2-finetuned-korquad-384
--do_train
--do_eval
--data_dir train
--num_train_epochs 5
--... |
#!/bin/bash
# This is run on every commit that Azure Pipelines picks up. It assumes that docs have already been built
# via docs/build.sh. The push behavior differs depending on the nature of the commit:
# * Tag commit (e.g. v1.6.0): pushes docs to versioned location, e.g.
# https://www.envoyproxy.io/docs/envoy/v1.6... |
<gh_stars>1-10
const TelegramBot = require('node-telegram-bot-api');
var config = require('./config')
var firebase = require('firebase')
var firebase_config = config.firebase_config;
var token = config.token;
firebase.initializeApp(firebase_config);
const bot = new TelegramBot(token, {polling: true});
const ... |
#!/bin/bash
set -e
cargo clean
# verify using KLEE
# this should detect an error
( cargo-verify --tests --verbose . > out1 || true )
cat out1
grep -q "test t1 ... .*ERROR" out1
# replay input values
( cargo-verify --tests --replay . > out2 || true )
cat out2
grep -q "Test values: a = 1000, b = 1000" out2
|
#ifndef INCLUDED_CORE_MAP_I_OUTPUT_H
#define INCLUDED_CORE_MAP_I_OUTPUT_H
#include "platform/auto_id.h"
#include "core/opt.h"
#include "boost/function.hpp"
#include "function_declarations.h"
namespace map {
class IOutput
{
public:
virtual ~IOutput() {};
virtual void PlugInNode( int32_t ordinal, int_function_t... |
#!/bin/bash
rm serialService
clear |
/**
* @fileoverview
*
* Actions for base
*/
goog.provide("app.state.BaseActions");
/**
* [BaseActions description]
* @enum {Function}
*/
app.state.BaseActions = {};
app.state.BaseActions.isLoading = function ( loading ) {
return {
type: "IS_LOADING",
payload: loading
}
}
app.state.BaseActions.isLoaded = ... |
#!/usr/bin/env bash
# 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
#... |
#!/bin/bash
#PBS -q gpu
#PBS -l select=1:ncpus=1:mem=10gb:ngpus=1:scratch_local=3gb:cluster=adan
#PBS -l walltime=2:00:00
DATADIR=/storage/brno6/home/apprehension
cd $DATADIR
module add python-3.6.2-gcc
module add python36-modules-gcc
module add tensorflow-1.13.1-gpu-python3
module add opencv-3.4.5-py36
module add ... |
// ==UserScript==
// @name Blocker Monkey
// @namespace https://greasyfork.org/zh-TW/users/848949-kajipa-coder
// @version 1.0
// @description An addon prevents children visiting Gaming Website.Made with JS.
// @license Blocker Monkey @ CopyRight 2022
// @author Jypa
// @author HahaLou... |
create table user_progress (
id integer PRIMARY KEY,
user_string varchar(40) UNIQUE NOT NULL,
display integer NOT NULL,
last_modif date
);
|
<filename>src-ts/button/utils.ts
/*
Copyright (c) 2018-2020 Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import {ButtonProps} from './types';
export function getSharedProps({
disabled,
isLoading,
isSelected,
... |
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# A script that uploads the payload.json to aws s3 bucket, and
# create a new package on the core update server.
# jq, docker and updateservicectl (https://github.com/coreos/updateservicectl)
# are required.
# Assume the payload.json is in the curren... |
def linearSearch(arr, x):
for i in range (len(arr)):
if arr[i] == x:
return i
return -1 |
#!/bin/bash
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# Copyright (c) 2014 hellofwy
#
# 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, inclu... |
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <headingcell level=1>
# Exploring the Lorenz System of Differential Equations
# <markdowncell>
# In this Notebook we explore the Lorenz system of differential equations:
#
# $$
# \begin{aligned}
# \dot{x} & = \sigma(y-x) \\
# \dot{y} & = \rho x - y - xz \\
# \do... |
import { camelCase } from 'lodash';
/**
* 获取处理后的项目名称
* @param pkgName
*/
export function getProjectName(pkgName: string) {
// strip none @umijs scope
if (pkgName.charAt(0) === '@') {
pkgName = pkgName.split('/')[1];
}
return nameToKey(pkgName);
}
function nameToKey(name: string) {
return name
.sp... |
<reponame>enviroCar/track-count-service
package org.envirocar.trackcount.mapmatching;
import static java.util.stream.Collectors.toList;
import java.io.IOException;
import java.util.List;
import java.util.Objects;
import java.util.stream.IntStream;
import org.envirocar.trackcount.model.Feature;
import org.envirocar.t... |
<gh_stars>0
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ProductFormComponent } from './components/product-form/product-form.component';
import { NavComponent } from './components/nav/nav.component';
import { ProductsTableComponent } from './components/prod... |
#!/bin/sh
MACOS_DIR=`dirname $0`
# Setting DYLD_FRAMEWORK_PATH allows us to avoid
# running install_name_tool on plugins.
export DYLD_FRAMEWORK_PATH=${MACOS_DIR}/../Frameworks
export DYLD_LIBRARY_PATH=${MACOS_DIR}/../Frameworks
${MACOS_DIR}/vaa3d $@
|
def remove_long_strings(strings):
"""Function to remove words with more than 4 characters"""
short_strings = []
# loop through the strings and keep only those with <= 4 characters
for s in strings:
if len(s) <= 4:
short_strings.append(s)
return short_strings
strings = ["cat", ... |
pip freeze
nosetests --with-coverage --cover-package moban_handlebars --cover-package tests tests docs/source moban_handlebars
|
#!/bin/bash
## Copyright (C) 2016 International Business Machines Corporation
## All Rights Reserved
################### parameters used in this script ##############################
#set -o xtrace
#set -o pipefail
namespace=sample
composite=LiveDNSPacketDPDKSourceBasic
here=$( cd ${0%/*} ; pwd )
projectDirectory... |
import datetime
def totaltimer(times):
td = datetime.timedelta(0) # initial value of sum (must be a timedelta)
duration = sum([
datetime.timedelta(minutes=m, seconds=s) for m, s in times],
td)
return duration
if __name__== '__main__': # test when module run as main script
time... |
#!/bin/bash
#SBATCH --account=def-dkulic
#SBATCH --mem=8000M # memory per node
#SBATCH --time=23:00:00 # time (DD-HH:MM)
#SBATCH --output=/project/6001934/lingheng/Double_DDPG_Job_output/continuous_RoboschoolHopper-v1_doule_ddpg_hardcopy_epsilon_greedy_seed5_run8_%N-%j.out # %N for node name, %j f... |
public enum UiState
{
UserManagement,
PluginManagement,
SourceManagement
}
public class UIManager
{
public void UpdateUI(UiState state)
{
HeaderView.Visibility = Visibility.Visible;
HeaderView.UiTitel = GetUiTitle(state);
switch (state)
{
case UiState.Us... |
<gh_stars>1-10
const request = require('node-superfetch'),
{ MessageEmbed } = require('discord.js');
exports.run = async (client, msg, args) => {
try {
if (args.length < 1) return msg.channel.send(`${client.settings.prefix}${exports.help.usage}`);
const query = args.join(' ');
const company = await sea... |
<reponame>Hyperparticle/lct-master<gh_stars>1-10
#!/usr/bin/env python3
import pandas as pd
import numpy as np
if __name__ == "__main__":
data = pd.read_csv('creditcard.csv')[['V' + str(i+1) for i in range(28)] + ['Amount', 'Class']]
true = data[data.Class == 1]
false = data[data.Class == 0][:5000 - len(true)]... |
#!/usr/bin/env bash
# Copyright Monwoo 2017, service@monwoo.com, code by Miguel Monwoo
GREEN='\033[32m'
RED='\033[41m'
COLOR_RESET='\033[0m'
# set -x # echo commandes
# echo commandes in green colors
trap 'echo -e "${GREEN}# $BASH_COMMAND$COLOR_RESET";export DEBUGTRAP=$BASH_COMMAND' DEBUG
function err_handler ()
{
... |
import FieldEnum from 'types/enums/field-enum';
export default interface Field {
types: Array<FieldEnum>;
}
|
<reponame>ChristopherChudzicki/mathbox<gh_stars>1-10
export default /* glsl */ `uniform sampler2D dataTexture;
vec4 sample2D(vec2 uv) {
return texture2D(dataTexture, uv);
}
`;
|
#!/bin/bash
TASK=8
SHOT=1
LANG=de
MODEL=uc2
MODEL_CONFIG=uc2_base
TASKS_CONFIG=iglue_test_tasks_boxes36.dtu
TRTASK=RetrievalxFlickrCO${LANG}_${SHOT}
TETASK=RetrievalxFlickrCO${LANG}
TEXT_PATH=/home/projects/ku_00062/data/xFlickrCO/annotations/${LANG}/test.jsonl
FEAT_PATH=/home/projects/ku_00062/data/xFlickrCO/features... |
#!/bin/bash
##
## This file is part of the `src-run/bash-writer-library` project.
##
## (c) https://github.com/src-run/bash-writer-library/graphs/contributors
##
## For the full copyright and license information, please view the LICENSE.md
## file that was distributed with this source code.
##
#
# write out command s... |
package com.balceda.reservationsapp.controller;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bin... |
#!/bin/bash
DEVELOPER_NAME=developer
DEV_HOME=/home/${DEVELOPER_NAME}
# x11vncへの追加引数
if [ -n "$X11VNC_ARGS" ]; then
sed -i "s/^command=gosu {{USER}} x11vnc.*/& ${X11VNC_ARGS}/" /etc/supervisor/conf.d/supervisord.conf
fi
# VNCパスワード設定
if [ -n "$PASSWORD" ]; then
mkdir -p ${DEV_HOME}/.x11vnc
echo -n "$PASSW... |
/**
* Module dependencies.
**/
var express = require('express')
, routes = require('./routes')
, http = require('http')
, path = require('path')
, calculator = require('./routes/calculator')
, home = require('./routes/home')
, userProfile = require('./routes/userProfile')
, session = require('client-s... |
from sage.coding.decoder import DecodingError
def linear_code_decoder(code):
try:
# Implement the decoding algorithm here
decoded_message = decoding_algorithm(code) # Placeholder for the actual decoding algorithm
return decoded_message
except DecodingError:
return "Decoding Err... |
<reponame>nabeelkhan/Oracle-DBA-Life
/*
* pseudoRecords.sql
* Chapter 10, Oracle10g PL/SQL Programming
* by <NAME>, <NAME> and <NAME>
*
* This script demonstrates user defined triggers.
*/
SET ECHO ON
CREATE OR REPLACE TRIGGER TempDelete
BEFORE DELETE ON temp_table
FOR EACH ROW
DECLARE
v_TempRec temp_tabl... |
# Import KMeans
from sklearn.cluster import KMeans
# Create KMeans object
kmeans = KMeans(n_clusters=3, random_state=0)
# Train the model
kmeans.fit(X)
# Get the labels
labels = kmeans.labels_
# Get the cluster centroids
centroids = kmeans.cluster_centers_ |
let num1 = 0;
let num2 = 1;
let sum;
console.log(num1);
console.log(num2);
for (let i = 0; i < 8; i++) {
sum = num1 + num2;
console.log(sum);
num1 = num2;
num2 = sum;
} |
# Run
docker run --rm --name slate -p 4567:4567 -v $(pwd)/source:/srv/slate/source slatedocs/slate serve
|
import { ClientApplication } from '@medplum/core';
import express from 'express';
import request from 'supertest';
import { initApp } from '../app';
import { loadConfig } from '../config';
import { closeDatabase, initDatabase } from '../database';
import { isOk, repo } from '../fhir';
import { initKeys } from '../oauth... |
# Import necessary modules
from django.core.management.base import BaseCommand
from django.apps import apps
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from django.db.models import FileField
class Command(BaseCommand):
help = 'Set default file storage for all FileField ... |
# @author <NAME>
module Alimento
class PlatoAmbiental < Plato
include Comparable
include Enumerable
attr_reader :emisiones, :terreno
# @note Constructor de la clase que llama al de Plato y al propio
# @param nombre Identificador del plato
# @param lista Conjunto de alimentos del plato
# @param canti... |
"""
Create an algorithm to calculate the median of a given list of numbers
"""
# Function to calculate the median of a given list of numbers
def median(nums):
# Sort the list
sorted_nums = sorted(nums)
# Check if the list is even or odd
if len(sorted_nums) % 2 == 0:
# If even, calculate the m... |
<reponame>yandld/lpc_uart_server<gh_stars>1-10
#include <pthread.h>
#include <stdio.h>
#include <sys/time.h>
#include <string.h>
#include <unistd.h>
#include <termios.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/select.h>
#include <errno.h>
#include <signal.h>
#d... |
SELECT name, email
FROM Employee
WHERE salary > 80000; |
<gh_stars>0
exports.up = function (knex) {
return knex.schema.createTable('computers', (table) => {
table.string('codigo').primary().notNullable();
table.string('ip').notNullable();
table.string('dominio').notNullable();
table.string('fabricante').notNullable();
table.string... |
package workspace_th.day06.ex01.hashmapEx;
import java.util.*;
public class HashMapEx2 {
public static void main(String[] args) {
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("김자바", 90);
map.put("이순신", new Integer(900));
map.put("전두환", new Integer(190));
map.put("박정희", new Int... |
import React from 'react';
import axios from 'axios';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
products: []
};
}
componentDidMount() {
axios.get('/api/products')
.then(response => this.setState({ products: response.data }));
}
render() {
return (
<div>
... |
/*
*
*/
package net.community.chest.svnkit.core.wc;
import java.util.ArrayList;
import java.util.Collection;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.wc.ISVNInfoHandler;
import org.tmatesoft.svn.core.wc.SVNInfo;
/**
* <P>Copyright as per GPLv2</P>
* @author <NAME>.
* @since Nov ... |
#!/bin/bash
# Kaldi ASR baseline for the CHiME-4 Challenge (1ch track: single channel track)
#
# Copyright 2016 University of Sheffield (Jon Barker, Ricard Marxer)
# Inria (Emmanuel Vincent)
# Mitsubishi Electric Research Labs (Shinji Watanabe)
# Apache 2.0 (http://www.apache.org/licens... |
<gh_stars>0
package api
import (
"context"
"errors"
"github.com/ONSdigital/dp-collection-api/collections"
"github.com/ONSdigital/dp-collection-api/models"
"github.com/ONSdigital/dp-collection-api/pagination"
"github.com/ONSdigital/log.go/v2/log"
"net/http"
)
var (
// errors that should return a 400 status
ba... |
#!/bin/bash
g++ -std=c++17 gen.cpp -o gen
cp-gcc h.cpp -o a
cp-gcc brute.cpp -o brute
for((i=1;;i++)); do
echo $i
./gen $i > in
./a < in > o1
./brute < in > o2
diff <(./a < in) <(./brute < in) || break
done
cat in
#sed -i 's/\r$//' filename ----- remover \r do txt
|
"""Steps for features of Onezone login page.
"""
__author__ = "<NAME>"
__copyright__ = "Copyright (C) 2016 ACK CYFRONET AGH"
__license__ = "This software is released under the MIT license cited in " \
"LICENSE.txt"
from pytest_bdd import given, when, then, parsers
from tests.gui.utils.generic import pars... |
<reponame>droideparanoico/gameoflife
package main.java.model;
import java.util.Random;
public class Universe {
private final int universeSize;
private int livingCells;
private boolean[][] matrix;
public Universe(int universeSize) {
this.universeSize = universeSize;
matrix = new boole... |
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --gres=gpu:v100:0
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=80
#SBATCH --mem=400G
#SBATCH --time=48:00:00
#SBATCH --signal=SIGUSR1@300
#SBATCH --output=host/job/dp/log/mnd_i7-%j.out
module load singularity
export NCCL_DEBUG=INFO
export HYDRA_FULL_ERROR=1
export NCCL_ASY... |
<filename>src/test/java/com/labkit/test/personapi/patch/jax/rs/EntityStorageBeanTest.java<gh_stars>0
package com.labkit.test.personapi.patch.jax.rs;
import org.junit.Test;
import com.vidhya.java.http.patch.jax.rs.EntityStorageBean;
import com.vidhya.java.http.patch.jax.rs.entity.Person;
import com.vidhya.java.http.pa... |
<html>
<body>
<form action="#" method="post">
<label for="username">Username:</label>
<input type="text" name="username" id="username" />
<br><br>
<label for="password">Password:</label>
<input type="password" name="password" id="password" />
<br><br>
<input type="submit" value="Submit" />
</form>
... |
<gh_stars>1-10
// import mongoose from 'mongoose'
const mongoose = require('mongoose');
const DBConnection = async () => {
try {
mongoose.connect(`${process.env.DBSERVER}`, {
useNewUrlParser: true,
useUnifiedTopology: true,
// useCreateIndex: true
});
mon... |
#!/usr/bin/env bash
#
# 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 "Lice... |
/**
* Copyright(c) 2004-2018 bianfeng
*/
package com.shareyi.molicode.manager.conf.impl;
import com.shareyi.molicode.common.enums.columns.AcProjectColumn;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import com.shareyi.mol... |
import torch
from math import sqrt
# Currently, this code is using transpose function several times by 'channels_last'.
# This is to sustain the compatibility with Nvidia Location sensitive attention module.
# If you want to apply this code to other model, consider and modify that.
class Location_Sensitive_Stepwise_M... |
<reponame>surfliner/surfliner-mirror
# frozen_string_literal: true
RSpec.describe CometObjectShowPresenter do
subject(:presenter) { described_class.new(document, ability) }
let(:document) { SolrDocument.new({}) }
let(:ability) { :FAKE_ABILITY }
describe "#member_presenters" do
let(:document) { SolrDocumen... |
package elasta.composer.flow.builder.impl;
import elasta.composer.Events;
import elasta.composer.MsgEnterEventHandlerP;
import elasta.composer.States;
import elasta.composer.flow.builder.FindAllChildFlowBuilder;
import elasta.core.flow.Flow;
import java.util.Objects;
/**
* Created by sohan on 5/28/2017.
*/
final p... |
<filename>core/src/main/java/org/hisp/dhis/android/core/systeminfo/DHISVersion.java<gh_stars>0
/*
* Copyright (c) 2004-2021, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are ... |
#!/bin/bash
# Create a file named "temp"
touch temp
# Check if the file creation was successful
if [ $? -eq 0 ]; then
# If successful, exit with the exit status code equal to the value of the variable "status"
exit $status
else
# If unsuccessful, handle the error (if needed) and exit with a specific error statu... |
def square_numbers(input_string):
squared_numbers = []
for num in input_string:
squared_numbers.append(int(num) ** 2)
return squared_numbers
# test
squared_numbers = square_numbers("123456")
print(squared_numbers) # [1, 4, 9, 16, 25, 36] |
/* **** Notes
Convert into an array.
Remarks:
After calling fn. cv_wv, please call fn. rl to unmap the buffer allocated on the RAM.
Based on UTF-16
*/
# define CAR
# include "./../../../incl/config.h"
signed(__cdecl cv_wv(signed short(*cache),signed short(**di),signed short(**si))) {
auto signed r;
if(!di) retur... |
#!/bin/bash
max=${arr[0]}
for i in "${arr[@]}"
do
if [[ $i -gt $max ]]
then
max=$i
fi
done
echo "The largest number from given array is: $max" |
# Author: <NAME>
# Date: 12/25/17
# Output names from a list by accessing each element
names = ['Adomous','Niles','Ryan','Bob']
print(names[0])
print(names[1])
print(names[2])
print(names[3])
|
/* eslint-disable no-param-reassign */
/* eslint-disable @typescript-eslint/ban-ts-comment */
import {EnhancerResult, EnhancerContext, isFunction, PROPS} from '@truefit/bach';
import {useWatch} from 'react-hook-form';
import {UseWatchProps} from '../types';
type UseWatchPropsGenerator<P> = (props: P) => UseWatchProps;... |
#!/bin/bash
set -euo pipefail
commit=${CODEBUILD_RESOLVED_SOURCE_VERSION:-}
# CODEBUILD_RESOLVED_SOURCE_VERSION is not defined (i.e. local build or CodePipeline build),
# use the HEAD commit hash
if [ -z "${commit}" ]; then
commit="$(git rev-parse --verify HEAD)"
fi
VERSION=$(node -p "require('./package.json').vers... |
# %%
from xgboost import XGBRegressor
from sklearn import metrics
from sklearn.model_selection import train_test_split
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import pickle
# %%
training = pd.read_excel('data/train.xlsx', skiprows=1)
testing = pd.read_excel('data/test.xlsx... |
#include <iostream>
using namespace std;
int factorial(int n)
{
int res = 1;
for (int i = 2; i <= n; i++)
res *= i;
return res;
}
int main()
{
int num = 5;
cout << "Factorial of "
<< num << " = " << factorial(num);
return 0;
}
# Output: Factorial of 5 = 120 |
<reponame>hispindia/BIHAR-2.7
package org.hisp.dhis.dd.action.dataelement;
/*
* Copyright (c) 2004-2012, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributio... |
#!/bin/bash
#SBATCH -J Act_maxout-3_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=2000
#SBATCH -t 23:59:00 # Hours, minutes... |
_base_ = [
'../_base_/models/faster_rcnn_r50_fpn.py',
'../_base_/datasets/coco500_detection_augm.py',
'../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'
]
# optimizer
optimizer = dict(type='SGD', lr=0.04, momentum=0.9, weight_decay=0.0001)
# learning policy
lr_config = dict(step=[75, 95]... |
<reponame>m-nakagawa/sample
/*
* 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 ... |
<gh_stars>0
import { IConfig, IResult, IVersion, ITipRule } from "./interface";
import { tmpdir } from 'os';
import { join } from 'path';
import { existsSync, readFileSync, writeFileSync, mkdirSync} from 'fs';
import { exec, formatVersion, matchVersion } from "./utils";
export default async (moduleName: string, current... |
package io.shadowstack.candidates.registrars;
import feign.Feign;
import feign.Headers;
import feign.Logger;
import feign.RequestLine;
import feign.jackson.JacksonDecoder;
import feign.jackson.JacksonEncoder;
import feign.okhttp.OkHttpClient;
import feign.slf4j.Slf4jLogger;
/**
* Registrar which is a REST API client... |
package com.bjdvt.platform.mapper;
import com.bjdvt.platform.model.Company;
import com.bjdvt.platform.model.CompanyExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CompanyMapper {
int countByExample(CompanyExample example);
int deleteByExample(CompanyExample exampl... |
<reponame>natalijamitic/OSKernel
#include "kersem.h"
#include "semaphor.h"
#include "SCHEDULE.H"
#include "system.h"
#include "pcb.h"
#include <iostream.h>
#include "list.h"
#include "semlist.h"
#include "idle.h"
SemList* KernelSem::semaphoresList = new SemList();
int KernelSem::semaphoreId = 0;
KernelSe... |
/*
## filtering
*/
define([
'angular',
'app',
'lodash'
],
function (angular, app, _) {
'use strict';
var module = angular.module('kibana.panels.filtering', []);
app.useModule(module);
module.controller('filtering', function($scope, filterSrv, $rootScope, dashboard) {
$scope.panelMeta = {
... |
ROOT="$( cd "$(dirname "$0")" ; pwd -P )"
RES_DIR="$ROOT/res"
rm -rf "$RES_DIR"
mkdir "$RES_DIR"
echo -e "MediaLibraryServer.webroot = www_client/www\nMediaLibrarServer.port = 8080\nDatabase.type = sqlite\nDatabase.path = res/MediaLibrarServer.sqlite3" > "$RES_DIR/MediaLibraryServer.properties" |
/*
* 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 helloworld;
import static kiss.API.abs;
import static kiss.API.pause;
/**
*
* @author grace
*/
public class TimezoneClock ... |
package handlers
import (
"bytes"
"encoding/json"
"fmt"
"image/png"
"io/ioutil"
"net/http"
mgc "github.com/mh-cbon/mdl-go-components"
"github.com/mh-cbon/mdl-go-components/components"
"github.com/vincent-petithory/dataurl"
)
func Cropper(w http.ResponseWriter, r *http.Request) {
data := &viewData{
Title... |
'use strict';
const hello = require('hello-common')
exports.main = async (event) => {
let res = await hello.getVersion();
console.log(res)
return res
};
|
# Create an array of numbers
nums = [8, 5, 11, 6, 9, 15]
# Sort the array in descending order
nums.sort(reverse=True)
# Get the second highest number
second_highest = nums[1]
# Output the result
print("The second highest number is", second_highest) |
public void removeDuplicates(int[] arr) {
Set<Integer> set = new HashSet<>();
int j = 0;
for(int i = 0 ; i < arr.length ; i++) {
if(!set.contains(arr[i])) {
arr[j++] = arr[i];
set.add(arr[i]);
}
}
int[] output = new int[set.size()];
int k = 0;
for(In... |
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
***************************************************************************
***************************************************************************
... |
#!/bin/bash
protocol=enip
extension=pcapng
test="# @TEST-EXEC: btest-diff output\n# @TEST-EXEC: cat output | awk '{print \$1}' | sort | uniq | wc -l > covered\n# @TEST-EXEC: cat \${DIST}/src/analyzer/protocol/$protocol/events.bif | grep \"^event "$protocol"_\" | wc -l > total\n# @TEST-EXEC: echo \`cat covered\` of \`... |
def discrete_logarithm(n, base):
power = 1
result = 0
while base ** power <= n:
power += 1
return power - 1 |
/**
* @author <NAME> / https://github.com/Leeft
*/
import SCMAP from '../scmap';
import StarSystem from './star-system';
import { Color } from './three';
const DEFAULTS = {
id: undefined,
name: 'Unclaimed',
isRealFaction: false,
color: new Color( 0xFFFFFF ),
parentFaction: null,
};
class Faction {
constr... |
#!/usr/bin/env bash
# validate inputs
if [ -z "${INPUT_CFN_DIRECTORY}" ] ; then
echo "Missing 'cfn_directory' parameter."
echo "Set this to the directory where your CloudFormation Templates are located."
exit 1
fi
# find templates with 'Resources'
POSSIBLE_TEMPLATES=$(grep --with-filename --recursive 'Resources... |
<gh_stars>1-10
package be.kwakeroni.scratch.tv;
import be.kwakeroni.parameters.backend.es.api.ElasticSearchGroup;
import be.kwakeroni.parameters.backend.inmemory.api.EntryData;
import be.kwakeroni.parameters.backend.inmemory.support.DefaultEntryData;
import be.kwakeroni.parameters.basic.backend.es.ElasticSearchQueryBa... |
<gh_stars>1-10
import _ from 'lodash';
import {createSelector} from 'reselect';
import loadingSelector from './loadingSelector';
import sessionsSelector from './sessionsSelector';
import selectedSelector from './selectedSelector';
import {DATA_STATE} from 'constants';
// selector
export default createSelector(
loa... |
// #THIRD_KIND_PLAYFAB_NOTIFICATION_BUS: dbowen (2017/08/11)
#pragma once
#include <AzCore/EBus/EBus.h>
#include <PlayFabServerSdk/PlayFabMatchmakerDataModels.h>
namespace PlayFabServerSdk
{
// Request based notification bus, use this bus when you want to listen for a callback from a specific instance of an API re... |
function printUnicode(str) {
for(var i=0; i<str.length; i++) {
console.log(str[i] + ": " + str.charCodeAt(i));
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.