max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
2,338 | <reponame>mkinsner/llvm<gh_stars>1000+
//===----------------------------------------------------------------------===//
//
// 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: Apache-2.0 WITH LLVM-except... | 288 |
2,542 | // ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#include "stdafx.h"
namespace... | 792 |
32,544 | package com.baeldung.spring.jndi.datasource.mock;
import static org.junit.Assert.assertNotNull;
import javax.naming.InitialContext;
import javax.sql.DataSource;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.jdbc.datasour... | 506 |
6,541 | <filename>system/lib/libc/musl/src/unistd/preadv.c
#define _BSD_SOURCE
#include <sys/uio.h>
#include <unistd.h>
#include "syscall.h"
#include "libc.h"
ssize_t preadv(int fd, const struct iovec *iov, int count, off_t ofs)
{
#if __EMSCRIPTEN__
size_t num;
if (__wasi_syscall_ret(__wasi_fd_pread(fd, (struct __wasi_iovec... | 236 |
617 | <reponame>pavel-petrenko/openenclave
// Copyright (c) Open Enclave SDK contributors.
// Licensed under the MIT License.
#include <openenclave/host.h>
#include <openenclave/internal/tests.h>
#include <wchar.h>
#include <algorithm>
#include <string>
#include "all_u.h"
// #include "other_u.h" // Test that multiple enclav... | 2,175 |
1,056 | <filename>profiler/lib.profiler/src/org/netbeans/lib/profiler/TargetAppRunner.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... | 15,508 |
312 | <filename>lib/assimp/code/glTFUtil.h
/*
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2015, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
with or without modification, are permitted pr... | 908 |
435 | {
"blurb": "You can create template strings in JavaScript by wrapping text in backticks. They not only allow the text to include new lines and other special characters, you can also embed variables and other expressions.",
"authors": ["pertrai1"],
"contributors": []
}
| 69 |
7,043 | <reponame>rupalibehera/catalog<gh_stars>1000+
{
"State": "pending",
"Label": "pull-tekton-pipeline-integration-tests",
"Desc": "Job triggered.",
"Target": "https://tekton-releases.appspot.com/build/tekton-prow/pr-logs/pull/tektoncd_pipeline/995/pull-tekton-pipeline-integration-tests/1146102490727452674/"
}
| 130 |
778 | <filename>modApiServer/src/org/aion/api/server/types/CompiledContr.java
package org.aion.api.server.types;
import org.json.JSONException;
import org.json.JSONObject;
public class CompiledContr {
public String error;
public String code;
public CompiContrInfo info;
/** For RPC call */
public JSO... | 295 |
1,056 | <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
* ... | 8,899 |
788 | <reponame>snoopdave/incubator-usergrid
/*
* 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 Licens... | 5,590 |
746 | <reponame>VishalS711/protege<filename>protege-editor-owl/src/main/java/org/protege/editor/owl/model/hierarchy/OWLObjectPropertyHierarchyProvider.java
package org.protege.editor.owl.model.hierarchy;
import org.semanticweb.owlapi.model.*;
import org.semanticweb.owlapi.search.EntitySearcher;
import java.util.*;
import ... | 1,335 |
371 | _PROD_NET_TEMPLATE = """
---
:configgen:
- prd
- sh2
- IIS7
- NET4
- prd
:override:
:from: "/BlackList/{bit}/prod"
:to: "/bin"
"""
_UAT_NET_TEMPLATE = """
---
:configgen:
- uat_nt
- nt
- IIS7
- NET4
- uat_nt
:override:
:from: "/BlackList/{bit}/other"
:to: "/bin"
"""
_FAT_NET_TEMPLATE = """
---
:config... | 1,390 |
2,151 | // 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 "extensions/renderer/i18n_custom_bindings.h"
#include <vector>
#include "base/bind.h"
#include "base/logging.h"
#include "base/metrics/histogra... | 1,038 |
403 | package com.example.workflow.history;
import org.camunda.bpm.engine.ProcessEngine;
import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.camunda.bpm.engine.impl.cfg.ProcessEnginePlugin;
import org.camunda.bpm.spring.boot.starter.configuration.Ordering;
import org.springframework.core.annota... | 257 |
17,275 | <reponame>hammadismae/jenkins<filename>core/src/main/java/jenkins/model/GlobalNodePropertiesConfiguration.java
package jenkins.model;
import hudson.Extension;
import hudson.slaves.NodeProperty;
import hudson.slaves.NodePropertyDescriptor;
import java.io.IOException;
import net.sf.json.JSONObject;
import org.jenkinsci.... | 422 |
2,293 | #include "arm_vec_math.h"
#include "MISCF64.h"
#include <stdio.h>
#include "Error.h"
#include "Test.h"
#define SNR_THRESHOLD 310
/*
Reference patterns are generated with
a double precision computation.
*/
#define REL_ERROR (2.0e-16)
#define ABS_ERROR (2.0e-16)
/*
For tests of the error value of the Levinson Durb... | 16,966 |
310 | <gh_stars>100-1000
package org.seasar.doma.internal.apt.generator;
import static org.seasar.doma.internal.util.AssertionUtil.assertNotNull;
import java.util.function.Consumer;
public class Code {
private final Consumer<Printer> consumer;
public Code(Consumer<Printer> consumer) {
assertNotNull(consumer);
... | 152 |
1,673 | <reponame>C-Chads/cc65
// minimal tool to compare two text files
#include <stdlib.h>
#include <stdio.h>
/* get the next character from FILE and convert commonly used line-endings all
into the same value (0x0a, as used on *nix systems)
recognized values/pairs:
0x0a (LF) Linux, macOS
0x0d,... | 686 |
962 | import os
import open3d as o3d
import numpy as np
import copy
import math
NOISE_BOUND = 0.05
FRAG1_COLOR =[0, 0.651, 0.929]
FRAG2_COLOR = [1, 0.706, 0]
GT_COLOR =[0, 1, 0]
def load_all_gt_pairs(gt_log_path):
"""
Load all possible pairs from GT
"""
with open(gt_log_path) as f:
content = f.readl... | 1,962 |
504 | /* lib/obj/obj_dat.h */
/* Copyright (C) 1995-1997 <NAME> (<EMAIL>)
* All rights reserved.
*
* This package is an SSL implementation written
* by <NAME> (<EMAIL>).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long... | 19,142 |
1,253 | <reponame>AndreTeixeira1998/Arduino
//
// FILE: DS18B20.cpp
// AUTHOR: <EMAIL>
// VERSION: 0.1.12
// DATE: 2017-07-25
// PUPROSE: library for DS18B20 temperature sensor with minimal footprint
// URL: https://github.com/RobTillaart/DS18B20_RT
//
// HISTORY:
// 0.1.0 2017-07-25 initial version
// 0.1.1 ... | 1,775 |
2,659 | <reponame>jasleon/OpenMLDB<filename>java/openmldb-jmh/src/main/java/com/_4paradigm/sql/jmh/DatabaseSetup.java
/*
* Copyright 2021 4Paradigm
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License a... | 496 |
1,006 | <filename>arch/arm/src/cxd56xx/hardware/cxd56_scu.h<gh_stars>1000+
/****************************************************************************
* arch/arm/src/cxd56xx/hardware/cxd56_scu.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file d... | 6,317 |
453 | <filename>tools/benchmark/benchmark_codec_avif.h<gh_stars>100-1000
// Copyright (c) the JPEG XL Project 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 TOOLS_BENCHMARK_BENCHMARK_CODEC_AVIF_H_
#define TOOLS_BENCHMARK_BENCHM... | 279 |
3,102 | // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck --check-prefix=NORNGBSE %s
// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - -fdebug-ranges-base-address | FileCheck --check-prefix=RNGBSE %s
// NORNGBSE-NOT: rangesBaseAddress
// RNGBSE: !DICompileUnit({{.*}}, rangesBaseAddress: t... | 141 |
3,006 | package com.nightonke.wowoviewpager.Animation;
import android.animation.TimeInterpolator;
import android.view.View;
import com.nightonke.wowoviewpager.Enum.Ease;
/**
* Created by <NAME> at 02:29 on 2016/3/3
* For Personal Open Source
* Contact me at <EMAIL> or <EMAIL>
* For more projects: https://github.com/Nigh... | 3,521 |
2,151 | // Copyright 2018 The Feed 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 applicable law or agreed... | 1,758 |
1,144 | // SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2015 Google, Inc
*/
#include <common.h>
#include <errno.h>
#include <asm/io.h>
#define PCI_DEV_CONFIG(segbus, dev, fn) ( \
(((segbus) & 0xfff) << 20) | \
(((dev) & 0x1f) << 15) | \
(((fn) & 0x07) << 12))
/* Platform Controller Unit */
#define LPC_DEV ... | 829 |
1,444 | <reponame>J-VOL/mage
package mage.cards.f;
import mage.abilities.condition.common.CardsInControllerGraveyardCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.cards.CardImpl;
i... | 647 |
777 | <gh_stars>100-1000
// 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.
package org.chromium.chrome.browser.media.remote;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatc... | 5,594 |
445 | #include "cpprl/algorithms/a2c.h"
#include "cpprl/algorithms/algorithm.h"
#include "cpprl/algorithms/ppo.h"
#include "cpprl/distributions/distribution.h"
#include "cpprl/distributions/categorical.h"
#include "cpprl/generators/generator.h"
#include "cpprl/generators/feed_forward_generator.h"
#include "cpprl/model/cnn_ba... | 244 |
4,054 | // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <memory>
#include <vector>
#include "iprotocol.h"
namespace mbus {
/**
* This class is used to bundle a set of IProtocol objects to be
* supported by a MessageBus instance.
**/
class Pro... | 388 |
432 | <reponame>ipraba/EPShapes
#import <UIKit/UIKit.h>
FOUNDATION_EXPORT double Pods_EPShapes_ExampleVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_EPShapes_ExampleVersionString[];
| 67 |
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.... | 1,730 |
496 | package me.j360.dubbo.batch.bootstrap;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import java.util.concurrent.CountDownLatch;
@Slf4j
public class ApplicationBootstrap {
public static void main(String[] args) throws InterruptedException ... | 334 |
396 | <gh_stars>100-1000
package com.yeungeek.monkeyandroid.ui.base.adapter;
import android.app.Activity;
import android.support.v7.widget.RecyclerView;
import android.view.View;
/**
* Created by cundong on 2015/11/9.
*
* 分页展示数据时,RecyclerView的FooterView State 操作工具类
*
* RecyclerView一共有几种State:Normal/Loading/Error/TheEn... | 1,633 |
336 | #include <stm32f10x.h>
#include "msdusb_conf.h"
#include "msdusb_bot.h"
#include <usb_core.h>
void massEP1_IN_Callback(void);
void massEP2_OUT_Callback(void);
void (*masspEpInt_IN[7])(void) ={
massEP1_IN_Callback,
massEP2_IN_Callback,
massEP3_IN_Callback,
massEP4_IN_Callback,
massEP5_IN_Callback,
... | 433 |
592 | """Initial layout
Revision ID: 82f8f48c6ee6
Revises:
Create Date: 2019-05-02 21:01:25.700648
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = "82f8f48c6ee6"
down_revision = None
branch_labels = None
depends_on = None
def u... | 14,739 |
903 | package com.github.vole.auth.service.fallback;
import com.github.vole.auth.model.vo.MemberVO;
import com.github.vole.auth.fegin.MemberService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class MemberServiceFallbackImpl implements MemberService {
@Overri... | 358 |
1,440 | <reponame>sonylomo/Rocket.Chat.ReactNative
package chat.rocket.reactnative;
import android.app.Application;
import com.facebook.react.ReactPackage;
import java.util.Arrays;
import java.util.List;
public class AdditionalModules {
public List<ReactPackage> getAdditionalModules(Application application) {
r... | 120 |
1,039 | <gh_stars>1000+
/* SPDX-License-Identifier: MIT
*
* 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 to use, copy,
* modify, ... | 1,875 |
4,054 | <reponame>Anlon-Burke/vespa<gh_stars>1000+
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
// @author <NAME>
#include "fieldvisitor.h"
#include <vespa/document/select/valuenodes.h>
namespace storage {
FieldVisitor::~FieldVisitor() = default;
void FieldVisitor... | 304 |
721 | <filename>nucleus/examples/ascii_pileup_test.py
# Copyright 2019 Google 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 req... | 653 |
1,187 | <reponame>xeqtr1982/react-native-amap3d<gh_stars>1000+
#import <MAMapKit/MAMapKit.h>
#import "AMapOverlay.h"
@interface AMapHeatMap : AMapOverlay
@end
| 69 |
474 | #pragma once
#include <Babylon/JsRuntimeScheduler.h>
#include <Babylon/Plugins/NativeInput.h>
#include <arcana/containers/weak_table.h>
#include <arcana/threading/dispatcher.h>
#include <optional>
#include <unordered_map>
namespace Babylon::Plugins
{
class NativeInput::Impl final
{
public:
enum c... | 1,385 |
440 | package com.swifty.fillcolor.util;
import android.content.Context;
import android.widget.Toast;
import com.swifty.fillcolor.MyApplication;
import com.swifty.fillcolor.R;
import com.swifty.fillcolor.factory.SharedPreferencesFactory;
import com.swifty.fillcolor.view.MyProgressDialog;
import com.umeng.analytics.Mobclick... | 1,546 |
2,400 | <filename>optaplanner-core/src/test/java/org/optaplanner/core/impl/testdata/domain/planningid/TestdataStringPlanningIdEntity.java
/*
* Copyright 2021 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 Lic... | 581 |
320 | from collections import namedtuple
Proposal = namedtuple('Proposal', ['caller', 'cid', 'input'])
Ballot = namedtuple('Ballot', ['viewid', 'n', 'leader'])
ScoutId = namedtuple('ScoutId', ['address', 'ballot_num'])
CommanderId = namedtuple('CommanderId', ['address', 'slot', 'proposal'])
ViewChange = namedtuple('ViewChan... | 245 |
778 | /*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "opencl/source/command_queue/command_queue.h"
#include "shared/source/command_stream/command_stream_receiver.h"
#include "shared/source/helpers/aligned_memory.h"
#include "shared/source/helpers/array_count.h"
#include "... | 17,350 |
363 | # -*- encoding: utf-8 -*-
"""
HubbleStack Nova module for using stat to verify ownership & permissions.
This audit module requires yaml data to execute. It will search the local
directory for any .yaml files, and if it finds a top-level 'stat' key, it will
use that data.
Sample YAML data, with inline comments:
stat... | 5,142 |
809 | /*
* LensKit, an open-source toolkit for recommender systems.
* Copyright 2014-2017 LensKit contributors (see CONTRIBUTORS.md)
* Copyright 2010-2014 Regents of the University of Minnesota
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentati... | 3,791 |
575 | // 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 COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEXT_PRIORITY_INHERIT_CLIENT_PRIORITY_VOTER_H_
#define COMPONENTS_PERFORMANCE_MANAGER_EXECUTION_CONTEX... | 1,097 |
1,830 | <reponame>pc-beast/bbb-download
from os import path, makedirs
from pathlib import Path
from concurrent.futures import ThreadPoolExecutor
import xml.etree.ElementTree as ET
import typer
import requests
from tqdm import tqdm
def download_slides(session, base_url, base_dir, max_workers):
xml_file = path.join(base_d... | 1,659 |
820 | <filename>datumbox-framework-core/src/test/java/com/datumbox/framework/core/statistics/parametrics/independentsamples/NormalIndependentSamplesTest.java
/**
* Copyright (C) 2013-2020 <NAME> <<EMAIL>>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance ... | 1,072 |
852 | <gh_stars>100-1000
/**\testCSCDigis.cpp
*
* Test suit for CSCDigi.
* Based on testDTDigis.cpp
*
*
* \author <NAME>, CMU (for CSCWireDigi, CSCRPCDigi,
* CSCALCTDigi, CSCCLCTDigi)
* \author <NAME>, Northwestern (for CSCComparatorDigi, CSCStripDigi)
* \author <NAME>, <NAME>.
*/... | 14,465 |
629 | <filename>test/FunctionalTests/Tests/DataOData/Tests/OData.PluggableFormat.Tests/Avro/Test/SimpleODataEntrySchema.json
{"type":"record","name":"NS.SimpleEntry","fields":[{"name":"TNull","type":"null"},{"name":"TBoolean","type":"boolean"},{"name":"TInt32","type":"int"},{"name":"TLong","type":"long"},{"name":"TFloat","t... | 139 |
530 | <gh_stars>100-1000
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The contents of this file are subject to the terms of either the Universal Permissive License
* v 1.0 as shown at http://oss.oracle.com/licenses/upl... | 1,704 |
328 | <gh_stars>100-1000
package io.cucumber.junit;
import android.util.Log;
import cucumber.api.PickleStepTestStep;
import cucumber.api.event.ConcurrentEventListener;
import cucumber.api.event.EventHandler;
import cucumber.api.event.EventPublisher;
import cucumber.api.event.TestCaseStarted;
import cucumber.api.event.TestRu... | 1,109 |
678 | /**
* This header is generated by class-dump-z 0.2b.
*
* Source: /System/Library/PrivateFrameworks/GeoServices.framework/GeoServices
*/
#import <GeoServices/GEOSupportedTileSetsServerProxyDelegate.h>
#import <GeoServices/GeoServices-Structs.h>
#import <GeoServices/XXUnknownSuperclass.h>
@class NSBundle, NSTimer, ... | 729 |
14,668 | // Copyright 2018 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 "third_party/blink/public/common/cache_storage/cache_storage_utils.h"
#include "base/atomic_sequence_num.h"
#include "base/process/process_handl... | 237 |
746 | package proton.inject.util;
import proton.inject.util.SparseClassArray;
import android.test.AndroidTestCase;
public class SparseClassArrayTest extends AndroidTestCase {
public void testPutAndGet() {
SparseClassArray<String> arr = new SparseClassArray<String>();
arr.put(String.class, "aa");
... | 158 |
921 | <reponame>0to1/rmf_traffic<filename>rmf_traffic/thirdparty/fcl/include/fcl/broadphase/detail/interval_tree-inl.h<gh_stars>100-1000
/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2011-2014, <NAME>, Inc.
* Copyright (c) 2014-2016, Open Source Robotics Foundation
* All rights reserved.
*
* Redi... | 5,835 |
679 | <reponame>Grosskopf/openoffice<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 copyrig... | 6,770 |
482 | <filename>core/src/com/jmrapp/terralegion/game/views/screen/MainScreen.java
package com.jmrapp.terralegion.game.views.screen;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.jmrapp.terralegion.engine.camera.OrthoCamera;
import com.j... | 857 |
971 | package com.ucar.datalink.biz.utils.flinker.check.meta;
import java.util.Arrays;
/**
* Created by yang.wang09 on 2018-04-23 11:33.
*/
public class SyncTableInfo {
protected String database;
protected String table;
protected String dbType;
private boolean isFull = false;
private boolean isIn... | 942 |
777 | <reponame>google-ar/chromium<filename>android_webview/native/aw_metrics_service_client_impl.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 ANDROID_WEBVIEW_NATIVE_AW_METRICS_SERVICE_CLIENT_IMP... | 929 |
1,035 | <filename>imgreco/ocr/cnocr.py
from cnocr import CnOcr
from .common import *
import cv2
import numpy as np
from functools import lru_cache
import logging
is_online = False
# OCR 过程是否需要网络
info = "cnocr"
@lru_cache()
def get_ocr(model_name='densenet-lite-fc'):
return CnOcr(name=f'imgreco-{model_name}', model_na... | 920 |
317 | <reponame>liuxuvip/OTB
/*
* Copyright (C) 2005-2021 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Yo... | 1,107 |
666 | import os
import sys
import inspect
from pettingzoo import test
from smac.env.pettingzoo import StarCraft2PZEnv as sc2
import pickle
current_dir = os.path.dirname(
os.path.abspath(inspect.getfile(inspect.currentframe()))
)
parent_dir = os.path.dirname(current_dir)
sys.path.insert(0, parent_dir)
if __name__ == "_... | 263 |
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,190 |
846 | package com.dslplatform.json;
import com.dslplatform.json.runtime.Settings;
import org.junit.Assert;
import org.junit.Test;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
public class ObjectFormatTest {
@Compile... | 4,288 |
1,139 | package com.journaldev.singleton;
public enum EnumSingleton {
INSTANCE;
public static void doSomething(){
//do something
}
}
| 61 |
6,283 | #pragma once
#ifdef USE_ALSALIB_H
#include <alsa/asoundlib.h>
#else
#include <assert.h>
#ifndef __FreeBSD__
#include <endian.h>
#endif
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <poll.h>
#include <sys/types.h>
#include <unistd.h>
#if... | 562 |
365 | import unittest
import mock
from StringIO import StringIO
class FatalMailBatchTests(unittest.TestCase):
from_email = '<EMAIL>'
to_emails = ('<EMAIL>')
subject = 'Test Alert'
unexpected_err_msg = 'Process bar:foo failed to start too many times'
def _get_target_class(self):
from superlan... | 748 |
371 | package de.siegmar.fastcsv;
final class Constants {
/**
* Data to write CSV.
*/
static final String[] ROW = {
"Simple field",
"Example with separator ,",
"Example with delimiter \"",
"Example with\nnewline",
"Example with , and \" and \nnewline",
};
/... | 279 |
763 | <filename>projects/batfish/src/main/java/org/batfish/vendor/a10/representation/ServiceGroupMember.java
package org.batfish.vendor.a10.representation;
import java.io.Serializable;
import java.util.Objects;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
/** Datamodel class representing the configura... | 674 |
1,261 | from .fonts import ( # noqa: F401
HorizontalTextAlignment,
TextAlignment,
win_font_family
)
from .winforms import ( # noqa: F401
Bitmap,
Color,
Convert,
Drawing2D,
FillMode,
FontFamily,
FontStyle,
Graphics,
GraphicsPath,
Matrix,
Pen,
Point,
PointF,
R... | 266 |
656 | /*
* PushBackStream.cpp
*
* Created on: Mar 18, 2013
* Author: nek3d
*/
#include <cstdio>
#include "PushBackStreamBuf.h"
#include <cstring>
#include <iostream>
PushBackStreamBuf::PushBackStreamBuf(streambuf* primary_stream)
: streambuf(),
_primary_stream(primary_stream)
{
}
PushBackStreamBuf::~PushBac... | 327 |
11,750 | <filename>env/lib/python3.8/site-packages/plotly/validators/histogram/cumulative/__init__.py
import sys
if sys.version_info < (3, 7):
from ._enabled import EnabledValidator
from ._direction import DirectionValidator
from ._currentbin import CurrentbinValidator
else:
from _plotly_utils.importers import ... | 236 |
451 | <gh_stars>100-1000
// File Automatically generated by eLiSe
#include "StdAfx.h"
#include "cREgDistDx_DRad_PPaEqPPs.h"
cREgDistDx_DRad_PPaEqPPs::cREgDistDx_DRad_PPaEqPPs():
cElCompiledFonc(2)
{
AddIntRef (cIncIntervale("Intr",0,8));
Close(false);
}
void cREgDistDx_DRad_PPaEqPPs::ComputeVal()
{
double t... | 4,615 |
14,668 | // 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.
package org.chromium.chrome.browser.customtabs;
import static org.chromium.base.test.util.Restriction.RESTRICTION_TYPE_LOW_END_DEVICE;
import static org.... | 11,581 |
2,151 | // 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 "base/command_line.h"
#include "base/process/launch.h"
#include "base/stl_util.h"
#include "base/test/launcher/test_launcher.h"
#include "base/te... | 1,178 |
1,617 | <filename>src/caffe/layers/arccos_layer.cpp<gh_stars>1000+
#include <algorithm>
#include <vector>
#include "caffe/filler.hpp"
#include "caffe/layer.hpp"
#include "caffe/layers/neuron_layer.hpp"
#include "caffe/layers/arccos_layer.hpp"
namespace caffe {
template <typename Dtype>
void ArccosLayer<Dtype>::Forward_cpu(c... | 601 |
1,367 | <reponame>ajayiagbebaku/NFL-Model
"""
Module with tests for the RegexRemovePreprocessor.
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import re
from nbformat import v4 as nbformat, from_dict
from .base import PreprocessorTestsBase
from ..regexremove import ... | 1,071 |
521 | #include <unistd.h>
#ifdef ELLE_WINDOWS
# include <winsock2.h>
#endif
#include <boost/algorithm/string/predicate.hpp> // boost::contains
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <elle/finally.hh>
#include <elle/os/environ.hh>
#include <elle/test.hh>
#include <elle/reactor/Barr... | 30,520 |
2,260 | // Autogenerated by gameplay-luagen
#ifndef LUA_AUDIOCONTROLLER_H_
#define LUA_AUDIOCONTROLLER_H_
namespace gameplay
{
void luaRegister_AudioController();
}
#endif
| 71 |
2,406 | <gh_stars>1000+
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "myriad_mvnc_wrapper.h"
#include <ie_common.h>
using namespace vpu::MyriadPlugin;
//------------------------------------------------------------------------------
// Implementation of methods of class Mvn... | 513 |
679 | <reponame>Grosskopf/openoffice<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 copyrig... | 523 |
985 | /* Copyright (c) (2012,2014,2015,2016,2017,2018,2019,2020) Apple Inc. All rights reserved.
*
* corecrypto is licensed under Apple Inc.’s Internal Use License Agreement (which
* is contained in the License.txt file distributed with corecrypto) and only to
* people who accept that license. IMPORTANT: Any license ri... | 1,604 |
2,338 | // RUN: %clang_cc1 -x c -debug-info-kind=limited -triple bpf-linux-gnu -emit-llvm %s -o - | FileCheck %s
extern char ch;
int test() {
return ch;
}
int test2() {
extern char ch2;
return ch2;
}
extern int (*foo)(int);
int test3() {
return foo(0);
}
// CHECK: distinct !DIGlobalVariable(name: "ch",{{.*}} type: ... | 426 |
2,111 | <reponame>mfkiwl/GAAS
void gps_buffer_helper(CallbackBufferBlock<sensor_msgs::NavSatFix>& nav_buffer,
const boost::shared_ptr<sensor_msgs::NavSatFix const>& nav_msg)
{
cout<<"GPS message received!"<<endl;
nav_buffer.onCallbackBlock(*nav_msg);
}
void slam_buffer_helper(ROS_IO_Manager* pRIM,CallbackBufferB... | 542 |
301 | <filename>resource/csdk/stack/include/internal/ocatomicmeasurement.h<gh_stars>100-1000
//******************************************************************
//
// Copyright 2018 Beechwoods Software All Rights Reserved.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
// Licensed under the Apache ... | 953 |
1,541 | import torch
def one_hot(tensor, depth, dim=-1, on_value=1.0, dtype=torch.float32):
tensor_onehot = torch.zeros(
*list(tensor.shape), depth, dtype=dtype, device=tensor.device)
tensor_onehot.scatter_(dim, tensor.unsqueeze(dim).long(), on_value)
return tensor_onehot
| 123 |
4,579 | {
"name": "js-framework-benchmark-non-keyed-vanilla-dom",
"version": "1.0.0",
"description": "vanilla-dom demo",
"main": "index.js",
"scripts": {
"build-dev": "webpack -w -d",
"build-prod": "webpack -p"
},
"author": "<NAME>",
"repository": {
"type": "git",
"url": "https://github.com/krau... | 266 |
469 | //----------------------------------------------------------------------------//
//|
//| MachOKit - A Lightweight Mach-O Parsing Library
//| string_table.c
//|
//| D.V.
//| Copyright (c) 2014-2015 D.V. All rights reserved.
//|
//| Permission is hereby granted, free of cha... | 4,796 |
544 | //
// GTMNSScanner+Unsigned.h
//
// Copyright 2010 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 requir... | 335 |
5,169 | <filename>Specs/powerdefines/0.0.5/powerdefines.podspec.json<gh_stars>1000+
{
"name": "powerdefines",
"version": "0.0.5",
"summary": "Some handy defines for objective-c that make coding a lot easier",
"description": "Powerdefines is a collection of handy defines for objective-c to make coding easier.\nWith powe... | 289 |
1,182 | <gh_stars>1000+
"""
Code influenced from:
- https://github.com/emileaben/scapy-dns-ninja/blob/master/dns-ninja-server.py
- https://thepacketgeek.com/scapy-p-09-scapy-and-dns/
"""
import argparse
# DNS Modules
import dns.zone
from dns.exception import DNSException
# Scapy modules
from scapy.layers.dns import *
from ... | 7,676 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.