code stringlengths 3 1.05M | repo_name stringlengths 4 116 | path stringlengths 4 991 | language stringclasses 9
values | license stringclasses 15
values | size int32 3 1.05M |
|---|---|---|---|---|---|
def get_injured_sharks():
"""
>>> from ibeis.scripts.getshark import * # NOQA
"""
import requests
url = 'http://www.whaleshark.org/getKeywordImages.jsp'
resp = requests.get(url)
assert resp.status_code == 200
keywords = resp.json()['keywords']
key_list = ut.take_column(keywords, 'in... | SU-ECE-17-7/ibeis | ibeis/scripts/getshark_old.py | Python | apache-2.0 | 22,458 |
declare const monaco: any;
export function replay(editor: any) {
const keys = [];
editor.addCommand(monaco.KeyCode.F9, () => {
console.log('starting recording');
editor.onKeyDown(key => {
keys.push({
timestamp: new Date(),
key
});
});
editor.trigger('keyboard', 'type', {... | nycJSorg/angular-presentation | libs/code-demos/src/lib/shared/monaco-replay.ts | TypeScript | apache-2.0 | 488 |
package com.geekdos.app;
import com.geekdos.midelwar.interfaces.GestionDesNotesInterface;
import com.geekdos.model.*;
import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.... | geekdos/Personal_Labs | MidelwarLab/GestionDesNotes/src/com/geekdos/app/App.java | Java | apache-2.0 | 9,128 |
/// Refly License
///
/// Copyright (c) 2004 Jonathan de Halleux, http://www.dotnetwiki.org
///
/// This software is provided 'as-is', without any express or implied warranty.
/// In no event will the authors be held liable for any damages arising from
/// the use of this software.
///
/// Permission is gra... | Gallio/mbunit-v2 | src/refly/Refly/CodeDom/FieldDeclaration.cs | C# | apache-2.0 | 2,091 |
<?php
class Graphite_Relation extends Graphite_Resource
{
function nodeType() { return "#relation"; }
}
| lyndonnixon/annotationtool | libraries/graphite/Graphite/Relation.php | PHP | apache-2.0 | 106 |
/*
* Copyright 2018 Red Hat, Inc. and/or its affiliates.
*
* 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 app... | etirelli/drools | drools-scenario-simulation/drools-scenario-simulation-backend/src/main/java/org/drools/scenariosimulation/backend/runner/DMNScenarioRunner.java | Java | apache-2.0 | 2,033 |
// Copyright 2017 The Nomulus 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-2.0
//
// Unless required by a... | google/nomulus | core/src/test/java/google/registry/testing/InjectExtension.java | Java | apache-2.0 | 7,738 |
(function() {
'use strict';
// set up margins
var el = d3.select('.geomap'),
elWidth = parseInt(el.style('width'), 10),
elHeight = parseInt(el.style('height'), 10),
margin = {top: 20, right: 20, bottom: 30, left: 50},
width = elWidth - margin.left - margin.right,
height = elHeight -... | victormejia/d3-workshop-playground | modules/geomapping/geomap.js | JavaScript | apache-2.0 | 703 |
/*
* Copyright (C) 2009 hessdroid@gmail.com
*
* 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 ... | pvo99i/hessdroid | tests/org/ast/tests/api/TestPrimitiveTypes.java | Java | apache-2.0 | 934 |
/*
* 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 ... | clarkyzl/flink | flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/LogicalTypeCastAvoidanceTest.java | Java | apache-2.0 | 14,234 |
/*
* Copyright (c) 2005-2014, 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.apach... | ThilankaBowala/andes | modules/andes-core/broker/src/main/java/org/wso2/andes/mqtt/MQTTLocalSubscription.java | Java | apache-2.0 | 6,839 |
/*******************************************************************************
* ATE, Automation Test Engine
*
* Copyright 2015, Montreal PROT, or individual contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
*... | bigtester/automation-test-engine | org.bigtester.ate.core/src/main/java/org/bigtester/ate/model/page/elementaction/ITestObjectActionImpl.java | Java | apache-2.0 | 1,433 |
/**
* 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... | yahoojapan/multiple-dimension-spread | src/common/src/test/java/jp/co/yahoo/dataplatform/mds/stats/TestSpreadSummaryStats.java | Java | apache-2.0 | 3,580 |
/*
* Copyright 2013-2016 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | daniellavoie/spring-cloud-netflix | spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/rx/SingleReturnValueHandlerTest.java | Java | apache-2.0 | 4,114 |
package com.dev118.jeet.core;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
import or... | ckwen/jeet | jeet-core/src/test/java/com/dev118/jeet/core/SpringJunitTest.java | Java | apache-2.0 | 1,186 |
<?php if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { die(); }
extract(itx_get_option('header'));?>
<div id="itx-header">
<h3>Custom Header</h3>
<p><b>Preview</b>: <small>(might not accurate)</small></p>
<p>The dotted line indicates the scope. (defined in: header options item number 6).</p>
<div class="outerwrap">
<?p... | wangjingfei/now-code | php/wp-content/themes/bombax/admin/template/header.php | PHP | apache-2.0 | 5,125 |
/*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "licen... | aws/aws-sdk-java | aws-java-sdk-gamelift/src/main/java/com/amazonaws/services/gamelift/model/transform/UpdateGameSessionRequestProtocolMarshaller.java | Java | apache-2.0 | 2,719 |
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "producerconsumer.h"
namespace vespalib {
Consumer::Consumer(uint32_t maxQueue, bool inverse) :
_queue(NULL, maxQueue),
_inverse(inverse),
_operations(0)
{
}
Consumer::~Consumer()
{
}
Producer:... | vespa-engine/vespa | vespamalloc/src/tests/allocfree/producerconsumer.cpp | C++ | apache-2.0 | 2,082 |
/*
* Copyright (c) 2021, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.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 the License at
*
* http://www.apac... | lessthanoptimal/BoofCV | main/boofcv-feature/src/test/java/boofcv/alg/segmentation/slic/GeneralSegmentSlicColorChecks.java | Java | apache-2.0 | 5,813 |
package gudusoft.gsqlparser.sql2xml.model;
import org.simpleframework.xml.Element;
public class binary_factor
{
@Element
private binary_primary binary_primary = new binary_primary( );
public binary_primary getBinary_primary( )
{
return binary_primary;
}
}
| sqlparser/sql2xml | sql2xml/src/gudusoft/gsqlparser/sql2xml/model/binary_factor.java | Java | apache-2.0 | 269 |
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | mufaddalq/cloudstack-datera-driver | engine/schema/src/com/cloud/offerings/NetworkOfferingVO.java | Java | apache-2.0 | 11,734 |
/**********************************************************************
Copyright (c) 2003 Andy Jefferson and others. 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
h... | hopecee/texsts | samples/src/java/org/jpox/samples/interfaces/Circle.java | Java | apache-2.0 | 3,009 |
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import {
ReactiveBase,
DataSearch,
ResultList,
ReactiveList,
SelectedFilters,
} from '@appbaseio/reactivesearch';
import './index.css';
class Main extends Component {
render() {
return (
<ReactiveBase
app="good-books-ds"
u... | appbaseio/reactivesearch | packages/web/examples/CustomSelectedFilters/src/index.js | JavaScript | apache-2.0 | 3,322 |
package hypervisors
import (
"math/rand"
"os/exec"
"strings"
"time"
)
const powerOff = "Power is off"
func (m *Manager) probeUnreachable(h *hypervisorType) probeStatus {
if m.ipmiPasswordFile == "" || m.ipmiUsername == "" {
return probeStatusUnreachable
}
var hostname string
if len(h.machine.IPMI.HostIpAdd... | Symantec/Dominator | fleetmanager/hypervisors/ipmi.go | GO | apache-2.0 | 1,243 |
/**
* Created by guofengrong on 15/10/26.
*/
var dataImg = {
"data": [{
"src": "1.jpg"
}, {
"src": "1.jpg"
}, {
"src": "2.jpg"
}, {
"src": "3.jpg"
}, {
"src": "4.jpg"
}, {
"src": "10.jpg"
}]
};
$(document).ready(function() {
$(window).on(... | guofengrong/HomeworkOfJikexueyuan | Lesson7/百度图片瀑布流布局/js/baidu-pic.js | JavaScript | apache-2.0 | 3,505 |
package daemon
import (
"context"
"runtime"
"time"
"github.com/docker/docker/api/types"
containertypes "github.com/docker/docker/api/types/container"
"github.com/docker/docker/container"
"github.com/docker/docker/errdefs"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
// ContainerStart starts a cont... | ripcurld0/moby | daemon/start.go | GO | apache-2.0 | 8,522 |
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Moq;
using NUnit.Framework;
using Posttrack.BLL.Helpers.Interfaces;
using Posttrack.BLL.Interfaces;
using Posttrack.BLL.Interfac... | lAnubisl/PostTrack | Posttrack.BLL.Tests/PackagePresentationSetviceTests.cs | C# | apache-2.0 | 11,739 |
import { expect } from 'chai';
import * as utilities from '../../src/utilities';
describe('utilities.capitalize()', () => {
it('capitalize', () => {
expect( utilities.capitalize('capitalize') == 'Capitalize' );
});
it('Capitalize', () => {
expect( utilities.capitalize('Capitalize') == 'Capitalize' );
}... | 1987yama3/power-analytics.appspot.com | test/unit/utilities.test.js | JavaScript | apache-2.0 | 1,060 |
package com.metaui.fxbase.view.desktop;
import com.metaui.fxbase.model.AppModel;
import com.metaui.fxbase.model.NavMenuModel;
import com.metaui.fxbase.ui.IDesktop;
import com.metaui.fxbase.ui.view.MUTabPane;
import com.metaui.fxbase.view.tree.MUTree;
import javafx.collections.ListChangeListener;
import javafx.geometry... | weijiancai/metaui | fxbase/src/main/java/com/metaui/fxbase/view/desktop/MUTabsDesktop.java | Java | apache-2.0 | 3,558 |
package timely.configuration;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import javax.validation.Valid;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframew... | NationalSecurityAgency/timely | server/src/main/java/timely/configuration/Configuration.java | Java | apache-2.0 | 3,399 |
package psidev.psi.mi.jami.tab.io.writer.extended;
import psidev.psi.mi.jami.binary.ModelledBinaryInteraction;
import psidev.psi.mi.jami.binary.expansion.ComplexExpansionMethod;
import psidev.psi.mi.jami.model.ModelledInteraction;
import psidev.psi.mi.jami.tab.MitabVersion;
import java.io.File;
import java.io.IOExcep... | MICommunity/psi-jami | jami-mitab/src/main/java/psidev/psi/mi/jami/tab/io/writer/extended/Mitab26ModelledWriter.java | Java | apache-2.0 | 3,389 |
/*
* 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 ... | qinjin/mdtc-cassandra | src/java/org/apache/cassandra/io/sstable/SSTableDeletingTask.java | Java | apache-2.0 | 4,449 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | headwirecom/aem-ide-tooling-4-intellij | src/main/java/com/headwire/aem/tooling/intellij/config/ModuleManagerImpl.java | Java | apache-2.0 | 13,569 |
package minefantasy.mf2.api.knowledge.client;
import org.lwjgl.opengl.GL11;
import minefantasy.mf2.api.helpers.RenderHelper;
import minefantasy.mf2.api.helpers.TextureHelperMF;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.util.StatCollector;
public class Entr... | AnonymousProductions/MineFantasy2 | src/main/java/minefantasy/mf2/api/knowledge/client/EntryPageImage.java | Java | apache-2.0 | 1,405 |
package org.kymjs.aframe.plugin.example;
import org.kymjs.aframe.plugin.service.CJService;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.util.Log;
import android.widget.Toast;
/**
* 作为插件Service必须继承CJService
*/
public class TestBindService extends CJ... | geniusgithub/KJFrameForAndroid | PluginExample/src/org/kymjs/aframe/plugin/example/TestBindService.java | Java | apache-2.0 | 809 |
package org.testng.xml;
import static org.testng.internal.Utils.isStringBlank;
import org.testng.ITestObjectFactory;
import org.testng.TestNGException;
import org.testng.collections.Lists;
import org.testng.collections.Maps;
import org.testng.internal.RuntimeBehavior;
import org.testng.internal.Utils;
import org.test... | missedone/testng | src/main/java/org/testng/xml/TestNGContentHandler.java | Java | apache-2.0 | 26,284 |
package org.jdesktop.core.animation.timing;
import self.philbrown.javaQuery.Modified;
import com.surelogic.ThreadSafe;
/**
* Implements the {@link TimingTarget} interface, providing stubs for all timing
* target methods. Subclasses may extend this adapter rather than implementing
* the {@link TimingTarget} interf... | phil-brown/javaQuery | src/org/jdesktop/core/animation/timing/TimingTargetAdapter.java | Java | apache-2.0 | 2,073 |
<?php
declare(strict_types=1);
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreNotificationTemplateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}... | RoboJackets/apiary | app/Http/Requests/StoreNotificationTemplateRequest.php | PHP | apache-2.0 | 982 |
package com.praetoriandroid.cameraremote;
public class ServiceNotSupportedException extends RpcException {
private static final long serialVersionUID = -4740335873344202486L;
public ServiceNotSupportedException(String serviceType) {
super(serviceType);
}
}
| praetoriandroid/sony-camera-remote-java | sony-camera-remote-lib/src/main/java/com/praetoriandroid/cameraremote/ServiceNotSupportedException.java | Java | apache-2.0 | 279 |
"""Test the TcEx Batch Module."""
# third-party
import pytest
# pylint: disable=no-self-use
class TestIndicator3:
"""Test the TcEx Batch Module."""
def setup_class(self):
"""Configure setup before all tests."""
@pytest.mark.parametrize(
'indicator,description,label,tag',
[
... | kstilwell/tcex | tests/batch/test_indicator_interface_3.py | Python | apache-2.0 | 6,925 |
using java.lang;
using java.util;
using stab.query;
public class ToIntTMap5 {
public static bool test() {
var map1 = new HashMap<Integer, string> { { 1, "V1" }, { 2, "V2" }, { 3, "V3" }};
var list = new ArrayList<string> { "V1", "V2", "V3" };
var key = 1;
var map2 = list.toMap(p => key++);
int i = 0;
fore... | monoman/cnatural-language | tests/resources/LibraryTest/sources/ToIntTMap5.stab.cs | C# | apache-2.0 | 467 |
import invocation_pb from '../../api/invocation_pb';
import { State as PageWrapperState } from '../SearchWrapper';
export interface Data {
status: string;
name: string;
labels: string;
date: string;
duration: string;
user: string;
}
export interface Column {
id: 'status' | 'name' | 'labels... | google/resultstoreui | resultstoresearch/client/src/components/InvocationTable/types.ts | TypeScript | apache-2.0 | 821 |
/*
* Copyright 2020 The Netty Project
*
* The Netty Project 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/licenses/LICENSE-2.0
*
* Unless re... | fenik17/netty | example/src/main/java/io/netty/example/http2/helloworld/frame/client/Http2ClientStreamFrameResponseHandler.java | Java | apache-2.0 | 2,568 |
package cn.brent.console.table;
/**
* <p>
* 实体类-
* </p>
* <p>
* Table: sys_uid_sysid
* </p>
*
* @since 2015-08-18 05:00:27
*/
public class TSysUidSysid {
/** */
public static final String UID = "UID";
/** */
public static final String SYS = "SYS";
/** */
public static final String SysID = "SysID";... | brenthub/brent-console | brent-console-interface/src/main/java/cn/brent/console/table/TSysUidSysid.java | Java | apache-2.0 | 388 |
/**
* Copyright © 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*/
package com.dc.smarteam.test.entity;
import com.fasterxml.jackson.annotation.JsonBackReference;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import co... | VincentFxz/EAM | src/main/java/com/dc/smarteam/test/entity/TestTree.java | Java | apache-2.0 | 1,652 |
#include "ContentSearcher.h"
#include "FileNameSearcher.h"
#include "FileSizeSearcher.h"
#include "FileTimeSearcher.h"
#include "Searcher.h"
#include "SearcherFactory.h"
#include "../SearchParameter.h"
Searcher* SearcherFactory::BuildSearcher(const SearchParameter& param)
{
PhaseOneParameter oneParam = *... | obarnet/Teste | SearchMonkeySRC/engine/SearcherFactory.cpp | C++ | apache-2.0 | 952 |
from perfrunner.helpers import local
from perfrunner.helpers.cbmonitor import timeit, with_stats
from perfrunner.helpers.profiler import with_profiles
from perfrunner.helpers.worker import java_dcp_client_task
from perfrunner.tests import PerfTest
class DCPThroughputTest(PerfTest):
def _report_kpi(self, time_ela... | couchbase/perfrunner | perfrunner/tests/dcp.py | Python | apache-2.0 | 4,121 |
package com.lianyu.tech.website.web.controller.verify;
import com.lianyu.tech.core.platform.exception.InvalidRequestException;
import com.lianyu.tech.core.util.StringUtils;
import com.lianyu.tech.website.web.SessionConstants;
import com.lianyu.tech.website.web.SiteContext;
import org.springframework.stereotype.Service... | howbigbobo/com.lianyu.tech | website/src/main/java/com/lianyu/tech/website/web/controller/verify/VerifyCodeValidator.java | Java | apache-2.0 | 978 |
package metrics
import (
"time"
"github.com/prebid/prebid-server/openrtb_ext"
"github.com/stretchr/testify/mock"
)
// MetricsEngineMock is mock for the MetricsEngine interface
type MetricsEngineMock struct {
mock.Mock
}
// RecordRequest mock
func (me *MetricsEngineMock) RecordRequest(labels Labels) {
me.Called... | prebid/prebid-server | metrics/metrics_mock.go | GO | apache-2.0 | 4,060 |
/*
* Copyright 2013 Romain Gilles
*
* 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 ... | javabits/yar | yar-api/src/main/java/org/javabits/yar/SupplierListener.java | Java | apache-2.0 | 886 |
using JetBrains.Annotations;
using JetBrains.Diagnostics;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Daemon;
using JetBrains.ReSharper.Feature.Services.CSharp.ContextActions;
using JetBrains.ReSharper.Plugins.Unity.CSharp.Daemon.Stages.PerformanceCriticalCodeAnalysis.ContextSystem;
using JetBrains.ReSharpe... | JetBrains/resharper-unity | resharper/resharper-unity/src/Unity/CSharp/Feature/Services/CallGraph/PerformanceAnalysis/PerformanceAnalysisContextActionBase.cs | C# | apache-2.0 | 1,574 |
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* 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 agre... | consulo/consulo | modules/base/core-impl/src/main/java/com/intellij/extapi/psi/ASTWrapperPsiElement.java | Java | apache-2.0 | 1,314 |
package com.zabbix.sisyphus.contract.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
... | adolfmc/zabbix-parent | zabbix-sisyphus/src/main/java/com/zabbix/sisyphus/contract/entity/CreditPro.java | Java | apache-2.0 | 4,070 |
import java.io.IOException;
import java.net.Socket;
public class Shutdown {
public static void main(String[] args) throws IOException {
try (Socket socket = new Socket("localhost", 8005)) {
socket.getOutputStream().write("SHUTDOWN".getBytes());
}
}
} | xqbase/util | util/src/test/java/Shutdown.java | Java | apache-2.0 | 269 |
import { forOwn, forEach, keys, values, isNil, isEmpty as _isEmpty, isObject, bind } from 'lodash'
import { Promise } from 'bluebird'
function InputModel(vals) {
let modelValue = (vals['value'] ? vals['value'] : null )
let viewValue = modelValue
let valid = true
let pristine = true
let listeners = setupListeners(... | sword42/react-ui-helpers | src/input/InputModel.js | JavaScript | apache-2.0 | 4,219 |
from herd.manager.server import HerdManager
manager = HerdManager(address=None, port=8339, ip='127.0.0.1', config=None,
stream_ip='127.0.0.1', stream_port=8338)
manager.start_listener()
| hoangelos/Herd | demo/misc/manager_node1.py | Python | apache-2.0 | 209 |
package org.domeos.framework.api.model.deployment.related;
/**
* Created by xupeng on 16-2-25.
*/
public enum DeploymentAccessType {
K8S_SERVICE,
DIY
}
| domeos/server | src/main/java/org/domeos/framework/api/model/deployment/related/DeploymentAccessType.java | Java | apache-2.0 | 163 |
/*
*
* SubscribeContent
*
*/
import { FC } from 'react'
import type { TMetric } from '@/spec'
import { METRIC } from '@/constant'
import { buildLog } from '@/utils/logger'
import { pluggedIn } from '@/utils/mobx'
import Content from './Content'
import Actions from './Actions'
import type { TStore } from './store... | mydearxym/mastani | src/containers/content/SubscribeContent/index.tsx | TypeScript | apache-2.0 | 1,040 |
/**
* 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... | plusplusjiajia/hadoop | hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemOverloadSchemeHdfsFileSystemContract.java | Java | apache-2.0 | 4,295 |
setTimeout(function(){
(function(){
id = Ti.App.Properties.getString("tisink", "");
var param, xhr;
file = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory,"examples/contacts_picker.js");
text = (file.read()).text
xhr = Titanium.Network.createHTTPClient();
xhr.open("POST", "h... | steerapi/KichenSinkLive | Resources/examples/contacts_picker.js | JavaScript | apache-2.0 | 3,139 |
/*
* @license Apache-2.0
*
* Copyright (c) 2021 The Stdlib 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 ap... | stdlib-js/stdlib | lib/node_modules/@stdlib/ndarray/safe-casts/docs/types/test.ts | TypeScript | apache-2.0 | 982 |
package org.semanticweb.ontop.protege.utils;
/*
* #%L
* ontop-protege4
* %%
* Copyright (C) 2009 - 2013 KRDB Research Centre. Free University of Bozen Bolzano.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obt... | eschwert/ontop | ontop-protege/src/main/java/org/semanticweb/ontop/protege/utils/DatasourceSelectorListener.java | Java | apache-2.0 | 922 |
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
namespace BaseNcoding.Tests
{
[TestFixture]
public class BaseNTests
{
[Test]
public void BaseNCompareToBase64()
{
string s = "aaa";
var converter = new BaseN(Base64.DefaultAlphabet);
s... | KvanTTT/BaseNcoding | BaseNcoding.Tests/BaseNTests.cs | C# | apache-2.0 | 4,051 |
/*
* 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 in writing, software distributed under t... | joel-costigliola/assertj-core | src/test/java/org/assertj/core/api/atomic/referencearray/AtomicReferenceArrayAssert_areExactly_Test.java | Java | apache-2.0 | 1,432 |
package com.wei.you.zhihu.spider.task;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import com.wei.you.zhihu.spider.service.IZhihuRecommendationService;
/**
* 定时任务
*
* @author sunzc
*
... | sdc1234/zhihu-spider | src/main/java/com/wei/you/zhihu/spider/task/SpiderTask.java | Java | apache-2.0 | 720 |
/*
*
* Copyright (c) 2016, 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://... | ChamNDeSilva/carbon-apimgt | components/apimgt/org.wso2.carbon.apimgt.rest.api.commons/src/main/java/org/wso2/carbon/apimgt/rest/api/common/impl/OAuth2Authenticator.java | Java | apache-2.0 | 17,387 |
package org.myrobotlab.service.data;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import org.myrobotlab.test.AbstractTest;
public class PinTest extends AbstractTest {
@Test
public void testPin() {
Pin p = new Pin();
assertNotNull(p);
... | MyRobotLab/myrobotlab | src/test/java/org/myrobotlab/service/data/PinTest.java | Java | apache-2.0 | 566 |
/***************************************************************************
* Copyright 2015 Kieker Project (http://kieker-monitoring.net)
*
* 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 a... | HaStr/kieker | kieker-common/test-gen/kieker/test/common/junit/api/system/TestResourceUtilizationRecordPropertyOrder.java | Java | apache-2.0 | 5,766 |
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
* 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... | redmeros/Lean | Common/SymbolRepresentation.cs | C# | apache-2.0 | 11,972 |
/*
* Copyright (C) 2012-2014 Open Source Robotics Foundation
*
* 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... | arpg/Gazebo | gazebo/sensors/SensorFactory.hh | C++ | apache-2.0 | 3,223 |
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace PiCalculator.Tests
{
[TestClass]
public class PiCalculatorTestsPart1
{
private PiCalculator piCalculator;
[TestInitialize]
public void TestInitialize()
{
piCalculator = new PiCalculator... | AlanBarber/CodeKatas | src/PiCalculator.Tests/PiCalculatorTestsPart1.cs | C# | apache-2.0 | 654 |
package uk.co.jtnet.security.kerberos.pac;
public interface PacConstants {
static final int PAC_VERSION = 0;
static final int LOGON_INFO = 1;
static final int KERB_VALIDATION_INFO = 1;
static final int PAC_CREDENTIALS = 2;
static final int SERVER_CHECKSUM = 6;
static final int KDC_PRIVSERVER_CHECKSUM = ... | jcmturner/java-kerberos-utils | KerberosUtils/src/main/java/uk/co/jtnet/security/kerberos/pac/PacConstants.java | Java | apache-2.0 | 716 |
package org.testng.reporters.util;
import org.testng.ITestNGMethod;
/**
* Functionality to allow tools to analyse and subdivide stack traces.
*
* @author Paul Mendelson
* @since 5.3
* @version $Revision$
*/
public class StackTraceTools {
// ~ Methods ----------------------------------------------------------... | ludovicc/testng-debian | src/main/org/testng/reporters/util/StackTraceTools.java | Java | apache-2.0 | 1,406 |
/*
* 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 in writing, software
* distribu... | mklab/taskit | src/main/java/org/mklab/taskit/shared/UserRequest.java | Java | apache-2.0 | 1,428 |
package gr.plushost.prototypeapp.fragments;
import android.app.Activity;
import android.content.Intent;
import android.os.AsyncTask;
import android.support.v4.app.Fragment;
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBar... | lioutasb/CSCartApp | app/src/main/java/gr/plushost/prototypeapp/fragments/NavigationDrawerFragment.java | Java | apache-2.0 | 18,920 |
#ifndef color_cmyk_akin_xyz
#define color_cmyk_akin_xyz
#include "../../generic/akin/cmyk.hpp"
#include "../category.hpp"
#include "../../xyz/category.hpp"
namespace color
{
namespace akin
{
template< >struct cmyk< ::color::category::xyz_uint8 >{ typedef ::color::category::cmyk_uint8 akin_t... | dmilos/color | src/color/cmyk/akin/xyz.hpp | C++ | apache-2.0 | 1,053 |
from __future__ import division
from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt
import os
import string
plt.ioff()
data = np.load("attn_weights.npz")
lines = map(lambda x: x.split('\t'), open("sanitycheck.txt", 'r').readlines())
save_dir = "attn_plots3"
sentences = []
current_... | strubell/Parser | bin/plot_attn.py | Python | apache-2.0 | 3,315 |
# 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 in writing, software
# d... | openstack/smaug | karbor/tests/unit/api/v1/test_quotas.py | Python | apache-2.0 | 4,032 |
/**
* Copyright (c) 2016 - 2018 Syncleus, 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 la... | Syncleus/aparapi | src/test/java/com/aparapi/codegen/test/EmptyIfBlock.java | Java | apache-2.0 | 802 |
package com.niedzielski.pixipedia.android.activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.niedzielski.pixipedia.android.R;
import com.niedzielski.pix... | niedzielski/pixipedia | app/src/main/java/com/niedzielski/pixipedia/android/activity/ImageFragment.java | Java | apache-2.0 | 1,551 |
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0 */
package net.sf.mmm.code.base.arg;
import java.io.IOException;
import java.lang.reflect.Executable;
import java.lang.reflect.Parameter;
import java.util.List;
import java.util.function.Consum... | m-m-m/code | base/src/main/java/net/sf/mmm/code/base/arg/BaseParameters.java | Java | apache-2.0 | 4,951 |
/*
* Copyright 2019 ThoughtWorks, 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 agr... | kierarad/gocd | server/src/main/webapp/WEB-INF/rails/webpack/views/pages/config_repos/config_repo_view_model.ts | TypeScript | apache-2.0 | 4,560 |
package org.apereo.cas.validation;
import org.apereo.cas.TestOneTimePasswordAuthenticationHandler;
import org.apereo.cas.authentication.AcceptUsersAuthenticationHandler;
import org.apereo.cas.authentication.AuthenticationHandler;
import org.apereo.cas.authentication.AuthenticationPolicy;
import org.apereo.cas.authenti... | leleuj/cas | core/cas-server-core-validation/src/test/java/org/apereo/cas/validation/AuthenticationPolicyAwareServiceTicketValidationAuthorizerTests.java | Java | apache-2.0 | 11,612 |
# :nodoc:
#
# Author:: Nathaniel Talbott.
# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
# License:: Ruby license.
require 'test/unit/util/observable'
module Test
module Unit
# Collects Test::Unit::Failure and Test::Unit::Error so that
# they can be displayed to the user. To ... | krestenkrab/hotruby | modules/vm-shared/ruby/2.0/test/unit/testresult.rb | Ruby | apache-2.0 | 2,086 |
package com.tngtech.archunit.core.importer.testexamples.hierarchicalmethodcall;
public class SuperclassWithCalledMethod {
public static final String method = "method";
String method() {
return null;
}
int maskedMethod() {
return 0;
}
}
| TNG/ArchUnit | archunit/src/test/java/com/tngtech/archunit/core/importer/testexamples/hierarchicalmethodcall/SuperclassWithCalledMethod.java | Java | apache-2.0 | 275 |
/*
* 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 ... | greghogan/flink | flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultSchedulerFactory.java | Java | apache-2.0 | 4,493 |
/**
* Copyright 2015-present Amberfog
* <p/>
* 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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable ... | dlukashev/AndroidSlidingUpPanel-foursquare-map-demo | app/src/main/java/com/amberfog/mapslidingtest/app/LockableRecyclerView.java | Java | apache-2.0 | 2,219 |
import markdownIt from 'markdown-it'
import plusImagePlugin from 'markdown-it-plus-image'
import highlight from 'highlight.js'
import container from 'markdown-it-container'
import { baseURL } from '@/api'
/**
* Create a markdown it instance.
*
* @type {Object}
*/
export const markdown = markdownIt({
breaks: true... | slimkit/thinksns-plus | resources/spa/src/util/markdown.js | JavaScript | apache-2.0 | 2,304 |
package org.smartx.demo.domain;
import org.springframework.stereotype.Repository;
/**
* <p>
*
* </p>
*
* <b>Creation Time:</b> 16/11/23
*
* @author kext
*/
@Repository
public interface UserRepository {
}
| luffyke/springboot-demo | src/main/java/org/smartx/demo/domain/UserRepository.java | Java | apache-2.0 | 214 |
from turbo import register
import app
import api
register.register_group_urls('', [
('/', app.HomeHandler),
('/plus', app.IncHandler),
('/minus', app.MinusHandler),
])
register.register_group_urls('/v1', [
('', api.HomeHandler),
])
| wecatch/app-turbo | demos/jinja2-support/apps/app/__init__.py | Python | apache-2.0 | 253 |
package dao
import (
"context"
"go-common/app/job/main/credit-timer/conf"
"go-common/library/database/sql"
)
// Dao struct info of Dao.
type Dao struct {
db *sql.DB
c *conf.Config
}
// New new a Dao and return.
func New(c *conf.Config) (d *Dao) {
d = &Dao{
c: c,
db: sql.NewMySQL(c.Mysql),
}
return
}
... | LQJJ/demo | 126-go-common-master/app/job/main/credit-timer/dao/dao.go | GO | apache-2.0 | 530 |
package org.apereo.cas.configuration.metadata;
import org.apereo.cas.configuration.model.core.authentication.PasswordPolicyProperties;
import org.apereo.cas.configuration.model.core.authentication.PrincipalTransformationProperties;
import org.apereo.cas.configuration.model.support.ldap.AbstractLdapProperties;
import o... | pdrados/cas | api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/metadata/ConfigurationMetadataFieldVisitor.java | Java | apache-2.0 | 4,907 |
/*
* Copyright The OpenTelemetry 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
*
* Unless required by applicable law or... | open-telemetry/opentelemetry-js | packages/opentelemetry-resources/src/detectors/EnvDetector.ts | TypeScript | apache-2.0 | 5,327 |
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* 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 agre... | jexp/idea2 | platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/DefaultModulesProvider.java | Java | apache-2.0 | 1,618 |
"""
thainlp tag command line.
"""
import argparse
from pythainlp import cli
from pythainlp.tag import locations, named_entity, pos_tag
class SubAppBase:
def __init__(self, name, argv):
parser = argparse.ArgumentParser(**cli.make_usage("tag " + name))
parser.add_argument(
"text", type=... | PyThaiNLP/pythainlp | pythainlp/cli/tag.py | Python | apache-2.0 | 2,123 |
/*
* Copyright 2012-2015 Red Hat 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 ... | oVirt/ovirt-engine-extension-aaa-ldap | src/main/java/org/ovirt/engine/extension/aaa/ldap/Util.java | Java | apache-2.0 | 13,912 |
/*
* Copyright (c) 2014 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | werval/werval | io.werval.modules/io.werval.modules.xml/src/main/java/io/werval/modules/xml/internal/SAXParserFactoryImpl.java | Java | apache-2.0 | 10,474 |
package com.crawljax.oracle;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import com.crawljax.oraclecomparator.Comparator;
import com.crawljax.oraclecomparator.comparators.AttributeComparator;
import com.crawljax.oraclecomparator.comparators.DateComparator;
import com... | guifre/crawljax | src/test/java/com/crawljax/oracle/OracleTest.java | Java | apache-2.0 | 10,464 |
/*
* (C) Copyright 2016 Kurento (http://kurento.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 the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | Kurento/kms-elements | src/server/implementation/objects/RecorderEndpointImpl.cpp | C++ | apache-2.0 | 10,886 |
# frozen_string_literal: true
module Hyrax
module SolrDocument
module Metadata
extend ActiveSupport::Concern
class_methods do
def attribute(name, type, field)
define_method name do
type.coerce(self[field])
end
end
end
module Solr
cla... | samvera/hyrax | app/models/concerns/hyrax/solr_document/metadata.rb | Ruby | apache-2.0 | 4,358 |