max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
7,137 | <gh_stars>1000+
package io.onedev.server.search.entity.build;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.Path;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import org.eclipse.jgit.lib.Constants;
import io.onedev.server.model.Build;
imp... | 428 |
418 | # Generated by Django 2.2.9 on 2020-01-24 12:13
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("event", "0021_auto_20190429_0750"),
]
operations = [
migrations.AlterField(
model_name="organiser"... | 385 |
3,494 | /*
Copyright (c) 2015, The Cinder Project, All rights reserved.
Portions Copyright (c) 2013, Microsoft Open Technologies, Inc.
All rights reserved.
This code is intended for use with the Cinder C++ library: http://libcinder.org
Redistribution and use in source and binary forms, with or without modification, a... | 4,540 |
1,738 | /*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or t... | 2,496 |
348 | {"nom":"Champdolent","dpt":"Charente-Maritime","inscrits":291,"abs":70,"votants":221,"blancs":20,"nuls":7,"exp":194,"res":[{"panneau":"2","voix":102},{"panneau":"1","voix":92}]} | 72 |
965 | IMPLEMENT_SERIAL(CSchemaObject, CObject, VERSIONABLE_SCHEMA | 1)
void CSchemaObject::Serialize(CArchive &ar)
{
CObject::Serialize(ar);
if (ar.IsLoading())
{
int nVersion = ar.GetObjectSchema();
switch (nVersion)
{
case 0:
// read in previous version of
// this objec... | 280 |
312 | extern "C" {
#include "midimonster.h"
//C++ has it's own implementation of these...
#undef min
#undef max
MM_PLUGIN_API int init();
static int ola_configure(char* option, char* value);
static int ola_configure_instance(instance* instance, char* option, char* value);
static int ola_instance(instance* inst);
st... | 480 |
1,587 | package io.reflectoring.solid.isp;
interface IFriesOrder {
void orderFries(int quantity);
}
| 32 |
544 | <gh_stars>100-1000
import os
import sys
import tempfile
import unittest
from pshtt.utils import smart_open
class TestSmartOpen(unittest.TestCase):
def test_without_filename(self):
with smart_open() as fh:
self.assertIs(fh, sys.stdout)
@unittest.skipIf(sys.version_info[0] < 3, 'Python 3 v... | 559 |
4,036 | bool foo(int n1, unsigned short delta) {
return n1 + delta < n1; // BAD
}
| 30 |
1,041 | <filename>ebean-core/src/main/java/io/ebeaninternal/server/type/ScalarTypeEncryptedWrapper.java
package io.ebeaninternal.server.type;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import io.ebean.core.type.DataBinder;
import io.ebean.core.type.DataReader;
import io.ebea... | 1,293 |
922 | <filename>engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/number/InfinityNumberComparatorHelper.java
/*
* Hibernate Validator, declare and validate application constraints
*
* License: Apache License, Version 2.0
* See the license.txt file in the root directory or <http://www.apache.or... | 515 |
512 | import responses
import pytest
from binance.spot import Spot as Client
from tests.util import mock_http_response
from tests.util import random_str
from binance.lib.utils import encoded_string
from binance.error import ParameterRequiredError
mock_item = {"key_1": "value_1", "key_2": "value_2"}
key = random_str()
secr... | 586 |
1,615 | /**
* Created by MomoLuaNative.
* Copyright (c) 2020, Momo Group. All rights reserved.
*
* This source code is licensed under the MIT.
* For the full copyright and license information,please view the LICENSE file in the root directory of this source tree.
*/
package org.luaj.vm2;
import java.io.File;
/**
... | 240 |
1,603 | package com.datahub.authorization;
import java.util.Map;
import lombok.Data;
/**
* POJO representing {@link Authorizer} configurations provided in the application.yml.
*/
@Data
public class AuthorizerConfiguration {
/**
* A fully-qualified class name for the {@link Authorizer} implementation to be registered.... | 143 |
307 | <filename>{{cookiecutter.project_slug}}/app/tests/test_api.py
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from starlette.testclient import TestClient
from app.api import app
def test_docs_redirect():
client = TestClient(app)
response = client.get("/")
ass... | 479 |
1,144 | <reponame>dram/metasfresh
/*
* #%L
* de.metas.adempiere.adempiere.base
* %%
* Copyright (C) 2019 metas GmbH
* %%
* This program 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 2 of the
... | 1,163 |
190,993 | /* Copyright 2020 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-2.0
Unless required by applicable law or a... | 2,435 |
539 | #include "geometrycentral/surface/parameterize.h"
#include "geometrycentral/numerical/linear_solvers.h"
#include "geometrycentral/surface/edge_length_geometry.h"
#include "geometrycentral/surface/uniformize.h"
#include "geometrycentral/utilities/elementary_geometry.h"
#include <algorithm>
#include <queue>
#include <u... | 1,496 |
763 | <filename>projects/batfish-common-protocol/src/test/java/org/batfish/datamodel/matchers/KernelRouteMatchers.java
package org.batfish.datamodel.matchers;
import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
import org.batfish.datamodel.AbstractRoute;
import org.batfish.datamodel.Kerne... | 287 |
675 | <gh_stars>100-1000
/*
* H.265 video codec.
* Copyright (c) 2013-2014 struktur AG, <NAME> <<EMAIL>>
*
* Authors: <NAME> <<EMAIL>>
*
* This file is part of libde265.
*
* libde265 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published ... | 1,829 |
1,847 | #include "VulkanTutorial/OffscreenRenderingVulkanTutorial.h"
#include <absl/base/casts.h>
#include <absl/synchronization/mutex.h>
#include <volk.h>
#include <cstdint>
#include <vector>
#include "OrbitBase/Logging.h"
#include "VulkanTutorialFragmentShader.h"
#include "VulkanTutorialVertexShader.h"
#define CHECK_VK_S... | 8,612 |
678 | <reponame>bzxy/cydia
/**
* This header is generated by class-dump-z 0.2b.
*
* Source: /System/Library/PrivateFrameworks/OfficeImport.framework/OfficeImport
*/
#import <OfficeImport/OfficeImport-Structs.h>
#import <OfficeImport/CMMapper.h>
__attribute__((visibility("hidden")))
@interface EMAxisMapper : CMMapper {... | 326 |
25,073 | <reponame>Nico-du/SpringAll
package cc.mrbird.demo.register;
import cc.mrbird.demo.domain.Strawberry;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar... | 312 |
3,212 | /*
* 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 ... | 943 |
672 | <reponame>perefm/Lumos
#pragma once
#include "Core.h"
#ifdef LUMOS_PLATFORM_WINDOWS
#ifndef NOMINMAX
#define NOMINMAX // For windows.h
#endif
#endif
#pragma warning(push, 0)
#include <spdlog/spdlog.h>
#include <spdlog/fmt/ostr.h>
#pragma warning(pop)
// Core log macros
#define LUMOS_LOG_TRACE(...) SPDLOG_LOGGER_CALL... | 615 |
399 | #include "input/Input.hpp"
#include "input/controller/GamepadController.hpp"
#include "input/controller/RawController.hpp"
#include <GLFW/glfw3.h>
#include <unordered_map>
// Singleton.
Input & Input::manager() {
static Input * input = new Input();
return *input;
}
Input::Input() {
// Check if any joystick is ava... | 4,845 |
1,253 | <filename>tests/bugfixes/nosetests/test_425_latest_requests.py
import requests
import httpretty
from httpretty.errors import UnmockedError
from unittest import skip
from sure import expect
@httpretty.activate(allow_net_connect=True)
def test_latest_requests():
"#425 - httpretty.latest_requests() can be called mu... | 429 |
14,668 | <gh_stars>1000+
def main(request, response):
origin = request.GET.first(b"origin", request.headers[b"origin"])
credentials = request.GET.first(b"credentials", b"true")
headers = [(b"Content-Type", b"text/plain")]
if origin != b'none':
headers.append((b"Access-Control-Allow-Origin", origin))
... | 276 |
2,542 | <reponame>gridgentoo/ServiceFabricAzure
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ----------------------------------------------------... | 2,499 |
2,542 | // ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#include "stdafx.h"
using nam... | 3,376 |
651 | <reponame>omrta-dev/jenkins-build-monitor-plugin
package net.serenitybdd.screenplay.interacting_with_jenkins_api.interactions;
import net.serenitybdd.screenplay.Action;
import net.serenitybdd.screenplay.Actor;
import net.serenitybdd.screenplay.interacting_with_jenkins_api.abilities.InteractWithJenkinsAPI;
import net.t... | 264 |
488 | // Example C11 code: simple example to start things off (testing command line option: -rose:c11)
int main()
{
return 0;
}
| 46 |
534 | <gh_stars>100-1000
{
"type": "mekanism:enriching",
"input": {
"ingredient": {
"item": "minecraft:blue_orchid"
}
},
"output": {
"item": "minecraft:light_blue_dye",
"count": 2
}
} | 101 |
3,377 | package me.chanjar.weixin.cp.demo;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import me.chanjar.weixin.common.util.xml.XStreamInitializer;
import me.chanjar.weixin.cp.api.WxCpInMemoryConfigStorage;
import java.io.InputStream;
/**
* @author <NAME>
*/
@XStreamA... | 332 |
854 | __________________________________________________________________________________________________
sample 7976 kb submission
class Solution {
public:
int countDigitOne(int n) {
long ones = 0;
for (long m = 1; m <= n; m *= 10) {
long a = n / m;
long b = n % m;
ones += (a + 8) ... | 321 |
460 | <filename>playwright/src/main/java/com/microsoft/playwright/impl/TransportLogger.java
package com.microsoft.playwright.impl;
import com.google.gson.JsonObject;
import java.io.IOException;
import java.time.Duration;
import static com.microsoft.playwright.impl.LoggingSupport.logWithTimestamp;
import static com.microso... | 338 |
1,144 | <filename>backend/de.metas.business/src/main/java-legacy/org/compiere/model/CalloutMovement.java
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is f... | 1,900 |
2,151 | <reponame>zipated/src<filename>third_party/pdfium/xfa/fxfa/fm2js/cxfa_fmparser_unittest.cpp
// Copyright 2017 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "xfa/fxfa/fm2js/cxfa_fmparser.h"
#include <vector>
#inclu... | 6,253 |
1,858 | <gh_stars>1000+
package com.dtstack.flink.sql.parse;
import com.dtstack.flink.sql.parser.CreateTmpTableParser;
import com.dtstack.flink.sql.parser.FlinkPlanner;
import com.dtstack.flink.sql.parser.SqlTree;
import org.apache.calcite.sql.SqlKind;
import org.apache.calcite.sql.SqlNode;
import org.apache.flink.table.plann... | 609 |
562 | import os
from conans import ConanFile, MSBuild, AutoToolsBuildEnvironment, tools
from conans.errors import ConanInvalidConfiguration
import yaml
class YojimboConan(ConanFile):
name = "yojimbo"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/networkprotocol/yojimbo"
... | 2,440 |
808 | /*
* Copyright 2017 dmfs GmbH
*
* 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... | 3,968 |
482 | <reponame>lifecontrol/cattle
package io.cattle.platform.resource.pool.subnet;
import static org.junit.Assert.*;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Set;
import org.junit.Test;
public class SubnetAddressGeneratorTest {
protected Set<String> run(String start, String end) {... | 650 |
2,211 | <filename>runtime/android/core_internal/src/org/xwalk/core/internal/PageLoadListener.java
// Copyright (c) 2014 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.xwalk.core.internal;
interface PageLoadListener {
... | 105 |
343 | <filename>syzygy/pdb/pdb_stream_record_unittest.cc
// Copyright 2015 Google Inc. 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/licen... | 2,313 |
979 | <filename>example/more/static-versioned/library-1.0.0/src/calculator.cpp
#include "useless/calculator.h"
namespace calc
{
int64_t square(int64_t value)
{
return value * value;
}
} // namespace calc
| 92 |
338 | package com.tvd12.ezyfoxserver.support.test.controller.app;
import com.tvd12.ezyfox.core.annotation.EzyExceptionHandler;
import com.tvd12.ezyfox.core.annotation.EzyRequestData;
import com.tvd12.ezyfox.core.annotation.EzyTryCatch;
import com.tvd12.ezyfox.util.EzyLoggable;
import com.tvd12.ezyfoxserver.event.EzyUserSess... | 464 |
348 | {"nom":"Brechainville","dpt":"Vosges","inscrits":45,"abs":9,"votants":36,"blancs":2,"nuls":0,"exp":34,"res":[{"panneau":"2","voix":26},{"panneau":"1","voix":8}]} | 68 |
1,323 | <reponame>tr00per/QRGen
package net.glxn.qrgen.core.scheme;
import java.net.MalformedURLException;
import java.net.URL;
/**
* Encodes a url connection, format is: <code>HTTP://URL</code>
*
*/
public class Url extends Schema {
private URL url;
public Url() {
super();
}
public String getUrl() {
if (url !... | 421 |
895 | # Copyright 2020 Adap GmbH. 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 applicable law or ag... | 300 |
765 | <filename>src/systemc/tests/systemc/1666-2011-compliance/version_macros/version_macros.cpp
/*****************************************************************************
Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
more contributor license agreements. See the NOTICE file distributed
wi... | 827 |
543 | package com.riiablo.table;
public interface DataOutput {
DataOutput write8(int value);
DataOutput write16(int value);
DataOutput write32(int value);
DataOutput write64(long value);
DataOutput writeBoolean(boolean value);
DataOutput writeString(CharSequence chars);
}
| 83 |
5,954 | /*
* Copyright (C) 2019 <NAME>
*
* Licensed either under the Apache License, Version 2.0, or (at your option)
* under the terms of the GNU General Public License as published by
* the Free Software Foundation (subject to the "Classpath" exception),
* either version 2, or any later version (collectively, the "Lice... | 4,285 |
370 | <filename>keras_anomaly_detection/library/evaluation_utils.py<gh_stars>100-1000
from sklearn.metrics import average_precision_score, recall_score, precision_score, f1_score
def report_evaluation_metrics(y_true, y_pred):
average_precision = average_precision_score(y_true, y_pred)
precision = precision_score(y_... | 289 |
738 | <reponame>dutrow/crits
from django.core.management.base import BaseCommand
from crits.core.bucket import Bucket
from crits.core.class_mapper import class_from_type
from crits.core.mongo_tools import mongo_connector
class Command(BaseCommand):
"""
Script Class.
"""
def handle(self, *args, **options):
... | 826 |
7,137 | <reponame>sasaie/onedev
package io.onedev.server.web.component.avatarupload;
import java.util.List;
import org.apache.wicket.markup.head.CssHeaderItem;
import org.apache.wicket.markup.head.HeaderItem;
import org.apache.wicket.markup.head.JavaScriptHeaderItem;
import io.onedev.server.web.asset.cropper.CropperResource... | 339 |
565 |
#include "numerics/fma.hpp"
#include "glog/logging.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "testing_utilities/almost_equals.hpp"
namespace principia {
namespace numerics {
using base::CPUFeatureFlags;
using base::HasCPUFeatures;
using testing_utilities::AlmostEquals;
class FMATest : public t... | 503 |
11,871 | <filename>src/extensions/treegrid/extension.json
{
"name": "treegrid",
"version": "1.0.0",
"description": "Plugin to support the jquery treegrid.",
"url": "https://github.com/wenzhixin/bootstrap-table/tree/master/src/extensions/treegrid",
"example": "https://github.com/wenzhixin/bootstrap-table-examples/blob/... | 240 |
562 | <reponame>rockandsalt/conan-center-index<gh_stars>100-1000
#include <vector>
#include <pipes/pipes.hpp>
int main() {
auto source = std::vector<int>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
auto destination = std::vector<int>{};
source >>= pipes::filter([](int i){ return i % 2 == 0; })
>>= pipes::transform([... | 212 |
803 | package com.lfk.justwetools.View.ClassTable;
import android.view.View;
/**
* Created by liufengkai on 16/5/21.
*/
public interface ClassTableOnLongClick {
boolean onLongClick(View view, BlockInfo info);
}
| 73 |
5,535 | <reponame>bradfordb-vmware/gpdb
#!/usr/bin/env python3
import sys, http.client, getopt, socket
def usage(exitarg):
print('usage: %s [-q] host:port' % sys.argv[0])
print()
print(' -q: quiet mode')
print()
print('e.g. %s localhost:8080' % sys.argv[0])
print()
sys.exit(exitarg)
gpfdist = ... | 512 |
1,822 | // Copyright (c) 2020 ETH Zurich
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#pragma once
#include <algorithm>
#include <cctype>
#include <string>
namespace hpx { na... | 250 |
1,311 | // SPDX-FileCopyrightText: 2021 <NAME>
// SPDX-License-Identifier: MIT
#pragma once
#include <Geometry/Plane.h>
#include <Geometry/AABox.h>
/// A camera frustum containing of 6 planes (left, right, top, bottom, near, far) pointing inwards
class [[nodiscard]] Frustum
{
public:
/// Empty constructor
Frustum() = ... | 800 |
558 | package syncer.replica.parser;
import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import syncer.replica.constant.Constants;
import syncer.replica.datatype.command.ModuleParser;
import syncer.replica.datatype.rdb.module.Module;
import syncer.replica.datatype.rdb.stream.*;
import syncer.replica.datatype... | 11,171 |
634 | /****************************************************************
* 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... | 2,008 |
654 | <reponame>DevHerles/aranda-printer
package qz.communication;
public interface DeviceListener {
void close();
}
| 39 |
652 | /**
*
*/
package com.waylau.essentialjava.flow.switchdemo;
/**
* @author <a href="http://www.waylau.com">waylau.com</a>
* @date 2015年12月27日
*/
class SwitchDemo2 {
/**
* @param args
*/
public static void main(String[] args) {
int month = 2;
int year = 2000;
int numDays = 0;
switch (month) {
case... | 347 |
1,487 | package com.alibaba.testable.agent.model;
import static org.objectweb.asm.Opcodes.*;
/**
* simplified of java.lang.invoke.LambdaForm.BasicType
*/
public enum BasicType {
/**
* all reference types
*/
L_TYPE('L', Object.class, WrapperType.OBJECT, ALOAD, ARETURN),
/**
* all primitive types
... | 880 |
855 | <filename>tests/handling/daemons/test_timer_intervals.py
import logging
import kopf
# TODO: tests for idle= (more complicated)
async def test_timer_regular_interval(
resource, dummy, caplog, assert_logs, k8s_mocked, simulate_cycle, frozen_time):
caplog.set_level(logging.DEBUG)
@kopf.timer(*resourc... | 824 |
2,365 | <gh_stars>1000+
{
"main": "./password.cjs.js",
"module": "./password.esm.js",
"unpkg": "./password.min.js",
"types": "./Password.d.ts",
"browser": {
"./sfc": "./Password.vue"
}
} | 90 |
302 | import csv
import sys
from PyQt4.QtCore import QPoint, Qt, QString
from PyQt4.QtGui import QApplication, QCheckBox, QDialogButtonBox, QMenu, QTableWidget, QWidgetAction, QTableWidgetItem
class FilterTableWidget(QTableWidget):
def __init__(self, parent=None):
super(FilterTableWidget, self).__init__(parent=... | 1,896 |
5,169 | <filename>Specs/4/3/f/Cedric/0.2.0/Cedric.podspec.json
{
"name": "Cedric",
"version": "0.2.0",
"summary": "Cedric - Single / multiple files downloader written in pure Swift",
"homepage": "https://github.com/appunite/Cedric",
"license": {
"type": "MIT",
"file": "LICENSE.md"
},
"authors": {
"<NA... | 273 |
2,151 | /*
* Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef NACL_TRUSTED_BUT_NOT_TCB
#error This file is not meant for use in the TCB
#endif
/*
* Small unit tests for the ARM validator
*
... | 32,117 |
1,671 | <filename>ambry-tools/src/main/java/com/github/ambry/cloud/azure/AzureCompactionTool.java
/**
* Copyright 2019 LinkedIn Corp. 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 Li... | 2,214 |
903 | <gh_stars>100-1000
/*
* 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 "... | 3,911 |
2,151 | //===- lib/MC/MCValue.cpp - MCValue implementation ------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | 298 |
1,662 | <reponame>hbutsuak95/iv_rl<filename>rlkit/rlkit/data_management/split_buffer.py
import random
from rlkit.data_management.replay_buffer import ReplayBuffer
class SplitReplayBuffer(ReplayBuffer):
"""
Split the data into a training and validation set.
"""
def __init__(
self,
trai... | 1,094 |
1,673 | <gh_stars>1000+
/*****************************************************************************/
/* */
/* global.c */
/* ... | 2,469 |
348 | {"nom":"Vandeins","circ":"1ère circonscription","dpt":"Ain","inscrits":473,"abs":266,"votants":207,"blancs":17,"nuls":3,"exp":187,"res":[{"nuance":"LR","nom":"<NAME>","voix":103},{"nuance":"MDM","nom":"<NAME>","voix":84}]} | 88 |
1,461 | // Copyright (c) 2012 <NAME>. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and t... | 2,339 |
917 | {
"parent":"block/chest/chest_double_right",
"textures": {
"chest": "entity/chest/normal_right"
}
} | 50 |
1,130 | <gh_stars>1000+
import panel as pn
from bokeh.embed import server_document
from fastapi import FastAPI, Request
from fastapi.templating import Jinja2Templates
from sliders.pn_app import createApp
from sliders2.pn_app import createApp2
app = FastAPI()
templates = Jinja2Templates(directory="templates")
@app.get("/")
... | 316 |
1,309 | <gh_stars>1000+
/******************************************************************************
* Spine Runtimes Software License
* Version 2
*
* Copyright (c) 2013, Esoteric Software
* All rights reserved.
*
* You are granted a perpetual, non-exclusive, non-sublicensable and
* non-transferable license to ins... | 2,452 |
32,544 | <filename>axon/src/test/java/com/baeldung/axon/commandmodel/OrderAggregateUnitTest.java
package com.baeldung.axon.commandmodel;
import com.baeldung.axon.commandmodel.order.OrderAggregate;
import com.baeldung.axon.coreapi.commands.AddProductCommand;
import com.baeldung.axon.coreapi.commands.ConfirmOrderCommand;
import ... | 2,693 |
3,974 | <reponame>BizarreNULL/beagle<gh_stars>1000+
#import <Foundation/Foundation.h>
#import "GHGherkinLineProtocol.h"
@interface GHGherkinLine : NSObject <GHGherkinLineProtocol>
@property (nonatomic, readonly) NSString * lineText;
@property (nonatomic, readonly) NSUInteger lineNumber;
- (id)initWithLine:(NS... | 149 |
707 | // Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include <frc2/command/Subsystem.h>
#include <frc2/command/SwerveControllerCommand.h>
#include <frc/Timer.h>
#include <... | 1,560 |
386 | import pytest
from dirty_equals import (
IsApprox,
IsFloat,
IsInt,
IsNegative,
IsNegativeFloat,
IsNegativeInt,
IsNonNegative,
IsNonPositive,
IsPositive,
IsPositiveFloat,
IsPositiveInt,
)
@pytest.mark.parametrize(
'other,dirty',
[
(1, IsInt),
(1, IsI... | 1,348 |
506 | <filename>articles/springmvc/CODE/springmvc-demo/src/com/hit/controller/TestController.java<gh_stars>100-1000
package com.hit.controller;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;
/**
* Created by 维C果糖 on 2017/4/22.
*/
public class TestContr... | 295 |
348 | {"nom":"Granges-les-Beaumont","circ":"1ère circonscription","dpt":"Drôme","inscrits":779,"abs":476,"votants":303,"blancs":35,"nuls":10,"exp":258,"res":[{"nuance":"LR","nom":"<NAME>","voix":132},{"nuance":"REM","nom":"<NAME>","voix":126}]} | 93 |
325 | from app_api import views
from django.urls import re_path, include, path
from rest_framework.routers import DefaultRouter
from app_api.views import RecommendView, HomeLessonView
router = DefaultRouter(trailing_slash=False)
router.register('common/history/?', views.HistoryViewSet)
router.register('common', views.Com... | 769 |
419 |
/***************************************************************************
*
Copyright 2013 CertiVox UK Ltd. *
*
This file is... | 2,244 |
513 | <reponame>igit-cn/zeus-iot
package com.zmops.zeus.driver.service;
import com.dtflys.forest.annotation.*;
import com.dtflys.forest.http.ForestResponse;
import com.zmops.zeus.driver.annotation.JsonPath;
import com.zmops.zeus.driver.annotation.ParamName;
import com.zmops.zeus.driver.inteceptor.JsonBodyBuildInterceptor;
... | 1,136 |
1,845 | /**
* Copyright 2013 <NAME>
*
* 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,... | 3,800 |
2,486 | import time
import unittest
from slack_sdk.scim import User, Group
from slack_sdk.scim.v1.async_client import AsyncSCIMClient
from slack_sdk.scim.v1.group import GroupMember
from slack_sdk.scim.v1.user import UserName, UserEmail
from tests.helpers import async_test
from tests.slack_sdk.scim.mock_web_api_server import ... | 1,191 |
13,648 | # test for type.__bases__ implementation
if not hasattr(object, '__bases__'):
print("SKIP")
raise SystemExit
class A:
pass
class B(object):
pass
class C(B):
pass
class D(C, A):
pass
# Check the attribute exists
print(hasattr(A, '__bases__'))
print(hasattr(B, '__bases__'))
print(hasattr(C, ... | 392 |
1,444 | <gh_stars>1000+
package mage.cards.t;
import java.util.UUID;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterArti... | 428 |
375 | /*
* Copyright 2019 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
package org.rf.ide.core.execution.debug;
import java.util.Arrays;
import java.util.List;
public interface RobotBreakpoint {
boolean isHitCountEnabled();
... | 302 |
506 | <reponame>Ashindustry007/competitive-programming<filename>hackerrank/algorithms/maxsubarray.cc
// https://www.hackerrank.com/challenges/maxsubarray
#include <iostream>
using namespace std;
int a[100001];
int main() {
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
for (int i = 0; i < n; i++) cin >> a[i];
... | 279 |
865 | """server URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 740 |
3,682 | <filename>typer-cli-python/source_code_step_5/rptodo/rptodo.py
"""This module provides the RP To-Do model-controller."""
from pathlib import Path
from typing import Any, Dict, List, NamedTuple
from rptodo import DB_READ_ERROR
from rptodo.database import DatabaseHandler
class CurrentTodo(NamedTuple):
todo: Dict[... | 558 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.