max_stars_count
int64
301
224k
text
stringlengths
6
1.05M
token_count
int64
3
727k
1,627
<gh_stars>1000+ #!/usr/bin/env python3 from aws_cdk import core from the_state_machine.the_state_machine_stack import TheStateMachineStack app = core.App() TheStateMachineStack(app, "the-state-machine") app.synth()
79
860
/* * 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 ...
388
690
package com.artemis.common; import com.artemis.Component; /** * @author <NAME> */ public class NotExplicitlyDelayedComponent extends Component { public NotExplicitlyDelayedComponent() { } }
65
504
package org.dayatang.domain; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.lang.annotation.Annotation; import java.util.*; /** * <p> * 实例工厂类,充当IoC容器的门面,通过它可以获得部署在IoC容器中的Bean的实例。 InstanceFactory向客户代码隐藏了IoC * 工厂的具体实现。在后台,它通过InstanceProvider策略接口,允许选择不同的IoC工厂,例如Spring, Google Guice和 * Tapestry...
3,620
28,056
package com.alibaba.json.bvt.bug; import java.util.HashMap; import java.util.Map; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.serializer.SerializerFeature; import junit.framework.TestCase; public class Bug_for_lenolix_5 extends TestCase { public void test_for_objectKey() throws Exception { fin...
248
466
/* Copyright (c) 2010, NullNoname 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 ...
7,148
1,723
/*************************************************************************** * * Copyright (c) Microsoft Corporation. All rights reserved. * * This source is subject to the Microsoft Public License. * See http://www.microsoft.com/en-us/openness/licenses.aspx#MPL. * All other rights reserved. * * THIS CODE AND ...
11,670
439
<filename>exercises/concept/remote-control-competition/src/main/java/RemoteControlCar.java public interface RemoteControlCar { // TODO implement the RemoteControlCar interface }
50
318
#pragma once #ifndef OPENGM_SHAPE_ACCESSOR_HXX #define OPENGM_SHAPE_ACCESSOR_HXX namespace opengm { /// \cond HIDDEN_SYMBOLS template<class FUNCTION> class FunctionShapeAccessor { public: typedef size_t value_type; typedef const value_type reference; typedef const value_type* pointer; ...
2,391
6,989
<reponame>HeyLey/catboost #include "holder_vector.h"
22
348
<filename>docs/data/leg-t2/088/08803371.json {"nom":"Raon-aux-Bois","circ":"3ème circonscription","dpt":"Vosges","inscrits":990,"abs":558,"votants":432,"blancs":32,"nuls":15,"exp":385,"res":[{"nuance":"DVD","nom":"M. <NAME>","voix":215},{"nuance":"REM","nom":"M. <NAME>","voix":170}]}
118
18,396
<reponame>xumia/debian-openssl<filename>crypto/md4/md4_one.c /* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the sou...
534
357
/* * * 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/LICENSE-2.0 * * Unless required ...
4,455
13,885
// Copyright 2017 The Draco 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...
3,107
1,510
/* * 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 ...
754
352
<filename>search/config.h /* for MAX_TXT_SEG_BYTES & MAX_TXT_SEG_LEN */ #include "txt-seg/config.h" #define MAX_TERM_BYTES MAX_TXT_SEG_BYTES /* consider both math & term */ #define MAX_QUERY_BYTES (MAX_TXT_SEG_BYTES * 32) #define MAX_QUERY_WSTR_LEN (MAX_TXT_SEG_LEN * 32) #define MAX_MERGE_POSTINGS 4096 #define M...
490
340
<filename>arch/x86_64/fpu/cmp_ult_32.h // // arch/x86_64/fpu/cmp_ult_32.h // // This file is subject to the terms and conditions defined in // 'LICENSE', which is part of this source code package. // #include "common.h" #include <emmintrin.h> #include <string.h> static inline uint8_t fpu_cmp_ult_32( const uint32_t ...
260
544
<filename>src/test/online_test_dispatcher.cc<gh_stars>100-1000 #include "online_test_dispatcher.h" #include <iostream> #include <thread> #include "online_test_model.h" #include "online_test.h" #include "online_test_app.h" namespace test { std::deque<std::pair<std::function <void(std::vector<TestType>)>, std::vecto...
6,434
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.devtestlabs.implementation; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com....
4,570
543
<gh_stars>100-1000 /** * Copyright 2016 Twitter. 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 req...
424
315
#include "tst_cmc_hashmap.h" static struct hashmap_entry *hm_impl_get_entry(struct hashmap *_map_, size_t key); static size_t hm_impl_calculate_size(size_t required); struct hashmap *hm_new(size_t capacity, double load, struct hashmap_fkey *f_key, struct hashmap_fval *f_val) { return hm_new_custom(capacity, load,...
12,030
377
<gh_stars>100-1000 //------------------------------------------------------------------------------ // textwriter.cc // (C) 2006 Radon Labs GmbH // (C) 2013-2020 Individual contributors, see AUTHORS file //------------------------------------------------------------------------------ #include "foundation/stdneb.h" #...
532
4,345
// // EACodeReleases.h // Coding_iOS // // Created by Easeeeeeeeee on 2018/3/22. // Copyright © 2018年 Coding. All rights reserved. // #import "EABasePageModel.h" #import "EACodeRelease.h" #import "Project.h" @interface EACodeReleases : EABasePageModel @property (strong, nonatomic) Project *curPro; - (NSString *)...
139
369
<gh_stars>100-1000 // Copyright (c) 2017-2022, Mudita <NAME>. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include "SystemManager/CpuPrinter.hpp" #include "SystemManager/SysCpuUpdateResult.hpp" #include <SystemManager/SystemManagerCommon.hpp> #include <log/log.hpp> #includ...
913
6,436
<reponame>TygoB-B5/OSCSpaceShooter #pragma once class ofxTCPSettings { public: ofxTCPSettings(std::string _address, int _port) { address = _address; port = _port; } ofxTCPSettings(int _port) { port = _port; } std::string address; int port; bool blocking = false; bool reuse = false; std::string message...
143
909
public class NamedAndDefaultArgs { public void <caret>foo(int i, int j, String s, boolean b) {} static class Inner extends NamedAndDefaultArgs { @Override public void foo(int i, int j, String s, boolean b) { System.out.println(); } public void boo() { su...
161
3,301
package com.alibaba.alink.params.regression; import com.alibaba.alink.params.classification.GbdtTrainParams; import com.alibaba.alink.params.shared.colname.HasGroupCol; public interface LambdaMartNdcgParams<T> extends GbdtTrainParams <T>, HasGroupCol <T> { }
97
872
#!/usr/bin/python3 """ A zero-indexed array A of length N contains all integers from 0 to N-1. Find and return the longest length of set S, where S[i] = {A[i], A[A[i]], A[A[A[i]]], ... } subjected to the rule below. Suppose the first element in S starts with the selection of element A[i] of index = i, the next element...
662
573
// Copyright 2015, VIXL authors // 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 conditions ...
34,094
2,494
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: set ts=8 sts=4 et sw=4 tw=99: * 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 with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ...
6,716
301
/****************************************************************** * * Copyright 2015 Samsung Electronics 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 * ...
2,754
531
<filename>native/common/include/jp_proxy.h /***************************************************************************** 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...
829
9,402
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. /*===================================================================== ** ** Source: vsprintf.h ** ** Purpose: Helper functions for the vsprintf tests. ** ** **================...
3,120
1,043
package eu.rekawek.coffeegb.memory.cart.battery; public interface Battery { void loadRam(int[] ram); void saveRam(int[] ram); void loadRamWithClock(int[] ram, long[] clockData); void saveRamWithClock(int[] ram, long[] clockData); Battery NULL_BATTERY = new Battery() { @Override ...
272
1,375
{"class":{"name":"Phaser.RequestAnimationFrame","extends":"","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"A reference to the currently running game.","optional":false,"default":null},{"name":"forceSetTimeOut","type":["boolean"],"help":"Tell Phaser to use setTimeOut even ...
809
759
<reponame>Siyuan89/self-attention-cv<gh_stars>100-1000 import torch from einops import rearrange from torch import nn, einsum from ..pos_embeddings import RelPosEmb2D class BottleneckAttention(nn.Module): def __init__( self, dim, fmap_size, heads=4, dim...
1,154
777
<gh_stars>100-1000 // Copyright 2015 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/image_decoder.h" #include "base/macros.h" #include "build/build_config.h" #include "chrome/grit/generated_res...
4,636
428
package info.ata4.bspsrc.modules.texture.tooltextures; import info.ata4.bsplib.struct.BrushFlag; import info.ata4.bsplib.struct.SurfaceFlag; import java.util.*; public interface ToolTextureDefinition { /** * Note: While the engine may use some form of default surface property for materials which ...
1,959
8,027
#import <Foundation/Foundation.h> @interface Strings : NSObject + (NSString *)helloString; @end
33
454
<reponame>Inego/smallrye-mutiny package io.smallrye.mutiny.converters.uni; import java.util.function.Function; import io.reactivex.Completable; import io.smallrye.mutiny.Uni; public class ToCompletable<T> implements Function<Uni<T>, Completable> { public static final ToCompletable INSTANCE = new ToCompletable()...
200
952
#include "plugin_factory.h" #include "trt_utils.h" //PluginFactory::PluginFactory() : m_ReorgLayer{nullptr}, m_RegionLayer{nullptr} //{ // for (int i = 0; i < m_MaxLeakyLayers; ++i) m_LeakyReLULayers[i] = nullptr; //} // //nvinfer1::IPlugin* PluginFactory::createPlugin(const char* layerName, const void* serialDat...
2,971
14,668
# 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. """A script to split Chrome variations into two sets. Chrome runs with many experiments and variations (field trials) that are randomly selected based on a ...
6,119
679
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to y...
3,633
877
import org.checkerframework.checker.nullness.qual.*; // test-case for issue 160 public class ControlFlow { public static void main(String[] args) { String s = null; if (s == null) { // Important! } else { // Can also throw exception or call System#exit return; } // :: error: (de...
147
777
/* * Copyright (C) 2010 Google 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: * * * Redistributions of source code must retain the above copyright * notice, this list of conditio...
955
412
<reponame>Emersonxuelinux/aliyun-odps-python-sdk<filename>odps/ml/text/_customize.py<gh_stars>100-1000 # encoding: utf-8 # Copyright 1999-2017 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obta...
853
335
{ "word": "Vang", "definitions": [ "Each of two guy ropes running from the end of a gaff to the deck.", "A fitting used to pull a boat's boom down and help control the shape of the sail." ], "parts-of-speech": "Noun" }
97
307
#pragma once #include "globalincs/pstypes.h" #include "parse/sexp.h" namespace sexp { struct integer_return { int value = -1; bool is_nan = false; bool is_nan_forever = false; integer_return(); integer_return(int _value); }; namespace detail { void nodeToValue(int node, bool& valOut); template <typename T> ...
441
918
<reponame>madanagopaltcomcast/pxCore # Copyright 2012 the V8 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. { 'variables': { 'v8_code': 1, 'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc', 'cctest_sour...
9,754
348
<gh_stars>100-1000 {"nom":"Chaux-la-Lotière","circ":"1ère circonscription","dpt":"Haute-Saône","inscrits":334,"abs":162,"votants":172,"blancs":16,"nuls":1,"exp":155,"res":[{"nuance":"REM","nom":"Mme <NAME>","voix":94},{"nuance":"FN","nom":"Mme <NAME>","voix":61}]}
109
2,294
def m_step(gamma, xi, dt): """Calculate the M-step updates for the HMM spiking model. Args: gamma (): Number of epochs of EM to run xi (numpy 3d array): Tensor of recordings, has shape (n_trials, T, C) dt (float): Duration of a time bin Returns: psi_new (numpy vector): Updated initia...
434
892
<gh_stars>100-1000 { "schema_version": "1.2.0", "id": "GHSA-ppm8-x2wc-89pm", "modified": "2022-05-02T03:56:12Z", "published": "2022-05-02T03:56:12Z", "aliases": [ "CVE-2009-4603" ], "details": "Unspecified vulnerability in sapstartsrv.exe in the SAP Kernel 6.40, 7.00, 7.01, 7.10, 7.11, and 7.20, as us...
609
56,632
package org.opencv.test.objdetect; import org.opencv.test.OpenCVTestCase; public class ObjdetectTest extends OpenCVTestCase { public void testGroupRectanglesListOfRectListOfIntegerInt() { fail("Not yet implemented"); /* final int NUM = 10; MatOfRect rects = new MatOfRect(); ...
562
905
import databases import sqlalchemy import ormar database = databases.Database("sqlite:///db.sqlite") metadata = sqlalchemy.MetaData() class Course(ormar.Model): class Meta: database = database metadata = metadata # define your constraints in Meta class of the model # it's a list ...
220
892
<filename>advisories/unreviewed/2022/04/GHSA-mvr6-2vwj-5j5r/GHSA-mvr6-2vwj-5j5r.json { "schema_version": "1.2.0", "id": "GHSA-mvr6-2vwj-5j5r", "modified": "2022-05-04T00:00:37Z", "published": "2022-04-22T00:00:27Z", "aliases": [ "CVE-2022-22558" ], "details": "Dell PowerEdge Server BIOS contains an Im...
474
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 CHROME_BROWSER_CHROMEOS_POLICY_DLP_DLP_POLICY_CONSTANTS_H_ #define CHROME_BROWSER_CHROMEOS_POLICY_DLP_DLP_POLICY_CONSTANTS_H_ namespace policy { ...
404
892
<reponame>westonsteimel/advisory-database-github { "schema_version": "1.2.0", "id": "GHSA-5gj9-j32c-8ch5", "modified": "2022-05-01T23:31:25Z", "published": "2022-05-01T23:31:25Z", "aliases": [ "CVE-2008-0550" ], "details": "Off-by-one error in Steamcast 0.9.75 and earlier allows remote attackers to ca...
476
12,278
<reponame>randolphwong/mcsema // // Copyright (c) 2009-2011 <NAME> (Tonkikh) // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_LOCALE_CONFIG_HPP_INCLUDED #define BOOST_LOCALE_CONFIG_HPP_INCL...
412
405
<filename>jeewx/src/main/java/org/jeecgframework/web/rest/entity/WeixinOpenAccountEntity.java package org.jeecgframework.web.rest.entity; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persiste...
960
1,247
<filename>BattleBunniesProject/AndEngine/src/main/java/org/andengine/opengl/texture/region/TextureRegion.java package org.andengine.opengl.texture.region; import org.andengine.opengl.texture.ITexture; /** * (c) 2010 <NAME> * (c) 2011 Zynga Inc. * * @author <NAME> * @since 14:29:59 - 08.03.2010 */ public class ...
1,944
3,212
<filename>c2/c2-protocol/c2-protocol-api/src/main/java/org/apache/nifi/c2/protocol/api/C2OperationState.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 regarding copyright owner...
1,655
2,739
<filename>models/recall/mind/infer.py<gh_stars>1000+ # Copyright (c) 2020 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....
4,126
698
<filename>src/java/nginx/clojure/HackUtils.java /** * Copyright (C) Zhang,Yuexiang (xfeep) * */ package nginx.clojure; import static nginx.clojure.MiniConstants.STRING_CHAR_ARRAY_OFFSET; import static nginx.clojure.MiniConstants.STRING_OFFSET_OFFSET; import java.io.FileDescriptor; import java.io.RandomAccessFile;...
4,949
2,151
<reponame>zipated/src /* * Copyright (C) 2012 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, ...
4,416
1,609
package com.mossle.disk.service.internal; import java.io.FileNotFoundException; import java.io.InputStream; import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; import java.util.Date; import java.util.List; import javax.activation.DataSource; import javax.annotation.Resource; import...
13,451
311
--- gnulib-lib/glthread/threadlib.c.orig 2014-07-14 07:28:34 UTC +++ gnulib-lib/glthread/threadlib.c @@ -29,11 +29,10 @@ # if PTHREAD_IN_USE_DETECTION_HARD -/* The function to be executed by a dummy thread. */ -static void * -dummy_thread_func (void *arg) +static pthread_once_t dummy_once_control = PTHREAD_ONCE_I...
456
364
package io.github.jklingsporn.vertx.jooq.shared.reactive; import io.vertx.core.json.JsonArray; import io.vertx.core.json.JsonObject; import io.vertx.sqlclient.Row; /** * Created by jensklingsporn on 07.08.18. */ public class JsonAccessor { private JsonAccessor(){} public static JsonObject getJsonObject(Ro...
215
4,002
/* @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ # Project: Cornos # File: CrashPlayer # Created by saturn5VFive PLEASE READ THE COPYRIGHT NOTICE IN THE PROJECT ROOT, IF EXISTENT @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */ package me.zeroX150.cornos.features.command.impl; import me.zeroX150.cornos.Cornos; i...
441
356
# kim/pipelines/static.py # Copyright (C) 2014-2015 the Kim authors and contributors # <see AUTHORS file> # # This module is part of Kim and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from .base import pipe from .serialization import SerializePipeline @pipe(run_if_none=Tr...
278
4,994
<gh_stars>1000+ import dcim.fields import django.core.serializers.json import django.core.validators from django.db import migrations, models import django.db.models.deletion import taggit.managers import utilities.fields import utilities.ordering import utilities.query_functions class Migration(migrations.Migration)...
4,407
1,601
<reponame>ryankurte/codechecker<filename>web/server/tests/unit/test_util_fileread.py # ------------------------------------------------------------------------- # # Part of the CodeChecker project, under the Apache License v2.0 with # LLVM Exceptions. See LICENSE for license information. # SPDX-License-Identifier: A...
524
335
{ "word": "User", "definitions": [ "A person who uses or operates something.", "A person who takes illegal drugs; an addict.", "A person who exploits others.", "The continued use or enjoyment of a right." ], "parts-of-speech": "Noun" }
111
425
# Twelve Days of Christmas, Python style gifts = ["A partridge in a pear tree", "Two turtle doves", "Three french hens", "Four colly birds", "Five golden rings", "Six geese-a-laying", "Seven swans-a-swimming", "Eight maids-a-milking", "Nine ladie...
1,029
4,405
/* ** 2019-10-23 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** **************************...
3,002
1,042
<filename>tests/unittest/xqc_timer_test.c /** * @copyright Copyright (c) 2022, Alibaba Group Holding Limited */ #include <CUnit/CUnit.h> #include "xqc_timer_test.h" #include <stdlib.h> static void xqc_timer_cb(unsigned long data) { //printf("timer callback data:%lu now:%lu\n", data, xqc_gettimeofday()); } voi...
534
563
package com.gentics.mesh.core.action; import com.gentics.mesh.core.data.HibBaseElement; import com.gentics.mesh.core.data.page.Page; import com.gentics.mesh.parameter.PagingParameters; /** * Loading schemas from a project requires a different loading action. This interface allows for different implementations. * *...
210
1,988
/* * (C) 2020 <NAME> * * Botan is released under the Simplified BSD License (see license.txt) */ #include <botan/internal/shacal2.h> #include <arm_neon.h> namespace Botan { /* Only encryption is supported since the inverse round function would require a different instruction */ BOTAN_FUNC_ISA("+crypto") void SHACAL2...
1,820
839
<filename>microprofile-reactive-messaging-kafka/src/main/java/org/wildfly/quickstarts/microprofile/reactive/messaging/UserResource.java /* * JBoss, Home of Professional Open Source * Copyright 2021, Red Hat, Inc. and/or its affiliates, and individual * contributors by the @authors tag. See the copyright.txt in the ...
618
687
<reponame>Madara9744/kestra package io.kestra.core.runners.pebble.filters; import com.mitchellbosecke.pebble.error.PebbleException; import com.mitchellbosecke.pebble.extension.Filter; import com.mitchellbosecke.pebble.template.EvaluationContext; import com.mitchellbosecke.pebble.template.PebbleTemplate; import io.kest...
526
868
// Copyright (C) 2020 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 obtain a copy of the // License at // // https://opensource.org/licenses/BSD-3-Clause // // Unless req...
1,149
1,428
/** * This is the solution to the hackerrank problem : https://www.hackerrank.com/challenges/mars-exploration **/ #include <iostream> using namespace std; int main(){ string S; cin >> S; string sos = "SOS"; int count=0; int length = S.length(); for(int i=0;i<length;i++) { for(int j...
345
905
import re import binascii import hashlib from base64 import b64decode from malwareconfig import crypto from malwareconfig.common import Decoder from malwareconfig.common import string_printable class AAR(Decoder): decoder_name = "AAR" decoder__version = 1 decoder_author = "@kevthehermit" decoder_des...
940
790
<reponame>loftwah/appscale<filename>SearchService2/appscale/search/facet_converter.py<gh_stars>100-1000 import collections import logging from appscale.search.constants import InvalidRequest from appscale.search.models import FacetResult, SolrSchemaFieldInfo logger = logging.getLogger(__name__) def discover_facets(...
3,379
1,379
/* * Copyright 2008-2014 LinkedIn, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
2,480
2,943
<gh_stars>1000+ from qark.plugins.generic.task_affinity import TaskAffinity import os def test_task_affinity(test_java_files): plugin = TaskAffinity() path = os.path.join(test_java_files, "task_affinity.java") plugin.update(file_path=path) plugin.run() assert 1 == len(plugi...
140
1,391
/* Copyright (c) 2002-2006 <NAME>; see LICENSE */ #include <stdarg.h> #include "plan9.h" #include "fmt.h" #include "fmtdef.h" void __fmtlock(void) { } void __fmtunlock(void) { }
85
376
#ifdef HAVE_CONFIG_H #include "../../../../../ext_config.h" #endif #include <php.h> #include "../../../../../php_ext.h" #include "../../../../../ext.h" #include <Zend/zend_operators.h> #include <Zend/zend_exceptions.h> #include <Zend/zend_interfaces.h> #include "kernel/main.h" #include "kernel/object.h" #include "k...
3,369
854
<reponame>rakhi2001/ecom7 __________________________________________________________________________________________________ sample 36 ms submission class Solution: def minCostToMoveChips(self, chips: List[int]) -> int: ans = [0, 0] for c in chips: ans[c % 2] += 1 return min(ans)...
174
305
<reponame>medismailben/llvm-project<filename>lldb/source/Host/common/FileAction.cpp //===-- FileAction.cpp ----------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-Li...
942
575
<filename>chromeos/startup/startup.h // 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 CHROMEOS_STARTUP_STARTUP_H_ #define CHROMEOS_STARTUP_STARTUP_H_ #include <string> #include "base/component_...
243
504
<reponame>steakknife/pcgeos<gh_stars>100-1000 /*- * lstFake.c -- * This is a file whose sole purpose is to force ranlib to * place enough entries in the library's table of contents to * prevent it (the table of contents) from looking like an object * file. As of this writing, the table had 0410 (shared text) ...
392
14,668
<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. package org.chromium.chrome.browser.ui.autofill; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.times; import...
1,561
777
<reponame>google-ar/chromium // Copyright 2015 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.chrome.browser.media.ui; import static org.chromium.base.test.util.Restriction.RESTRICTION_TYPE_NON_LOW...
3,475
1,475
/* * 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 ...
4,229
1,723
<gh_stars>1000+ #include "heatmapview.h" #include <qmath.h> #include <QToolTip> #include <QPainter> #include <QMouseEvent> HeatmapView::HeatmapView(QWidget* parent) : GraphView(parent), m_data(NULL) { m_rowHeight = 20; setMouseTracking(true); } void HeatmapView::setDataProvider(HeatmapDataProvider* ...
4,010
914
/* * Copyright 2016 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
992
751
/* * Copyright (c) 2019, Salesforce.com, Inc. * All rights reserved. * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ package com.salesforce.rx3grpc; import java.util.concurrent.TimeUnit; import org....
1,339
1,960
<reponame>gkomlossi/avro /* * 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...
1,860
563
#pragma once #define PRECOMP_INCLUDED
17
1,093
<reponame>StandCN/spring-integration<filename>spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpsOutboundChannelAdapterParserTests.java /* * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this...
907