max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
3,682 | from django.views import generic
from django.contrib.gis.geos import Point
from django.contrib.gis.db.models.functions import Distance
from .models import Shop
longitude = -80.191_788
latitude = 25.761_681
user_location = Point(longitude, latitude, srid=4326)
class Home(generic.ListView):
model = Shop
conte... | 195 |
5,169 | <reponame>Gantios/Specs
{
"name": "CGGeometry_YJ",
"version": "0.1.1",
"summary": "CGGeometry_YJ is the CGGeometry extension for resizing and positioning calculation.",
"description": "CGGeometry_YJ is the CGGeometry extension for resizing and positioning calculation. Using CGGeometry_YJ is similar to UIView's ... | 273 |
2,174 | <gh_stars>1000+
package com.gaoxi.req;
/**
* @author 大闲人柴毛毛
* @date 2017/10/31 下午7:42
* @description 查询请求
*/
public class QueryReq extends AbsReq {
/** 页码 */
protected int page = 1;
/** 每页显示的条数 */
protected int numPerPage = 10;
//当前行号
protected int currentPage;
public int getCurrent... | 325 |
14,668 | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/viz/common/surfaces/scoped_surface_id_allocator.h"
#include <utility>
#include "components/viz/common/surfaces/parent_local_surface... | 678 |
2,322 | <reponame>metoo10987/wine<gh_stars>1000+
/*
* Program Manager
*
* Copyright 1996 <NAME>
*
* This library 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 2.1 of the License, or (... | 4,030 |
703 | #pragma once
#include <EditorEngineProcessFramework/EngineProcess/EngineProcessDocumentContext.h>
#include <EnginePluginAssets/EnginePluginAssetsDLL.h>
#include <RendererCore/Declarations.h>
#include <RendererCore/Meshes/MeshResource.h>
class ezObjectSelectionMsgToEngine;
class ezRenderContext;
class EZ_EN... | 442 |
332 | /*
Copyright (c) 2016-2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: <NAME>, <NAME>
*/
#pragma once
#include <string>
namespace lean {
std::string remove_cr(std::string const & str);
bool equal_upto_cr(std::string const & a, std::string co... | 104 |
892 | <reponame>westonsteimel/advisory-database-github
{
"schema_version": "1.2.0",
"id": "GHSA-wf6v-m5v4-phr8",
"modified": "2022-04-29T01:26:21Z",
"published": "2022-04-29T01:26:21Z",
"aliases": [
"CVE-2003-0395"
],
"details": "Ultimate PHP Board (UPB) 1.9 allows remote attackers to execute arbitrary PHP ... | 426 |
1,168 | // Checks that we correctly record instantiates edges for total specs.
//- @s_equals_float defines/binding PrimaryT
template <typename S> bool s_equals_float = false;
//- @s_equals_float defines/binding TotalT
template <> bool s_equals_float<float> = true;
//- @s_equals_float ref TotalT
//- TotalT instantiates PrimaryT... | 141 |
2,757 | /*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | 715 |
345 | import tensorflow as tf
import math
def fully_connected(input_, output_nodes, name, stddev=0.02):
with tf.variable_scope(name):
input_shape = input_.get_shape()
input_nodes = input_shape[-1]
w = tf.get_variable('w', [input_nodes, output_nodes],
initializer=tf.truncated_normal_i... | 1,626 |
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 ... | 937 |
348 | {"nom":"Victoria","circ":"10ème circonscription","dpt":"Français établis hors de France","inscrits":373,"abs":307,"votants":66,"blancs":3,"nuls":0,"exp":63,"res":[{"nuance":"REM","nom":"<NAME>","voix":39},{"nuance":"LR","nom":"<NAME>","voix":24}]} | 93 |
1,116 | import os
import shutil
from .. import run_nbgrader
from .base import BaseTestApp
class TestNbGraderQuickStart(BaseTestApp):
def test_help(self):
"""Does the help display without error?"""
run_nbgrader(["quickstart", "--help-all"])
def test_no_course_id(self):
"""Is the help display... | 2,032 |
1,010 | /*
* Copyright (c) 2008-2021, Hazelcast, 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 ... | 1,209 |
457 | """tests for path module"""
| 7 |
4,054 | // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "fusionspec.h"
#include <vespa/searchlib/common/serialnum.h>
#include <vespa/vespalib/stllike/string.h>
namespace searchcorespi {
namespace index {
/**
* Utility class with functions to rea... | 191 |
5,169 | <reponame>Gantios/Specs
{
"name": "testFramework_eldhojohnson",
"version": "0.0.3",
"summary": "Lenddo SDK is used for company testing purposes.",
"description": "Lenddo SDK is used for company testing purposes. Find more details at https://github.com/eldhojohnson/testFramework",
"homepage": "https://github.c... | 262 |
372 | /*-----------------------------------------------------------------------------
* $RCSfile: ShSvPlaceOrder.c,v $
*
* See Copyright for the status of this software.
*
* The OpenSOAP Project
* http://opensoap.jp/
*-----------------------------------------------------------------------------
*/
#include "ShSvPlac... | 1,390 |
12,718 | /* termios c_cc symbolic constant definitions. Linux/powerpc version.
Copyright (C) 2019-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as p... | 426 |
569 | // Copyright 2019 DeepMind Technologies Limited.
//
// 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... | 1,552 |
615 | <reponame>ashutom/tensorflow-upstream<gh_stars>100-1000
/* Copyright 2015 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/lice... | 652 |
542 | <reponame>pecuniafinance/hummingbot
import asyncio
import json
import re
import unittest
from decimal import Decimal
from typing import Any, Awaitable, Dict, List
from unittest.mock import AsyncMock, patch
from aioresponses.core import aioresponses
from bidict import bidict
import hummingbot.connector.derivative.bina... | 12,072 |
1,144 | <gh_stars>1000+
package de.metas.material.planning.ddorder;
import org.eevolution.model.I_PP_Product_Planning;
import org.springframework.stereotype.Service;
import de.metas.material.planning.IMaterialDemandMatcher;
import de.metas.material.planning.IMaterialPlanningContext;
import de.metas.util.Loggables;
/*
* #%L... | 631 |
348 | <gh_stars>100-1000
{"nom":"Francarville","dpt":"Haute-Garonne","inscrits":128,"abs":23,"votants":105,"blancs":21,"nuls":1,"exp":83,"res":[{"panneau":"1","voix":54},{"panneau":"2","voix":29}]} | 80 |
3,967 | <reponame>cyyever/DALI<filename>dali/kernels/common/split_shape.h<gh_stars>1000+
// Copyright (c) 2021, NVIDIA CORPORATION & 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.
// You may obtain a copy... | 1,631 |
839 | /**
* 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 m... | 3,456 |
324 | <filename>apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/options/ListOptions.java
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regardi... | 943 |
14,668 | <reponame>zealoussnow/chromium
// 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 "gpu/config/gpu_info_collector.h"
// C system before C++ system.
#include <stddef.h>
#include <stdint.h>
// ... | 12,272 |
488 | <filename>src/3rdPartyLibraries/libharu-2.1.0/demo/link_annotation.c
/*
* << Haru Free PDF Library 2.0.0 >> -- link_annotation.c
*
* Copyright (c) 1999-2006 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee... | 3,135 |
310 | {
"name": "LERBERG",
"description": "Table let trestles.",
"url": "https://www.ikea.com/gb/en/p/lerberg-trestle-grey-80130776/"
}
| 60 |
3,307 | <reponame>ruyimarone/dynet<filename>dynet/nodes-minmax.cc
#include "dynet/tensor-eigen.h"
#include "dynet/nodes-minmax.h"
#include "dynet/nodes-impl-macros.h"
#include "dynet/functors.h"
using namespace std;
namespace dynet {
// ************* Min *************
#ifndef __CUDACC__
string Min::as_string(const vector... | 4,628 |
6,958 | <gh_stars>1000+
//
// NPUActivation.cpp
// MNN
//
// Created by MNN on 2019/09/19.
// Copyright © 2018, Alibaba Group Holding Limited
//
#include "NPUActivation.hpp"
#include "NPUBackend.hpp"
using namespace std;
namespace MNN {
NPUActivation::NPUActivation(Backend *b, const Op *op, const std::vector<Tensor *> ... | 1,459 |
326 | <gh_stars>100-1000
from typing import TYPE_CHECKING, DefaultDict, Dict
from collections import Counter, defaultdict, OrderedDict
from itertools import chain
from pydfs_lineup_optimizer.player import LineupPlayer
if TYPE_CHECKING:
from pydfs_lineup_optimizer.lineup_optimizer import LineupOptimizer
class Statisti... | 1,443 |
640 | <reponame>pearldrift/react-native-pearldrift-image-picker<gh_stars>100-1000
#if __has_include("RCTBridgeModule.h")
#import "RCTBridgeModule.h"
#else
#import <React/RCTBridgeModule.h>
#endif
#import <UIKit/UIKit.h>
#import "TZImagePickerController.h"
@interface RNSyanImagePicker : NSObject <RCTBridgeModule, TZImagePick... | 159 |
14,668 | // 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 "chrome/browser/ui/views/payments/validating_combobox.h"
#include <utility>
#include "ui/base/models/combobox_model.h"
namespace payments {
V... | 523 |
1,656 | /*
* Copyright 2013-2021 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
*
* Unless required by a... | 384 |
809 | <filename>src/include/net/util/hostent.h
/**
* @file
* @brief Useful functions for manipulations with a hostent structure
*
* @date 20.08.12
* @author <NAME>
*/
#ifndef NET_UTIL_HOSTENT_API_H_
#define NET_UTIL_HOSTENT_API_H_
#include <netdb.h>
extern struct hostent * hostent_create(void);
extern int hostent_se... | 263 |
1,338 | /*
* Copyright 2007-2014 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _BEEP_H
#define _BEEP_H
#include <BeBuild.h>
#include <SupportDefs.h>
#ifdef __cplusplus
// These functions are only exported for C++
status_t beep();
status_t system_beep(const char* eventName... | 157 |
329 | <filename>java/src/main/java/com/cloudera/api/v4/ServicesResourceV4.java
// Licensed to Cloudera, Inc. under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. Cloudera, Inc. licenses this file
// to you under t... | 3,369 |
336 | <filename>system/apps_featured/test63_ws2812/source/SPI_ds203.cpp
#if defined(DS203) || defined(DS213)
#include <library.h>
#include "SPI.h"
CSPI SPI;
void CSPI::begin()
{
BIOS::DAC::SetMode(BIOS::DAC::EMode::LogicLow, nullptr, 0);
}
void CSPI::end()
{
}
void CSPI::setClockDivider(int clockDivider)
{
}
void CSP... | 1,010 |
1,040 | <filename>OCExample/OCExample/View/TestTableViewCell.h
//
// TestTableViewCell.h
// OCExample
//
// Created by 高刘通 on 2018/4/18.
// Copyright © 2018年 LT. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TestTableViewCell : UITableViewCell
+ (instancetype)cellWithTableView:(UITableView *)tableView;
@en... | 123 |
1,163 | <filename>iree/compiler/Dialect/Util/Analysis/DFX/DepGraph.cpp
// Copyright 2021 The IREE Authors
//
// Licensed 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-exception
#include "iree/compiler/Dialect/Ut... | 652 |
1,931 | {
"extends": "../../tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"noEmit": false,
"emitDeclarationOnly": true,
"skipLibCheck": false
},
"files": ["src/en/messages.js"]
}
| 98 |
348 | {"nom":"Vertheuil","circ":"5ème circonscription","dpt":"Gironde","inscrits":882,"abs":540,"votants":342,"blancs":41,"nuls":20,"exp":281,"res":[{"nuance":"SOC","nom":"<NAME>","voix":146},{"nuance":"REM","nom":"<NAME>","voix":135}]} | 91 |
575 | <reponame>mghgroup/Glide-Browser
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import base64
import json
import unittest
from blinkpy.common.host_mock import MockHost
from blinkpy.w3c.chromium_commit_mo... | 9,019 |
645 | <gh_stars>100-1000
package monkeylord.XServer.handler;
import java.io.Console;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import java.util.regex.Pattern;
import monkeylord.XServer.XServer;
import monkeylord.XServer.objectparser.GenericParser;
import monkeylord.XServer.objectparser.Stored... | 871 |
435 | from __future__ import absolute_import, print_function, division
from petl.test.failonerror import assert_failonerror
from petl.test.helpers import ieq
from petl.transform.conversions import convert, convertall, convertnumbers, \
replace, update, format, interpolate
from functools import partial
def test_conve... | 5,887 |
8,454 | <filename>UltimateRecyclerView/ultimaterecyclerview/src/main/java/com/marshalchen/ultimaterecyclerview/quickAdapter/extBaseAdapter/QuickAdapter.java
package com.marshalchen.ultimaterecyclerview.quickAdapter.extBaseAdapter;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
impo... | 915 |
30,023 | """Test button of ONVIF integration."""
from unittest.mock import AsyncMock
from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, ButtonDeviceClass
from homeassistant.const import ATTR_DEVICE_CLASS, ATTR_ENTITY_ID, STATE_UNKNOWN
from homeassistant.helpers import entity_registry as er
from . import MAC,... | 501 |
307 | /*
*********************************************************************************************************
*
* 模块名称 : 电压表
* 文件名称 : status_voltage_meter.h
*
*********************************************************************************************************
*/
#ifndef _STATUS_VOLTAGE_METER_H_
#de... | 167 |
2,996 | // Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.engine.rendering.assets.shader;
/**
* TODO: write javadoc
*/
public enum ParamType {
sampler2D(true),
samplerCube(true);
private boolean texture;
ParamType(boolean texture) {
this.text... | 152 |
571 | <filename>ufora/FORA/Native/TypedNativeExpressionIntegerBehaviors.hpp
/***************************************************************************
Copyright 2015 Ufora Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You m... | 384 |
854 | <filename>solutions/LeetCode/C++/13.cpp
__________________________________________________________________________________________________
12ms
static int x=[](){
std::ios::sync_with_stdio(false);
cin.tie(NULL);
return 0;
}();
class Solution {
public:
int romanToInt(string &s) {
int num[26] = ... | 4,002 |
317 | //
// test-HeaderParser.cc
// snowcrash
//
// Created by <NAME> on 5/22/13.
// Copyright (c) 2013 Apiary Inc. All rights reserved.
//
#include "snowcrashtest.h"
#include "HeadersParser.h"
using namespace snowcrash;
using namespace snowcrashtest;
const mdp::ByteBuffer HeadersFixture
= "+ Headers\n"
"\n"... | 6,771 |
2,002 | <filename>dev/Common/AppModel.Package.h<gh_stars>1000+
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
#ifndef __APPMODEL_PACKAGE_H
#define __APPMODEL_PACKAGE_H
#include <appmodel.h>
namespace AppModel::... | 680 |
432 | <reponame>lambdaxymox/DragonFlyBSD<gh_stars>100-1000
/*-
* Copyright (c) 2012 <NAME> <<EMAIL>>
* 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 ret... | 1,188 |
381 | # load __future__.py constants
def load_module():
from pypy.tool.lib_pypy import LIB_PYTHON
module_path = LIB_PYTHON.join('__future__.py')
execfile(str(module_path), globals())
load_module()
del load_module
# this could be generalized, it's also in opcode.py
| 105 |
8,679 | /*
* Copyright (C) 2011 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed... | 4,220 |
423 | <filename>services/src/main/java/io/scalecube/services/routing/RoundRobinServiceRouter.java<gh_stars>100-1000
package io.scalecube.services.routing;
import io.scalecube.services.ServiceReference;
import io.scalecube.services.api.ServiceMessage;
import io.scalecube.services.registry.api.ServiceRegistry;
import java.uti... | 416 |
824 | <filename>doc/tutorials/gpu_particle_burst/gpu_particle_burst_04.py
"""
Example showing how to create particle explosions via the GPU.
"""
import random
import time
import math
from array import array
from dataclasses import dataclass
import arcade
import arcade.gl
SCREEN_WIDTH = 1024
SCREEN_HEIGHT = 768
SCREEN_TITLE ... | 1,382 |
8,027 | """ IGNORED DOCSTRING """
def get_suffix(symbol, default):
return native.implicit_package_symbol(symbol, default)
| 41 |
1,013 | /*!
@authors <NAME> (<EMAIL>)
@date 2014-2020
@copyright BSD-3-Clause
*/
#include <gtest/gtest.h>
#include <pyclustering/interface/cure_interface.h>
#include <pyclustering/interface/pyclustering_package.hpp>
#include "samples.hpp"
#include "utenv_utils.hpp"
#include "utenv_check.hpp"
#include <me... | 771 |
1,802 | <reponame>fossabot/swift-1
# Copyright (c) 2014 OpenStack Foundation
#
# 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 a... | 5,109 |
3,372 | <gh_stars>1000+
/*
* Copyright 2016-2021 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
*
* ... | 1,634 |
536 | <reponame>Han0nly/jazzer
// Copyright 2021 Code Intelligence GmbH
//
// 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... | 463 |
318 | <gh_stars>100-1000
#ifndef _GEPDEFS_H
#define _GEPDEFS_H
#define CODE_WIN32 1
#define CODE_DC 2
#define CODE_PS2 3
#define CODE_XBOX 4
#endif
| 86 |
373 | <filename>src/main/java8/net/finmath/timeseries/models/parametric/DisplacedLognormal.java
/*
* (c) Copyright <NAME>, Germany. Contact: <EMAIL>.
*
* Created on 15.07.2012
*/
package net.finmath.timeseries.models.parametric;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import org.a... | 4,873 |
492 | from fastapi import FastAPI
from pydantic import BaseModel
from tortoise import fields
from tortoise.models import Model
from tortoise.contrib.fastapi import register_tortoise
from tortoise.contrib.pydantic import pydantic_model_creator
import requests
import aiohttp
import asyncio
app = FastAPI()
session = None
... | 860 |
315 | #include "Tools/Code/LDPC/Update_rule/OMS/Update_rule_OMS_simd.hpp"
namespace aff3ct
{
namespace tools
{
template <typename R>
Update_rule_OMS_simd<R>
::Update_rule_OMS_simd(const R offset)
: name("OMS"), offset(offset), MS()
{
}
template <typename R>
inline std::string Update_rule_OMS_simd<R>
::get_name() const
{
r... | 827 |
3,172 | <reponame>lp2333/PARL
# Copyright (c) 2018 PaddlePaddle 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
#
# ... | 3,404 |
12,252 | /*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* 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.apa... | 1,344 |
349 | #include <pal.h>
/**
* Computes a interpolating FIR filter (direct-form) on input data 'x' using
* coefficient stored in 'h' and places result in 'r'. This function
* retains the address of the delay filter memory containing the previous
* delayed values to allow consecutive processing of blocks.
*
* @param x ... | 309 |
1,290 | <reponame>dfirpaul/Active-Directory-Exploitation-Cheat-Sheet-1
/*
* This software is Copyright (c) 2018 magnum,
* and it is hereby released to the general public under the following terms:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted.
*
* Fast, portable, and e... | 18,783 |
357 | <filename>vmafd/interop/python/cdcclient.py
#
# Copyright (C) 2012-2015 VMware, 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/LICE... | 744 |
820 | <reponame>kubajir/msticpy<filename>tests/datamodel/test_pivot_register.py
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------... | 4,655 |
596 | <gh_stars>100-1000
#include "flightlib/sensors/rgb_camera.hpp"
namespace flightlib {
RGBCamera::RGBCamera()
: channels_(3),
width_(720),
height_(480),
fov_{70.0},
depth_scale_{0.2},
enabled_layers_({false, false, false}) {}
RGBCamera::~RGBCamera() {}
bool RGBCamera::feedImageQueue(const int im... | 1,974 |
14,668 | // Copyright 2013 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_URL_MATCHER_REGEX_SET_MATCHER_H_
#define COMPONENTS_URL_MATCHER_REGEX_SET_MATCHER_H_
#include <map>
#include <memory>
#include <set>
#... | 815 |
11,356 | <filename>mlmodel/build/format/ItemSimilarityRecommender.pb.cc
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ItemSimilarityRecommender.proto
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "ItemSimilarityRecommender.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/com... | 25,162 |
411 | volume = 5 * 16.5 * 12.5
area = 10*16.5 + 10*12.5 + 2*16.5*12.5
print('volume =', volume)
print('area =', area)
| 52 |
473 | <filename>django_comments_xtd/utils.py
# Idea borrowed from Selwin Ong post:
# http://ui.co.id/blog/asynchronous-send_mail-in-django
from copy import copy
import hashlib
try:
import Queue as queue # python2
except ImportError:
import queue as queue # python3
import threading
try:
from urllib.parse import... | 1,614 |
5,813 | /*
* 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 ... | 1,621 |
335 | <filename>S/Scaffolding_noun.json
{
"word": "Scaffolding",
"definitions": [
"A temporary structure on the outside of a building, made of wooden planks and metal poles, used by workmen while building, repairing, or cleaning the building.",
"The materials used in scaffolding."
],
"parts-of... | 116 |
354 | <filename>execserver/xsPosixFileReader.cpp
/*-------------------------------------------------------------------------
* drawElements Quality Program Execution Server
* ---------------------------------------------
*
* Copyright 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2... | 961 |
1,001 | # 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 may not u... | 871 |
575 | # A server used to store and retrieve arbitrary data.
# This is used by: ./dispatcher.js
def main(request, response):
response.headers.set(b'Access-Control-Allow-Origin', b'*')
response.headers.set(b'Access-Control-Allow-Methods', b'OPTIONS, GET, POST')
response.headers.set(b'Access-Control-Allow-Headers', ... | 430 |
12,278 | // Copyright <NAME> 2013-2017
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
#include <boost/hana/string.hpp>
namespace hana = boost::hana;
int main() {
using Str = decltype(hana::string_c<'a', 'b', 'c', 'd'>);
S... | 134 |
608 | <gh_stars>100-1000
#pragma once
#include <memory>
#include <string>
#include <torch/torch.h>
#include <torch/script.h>
class TorchModelProp
{
public:
TorchModelProp(int prediction_dim, int feature_dim)
: mPredictionDim(prediction_dim), mFeatureDim(feature_dim)
{}
TorchModelProp()
: mPredictionD... | 548 |
855 | # -*- coding: utf-8 -*-
import django.dispatch
user_added = django.dispatch.Signal()
user_removed = django.dispatch.Signal()
invitation_accepted = django.dispatch.Signal()
owner_changed = django.dispatch.Signal()
| 82 |
2,224 | import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import re
import os
sns.set(style='darkgrid')
def get_info(filename):
filename = filename.replace('.npy', '') # remove .npy
algo, env, seed = re.split('_', filename)
seed = int(seed)
return algo, env, seed
de... | 624 |
627 | <gh_stars>100-1000
#ifndef __D3D9_IMPL_H__
#define __D3D9_IMPL_H__
#include "shared.h"
namespace impl
{
namespace d3d9
{
void init();
}
}
#endif // __D3D9_IMPL_H__ | 92 |
32,544 | package com.baeldung.objectclass;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.Ignore;
import org.junit.Test;
public class CreditAppUnitTest {
... | 1,120 |
738 | #include <iostream>
#include <vector>
#include <algorithm>
#define pb push_back
#define mp make_pair
#define st first
#define nd second
#define lli long long int
using namespace std;
int lis(vector<int> arr) {
if(arr.empty()) return 0;
int len = arr.size(), answer = 1;
for(int i=0; i < len; i++) {
ve... | 433 |
4,538 | <gh_stars>1000+
#ifndef __NET_DUMP_H__
#define __NET_DUMP_H__
#ifdef __cplusplus
extern "C" {
#endif
typedef void *net_dump_handle_t;
int net_dump_connect(net_dump_handle_t net_dump_t,char *server_addr,int port);
void net_dump_disconnect(net_dump_handle_t net_dump_t);
int net_dump_data(net_dump_handle_t net_dump_t,c... | 295 |
578 | <reponame>lllrrr2/bk-job<filename>src/backend/commons/common-k8s/src/main/java/com/tencent/bk/job/common/k8s/provider/K8SServiceInfoProvider.java<gh_stars>100-1000
/*
* Tencent is pleased to support the open source community by making BK-JOB蓝鲸智云作业平台 available.
*
* Copyright (C) 2021 THL A29 Limited, a Tencent compan... | 2,907 |
494 | <gh_stars>100-1000
/*******************************************************************************
* Copyright 2011 Netflix
*
* 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
*
* htt... | 1,871 |
2,226 | # Copyright (c) OpenMMLab. All rights reserved.
from .roi_embed_head import RoIEmbedHead
from .roi_track_head import RoITrackHead
from .siamese_rpn_head import CorrelationHead, SiameseRPNHead
__all__ = ['CorrelationHead', 'SiameseRPNHead', 'RoIEmbedHead', 'RoITrackHead']
| 98 |
411 | <reponame>kachinc/documents4j
package com.documents4j.demo;
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator;
import org.apache.wicket.extensions.markup.html.repeater.data.table.*;
import org.apache.wicket.markup.repeater.data.IDataProvider;
import org.apache.wicket.model.Model;
im... | 503 |
394 | <gh_stars>100-1000
package com.bugtag.networkapp.volley;
import android.util.Log;
import com.android.volley.AuthFailureError;
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.toolbox.HttpHe... | 1,072 |
572 | <gh_stars>100-1000
default_app_config = 'tests._testsite.apps.forum_conversation.apps.ForumConversationAppConfig'
| 40 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.