max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
875 | <reponame>qistout/GSLAM
#include <GSLAM/core/GSLAM.h>
using namespace GSLAM;
int run(Svar config){
std::string map=config.arg<std::string>("map","","eg. {\"name1.txt\":\"name1.txt\",\"2.txt\":\"2.txt\"}");
std::string cpp=config.arg<std::string>("cpp","resource.cpp","the output resource cpp");
if(config.... | 304 |
2,151 | // Protocol Buffers - Google's data interchange format
// Copyright 2013 Google Inc. All rights reserved.
// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistri... | 16,871 |
307 | <reponame>trgswe/fs2open.github.com<filename>code/network/multi_observer.h
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
... | 410 |
543 | package com.riiablo.engine.client;
import com.artemis.ComponentMapper;
import com.badlogic.gdx.Gdx;
import com.riiablo.codec.Animation;
import com.riiablo.codec.COF;
import com.riiablo.engine.Dirty;
import com.riiablo.engine.client.component.AnimationWrapper;
import com.riiablo.engine.server.event.TransformChangeEvent... | 522 |
492 | import os
with open('combined_output.txt', 'w') as fo:
files = os.listdir('journal')
for input_file in files:
with open(f'journal/{input_file}', 'r') as fi:
fo.write(f'-------------------{input_file}-------------------')
fo.write('\n')
fo.write(fi.read())
... | 166 |
550 | <gh_stars>100-1000
package com.google.android.apps.forscience.whistlepunk.metadata;
import androidx.annotation.VisibleForTesting;
import android.util.Log;
import com.google.android.apps.forscience.whistlepunk.MkrSciBleSensorAppearance;
import com.google.android.apps.forscience.whistlepunk.SensorAppearance;
import com.... | 870 |
335 | <filename>QuantExt/qle/calendars/israel.cpp
/*
Copyright (C) 2019 Quaternion Risk Management Ltd
All rights reserved.
This file is part of ORE, a free-software/open-source library
for transparent pricing and risk analysis - http://opensourcerisk.org
ORE is free software: you can redistribute it and/or modify it
... | 3,526 |
682 | <filename>worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/sponge/WriterUtil.java
/*
* WorldEdit, a Minecraft world manipulation toolkit
* Copyright (C) sk89q <http://www.sk89q.com>
* Copyright (C) WorldEdit team and contributors
*
* This program is free software: you can redistribute it and/or... | 1,368 |
4,081 | /*
* The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
* (the "License"). You may not use this work except in compliance with the License, which is
* available at www.apache.org/licenses/LICENSE-2.0
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDI... | 1,240 |
1,088 | <gh_stars>1000+
//
// CBLQuery+Internal.h
// CouchbaseLite
//
// Copyright (c) 2017 Couchbase, 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:/... | 1,478 |
659 | package co.infinum.goldfinger.crypto.impl;
import android.content.Context;
import android.os.Build;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
/**
* Unlocked Cipher factory which can be reused in the app if needed
* outside of Goldfinger flow.
* <p>
* Standard use case is PIN/Fin... | 244 |
335 | <filename>O/Oxygenate_verb.json
{
"word": "Oxygenate",
"definitions": [
"Supply, treat, charge, or enrich with oxygen."
],
"parts-of-speech": "Verb"
} | 80 |
471 | /////////////////////////////////////////////////////////////////////////////
// Name: src/osx/carbon/anybutton.cpp
// Purpose: wxAnyButton
// Author: <NAME>
// Created: 1998-01-01 (extracted from button.cpp)
// Copyright: (c) <NAME>
// Licence: wxWindows licence
//////////////////////////////... | 1,591 |
447 | <gh_stars>100-1000
import shutil
import torch
import torch.nn as nn
import torch.nn.functional as F
def inspect_checkpoint(ckpt_path):
if ckpt_path.exists():
print("=> loading checkpoint '{}'".format(ckpt_path))
checkpoint = torch.load(str(ckpt_path))
print("=> loaded checkpoint '{}' (epoc... | 432 |
1,417 | from datetime import timezone, datetime, timedelta
import logging
import os
import requests
CLUSTER_QUERY_STRING = "avg(avg_over_time(nvidiasmi_utilization_gpu[7d]))"
JOB_GPU_PERCENT = 'avg by (job_name) (avg_over_time(task_gpu_percent[7d]))'
JOB_GPU_HOURS = 'sum by (job_name) (count_over_time(task_gpu_percent[7d]))'
... | 4,288 |
344 | import logging
import re
import signal
import threading
from contextlib import contextmanager
from enum import Enum
from queue import Empty, Queue
from typing import List, Optional, Pattern, Tuple, Union, Callable
from ..protos.clearly_pb2 import PatternFilter, TaskMessage, WorkerMessage
from ..utils.data import accep... | 1,598 |
605 | <gh_stars>100-1000
package com.sohu.tv.mq.cloud.task.server.data;
import org.apache.commons.lang3.math.NumberUtils;
/**
* tcp连接
*
* @Description:
* @author yongfeigao
* @date 2018年7月18日
*/
public class Connection implements LineParser {
public static final String FLAG = "TCP";
// 链接数量
... | 687 |
11,864 | #ifndef _P_UART_H
#define _P_UART_H
#include "peripherals/base.h"
#define UART_BASE (PBASE + 0x201000)
#define UART_DR_REG (UART_BASE + 0x0) // Data Register
#define UART_FR_REG (UART_BASE + 0x18) // Flag register
#define UART_IBRD_REG (UART_BASE + 0x24) // Integer Baud rate divisor
#define UART_FBRD_REG (UART_B... | 429 |
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 "components/omnibox/browser/test_omnibox_edit_controller.h"
TestLocationBarModel* TestOmniboxEditController::GetLocationBarModel() {
return &l... | 393 |
678 | //
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import "NSMutableDictionary.h"
@class NSMutableArray;
@interface OrderedDictionary : NSMutableDictionary
{
NSMutableDictionary *dictionary;
NSMutableArray *array;
}
- (void).c... | 416 |
11,024 | /*
* StackUtils.java
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2013-2018 Apple Inc. and the FoundationDB project 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 obta... | 1,148 |
575 | // 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 THIRD_PARTY_BLINK_RENDERER_CORE_PAINT_PAINT_TIMING_VISUALIZER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_PAINT_PAINT_TIMING_VISUALIZER_H_
#includ... | 604 |
921 | // Copyright (c) 2015-2020 <NAME> <<EMAIL>> Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.vladsch.md.nav.parser.api;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.o... | 715 |
1,444 | <filename>Mage.Server.Plugins/Mage.Game.FreeformCommanderFreeForAll/src/mage/game/FreeformCommanderFreeForAll.java
package mage.game;
import java.util.UUID;
import mage.constants.MultiplayerAttackOption;
import mage.constants.RangeOfInfluence;
import mage.game.match.MatchType;
import mage.game.mulligan.Mulligan;
/*... | 489 |
675 | /*
* Copyright 2018 The Bazel Authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 1,339 |
349 | """Unittests for rust rules."""
load("@bazel_skylib//lib:unittest.bzl", "analysistest", "asserts")
load("//rust:defs.bzl", "rust_common", "rust_library")
def _transitive_crate_outputs_test_impl(ctx):
env = analysistest.begin(ctx)
tut = analysistest.target_under_test(env)
transitive_crate_outputs = tut[rus... | 680 |
6,717 | <filename>deps/3rdparty/cassowary-0.60/guile/cassowary_scm.h
// $Id: cassowary_scm.h,v 1.3 1999/03/17 23:57:24 gjb Exp $
// cassowary_scm.h
// By <NAME> -- 18 July 1998
//
// A Guile Scheme wrapper for the Cassowary Constraint Solving Toolkit
//
#ifndef CASSOWARY_SCM_H__
#define CASSOWARY_SCM_H__
#ifdef __cplusplus
e... | 204 |
1,001 | <reponame>yndu13/aliyun-openapi-python-sdk
# 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, V... | 1,885 |
355 | <gh_stars>100-1000
#!/usr/bin/env python3
'''
Description:
Accepts a tab-delimited input file that has at least molecule ID,
start and stop coordinates. You must specify the column numbers
in which each of these are found. You can optionally pass a column
that contains identifiers which will be used in the header ... | 1,354 |
1,072 | import torch
from cogdl.options import get_default_args
from cogdl.experiments import train
cuda_available = torch.cuda.is_available()
default_dict = {
"task": "unsupervised_graph_classification",
"gamma": 0.5,
"device_id": [0 if cuda_available else "cpu"],
"num_shuffle": 1,
"save_dir": ".",
... | 1,324 |
348 | {"nom":"Dubai","circ":"10ème circonscription","dpt":"Français établis hors de France","inscrits":9913,"abs":7795,"votants":2118,"blancs":2,"nuls":5,"exp":2111,"res":[{"nuance":"REM","nom":"Mme <NAME>","voix":1500},{"nuance":"LR","nom":"M. <NAME>","voix":416},{"nuance":"FN","nom":"M. <NAME>","voix":52},{"nuance":"DVG","... | 265 |
9,974 | /*
* Tencent is pleased to support the open source community by making
* WCDB available.
*
* Copyright (C) 2017 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtai... | 2,250 |
3,102 | // RUN: c-index-test -write-pch %t.h.pch -x c-header %S/Inputs/a.h
// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 all -I%S/Inputs -include %t.h %s | FileCheck %s
#include "a.h"
#include "b.h"
A a;
B b;
// CHECK: a.h:3:13: TypedefDecl=A:3:13 (Definition) Extent=[3:1 - 3:14]
// CHECK: b.h:1:1... | 185 |
462 | package com.ppdai.infrastructure.rest.mq.controller;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.ann... | 941 |
675 | #pragma once
#include <engine/core/util/StringUtil.h>
#include <engine/core/base/object.h>
namespace Studio
{
class UndoHistory
{
public:
// instance
static UndoHistory* instance();
// snap shot
void beginSnapshot();
void snapShot(Echo::Object* obj);
void en... | 244 |
488 | // t0017.c
// tricky use of a name in a way that looks somewhat like
// a constructor declaration
typedef struct Foo *Foo;
struct Foo {
Foo x;
int q;
};
| 54 |
604 | /*
* Serposcope - SEO rank checker https://serposcope.serphacker.com/
*
* Copyright (c) 2016 SERP Hacker
* @author <NAME> <<EMAIL>>
* @license https://opensource.org/licenses/MIT MIT License
*/
package com.serphacker.serposcope.scraper.http.proxy;
import java.util.ArrayDeque;
import java.util.ArrayList;
import... | 654 |
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.
#ifndef CHROMEOS_DBUS_USB_USBGUARD_OBSERVER_H_
#define CHROMEOS_DBUS_USB_USBGUARD_OBSERVER_H_
#include <unistd.h>
#include <map>
#includ... | 890 |
679 | <filename>main/vcl/source/window/window2.cxx
/**************************************************************
*
* 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 o... | 25,060 |
473 | /*
Copyright (c) 2009-2016, <NAME>
All rights reserved.
This file is part of Elemental and is under the BSD 2-Clause License,
which can be found in the LICENSE file in the root directory, or at
http://opensource.org/licenses/BSD-2-Clause
*/
#include <El-lite.hpp>
#include <El/blas_like/level1.hpp>
#in... | 685 |
3,269 | <gh_stars>1000+
# Time: O(n^2)
# Space: O(n)
class Solution(object):
def maxHeight(self, cuboids):
"""
:type cuboids: List[List[int]]
:rtype: int
"""
for cuboid in cuboids:
cuboid.sort()
cuboids.append([0, 0, 0])
cuboids.sort()
dp = [... | 331 |
3,227 | namespace CGAL {
/*!
\ingroup PkgStraightSkeleton2OffsetFunctions
returns a new straight skeleton data structure with the same combinatorial and geometric data as `s`
using the items converter `ic` to convert the geometric embedding to the types of the target skeleton.
\tparam Target_skeleton must be a model of `Str... | 1,368 |
930 | package com.foxinmy.weixin4j.tuple;
/**
* 企业号会话消息元件
*
* @className ChatTuple
* @author jinyu(<EMAIL>)
* @date 2015年8月1日
* @since JDK 1.6
* @see com.foxinmy.weixin4j.tuple.Text
* @see com.foxinmy.weixin4j.tuple.Image
* @see com.foxinmy.weixin4j.tuple.File
*/
public interface ChatTuple extends Tuple {
}
| 163 |
332 | <filename>spring-xd-dirt/src/main/java/org/springframework/xd/dirt/stream/zookeeper/ZooKeeperJobRepository.java<gh_stars>100-1000
/*
* Copyright 2014-2015 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 Lic... | 2,669 |
310 | {
"name": "Fennel",
"description": "A Lisp variant that compiles to Lua.",
"url": "https://fennel-lang.org/"
}
| 45 |
8,315 | <gh_stars>1000+
package com.airbnb.epoxy;
import android.graphics.Canvas;
import android.view.View;
import androidx.recyclerview.widget.ItemTouchHelper;
/**
* For use with {@link EpoxyModelTouchCallback}
*/
public interface EpoxySwipeCallback<T extends EpoxyModel> extends BaseEpoxyTouchCallback<T> {
/**
* Ca... | 1,081 |
852 | //
// Plugin to store B and C ratio for a GenJet in the event
// Author: Attilio
// Date: 05.10.2007
//
//=======================================================================
// user include files
#include "FWCore/Framework/interface/global/EDProducer.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#inc... | 1,349 |
11,356 | <reponame>shreyasvj25/turicreate<filename>deps/src/boost_1_65_1/libs/config/test/boost_no_std_iter_traits.ipp<gh_stars>1000+
// (C) Copyright <NAME> 2001.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.... | 920 |
765 | /*
* Copyright (c) 2014-2016 ARM 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
*
* Unless required... | 2,402 |
359 | /*
* This file is part of the Xilinx DMA IP Core driver for Linux
*
* Copyright (c) 2017-2020, Xilinx, Inc.
* All rights reserved.
*
* This source code is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the... | 473 |
766 | <filename>modules/siddhi-core/src/main/java/io/siddhi/core/query/input/stream/state/receiver/PatternMultiProcessStreamReceiver.java
/*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may n... | 757 |
2,910 | <filename>example/src/main/java/com/r0adkll/slidr/example/OSVersionAdapter.java
package com.r0adkll.slidr.example;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.ftinc.kit.adapter... | 585 |
1,225 | <gh_stars>1000+
package com.d.ui.view.toggle;
import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import com.d.lib.common.util.ViewHelper;
import com.d.ui.view.R;
/**
* ToggleActivity
* Created by D on 2018/11/11.
*/
public class ToggleActiv... | 334 |
348 | <reponame>chamberone/Leaflet.PixiOverlay
{"nom":"<NAME>","circ":"3ème circonscription","dpt":"Calvados","inscrits":136,"abs":85,"votants":51,"blancs":2,"nuls":5,"exp":44,"res":[{"nuance":"MDM","nom":"<NAME>","voix":33},{"nuance":"LR","nom":"<NAME>","voix":11}]} | 109 |
5,813 | <reponame>RomaKoks/druid
/*
* 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... | 2,089 |
679 | <reponame>Grosskopf/openoffice<filename>main/sw/source/ui/vba/vbafield.hxx
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional inform... | 1,173 |
451 |
#include "../../cpp_utils/cloud/cloud.h"
#include <set>
#include <cstdint>
using namespace std;
class SampledData
{
public:
// Elements
// ********
int count;
PointXYZ point;
vector<float> features;
vector<unordered_map<int, int>> labels;
// Methods
// *******
// Constructor
SampledData()
{
cou... | 1,204 |
381 | <gh_stars>100-1000
import pickle
import gzip
from sparse_gp import SparseGP
import scipy.stats as sps
import numpy as np
import os.path
import rdkit
from rdkit.Chem import MolFromSmiles, MolToSmiles
from rdkit.Chem import Descriptors
import torch
import torch.nn as nn
from jtnn import create_var, JTNNVAE, Vocab
from... | 2,432 |
1,093 | <gh_stars>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
*
* Unle... | 544 |
3,682 | from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.contrib.auth.models import User
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
follows = models.ManyToManyField(
"self", related_name="... | 255 |
5,169 | {
"name": "libjingle_peerconnection_swift",
"version": "0.1.0",
"summary": "A short description of libjingle_peerconnection_swift.",
"description": "TODO: Add long description of the pod here.",
"homepage": "https://github.com/SemonCat/libjingle_peerconnection_swift",
"license": {
"type": "MIT",
"fi... | 543 |
728 | <reponame>artwo/sirix
package org.sirix.xquery.compiler.optimizer.walker.json;
import org.brackit.xquery.atomic.QNm;
import org.brackit.xquery.compiler.AST;
import org.brackit.xquery.compiler.XQ;
import org.brackit.xquery.util.path.Path;
import org.brackit.xquery.xdm.Type;
import org.sirix.access.trx.node.IndexControl... | 916 |
455 | /*
* 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,709 |
1,107 | import os
import sys
root_path = os.path.abspath("../../../")
if root_path not in sys.path:
sys.path.append(root_path)
from _Dist.NeuralNetworks.DistBase import DistMixin, DistMeta
from _Dist.NeuralNetworks.f_AutoNN.DistNN import AutoBasic, AutoAdvanced
class DistBasic(AutoBasic, DistMixin, metaclass=DistMeta):
... | 141 |
11,024 | <reponame>PierreZ/foundationdb
/*
* Subspace.h
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2013-2018 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with th... | 782 |
548 | // Copyright 2019 ZTE corporation. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
#ifndef H0F166B02_2E75_43A3_9C1E_4BF6E8D7B586
#define H0F166B02_2E75_43A3_9C1E_4BF6E8D7B586
#include <stdint.h>
#include "cub/dci/role.h"
#include "cub/env/concurrent/thread.h"
#include "cub/env/env.h"
namespace cub {
DE... | 252 |
452 | // <NAME>, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2021
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 4.0.2019.08.13
#include "GeodesicHeightFieldWindow3.h"
#include <Gra... | 5,917 |
307 | <gh_stars>100-1000
from typing import List
import numpy as np
from .rt_enum import TypeRegister
from .rt_numpy import unique, ismember, hstack
from .rt_utils import crc_match
# ------------------------------------------------------------
def merge_index(indices, listcats, idx_cutoffs=None, unique_cutoffs=No... | 1,637 |
9,734 | /*
* 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 ... | 1,509 |
473 | /*
* Virtio 9p handle callback
*
* Copyright IBM, Corp. 2011
*
* Authors:
* <NAME> <<EMAIL>>
*
* This work is licensed under the terms of the GNU GPL, version 2. See
* the COPYING file in the top-level directory.
*
*/
#include "hw/virtio/virtio.h"
#include "virtio-9p.h"
#include "virtio-9p-xattr.h"
#inc... | 8,986 |
6,989 | <reponame>unbun/snake.ai<gh_stars>1000+
from __future__ import division, absolute_import, print_function
import os
import pytest
from numpy.testing import assert_
from . import util
def _path(*a):
return os.path.join(*((os.path.dirname(__file__),) + a))
class TestAssumedShapeSumExample(util.F2PyTest):
sou... | 476 |
1,056 | <reponame>timfel/netbeans
/*
* 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.... | 4,141 |
1,350 | <filename>sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/src/main/java/com/azure/resourcemanager/delegatednetwork/models/DelegatedSubnetState.java
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
pac... | 549 |
4,054 | <reponame>sagiyaho/vespa
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition;
import com.yahoo.config.model.application.provider.MockFileRegistry;
import com.yahoo.config.model.deploy.TestProperties;
import com.yahoo.search.query.p... | 3,771 |
14,668 | <reponame>chromium/chromium<gh_stars>1000+
// 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 CHROMEOS_DBUS_FWUPD_FAKE_FWUPD_CLIENT_H_
#define CHROMEOS_DBUS_FWUPD_FAKE_FWUPD_CLIENT_H_
#include "ba... | 456 |
348 | {"nom":"Lifou","circ":"1ère circonscription","dpt":"Nouvelle-Calédonie","inscrits":10400,"abs":8517,"votants":1883,"blancs":239,"nuls":109,"exp":1535,"res":[{"nuance":"DVD","nom":"M. <NAME>","voix":1308},{"nuance":"DVD","nom":"<NAME>","voix":227}]} | 101 |
355 | <reponame>ChronosX88/TomP2P
package net.tomp2p.p2p;
import java.util.Comparator;
import java.util.TreeSet;
/**
* A TreeSet that allows for updates. When the item is already in the Set,
* the item is removed before adding it.
*
* Created by <NAME> on 10.12.14.
*/
public class UpdatableTreeSet<E> extends TreeSet<E... | 299 |
2,542 | <filename>src/prod/src/Reliability/Failover/ra/Replica.h<gh_stars>1000+
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// --------------------... | 5,440 |
872 | <gh_stars>100-1000
"""
Given an integer, write a function to determine if it is a power of two.
"""
__author__ = 'Daniel'
class Solution:
def isPowerOfTwo(self, n):
"""
Bit manipulation
:type n: int
:rtype: bool
"""
if n <= 0:
return False
retur... | 156 |
1,200 | <filename>carrera-producer/src/main/java/com/xiaojukeji/carrera/pproxy/producer/BatchMQProducer.java
package com.xiaojukeji.carrera.pproxy.producer;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.xiaojukeji.carrera.config.v4.pproxy.BatchMQProducerConfiguration;
import com.xiaojukeji.carrera.... | 7,180 |
435 | <reponame>amaajemyfren/data<filename>pycon-pl-2015/videos/pycon-pl-2015-p-jarolewski-m-kurek-octodocker-sprawdz-dzialanie-pull-requesta.json
{
"description": "Przenie\u015b si\u0119 w przysz\u0142o\u015b\u0107 by zdecydowa\u0107 czy mergowa\u0107 pull requesta. Oce\u0144 dzia\u0142anie aplikacji testuj\u0105c rzeczyw... | 691 |
585 | <gh_stars>100-1000
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "... | 1,092 |
6,989 | """Suite QuickDraw Graphics Supplemental Suite: Defines transformations of graphic objects
Level 1, version 1
Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'qdsp'
class QuickDraw_Graphics_Suppleme_Events:... | 597 |
310 | {
"name": "dpkt",
"description": "A Python package for working with network packets.",
"url": "https://dpkt.readthedocs.io/en/latest/"
}
| 51 |
831 | <reponame>Dliwk/pdoc
"""child_b docstr"""
from __future__ import annotations
import typing
class B:
"""This class is defined in .child_b."""
b_type: typing.Type[B]
"""we have a self-referential attribute here"""
def b(self):
return 1
| 100 |
335 | <reponame>Safal08/Hacktoberfest-1
{
"word": "Osteomalacia",
"definitions": [
"Softening of the bones, typically through a deficiency of vitamin D or calcium."
],
"parts-of-speech": "Noun"
} | 87 |
579 | #!/usr/bin/env python3
import sys
# Propagate any exit codes from the VS Build Tools installer except for 3010
code = int(sys.argv[1])
code = 0 if code == 3010 else code
sys.exit(code)
| 61 |
450 | #!/usr/bin/env python
# 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
# "Li... | 658 |
892 | <reponame>westonsteimel/advisory-database-github<filename>advisories/unreviewed/2022/05/GHSA-2rcg-6729-3c5c/GHSA-2rcg-6729-3c5c.json
{
"schema_version": "1.2.0",
"id": "GHSA-2rcg-6729-3c5c",
"modified": "2022-05-01T06:47:33Z",
"published": "2022-05-01T06:47:33Z",
"aliases": [
"CVE-2006-1248"
],
"detai... | 956 |
679 | <gh_stars>100-1000
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF license... | 4,324 |
1,191 | <filename>android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiView.java
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
pa... | 448 |
1,482 | <filename>test/calls/call8.py
foo. __class__(foo=bar)
foo. __class__ (foo=bar)
foo. __add__ (foo=bar)
foo. __add__(foo=bar)
foo : source.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
: meta.member.access.python, source.python
__class__ ... | 1,559 |
604 | _base_ = "base.py"
model = dict(
backbone=dict(
depth=101,
init_cfg=dict(checkpoint="open-mmlab://detectron2/resnet101_caffe"),
)
)
data = dict(
samples_per_gpu=2,
workers_per_gpu=2,
train=dict(
ann_file="data/coco/annotations/instances_train2017.json",
img_prefix="d... | 228 |
513 | <gh_stars>100-1000
package com.zmops.iot.web.transfer.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zmops.iot.model.cache.filter.CachedValueFilter;
import lombok.Data;
/**
* @author yefei
**/
@Data
@JsonSerialize(using = CachedValueFilter.class)
public class StatusDto {
privat... | 559 |
1,305 | /*
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.corba.se.impl.encoding;
import java.nio.ByteBuffer;
import com.sun.corba.se.impl.enc... | 3,434 |
5,422 | # coding: utf-8
#
# Copyright 2020 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 2,138 |
307 | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: FBOutput
import tdw.flatbuffers
class Mesh(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsMesh(cls, buf, offset):
n = tdw.flatbuffers.encode.Get(tdw.flatbuffers.packer.uoffset, buf, offset)
... | 1,377 |
390 | <filename>models/SubpixelNet.py
"""Old version of SuperpointNet. Use it together with
logs/magicpoint_synth20/checkpoints/superPointNet_200000_checkpoint.pth.tar
"""
import torch
import torch.nn as nn
from torch.nn.init import xavier_uniform_, zeros_
from models.unet_parts import *
# from models.SubpixelNet import ... | 1,420 |
3,586 | from datahub.ingestion.source.sql.mysql import MySQLSource
class MariaDBSource(MySQLSource):
def get_platform(self):
return "mariadb"
| 62 |
1,403 | /*
* GLShaderUniform.cpp
*
* This file is part of the "LLGL" project (Copyright (c) 2015-2019 by <NAME>)
* See "LICENSE.txt" for license information.
*/
#include "GLShaderUniform.h"
#include "../GLTypes.h"
#include "../Ext/GLExtensions.h"
#include "../Ext/GLExtensionRegistry.h"
namespace LLGL
{
// Requires G... | 4,279 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.