max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
918 | /*
* 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 ... | 1,692 |
649 | package net.thucydides.core.webdriver;
import com.google.common.base.CharMatcher;
import com.google.common.base.Splitter;
import net.thucydides.core.util.EnvironmentVariables;
import org.apache.commons.lang3.StringUtils;
import java.util.HashMap;
import java.util.Map;
import static net.thucydides.core.ThucydidesSyst... | 2,021 |
1,056 | /*
* 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 ... | 1,202 |
2,025 | <reponame>mehrdad-shokri/phxpaxos<gh_stars>1000+
/*
Tencent is pleased to support the open source community by making
PhxPaxos available.
Copyright (C) 2016 THL A29 Limited, a Tencent company.
All rights reserved.
Licensed under the BSD 3-Clause License (the "License"); you may
not use this file except in complianc... | 558 |
1,056 | <reponame>timfel/netbeans
/*
* 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.... | 2,805 |
336 | <reponame>sibcool/electrum-dash
# -*- coding: utf-8 -*-
import sys
try:
from x11_hash import getPoWHash
import_success = True
load_libx11hash = False
except ImportError:
import_success = False
load_libx11hash = True
if load_libx11hash:
from ctypes import cdll, create_string_buffer, byref
... | 396 |
525 | <filename>test/one/nio/serial/PersistenceTest.java
/*
* Copyright 2015 Odnoklassniki Ltd, Mail.Ru Group
*
* 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/li... | 1,091 |
331 | <reponame>wusyhub/sumk
/**
* Copyright (C) 2016 - 2030 youtongluan.
*
* 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 requir... | 460 |
5,823 | // Copyright 2013 The Flutter 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 SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_SOURCE_FLUTTERSTANDARDCODECINTERNAL_H_
#define SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_SOURCE_FLUTTERSTANDARD... | 879 |
305 | from pytest import mark
def calculate_perdayvolume(events, runtime, interval=60):
# Calculate expected data volume output (GB) if run for 24 hours
# Get the integer # of intervals, data is only generated on completion of an interval
num_intervals = runtime // interval
event_volume = sum([len(event) fo... | 407 |
324 | /*
* 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 ... | 1,626 |
1,641 | import copy
from eth_utils.toolz import merge
from eth import constants
from eth.vm import (
mnemonics,
opcode_values,
)
from eth.vm.forks.byzantium.opcodes import (
ensure_no_static
)
from eth.vm.forks.petersburg.opcodes import (
PETERSBURG_OPCODES,
)
from eth.vm.forks.istanbul.constants import (
... | 821 |
1,863 | //
// 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 the following disclaimer.
// * Redistributions in bin... | 1,095 |
663 | <reponame>mchelen-gov/integrations-core
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import threading
class ReadLock(object):
"""Context manager for a read lock attached to a given condition."""
def __init__(self, condition):
self.... | 924 |
2,151 | <reponame>MoKee/android_external_libcxx
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for de... | 282 |
5,169 | <filename>Specs/6/c/9/HelpCrunchSDK/1.0.43/HelpCrunchSDK.podspec.json
{
"name": "HelpCrunchSDK",
"version": "1.0.43",
"summary": "A perfect live chat, email automation and a super-intuitive help desk in one smart customer communication platform.",
"documentation_url": "https://docs.helpcrunch.com/ios-sdk.html",... | 442 |
440 | <filename>IGC/Compiler/ACLPrintfTranslation.cpp
/*========================== begin_copyright_notice ============================
Copyright (C) 2017-2021 Intel Corporation
SPDX-License-Identifier: MIT
============================= end_copyright_notice ===========================*/
/*========================== begin_... | 1,455 |
1,755 | /*******************************************************************/
/* XDMF */
/* eXtensible Data Model and Format */
/* */
/* Id : Id */
/* Date : $Date$ */
/* ... | 1,398 |
1,165 | <reponame>ryan-comer/galaxy-integrations-python-api<gh_stars>1000+
import json
def create_message(request):
return json.dumps(request).encode() + b"\n"
def get_messages(write_mock):
messages = []
for call_args in write_mock.call_args_list:
data = call_args[0][0]
for line in data.splitlin... | 178 |
535 | {
"title": "Conserve Map on Scroll",
"callback": "initMap",
"libraries": [],
"version": "weekly",
"tag": "conserve_map_on_scroll",
"name": "conserve-map-on-scroll"
}
| 71 |
1,338 | /*
* Copyright 2010, <NAME> <<EMAIL>>
* All rights reserved. Distributed under the terms of the MIT License.
*
* Copyright 2009, <NAME>, <EMAIL>.
* All rights reserved. Distributed under the terms of the MIT License.
*
* Copyright 2005, <NAME> <<EMAIL>>.
* All rights reserved. Distributed under the terms of the... | 6,237 |
312 | #ifndef OCCA_INTERNAL_MODES_METAL_BUFFER_HEADER
#define OCCA_INTERNAL_MODES_METAL_BUFFER_HEADER
#include <occa/internal/core/buffer.hpp>
#include <occa/internal/core/memory.hpp>
#include <occa/internal/api/metal.hpp>
#include <occa/internal/modes/metal/memory.hpp>
namespace occa {
namespace metal {
class buffer... | 412 |
2,707 | package org.jetlinks.community.timeseries.query;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class AggregationTerm {
private String property;
private Aggregation aggregation;
}
| 69 |
713 | package org.infinispan.security;
import java.util.Collection;
/**
* A role to permission mapping.
*
* @author <NAME>
* @since 7.0
*/
public interface Role {
/**
* Returns the name of this role
*/
String getName();
/**
* Returns the list of permissions associated with this role
*/
Col... | 187 |
348 | <reponame>chamberone/Leaflet.PixiOverlay
{"nom":"Saint-Pierre-de-Mons","circ":"9ème circonscription","dpt":"Gironde","inscrits":868,"abs":464,"votants":404,"blancs":26,"nuls":16,"exp":362,"res":[{"nuance":"MDM","nom":"<NAME>","voix":205},{"nuance":"SOC","nom":"<NAME>","voix":157}]} | 116 |
1,033 | package graphql.kickstart.autoconfigure.editor.altair;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import lombok.Data;
@Data
public class InitialSettings {
private String theme;
private String language;
private Integer addQueryDepthLimit;
private Integer tabSize;
private Bo... | 304 |
546 | <reponame>sharpsteve/Beeftext<gh_stars>100-1000
/// \file
/// \author <NAME>
///
/// \brief Implementation of preferences dialog
///
/// Copyright (c) <NAME>. All rights reserved.
/// Licensed under the MIT License. See LICENSE file in the project root for full license information.
#include "stdafx.h"
#include "P... | 1,262 |
677 | /*
* Copyright (c) 2020 Bitdefender
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _AGENT_H_
#define _AGENT_H_
#include "thread_safeness.h"
//
// Agent state.
//
typedef enum _AG_WAITSTATE
{
agNone, ///< No active/pending agents.
agActive, ///< We have an active agent, currently injected inside the... | 389 |
350 | # 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... | 3,535 |
379 | <gh_stars>100-1000
# -*- coding: utf-8 -*-
import unittest
import os
import numpy as npy
from skrf.media import CPW
from skrf.network import Network
from skrf.frequency import Frequency
import skrf as rf
from numpy.testing import assert_array_almost_equal, assert_allclose, run_module_suite
class CPWTestCase(unittest... | 1,468 |
335 | {
"word": "Woodsia",
"definitions": [
"A small tufted fern that grows among rocks in mountains in temperate and cool regions."
],
"parts-of-speech": "Noun"
} | 73 |
562 | <filename>recipes/enkits/all/test_package/test_package.cpp
#include <enkiTS/TaskScheduler.h>
int main() {
enki::TaskScheduler ts;
ts.Initialize();
return 0;
}
| 74 |
1,993 | <reponame>mehrdad-shokri/brave
/*
* Copyright 2013-2020 The OpenZipkin 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 ... | 872 |
1,150 | package me.kaede.androidjnisample;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
public class MainActivity extends AppCompatActivity {... | 353 |
5,788 | /*
* 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 ... | 1,937 |
60,067 | <gh_stars>1000+
#ifndef CAFFE2_OPERATORS_UNSAFE_COALESCE_OP_H_
#define CAFFE2_OPERATORS_UNSAFE_COALESCE_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/export_caffe2_op_to_c10.h"
#include "caffe2/core/operator.h"
namespace caffe2 {
template <class Context>
class UnsafeCoalesceOp final : public Operator... | 1,070 |
491 | <reponame>MirrorYu/Forward<gh_stars>100-1000
// Copyright (C) 2021 THL A29 Limited, a Tencent company. 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.... | 1,334 |
545 | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from le_utils.constants import format_presets
from kolibri.core.content import hooks as content_hooks
from kolibri.plugins import KolibriPluginBase
from kolibri.plugins.hooks import register_hook
cla... | 166 |
335 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Mupen64plus - pif.h *
* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
* Copyright (C) 2002 Hacktarux *
* ... | 1,617 |
897 | <filename>C-Plus-Plus/math/binomial_coefficient_under_modulo.cpp<gh_stars>100-1000
#include<bits/stdc++.h>
using namespace std;
/*
This algorithm is used to calculate ncr under some mod.
ncr = factorial(n)/(factorial(r)*factorial(n-r))
ncr%mod = factorial(n)*inverse(factorial(r))%mod*inverse(factorial(n-r)%mod)%mod (h... | 948 |
1,553 | <reponame>nishaero/wifi-userseg-ryu
# flake8: noqa
__all__ = [
'ExtensionManager',
'EnabledExtensionManager',
'NamedExtensionManager',
'HookManager',
'DriverManager',
]
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
fro... | 181 |
416 | <reponame>benhunter/owasp-pysec<filename>pysec/net/pop.py
# Python Security Project (PySec) and its related class files.
#
# PySec is a set of tools for secure application development under Linux
#
# Copyright 2014 PySec development team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not ... | 2,547 |
445 | /* Automatically generated by
SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1950 uuid: b4089b49-1494-49d2-8966-57cba5c92194
from
TestOSAPlugin VMMaker.oscog-eem.1950 uuid: b4089b49-1494-49d2-8966-57cba5c92194
*/
static char __buildInfo[] = "TestOSAPlugin VMMaker.oscog-eem.1950 uuid: b4089b49-1494-49d2-8966-57c... | 8,818 |
506 | // https://open.kattis.com/problems/roberthood
#include<bits/stdc++.h>
using namespace std;
using p=complex<double>;
using vp=vector<p>;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
int n,s;
cin>>n;
vp a(n);
for(int i=0;i<n;i++){
double x,y;
cin>>x>>y;
a[i]={x,y};
}
sort(a.begin(),a.end(... | 678 |
1,444 |
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.ExileFromGraveCost;
import mage.abilities.effects.AsThoughEffectImpl;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.Car... | 1,075 |
1,169 | <filename>viewpagerlib/src/main/java/com/zhengsr/viewpagerlib/indicator/CircleIndicator.java
package com.zhengsr.viewpagerlib.indicator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.content.... | 6,044 |
696 | <filename>modules/math/src/test/java/com/opengamma/strata/math/impl/function/special/NaturalLogGammaFunctionTest.java
/*
* Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.strata.math.impl.function.special;
import ... | 569 |
416 | package org.simpleflatmapper.csv.test.bug;
import org.junit.Test;
import org.simpleflatmapper.csv.CsvMapper;
import org.simpleflatmapper.csv.CsvMapperFactory;
import org.simpleflatmapper.util.ListCollector;
import java.io.IOException;
import java.io.StringReader;
import java.util.HashMap;
import java.util.List;
impor... | 871 |
1,305 | /*
* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.ietf.jgss;
import java.net.InetAddress;
import java.util.Arrays;
/**
* This class encaps... | 2,424 |
971 | #include "network/postgres/postgres_protocol_util.h"
#include <sstream>
#include "loggers/network_logger.h"
namespace noisepage::network {
execution::sql::SqlTypeId PostgresProtocolUtil::PostgresValueTypeToInternalValueType(const PostgresValueType type) {
switch (type) {
case PostgresValueType::INVALID:
... | 1,239 |
23,439 | <gh_stars>1000+
/*
* Copyright 1999-2020 Alibaba Group Holding Ltd.
*
* 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 req... | 333 |
528 | <filename>tests/opytimizer/optimizers/science/test_weo.py<gh_stars>100-1000
import numpy as np
from opytimizer.optimizers.science import weo
from opytimizer.spaces import search
def test_weo_params():
params = {
'E_min': -3.5,
'E_max': -0.5,
'theta_min': -np.pi / 3.6,
'theta_max':... | 994 |
1,144 | <reponame>dram/metasfresh
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
import java.sql.ResultSet;
import java.util.Properties;
/** Generated Model for AD_ColumnCallout
* @author Adempiere (generated)
*/
@SuppressWarnings("javadoc")
public class X_AD_ColumnCallout extends org.compiere.model.P... | 2,302 |
710 | # This file is part of Patsy
# Copyright (C) 2011 <NAME> <<EMAIL>>
# See file LICENSE.txt for license information.
# This file implements a simple "shunting yard algorithm" parser for infix
# languages with parentheses. It is used as the core of our parser for
# formulas, but is generic enough to be used for other pur... | 4,320 |
5,169 | <gh_stars>1000+
{
"name": "RapidAPISDK",
"version": "0.1",
"summary": "Find, try and connect to APIs easily with the RapidAPI marketplace",
"description": "RapidAPI is the world's first opensource API marketplace. It allows developers to discover and connect to the world's top APIs more easily and manage multip... | 303 |
839 | /**
* 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 m... | 1,284 |
32,544 | <filename>libraries/src/main/java/com/baeldung/cglib/mixin/Class1.java<gh_stars>1000+
package com.baeldung.cglib.mixin;
public class Class1 implements Interface1 {
@Override
public String first() {
return "first behaviour";
}
} | 98 |
640 | extern const unsigned char alien1_bin[];
#define alien1_bin_size 192
extern const unsigned char alien1_bomb_bin[];
#define alien1_bomb_bin_size 32
extern const unsigned char alien2_bin[];
#define alien2_bin_size 192
extern const unsigned char alien2_bomb_bin[];
#define alien2_bomb_bin_size 32
extern con... | 1,079 |
1,545 | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/112b_models.XResNet1dPlus.ipynb (unless otherwise specified).
__all__ = ['XResNet1dPlus', 'xresnet1d18plus', 'xresnet1d34plus', 'xresnet1d50plus', 'xresnet1d101plus',
'xresnet1d152plus', 'xresnet1d18_deepplus', 'xresnet1d34_deepplus', 'xresnet1d50_deepplus',
... | 2,325 |
12,004 | import pulumi
import base64
encoded = base64.b64encode("haha business".encode()).decode()
joined = "-".join([
"haha",
"business",
])
| 56 |
892 | {
"schema_version": "1.2.0",
"id": "GHSA-x6xq-cgc6-h2fq",
"modified": "2022-05-13T01:12:58Z",
"published": "2022-05-13T01:12:58Z",
"aliases": [
"CVE-2013-2079"
],
"details": "mod/assign/locallib.php in the assignment module in Moodle 2.3.x before 2.3.7 and 2.4.x before 2.4.4 does not consider capabili... | 696 |
991 | {
"TRIGGER": [
{
"name": "Timer",
"description": "The Timer Trigger will fire a workflow on a scheduled interval.",
"type": "TRIGGER",
"nodeClazz": "TimerNode",
"configClazz": "TimerNodeConfiguration",
"defaultConfiguration": {
"scheduleType": "SIMPLE_INTERVAL",
"interval": 1,
... | 2,194 |
325 | <filename>sky/legacy/leftover.py
from collections import Counter
class SoupStats():
def __init__(self, soup):
self.soup = soup
self.counter = Counter()
for child in soup.findChildren():
for atts in child.attrs.items():
k,v = atts
self.coun... | 448 |
19,529 | /*
* Copyright 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 applicab... | 55,737 |
357 | /*
* Copyright (c) 2012-2017 VMware, 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/licenses/LICENSE-2.0
*
* Unless required by ... | 4,735 |
1,027 | <filename>chromium_src/chrome/browser/download/download_core_service.cc
// Copyright 2017 The Brave 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 "chrome/browser/download/download_core_service.h"
// static
int DownloadCor... | 108 |
348 | package com.sheefee.simple.sso.client.constant;
/**
* 授权过程中涉及到的常量字符串
*
* @author sheefee
* @date 2017年9月17日 下午2:46:07
*
*/
public interface AuthConst {
// 会话是否授权标志
public static String IS_LOGIN = "isLogin";
// 登录中心url
public static String LOGIN_URL = "loginUrl";
// 注销url
public static String LOGOUT_URL = ... | 259 |
7,746 | /*++
Copyright (c) 2011 Microsoft Corporation
Module Name:
sat_clause_set.h
Abstract:
Set of clauses
Author:
<NAME> (leonardo) 2011-05-25.
Revision History:
--*/
#pragma once
#include "sat/sat_clause.h"
namespace sat {
class clause_set {
unsigned_vector m_id2pos;
clause_vecto... | 505 |
406 | <gh_stars>100-1000
/*
* MIT License
*
* Copyright (c) 2019 <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the righ... | 1,573 |
1,056 | <filename>ide/languages/src/org/netbeans/api/languages/ASTEvaluator.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 ownership. The ASF licenses this file... | 602 |
881 | <reponame>faizol/restinio
#pragma once
#include <string>
#include <vector>
inline std::string
to_char_each( std::vector< int > source )
{
std::string result;
result.reserve( source.size() );
for( const auto & val : source )
{
result.push_back( static_cast<char>(val) );
}
return result;
}
| 116 |
510 | <filename>tests/test_mesh_expand.py
from __future__ import absolute_import
from sfepy.base.testing import TestCommon
class Test(TestCommon):
@staticmethod
def from_conf(conf, options):
test = Test(conf=conf, options=options)
return test
def test_mesh_expand(self):
import numpy as ... | 508 |
809 | /**
* @file
*
* @date Oct 28, 2020
* @author <NAME>
*/
#include <stddef.h>
#include <locale.h>
char *setlocale(int category, const char *locale) {
(void)category; (void)locale;
return NULL;
}
struct lconv *localeconv(void) {
return NULL;
}
| 104 |
603 | <filename>venv/Lib/site-packages/nbformat/__init__.py
"""The Jupyter notebook format
Use this module to read or write notebook files as particular nbformat versions.
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import io
from traitlets.log import get_logger... | 1,903 |
310 | <reponame>BearerPipelineTest/usesthis<filename>gear/hardware/h/h500.json<gh_stars>100-1000
{
"name": "H500",
"description": "A PC desktop case.",
"url": "https://www.nzxt.com/products/h500-matte-white"
}
| 87 |
1,105 | <gh_stars>1000+
import statistics
from typing import Tuple
from river import base
from .base_neighbors import BaseKNN
from .neighbors import DistanceFunc
class KNNRegressor(BaseKNN, base.Regressor):
"""K-Nearest Neighbors regressor.
This non-parametric regression method keeps track of the last `window_size... | 2,102 |
1,212 | #!/usr/bin/env python
# Example for using the shared library from python
# Will work with either python 2 or python 3
# Requires cmark library to be installed
from ctypes import CDLL, c_char_p, c_long
import sys
import platform
sysname = platform.system()
if sysname == 'Darwin':
libname = "libcmark.dylib"
elif ... | 369 |
2,753 | <gh_stars>1000+
/*
* Copyright (c) The Shogun Machine Learning Toolbox
* Written (w) 2014 <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:
*
* 1. Redistributions of source code must ... | 22,664 |
338 | // test CPU direct solver
#include "test_common_linear_systems.h"
#include <minisam/3rdparty/Catch2/catch.hpp>
#include <minisam/utils/testAssertions.h>
#include <minisam/linear/SparseCholesky.h>
using namespace std;
using namespace minisam;
/* **********************************************************************... | 556 |
1,018 | <filename>agent/core/src/test/java/org/glowroot/agent/weaving/WeavingJDK14BytecodeAspect.java
/*
* Copyright 2012-2015 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 th... | 402 |
458 | <gh_stars>100-1000
/*
* 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 b... | 2,684 |
579 | /*
* Copyright (c) 2020-2021 Valve Corporation
* Copyright (c) 2020-2021 LunarG, 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... | 525 |
841 | package org.jboss.resteasy.embedded.test;
import org.jboss.resteasy.plugins.server.embedded.EmbeddedJaxrsServer;
public class EmbeddedServerTestBase {
private static String serverFilename;
private static EmbeddedJaxrsServer server;
private static Class serverClazz;
public static EmbeddedJaxrsServer getSe... | 253 |
372 | <gh_stars>100-1000
/*
* 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 ... | 1,638 |
892 | {
"schema_version": "1.2.0",
"id": "GHSA-wxj2-qc9p-65r3",
"modified": "2022-05-13T01:31:34Z",
"published": "2022-05-13T01:31:34Z",
"aliases": [
"CVE-2019-1003026"
],
"details": "A server-side request forgery vulnerability exists in Jenkins Mattermost Notification Plugin 2.6.2 and earlier in Mattermost... | 494 |
331 | package org.fordes.subview.utils;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.date.TimeInterval;
import cn.hutool.core.util.StrUtil;
import javafx.scene.control.IndexRange;
import lombok.extern.slf4j.Slf4j;
import org.fordes.subview.entity.DTO.SearchDTO;
import... | 4,142 |
364 | package com.linkedin.dagli.list;
import com.linkedin.dagli.annotation.equality.ValueEquality;
import com.linkedin.dagli.producer.Producer;
import com.linkedin.dagli.transformer.AbstractPreparedTransformerVariadic;
import java.util.ArrayList;
import java.util.List;
/**
* Creates a list from the values produced by on... | 414 |
435 | <gh_stars>100-1000
//
// Copyright (C) 2014 <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 requ... | 648 |
435 | {
"copyright_text": "Creative Commons Attribution license (reuse allowed)",
"description": "Object Relational Mappers (ORMs) are awesome enhancers of developer\nproductivity. The freedom of having the library write that SQL and give\nyou back a useful, rich model instance (or a bunch of them) instead of\njust a tup... | 817 |
1,351 | /*
* 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 ... | 425 |
1,231 | <gh_stars>1000+
public static int getAverageColor(int[][] image) {
int sum = 0;
for (int x = 0; x < image.length; x++) {
for (int y = 0; y < image[0].length; y++) {
sum += image[x][y];
}
}
return sum / (image.length * image[0].length);
}
| 132 |
973 | <reponame>bcaglayan/pcap4j<gh_stars>100-1000
module org.pcap4j.packetfactory.statik {
requires org.pcap4j.core;
requires java.sql;
provides org.pcap4j.packet.factory.PacketFactoryBinderProvider with
org.pcap4j.packet.factory.statik.services.StaticPacketFactoryBinderProvider;
}
| 116 |
892 | <filename>advisories/unreviewed/2022/05/GHSA-h5q5-9vcx-54g7/GHSA-h5q5-9vcx-54g7.json
{
"schema_version": "1.2.0",
"id": "GHSA-h5q5-9vcx-54g7",
"modified": "2022-05-13T01:34:58Z",
"published": "2022-05-13T01:34:58Z",
"aliases": [
"CVE-2018-10843"
],
"details": "source-to-image component of Openshift Co... | 577 |
483 | # flake8: noqa
try:
from typing import Literal, Protocol, TypedDict # lgtm [py/unused-import]
except ImportError:
from typing_extensions import ( # lgtm [py/unused-import]
Literal,
Protocol,
TypedDict,
)
| 108 |
1,073 | <reponame>oubotong/Armariris<filename>tools/clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp
// RUN: %clang -target x86_64-unknown-unknown -fverbose-asm -g -O0 -S -emit-llvm %s -o - | FileCheck %s
// <rdar://problem/12566646>
class A {
int x[];
};
A a;
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "x"
/... | 383 |
1,292 | /*
* Copyright 2010-2011, Sikuli.org
* Released under the MIT License.
*
*/
package org.sikuli.ide;
import java.awt.event.KeyEvent;
import java.awt.event.InputEvent;
import javax.swing.*;
import java.io.IOException;
import java.util.prefs.*;
import com.apple.eawt.*;
import org.sikuli.script.Debug;
// http://list... | 1,231 |
1,172 | <reponame>michaelfig/caja
// Copyright (C) 2005 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.org/licenses/LICENSE-2.0
//
// Unless required by ... | 3,126 |
1,755 | /*=========================================================================
Program: Visualization Toolkit
Module: TestCONVERGECFDReader.cxx
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distribute... | 7,136 |
6,989 | """
Validator for a regular langage.
"""
from __future__ import unicode_literals
from prompt_toolkit.validation import Validator, ValidationError
from prompt_toolkit.document import Document
from .compiler import _CompiledGrammar
__all__ = (
'GrammarValidator',
)
class GrammarValidator(Validator):
"""
... | 902 |
8,629 | <filename>tests/ci/git_helper.py
#!/usr/bin/env python
import argparse
import os.path as p
import re
import subprocess
from typing import List, Optional
# ^ and $ match subline in `multiple\nlines`
# \A and \Z match only start and end of the whole string
RELEASE_BRANCH_REGEXP = r"\A\d+[.]\d+\Z"
TAG_REGEXP = (
r"\A... | 2,115 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.