max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
788 | #!/usr/bin/env python3
"""
The script runs experiments to compare the performance of ALBL and other active
learning algorithms.
"""
import copy
import os
import numpy as np
import matplotlib.pyplot as plt
try:
from sklearn.model_selection import train_test_split
except ImportError:
from sklearn.cross_validati... | 2,616 |
3,055 | /*
Fontname: -FreeType-Inconsolata LGC-Medium-R-Normal--57-570-72-72-P-258-ISO10646-1
Copyright: Original Roman version created by <NAME> using his own tools and FontForge. Copyright 2006 <NAME>. Hellenisation of the Roman font, by <NAME>, using FontForge. Hellenic glyphs Copyright 2010-2012 <NAME>. Released under ... | 2,143 |
412 | #include <assert.h>
int foo()
{
int a;
assert(a>0);
return a;
}
int bar()
{
int b;
assert(b>0);
return b;
}
int main()
{
foo();
bar();
}
| 79 |
13,648 | <filename>tests/basics/try1.py
# basic exceptions
x = 1
try:
x.a()
except:
print(x)
try:
raise IndexError
except IndexError:
print("caught")
| 68 |
14,668 | <filename>common/CustomCorsResponse.py
import json
def main(request, response):
'''Handler for getting an HTTP response customised by the given query
parameters.
The returned response will have
- HTTP headers defined by the 'headers' query parameter
- Must be a serialized JSON dictionary mapping heade... | 409 |
372 | <reponame>kbore/pbis-open<filename>dcerpc/libdcethread/dcethread-private.h
#ifndef __DCETHREAD_PRIVATE_H__
#define __DCETHREAD_PRIVATE_H__
#include <dce/dcethread.h>
struct _dcethread
{
/* Handle of associated pthread */
pthread_t pthread;
/* Reference count */
int refs;
/* Current state of thre... | 1,319 |
625 | <filename>spec/fixtures/semgrep/vendor/trivial2.py
# https://semgrep.live/WRE
class User:
def __init__(self, id):
self.id = id
def route(user_id):
user = User(1)
if user.id == user.id:
return '200'
else:
return '404' | 126 |
338 | {
"Asus 1210": {
"type": "mobile-phone",
"properties": {
"Device_Name": "1210",
"Device_Code_Name": "1210",
"Device_Maker": "Asus",
"Device_Pointing_Method": "unknown",
"Device_Brand_Name": "Asus"
},
"standard": false
},
"Asus T00I": {
"type": "mobile-phone",
... | 2,128 |
634 | <gh_stars>100-1000
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* 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... | 611 |
12,278 | <reponame>rajeev02101987/arangodb
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
// extradata.cpp
// created: 2017jun04 <NAME>
// (pulled out of n2builder.cpp)
#include "unicode/utypes.h"
#if !UCONFIG_NO_NORMALIZATION
#include <stdio.h>
#include <stdl... | 4,597 |
2,146 | <gh_stars>1000+
#include <nlohmann/json.hpp>
#include <inja.hpp>
int main() {
inja::Parser parser = inja::Parser();
std::string test = "lorem ipsum";
nlohmann::json result = {{{"type", inja::Parser::Type::String}, {"text", "lorem ipsum"}}};
bool tested = (parser.parse(test) == result);
return 0;
}
| 131 |
507 | package com.weihuagu.receiptnotice.util.message;
public interface MessageConsumer {
public void subMessage();
}
| 35 |
335 | {
"word": "Starvation",
"definitions": [
"Suffering or death caused by lack of food."
],
"parts-of-speech": "Noun"
} | 63 |
1,256 | <filename>tests/structures/test_descriptor.py<gh_stars>1000+
from unittest import expectedFailure
from ..utils import TranspileTestCase
class DescriptorTests(TranspileTestCase):
def test_getter(self):
self.assertCodeExecution("""
class MyObject:
def getter(self):
... | 3,985 |
5,964 | /*
* Copyright 2013 Google Inc.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkPdfCatalogDictionary_autogen.h"
#include "SkPdfNativeDoc.h"
SkString SkPdfCatalogDictionary::Type(SkPdfNativeDoc* doc) {
SkPdfNativeObject* ret = get("Type", "");... | 3,934 |
831 | /*
* Copyright 2000-2010 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | 949 |
852 | <reponame>ckamtsikis/cmssw
#ifndef VertexHigherPtSquared_H
#define VertexHigherPtSquared_H
#include "RecoVertex/VertexPrimitives/interface/TransientVertex.h"
#include "TrackingTools/TransientTrack/interface/TransientTrack.h"
#include "DataFormats/VertexReco/interface/Vertex.h"
#include <vector>
/** \class VertexHighe... | 271 |
1,060 | package com.linkedin.parseq.internal;
/**
* @author <NAME>
*/
public interface PlanCompletionListener {
void onPlanCompleted(PlanContext planContext);
}
| 47 |
13,006 | <gh_stars>1000+
/*******************************************************************************
* Copyright (c) 2015-2019 Skymind, Inc.
*
* 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/LI... | 4,286 |
673 | <reponame>ChenZhangg/Priam
/*
* Copyright 2019 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | 8,510 |
1,103 | <reponame>PatrykMis/OpenScan<filename>android/scanlibrary/src/main/jni/sdk/native/jni/include/opencv2/core/hal/interface.h
#ifndef _HAL_INTERFACE_HPP_INCLUDED_
#define _HAL_INTERFACE_HPP_INCLUDED_
//! @addtogroup core_hal_interface
//! @{
#define CV_HAL_ERROR_OK 0
#define CV_HAL_ERROR_NOT_IMPLEMENTED 1
#defin... | 739 |
301 | <gh_stars>100-1000
/*
* Copyright (c) 2018-2019 "Neo4j, Inc." [https://neo4j.com]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
... | 3,824 |
582 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright (c) 2014-2015 pocsuite developers (http://seebug.org)
See the file 'docs/COPYING' for copying permission
"""
#命令行
from pocsuite import pocsuite_cli
#验证模块
from pocsuite import pocsuite_verify
#攻击模块
from pocsuite import pocsuite_attack
#控制台模式
from pocsuite impo... | 1,649 |
700 | /*
* Copyright (c) 2016-2018, Guangshan (<EMAIL>) and the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.... | 1,513 |
2,661 | <reponame>ezeeyahoo/earthenterprise
// Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless requir... | 1,027 |
921 | <filename>src/main/java/com/vladsch/md/nav/flex/intentions/OptionType.java
// Copyright (c) 2017-2020 <NAME> <<EMAIL>> Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.vladsch.md.nav.flex.intentions;
public enum OptionType {
KNOWN, IGNORE, FAIL, BUIL... | 120 |
852 | #ifndef DPGAnalysis_SiStripTools_DigiVtxPosCorrHistogramMaker_H
#define DPGAnalysis_SiStripTools_DigiVtxPosCorrHistogramMaker_H
#include <string>
#include <map>
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "SimDataFormats/GeneratorProducts/interfac... | 527 |
1,020 | <filename>codegen/src/main/java/org/robobinding/codegen/presentationmodel/processor/DataSetPropertyInfoBuilder.java
package org.robobinding.codegen.presentationmodel.processor;
import java.text.MessageFormat;
import java.util.Map;
import org.robobinding.codegen.apt.element.GetterElement;
import org.robobinding.... | 1,235 |
335 | {
"word": "Enamel",
"definitions": [
"An opaque or semi-transparent glossy substance that is a type of glass, applied by vitrification to metallic or other hard surfaces for ornament or as a protective coating.",
"A work of art executed in enamel.",
"The hard glossy substance that covers... | 162 |
1,805 | /////////////////////////////////////////////////
// BagOfWords-Model
THash<TStr, TBowMd::TBowMdLoadF> TBowMd::TypeToLoadFH;
PBowMd TBowMd::Load(TSIn& SIn){
TStr TypeNm(SIn);
int TypeKeyId=-1;
if (TypeToLoadFH.IsKey(TypeNm, TypeKeyId)){
TBowMdLoadF LoadF=TypeToLoadFH[TypeKeyId];
return (*LoadF()... | 3,968 |
402 | <reponame>xdenser/flow<gh_stars>100-1000
package com.vaadin.flow.uitest.ui.template;
import com.vaadin.flow.component.Tag;
import com.vaadin.flow.component.dependency.JsModule;
import com.vaadin.flow.component.polymertemplate.PolymerTemplate;
import com.vaadin.flow.router.Route;
import com.vaadin.flow.uitest.servlet.V... | 494 |
892 | <filename>advisories/unreviewed/2022/05/GHSA-m5q8-rhfq-gjv4/GHSA-m5q8-rhfq-gjv4.json<gh_stars>100-1000
{
"schema_version": "1.2.0",
"id": "GHSA-m5q8-rhfq-gjv4",
"modified": "2022-05-02T03:48:03Z",
"published": "2022-05-02T03:48:03Z",
"aliases": [
"CVE-2009-3735"
],
"details": "The ActiveScan Installer... | 718 |
9,425 | import pytest
import salt.loader
import salt.pillar
from salt.utils.odict import OrderedDict
@pytest.mark.parametrize(
"envs",
(
["a", "b", "c"],
["c", "b", "a"],
["b", "a", "c"],
),
)
def test_pillar_envs_order(envs, temp_salt_minion, tmp_path):
opts = temp_salt_minion.config.... | 569 |
903 | <filename>jphp-core/src/org/develnext/jphp/core/tokenizer/token/expr/value/UnsetExprToken.java
package org.develnext.jphp.core.tokenizer.token.expr.value;
import org.develnext.jphp.core.tokenizer.TokenMeta;
import org.develnext.jphp.core.tokenizer.TokenType;
public class UnsetExprToken extends CallExprToken {
pub... | 191 |
3,997 | # shows track info for a URN or URL
from spotipy.oauth2 import SpotifyClientCredentials
import spotipy
import sys
from pprint import pprint
if len(sys.argv) > 1:
urn = sys.argv[1]
else:
urn = 'spotify:track:0Svkvt5I79wficMFgaqEQJ'
sp = spotipy.Spotify(client_credentials_manager=SpotifyClientCredentials())
t... | 145 |
375 | /*
* Copyright 2020 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
package org.robotframework.ide.eclipse.main.plugin.project.build.validation.versiondependent;
import static com.google.common.collect.Sets.newHashSet;
import static org.... | 1,604 |
5,169 | {
"name": "SwiftyDeck",
"version": "0.1.1",
"summary": "A Swifty Framework for Card Games",
"description": "SwiftyDeck is created in order to reuse mostly-generic Card/Deck concept for any project.",
"homepage": "https://github.com/edusta/SwiftyDeck",
"license": {
"type": "MIT",
"file": "LICENSE"
... | 330 |
895 | from typing import Any, Callable, Dict, List, Optional, Tuple
import flwr as fl
import tensorflow as tf
def main() -> None:
# Create strategy
strategy = fl.server.strategy.FedAvgAndroid(
fraction_fit=1.0,
fraction_eval=1.0,
min_fit_clients=4,
min_eval_clients=4,
min_av... | 380 |
6,115 | <filename>AirLib/include/common/UpdatableContainer.hpp<gh_stars>1000+
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef airsim_core_UpdatableContainer_hpp
#define airsim_core_UpdatableContainer_hpp
#include "UpdatableObject.hpp"
#include "common/Common.hpp"... | 1,147 |
679 | <reponame>Grosskopf/openoffice<filename>main/xmerge/source/activesync/XMergeFilter.cpp
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for addit... | 5,435 |
2,151 | <reponame>tingshao/catapult
# 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.
class RunReporter(object):
def __init__(self, canonical_url):
self.canonical_url = canonical_url
def DidAddFailure(sel... | 225 |
1,056 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 5,788 |
14,668 | <gh_stars>1000+
// 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.
#ifndef COMPONENTS_SERVICES_HEAP_PROFILING_PUBLIC_CPP_CONTROLLER_H_
#define COMPONENTS_SERVICES_HEAP_PROFILING_PUBLIC_CPP_CONTROLLER_H_
#... | 1,025 |
1,639 | <filename>demo/android/app/src/main/java/graphics/pathfinder/pathfinderdemo/PathfinderDemoRenderer.java
package graphics.pathfinder.pathfinderdemo;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.util.Log;
import com.google.vr.sdk.base.Eye;
import com.google.vr.sdk.base.GvrView... | 1,152 |
412 | /*
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/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | 50,493 |
8,054 | #include "configmgr.h"
#include <QDir>
#include <QCoreApplication>
#include <QFileInfo>
#include <QDebug>
#include <QStandardPaths>
#include <QJsonDocument>
#include <QScopeGuard>
#include <QResource>
#include <QPixmap>
#include <QSplashScreen>
#include <QScopedPointer>
#include <QTemporaryDir>
#include <utils/pathut... | 7,037 |
4,901 | <gh_stars>1000+
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are... | 4,298 |
945 | <filename>client-py/iotdb/tsfile/utils/ReadWriteIOUtils.py
# 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 A... | 1,206 |
679 | <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 license... | 8,720 |
313 | <filename>Chapter01/06_array/main.cpp
#include <boost/array.hpp>
#include <algorithm>
typedef boost::array<char, 4> array4_t;
array4_t& vector_advance(array4_t& val) {
// C++11 lambda function
const auto inc = [](char& c){ ++c; };
// boost::array has begin(), cbegin(), end(), cend(),
// rbegin(), siz... | 418 |
892 | <gh_stars>100-1000
{
"schema_version": "1.2.0",
"id": "GHSA-c8p5-6xf7-qcx4",
"modified": "2022-05-02T06:10:13Z",
"published": "2022-05-02T06:10:13Z",
"aliases": [
"CVE-2010-0111"
],
"details": "HDNLRSVC.EXE in the Intel Alert Handler service (aka Symantec Intel Handler service) in Intel Alert Manageme... | 881 |
301 | <reponame>jonghenhan/iotivity
/******************************************************************
*
* Copyright 2016 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 the License.
* You may obtain a copy... | 2,278 |
358 | <filename>include/Mahi/Gui/Color.hpp
// MIT License
//
// Copyright (c) 2020 Mechatronics and Haptic Interfaces Lab - Rice University
//
// 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 wit... | 4,793 |
879 | package org.zstack.sdk;
public class SetVmCleanTrafficResult {
}
| 26 |
1,074 | from abc import ABC, abstractmethod
from collections import deque
from slm_lab.lib import logger, util
import numpy as np
import pydash as ps
logger = logger.get_logger(__name__)
class Memory(ABC):
'''Abstract Memory class to define the API methods'''
def __init__(self, memory_spec, body):
'''
... | 416 |
860 | <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
... | 548 |
713 | <reponame>ihtiandr9/AMQP-CPP
/**
* DeferredConfirm.cpp
*
* Implementation file for the DeferredConfirm class
*
* @author <NAME> <<EMAIL>>
* @copyright 2018 Copernica BV
*/
#include "includes.h"
#include "basicackframe.h"
#include "basicnackframe.h"
/**
* Namespace
*/
namespace AMQP {
/**
* Process an ... | 278 |
776 | <reponame>Diffblue-benchmarks/actframework
package act.app;
/*-
* #%L
* ACT Framework
* %%
* Copyright (C) 2014 - 2017 ActFramework
* %%
* 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,467 |
339 | <gh_stars>100-1000
#!/usr/bin/python
# encoding: utf-8
# Copyright © 2012 <NAME> <<EMAIL>>
# This work is free. You can redistribute it and/or modify it under the
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See the COPYING file for more details.
# Use modern Py... | 903 |
1,305 | <reponame>whxiang/JDKSourceCode1.8
/*
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
... | 16,094 |
348 | <reponame>chamberone/Leaflet.PixiOverlay
{"nom":"Momères","circ":"2ème circonscription","dpt":"Hautes-Pyrénées","inscrits":634,"abs":279,"votants":355,"blancs":6,"nuls":0,"exp":349,"res":[{"nuance":"REM","nom":"<NAME>","voix":165},{"nuance":"FI","nom":"M. <NAME>","voix":48},{"nuance":"RDG","nom":"Mme <NAME>","voix":43}... | 301 |
1,127 | <filename>src/plugins/intel_cpu/src/nodes/color_convert.h
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <node.h>
#include <utils/multidim_map.hpp>
#include <functional>
#include <tuple>
#include <array>
namespace ov {
namespace intel_cpu {
namespace node... | 1,442 |
337 | <reponame>AndrewReitz/kotlin<filename>nj2k/testData/newJ2k/parenthesizedExpression/parenthesized2.java
//statement
Character str = ''
(str.toString() + "abc").length() | 61 |
387 | <filename>yolov2_darknet_camera.py
import cv2
import numpy as np
from chainer import serializers, Variable
import chainer.functions as F
from yolov2_darknet_predict import CocoPredictor
cap = cv2.VideoCapture(0)
coco_predictor = CocoPredictor()
while(True):
ret, orig_img = cap.read()
nms_results = coco_predic... | 371 |
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 ... | 2,162 |
1,444 | <reponame>GabrielSturtevant/mage
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
/**
* @author Loki
*/
public final class Stampe... | 332 |
511 | <filename>ebpfKern/sysmonGenericEntry_tp.c
/*
SysmonForLinux
Copyright (c) Microsoft Corporation
All rights reserved.
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 ... | 3,059 |
349 | <reponame>bramkragten/operating-system<gh_stars>100-1000
import os
import csv
import infra.basetest
class TestPostScripts(infra.basetest.BRTest):
config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
"""
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
... | 1,177 |
312 | <reponame>security-geeks/parallella-examples
#pragma once
//#define MODP_RESULT_DEBUG
#define SHARED_MEM_PER_CORE 0x40000
#define FIXED_MP_NUM_LEN 126
#ifndef __GMP_H__
typedef unsigned mp_limb_t;
typedef int mp_size_t;
typedef mp_limb_t* mp_ptr;
typedef mp_ptr mp_srcptr;
#endif
typedef mp_limb_t mp_fixed_len_num[FIX... | 207 |
368 | /*
Plugin-SDK (Grand Theft Auto San Andreas) header file
Authors: GTA Community. See more here
https://github.com/DK22Pac/plugin-sdk
Do not delete this comment block. Respect others' work!
*/
#pragma once
#include "PluginBase.h"
class PLUGIN_API CCredits {
public:
static int &CreditsStartTime;
... | 208 |
870 | /*
* 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 ... | 317 |
1,577 | <reponame>Kua-Fu/rally
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); y... | 509 |
1,738 | <filename>dev/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/View/AssetCompleterListView.h
/*
* 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 (th... | 586 |
675 | //
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in bin... | 3,678 |
848 | /* Copyright 2019 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... | 1,019 |
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.
#ifndef CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_
#define CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_
#include <stdint.h>
#include <map>
#include <mem... | 1,983 |
1,144 | /******************************************************************************
*
* Copyright(c) 2016 - 2017 Realtek Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundat... | 78,559 |
5,169 | <reponame>Gantios/Specs<filename>Specs/e/8/6/ZWSMShare/0.0.2/ZWSMShare.podspec.json
{
"name": "ZWSMShare",
"version": "0.0.2",
"summary": "ZWSMShare is a Login&Share function for General project",
"homepage": "https://git.oschina.net/cribug",
"license": {
"type": "MIT",
"file": "LICENSE"
},
"autho... | 571 |
348 | <reponame>southpeak/Minya
#import <UIKit/UIKit.h>
FOUNDATION_EXPORT double Pods_MinyaDemoVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_MinyaDemoVersionString[];
| 66 |
579 | /*
* Copyright (c) 2020-2021 Valve Corporation
* Copyright (c) 2020-2021 LunarG, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0... | 774 |
334 | # -*- coding: utf-8 -*-
# Copyright (c) 2017 Ericsson AB
#
# 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 ... | 571 |
3,269 | // Time: O(n)
// Space: O(1)
class Solution {
public:
int maxNumberOfBalloons(string text) {
static const string TARGET = "balloon";
unordered_map<int, int> source_count, target_count;
for (const auto& c : text) {
++source_count[c];
}
for (const auto& c : TARGET... | 274 |
428 | <gh_stars>100-1000
#ifndef __DATAWRAP_H__
#define __DATAWRAP_H__
#include "string/url.h"
char *datawrap_rce(url_t *url, const char *code, int pos);
char *data_wrap_rce(const char *target, const char *parameter, const char *code);
#endif
| 101 |
2,542 | <reponame>TheVinhLuong102/thinc
from thinc.backends._param_server import ParamServer
import numpy
def test_param_server_init():
array = numpy.zeros((5,), dtype="f")
params = {("a", 1): array, ("b", 2): array}
grads = {("a", 1): array, ("c", 3): array}
ps = ParamServer(params, grads)
assert ps.para... | 162 |
327 | <filename>tests/autotune_test.py
import unittest
import numpy as np
from spectralcluster import autotune
from spectralcluster import laplacian
from spectralcluster import refinement
from spectralcluster import spectral_clusterer
from spectralcluster import utils
RefinementName = refinement.RefinementName
ThresholdType... | 1,285 |
3,139 | package com.jme3.system.osvr.osvrrendermanageropengl;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/"><NAME></a... | 713 |
3,432 | <reponame>faustinaleo18/markdown-badges
{
"Markdown": {
"beautifiers": [
"Prettier"
],
"__pragma_insert__": true,
"wrap_line_length": 0
}
}
| 78 |
2,053 | package scouter.agent.trace;
import scouter.agent.Configure;
import scouter.agent.error.TOO_MANY_COLLECTION_MEMBERS;
import scouter.agent.netio.data.DataProxy;
import scouter.lang.AlertLevel;
import scouter.lang.TextTypes;
import scouter.lang.pack.AlertPack;
import scouter.lang.step.HashedMessageStep;
import scouter.l... | 831 |
348 | {"nom":"Saxon-Sion","circ":"5ème circonscription","dpt":"Meurthe-et-Moselle","inscrits":67,"abs":29,"votants":38,"blancs":0,"nuls":0,"exp":38,"res":[{"nuance":"LR","nom":"<NAME>","voix":13},{"nuance":"SOC","nom":"<NAME>","voix":12},{"nuance":"REM","nom":"Mme <NAME>","voix":6},{"nuance":"FN","nom":"M. <NAME>","voix":4},... | 281 |
342 | /*
* Copyright 2001-2002,2006,2016 BitMover, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | 305 |
575 | // 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.
#include "net/quic/quic_stream_factory.h"
#include <algorithm>
#include <memory>
#include <tuple>
#include <utility>
#include "base/bind.h"
#include... | 33,255 |
4,036 | <gh_stars>1000+
class Base {
protected:
Resource* resource;
public:
virtual void init() {
resource = createResource();
}
virtual void release() {
freeResource(resource);
}
};
class Derived: public Base {
virtual void init() {
resource = createResourceV2();
}
virt... | 292 |
735 | package com.mcxiaoke.next.ui.layout;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;
/**
* LinearLayout that not duplicate parent state to child views
* User: mcxiaoke
* Date: 13-10-9
* Time: 下午12:09
*/
/**
* 不向子View传递PRESSED状态的LinearLayout
*/
public class... | 248 |
1,615 | from . import utils # noqa
| 10 |
481 | # Copyright (c) OpenMMLab. All rights reserved.
import torch
from mmflow.ops import build_operators
def test_warp():
warp_cfg = dict(
type='Warp',
mode='bilinear',
padding_mode='zeros',
align_corners=True,
use_mask=True)
warp_layer = build_operators(warp_cfg)
feat... | 219 |
1,444 |
package mage.cards.m;
import java.util.UUID;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.mana.ConditionalColorlessManaAbility;
import mage.abilities.mana.conditional.ConditionalSpellManaBuilder;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
impo... | 362 |
692 | <filename>components/admin/examples/SOURCES/hello.c<gh_stars>100-1000
#include "mpi.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
int num_procs, num_local;
char mach_name[MPI_MAX_PROCESSOR_NAME];
int mach_len;
MPI_Init (&argc,&argv);
MPI_Comm_size (MPI_COMM... | 331 |
313 | <filename>YBL365/Class/Goods/GoodsDetail/View/YBLGoodsDeliverToCell.h
//
// YBLGoodsDeliverToCell.h
// YBL365
//
// Created by 乔同新 on 12/24/16.
// Copyright © 2016 乔同新. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "YBLLabelsCell.h"
@interface YBLGoodsDeliverToCell : YBLLabelsCell
@property (nonatomic,... | 175 |
14,668 | // 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/ui/web_applications/web_app_launch_utils.h"
#include "base/feature_list.h"
#include "base/metrics/histogram_macros.h"
#include "... | 5,221 |
466 | #!/usr/bin/env python
import sys
def translate(from_c, to_c, in_string):
return in_string.replace(from_c, to_c)
def main(args, in_string):
print(">>>> args", args)
if args[0] == '-t':
# need to truncate first to len of last
to_c = args[2]
from_c = args[1][:len(to_c)]
else:
... | 261 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.