max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
388 | class Solution {
public:
bool visited[300][300];
int r[4] = {-1,0,0,1};
int c[4] = {0,-1,1,0};
//Checks if the given row and col value are valid and if the cell is visited and if the cell contains '1' or not.
bool val(int row,int col,vector<vector<char>>& grid,int M,int N)
{
return ... | 871 |
2,338 | // RUN: %clang_cc1 -fsyntax-only -verify -Wall %s
namespace test1 {
static int abc = 42; // expected-warning {{variable 'abc' is not needed and will not be emitted}}
namespace {
template <typename T> int abc_template = 0;
template <> int abc_template<int> = 0; // expected-warning {{variable 'abc_template<int>... | 320 |
1,745 | //********************************* bs::framework - Copyright 2018-2019 <NAME> ************************************//
//*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********//
#include "BsScriptParticleEmitterShape.generated.h"
#include "BsMonoMethod.h"... | 424 |
858 | //===-- asmstmt.cpp -------------------------------------------------------===//
//
// LDC – the LLVM D compiler
//
// This file originates from work by <NAME> for GDC released under
// the GPL 2 and Artistic licenses. See the LICENSE file for details.
//
//===-----------------------------------... | 9,583 |
999 | import repokid.hooks as hooks
from repokid.types import RepokidHookInput
from repokid.types import RepokidHookOutput
@hooks.implements_hook("TEST_HOOK", 2)
def function_2(input_dict: RepokidHookInput) -> RepokidHookOutput:
return input_dict
@hooks.implements_hook("TEST_HOOK", 1)
def function_1(input_dict: Repok... | 144 |
32,544 | package com.baeldung.dagger.intro;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
/**
* Dagger module for providing vehicles components.
*
* @author <NAME>
*
*/
@Module
public class VehiclesModule {
/**
* Creates an {@link Engine}.
*
* @return an {@link Engine}
*/
@Pro... | 198 |
427 | <filename>include/swift/SIL/SILDebuggerClient.h
//===--- SILDebuggerClient.h - Interfaces from SILGen to LLDB ---*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime... | 484 |
1,108 | <filename>excalibur/utils/database.py
from ..settings import engine
def initialize_database():
from ..models import Base
Base.metadata.create_all(engine)
def reset_database():
from ..models import Base
Base.metadata.drop_all(engine)
initialize_database()
| 87 |
2,346 | /*
* Copyright 2012 - 2018 <NAME> (<EMAIL>)
*
* 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 o... | 672 |
30,023 | {
"productName": "Elgato Key Light",
"hardwareBoardType": 53,
"firmwareBuildNumber": 192,
"firmwareVersion": "1.0.3",
"serialNumber": "CN11A1A00001",
"displayName": "Frenck",
"features": ["lights"]
}
| 87 |
368 | <reponame>vfreex/teamtalk
package com.polites.android;
public class FlingAnimation implements Animation {
private float velocityX;
private float velocityY;
private float factor = 0.95f;
private float threshold = 10;
private FlingAnimationListener listener;
@Override
public boolean update(GestureImageView v... | 360 |
3,765 | <filename>pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTRUNSIGNEDSHIFT.java
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.ast;
import net.sourceforge.pmd.annotation.InternalApi;
/**
* @deprecated Will be removed in 7.0.0. ... | 311 |
1,252 | package com.github.glomadrian.roadrunner;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.util.Log;
import com.github.glomadrian.roadrunner.builder.RoadRunnerBuilder;
import com.githu... | 2,477 |
1,338 | <gh_stars>1000+
/*
* Copyright 2010, <NAME>, <EMAIL>
* Distributed under the terms of the MIT license.
*/
#include <unistd.h>
#include <memory.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
const unsigned short TEST_PORT = 40000;
int
main(int argc, c... | 960 |
314 | <reponame>kolinkrewinkel/Multiplex
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import "CDStructures.h"
#import <IDEFoundation/IDEActivityLogSectionRecorder.h>
@class IDEActivityLogSection, NSMapTable, NSMutableArray;
@interface ... | 521 |
2,206 | /*
*
* Copyright (c) 2006-2020, Speedment, 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 requi... | 782 |
766 | /*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wr... | 544 |
5,964 | <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 "config.h"
#include "platform/credentialmanager/PlatformCredential.h"
namespace blink {
PlatformCredential* PlatformCredential:... | 239 |
308 | import torch
from torch import nn
from torch.nn.modules.loss import _Loss
from super_gradients.training.utils.detection_utils import calculate_bbox_iou_matrix
from super_gradients.training.utils.ssd_utils import DefaultBoxes
class SSDLoss(_Loss):
"""
Implements the loss as the sum of the followings:
... | 2,036 |
309 | {
"name": "firstaidgit",
"version": "0.0.3",
"description": "Search git problems and their solutions via the CLI.",
"keywords": [
"firstaidgit",
"first aid git",
"github issues",
"git help",
"git cli"
],
"author": {
"name": "<NAME>",
"email": "<EMAIL>",
"url": "http... | 389 |
678 | //
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import "NSObject.h"
@class NSString, UIGestureRecognizer, UIImage, UIView;
@protocol MultiImageScrollViewDelegate <NSObject>
- (UIImage *)imageAtPage:(unsigned int)arg1;
- (UIView *)vi... | 259 |
428 | <reponame>cping/LGame
/**
* Copyright 2008 - 2012
*
* 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 ... | 21,405 |
687 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from .prediction_count_evaluation import PredictionCountEvaluator # noqa
__all__ = [k for k in globals().keys() if not k.startswith("_")]
| 76 |
5,803 | //
// JasonUtilAction.h
// Jasonette
//
// Copyright © 2016 gliechtenstein. All rights reserved.
//
#import "JasonAction.h"
#import <MobileCoreServices/MobileCoreServices.h>
#import "JasonHelper.h"
#import <TWMessageBarManager/TWMessageBarManager.h>
#import "JDStatusBarNotification.h"
#import <AHKActionSheet/AHKActi... | 171 |
4,391 | <filename>packages/pyright-internal/src/tests/samples/typeNarrowingLiteralMember1.py
# This sample tests type narrowing based on member accesses
# to members that have literal types.
from typing import ClassVar, Literal, Type, Union
class A:
kind: Literal["A"]
kind_class: ClassVar[Literal["A"]]
d: Litera... | 725 |
807 | <reponame>weltonrodrigo/origin<filename>vendor/github.com/google/certificate-transparency/cpp/util/uuid.cc<gh_stars>100-1000
#include <iomanip>
#include <random>
#include <sstream>
#include "util/uuid.h"
using std::hex;
using std::mt19937;
using std::nouppercase;
using std::random_device;
using std::setw;
using std::... | 468 |
1,444 | package org.wiztools.restclient.bean;
/**
*
* @author subwiz
*/
public enum MultipartSubtype {
FORM_DATA, MIXED, DIGEST, MESSAGE, ALTERNATIVE, RELATED, REPORT, SIGNED,
ENCRYPTED, X_MIXED_REPLACE, BYTERANGE;
@Override
public String toString() {
return this.name().toLowerCase().replaceAll("_"... | 140 |
5,169 | <reponame>Gantios/Specs<filename>Specs/0/6/f/OnfidoTask/0.2/OnfidoTask.podspec.json
{
"name": "OnfidoTask",
"authors": [
"Kerem",
"OnfidoTask"
],
"summary": "OnfidoTask SDK",
"version": "0.2",
"homepage": "http://www.google.com",
"license": {
"type": "Apache 2.0",
"file": "LICENSE"
},
... | 334 |
308 | <reponame>Deci-AI/super-gradients
"""
This file is used to define the Dataset used for the Training.
"""
import torchvision.datasets as datasets
import torchvision.transforms as transforms
from super_gradients.training import utils as core_utils
from super_gradients.training.datasets.dataset_interfaces import DatasetIn... | 806 |
984 | /*
* Copyright DataStax, 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 or agreed to in wri... | 1,469 |
634 | <reponame>halotroop2288/consulo<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... | 703 |
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... | 8,135 |
543 | package com.riiablo.codec.excel;
@Excel.Binned
public class Weapons extends Excel<Weapons.Entry> {
public static class Entry extends ItemEntry {
@Column public String wclass;
@Column(format = "2handedwclass")
public String _2handedwclass;
@Column(format = "1or2handed")
public boolean _1or2hande... | 281 |
401 | <reponame>LemonNicholas/fresco-helper
package com.facebook.fresco.helper.photoview.anim;
import android.app.Activity;
import android.graphics.Rect;
import android.os.Bundle;
import android.util.SparseArray;
import android.view.View;
import android.view.WindowManager;
import androidx.recyclerview.widget.GridLayoutMana... | 1,792 |
563 | <filename>tests/test_create.cpp<gh_stars>100-1000
//
// Created by <NAME> on 07.05.2018
//
#include "test.h"
#include "../proto/proto_models.h"
#include "../proto/test_models.h"
TEST_CASE("Create & access", "[FBE]")
{
// Create a new account using FBE model into the FBE stream
FBE::proto::AccountModel writer... | 2,359 |
335 | {
"word": "Purse",
"definitions": [
"A small pouch of leather or plastic used for carrying money, typically by a woman.",
"The money possessed by or available to a person or country.",
"A sum of money given as a prize in a sporting contest, especially a boxing match.",
"A handbag... | 130 |
353 | <reponame>codeproject/DeepStack<gh_stars>100-1000
import torch._C
import torch._jit_internal as _jit_internal
import torch.jit.annotations
import torch.testing
import torch.jit._recursive
from torch.jit._recursive import ScriptMethodStub, wrap_cpp_module
from torch.jit._builtins import _find_builtin, _get_built... | 46,552 |
904 | <gh_stars>100-1000
import logging
from django.db import migrations
from django.db import models
LOG = logging.getLogger(__name__)
def delete_empty_repositories(apps, schema_editor):
db_alias = schema_editor.connection.alias
Repository = apps.get_model('main', 'Repository')
qs = (
Repository.ob... | 350 |
527 | <gh_stars>100-1000
/*
* Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
* with the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or i... | 6,119 |
528 | from amaranth.sim.core import *
from amaranth.sim.core import __all__
import warnings
warnings.warn("instead of nmigen.sim.core, use amaranth.sim.core",
DeprecationWarning, stacklevel=2)
| 76 |
1,144 | package de.metas.procurement.base.order.impl;
import java.util.Iterator;
import org.adempiere.ad.trx.api.ITrx;
import org.adempiere.ad.trx.api.ITrxManager;
import org.compiere.util.TrxRunnableAdapter;
import de.metas.procurement.base.model.I_PMM_PurchaseCandidate;
import de.metas.util.Check;
import de.metas.util.Ser... | 904 |
3,200 | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... | 616 |
4,392 | #include "common.h"
#if defined(BFLOAT16) && defined(BFLOAT16CONVERSION)
static float
bfloat16tof32 (bfloat16 f16)
{
float result = 0;
unsigned short* q = (unsigned short*)(&result);
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
q[0] = f16;
#else
q[1] = f16;
#endif
return result;
}
#define BF16TOF32(x) (bfloat16... | 4,018 |
354 | <filename>scripts/build_caselists.py
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------
# drawElements Quality Program utilities
# --------------------------------------
#
# Copyright 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0... | 1,842 |
575 | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "gpu/command_buffer/service/shared_image_backing_gl_common.h"
#include "components/viz/common/resources/resource_format_utils.h"
#include "gpu/c... | 4,231 |
575 | <gh_stars>100-1000
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/media/key_system_support_impl.h"
#include <string>
#include <vector>
#include "base/logging.h"
#include "ba... | 1,754 |
344 | /**
* FXyzSampler_backup.java
*
* Copyright (c) 2013-2016, F(X)yz
* 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
* ... | 7,064 |
10,225 | <reponame>CraigMcDonaldCodes/quarkus
package org.jboss.resteasy.reactive.server;
import java.lang.reflect.Method;
import javax.ws.rs.container.ResourceInfo;
/**
* Type that can be injected into places where ResourceInfo can.
* The idea is that this can be used when a piece of code does not need access to the entire... | 518 |
815 | greeting = """
ParaView mini-test suite
=========================
This is a collection of verification and validate tests that
confirm that few core capabilities are working in this build.
The suite consists of several individual tests that can be launched
on their own as follows:
pvpython -m paraview.tests.verify... | 976 |
319 | <filename>target_firmware/magpie_fw_dev/target/inc/adf_os_lock.h
/*
* Copyright (c) 2013 Qualcomm Atheros, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the
* disclaimer below) provided that the follo... | 1,753 |
1,223 | <reponame>wiltonlazary/Nidium<gh_stars>1000+
# Copyright 2016 Nidium Inc. All rights reserved.
# Use of this source code is governed by a MIT license
# that can be found in the LICENSE file.
{
'targets': [{
'target_name': 'libnidiumcore-includes',
'type': 'none',
'direct_dependent_settings'... | 3,992 |
302 | #include "iscriptmultiworkerreportdata.h"
#include "every_cpp.h"
namespace BrowserAutomationStudioFramework
{
IScriptMultiWorkerReportData::IScriptMultiWorkerReportData(QObject *parent) :
QObject(parent)
{
}
}
| 82 |
372 | <gh_stars>100-1000
/*
* 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 ... | 1,235 |
648 | <gh_stars>100-1000
/*
* Copyright 2016-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* U... | 1,823 |
1,442 | <filename>apps/sequence/values/interval_parameter_controller.h
#ifndef SEQUENCE_INTERVAL_PARAM_CONTROLLER_H
#define SEQUENCE_INTERVAL_PARAM_CONTROLLER_H
#include "../../shared/interval_parameter_controller.h"
namespace Sequence {
class IntervalParameterController : public Shared::IntervalParameterController {
public... | 146 |
30,023 | """Support for fetching Vulcan data."""
async def get_lessons(client, date_from=None, date_to=None):
"""Support for fetching Vulcan lessons."""
changes = {}
list_ans = []
async for lesson in await client.data.get_changed_lessons(
date_from=date_from, date_to=date_to
):
temp_dict = ... | 1,912 |
1,088 | <reponame>amznero/graph-learn
/* Copyright 2020 Alibaba Group Holding Limited. 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
Unles... | 693 |
1,338 | /*
FUSE: Filesystem in Userspace
Copyright (C) 2001-2007 <NAME> <<EMAIL>>
This program can be distributed under the terms of the GNU LGPLv2.
See the file COPYING.LIB
*/
#ifndef USERLAND_FS_FUSE_CONFIG_H
#define USERLAND_FS_FUSE_CONFIG_H
#include "fuse_api.h"
struct fuse_config {
unsigned int uid;
unsigne... | 372 |
679 | <reponame>Grosskopf/openoffice
/**************************************************************
*
* 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... | 1,504 |
14,668 | <gh_stars>1000+
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/constants/ash_features.h"
#include "ash/constants/ash_pref_names.h"
#include "ash/public/cpp/shelf_prefs.h"
#include "base/n... | 4,379 |
1,402 | /* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: <NAME>, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* ------------... | 2,156 |
402 | <gh_stars>100-1000
/*
* Copyright 2000-2021 <NAME>.
*
* 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 l... | 721 |
488 | // Example code from Xen.
#define ADD_BRACE 0
int foobar()
{
if (1)
{
switch (42)
{
default:
#if ADD_BRACE
{
#endif
return ( {
int x;
x = 0;
... | 338 |
1,031 | <reponame>kyletanyag/LL-Smartcard
#include "ccache_swig_config.h"
#define CCACHE_VERSION SWIG_VERSION
#ifndef _WIN32
#include "config.h"
#else
#include <sys/locking.h>
#include "config_win32.h"
#endif
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/ty... | 1,879 |
489 | <reponame>TheBoringBakery/Riot-Watcher
from unittest.mock import MagicMock
import pytest
from riotwatcher._apis.team_fight_tactics import SummonerApi
@pytest.mark.tft
@pytest.mark.unit
class TestSummonerApi:
def test_by_account(self):
mock_base_api = MagicMock()
expected_return = object()
... | 1,382 |
1,418 | package aima.core.logic.fol.inference.proof;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import aima.core.logic.fol.kb.data.Chain;
import aima.core.logic.fol.parsing.ast.Term;
import aima.core.logic.fol.parsing.ast.Variable;
/**
* @author <NAME>... | 467 |
348 | <filename>docs/data/t2/076/76694.json<gh_stars>100-1000
{"nom":"Tocqueville-en-Caux","dpt":"Seine-Maritime","inscrits":113,"abs":18,"votants":95,"blancs":7,"nuls":3,"exp":85,"res":[{"panneau":"2","voix":52},{"panneau":"1","voix":33}]} | 104 |
348 | {"nom":"Saint-Roch","circ":"5ème circonscription","dpt":"Indre-et-Loire","inscrits":953,"abs":500,"votants":453,"blancs":48,"nuls":7,"exp":398,"res":[{"nuance":"REM","nom":"<NAME>","voix":248},{"nuance":"LR","nom":"<NAME>","voix":150}]} | 94 |
5,964 | #ifndef V8_TORQUE_ARGUMENTS_FROM_DSL_BASE_H__
#define V8_TORQUE_ARGUMENTS_FROM_DSL_BASE_H__
#include "src/compiler/code-assembler.h"
#include "src/code-stub-assembler.h"
#include "src/utils.h"
#include "torque-generated/class-definitions-from-dsl.h"
namespace v8 {
namespace internal {
class ArgumentsBuiltinsFromDSLA... | 465 |
678 | <gh_stars>100-1000
/**
* This header is generated by class-dump-z 0.2b.
*
* Source: /System/Library/PrivateFrameworks/iAdCore.framework/iAdCore
*/
#import <iAdCore/XXUnknownSuperclass.h>
@class NSMutableArray, NSString, ADLogMetaData;
@interface ADLogAdContentErrorRequest : XXUnknownSuperclass {
ADLogMetaData *... | 1,479 |
1,309 | <gh_stars>1000+
#include "perftest.h"
// This file is for giving the performance characteristics of the platform (compiler/OS/CPU).
#if TEST_PLATFORM
#include <cmath>
#include <fcntl.h>
// Windows
#ifdef _WIN32
#include <windows.h>
#endif
// UNIX
#if defined(unix) || defined(__unix__) || defined(__u... | 1,709 |
3,170 | //
// DynamicStruct.h
//
// $Id: //poco/Main/Foundation/include/Poco/DynamicStruct.h#9 $
//
// Library: Foundation
// Package: Dynamic
// Module: Struct
//
// Forward header for Struct class to maintain backward compatibility.
//
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
// and Contributors... | 171 |
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,196 |
432 | /* mpc_acos -- arccosine of a complex number.
Copyright (C) 2009, 2010, 2011, 2012 INRIA
This file is part of GNU MPC.
GNU MPC is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 3 of the Lice... | 4,565 |
1,556 | def warn(msg, cat=None, stacklevel=1):
print("%s: %s" % ("Warning" if cat is None else cat.__name__, msg))
| 44 |
672 | <filename>velox/experimental/codegen/Codegen.cpp<gh_stars>100-1000
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://... | 1,900 |
5,079 | from __future__ import absolute_import, unicode_literals
from case import skip
from celery.utils.sysinfo import df, load_average
@skip.unless_symbol('os.getloadavg')
def test_load_average(patching):
getloadavg = patching('os.getloadavg')
getloadavg.return_value = 0.54736328125, 0.6357421875, 0.69921875
... | 223 |
3,651 | package com.orientechnologies.orient.client.remote.message;
import com.orientechnologies.orient.client.remote.OBinaryResponse;
import com.orientechnologies.orient.client.remote.OStorageRemoteSession;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.serialization.... | 486 |
378 | package com.github.kayvannj.permission_utils;
public abstract class Func2{
protected abstract void call(int requestCode, String permissions[], int[] grantResults);
}
| 49 |
2,637 | <reponame>nateglims/amazon-freertos<filename>vendors/st/stm32l475_discovery/BSP/Components/lis3mdl/lis3mdl.c<gh_stars>1000+
/**
******************************************************************************
* @file lis3mdl.c
* @author MCD Application Team
* @version V1.0.0
* @date 14-February-2017
* @brief... | 2,621 |
2,446 | /*
Copyright (C) 2016 Apple Inc. All Rights Reserved.
See LICENSE.txt for this sample’s licensing information
Abstract:
We define some custom atomics to be used the network so seperate threads at end of commandBuffers can safely increment.
*/
#ifndef atomics_h
#define atomics_h
#import <stdatomic... | 159 |
1,178 | # Copyright 2020 Makani Technologies LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,584 |
639 | //*****************************************************************************
// Copyright 2017-2020 Intel 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://w... | 1,434 |
308 | package org.getopentest.selenium;
import org.getopentest.selenium.core.SeleniumTestAction;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
public class AssertCssProperty extends SeleniumTestAction {
@Override
public void run() {
super.run();
By locator = this.readLocato... | 422 |
575 | #!/usr/bin/env python
# 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.
"""code generator for webgpu command buffers."""
import filecmp
import os
import os.path
import sys
from optparse import OptionParser
... | 2,379 |
2,061 | # -*- coding: utf-8 -*-
from macropy.core.macros import Macros
from macropy.core.hquotes import macros, hq, u, ast_literal
macros = Macros() # noqa: F811
@macros.expr
def log(tree, exact_src, **kw):
new_tree = hq[wrap(u[exact_src(tree)], ast_literal[tree])]
return new_tree
def wrap(txt, x):
print(txt ... | 154 |
6,098 | from __future__ import print_function
import sys
sys.path.insert(1,"../../")
import h2o
from tests import pyunit_utils
from h2o.transforms.preprocessing import H2OScaler
from h2o.estimators.random_forest import H2ORandomForestEstimator
from sklearn.pipeline import Pipeline
from sklearn.model_selection import Randomize... | 1,932 |
577 | <gh_stars>100-1000
"""generate code for exceptions and for the types module"""
template1 = ' %(name)s = new PyString("%(name)s");'
template2 = ' dict.__setitem__("%(name)s", Py.%(name)s);'
template3 = '''\
%(name)s = new PyTuple(new PyObject[]
{%(values)s});
'''
template4 = '''\
... | 870 |
794 | <filename>android/modules/module_ops/src/main/java/github/tornaco/thanos/android/ops/model/OpGroup.java<gh_stars>100-1000
package github.tornaco.thanos.android.ops.model;
import androidx.annotation.NonNull;
import java.util.List;
public class OpGroup implements Comparable<OpGroup> {
private OpsTemplate opsTempla... | 386 |
4,879 | #include "generator/mwm_diff/diff.hpp"
#include "coding/buffered_file_writer.hpp"
#include "coding/file_reader.hpp"
#include "coding/file_writer.hpp"
#include "coding/reader.hpp"
#include "coding/write_to_sink.hpp"
#include "coding/writer.hpp"
#include "coding/zlib.hpp"
#include "base/assert.hpp"
#include "base/cance... | 1,858 |
330 | <filename>runners/image_editing.py
import os
import numpy as np
from tqdm import tqdm
import torch
import torchvision.utils as tvu
from models.diffusion import Model
from functions.process_data import *
def get_beta_schedule(*, beta_start, beta_end, num_diffusion_timesteps):
betas = np.linspace(beta_start, beta... | 3,270 |
1,600 | <filename>chapter-07/recipe-04/cxx-example/src/main.cpp
../../../../chapter-04/recipe-02/cxx-example/main.cpp | 44 |
677 | <gh_stars>100-1000
{
"resourceType": "ValueSet",
"id": "us-core-narrative-status",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h2>Narrative Status</h2><div><p>This value set limits the text status for the resource narrative.</p>\n</div><p><b>Copyrig... | 1,285 |
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,126 |
778 | <gh_stars>100-1000
#ifndef VEXCL_SPARSE_MATRIX_HPP
#define VEXCL_SPARSE_MATRIX_HPP
#include <vexcl/sparse/ell.hpp>
#include <vexcl/sparse/csr.hpp>
namespace vex {
namespace sparse {
template <typename Val, typename Col = int, typename Ptr = Col>
class matrix {
public:
typedef Val value_type;
typ... | 2,800 |
2,360 | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyPyopencl(PythonPackage):
"""Python wrapper for OpenCL."""
homepage = "https://docu... | 561 |
640 | import readchar
class Event(object):
pass
class KeyPressed(Event):
def __init__(self, value):
self.value = value
class Repaint(Event):
pass
class KeyEventGenerator(object):
def __init__(self, key_generator=None):
self._key_gen = key_generator or readchar.readkey
def next(sel... | 144 |
4,612 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Commands for reporting test success of failure to the manager.
@since: 12.3
"""
from twisted.protocols.amp import Boolean, Command, ListOf, Unicode
NativeString = Unicode
class AddSuccess(Command):
"""
Add a success.
"""
... | 672 |
794 | package github.tornaco.android.thanos.widget;
import android.annotation.SuppressLint;
import android.content.Context;
import android.util.TypedValue;
import androidx.annotation.NonNull;
import androidx.annotation.StyleRes;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.AppCompatEditText;
... | 636 |
521 | /* $Id: scsiinline.h $ */
/** @file
* VirtualBox: SCSI inline helpers used by devices, drivers, etc.
*/
/*
* Copyright (C) 2006-2017 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute... | 2,851 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.