max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
3,897 | /****************************************************************************
*
* Copyright 2020 Samsung Electronics All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ... | 868 |
406 | package com.kunzisoft.switchdatetime;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.res.Configuration;
import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.an... | 9,609 |
1,872 | # Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.
# COM Interop tests for IronPython
from iptest.assert_util import skiptest
skiptest("win32")
from iptest.cominte... | 1,247 |
1,826 | <filename>flexmark-util-sequence/src/main/java/com/vladsch/flexmark/util/sequence/ReplacedTextMapper.java
package com.vladsch.flexmark.util.sequence;
import java.util.ArrayList;
/**
* Class which tracks text replacements to provide original offset from modified offset.
* <p>
* This is needed when the original base... | 1,775 |
310 | /*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Copyright @ 2015 Atlassian Pty Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.or... | 3,340 |
608 |
import time
import serial
def readTime(serialPort):
'''Reads the time from the AVR over the serial port'''
serialPort.flushInput()
character = ""
while(not character == "\n"): # loop until see end of line
character = serialPort.read(1)
## The time string looks something like '011:045... | 1,273 |
945 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* ... | 2,553 |
3,094 | import torch
import torchvision.transforms as transforms
from torch.utils.data import DataLoader
import torchvision.datasets as datasets
from tqdm import tqdm
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
train_set = datasets.CIFAR10(root="ds/", transform=transforms.ToTensor(), download=True)
t... | 343 |
10,225 | package io.quarkus.it.spring;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
@Component
@Target({ Ele... | 135 |
316 | package com.mapbox.mapboxsdk.offline;
import androidx.annotation.Keep;
/**
* A region's status includes its active/inactive state as well as counts
* of the number of resources that have completed downloading, their total
* size in bytes, and the total number of resources that are required.
* <p>
* Note that the... | 1,542 |
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.
// ------------------------------------------------------------
namespace Naming
{
class S... | 344 |
471 | <filename>corehq/ex-submodules/casexml/apps/phone/data_providers/case/load_testing.py
from copy import deepcopy
from casexml.apps.phone.data_providers.case.utils import CaseSyncUpdate
from casexml.apps.phone.xml import get_case_element, tostring
from corehq.apps.app_manager.const import USERCASE_TYPE
def transform_lo... | 610 |
5,169 | {
"name": "libjingle_peerconnection",
"version": "6798.3",
"summary": "An iOS WebRTC demo application hosted on App Engine. Builds by Pristine.io",
"description": " The WebRTC native APIs are implemented based on the following [WebRTC spec.](http://dev.w3.org/2011/webrtc/editor/webrtc.html... | 786 |
918 | <reponame>mvachhani/incubator-gobblin<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 ... | 631 |
2,181 | <reponame>yaplej/bro<filename>src/script_opt/CPP/InitsInfo.h<gh_stars>1000+
// See the file "COPYING" in the main distribution directory for copyright.
// Classes for tracking information for initializing C++ values used by the
// generated code.
// Initialization is probably the most complex part of the entire compi... | 7,052 |
407 | #include "plugin_z3_utils.h"
#include "SubgraphFunctionGenerator.h"
namespace hal
{
extern std::unique_ptr<BasePluginInterface> create_plugin_instance()
{
return std::make_unique<Z3UtilsPlugin>();
}
std::string Z3UtilsPlugin::get_name() const
{
return std::string("z3_utils");
... | 203 |
471 | <reponame>dimagilg/commcare-hq<filename>custom/openclinica/models.py
from collections import defaultdict
import hashlib
import re
from lxml import etree
from corehq.apps.domain.models import Domain
from corehq.apps.users.models import CouchUser
from corehq.util.quickcache import quickcache
from custom.openclinica.const... | 12,353 |
1,968 | <reponame>agramonte/corona
//////////////////////////////////////////////////////////////////////////////
//
// This file is part of the Corona game engine.
// For overview and more information on licensing please refer to README.md
// Home page: https://github.com/coronalabs/corona
// Contact: <EMAIL>
//
////////////... | 398 |
328 | <filename>lib-dmxsend/src/dmxsend.cpp
/**
* @file dmxsend.cpp
*
*/
/* Copyright (C) 2018-2021 by <NAME> mailto:<EMAIL>
*
* 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 restric... | 1,065 |
8,232 | <reponame>isra-fel/STL
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// exception handling support functions
#include <functional>
#include <new>
#include <regex>
#include <stdexcept>
_STD_BEGIN
[[noreturn]] _CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _X... | 643 |
945 | /*
* 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,305 |
747 | /*!
* \file WtExeFact.h
*
* \author Wesley
* \date 2020/03/30
*
*
*/
#pragma once
#include "../Includes/ExecuteDefs.h"
USING_NS_OTP;
class WtExeFact : public IExecuterFact
{
public:
WtExeFact();
virtual ~WtExeFact();
public:
virtual const char* getName() override;
virtual void enumEx... | 210 |
12,718 | <reponame>aruniiird/zig
#include "time32.h"
#include <time.h>
struct tm *__localtime32_r(time32_t *t, struct tm *tm)
{
return localtime_r(&(time_t){*t}, tm);
}
| 78 |
3,402 | <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
* ... | 1,925 |
2,293 | #!/usr/bin/python
#
# Copyright (C) 2006 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 required by applicable law ... | 5,083 |
2,180 | <reponame>Amwidtf/heritrix3
/*
* This file is part of the Heritrix web crawler (crawler.archive.org).
*
* Licensed to the Internet Archive (IA) by one or more individual
* contributors.
*
* The IA licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file ... | 736 |
857 | <gh_stars>100-1000
# Copyright (c) LinkedIn Corporation. All rights reserved. Licensed under the BSD-2 Clause license.
# See LICENSE in the project root for license information.
from ujson import dumps
from ... import db
def on_get(req, resp, service):
"""
Get list of team mapped to a service
**Example ... | 449 |
938 | <reponame>URSec/Silhouette-Compiler-Legacy
//===- LiveRangeShrink.cpp - Move instructions to shrink live range -------===//
//
// 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-ex... | 3,556 |
384 | default_app_config = "nautobot.ipam.apps.IPAMConfig"
| 22 |
348 | <reponame>chamberone/Leaflet.PixiOverlay
{"nom":"Lhuis","circ":"5ème circonscription","dpt":"Ain","inscrits":611,"abs":285,"votants":326,"blancs":4,"nuls":1,"exp":321,"res":[{"nuance":"LR","nom":"<NAME>","voix":121},{"nuance":"REM","nom":"Mme <NAME>","voix":83},{"nuance":"FN","nom":"Mme <NAME>","voix":45},{"nuance":"FI... | 307 |
1,160 | """
summary: retrieve the strings that are selected in the "Strings" window.
description:
In IDA it's possible to write actions that can be applied even to
core (i.e., "standard") widgets. The actions in this example use the
action "context" to know what the current selection is.
This example shows how you ca... | 1,415 |
1,194 | <reponame>MFAshby/hapi-fhir<filename>hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/r4/JpaR4Config.java<gh_stars>1000+
package ca.uhn.fhir.jpa.config.r4;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.jpa.api.IDaoRegistry;
import ca.uhn.... | 1,540 |
302 | <reponame>supavit-siriwan/scenario_runner<filename>srunner/scenariomanager/actorcontrols/carla_autopilot.py
#!/usr/bin/env python
# Copyright (c) 2020 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides an ex... | 497 |
1,040 | <reponame>titanomachy/flight
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <signal.h>
#include <time.h>
#include <sys/time.h>
#include <iostream>
#include <string>
#include "../../LCM/lcmt_deltawing_u.h"
#include "lcmtypes/mav_pose_t.h" // from pronto
#include "../../externals/ConciseArgs.hpp"
... | 994 |
992 | /*
* Copyright 2017 The Android Open Source Project
*
* 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 applica... | 3,709 |
460 | /*
* Copyright 2007-2010 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.0
*
* Unless requi... | 501 |
1,262 | /*
*
* Copyright 2016 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 ap... | 977 |
7,073 | def keyword_in_my_lib_file():
print('Here we go!!')
def embedded(arg):
print(arg)
embedded.robot_name = 'Keyword with embedded ${arg} in MyLibFile'
| 61 |
1,618 | //
// PrismRuntimeUtil.h
// DiDiPrism
//
// Created by hulk on 2019/6/27.
//
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
NS_ASSUME_NONNULL_BEGIN
@interface PrismRuntimeUtil : NSObject
+ (void)hookClass:(Class)cls originalSelector:(SEL)originalSelector swizzledSelector:(SEL)swizzledSelector;
+ (voi... | 184 |
10,225 | <filename>extensions/resteasy-reactive/quarkus-resteasy-reactive-servlet/deployment/src/test/java/io/quarkus/resteasy/reactive/server/servlet/test/ServletSimpleRestTestCase.java
package io.quarkus.resteasy.reactive.server.servlet.test;
import io.quarkus.resteasy.reactive.server.test.simple.SimpleQuarkusRestTestCase;
... | 134 |
495 | /*
* Copyright 2014-2016 Media for Mobile
*
* 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 ag... | 1,766 |
305 | """
Remaining problems:
1. _testdoc.do.txt:
!bc
|bc pycod
def f(x):
return x+1
|ec
!ec
does not work properly.
2.
"""
from __future__ import absolute_import
from builtins import str
from builtins import range
from past.builtins import basestring
import re, sys
from .common import default_movie, plain_exercise, b... | 6,877 |
590 | /*******************************************************************************
* Copyright 2017 Bstek
*
* 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/l... | 4,325 |
376 | <reponame>BIGWangYuDong/mmfewshot
_base_ = [
'../../_base_/datasets/nway_kshot/base_coco.py',
'../../_base_/schedules/schedule.py', '../fsdetview_r50_c4.py',
'../../_base_/default_runtime.py'
]
lr_config = dict(warmup_iters=1000, step=[80000])
runner = dict(max_iters=80000)
optimizer = dict(lr=0.01)
# model... | 223 |
859 | <filename>tests/commands/completion/test_completions_command.py
# -*- coding: utf-8 -*-
import os
import pytest
from cleo.application import Application
from cleo.testers.command_tester import CommandTester
from .fixtures.command_with_colons import CommandWithColons
from .fixtures.hello_command import HelloCommand
... | 1,007 |
856 | package org.lionsoul.jcseg.segmenter;
import java.util.ArrayList;
import org.lionsoul.jcseg.IChunk;
/**
* mmseg default filter class
*
* @author chenxin<<EMAIL>>
*/
public class MMSegFilter
{
/**
* 1. the maximum match rule
* this rule will return the chunks that own the largest word length
*/... | 1,887 |
2,504 | <gh_stars>1000+
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTI... | 3,579 |
7,217 | <gh_stars>1000+
package org.xutils.http.request;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.text.TextUtils;
import org.xutils.cache.DiskCacheEntity;
import org.xutils.cache.LruDiskCache;
import org.xutils.common.util.IOUtil;
import org.xutils.common.util.LogUtil;
import ... | 1,923 |
60,067 | /*
* Copyright (c) Facebook, Inc. and its affiliates.
* 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 <assert.h>
#include <arm_neon.h>
#include <qnnpack/q8avgpool.h>
void pytorch_q8avgpool_uk... | 2,080 |
854 | <filename>C++/1224.cpp
__________________________________________________________________________________________________
sample 20 ms submission
static const auto _ = [](){
ios::sync_with_stdio(false);
cin.sync_with_stdio(false);
cout.sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
... | 888 |
401 | <reponame>aFarkas/respimage
{
"name": "respimage",
"version": "1.4.2",
"filename": "respimage.min.js",
"browser": "respimage.min.js",
"scripts": {
"test": "grunt test --verbose"
},
"author": "<NAME> <<EMAIL>>",
"repository": {
"type": "git",
"url": "git://github.com/aFarkas/respimage.git"
... | 545 |
763 | <reponame>pranavbj-amzn/batfish
package org.batfish.datamodel.acl;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;
import com.google.common.testing.EqualsTester;
import org.batfish.common.util.BatfishObjectMapper;
import org.batfish.datamodel.TraceElement;
import org.junit.Test... | 428 |
1,042 | /**
* @copyright Copyright (c) 2022, Alibaba Group Holding Limited
*/
#ifndef _XQC_H3_REQUEST_H_INCLUDED_
#define _XQC_H3_REQUEST_H_INCLUDED_
#include "src/http3/xqc_h3_stream.h"
#include "src/http3/xqc_h3_header.h"
#define XQC_H3_REQUEST_INITIAL_HEADERS_CAPACITY 32
typedef struct xqc_h3_request_s {
/* h3 str... | 1,766 |
2,151 | <gh_stars>1000+
// 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 "third_party/blink/renderer/core/xml/document_xslt.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.... | 2,273 |
575 | <reponame>sarang-apps/darshan_browser<gh_stars>100-1000
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_LOGIN_SCREEN_LOGIN_LOGIN_API_H_
#define CHROME_BROWSER_... | 1,341 |
3,970 | //
// KWStringContainsMatcher.h
// Kiwi
//
// Created by <NAME> on 7/06/12.
// Copyright (c) 2012 <NAME>. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "KWGenericMatcher.h"
@interface KWStringContainsMatcher : NSObject <KWGenericMatching>
+ (id)matcherWithSubstring:(NSString *)aSubstring;
- (... | 180 |
677 | /*
* Copyright (C) 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions a... | 1,278 |
716 | <gh_stars>100-1000
// Copyright (c) 2022 The Orbit 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 "MockBatcher.h"
#include "CoreMath.h"
namespace orbit_gl {
MockBatcher::MockBatcher(BatcherId batcher_id) : Batcher(batche... | 1,519 |
5,823 | <reponame>onix39/engine
// Copyright 2013 The Flutter 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 "flutter/testing/post_task_sync.h"
#include "flutter/fml/synchronization/waitable_event.h"
namespace flutter {
namespace... | 219 |
319 | <filename>ext/rinku/rinku.c
/*
* Copyright (c) 2016, GitHub, Inc
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS ... | 2,204 |
640 | <reponame>jpoikela/z88dk
/*
* (c) Copyright 2015 by <NAME>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notic... | 3,575 |
1,128 | <reponame>HugoLipeng/PLDroidMediaStreaming
package com.qiniu.pili.droid.streaming.demo.utils;
import android.app.Activity;
import android.app.Application;
import android.os.Bundle;
public class AppStateTracker {
public static final int STATE_FOREGROUND = 0;
public static final int STATE_BACKGROUND = 1;
... | 1,181 |
2,167 | # External class definitions for use in `test_polar.py` tests
class Foo:
def __init__(self, name=""):
self.name = name
def foo(self):
return "Foo!"
class Bar(Foo):
def foo(self):
return "Bar!"
class Qux:
pass
class MyClass:
def __init__(self, x="", y=""):
sel... | 256 |
904 | <reponame>BurAndBY/pkgj
#include "patchinfo.hpp"
#include "sha256.hpp"
namespace
{
constexpr uint8_t HMAC_KEY[32] = {
0xE5, 0xE2, 0x78, 0xAA, 0x1E, 0xE3, 0x40, 0x82, 0xA0, 0x88, 0x27,
0x9C, 0x83, 0xF9, 0xBB, 0xC8, 0x06, 0x82, 0x1C, 0x52, 0xF2, 0xAB,
0x5D, 0x2B, 0x4A, 0xBD, 0x99, 0x54, 0x50, 0x... | 1,650 |
677 | <reponame>InfiniteSynthesis/lynx-native<filename>Core/third_party/JavaScriptCore/heap/MachineStackMarker.h<gh_stars>100-1000
/*
* Copyright (C) 1999-2000 <NAME> (<EMAIL>)
* Copyright (C) 2001 <NAME> (<EMAIL>)
* Copyright (C) 2003-2017 Apple Inc. All rights reserved.
*
* This library is free software; you can r... | 1,491 |
2,338 | <gh_stars>1000+
// RUN: %clangxx_asan -xc++ -shared -fPIC -o %t.so - < %s
// RUN: %clang_asan %s -o %t.out -ldl
//
// RUN: { env ASAN_OPTIONS=verbosity=1 %t.out %t.so || : ; } 2>&1 | FileCheck %s
//
// CHECK: AddressSanitizer: failed to intercept '__cxa_throw'
//
// This tests assumes static linking of the asan runtime... | 347 |
3,428 | {"id":"00157","group":"spam-1","checksum":{"type":"MD5","value":"52b0a260de7c64f539b0e5d16198b5bf"},"text":"From <EMAIL> Thu Aug 29 15:40:40 2002\nReturn-Path: <<EMAIL>>\nDelivered-To: <EMAIL>.<EMAIL>\nReceived: from localhost (localhost [127.0.0.1])\n\tby phobos.labs.spamassassin.taint.org (Postfix) with ESMTP id 12B... | 1,049 |
3,489 | <filename>scripts/geodata/places/reverse_geocode.py
import argparse
import logging
import os
import sys
import six
this_dir = os.path.realpath(os.path.dirname(__file__))
sys.path.append(os.path.realpath(os.path.join(os.pardir, os.pardir)))
from geodata.address_expansions.abbreviations import abbreviate
from geodata.c... | 1,748 |
764 | <reponame>aboluock/ppl.nn<filename>src/ppl/nn/engines/x86/impls/src/ppl/kernel/x86/common/scatter_elements/scatter_elements_common.h
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// r... | 1,223 |
892 | {
"schema_version": "1.2.0",
"id": "GHSA-2rh9-h56r-vv84",
"modified": "2022-05-01T07:32:33Z",
"published": "2022-05-01T07:32:33Z",
"aliases": [
"CVE-2006-5862"
],
"details": "Directory traversal vulnerability in the session mechanism of the web interface for Network Administration Visualized (NAV) bef... | 541 |
1,138 | try:
from urllib.parse import quote
import html
except ImportError:
from urllib import quote
html = None
PUNCTUATION = r'''\\!"#$%&'()*+,./:;<=>?@\[\]^`{}|_~-'''
ESCAPE_TEXT = r'\\[' + PUNCTUATION + ']'
def escape(s, quote=True):
s = s.replace("&", "&")
s = s.replace("<", "<")
s =... | 469 |
527 | """Module containing an interface to trained PyTorch model."""
from dice_ml.model_interfaces.base_model import BaseModel
import torch
class PyTorchModel(BaseModel):
def __init__(self, model=None, model_path='', backend='PYT', func=None, kw_args=None):
"""Init method
:param model: tra... | 687 |
1,062 | /**
* Copyright 2014 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 requir... | 567 |
721 | package crazypants.enderio.base.config.config;
import info.loenwind.autoconfig.factory.IValue;
import info.loenwind.autoconfig.factory.IValueFactory;
public final class FarmingConfig {
public static final IValueFactory F = BaseConfig.F.section("farming");
public static final IValue<Integer> treeHarvestRadius = ... | 320 |
14,668 | <reponame>zealoussnow/chromium
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_PROCESSING_NAME_PROCESSING_UTIL_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_F... | 895 |
3,334 | from . import imports
__all__ = ['__version__']
__version__ = imports.get_config().version
| 27 |
335 | <reponame>Safal08/Hacktoberfest-1
{
"word": "Unreality",
"definitions": [
"The quality of being imaginary, illusory, or unrealistic."
],
"parts-of-speech": "Noun"
} | 82 |
1,127 | // Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <common_test_utils/test_common.hpp>
#include <ngraph_functions/utils/ngraph_helpers.hpp>
#include <gtest/gtest.h>
#include "ngraph/ngraph.hpp"
#include "ngraph/opsets/opset4.hpp"
#include "vpu/ngraph/operations/dynamic_sh... | 3,143 |
703 | #pragma once
#include <Core/ResourceManager/Resource.h>
#include <RendererCore/Meshes/MeshBufferResource.h>
#include <RendererCore/RendererCoreDLL.h>
#include <RendererFoundation/RendererFoundationDLL.h>
using ezDynamicMeshBufferResourceHandle = ezTypedResourceHandle<class ezDynamicMeshBufferResource>;
struct ezDyna... | 1,486 |
6,989 | <reponame>HeyLey/catboost<filename>catboost/libs/helpers/interrupt.h
#pragma once
#include <util/generic/yexception.h>
extern void (* volatile INTERRUPTED_FUNC)();
class TInterruptException : public yexception {
};
void SetInterruptHandler(void (*func)());
void ResetInterruptHandler();
void CheckInterrupted();
| 107 |
892 | {
"schema_version": "1.2.0",
"id": "GHSA-xx5w-cqxh-w2m4",
"modified": "2022-05-13T01:19:12Z",
"published": "2022-05-13T01:19:12Z",
"aliases": [
"CVE-2018-15796"
],
"details": "Cloud Foundry Bits Service Release, versions prior to 2.14.0, uses an insecure hashing algorithm to sign URLs. A remote malici... | 438 |
345 | <reponame>Shadow-Devil/TeamSpeak-3-Java-API<filename>src/main/java/com/github/theholywaffle/teamspeak3/commands/FileCommands.java<gh_stars>100-1000
package com.github.theholywaffle.teamspeak3.commands;
/*
* #%L
* TeamSpeak 3 Java API
* %%
* Copyright (C) 2017 <NAME>, <NAME>
* %%
* Permission is hereby granted, f... | 2,590 |
1,375 | <filename>sw/device/silicon_creator/lib/sigverify_mod_exp_ibex_unittest.cc<gh_stars>1000+
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include <unordered_set>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#in... | 7,045 |
313 | <filename>titus-server-federation/src/main/java/com/netflix/titus/federation/service/CellWebClientConnectorUtil.java<gh_stars>100-1000
/*
* 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 o... | 3,117 |
552 | <filename>doc/integrations/cortx-s3-slack-bot/list_bucket_contents.py
from dotenv import load_dotenv
from pathlib import Path
import boto3
import os
env_path = Path('.')/'.env'
load_dotenv(dotenv_path=env_path)
if __name__ == "__main__":
resource = boto3.resource('s3', endpoint_url=str(os.environ.get('ENDPOINT_UR... | 308 |
353 | #ifndef THC_GENERIC_FILE
#error "You must define THC_GENERIC_FILE before including THGenerateComplexFloatType.h"
#endif
#define scalar_t c10::complex<float>
#define accreal c10::complex<float>
#define Real ComplexFloat
#define CReal CudaComplexFloat
#define THC_REAL_IS_COMPLEXFLOAT
#line 1 THC_GENERIC_FIL... | 230 |
372 | /*
* 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 distributed under t... | 1,448 |
2,023 | #! /usr/bin/env python3
"""
markdowndoc.py
Written by <NAME> and <NAME>
Licensed under GPLv3
Released 28 April 2009
This module contains a simple class to output Markdown-style
pydocs.
"""
import pydoc, inspect, re, builtins
class MarkdownDoc(pydoc.TextDoc):
underline = "*" * 40
def process_docstring(self, o... | 2,191 |
9,106 | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#include "pch.h"
#include "IReactDispatcher.h"
#include "ReactDispatcherHelper.g.cpp"
#include <glog/logging.h>
using namespace winrt;
using namespace Windows::Foundation;
namespace winrt::Microsoft::ReactNative::implementation {... | 1,705 |
321 | <gh_stars>100-1000
// 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.
// This file is autogenerated by
// base/android/jni_generator/jni_generator.py
// For
// org/chromium/base/LocaleUtils
#i... | 680 |
1,801 | #ifndef UPSAMPLE_LAYER_H
#define UPSAMPLE_LAYER_H
#include "dark_cuda.h"
#include "layer.h"
#include "network.h"
#ifdef __cplusplus
extern "C" {
#endif
layer make_upsample_layer(int batch, int w, int h, int c, int stride);
void forward_upsample_layer(const layer l, network_state state);
void backward_upsample_layer(co... | 217 |
4,085 | <reponame>m-mead/pip-tools<filename>piptools/subprocess_utils.py<gh_stars>1000+
# WARNING! BE CAREFUL UPDATING THIS FILE
# Consider possible security implications associated with subprocess module.
import subprocess # nosec
def run_python_snippet(python_executable: str, code_to_run: str) -> str:
"""
Executes... | 229 |
454 | package io.vertx.up.uca.yaml;
import io.vertx.core.json.JsonObject;
import io.vertx.up.fn.Fn;
public class ZeroInfix implements Node<JsonObject> {
private transient final String key;
ZeroInfix(final String key) {
this.key = key;
}
@Override
public JsonObject read() {
// Not null... | 189 |
6,835 | <filename>bench/jinja/jinja.py
import time
from jinja2 import Template, Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('.'))
print env.get_template('index.html').render()
# src = open('index.html').read()
# print(env._generate(env._parse(src, 'poop', 'hello.html'),
# 'po... | 363 |
711 | package com.java110.user.api;
import com.alibaba.fastjson.JSONObject;
import com.java110.dto.owner.OwnerDto;
import com.java110.po.owner.OwnerPo;
import com.java110.user.bmo.owner.*;
import com.java110.utils.util.Assert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.Res... | 1,829 |
713 | <filename>core/src/test/java/org/infinispan/util/NotifierLatch.java
package org.infinispan.util;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
/**
* A latch that can be open and close. It allows the notification when the some thread is blocking in it.
*
* @author <NAME>
* ... | 933 |
1,645 | /*
* Seldon -- open source prediction engine
* =======================================
*
* Copyright 2011-2015 Seldon Technologies Ltd and Rummble Ltd (http://www.seldon.io/)
*
* ********************************************************************************************
*
* Licensed under the Apache License, V... | 1,036 |
315 | <filename>gactions-sample/src/main/java/com/frogermcs/gactions/sample/AppEngineResponseHandler.java
package com.frogermcs.gactions.sample;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.frogermcs.gactions.ResponseHandler;
import com.frogermcs.gactions.api.response.RootResponse;
import javax.servlet.ht... | 602 |
474 | package org.javacord.api.interaction;
import org.javacord.api.interaction.internal.SlashCommandOptionBuilderDelegate;
import org.javacord.api.util.internal.DelegateFactory;
import java.util.List;
public class SlashCommandOptionBuilder {
private final SlashCommandOptionBuilderDelegate delegate =
Dele... | 1,430 |
759 | <filename>rome/src/test/java/com/rometools/rome/unittest/TestSyndFeedAtom10prefix.java
/*
*
* 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-... | 507 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.