text stringlengths 1 1.05M |
|---|
#!/usr/bin/env bash
set -e
scriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source $scriptDir/utils.sh
scbk delete -f $scriptDir/../k8s/sample-repos.yaml
|
timestamp=`date +%Y%m%d%H%M%S`
rm Logs/*.log
#'MUTAG' 'ENZYMES'
for dataset in 'Pubmed' 'Cora'
do
for modelName in 'ChebConvNet'
do
for NumLayers in 1
do
for LR in 0.5
do
for BatchSize in 512
do
for StartTopoCoeffi in 0.1
do
for VectorPairs in 1
do
for WeightCorrectionCoeffi in 0.001 0.01 0.1 1
do
p... |
<filename>py-question/lv1-03.py
# 问题:使用给定的整数n,编写一个程序生成一个包含(i, i*i)的字典,该字典包含1到n之间的整数(两者都包含)。然后程序应该打印字典。
# 假设向程序提供以下输入:8
# 则输出为:
# {1:1,2:4,3:9,4:16,5:25,6:36,,7:49,8:64}
# 提示:在为问题提供输入数据的情况下,应该假设它是控制台输入。考虑使用dict类型()
print ('please enter a number')
x = int (input())
d = dict()
for i in range(1,x+1):
d[i]=i*i
print (d)... |
#!/usr/bin/env bash
set -e
echo "*** Initializing Dapp Tools"
curl -L https://nixos.org/nix/install | sh
. ~/.nix-profile/etc/profile.d/nix.sh
curl https://dapp.tools/install | sh
nix-env -f https://github.com/dapphub/dapptools/archive/master.tar.gz -iA solc-static-versions.solc_0_8_9
|
import numpy as np
class InterventionGenerator:
def __init__(self, task_intervention_space):
self.task_intervention_space = task_intervention_space
def generate_interventions(self, variables):
interventions_dict = {}
for variable in variables:
if variable in self.task_inter... |
#!/bin/bash
# Wifi SSID and strengh
STR="$(grep wlo1 /proc/net/wireless | awk '{print $4}' | sed 's/[^0-9]//g')"
STR=$((STR-30))
SSID="$(iw dev | grep ssid | awk '{print $2}')"
ISTATE="^c#8ec07c^"
[ "$STR" -lt 35 ] && ICON=" " && ISTATE="^c#8ec07c^"
[ "$STR" -ge 35 ] && ICON="說" && ISTATE="^c#fabd2f^"
[ "$STR" -ge ... |
#!/bin/bash
set -e
set -o pipefail
trap 'kill 0' SIGTERM
KUBECTL="${KUBECTL:-kubectl}"
KIND="${KIND:-kind}"
if [ ! $(command -v "$KIND") ]; then
echo "Cannot find or execute KIND binary $KIND, you can override it by setting the KIND env variable"
exit 1
fi
if [ ! $(command -v "$KUBECTL") ]; then
echo "Cannot... |
<reponame>darccyy/trustworthytimes
import React, { Component } from "react";
import "../scss/PostText.scss";
// Add classes for unloaded / broken images
import loadImages from "../functions/loadImages";
// Copy text to clipboard
import copyText from "../functions/copyText";
// Specific article in /news/*
export defa... |
#!/usr/bin/env bash
UNAME=`uname`
DATE=`date`
DATEREGEX="^(...) (...) (.?.) ((..):(..):(..)) (...) (....)"
AWKCMD=awk
SEDCMD=sed
# FreeBSD uses modified names for GNU versions of awk/sed
if [ "$UNAME" = "FreeBSD" ];
then
AWKCMD=gawk
SEDCMD=gsed
fi
THRESHOLD=15
SORT=1
TIMERANGE="*"
SUMMARYONLY=0
OUTDELIM=","
... |
<reponame>YJieZhang/Tengine
/*
* 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 ... |
import json
import requests
def lambda_handler(event, context):
city = event['city']
API_KEY = 'ENTER_YOUR_API_KEY_HERE'
request_url = 'http://api.openweathermap.org/data/2.5/weather?q=' + city + '&appid=' + API_KEY
response = requests.get(request_url)
response_json = response.json()
temperature = response_json[... |
import os
import shutil
TEST_DIR = os.path.join(os.getcwd(), "test/python/.tmp")
TEST_ROOT = "/tmp/makisu-test-integration"
if not os.path.exists(TEST_DIR):
os.makedirs(TEST_DIR)
if os.path.exists(TEST_ROOT):
shutil.rmtree(TEST_ROOT)
|
<reponame>wuximing/dsshop<filename>admin/vue2/element-admin-v3/node_modules/@antv/g2plot/esm/components/conversion-tag.js
import { __assign } from "tslib";
import { DEFAULT_ANIMATE_CFG } from '@antv/g2/lib/animate';
import { each, deepMix, get } from '@antv/util';
function parsePoints(shape, coord) {
var parsedPoin... |
<reponame>weltam/idylfin<filename>src/de/erichseifert/gral/plots/colors/SingleColor.java<gh_stars>10-100
/*
* GRAL: GRAphing Library for Java(R)
*
* (C) Copyright 2009-2012 <NAME> <dev[at]erichseifert.de>,
* <NAME> <michael[at]erichseifert.de>
*
* This file is part of GRAL.
*
* GRAL is free software: you can re... |
arr.sort(function(a, b) {
let lenA = a.length;
let lenB = b.length;
if (lenA < lenB) { return -1; }
if (lenA > lenB) { return 1; }
return 0;
}); |
#!/bin/sh
SCRIPT="$0"
while [ -h "$SCRIPT" ] ; do
ls=`ls -ld "$SCRIPT"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
SCRIPT="$link"
else
SCRIPT=`dirname "$SCRIPT"`/"$link"
fi
done
if [ ! -d "${APP_DIR}" ]; then
APP_DIR=`dirname "$SCRIPT"`/..
APP_DIR=`cd "${APP_DI... |
import CountDowner from './CountDowner';
import { CountDownerProps } from './interface';
export { CountDownerProps, CountDowner };
export default CountDowner;
|
const cities = [{id: 1, name: "New York"},{id: 2, name: "London"}, {id: 3, name: "Berlin"}];
async function getTemperatures() {
const promises = cities.map(city => {
return axios.get(`https://api.openweathermap.org/data/2.5/weather?id=${city.id}&units=metric&appid=YOUR_API_KEY`).then(res => {
return {name:... |
#!/bin/sh
#--------
# Check APC ATS load script for Icinga2
# Require: net-snmp-utils, bc
# v.20170411
#
# https://github.com/psanthoshkumar/Icinga2_labwork
#
while getopts ":V:H:C:h" optname ; do
case "$optname" in
"V")
VERSC=$OPTARG
if [ "$VERSC" = "2c" ] ; then
VERS="2"
else
VERS=... |
<gh_stars>0
/**
* Copyright 2016 <NAME> <<EMAIL>>
*
* 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... |
/* eslint-disable no-confusing-arrow */
const flattenArray = (i) => {
const o = [];
i.forEach(x => Array.isArray(x) ? o.push(...x) : o.push(x));
return o;
};
module.exports = {flattenArray};
|
import { changePassword } from 'helpers/db.js';
export async function post(req, res) {
const { hash, newPassword } = req.body;
const result = await changePassword(hash, newPassword);
res.end(JSON.stringify(result));
}
|
#!/bin/bash
if [ ! -f /debug0 ]; then
if [ -e requirements.txt ]; then
pip2 install -r requirements.txt
fi
touch /debug0
while getopts 'hdo:' flag; do
case "${flag}" in
h)
echo "options:"
echo "-h show brief help"
... |
<gh_stars>1-10
/***************************************************************************
* (C) Copyright 2003-2012 - Stendhal *
***************************************************************************
*************************************************************************... |
if RUBY_PLATFORM == 'java'
require 'rubygems'
gem 'ffi'
end
require 'ffi'
module Process::Functions
module FFI::Library
unless instance_methods.include?(:attach_pfunc)
# Wrapper method for attach_function + private
def attach_pfunc(*args)
attach_function(*args)
priva... |
#!/bin/bash
######################################################################
# Tomatito: pomodoro timer
######################################################################
ayuda () {
echo "Tomatito
Script para cronometrar pomodoros:
* un pomodoro son 25 minutos;
* por cada pomodoro com... |
package cyclops.pattern;
import cyclops.container.control.Either;
import cyclops.container.control.Option;
import cyclops.container.immutable.tuple.Tuple2;
import cyclops.reactive.ReactiveSeq;
import java.util.function.Function;
import java.util.function.Supplier;
/**
* @author smccarron
*/
public interface OrThen... |
<filename>tests/dummy/app/components/oe-select.js
import Component from '@ember/component';
import { computed } from '@ember/object';
const OESelect = Component.extend({
tagName: '',
value: null,
controlId: '',
disabled: false,
options: computed(() => []),
'on-change'() {}
});
OESelect.reopenClass({
po... |
# dojo.py
def primes(limit):
if limit < 2:
return []
sieve = [True] * limit
sieve[0], sieve[1] = False, False # 0 and 1 are not prime
for num in range(2, int(limit ** 0.5) + 1):
if sieve[num]:
for multiple in range(num * num, limit, num):
sieve[mul... |
<reponame>GMcD/telar-web
package models
type ChangePasswordModel struct {
CurrentPassword string `json:"currentPassword"`
NewPassword string `json:"newPassword"`
ConfirmPassword string `json:"confirmPassword"`
}
|
pyinstaller --noconfirm app.spec
|
#!/bin/bash
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
set -e
# This script will package the CloudFormation in ${CFN_TEMPLATE_DIR} directory and upload it
# to Amazon S3 in preparation for deployment using the AWS CloudFromation service.
#
# This sc... |
<filename>web/script/services/root.js
var sohagApp = angular.module('SohagApp');
sohagApp.factory('SohagRootService', function ($http) {
return {
getHomePageData: function () {
var req = {
method: 'POST',
url: sohagServerUrl + "getHomePageData",
hea... |
<gh_stars>10-100
package io.opensphere.heatmap;
import io.opensphere.heatmap.DataRegistryHelper.HeatmapImageInfo;
/**
* Interface to an object that knows how to recreate heatmap images but with a
* new style.
*/
public interface HeatmapRecreator
{
/**
* Recreates heat map images but with a new style.
... |
package org.rzo.yajsw.controller.jvm;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelPipelineCoverage;
import org.jboss.netty.channel.ChannelStateEvent;
import org.jboss.netty.channel.ExceptionEvent;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty... |
<gh_stars>0
require('dotenv').config();
const erc20abi = require('../../abi/IERC20.json');
const TransactionHandler = require('../../utils/TransactionHandler');
const ApproveTokenSpendingForUniswapV2RouterContract = {
approveTokenSpending: async (tokenQuantityForSpendingApproval) => {
//100 lakshmiKanth Toke... |
<reponame>panzergame/dxfplotter<gh_stars>10-100
#include <exporter.h>
#include <serializer/task.h>
#include <cereal/cereal.hpp>
namespace Exporter::Dxfplot
{
void Exporter::operator()(const Model::Document& document, std::ostream &output) const
{
Archive archive(output);
save(archive, document);
}
void Exporter... |
#!/usr/bin/env bash
### This script import SDK code from Element Android
set -e
elementAndroidPath="../element-android"
if [ -d "$elementAndroidPath" ]; then
echo "Importing sdk module from Element Android located at ${elementAndroidPath}"
else
echo "Element Android not found at ${elementAndroidPath}. Can not c... |
export default function consume<T>(iterator: Iterator<T>, steps?: number): void;
|
package com.bv.eidss.model.generated;
import android.content.ContentValues;
import android.database.Cursor;
import android.os.Parcel;
import com.bv.eidss.R;
import com.bv.eidss.model.CaseStatus;
import com.bv.eidss.model.interfaces.IFieldChanged;
import com.bv.eidss.model.interfaces.ICallable;
import com.bv... |
<gh_stars>0
package com.atjl.validate.form.ref;
import com.atjl.validate.api.field.ListField;
import com.atjl.validate.api.field.StringField;
import com.atjl.validate.validator.noparam.Email;
import com.atjl.validate.validator.noparam.Optional;
import com.atjl.validate.validator.noparam.Require;
/**
* 校验表单示... |
class Vec3:
def __init__(self, x, y, z):
self.x = x
self.y = y
self.z = z
def __str__(self):
return "({}, {}, {})".format(self.x, self.y, self.z) |
using System;
public class ListSorter
{
static void Main()
{
// Create an array of double-precision floating point numbers
double[] array = { 4.4, 16.2, 5.2, 18.4, 8.4 11.2 };
// Sort the array in ascending order
Array.Sort(array);
Console.WriteLine("Ascending Orde... |
#!/bin/bash
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
version=v1
out_dir=$(cd $ROOT/../.. && pwd)
json_dir=$(cd $ROOT/../docs/swagger/$version && pwd)
config_dir=$(cd $ROOT/.. && pwd)
flavor=dart-dio-next
openapi-generator generate -i ${json_dir}/admin.json -g $flavor -o $out_dir/gateway_a... |
<reponame>ti-co/boss-machine<filename>server/meetings.js
const meetingsRouter = require('express').Router();
module.exports = meetingsRouter;
const { getAllFromDatabase, addToDatabase, deleteAllFromDatabase, createMeeting } = require('./db');
meetingsRouter.get('/', (req, res, next) => {
res.send(getAllFromDatabas... |
<filename>js/login.js
let formOne=document.getElementById('formOne');
const login=document.getElementById('login')
const container_fluid=document.getElementById('container-fluid')
formOne.addEventListener('submit',(e)=>{
e.preventDefault()
// container_fluid.style.display="none"
// form_holder.style.disp... |
def replace_chain():
global blockchain # Assuming 'blockchain' is the variable holding the current chain
new_chain = request.get_json().get('new_chain') # Assuming the new chain is received as JSON in the request
if new_chain is None:
return False # No new chain received, so no replacement
i... |
<filename>src/main/java/com/google/enterprise/secmgr/config/AuthnMechSaml.java
// Copyright 2009 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.o... |
"""
Create a program for converting currency from one to another
"""
def convert_currency(amount, from_currency, to_currency):
# Get the exchange rates from an external API
rates = get_exchange_rates(from_currency, to_currency)
# Calculate the converted amount
converted_amount = amount * rates[to_curr... |
def find_total_amount(tx_list):
amount = sum([price * quantity for price, quantity in tx_list])
return amount
if __name__ == '__main__':
print(find_total_amount(tx_list)) |
#!/bin/bash
mv webapp/cas-server-webapp-config-server/build/libs/cas-server-webapp-config-server-*.war \
webapp/cas-server-webapp-config-server/build/libs/casconfigserver.war
dname="${dname:-CN=cas.example.org,OU=Example,OU=Org,C=US}"
subjectAltName="${subjectAltName:-dns:example.org,dns:localhost,ip:127.0.0.1}"
ke... |
#!/bin/bash
if [ $( psql -v ON_ERROR_STOP=1 --username $POSTGRES_USER -tAc "SELECT 1 FROM pg_database WHERE datname = 'sonar'" ) == '1' ]; then
echo "Database already exists"
exit 1
fi
psql -v ON_ERROR_STOP=1 --username $POSTGRES_USER -c "CREATE DATABASE sonar"
psql -v ON_ERROR_STOP=1 --username $POSTGRES_USE... |
package cim4j;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import cim4j.WindGenTurbineType3IEC;
import java.lang.ArrayIndexOutOfBoundsException;
import java.lang.IllegalArgumentException;
import cim4j.Simple_Float;
import cim4j.PU;
import cim4j.Seconds;
/*
IEC Type 3A generator set mode... |
package cyclops.pure.typeclasses.taglessfinal;
import lombok.ToString;
import lombok.Value;
public class Cases {
@Value @lombok.With @ToString
public static class Account {
double balance;
long id;
public Account debit(double amount){
return withBalance(balance-amount);
... |
/**
* 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... |
<reponame>ZhekaiLi/Code
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.Queue;
// USSS: Unweighted Single Source Shortest
// 基于 SingleSourcePathBFS
public class USSSPath {
private Graph G;
private boolean[] visited;
private int s;
private int[] p... |
package com.company;
public class Exercise_6_12 {
public static void main(String[] args) {
printChars('1', 'Z', 10);
}
public static void printChars(char ch1, char ch2, int numberPerLine) {
final int NUMBERS_PER_LINE = numberPerLine;
int count = 0;
for(char ch = ch1... |
<filename>sitewhere-java-model/src/main/java/com/sitewhere/rest/model/device/event/kafka/ProcessedEventPayload.java
/**
* Copyright © 2014-2021 The SiteWhere 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 obta... |
<filename>dependencies/mozilla-js/1.8.0/jsd/classes/netscape/jsdebug/DebugController.java
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Versio... |
import getGlobals from './getGlobals.js';
export default function getOutro ( format, name, options, imports ) {
if ( format === 'es' ) {
return `export default ${name};`;
}
if ( format === 'amd' ) {
return `return ${name};\n\n});`;
}
if ( format === 'cjs' ) {
return `module.exports = ${name};`;
}
if ( ... |
<?php
// Create a function that processes form submission
function process_form() {
// define empty array to store errors
$errors = array();
// check for errors
// check empty fields
if (empty($_POST['name'])) {
$errors[] = 'The Name field is required';
}
if (empty($_POST['email'])) {
$errors[] = 'The Ema... |
package de.unibi.agbi.biodwh2.reactome.entities;
import de.unibi.agbi.biodwh2.reactome.entities.Drug;
/**
* Created by manuel on 12.12.19.
*/
public class ChemicalDrug extends Drug {
public ChemicalDrug() {
}
}
|
<filename>client/src/app/settings.service.spec.ts
import { TestBed } from '@angular/core/testing';
import { SettingsService } from './settings.service';
describe('SettingsService', () => {
beforeEach(() => {
TestBed.configureTestingModule({});
localStorage.clear();
});
it('should be created', () => {
... |
#!/bin/bash
date_pattern=`date "+%Y-%m-%d"`-
echo -n "Post name > "
read -r REPLY
title=${REPLY}
clean_title=`echo $title | tr "[:upper:]" "[:lower:]"]` #Lower Case
clean_title=`echo $clean_title | iconv -f utf-8 -t ascii//translit` #Remove accents
clean_title=`echo $clean_title | tr -dc "[a-z0-9 ]"` #Keep spaces, le... |
<reponame>itsalaidbacklife/sails-react-monorepo-example
module.exports = [
{
id: 'c', // auto-generated, but still string required
user: 1,
data: {
isLoggedIn: true
}
}
];
|
/*
* Copyright (c) 2021. <NAME>
*/
import {Mock} from 'moq.ts';
import {WeatherStationPlatform} from '../src/platform';
import {Logging} from 'homebridge/lib/logger';
import {API} from 'homebridge';
describe('FJW4 Platform', () => {
it('should be successfully created', () => {
const logger = new Mock<Logging>... |
<reponame>coboyoshi/uvicore<gh_stars>10-100
import pytest
import uvicore
import sqlalchemy as sa
from uvicore.support.dumper import dump
# These will also move into test_* as they each have _builder, _encoed, _hybrid inside them
@pytest.mark.asyncio
async def test_select_all(app1):
from app1.database.tables.post... |
#!/bin/bash
set -eu
function get_abs_filename() {
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
function usage() {
echo "usage: ./bootstrap.sh INSTALL_PREFIX_DIRECTORY MFEXT_INSTALL_ROOT_DIRECTORY"
}
if test "${1:-}" = "" -o "${2:-}" = ""; then
usage
exit 1
fi
if test "${1:-}" = "--help... |
def interpolate_point(p1, p2, p):
x1, y1 = p1
x2, y2 = p2
x, y = p
# Calculate the slope of the line
m = (y2 - y1) / (x2 - x1)
# Calculate the y-coordinate of the interpolated point using linear interpolation formula
y_interpolated = y1 + m * (x - x1)
return x, y_interpolated |
/*
* Copyright © 2021 <NAME>, 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 agreed to i... |
<filename>sim/cpu/decoder/prefix_none_32.cpp
/*
* Copyright (C) 2016 <NAME>
*
* This file is part of IBMulator.
*
* IBMulator is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the Lic... |
//
// CategoryGroup.h
// ExpenseMobile
//
// Created by <NAME> on 28/05/15.
// Copyright (c) 2015 Shibin. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@class Expense;
@interface CategoryGroup : NSManagedObject
@property (nonatomic, retain) NSString * categoryName;
@pro... |
#!/usr/bin/env bash
# This file is part of The RetroPie Project
#
# The RetroPie Project is the legal property of its developers, whose names are
# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
#
# See the LICENSE.md file at the top-level directory of this distribution ... |
#!/bin/bash
SCRIPT=$(readlink -f "$0") && cd $(dirname "$SCRIPT")
# --- Script Init ---
set -e
set -o pipefail
mkdir -p log
rm -R -f log/*
error_handler(){
echo 'Run Error - terminating'
exit_code=$?
set +x
group_pid=$(ps -p $$ -o pgid --no-headers)
sess_pid=$(ps -p $$ -o sess --no-headers)
printf ... |
<gh_stars>0
'use strict';
var mathExt = require('../index');
var assert = require('assert');
describe('#round10', function() {
var ceil = mathExt.round;
it('test round ' + 1.234, function() {
assert.equal(1.23, ceil(1.234, -2));
});
it('test round ' + 1.235, function() {
assert.equal(1.... |
<filename>jena-3.0.1/jena-jdbc/jena-jdbc-core/src/main/java/org/apache/jena/jdbc/results/SelectResults.java
/**
* 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 ow... |
package org.glowroot.instrumentation.hibernate;
import org.glowroot.instrumentation.api.Descriptor;
import org.glowroot.instrumentation.api.Descriptor.CaptureKind;
@Descriptor(
id = "hibernate",
name = "Hibernate",
advice = {
@Descriptor.Advice(
... |
/*
* 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 in compliance with the License.
* You may obtain a copy of ... |
#!/usr/bin/env bash
# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here
# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent
# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also
# benefit from... |
<gh_stars>1-10
require 'csv'
require 'find'
require_relative 'download_umls_notice'
require_relative 'temp_dir'
module Inferno
module Terminology
module Tasks
class ProcessUMLS
include TempDir
include DownloadUMLSNotice
attr_reader :version
def initialize(version:)
... |
package com.example.testng.Annotation.Test;
import com.example.testng.Annotation.DataProvider.dataProviderAnnotation;
import org.testng.annotations.Test;
/**
* dataProviderClass=告诉框架 我需要从哪个类获取数据
* dataProvider= 告诉框架 我需要获取数据的名称是什么
*/
public class TestAnnotationData {
@Test(dataProviderClass = dataProviderAnnot... |
// async function jq() {
const s = document.createElement('script');
s.type = 'text/javascript';
s.src = 'https://lib.baomitu.com/jquery/3.4.1/jquery.min.js';
document.body.appendChild(s);
// }
// !(async function() {
// await jq();
window.onload=()=>{
let m = document.createElement('sc... |
/**
* @jest-environment jsdom
*/
import { render } from '@testing-library/react';
import { Grid } from '..';
describe('components/Grid', () => {
const props = {
smCols: '2',
mdCols: '2',
lgCols: '3',
xlCols: '4',
space: '4',
};
test('should render the component correctly with all the prop... |
<gh_stars>1-10
package com.bhm.sdk.demo.http;
import com.bhm.sdk.demo.entity.DoGetEntity;
import com.bhm.sdk.demo.entity.UpLoadEntity;
import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import ... |
package com.vladmihalcea.book.hpjp.hibernate.transaction.spring.jpa.config;
import com.vladmihalcea.book.hpjp.hibernate.forum.dto.PostDTO;
import com.vladmihalcea.book.hpjp.hibernate.logging.LoggingStatementInspector;
import com.vladmihalcea.book.hpjp.util.DataSourceProxyType;
import com.vladmihalcea.book.hpjp.util.lo... |
<gh_stars>1-10
package com.github.maracas.rest;
import com.github.maracas.rest.data.PullRequestResponse;
import org.junit.jupiter.api.Test;
import org.springframework.test.context.TestPropertySource;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
@TestPropertySource(prope... |
import { ApolloServer } from 'apollo-server';
import { resolvers } from './resolvers';
import { typeDefs } from './typeDefs';
const server = new ApolloServer({ typeDefs, resolvers, introspection: true });
server.listen().then(({ url }) => {
// tslint:disable-next-line no-console
console.log(`🚀 Server ready at $... |
#!/bin/sh
# genext2fs wrapper calculating needed blocks/inodes values if not specified
set -e
export LC_ALL=C
CALC_BLOCKS=1
CALC_INODES=1
EXT_OPTS=
EXT_OPTS_O=
while getopts x:d:D:b:i:N:m:g:e:zfqUPhVv f
do
case $f in
b) CALC_BLOCKS=0 ;;
N) CALC_INODES=0; INODES=$OPTARG ;;
d) TARGET_DIR=$OPTARG ;;
esac
don... |
<reponame>tdm1223/Algorithm
// 1476. 날짜 계산
// 2019.05.18
// 수학, 중국인의 나머지 정리
#include<iostream>
using namespace std;
int main()
{
int n1;
int n2;
int n3;
cin >> n1 >> n2 >> n3;
int count = 0;
while (1)
{
int r1 = count % 15 + 1;
int r2 = count % 28 + 1;
int r3 = count % 19 + 1;
if (r1 == n1 && r2 == n2 ... |
def longestIncreasingSubsequence(arr):
lis = [1] * len(arr)
for i in range(1, len(arr)):
for j in range(0, i):
if arr[i] > arr[j] and lis[i] < lis[j] + 1:
lis[i] = lis[j] + 1
maxLis = 0
for i in range(len(arr)):
maxLis = max(maxLis, lis[i])
return... |
#!/bin/sh
sudo hab pkg install core/protobuf-cpp -b |
package sysinfo
type OSRelease struct {
ID string
Name string
Version string
Platform string
Arch string
PrettyName string
KernelVersion string
// Hostname string
Sysname string
Nodename string
UnameVersion string
Machine string
Domainname st... |
class VirtualMemory:
def __init__(self, size):
self.memory = [None] * size
self.disk = []
def load_page(self, page_number):
if page_number in self.memory:
return # Page already in memory
elif len(self.memory) < len(self.disk):
self.memory[self.disk.pop(0... |
#!/bin/bash
# Step 1: Build the Docker image for Litecoin Core node
docker build -t litecoin-node -f Dockerfile .
# Step 2: Run the Docker container for Litecoin Core node
docker run -d -p 9333:9333 --name litecoin-container litecoin-node |
/*
* 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 met:
* Redistributions of source code must retain the above copyright notice, this
* list o... |
/*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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/li... |
<filename>src/main/java/com/athena/athena/im/svc/ChatRoomController.java<gh_stars>0
package com.athena.athena.im.svc;
import com.athena.athena.im.bean.ChatMessage;
import com.athena.athena.im.dao.impl.ChatMessageDAOImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory... |
<filename>types/TokyoVolcano.d.ts
/// <reference types="svelte" />
import { SvelteComponentTyped } from "svelte";
export interface TokyoVolcanoProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["svg"]> {
tabindex?: string;
/**
* @default "currentColor"
*/
fill?: string;
}
export default clas... |
#!/bin/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 "License"); y... |
#!/bin/bash
set -e
mkdir -p dist
node scripts/build/generatePostmanCollection.js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.