max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
544 | <gh_stars>100-1000
//
// UIButton+EnlargeEdge.h
// iTalk
//
// Created by <NAME> on 15/12/29.
// Copyright © 2015年 <NAME>. All rights reserved.
//
#ifndef UIButton_EnlargeEdge_h
#define UIButton_EnlargeEdge_h
#import <UIKit/UIKit.h>
@interface UIButton (LFEnlargeEdgeAdditions)
- (void)lf_setEnlargeEdge:(CGFloat)... | 179 |
575 | # 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.
import functools
from .code_generator_info import CodeGeneratorInfo
from .composition_parts import Identifier
from .composition_parts import WithCodeGenerat... | 1,840 |
930 | <gh_stars>100-1000
package vip.mate.core.gray.rule;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.cloud.nacos.NacosServiceInstance;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.ObjectProvider;
import or... | 1,017 |
32,544 | <gh_stars>1000+
package com.baeldung.junit5.mockito.repository;
import com.baeldung.junit5.mockito.User;
public interface UserRepository {
User insert(User user);
boolean isUsernameAlreadyExists(String userName);
}
| 90 |
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.
*/
#include <string.h>
#include "native_client/src/trusted/service_runtime/sel_ldr.h"
/*
* This function handles the nacl_helper_bootstrap... | 707 |
9,734 | <filename>cpp/src/arrow/testing/matchers.h
// 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 Licen... | 3,922 |
892 | <filename>advisories/unreviewed/2022/02/GHSA-4m4r-x763-43q2/GHSA-4m4r-x763-43q2.json
{
"schema_version": "1.2.0",
"id": "GHSA-4m4r-x763-43q2",
"modified": "2022-03-04T00:00:35Z",
"published": "2022-02-25T00:01:10Z",
"aliases": [
"CVE-2022-25329"
],
"details": "Trend Micro ServerProtect 6.0/5.8 Informa... | 462 |
1,443 | <reponame>cssence/mit-license<gh_stars>1000+
{
"copyright": "<NAME>, https://prankshaw.github.io/",
"url": "https://prankshaw.github.io/",
"email": "<EMAIL>",
"gravatar": true
}
| 78 |
1,338 | <gh_stars>1000+
/*
* Copyright 2011, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* <NAME>, <EMAIL>
*/
#include <KernelExport.h>
#include <stdio.h>
#include "video_configuration.h"
const char*
get_connector_name(uint32 connector)
{
switch (connector) {... | 641 |
1,162 | package io.digdag.standards.operator;
import java.nio.file.Path;
import com.google.inject.Inject;
import io.digdag.client.config.Config;
import io.digdag.client.config.ConfigElement;
import io.digdag.spi.OperatorContext;
import io.digdag.spi.TaskRequest;
import io.digdag.spi.TaskResult;
import io.digdag.spi.Operator;
... | 540 |
9,402 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//----------------------------------------------------------
// verbTOC.h - verb that creates a Table of Context for a MCH file
//----------------------------------------------------... | 108 |
319 | <filename>test_pycycle.py
from __future__ import print_function
import os
import pytest
import pycycle.utils
def test_get_path_from_package_name():
func = pycycle.utils.get_path_from_package_name
assert func('/test/one/two', 'some.package') == '/test/one/two/some/package.py'
assert func('', 'some.packa... | 1,346 |
726 | """
This file contains report class for regression estimators. Report includes:
* features scatter plots, correlations
* learning curve
* feature importance
* feature importance by shuffling the feature column
All methods return objects, which can have plot method (details see in :class:`rep.plotting`... | 2,178 |
850 | /* Copyright 2015 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... | 11,551 |
1,350 | <reponame>Manny27nyc/azure-sdk-for-java
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.mediaservices.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.uti... | 1,950 |
1,178 | /*
* Copyright 2020 Makani Technologies LLC
*
* 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 ... | 3,941 |
724 | <filename>vega/networks/pytorch/customs/modnas/contrib/arch_space/elastic/spatial.py
# -*- coding:utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License.
# This program is distribu... | 5,423 |
793 | #define moo foo
int foo() /* Test 1 */ { // CHECK: rename [[@LINE]]:5 -> [[@LINE]]:8
return 42;
}
void boo(int value) {}
void qoo() {
foo(); // CHECK: rename [[@LINE]]:3 -> [[@LINE]]:6
boo(foo()); // CHECK: rename [[@LINE]]:7 -> [[@LINE]]:10
moo(); // CHECK: mac... | 259 |
764 | <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
// ... | 2,995 |
777 | <gh_stars>100-1000
// 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 "components/subresource_filter/core/browser/subresource_filter_features_test_support.h"
#include <map>
#include <memory>
#in... | 1,041 |
3,657 | <filename>processor/src/test/resources/generated/PrivateFieldModel$$JsonObjectMapper.java
package com.bluelinelabs.logansquare.processor;
import com.bluelinelabs.logansquare.JsonMapper;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.Json... | 2,381 |
491 | /*
* Encog(tm) Core v3.4 - Java Version
* http://www.heatonresearch.com/encog/
* https://github.com/encog/encog-java-core
* Copyright 2008-2017 Heaton Research, 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... | 1,397 |
2,989 | <reponame>tb-soft/databus<gh_stars>1000+
/*
*
* Copyright 2013 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 License at
*
* http://www.apache.org/licenses/... | 6,309 |
1,256 | #pragma once
#define NS_OK 0
#define NS_ERROR_OUT_OF_MEMORY ((nsresult) 0x8007000eL)
| 40 |
450 | /* The MIT License
*
* Copyright (C) 2008-2009 <NAME>
*
* Copyright (C) 2008-2009 Abilisoft Ltd.
*
*
* 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 wi... | 3,029 |
852 | <gh_stars>100-1000
// -*- C++ -*-
//
// Package: SiStripTools
// Class: SiPixelQualityHistory
//
/**\class SiPixelQualityHistory SiPixelQualityHistory.cc DPGAnalysis/SiStripTools/plugins/SiPixelQualityHistory.cc
Description: <one line class summary>
Implementation:
<Notes on implementation>
*/
//
// Or... | 2,932 |
4,054 | // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.admin.task.util.file;
import java.nio.file.attribute.FileTime;
import java.nio.file.attribute.PosixFilePermission;
import java.nio.file.attribute.PosixFilePermissions;
import jav... | 747 |
575 | // 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.
#include "chrome/browser/ash/arc/instance_throttle/arc_instance_throttle.h"
#include <memory>
#include <string>
#include <vector>
#include "base/bind.h"... | 1,877 |
335 | /*
* Copyright 2019-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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | 578 |
695 | <gh_stars>100-1000
class Foo():
"""This is Foo and the docs should be here"""
def __init__(self):
self.x = 1234
self.y = "str"
def make_foo():
"""This is make_foo and the docs should be here"""
return Foo()
def print_foo(f):
"""This is print_foo and the docs should be here"""
print(f"{... | 138 |
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... | 574 |
607 | package dev.cheerfun.pixivic.basic.verification.annotation;
import dev.cheerfun.pixivic.basic.verification.constant.VerificationType;
import java.lang.annotation.*;
/**
* @author OysterQAQ
* @version 1.0
* @date 2019/07/16 11:37
* @description 验证码校验注解
*/
@Target({ElementType.TYPE, ElementType.METHOD})
@Retentio... | 233 |
3,631 | /*
* Copyright 2010 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | 1,462 |
3,579 | <gh_stars>1000+
/*
* Copyright 2015, The Querydsl Team (http://www.querydsl.com/team)
*
* 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... | 473 |
1,016 | package com.thinkbiganalytics.metadata.sla.api;
/*-
* #%L
* thinkbig-sla-api
* %%
* Copyright (C) 2017 ThinkBig Analytics
* %%
* 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
*
* ... | 670 |
1,338 | /*
* Copyright 2007, <NAME> <<EMAIL>>.
* All rights reserved. Distributed under the terms of the MIT License.
*/
#include "ListViewTest.h"
#include <ListView.h>
#include <StringItem.h>
ListViewTest::ListViewTest()
: Test("ListView", NULL),
fListView(new BListView())
{
SetView(fListView);
// add a few item... | 201 |
5,220 | # Capstone Python bindings, by <NAME> <<EMAIL>>
import ctypes
from . import copy_ctypes_list
from .m68k_const import *
# define the API
class M68KOpMem(ctypes.Structure):
_fields_ = (
('base_reg', ctypes.c_uint),
('index_reg', ctypes.c_uint),
('in_base_reg', ctypes.c_uint),
('in_di... | 1,139 |
330 | <reponame>ravish0007/fairml
import matplotlib
# temporary work around down to virtualenv
# matplotlib issue.
matplotlib.use('Agg')
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
from sklearn.linear_model import LogisticRegression
# import specific projection format.
from... | 460 |
4,054 | <filename>modules/lwjgl/openal/src/main/java/org/lwjgl/openal/ALC.java
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
*/
package org.lwjgl.openal;
import org.lwjgl.*;
import org.lwjgl.system.*;
import javax.annotation.*;
import java.nio.*;
import java.util.*;
import java.... | 5,033 |
8,027 | #include <lib1/lib1.h>
int main(int argc, char* argv[]) {
lib1_function();
lib1_dep_function();
return 0;
} | 50 |
1,652 | <filename>core/src/main/java/com/ctrip/xpipe/pool/FixedObjectPool.java
package com.ctrip.xpipe.pool;
import com.ctrip.xpipe.api.pool.SimpleObjectPool;
import java.util.concurrent.Semaphore;
import java.util.concurrent.atomic.AtomicReference;
/**
* @author wenchao.meng
*
* Jul 1, 2016
*/
public class FixedObjectP... | 423 |
3,974 | #ifndef GHERKIN_PICKLE_ARGUMENT_H_
#define GHERKIN_PICKLE_ARGUMENT_H_
typedef enum PickleArgumentType {
Argument_String,
Argument_Table
} PickleArgumentType;
typedef struct PickleArgument {
PickleArgumentType type;
} PickleArgument;
#endif /* GHERKIN_PICKLE_ARGUMENT_H_ */
| 126 |
4,140 | /*
* 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,884 |
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.
#include "content/browser/file_system_access/file_system_access_handle_base.h"
#include "base/task/post_task.h"
#include "content/brow... | 2,567 |
848 | // Copyright 2018 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/licenses/LICENSE-2.0
//
// Unless required by applicable la... | 324 |
5,169 | {
"name": "VaporCoreBits",
"version": "3.4.4",
"summary": "Vapor helpers for bit manipulation",
"description": "Extensions on Vapor bit types to do things like extract other types from ByteBuffers",
"homepage": "https://github.com/vapor/core",
"license": {
"type": "MIT",
"file": "LICENSE"
},
"au... | 301 |
482 | <filename>include/LabSound/extended/PWMNode.h<gh_stars>100-1000
// SPDX-License-Identifier: BSD-2-Clause
// Copyright (C) 2015+, The LabSound Authors. All rights reserved.
#pragma once
#ifndef PWM_NODE_H
#define PWM_NODE_H
#include "LabSound/core/AudioBasicProcessorNode.h"
#include "LabSound/core/AudioParam.h"
name... | 296 |
2,137 | <gh_stars>1000+
import taichi as tc
from math import *
r = 500
if __name__ == '__main__':
mpm = tc.dynamics.MPM(
res=(r + 1, r + 1, r + 1),
frame_dt=0.01,
base_delta_t=2e-5,
pushing_force=20000,)
levelset = mpm.create_levelset()
levelset.add_plane(tc.Vector(0, 1, 0), -0.4)
levelset.ad... | 838 |
965 | // Calls the provided function for each pixel in a Bitmap object.
void ProcessImage(Bitmap* bmp, const function<void (DWORD&)>& f)
{
int width = bmp->GetWidth();
int height = bmp->GetHeight();
// Lock the bitmap.
BitmapData bitmapData;
Rect rect(0, 0, bmp->GetWidth(), bmp->GetHeight());
bmp->LockBits... | 349 |
14,425 | <gh_stars>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
*... | 2,937 |
777 | <reponame>google-ar/chromium
// 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.
#ifndef COMPONENTS_AUTOFILL_IOS_BROWSER_AUTOFILL_DRIVER_IOS_BRIDGE_H_
#define COMPONENTS_AUTOFILL_IOS_BROWSER_AUTOFILL_DRIVER... | 311 |
1,350 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.ai.textanalytics.implementation;
import com.azure.ai.textanalytics.models.SentimentConfidenceScores;
import com.azure.ai.textanalytics.models.TargetSentiment;
import com.azure.ai.textanalytics.models.Text... | 708 |
838 | <reponame>FlorianPoot/MicroPython_ESP32_psRAM_LoBo<gh_stars>100-1000
/*
* This file is part of the MicroPython ESP32 project, https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo
*
* The MIT License (MIT)
*
* Copyright (c) 2018 LoBo (https://github.com/loboris)
*
* Permission is hereby granted, free of charge... | 10,073 |
14,668 | <reponame>zealoussnow/chromium
// Copyright (c) 2012 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 NET_BASE_PORT_UTIL_H_
#define NET_BASE_PORT_UTIL_H_
#include <stddef.h>
#include <stdint.h>
#include "base/co... | 780 |
358 | <reponame>codedumper1/mysql-ripple
// Copyright 2018 The Ripple 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 ... | 967 |
1,742 | """
Module Functors
AUTHORS:
- <NAME> (2017-10): Initial implementation of
:class:`QuotientModuleFunctor`
"""
#*****************************************************************************
# Copyright (C) 2017 <NAME> <<EMAIL>>
#
# This program is free software: you can redistribute it and/or modify
# it unde... | 2,656 |
15,577 | <reponame>pdv-ru/ClickHouse
#pragma once
#include <DataTypes/Serializations/SimpleTextSerialization.h>
#include <Columns/ColumnDecimal.h>
namespace DB
{
template <typename T>
class SerializationDecimalBase : public SimpleTextSerialization
{
protected:
const UInt32 precision;
const UInt32 scale;
public:
... | 364 |
763 | package org.batfish.representation.cisco_asa;
import com.google.common.collect.ImmutableSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
import org.batfish.datamodel.a... | 468 |
4,537 | <gh_stars>1000+
from azure.storage.blob import BlockBlobService
from settings import keys
class BlobService():
__instance = None
def __new__(cls, account_name,account_key):
if BlobService.__instance is None:
BlobService.__instance = object.__new__(cls)
return BlobService.__instanc... | 193 |
2,512 | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import List, Tuple
import torch
def _as_tensor(x: Tuple[int, int]) -> torch.Tensor:
"""
An equivalent of `torch.as_tenso... | 1,657 |
1,059 | <reponame>caesarcc/python-code-tutorials
import socket
SERVER_HOST = "0.0.0.0"
SERVER_PORT = 5003
BUFFER_SIZE = 1024 * 128 # 128KB max size of messages, feel free to increase
# separator string for sending 2 messages in one go
SEPARATOR = "<sep>"
# create a socket object
s = socket.socket()
# bind the socket to all ... | 539 |
5,169 | {
"name": "FKSimpleAlertController",
"version": "0.0.1",
"summary": "An alertController such as UIAlertController",
"homepage": "https://github.com/ForAllKid/FKSimpleAlertController",
"license": "MIT",
"authors": {
"ForKid": "<EMAIL>"
},
"platforms": {
"ios": "8.0"
},
"source": {
"git": ... | 251 |
3,747 | # Copyright (c) 2021 NVIDIA CORPORATION & 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.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 5,048 |
340 | package com.zblog.core.util;
import java.io.IOException;
import java.io.Writer;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class ServletUtils{
private ServletUtils(){
}
public static boolean isMultipartContent(HttpServletRequest request){
... | 695 |
470 | import numpy as np
import pandas as pd
# -----------------------------------
# カスタム目的関数での評価指標の近似によるMAEの最適化
# -----------------------------------
# Fair 関数
def fair(preds, dtrain):
x = preds - dtrain.get_labels() # 残差を取得
c = 1.0 # Fair関数のパラメータ
den = abs(x) + c # 勾配の式の分母を計算
grad = c * x / den # 勾配
... | 402 |
5,169 | {
"name": "AlgorigoBleLibrary",
"version": "0.0.1",
"summary": "Swift Ble Library using RxSwift by Algorigo",
"description": "Swift Ble Library using RxSwift by Algorigo\nwrite by <EMAIL>",
"homepage": "https://github.com/Algorigo/AlgorigoBleLibrarySwift",
"license": {
"type": "MIT",
"file": "LICENS... | 374 |
10,225 | package org.jboss.resteasy.reactive.server.providers.serialisers;
import java.io.IOException;
import java.lang.reflect.Type;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.ext.Provider;
import org.jboss.resteasy.reactive.common.providers.serialisers.CharacterMessageBo... | 368 |
4,407 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""
Utility functions for downloading, extracting, and reading the Stanford
Natural Language Inference (SNLI) Corpus.
https://nlp.stanford.edu/projects/snli/
"""
import os
import shutil
import azureml.dataprep as ... | 2,533 |
335 | <filename>P/Polycarbonate_noun.json
{
"word": "Polycarbonate",
"definitions": [
"A synthetic resin in which the polymer units are linked through carbonate groups, including many moulding materials and films."
],
"parts-of-speech": "Noun"
} | 90 |
420 | <gh_stars>100-1000
# Copyright (c) 2012-2016 Seafile Ltd.
import logging
from django.conf import settings
from seahub.utils import is_pro_version
from seaserv import ccnet_api
logger = logging.getLogger(__name__)
def get_license_path():
return settings.LICENSE_PATH
def parse_license():
"""Parse license file... | 920 |
16,461 | // Copyright © 2021 650 Industries. All rights reserved.
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol ABI41_0_0EXManifestsManifestBehavior <NSObject>
# pragma mark - Raw JSON
- (NSDictionary *)rawManifestJSON;
# pragma mark - Field getters
/**
* A best-effort immutable legacy ID for this... | 853 |
2,206 | /*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NO... | 1,971 |
600 | /*
* OpenBOR - http://www.LavaLit.com
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in OpenBOR root for details.
*
* Copyright (c) 2004 - 2011 OpenBOR Team
*/
#ifndef VIDEO_H
#define VIDEO_H
#include "types.h"
extern int scaleVideo;
int... | 135 |
2,542 | <gh_stars>1000+
// ------------------------------------------------------------
// 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
... | 306 |
665 | /*
* 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")... | 2,372 |
1,114 | #define NX_SERVICE_ASSUME_NON_DOMAIN
#include "service_guard.h"
#include "sf/tipc.h"
#include "runtime/hosversion.h"
#include "runtime/diag.h"
static union {
Service cmif;
TipcService tipc;
} g_smSrv;
#define MAX_OVERRIDES 32
static struct {
SmServiceName name;
Handle handle;
} g_smOverrides[MAX_OVER... | 2,037 |
763 | <reponame>zabrewer/batfish
package org.batfish.representation.f5_bigip;
import com.google.common.collect.ImmutableMap;
import java.util.Arrays;
import java.util.Map;
import java.util.function.Function;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefa... | 531 |
482 | <reponame>rom1504/img2dataset
""""writer module handle writing the images to disk"""
import webdataset as wds
import json
import pandas as pd
import pyarrow.parquet as pq
import pyarrow as pa
import fsspec
class BufferedParquetWriter:
"""Write samples to parquet files incrementally with a buffer"""
def __in... | 2,560 |
335 | <reponame>Safal08/Hacktoberfest-1
{
"word":"Exuberant",
"definitions":[
"joyously unrestrained and enthusiastic",
"produced in extreme abundance",
"extreme or excessive in degree, size, or extent"
],
"parts-of-speech": "Adjective"
}
| 91 |
674 | <filename>src/AntiDuplWPF/AntiDupl/adLogger.h
/*
* AntiDupl Dynamic-Link Library.
*
* Copyright (c) 2002-2015 <NAME>.
*
* 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, i... | 747 |
852 | import FWCore.ParameterSet.Config as cms
btagGenBb = cms.EDFilter("MCParticlePairFilter",
Status = cms.untracked.vint32(2, 2),
MinPt = cms.untracked.vdouble(10.0, 10.0),
MaxEta = cms.untracked.vdouble(2.5, 2.5),
MinEta = cms.untracked.vdouble(-2.5, -2.5),
ParticleCharge = cms.untracked.int32(-1),
... | 200 |
675 | package io.selendroid.server.android;
import io.selendroid.server.ServerInstrumentation;
import io.selendroid.server.util.SelendroidLogger;
import android.app.Instrumentation;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.webkit.WebView;
public class WebViewKeySender extends Instru... | 772 |
721 | {
"api_id": "run:v1beta1",
"name_pretty": "Cloud Run Admin API",
"distribution_name": "google-apis-run_v1beta1",
"language": "ruby",
"library_type": "REST"
}
| 82 |
1,275 | <filename>pinot-common/src/main/java/org/apache/pinot/common/request/context/FunctionContext.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. ... | 978 |
575 | <filename>chromeos/components/phonehub/browser_tabs_metadata_fetcher.h
// Copyright 2020 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 CHROMEOS_COMPONENTS_PHONEHUB_BROWSER_TABS_METADATA_FETCHER_H_
#define CHROM... | 563 |
1,738 | <reponame>jeikabu/lumberyard
/*
* 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 provid... | 462 |
32,544 | package com.baeldung.autovalue;
import com.google.auto.value.AutoValue;
@AutoValue
public abstract class AutoValueMoneyWithBuilder {
public abstract String getCurrency();
public abstract long getAmount();
static Builder builder() {
return new AutoValue_AutoValueMoneyWithBuilder.Builder();
}
... | 172 |
3,276 | /*
Author: <NAME> (https://github.com/YadiraF)
Modified by cleardusk (https://github.com/cleardusk)
*/
#include "mesh_core.h"
/* Judge whether the point is in the triangle
Method:
http://blackpawn.com/texts/pointinpoly/
Args:
point: [x, y]
tri_points: three vertices(2d points) of a triangle. 2 coords x 3 ... | 4,037 |
581 | <gh_stars>100-1000
package io.sentry;
import io.sentry.protocol.SentryId;
import io.sentry.protocol.SentryTransaction;
import io.sentry.protocol.User;
import java.util.Date;
import java.util.List;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public final class NoOpHub implement... | 1,422 |
387 | /*
* Copyright (C) 2014, United States Government, as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All rights reserved.
*
* The Java Pathfinder core (jpf-core) platform is licensed under the
* Apache License, Version 2.0 (the "License"); you may not use this file exce... | 3,418 |
921 | /*
* Software License Agreement (BSD License)
*
* Copyright (c) 2018, Toyota Research Institute
* 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 c... | 1,734 |
2,486 | <gh_stars>1000+
"""The Slack Web API allows you to build applications that interact with Slack
in more complex ways than the integrations we provide out of the box."""
from .client import WebClient # noqa
from .slack_response import SlackResponse # noqa
| 65 |
931 | /*
Collecting Candies
To find the minimum number of seconds that will be taken to collect the
candies and place them inside a single box. Where the number of seconds is equivalent
to the number of candies in each individual box.
*/
#include<iostream>
#include<queue>
using namespace std;
int main(int argc, char cons... | 373 |
1,523 | // 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,224 |
1,350 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.monitor.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.j... | 1,890 |
3,181 | /*
* Copyright (C) 2013-2017 microG Project Team
*
* 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 ... | 781 |
777 | // 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.
#ifndef MEDIA_CAPTURE_IPC_CAPTURE_PARAM_TRAITS_MACROS_H_
#define MEDIA_CAPTURE_IPC_CAPTURE_PARAM_TRAITS_MACROS_H_
#include "ipc/ipc_message_macros.h"
#in... | 207 |
353 | from __future__ import absolute_import, division, print_function, unicode_literals
import time
from functools import partial, wraps
import re
import torch.distributed as dist
import torch.distributed.rpc as rpc
from torch.distributed.rpc import _rref_context_get_debug_info
if not dist.is_available():
... | 4,905 |
717 | from service.database.models import creat_table,drop_table,AdminUser
from service.config.config import init_db
from service.api.db import db
# print(os.getenv('MYSQL_HOST'))
# print(os.getenv('MYSQL_PORT'))
# print(os.getenv('MYSQL_PASSWORD'))
# 初始化数据
import re
import random
import string
def new_table():
# 清空表
... | 909 |
358 | import unittest
import os
import sys
num = 3
os.environ["PYLON_CAMEMU"] = "%d" % num
from pypylon import pylon
def get_class_and_filter():
device_class = "BaslerCamEmu"
di = pylon.DeviceInfo()
di.SetDeviceClass(device_class)
return device_class, [di]
class PylonEmuTestCase(unittest.TestCase):
num... | 218 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.