max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
5,169 | {
"name": "DebugMenuUserDefaultsBrowser",
"version": "0.1.0",
"summary": "Easy to browse UserDefaults values.",
"description": "You can browse UserDefaults values with DebugHead.",
"homepage": "https://github.com/malt03/DebugMenuUserDefaultsBrowser",
"license": {
"type": "MIT",
"file": "LICENSE"
}... | 299 |
1,550 | # Leo colorizer control file for redcode mode.
# This file is in the public domain.
# Properties for redcode mode.
properties = {
"lineComment": ";",
}
# Attributes dict for redcode_main ruleset.
redcode_main_attributes_dict = {
"default": "MARKUP",
"digit_re": "",
"escape": "",
"high... | 5,496 |
336 | package com.shazam.fork.runner;
import com.shazam.fork.model.Pool;
import com.shazam.fork.model.PoolTestCaseAccumulator;
import javax.annotation.Nonnull;
import java.util.Map;
public final class ProgressReporterFactory {
private int totalAllowedRetryQuota;
private int retryPerTestCaseQuota;
private Map<P... | 550 |
5,169 | <gh_stars>1000+
{
"name": "CCPCycleScrollView",
"version": "1.0",
"summary": "For cycle scroll",
"swift_version": "4.2",
"description": "使用UICollectionView创建的轮播控件,支持各种UIView的使用",
"homepage": "https://github.com/coolboy-ccp/CCPCycleScrollView",
"license": "MIT",
"authors": {
"Brian.Chu": "<EMAIL>"
... | 336 |
892 | <reponame>wuchunfu/cron-utils<filename>src/main/java/com/cronutils/converter/CalendarToCronTransformer.java<gh_stars>100-1000
/*
* Copyright 2019 fahmpeermoh
* 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 o... | 331 |
703 | <filename>Code/Engine/GameEngine/Gameplay/SpawnComponent.h
#pragma once
#include <GameEngine/GameEngineDLL.h>
#include <Core/Prefabs/PrefabResource.h>
#include <Core/World/World.h>
#include <Foundation/Types/RangeView.h>
struct ezMsgComponentInternalTrigger;
struct ezSpawnComponentFlags
{
typedef ezUInt16 Storage... | 1,346 |
3,102 | // RUN: %clang_cc1 -fsyntax-only -ast-print %s | FileCheck %s
namespace N {
template<typename T, typename U> void f(U);
template<int> void f();
}
void g() {
// CHECK: N::f<int>(3.14
N::f<int>(3.14);
// CHECK: N::f<double>
void (*fp)(int) = N::f<double>;
}
// (NNS qualified) DeclRefExpr.
namespace DRE ... | 946 |
578 | <filename>app/connector/sql/src/test/java/io/syndesis/connector/sql/SqlConnectorBatchUpdateTest.java
/*
* 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... | 1,592 |
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... | 932 |
2,151 | // 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.
#ifndef CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_ENV_H_
#define CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_ENV_H_
#include "base/lazy_instance.h"
#incl... | 280 |
3,055 | /*
Fontname: open_iconic_embedded_1x
Copyright: https://github.com/iconic/open-iconic, SIL OPEN FONT LICENSE
Glyphs: 17/17
BBX Build Mode: 3
*/
const uint8_t u8x8_font_open_iconic_embedded_1x1[140] U8X8_FONT_SECTION("u8x8_font_open_iconic_embedded_1x1") =
"@P\1\1~BBBBB~\30 \60>\277\277>\60 \30~~\347\347~~\30... | 355 |
319 | package eu.f3rog.blade.compiler.parcel.p;
import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.TypeName;
import java.io.Serializable;
/**
* Class {@link SerializableClassParceler}
*
* @author FrantisekGazo
*/
final class SerializableClassParceler implements BaseParceler {
@Override
publi... | 272 |
304 | <reponame>fduguet-nv/cunumeric
# Copyright 2022 NVIDIA Corporation
#
# 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,335 |
736 | <gh_stars>100-1000
#include "StdAfx.h"
#include "Outlook365RestTask.h"
#include "Common/FSecure/Crypto/Base64.h"
#include "Common/FSecure/CppTools/ScopeGuard.h"
#include "Common/json/json.hpp"
#include "Common/FSecure/CppTools/StringConversions.h"
#include "Common/FSecure/WinHttp/HttpClient.h"
#include "Common/FSecure/... | 1,353 |
4,518 | from socket import *
import random
import time
serverSocket = socket(AF_INET, SOCK_DGRAM)
serverPort=800
serverSocket.bind(('',serverPort))
start_time=float(time.time())
end_time=start_time
while True:
try:
serverSocket.settimeout(0.1)
message, address = serverSocket.recvfrom(1024)
m... | 498 |
482 | <gh_stars>100-1000
{"ast":null,"code":"var g; // This works in non-strict mode\n\ng = function () {\n return this;\n}();\n\ntry {\n // This works if eval is allowed (see CSP)\n g = g || new Function(\"return this\")();\n} catch (e) {\n // This works if the window reference is available\n if (typeof window === \"ob... | 191 |
1,380 | # -*- coding: utf-8 -*-
"""
Defines the unit tests for the :mod:`colour.io.image` module.
"""
import numpy as np
import os
import platform
import shutil
import unittest
import tempfile
from colour.io import convert_bit_depth
from colour.io import read_image_OpenImageIO, write_image_OpenImageIO
from colour.io import r... | 8,539 |
940 | /*
* UAE - The Un*x Amiga Emulator
*
* MC68000 emulation - machine dependent bits
*
* Copyright 1996 <NAME>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the L... | 17,789 |
634 | // Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.application.constraints;
import javax.annotation.Nullable;
import java.util.function.BooleanSupplier;
/**
* NB. Methods defined in this interface m... | 215 |
340 | <filename>os/winapi/rom_file.c
//
// os/winapi/rom_file.c
//
// Functions for mapping ROM images into the address space.
//
// This file is subject to the terms and conditions defined in
// 'LICENSE', which is part of this source code package.
//
#include "rom_file.h"
#include <stddef.h>
#include <windows.h>
// Unmap... | 497 |
5,133 | /*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.internal.conversion;
import java.math.BigInteger;
import java.util.Set;
import org.mapstruct.ap.internal.model.common.ConversionContext;
import o... | 534 |
465 | # -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | 2,617 |
2,151 | /****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call i... | 937 |
508 | <reponame>sjquant/trading_calendars<gh_stars>100-1000
import pandas as pd
from pytz import UTC
def T(x):
return pd.Timestamp(x, tz=UTC)
| 61 |
3,200 | <filename>tests/st/ops/cpu/test_boundingbox_decode_op.py<gh_stars>1000+
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org... | 985 |
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,679 |
4,538 | <reponame>wstong999/AliOS-Things<filename>components/ucloud_ai/src/model/aliyun-openapi/facebody/src/model/SearchFaceRequest.cc
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the L... | 624 |
406 | <gh_stars>100-1000
package com.braintreepayments.api;
import android.content.Context;
import android.os.SystemClock;
import java.util.concurrent.TimeUnit;
public class AnalyticsDatabaseTestUtils {
public static void clearAllEvents(Context context) {
AnalyticsDatabase database = AnalyticsDatabase.getInst... | 389 |
2,389 | {
"id": "image-redundant-alt",
"selector": "img",
"tags": ["cat.text-alternatives", "best-practice"],
"metadata": {
"description": "Ensure image alternative is not repeated as text",
"help": "Alternative text of images should not be repeated as text"
},
"all": [],
"any": [],
"none": ["duplicate-img-label"]
... | 117 |
409 | <gh_stars>100-1000
/*
This file is a part of libcds - Concurrent Data Structures library
(C) Copyright <NAME> (<EMAIL>) 2006-2016
Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
Redistribution and use in source and binary forms, with... | 1,100 |
1,444 | <gh_stars>1000+
package mage.view;
import java.io.Serializable;
import mage.game.draft.DraftPlayer;
/**
*
* @author <EMAIL>
*/
public class DraftPickView implements Serializable {
private static final long serialVersionUID = 1L;
protected SimpleCardsView booster;
protected SimpleCardsView picks;
... | 343 |
2,812 | #include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <Eigen/Core>
#include <g2o/core/base_vertex.h>
#include <g2o/core/base_unary_edge.h>
#include <g2o/core/sparse_optimizer.h>
#include <g... | 5,688 |
532 | import pandas as pd
import numpy as np
def optimize_feature_power(df, output_column_name=None, exponents=[2., 1., .8, .5, .25, .1, .01]):
""" Plot the correlation coefficient for various exponential scalings of input features
>>> np.random.seed(314159)
>>> df = pd.DataFrame()
>>> df['output'] = np.ra... | 654 |
511 | <filename>external/audiocodec/aacdec/sbr_extract_extended_data.c
/******************************************************************
*
* Copyright 2018 Samsung Electronics All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with ... | 2,850 |
811 | {
"description": "Element content replacement - Simple combination of direct and indirect adjacent combinators (css3-modsel-90)",
"selectors": {
"p": "css3-modsel-90.expected0.html",
"blockquote ~ div + p": "css3-modsel-90.expected1.html"
},
"src": "css3-modsel-90.src.html"
} | 106 |
360 | <reponame>Yanci0/openGauss-server
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#############################################################################
# Copyright (c): 2021, Huawei Tech. Co., Ltd.
# FileName : source.py
# Version :
# Date : 2021-4-7
# Description :
################################... | 280 |
1,144 | /* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2011
* <NAME>, HALE electronic GmbH, <EMAIL>
*/
#ifndef __MC13783_H__
#define __MC13783_H__
/* REG_MODE_0 */
#define VAUDIOEN (1 << 0)
#define VAUDIOSTBY (1 << 1)
#define VAUDIOMODE (1 << 2)
#define VIOHIEN (1 << 3)
#define VIOHISTBY (1 << 4)
#define VIO... | 736 |
381 | <filename>pypy/module/_multibytecodec/src/cjkcodecs/multibytecodec.c
#include <stdlib.h>
#include <string.h>
#include "src/cjkcodecs/multibytecodec.h"
#include "src/cjkcodecs/fixnames.h"
struct pypy_cjk_dec_s *pypy_cjk_dec_new(const MultibyteCodec *codec)
{
struct pypy_cjk_dec_s *d = malloc(sizeof(struct pypy_cjk_d... | 3,722 |
5,169 | <gh_stars>1000+
{
"name": "UPennMobileComponentsSDK",
"version": "0.3.0",
"summary": "SDK that contains common UI elements, utilities, functionality etc, for re-use across all University of Pennsylvania mobile applications.",
"description": "SDK that contains common UI elements, utilities, functionality etc, fo... | 471 |
1,162 | <filename>digdag-core/src/test/java/io/digdag/core/workflow/StoreOperatorFactory.java
package io.digdag.core.workflow;
import com.google.inject.Inject;
import io.digdag.client.config.Config;
import io.digdag.client.config.ConfigKey;
import io.digdag.spi.Operator;
import io.digdag.spi.OperatorFactory;
import io.digdag.... | 625 |
21,382 | <gh_stars>1000+
"""Test the reduce API."""
import pytest
import cupy as cp
import ray
from ray.util.collective.types import ReduceOp
from ray.util.collective.tests.util import create_collective_multigpu_workers
@pytest.mark.parametrize("group_name", ["default", "test", "123?34!"])
@pytest.mark.parametrize("dst_rank"... | 3,610 |
577 | package org.fluentlenium.adapter;
import org.fluentlenium.core.FluentControl;
import org.fluentlenium.core.FluentDriver;
/**
* Default {@link FluentControlContainer} implementation, using a simple variable to store the {@link FluentDriver} instance.
*/
public class DefaultFluentControlContainer implements FluentCon... | 187 |
388 | <reponame>OctaviantoVyan/jwswing<gh_stars>100-1000
// -*- mode:java; encoding:utf-8 -*-
// vim:set fileencoding=utf-8:
// @homepage@
package example;
import java.awt.*;
import javax.swing.*;
public final class MainPanel extends JPanel {
private MainPanel() {
super(new BorderLayout());
JTree tree1 = new JTr... | 721 |
368 | /*
Plugin-SDK (Grand Theft Auto Vice City) header file
Authors: GTA Community. See more here
https://github.com/DK22Pac/plugin-sdk
Do not delete this comment block. Respect others' work!
*/
#include "CStinger.h"
// Converted from thiscall void CStinger::CStinger(void) 0x629B50
CStinger::CStinger() {
plugin::CallMe... | 505 |
812 | <filename>src/edu/stanford/nlp/sempre/corenlp/test/CoreNLPSemanticFnTest.java<gh_stars>100-1000
package edu.stanford.nlp.sempre.corenlp.test;
import edu.stanford.nlp.sempre.*;
import edu.stanford.nlp.sempre.corenlp.CoreNLPAnalyzer;
import edu.stanford.nlp.sempre.test.TestUtils;
import fig.basic.LispTree;
import org.te... | 1,222 |
1,444 | package mage.cards.r;
import java.util.UUID;
import mage.abilities.effects.common.AddCombatAndMainPhaseEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.ke... | 980 |
14,668 | <reponame>zealoussnow/chromium
// 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 "sandbox/mac/seatbelt.h"
#include <unistd.h>
extern "C" {
#include <sandbox.h>
int sandbox_init_with_parameters... | 874 |
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
* ... | 2,045 |
14,668 | <reponame>chromium/chromium
// 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 IOS_CHROME_BROWSER_CRASH_REPORT_BREADCRUMBS_BREADCRUMB_MANAGER_BROWSER_AGENT_H_
#define IOS_CHROME_BROWSER_CRASH_REPOR... | 1,924 |
1,338 | <gh_stars>1000+
/*
* Copyright 2014, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _USB_MSC_H
#define _USB_MSC_H
// (Partial) USB Class Definitions for Mass Storage Devices (MSC), version 1.0
// Reference: http://www.usb.org/developers/devclass_docs/usbmassbulk_10.pdf... | 530 |
892 | <gh_stars>100-1000
{
"schema_version": "1.2.0",
"id": "GHSA-r23x-gq8q-5637",
"modified": "2021-11-23T00:00:53Z",
"published": "2021-11-23T00:00:53Z",
"aliases": [
"CVE-2021-38146"
],
"details": "The File Download API in Wipro Holmes Orchestrator 20.4.1 (20.4.1_02_11_2020) allows remote attackers to re... | 429 |
2,293 | // Generated by generate_test_data.py using TFL version 2.6.0 as reference.
#pragma once
#include <stdint.h>
const q7_t svdf_2_output_ref[15] = {-53, 45, 27, -24, -53, 26, -82, -38, 11, -85, 94, -16, -32, 31, 4};
| 97 |
335 | <filename>A/Anticholinergic_adjective.json
{
"word": "Anticholinergic",
"definitions": [
"(chiefly of a drug) inhibiting the physiological action of acetylcholine, especially as a neurotransmitter."
],
"parts-of-speech": "Adjective"
} | 94 |
17,037 | # This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _IBM
class _Analytics(_IBM):
_type = "analytics"
_icon_dir = "resources/ibm/analytics"
class Analytics(_Analytics):
_icon = "analytics.png"
class DataIntegration(_Analytics):
_icon = "data-integration.png"
class ... | 193 |
754 | /*-
* <<
* UAVStack
* ==
* Copyright (C) 2016 - 2017 UAVStack
* ==
* 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 r... | 2,917 |
4,504 | <filename>pkg/processor/runtime/nodejs/js/package.json
{
"name": "@nuclio/nodejs-wrapper",
"version": "1.0.0",
"description": "Nuclio NodeJS runtime wrapper",
"main": "wrapper.js",
"scripts": {
"test": "mocha wrapper.test.js",
"lint": "eslint *.js --fix"
},
"author": "nuclio",
"license": "MIT",
... | 313 |
2,230 | <reponame>douglasrizzo/ELF
/**
* Copyright (c) 2017-present, Facebook, Inc.
* All rights reserved.
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "cf_rule_actor.h"
bool CFRuleActor::FlagActByState(const GameEnv &env, const... | 1,907 |
354 | from pathlib import Path
import tempfile
import cog
class Predictor(cog.Predictor):
def setup(self):
self.foo = "foo"
@cog.input("text", type=str)
@cog.input("path", type=Path)
def predict(self, text, path):
with open(path) as f:
output = self.foo + text + f.read()
... | 244 |
5,169 | {
"name": "LGPlaceholderView",
"version": "1.0.0",
"platforms": {
"ios": "6.0"
},
"license": "MIT",
"homepage": "https://github.com/Friend-LGA/LGPlaceholderView",
"authors": {
"<NAME>": "<EMAIL>"
},
"source": {
"git": "https://github.com/Friend-LGA/LGPlaceholderView.git",
"tag": "1.0.0... | 274 |
475 | package com.appspot.com.empaemperium.resources;
import java.util.List;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.Consumes;
import com.google.gson.Gson;
@Path("/toplist")
public class TopListGsonResources {
// private con... | 465 |
412 | <reponame>dave1667/graphd<filename>libgraphdb/graphdb-set-logging.c
/*
Copyright 2015 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licens... | 516 |
1,812 | <reponame>0xflotus/DeepMimic
#pragma once
#include <vector>
#include <string>
#include <fstream>
#include "Eigen/Dense"
class cFileUtil
{
public:
static FILE* OpenFile(const std::string& file_name, const char* mode);
static FILE* OpenFile(const char* file_name, const char* mode);
static void CloseFile(FILE*& f);
... | 491 |
1,899 | #include <opencv2/opencv.hpp>
// opencv legacy includes
#include <opencv2/imgproc/types_c.h>
#include <opencv2/imgproc/imgproc_c.h>
#include "MEImage.hpp"
#include "MEDefs.hpp"
#if CV_MAJOR_VERSION >= 2 && CV_MAJOR_VERSION <= 3
//using namespace bgslibrary::algorithms::lbp_mrf;
#define ME_CAST_TO_IPLIMAGE(image_ptr... | 27,438 |
2,690 | # Copyright ClusterHQ Inc. See LICENSE file for details.
"""
Testing infrastructure for integration tests.
"""
from ..testtools import require_cluster, create_dataset
from ...testtools import AsyncTestCase, random_name
def make_dataset_integration_testcase(image_name, volume_path, internal_port,
... | 2,560 |
9,684 | import os.path
import pytest
jinja2 = pytest.importorskip("jinja2")
from dask.utils import format_bytes
from dask.widgets import FILTERS, TEMPLATE_PATHS, get_environment, get_template
@pytest.fixture(autouse=True)
def setup_testing():
TEMPLATE_PATHS.append(
os.path.join(os.path.dirname(os.path.abspath(... | 502 |
4,065 | package com.zzhoujay.richtext.ig;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Movie;
import com.zzhoujay.richtext.ImageHolder;
import com.zzhoujay.richtext.drawable.GifDrawable;
import com.zzhoujay.richtext.ext.ImageKit;
import java.io.BufferedInputStream;
import ja... | 2,174 |
1,853 | package org.dromara.hmily.config.consul;
import com.google.common.net.HostAndPort;
import com.orbitz.consul.Consul;
import org.dromara.hmily.common.utils.StringUtils;
import org.dromara.hmily.config.api.ConfigEnv;
import org.dromara.hmily.config.api.ConfigScan;
import org.dromara.hmily.config.api.entity.HmilyConfig;
i... | 2,733 |
678 | /**
* This header is generated by class-dump-z 0.2b.
*
* Source: /System/Library/PrivateFrameworks/IMCore.framework/Frameworks/IMDAppleServices.framework/IMDAppleServices
*/
@protocol IMDAppleEmailInterfaceListener
@optional
- (void)center:(id)center foundEmail:(id)email vettingToken:(id)token forRegistrationInf... | 103 |
23,901 | <gh_stars>1000+
# coding=utf-8
# Copyright 2021 The Google Research 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 requ... | 502 |
850 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import tensorflow as tf
import tensorflow.contrib.slim as slim
class ResNetPytorchBackbone(object):
def __init__(self, cfgs):
self.cfgs = cfgs
self._weights_dict = {}
self.freeze_blocks_node_index = {... | 36,536 |
2,587 | package cn.hikyson.godeye.core.internal.modules.crash;
import androidx.annotation.Keep;
import java.io.Serializable;
import java.util.Map;
@Keep
public class CrashInfo implements Serializable {
public String startTime;
public String crashTime;
public String crashType;
public String crashMessage;
... | 687 |
743 | <reponame>vforkliu/GithubApp
package com.anly.githubapp.ui.base;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.anly.gi... | 1,011 |
3,000 | <gh_stars>1000+
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
package com.mojang.brigadier;
import com.google.common.collect.Lists;
import com.mojang.brigadier.context.CommandContext;
import com.mojang.brigadier.context.CommandContextBuilder;
import com.mojang.brigadi... | 6,355 |
2,039 | package org.nd4j.linalg.cpu.nativecpu.blas;
import org.bytedeco.javacpp.DoublePointer;
import org.bytedeco.javacpp.FloatPointer;
import org.bytedeco.javacpp.IntPointer;
import org.nd4j.linalg.api.blas.impl.SparseBaseLevel2;
import org.nd4j.linalg.api.buffer.DataBuffer;
import org.nd4j.linalg.api.ndarray.INDArray;
impo... | 912 |
1,139 | <gh_stars>1000+
package com.journaldev.csv;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class CSVScannerExample {
public static void main(String[] args) throws IOException {
Scanner scanner = new Scanner(new File("employees.c... | 425 |
344 | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | 245 |
337 | <reponame>sethvargo/vaex
import tempfile
import os
import numpy as np
import vaex
df = None
def setup_df(N, M):
global df
x = [np.arange(N, dtype=np.float64) for _ in range(M)]
df = vaex.from_dict({
f'c{i}': x[i] for i in range(M)
})
def time_export_plain(N, M):
with tempfile.Temporary... | 456 |
1,244 | <gh_stars>1000+
#include "libc.h"
void sethostent(int x)
{
}
void *gethostent()
{
return 0;
}
void endhostent(void)
{
}
weak_alias(sethostent, setnetent);
weak_alias(gethostent, getnetent);
weak_alias(endhostent, endnetent);
weak_alias(sethostent, setservent);
weak_alias(gethostent, getservent);
weak_alias(endhos... | 184 |
2,255 | import threading
class Payload(object):
PAYLOAD_ID = 0
PAYLOAD_ID_LOCK = threading.Lock()
def __init__(self, data=""):
self.data = data
with Payload.PAYLOAD_ID_LOCK:
self.id = Payload.PAYLOAD_ID
Payload.PAYLOAD_ID += 1
| 131 |
9,657 | import torch
import torch.nn as nn
from base.loss_transfer import TransferLoss
import torch.nn.functional as F
class AdaRNN(nn.Module):
"""
model_type: 'Boosting', 'AdaRNN'
"""
def __init__(self, use_bottleneck=False, bottleneck_width=256, n_input=128, n_hiddens=[64, 64], n_output=6, dropout=0.0, le... | 3,899 |
317 | #include "smack.h"
#include <assert.h>
#include <math.h>
// @expect verified
int main(void) {
long double NaN = 0.0l / 0.0l;
long double Inf = 1.0l / 0.0l;
long double negInf = -1.0l / 0.0l;
long double val = __VERIFIER_nondet_long_double();
if (!__isnanl(val) && !__isinfl(val) && !__iszerol(val)) {
i... | 309 |
416 | package org.simpleflatmapper.map.getter;
import org.simpleflatmapper.converter.Context;
import org.simpleflatmapper.reflect.Getter;
import org.simpleflatmapper.reflect.primitive.BooleanGetter;
import org.simpleflatmapper.reflect.primitive.ByteGetter;
import org.simpleflatmapper.reflect.primitive.CharacterGetter;
impor... | 5,223 |
370 | <reponame>alexrenz/bosen-2
// Author: <NAME> (<EMAIL>)
// Date: 2014.10.04
#include "mlr_engine.hpp"
#include "mlr_sgd_solver.hpp"
#include "lr_sgd_solver.hpp"
#include "abstract_mlr_sgd_solver.hpp"
#include "common.hpp"
#include <string>
#include <cmath>
#include <vector>
#include <cstdio>
#include <glog/logging.h>
#... | 7,600 |
729 | <filename>jigsaw-service/jigsaw-service-facade/src/main/gen/org/jigsaw/payment/model/Enums.java
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: enums.proto
package org.jigsaw.payment.model;
public final class Enums {
private Enums() {}
public static void registerAllExtensions(
com.goo... | 2,927 |
22,688 | <filename>third_party/can_card_library/hermes_can/include/bcan_lib.h
#ifndef _BCAN_LIB_H_
#define _BCAN_LIB_H_
#include <stdlib.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include "linux/zynq_api.h"
#ifdef DEBUG
#define BLOG_DBG0(s...) syslog(LOG_DEBUG, s);
#else
#define BLOG_DBG0(s...) do{}... | 512 |
1,738 | /*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or t... | 3,018 |
5,169 | <gh_stars>1000+
{
"name": "UIImageViewAligned",
"version": "0.0.1",
"summary": "A UIImageView subclass which allows you to align the image left/right/top/bottom, even when contentMode is AspectFit.",
"description": "It is a subclass of UIImageView that allows you to customize the alignment of the displayed imag... | 303 |
698 | <reponame>siddheshmhatre/high_performance_python
import numpy
import _util
def norm_square_numpy(vector):
return numpy.sum(vector * vector)
def run_experiment(size, num_iter=3):
vector = numpy.arange(size)
return _util.run(norm_square_numpy, vector, num_iter)
if __name__ == "__main__":
print run_exp... | 132 |
1,399 | package com.codemonkeylabs.fpslibrary.sample.UI;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.codemonkeylabs.fpslibrary.sample.R;
import javax.inject.Inject;
/**
* Created by brianplummer on 8/30/15.
*/
publi... | 421 |
2,003 | // Copyright (c) 2018, Baidu.com, Inc. All Rights Reserved
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
#include "memtable.h"
#include "memtable_on_leveldb.h"
namespace leveldb {
class ShardedMemTable : public MemTable {
public:
// For Base M... | 738 |
333 | <gh_stars>100-1000
/**
* Copyright 2016 Red Hat, Inc.
*
* Red Hat 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/LICENSE-2.0
*
*... | 1,396 |
816 | package com.jxtech.integration.services;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jxtech.integration.jsonvo.IntergrationVo;
import com.jxtech.integration.jsonvo.JboVo;
import com.jxtech.j... | 4,981 |
9,782 | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distribut... | 1,674 |
435 | <filename>pycon-india-2012/videos/rewriting-the-wayback-machine-s-live-web-proxy-in-python-noufal-ibrahim-anand-chitipothu.json
{
"copyright_text": null,
"description": "The wayback machine is a high traffic website that has been online for over a decade. It was a mostly Java application. One component of the appli... | 644 |
350 | import json
import click
import pandas as pd
def dump_filename(filename, subdomain_df):
"""Output to CSV, JSON or Clipboard."""
filename = filename.lower()
if filename.endswith(".json"):
click.secho(f"\n[+] Contents dumped into JSON file: {filename}", bold=True)
with open(filename, "w+") a... | 537 |
4,016 | <filename>examples/new_candidates-nosec.py
import xml
import yaml
def subprocess_shell_cmd():
# sample function with known subprocess shell cmd candidates
# candidate #2
subprocess.Popen('/bin/ls *', shell=True) # nosec
def yaml_load():
# sample function with known yaml.load candidates
temp_str = ... | 207 |
854 | <reponame>rakhi2001/ecom7
__________________________________________________________________________________________________
sample 24 ms submission
class Solution:
import math
def uniquePaths(self, m: int, n: int) -> int:
ans = math.factorial(m+n-2)//(math.factorial(n-1)*math.factorial(m-1)) ... | 293 |
2,023 | <reponame>tdiprima/code<filename>recipes/Python/440626_Copying_Pasting_Directories/recipe-440626.py
'''cap_module.py
The purpose of this module
is to provide functions
for copying and pasting
directories and files.
This is a level 1 module.'''
#=========================
# Level 1 Functions: Files
#==================... | 877 |
351 | <reponame>soyuka/botty<filename>test/item/item_finder_test.py
import pytest
import numpy as np
import cv2
from logger import Logger
from item.item_finder import ItemFinder, Item
from config import Config, ItemProps
class TestItemFinder:
def setup_method(self):
Logger.init()
Logger.remove_file_logg... | 470 |
190,993 | <gh_stars>1000+
/* Copyright 2021 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 app... | 1,842 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.