max_stars_count
int64
301
224k
text
stringlengths
6
1.05M
token_count
int64
3
727k
635
from __future__ import absolute_import import unittest import numpy as np from tests.sample_data import SampleData from pyti import moving_average_convergence_divergence class TestStandardVariance(unittest.TestCase): def setUp(self): """Create data to use for testing.""" self.data = SampleData()....
5,533
358
<gh_stars>100-1000 #pragma once #include <QLabel> #include <QMainWindow> #include <QProgressBar> #include <agz/gui_common/reporter.h> #include <agz/factory/factory.h> #include <agz/tracer/tracer.h> class GUI : public QMainWindow { Q_OBJECT public: GUI(); ~GUI(); void load_config(const std::string...
494
312
{ "name": "documentation", "version": "1.0.0", "description": "Epiphany presentations", "main": "pub-config.js", "dependencies": { "pub-theme-shower-ribbon": "^1.6.0" }, "devDependencies": {}, "repository": { "type": "git", "url": "git://github.com/adapteva/documentation" }, "scripts": {...
196
14,668
<filename>components/autofill/core/browser/autofill_profile_validation_util.h // Copyright 2017 The Chromium 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 COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_VALIDATION_UTIL_H_...
575
1,459
<filename>machida/lib/wallaroo/experimental/__init__.py # Copyright 2018 The Wallaroo 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/LICEN...
16,362
5,079
{"body":"<div><div id=\"idle_session_timeout\"><div class=\"hue-doc-title\">IDLE_SESSION_TIMEOUT Query Option (Impala 2.12 or higher only)</div><div><p>\n The <span class=\"hue-doc-codeph\">IDLE_SESSION_TIMEOUT</span> query option sets the time in seconds after\n which an idle session is cancelled. A session ...
831
2,231
<gh_stars>1000+ // Copyright 2020 The Defold Foundation // Licensed under the Defold License version 1.0 (the "License"); you may not use // this file except in compliance with the License. // // You may obtain a copy of the License, together with FAQs at // https://www.defold.com/license // // Unless required by app...
1,951
639
package com.pranay.rxjavastart; import android.os.Bundle; import android.support.v4.app.Fragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import rx.Observable; import rx.Observer; import rx.Subscriber; import rx.Subscription; import rx.andr...
1,462
2,692
<reponame>tonybaloney/onefuzz #!/usr/bin/env python # # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import logging import os from typing import Any, Dict, Optional, Union from onefuzztypes.enums import TelemetryData, TelemetryEvent from opencensus.ext.azure.log_exporter import AzureLogHandl...
846
419
/** * @file lv_indev_proc.c * */ /********************* * INCLUDES ********************/ #include "lv_indev.h" #include "../../lv_conf.h" #include "../lv_hal/lv_hal_tick.h" #include "../lv_core/lv_group.h" #include "../lv_core/lv_refr.h" #include "../lv_misc/lv_task.h" #include "../lv_misc/lv_math.h" #incl...
11,008
1,545
<filename>stream/distributedlog/core/src/main/java/org/apache/distributedlog/lock/LockStateChangedException.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 copyrig...
476
373
/* * #%L * ACS AEM Commons Bundle * %% * Copyright (C) 2014 Adobe * %% * 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 * * Unle...
531
892
<reponame>westonsteimel/advisory-database-github { "schema_version": "1.2.0", "id": "GHSA-3jqw-hwhx-6fx6", "modified": "2022-05-01T07:43:37Z", "published": "2022-05-01T07:43:37Z", "aliases": [ "CVE-2006-6996" ], "details": "Multiple cross-site scripting (XSS) vulnerabilities in warforge.NEWS 1.0 allow...
471
8,232
<reponame>isra-fel/STL // Copyright (c) Microsoft Corporation. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // _WStopfx function #include <cwctype> #include "xmath.hpp" _EXTERN_C_UNLESS_PURE int _WStopfx(const wchar_t** ps, wchar_t** endptr) { // parse prefix of floating-point field c...
1,498
1,056
<reponame>Antholoj/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 ...
3,742
6,046
/* * librdkafka - Apache Kafka C library * * Copyright (c) 2016, <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 retain the above copyrig...
614
328
/* * Copyright (c) 2018. Lorem ipsum dolor sit amet, consectetur adipiscing elit. * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagi...
1,559
488
<reponame>maurizioabba/rose<filename>tests/CompileTests/ElsaTestCases/notCompilable/std/7.3.4a.cc<gh_stars>100-1000 // 7.3.4a.cc asm("collectLookupResults i=9 i=6"); namespace A { int i; // line 6 namespace B { namespace C { int i; // line 9 } using namespac...
379
335
{ "word": "Liberation", "definitions": [ "The action of setting someone free from imprisonment, slavery, or oppression; release.", "Freedom from limits on thought or behaviour." ], "parts-of-speech": "Noun" }
85
1,127
// Copyright (C) 2018-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include <ie_locked_memory.hpp> #include "unit_test_utils/mocks/mock_allocator.hpp" using namespace InferenceEngine; using namespace ::testing; TEST(LockedMemoryTest, canUnlockMemoryAfterUsage) { std::unique_ptr<MockAllocator>...
750
2,338
// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -x c++ -emit-llvm %s -o - | FileCheck %s // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-apple-darwin10 -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-apple-darwin10 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s // RU...
776
5,964
// Copyright 2016 The Chromium 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 "platform/v8_inspector/V8StringUtil.h" #include "platform/inspector_protocol/String16.h" #include "platform/v8_inspector/V8InspectorImpl.h" #inc...
4,207
354
<filename>external/openglcts/modules/common/subgroups/glcSubgroupsClusteredTests.cpp /*------------------------------------------------------------------------ * OpenGL Conformance Tests * ------------------------ * * Copyright (c) 2017-2019 The Khronos Group Inc. * Copyright (c) 2017 Codeplay Software Ltd. * Cop...
12,763
2,138
<gh_stars>1000+ package org.jeecgframework.jwt.util; import org.jeecgframework.jwt.util.menu.ResponseMessageCodeEnum; /** * restful 接口响应返回结构 * @author scott * @param <T> */ public class ResponseMessage<T> { private String respCode; private String respMsg; private T data; private boolean ok; ...
508
416
/*! @header * This header defines fixed size vector types with relaxed alignment. For * each vector type defined by <simd/vector_types.h> that is not a 1- or 3- * element vector, there is a corresponding type defined by this header that * requires only the alignment matching that of the underlying scalar type....
20,501
821
<reponame>rungrochph/google-caliper /* * Copyright (C) 2017 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 requ...
908
4,036
<filename>python/ql/test/library-tests/web/tornado/test.py import tornado.web class Handler1(tornado.web.RequestHandler): def get(self): self.write(self.get_argument("xss")) class Handler2(tornado.web.RequestHandler): def get(self): args = self.get_body_arguments() name = args[0] ...
263
703
<gh_stars>100-1000 #pragma once #include <Foundation/Math/Math.h> /// \brief Represents an interval with a start and an end value. template <class Type> class ezInterval { public: /// \brief The default constructor initializes the two values to zero. constexpr ezInterval() = default; /// \brief Initializes bot...
565
406
<filename>test/test_theft_autoshrink_int_array.c #include "test_theft.h" #include "test_theft_autoshrink_int_array.h" static void ia_print(FILE *f, const void *instance, void *env); #define IA_MAX 256 static enum theft_alloc_res ia_alloc(struct theft *t, void *env, void **instance) { (void)env; uint8_t *int...
668
628
<reponame>gaybro8777/osf.io import pytest from osf_tests.factories import AuthUserFactory, InstitutionFactory @pytest.mark.django_db class TestUserInstitutions: @pytest.fixture() def institutions(self): return InstitutionFactory(), InstitutionFactory() @pytest.fixture() def user(self, instit...
323
563
<reponame>dragonazz/r2dbc-mysql /* * Copyright 2018-2021 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,821
4,016
<reponame>mikelolasagasti/bandit def subprocess_shell_cmd(): # sample function with known subprocess shell cmd candidates def yaml_load(): # sample function with known yaml.load candidates def xml_sax_make_parser(): # sample function with known xml.sax.make_parser candidates
91
352
<reponame>sivanag1974/t-vault<filename>tvaultapi/src/main/java/com/tmobile/cso/vault/api/model/IAMServiceAccountUser.java /** ******************************************************************************* * Copyright 2020 T-Mobile, US * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not...
1,042
372
<reponame>yoshi-code-bot/google-api-java-client-services<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 requi...
1,338
3,372
/* * Copyright 2016-2021 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...
2,356
318
#include <iostream> #include <opengm/unittests/test.hxx> #include <opengm/inference/auxiliary/lp_functiontransfer.hxx> #include <opengm/utilities/random.hxx> #include <opengm/functions/explicit_function.hxx> #include <opengm/functions/soft_constraint_functions/sum_constraint_function.hxx> #include <opengm/functions/s...
22,670
754
package com.alibaba.fastjson.serializer; import com.google.common.collect.Multimap; import java.io.IOException; import java.lang.reflect.Type; import java.util.Collection; import java.util.Map; /** * Created by wenshao on 15/01/2017. */ public class GuavaCodec implements ObjectSerializer { public static GuavaC...
246
5,196
<gh_stars>1000+ /* * Copyright 2016 The Cartographer 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 b...
1,439
879
import pytest import six import sqlalchemy as sa from sqlalchemy_utils.types import ip_address @pytest.fixture def Visitor(Base): class Visitor(Base): __tablename__ = 'document' id = sa.Column(sa.Integer, primary_key=True) ip_address = sa.Column(ip_address.IPAddressType) def __re...
434
459
/* * Copyright (C) 2014 VenomVendor <<EMAIL>> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
1,082
364
<filename>sbat.c<gh_stars>100-1000 // SPDX-License-Identifier: BSD-2-Clause-Patent /* * sbat.c - parse SBAT data from the .sbat section data */ #include "shim.h" EFI_STATUS parse_sbat_section(char *section_base, size_t section_size, size_t *n_entries, struct sbat_section_entry ***entriesp) { struct sbat_...
4,469
1,772
<reponame>axelpavageau/django-DefectDojo from django.conf import settings from dojo.models import Finding, Q from django.utils import timezone import logging logger = logging.getLogger(__name__) deduplicationLogger = logging.getLogger("dojo.specific-loggers.deduplication") """ Common code for reimporting from APIV2 ...
1,552
2,071
// // NSAlert+XM.h // iOSImagesExtractor // // Created by chixm on 2020/6/2. // Copyright © 2020 chi. All rights reserved. // #import <Cocoa/Cocoa.h> NS_ASSUME_NONNULL_BEGIN @interface NSAlert (XM) + (instancetype)xm_alertWithMessageText:(nullable NSString *)message informativeText:(nullable NSString *)informat...
148
1,764
<filename>app/src/main/java/com/king/tv/mvp/presenter/LiveListPresenter.java package com.king.tv.mvp.presenter; import com.king.base.util.LogUtils; import com.king.base.util.StringUtils; import com.king.tv.App; import com.king.tv.bean.LiveInfo; import com.king.tv.bean.LiveListResult; import com.king.tv.bean.P; import ...
3,268
372
package org.boon; /** * Created by gcc on 1/15/15. */ public class Terminal { public enum Escape { RESET("\u001B[0m"), BOLD_ON("\u001B[1m"), ITALICS_ON("\u001B[3m"), UNDERLINE_ON("\u001B[4m"), INVERSE_ON("\u001B[7m"), STRIKETHROUGH_ON("\u001B[9m"), BOLD_...
769
310
{ "name": "X-T10", "description": "A 16 megapixel mirrorless camera.", "url": "http://www.fujifilmusa.com/products/digital_cameras/x/fujifilm_x_t10/" }
68
690
/* * Copyright 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 required by applicable law or agreed to in writin...
512
498
<gh_stars>100-1000 // // lager - library for functional interactive c++ programs // Copyright (C) 2019 <NAME> // // This file is part of lager. // // lager is free software: you can redistribute it and/or modify // it under the terms of the MIT License, as detailed in the LICENSE // file located at the root of this sou...
575
937
""" Web_server添加配置文件,conf文件里面是类似字典的字符串,通过eval()就能把字符串转为python对应的数据类型-字典 conf配置文件中可以设置一些**固定**的资源:框架路径,服务器端口号等等 shell脚本来配置运行服务器,不需要自己手动输入文件名+运行时参数 shell脚本中是一些linux命令(能够在linux终端运行的命令),在**权限允许**的情况下,会从头到尾执行一遍 shell脚本一般用来运维和自动部署:同时更新100台电脑 在lunux系统下通过:chmod u+x run.sh 添加X的权限,使其能够直接通过./run.sh来运行 ""...
1,979
862
<reponame>felipeek/bullet3<gh_stars>100-1000 // This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2018 <NAME> <<EMAIL>> // Copyright (C) 2020 <NAME> <<EMAIL>> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of...
23,337
407
<reponame>iuskye/SREWorks package com.alibaba.sreworks.health.controllers.definition; import com.alibaba.sreworks.health.api.definition.DefinitionService; import com.alibaba.sreworks.health.domain.req.definition.DefinitionCreateReq; import com.alibaba.sreworks.health.domain.req.definition.DefinitionUpdateReq; import c...
2,885
3,227
<reponame>ffteja/cgal #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/point_generators_2.h> #include <CGAL/hilbert_sort.h> #include <iostream> #include <vector> typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef K::Point_2 Poin...
382
679
/************************************************************** * * 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 y...
2,872
1,180
<filename>third_party/cpuinfo/src/init.c #if defined(_WIN32) || defined(__CYGWIN__) #include <windows.h> #elif !defined(__EMSCRIPTEN__) || defined(__EMSCRIPTEN_PTHREADS__) #include <pthread.h> #endif #include <cpuinfo.h> #include <cpuinfo/internal-api.h> #include <cpuinfo/log.h> #ifdef __APPLE__ #include ...
969
2,338
<filename>clang-tools-extra/clangd/FuzzyMatch.h<gh_stars>1000+ //===--- FuzzyMatch.h - Approximate identifier matching ---------*- C++-*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apa...
1,849
670
<reponame>MuddyFishing/juejin-strategy # encoding: utf-8 import arrow def before_10_am(utc_time): # use bar time to check if before 10 AM t = arrow.get(utc_time).to('local') hour = t.datetime.hour return hour < 10 and hour >= 9 # FIXED hour error def after_10_am(utc_time): # use bar time to ...
505
9,425
<gh_stars>1000+ """ Unit tests for salt.utils.proxy :codeauthor: :email:`<NAME> <<EMAIL>>` """ import logging import salt.grains.esxi as esxi_grains from tests.support.mixins import LoaderModuleMockMixin from tests.support.mock import patch from tests.support.unit import TestCase log = logging.getLogger(__...
1,951
1,143
<filename>src/java/com/twitter/common/examples/pingpong_thrift/client/PingPongClient.java package com.twitter.common.examples.pingpong_thrift.client; import java.util.logging.Logger; import org.apache.thrift.TException; import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.protocol.TProtocol; im...
536
376
// Copyright (C) 2020 <NAME> // This file is part of the "Nazara Engine - Utility module" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_RENDERBUFFERVIEW_HPP #define NAZARA_RENDERBUFFERVIEW_HPP #include <Nazara/Prerequisites.hpp> #include <Nazara/Core/Movabl...
392
435
{ "copyright_text": "Standard YouTube License", "description": "<NAME> - Happiness in Open Source", "duration": 2886, "language": "eng", "recorded": "2016-05-25", "related_urls": [], "speakers": [ "<NAME>" ], "tags": [ "Keynote" ], "thumbnail_url": "https://i.ytimg.com/vi/lQz0oFQgAf4/maxre...
223
8,027
<filename>tools/build_rules/python_rules.bzl # Copyright 2018-present Facebook, 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 # # Unl...
361
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,873
1,790
/* * Copyright (c) 2014, Cloudera, Inc. All Rights Reserved. * * Cloudera, Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"). You may not use this file except in * compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICE...
1,846
373
<filename>ss-client/src/main/java/com/dianrong/common/uniauth/client/custom/basicauth/BasicAuthDetector.java package com.dianrong.common.uniauth.client.custom.basicauth; import java.io.UnsupportedEncodingException; import javax.servlet.http.HttpServletRequest; import org.springframework.security.authentication.BadCr...
833
892
{ "schema_version": "1.2.0", "id": "GHSA-h92j-m24w-8xp7", "modified": "2022-05-13T01:34:22Z", "published": "2022-05-13T01:34:22Z", "aliases": [ "CVE-2018-15379" ], "details": "A vulnerability in which the HTTP web server for Cisco Prime Infrastructure (PI) has unrestricted directory permissions could ...
667
3,442
/* * Jitsi, the OpenSource Java VoIP and Instant Messaging client. * * Copyright @ 2015 Atlassian Pty 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.or...
3,224
3,651
/* * * * Copyright 2010-2016 OrientDB LTD (http://orientdb.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...
1,343
1,043
/* * Copyright (c) 1993-2014, NVIDIA CORPORATION. All rights reserved. * * 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 rights ...
62,522
575
<gh_stars>100-1000 // Copyright 2019 The Chromium 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 MOJO_PUBLIC_CPP_BINDINGS_REMOTE_SET_H_ #define MOJO_PUBLIC_CPP_BINDINGS_REMOTE_SET_H_ #include <iterator> #include <set> #incl...
2,061
1,150
# Copyright (c) 2019 PaddlePaddle 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 applic...
17,716
399
<reponame>obastemur/SVT-AV1<filename>Source/Lib/Common/Codec/EbMalloc.h<gh_stars>100-1000 /* * Copyright(c) 2019 Intel Corporation * * This source code is subject to the terms of the BSD 2 Clause License and * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License * was not distributed with this so...
4,841
15,193
<gh_stars>1000+ #----------------------------------------------------------------------------- # Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
814
764
<reponame>abhinotes/eventuate-local package io.eventuate.javaclient.commonimpl.common.schema; import java.util.ArrayList; import java.util.List; public class AggregateSchemaBuilder { private final ConfigurableEventSchema configurableEventSchema; private final String aggregateType; private List<AggregateSchemaV...
333
819
<gh_stars>100-1000 { "name": "crypto_sign_ed25519_sk_to_pk", "type": "function", "inputs": [ { "name": "privateKey", "type": "buf", "length": "libsodium._crypto_sign_secretkeybytes()" } ], "outputs": [ { "name": "publicKey", "type": "buf", "length": "libsodium._...
289
5,964
/* * Copyright (C) 2013 Google Inc. 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 conditio...
1,228
1,537
/**************************************************************************** * * Copyright (c) 2021 PX4 Development Team. 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. Redistri...
3,478
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. // ------------------------------------------------------------ #pragma once namespace Data {...
3,457
2,151
/* * Copyright (C) 2011 Apple Inc. 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 retain the above copyright * notice, this list of conditions a...
1,406
1,733
<filename>toys/posix/mkfifo.c<gh_stars>1000+ /* mkfifo.c - Create FIFOs (named pipes) * * Copyright 2012 <NAME> <<EMAIL>> * * See http://opengroup.org/onlinepubs/9699919799/utilities/mkfifo.html USE_MKFIFO(NEWTOY(mkfifo, "<1"USE_MKFIFO_Z("Z:")"m:", TOYFLAG_USR|TOYFLAG_BIN)) config MKFIFO bool "mkfifo" default...
465
578
/* * Copyright (C) 2016 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 agre...
613
506
<filename>uva/11136.cc // http://uva.onlinejudge.org/external/111/11136.pdf #include <iostream> #include <set> using namespace std; int main() { while (true) { int n; cin >> n; if (!n) break; multiset<int> s; long long c = 0; for (int i = 0; i < n; i++) { int k; cin >> k; for (int j = 0; j < k; ...
272
723
<reponame>kroegerama/apk-parser package net.dongliu.apk.parser.utils; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; public class Inputs { public static byte[] readAll(InputStream in) throws IOException { byte[] buf = new byte[1024 * 8]; try (ByteArr...
335
30,023
<reponame>tbarbette/core<gh_stars>1000+ """eafm fixtures.""" from unittest.mock import patch import pytest @pytest.fixture() def mock_get_stations(): """Mock aioeafm.get_stations.""" with patch("homeassistant.components.eafm.config_flow.get_stations") as patched: yield patched @pytest.fixture() de...
193
25,151
<filename>java/test/org/openqa/selenium/safari/SafariDriverTest.java // Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // t...
1,005
777
/* * Copyright (C) 2012 Google Inc. 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 conditio...
1,141
11,719
<filename>dlib/dlib/matlab/subprocess_stream.cpp // Copyright (C) 2016 <NAME> (<EMAIL>) // License: Boost Software License See LICENSE.txt for the full license. #include "subprocess_stream.h" #include <sstream> #include <utility> #include <iostream> #include <cstdio> #include <fcntl.h> #include <signal.h> #include...
9,152
3,262
/*****************************************************************\ __ / / / / __ __ / /______ _______ / / / / ________ __ __ / ______ \ /_____ \ / / / / / _____ | / / / / / / | / _______| / / / / / / /____/ / / / / / / / / /...
611
2,327
import argparse import json import logging import glob import os import sys import random import torch import torch.distributed as dist import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.utils.data import torch.utils.data.distributed import pandas as pd import numpy as np f...
7,058
1,346
package com.huanchengfly.tieba.post.components.dividers; import android.graphics.Rect; import android.view.View; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; public class HorizontalSpacesDecoration extends RecyclerView.ItemDecoration { private int top; private int bot...
625
2,151
/* * Copyright (C) Research In Motion Limited 2010. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) an...
2,255
6,566
package android.app; import android.content.Context; import android.content.Intent; import android.os.Bundle; import com.tencent.shadow.core.runtime.ShadowActivity; /** * 因为在TransformManager中ActivityTransform是在FragmentSupportTransform之前进行的, * 所以FragmentSupportTransform运行时,Activity已经都变成ShadowActivity了, * 所以这个Mock类...
364
375
<reponame>alex729/RED /* * Copyright 2016 Nokia Solutions and Networks * Licensed under the Apache License, Version 2.0, * see license.txt file for details. */ package org.robotframework.ide.eclipse.main.plugin.tableeditor.code.handler; import java.util.Optional; import javax.inject.Named; import org....
1,221
1,851
<filename>android/viro_bridge/src/main/java/com/viromedia/bridge/component/node/control/VRTBoxManager.java // Copyright © 2016 <NAME>. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), t...
957
777
// Copyright 2015 The Chromium 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/metrics/variations/chrome_variations_service_client.h" #include "base/bind.h" #include "build/build_config.h" #include "chrome/b...
1,635
2,151
#!/usr/bin/env python # Copyright (c) 2011 Google Inc. 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 ...
9,479
601
<filename>tutorials/tutorial-getting-started/jquery-webpart/.yo-rc.json<gh_stars>100-1000 { "@microsoft/generator-sharepoint": { "libraryName": "jquery-webpart", "framework": "none", "version": "1.0.0", "libraryId": "ec87e2dd-2df4-46e8-beac-eb8a53f0a85a" } }
127
369
<reponame>laraschmidt/cdap /* * Copyright © 2018-2019 <NAME>, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required ...
895
458
<gh_stars>100-1000 #include <stdio.h> extern void eq_event_func_call(const char *); /* below eq_dep and __eq_nop() are stuff just for making dependency*/ extern int eq_dep; static __attribute__((unused)) void __eq_nop(void) { eq_dep++; } int main(void) { printf("f1\n"); eq_event_func_call("f1"); printf("f2\n"); ...
174
372
/* * tkXAppInit.c -- * * Provides a default version of the Tcl_AppInit procedure for use with * applications built with Extended Tcl and Tk on Unix systems. This is based * on the the UCB Tk file tkAppInit.c *----------------------------------------------------------------------------- * Copyright 1991-1996 <N...
1,239
14,668
// Copyright 2014 The Chromium 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 "ui/views/controls/textfield/textfield_test_api.h" #include "ui/gfx/geometry/rect.h" namespace views { TextfieldTestApi::TextfieldTestApi(Text...
409