max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
703 | <reponame>Tekh-ops/ezEngine
#include <ToolsFoundationTest/ToolsFoundationTestPCH.h>
| 32 |
964 | [
{
"queryName": "Schema with 'additionalProperties' set as Boolean",
"severity": "INFO",
"line": 28,
"filename": "positive1.json"
},
{
"queryName": "Schema with 'additionalProperties' set as Boolean",
"severity": "INFO",
"line": 22,
"filename": "positive2.yaml"
},
{
"query... | 250 |
392 | /*
* Point 3D.
*/
#include "io/serialization/serial_input_stream.hh"
#include "io/serialization/serial_output_stream.hh"
#include "io/streams/ostream.hh"
#include "lang/pointers/auto_ptr.hh"
#include "math/exact.hh"
#include "math/geometry/point_3D.hh"
#include "math/math.hh"
namespace math {
namespace geometry {
/*... | 6,396 |
2,868 | <gh_stars>1000+
/*
* Copyright (c) 2015-2017, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of cond... | 7,783 |
2,129 | <gh_stars>1000+
// Copyright 2014 Google Inc. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the COPYING file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS. All contributing project a... | 18,313 |
1,232 | <reponame>congduy/gopropyapi
from goprocam import GoProCamera
from goprocam import constants
import time
gpCam = GoProCamera.GoPro(constants.auth)
gpCam.overview()
gpCam.listMedia(True)
| 65 |
1,350 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.quota.fluent;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core... | 1,828 |
1,099 | package com.example.chat.bean;
import com.example.commonlibrary.bean.chat.User;
import cn.bmob.v3.BmobObject;
/**
* 项目名称: NewFastFrame
* 创建人: 陈锦军
* 创建时间: 2018/6/18 12:16
* QQ:1981367757
*/
public class StepBean extends BmobObject{
private User user;
private String time;
private Int... | 347 |
1,350 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.datafactory.models;
import com.azure.core.util.Context;
import com.azure.resourcemanager.datafactory.fluent.models.ManagedVirtua... | 2,522 |
645 | // 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.
package org.chromium.distiller.document;
/**
* Provides shallow statistics on a given TextDocument.
*/
public final class TextDocumentStatistics {
... | 233 |
3,337 | #include "universe.h"
#include <tbb/task_scheduler_init.h>
#include <tbb/flow_graph.h>
#include <tbb/partitioner.h>
#include <tbb/blocked_range.h>
#include <tbb/parallel_for.h>
struct UpdateStressBody {
Universe & u_;
UpdateStressBody(Universe & u):u_(u){}
void operator()( const tbb::blocked_range<int>& range )... | 820 |
7,407 | <gh_stars>1000+
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
This file is part of Quake III Arena source code.
Quake III Arena source code is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public Li... | 408 |
688 | <reponame>AhmedLeithy/Recognizers-Text
# ------------------------------------------------------------------------------
# <auto-generated>
# This code was generated by a tool.
# Changes to this file may cause incorrect behavior and will be lost if
# the code is regenerated.
# </auto-generated>
#
# Copyright... | 290 |
6,450 | {
"title": {
"zh": "中文分类",
"en": "Category"
},
"demos": [
{
"filename": "gold.jsx",
"title": "某黄金实时金价走势图",
"screenshot": "https://gw.alipayobjects.com/zos/rmsportal/nhKcpmYFRYcSeQgTQSZW.png"
},
{
"filename": "dynamic.jsx",
"title": "实时折线",
"screenshot": "htt... | 251 |
18,450 | <reponame>shanyao19940801/Java-Interview
package com.crossoverjie.algorithm;
import com.crossoverjie.algorithm.MergeTwoSortedLists.ListNode;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
public class MergeTwoSortedListsTest {
MergeTwoSortedLists mergeTwoSortedLists ;
@Before
pub... | 1,301 |
435 | <filename>europython-2013/videos/a-mleczko-lost-in-oauth-learn-velruse-and-get-your-life-back.json
{
"copyright_text": null,
"description": "",
"duration": 1608,
"language": "eng",
"recorded": "2013-07-03",
"related_urls": [
{
"label": "Conference schedule",
"url": "https://www.pycon.it/en/e... | 339 |
14,668 | <reponame>zealoussnow/chromium<gh_stars>1000+
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_TABLE_VIEW_TABLE_VIEW_NAVIGATION_CONTROLLER_CONSTANTS_H_
#define IOS_CHROME_BR... | 341 |
416 | package org.simpleflatmapper.util.date;
public interface DateFormatSupplier {
String get();
}
| 31 |
716 | <gh_stars>100-1000
/*
*
* Copyright 2011 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Un... | 4,361 |
14,668 | // 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.
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_SITE_AFFILIATION_AFFILIATION_FETCHER_BASE_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_SITE_AFFILI... | 1,138 |
325 | <gh_stars>100-1000
from AlphaGo.go import GameState, BLACK, WHITE
def parse(boardstr):
'''Parses a board into a gamestate, and returns the location of any moves
marked with anything other than 'B', 'X', '#', 'W', 'O', or '.'
Rows are separated by '|', spaces are ignored.
'''
boardstr = boardstr... | 449 |
3,212 | /*
* 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 ... | 739 |
335 | <reponame>Safal08/Hacktoberfest-1
{
"word": "Discipline",
"definitions": [
"The practice of training people to obey rules or a code of behaviour, using punishment to correct disobedience.",
"The controlled behaviour resulting from such training.",
"Activity that provides mental or physic... | 160 |
1,338 | /*
* Copyright 2009-2012, <NAME>, <EMAIL>.
* Copyright 2010-2017, <NAME>, <EMAIL>.
* Distributed under the terms of the MIT License.
*/
#include "controllers/TeamDebugger.h"
#include <stdarg.h>
#include <stdio.h>
#include <new>
#include <Entry.h>
#include <InterfaceDefs.h>
#include <Message.h>
#include <String... | 23,381 |
3,102 | <reponame>medismailben/llvm-project
typedef struct { int x; } TypedefStructHidden_t;
| 33 |
4,845 | <reponame>gaozining/Sa-Token
package com.pj;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import cn.dev33.satoken.SaManager;
/**
* Sa-Token整合SpringBoot 示例
* @author kong
*
*/
@SpringBootApplication
public class SaTokenAloneRedisApplicati... | 201 |
2,329 | /*
* 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 ... | 4,077 |
651 | package net.serenitybdd.integration.jenkins.process;
import org.jdeferred.Promise;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.*;
import java.nio.charset.Charset;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.regex.Matcher;
public class JenkinsL... | 830 |
8,747 | <gh_stars>1000+
/* TWAI Network Slave Example
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*... | 4,850 |
808 | <reponame>carllhw/dddplus
package io.github.dddplus.runtime;
import org.junit.Test;
import static org.junit.Assert.*;
public class ExtTimeoutExceptionTest {
@Test
public void getMessage() {
ExtTimeoutException extTimeoutException = new ExtTimeoutException(5000);
assertEquals("timeout:5000ms"... | 126 |
992 | <filename>Src/MarchingCubes.h
/*
Copyright (c) 2006, <NAME> and <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of... | 18,364 |
1,690 | # Copyright 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 in the "license" file accompan... | 2,741 |
444 | <reponame>code-review-doctor/orchestra<filename>orchestra/todos/views.py<gh_stars>100-1000
import logging
import copy
from django.contrib import messages
from django.contrib.admin.views.decorators import staff_member_required
from django.shortcuts import redirect
from django.shortcuts import render
from django.utils.d... | 4,314 |
698 | <gh_stars>100-1000
from .abc import ABCRequestRescheduler
from .blocking import BlockingRequestRescheduler
| 30 |
335 | <filename>V/Vibrator_noun.json
{
"word": "Vibrator",
"definitions": [
"A device used for massage or sexual stimulation.",
"A device for compacting concrete before it has set.",
"A reed in a reed organ."
],
"parts-of-speech": "Noun"
} | 114 |
1,968 | <reponame>agramonte/corona
#include "pch.h"
#include "AngleBase.h"
using namespace DirectX;
using namespace Microsoft::WRL;
using namespace Windows::Foundation;
using namespace Windows::Graphics::Display;
// Constructor.
AngleBase::AngleBase()
: m_bAngleInitialized(false)
, m_eglDisplay(nullptr)
, m_eglSu... | 3,216 |
412 | <filename>server/src/main/java/datart/server/controller/ThirdPartyAuthController.java
package datart.server.controller;
import datart.core.base.annotations.SkipLogin;
import datart.core.base.consts.Const;
import datart.core.entity.User;
import datart.core.entity.ext.UserBaseInfo;
import datart.security.base.PasswordTo... | 1,398 |
427 | //===--- NSUndoManagerShims.h - Foundation decl. for NSUndoManager overlay ===//
//
// 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 Library Exception
//
// See https://swift.org/L... | 213 |
678 | /**
* This header is generated by class-dump-z 0.2b.
*
* Source: /System/Library/PrivateFrameworks/CoreDAV.framework/CoreDAV
*/
#import <CoreDAV/CoreDAVTaskGroup.h>
#import <CoreDAV/CoreDAVPropPatchTaskDelegate.h>
@class NSURL;
@interface CardDAVUpdateMeCardTaskGroup : CoreDAVTaskGroup <CoreDAVPropPatchTaskDeleg... | 434 |
1,056 | <reponame>timfel/netbeans<filename>java/java.hints/src/org/netbeans/modules/java/hints/errors/EnablePreviewSingleSourceFile.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
* re... | 3,326 |
416 | package org.springframework.roo.addon.web.mvc.thymeleaf.addon.link.factory;
import org.springframework.roo.classpath.PhysicalTypeMetadata;
import org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails;
import org.springframework.roo.classpath.details.annotations.populator.*;
import org.springframework.r... | 377 |
4,262 | /*
* 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 ... | 2,195 |
6,192 | import pandas as pd
from sklearn.metrics import roc_auc_score
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder, MinMaxScaler
from deepctr.feature_column import SparseFeat, DenseFeat, get_feature_names
from deepctr.models import MMOE
if __name__ == "__main__":
col... | 1,724 |
334 | <gh_stars>100-1000
#!/usr/bin/python
import os
import shutil
from calvin.utilities import certificate
from calvin.utilities import certificate_authority
from calvin.utilities import runtime_credentials
from calvin.utilities.utils import get_home
from calvin.utilities import calvinuuid
homefolder = get_home()
domain =... | 1,155 |
348 | {"nom":"Plan-de-Cuques","circ":"10ème circonscription","dpt":"Bouches-du-Rhône","inscrits":9398,"abs":5818,"votants":3580,"blancs":218,"nuls":67,"exp":3295,"res":[{"nuance":"REM","nom":"<NAME>","voix":1731},{"nuance":"FN","nom":"<NAME>","voix":1564}]} | 104 |
745 | <gh_stars>100-1000
# -*- coding: utf-8 -*-
import sys
from html.parser import HTMLParser
import requests
from httpretty import HTTPretty
from openid import oidutil
from ...backends.utils import load_backends
from ...utils import parse_qs, module_member
from ..models import TestStorage, User, TestUserSocialAuth, \
... | 1,616 |
315 | <gh_stars>100-1000
/***************************************************************************
Copyright (c) 2019, Xilinx, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of so... | 3,187 |
605 | <reponame>LaudateCorpus1/llvm-project
/*===--------------- x86gprintrin.h - X86 GPR intrinsics ------------------===
*
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
* See https://llvm.org/LICENSE.txt for license information.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception... | 686 |
585 | <reponame>richung99/digitizePlots
# -*- coding: utf-8 -*-
"""Diffusion Toolkit performs data reconstruction and fiber tracking on diffusion MR images."""
from .base import Info
from .postproc import SplineFilter, TrackMerge
from .dti import DTIRecon, DTITracker
from .odf import HARDIMat, ODFRecon, ODFTracker
| 99 |
493 | <reponame>venkattgg/venkey
#include <algorithm>
#include <flexible_type/flexible_type.hpp>
#include <boost/circular_buffer.hpp>
#include <boost/algorithm/string.hpp>
#include <sframe/rolling_aggregate.hpp>
namespace graphlab {
namespace rolling_aggregate {
ssize_t clip(ssize_t val, ssize_t lower, ssize_t upper) {
r... | 2,601 |
7,581 | <reponame>dinhtuyen/PRML01<gh_stars>1000+
import numpy as np
from prml.nn.array.broadcast import broadcast_to
from prml.nn.function import Function
from prml.nn.math.log import log
from prml.nn.nonlinear.sigmoid import sigmoid
from prml.nn.random.random import RandomVariable
from prml.nn.tensor.tensor import Tensor
c... | 1,792 |
310 | {
"name": "POG",
"description": "A polyphonic octave generator.",
"url": "https://www.ehx.com/products/pog"
}
| 47 |
428 | <reponame>radoslawcybulski/CastXML<filename>test/input/Class-forward.cxx
class start;
class start
{
public:
start();
start(start const&);
start& operator=(start const&);
~start();
};
| 71 |
396 | <reponame>daattali/dashR<gh_stars>100-1000
app_with_theme = """
library(dash)
controls <- dbcCard(list(
div(
dbcLabel("Dataset"),
dbcInput(id="dbc-input", type="text", value="<NAME>")
)
), body=T)
dash_app() %>%
add_stylesheet(dbcThemes$BOOTSTRAP) %>%
set_layout(
dbcContainer(list(
dbcRow(li... | 301 |
411 | <reponame>sumau/tick
# License: BSD 3 clause
import unittest
from tick.solver import GD
from tick.solver.tests import TestSolver
class GDTest(object):
def test_solver_gd(self):
"""...Check GD solver for Logistic Regression with Ridge penalization
"""
solver = GD(max_iter=100, verbose=Fal... | 582 |
1,907 | <filename>src/appleseed/foundation/curve/binarycurvefilewriter.cpp
//
// This source file is part of appleseed.
// Visit https://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2018 <NAME>, The appleseedhq Organization
//
// Permissi... | 1,442 |
3,301 | package com.alibaba.alink.operator.common.linear.unarylossfunc;
/**
* Squared loss function.
* https://en.wikipedia.org/wiki/Loss_functions_for_classification#Square_loss
*/
public class SquareLossFunc implements UnaryLossFunc {
private static final long serialVersionUID = 4979822510416701065L;
public SquareLoss... | 208 |
2,389 | <reponame>Ankit01Mishra/java
/*
Copyright 2020 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ... | 303 |
751 | <filename>src/plugins/ioam/lib-trace/trace_test.c
/*
* Copyright (c) 2016 Cisco and/or 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://www.apache.org/licen... | 1,132 |
324 | /*
* 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 ... | 291 |
422 | // -*- C++ -*- Copyright (c) Microsoft Corporation; see license.txt
#ifndef MESH_PROCESSING_LIBHH_COMBINATION_H_
#define MESH_PROCESSING_LIBHH_COMBINATION_H_
#include "libHh/Map.h"
#include "libHh/RangeOp.h"
#if 0
{
Combination<Vertex> combination;
for_combination(combination, [&](Vertex v, float val) { func(v, ... | 449 |
1,388 | <gh_stars>1000+
#!/usr/bin/env python
# Copyright (C) 2007 <NAME>' <<EMAIL>>.
# Use of this source code is governed by MIT license that can be
# found in the LICENSE file.
"""
A FTP server which handles every connection in a separate thread.
Useful if your handler class contains blocking calls or your
filesystem is t... | 242 |
1,529 | /*
* Copyright (c) 2016 咖枯 <<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 or agree... | 345 |
335 | <filename>F/Fenestration_noun.json
{
"word": "Fenestration",
"definitions": [
"The arrangement of windows in a building.",
"The condition of being fenestrate.",
"A surgical operation in which a new opening is formed, especially in the bony labyrinth of the inner ear to treat certain type... | 133 |
2,636 | <gh_stars>1000+
package com.hitomi.tilibrary.style.index;
import androidx.viewpager.widget.ViewPager;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.hitomi.tilibrary.style.IIndexIndicator;
import com.hitomi.tilibrary.view.indicator.... | 696 |
519 | <gh_stars>100-1000
from django.conf.urls import url
from . import views
from . import restapi
app_name = 'x123'
urlpatterns = [
# ex: /
url(r'^$', views.index, name='index'),
# ex: /d/1/
url(r'^d/(?P<domain_id>[0-9]+)/$', views.domain, name='domain'),
# ex: /a/1/
url(r'^a/(?P<aspect_id>[0-9]+)... | 538 |
622 | <gh_stars>100-1000
"""string.format"""
from runtime import *
def main():
a = '{x}{y}'.format( x='A', y='B')
assert(a == 'AB')
main() | 58 |
518 | <filename>src/etc/generate-keyword-tests.py
#!/usr/bin/env python
"""
This script takes a list of keywords and generates a testcase, that checks
if using the keyword as identifier fails, for every keyword. The generate
test files are set read-only.
Test for https://github.com/rust-lang/rust/issues/2275
sample usage: ... | 430 |
1,383 | // =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of t... | 1,104 |
1,968 | <reponame>agramonte/corona<gh_stars>1000+
//////////////////////////////////////////////////////////////////////////////
//
// This file is part of the Corona game engine.
// For overview and more information on licensing please refer to README.md
// Home page: https://github.com/coronalabs/corona
// Contact: <EMAIL>
... | 6,848 |
302 | <filename>Updater/ipostpreparestrategy.cpp
#include "ipostpreparestrategy.h"
IPostPrepareStrategy::IPostPrepareStrategy(QObject *parent) :
QObject(parent)
{
}
| 77 |
575 | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_WM_OVERVIEW_OVERVIEW_CONSTANTS_H_
#define ASH_WM_OVERVIEW_OVERVIEW_CONSTANTS_H_
#include "ash/ash_export.h"
#include "ash/style/ash_color_pro... | 358 |
348 | <reponame>vmusch/OpenMS<gh_stars>100-1000
// --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls... | 3,769 |
1,179 | /* SPDX-License-Identifier: BSD-2-Clause */
/*
* Copyright (c) 2019-2021, Linaro Limited
*/
#ifndef __MM_FOBJ_H
#define __MM_FOBJ_H
#include <kernel/panic.h>
#include <kernel/refcount.h>
#include <mm/tee_pager.h>
#include <sys/queue.h>
#include <tee_api_types.h>
#include <types_ext.h>
/*
* struct fobj - file obje... | 2,080 |
1,338 | <gh_stars>1000+
/*
* Copyright 2008-2010, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* <NAME> <<EMAIL>>
*/
#include "BootManagerWindow.h"
#include <Application.h>
#include <Catalog.h>
#include <LayoutBuilder.h>
#include <Roster.h>
#include <Screen.h>
#incl... | 692 |
506 | // https://codeforces.com/contest/1406/problem/D
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<ll>;
int main() {
cin.tie(0), ios::sync_with_stdio(0);
int n, q;
cin >> n;
vi a(n);
ll p = 0;
for (int i = 0; i < n; i++) cin >> a[i];
for (int i = n - 1; i >= 1; i--) {... | 649 |
32,544 | <gh_stars>1000+
package com.baeldung.systemstubs;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import uk.org.webcompere.systemstubs.jupiter.SystemStub;
import uk.org.webcompere.systemstubs.jupiter.SystemStubsExtension;
import uk.org.webcompe... | 454 |
371 | <filename>jar-enginex-runner/src/main/java/com/baoying/enginex/executor/util/DataHelp.java
package com.baoying.enginex.executor.util;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
public class DataHelp {
public static int day=0;
public static String getNowDate(){
Date date ... | 443 |
1,162 | package io.digdag.client.api;
import com.google.common.base.Preconditions;
import java.util.regex.Pattern;
import static java.nio.charset.StandardCharsets.UTF_8;
public class SecretValidation
{
private static final String SECRET_KEY_SEGMENT = "[a-zA-Z]|[a-zA-Z][a-zA-Z0-9_\\-]*[a-zA-Z0-9]";
private static fi... | 483 |
1,144 | package de.metas.materialtracking;
/*
* #%L
* de.metas.materialtracking
* %%
* Copyright (C) 2015 metas GmbH
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of the... | 3,732 |
829 | /*
* Generated by class-dump 3.3.4 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by <NAME>.
*/
#import <Cocoa/Cocoa.h>
/*#import <IDEKit/IDEViewController.h>
#import "DVTEditor-Protocol.h"
#import "DVTReplacementViewDelegate-Protocol.h"
#import "DVTStatefulObject-Protocol.h"
#... | 6,949 |
803 | package com.lfk.demo.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.ActionBarActivity;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.... | 1,618 |
2,329 | package issue34;
public abstract class Implementation2<T1,T2> extends Implementation1<T2> implements Interface2<T1,T2> {
} | 38 |
344 | /*
* Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... | 2,478 |
561 | import os
import torch
import torch.distributed as dist
from torch import nn
from torch.utils.data import DistributedSampler
from tasks.vocoder.dataset_utils import VocoderDataset, EndlessDistributedSampler
from utils.audio.io import save_wav
from utils.commons.base_task import BaseTask
from utils.commons.dataset_utils... | 2,938 |
145,614 | """
Given an array of integer elements and an integer 'k', we are required to find the
maximum sum of 'k' consecutive elements in the array.
Instead of using a nested for loop, in a Brute force approach we will use a technique
called 'Window sliding technique' where the nested loops can be converted to a single
loop t... | 528 |
363 | package com.autohome.frostmourne.monitor.dao.mybatis.frostmourne.repository.impl;
import static org.mybatis.dynamic.sql.SqlBuilder.isEqualTo;
import java.util.Optional;
import javax.annotation.Resource;
import com.autohome.frostmourne.monitor.dao.mybatis.frostmourne.domain.Alert;
import com.autohome.frostmourne.moni... | 716 |
548 | #include <fastdds/rtps/writer/LivelinessManager.h>
#include <fastdds/dds/log/Log.hpp>
#include <algorithm>
using namespace std::chrono;
namespace eprosima {
namespace fastrtps {
namespace rtps {
using LivelinessDataIterator = ResourceLimitedVector<LivelinessData>::iterator;
LivelinessManager::LivelinessManager(
... | 4,497 |
347 | package org.ovirt.engine.core.utils.serialization.json;
import java.util.ArrayList;
import org.ovirt.engine.core.common.action.ActionParametersBase;
import org.ovirt.engine.core.common.action.ActionType;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import ... | 358 |
465 | <reponame>nannullna/deep-active-learning<gh_stars>100-1000
from torchvision import transforms
from handlers import MNIST_Handler, SVHN_Handler, CIFAR10_Handler
from data import get_MNIST, get_FashionMNIST, get_SVHN, get_CIFAR10
from nets import Net, MNIST_Net, SVHN_Net, CIFAR10_Net
from query_strategies import RandomSa... | 1,853 |
531 | /*
* Copyright (c) 2015-2020, www.dibo.ltd (<EMAIL>).
* <p>
* 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
* <p>
* https://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required ... | 10,237 |
310 | <filename>Publications/DPC++/Ch01_intro/fig_1_6_functor.cpp
// Copyright (C) 2020 Intel Corporation
// SPDX-License-Identifier: MIT
#include <iostream>
// START BOOK SNIP
class Functor {
public:
Functor(int i, int &j) : my_i{i}, my_jRef{j} { }
int operator()(int k0, int &l0) {
my_jRef = 2 * my_jRef;... | 315 |
1,338 | <gh_stars>1000+
/*
* Copyright 2002, <NAME>, <EMAIL>.
* Distributed under the terms of the MIT License.
*/
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
// 2002, <NAME>
// technical reference:
// http://bedriven.be-in.org/document/280-serial_port_driver.html
// 2004: bedriven is dow... | 502 |
2,151 | /*
*
* Copyright 2015 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | 661 |
6,989 | #pragma once
#include "typetraits.h"
#include <util/system/types.h>
#include <cstring>
template <class T>
using TIfPOD = std::enable_if_t<TTypeTraits<T>::IsPod, T*>;
template <class T>
using TIfNotPOD = std::enable_if_t<!TTypeTraits<T>::IsPod, T*>;
template <class T>
static inline TIfPOD<T> MemCopy(T* to, const T... | 503 |
364 | package org.cyclopsgroup.jmxterm.cmd;
import java.io.IOException;
import java.util.HashSet;
import java.util.List;
import org.apache.commons.lang3.Validate;
import org.cyclopsgroup.jcli.annotation.Argument;
import org.cyclopsgroup.jcli.annotation.Cli;
import org.cyclopsgroup.jmxterm.Command;
import org.cyclopsgroup.jm... | 934 |
335 | <filename>L/Luck_verb.json
{
"word": "Luck",
"definitions": [
"Chance to find or acquire.",
"Achieve success or advantage by good luck."
],
"parts-of-speech": "Verb"
} | 86 |
412 | from __future__ import print_function, absolute_import
def display(args):
# Display information of current training
print('Learn Rate \t%.1e' % args.lr)
print('Epochs \t%05d' % args.epochs)
print('Log Path \t%s' % args.save_dir)
print('Network \t %s' % args.net)
print('Data Set \t %s' % arg... | 280 |
337 | import pywasm
# pywasm.on_debug()
runtime = pywasm.load('./examples/add.wasm')
r = runtime.exec('add', [4, 5])
print(r) # 4 + 5 = 9
| 60 |
1,125 | <filename>third_party/libigl/include/igl/cut_mesh.h<gh_stars>1000+
// This file is part of libigl, a simple c++ geometry processing library.
//
// Copyright (C) 2019 <NAME> <<EMAIL>>
//
// This Source Code Form is subject to the terms of the Mozilla Public License
// v. 2.0. If a copy of the MPL was not distributed wit... | 1,097 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.