max_stars_count
int64
301
224k
text
stringlengths
6
1.05M
token_count
int64
3
727k
327
<reponame>who1smrrobot/Apollo /* <NAME> `gentilkiwi` https://blog.gentilkiwi.com <EMAIL> Licence : https://creativecommons.org/licenses/by/4.0/ */ #include "utils.h" #include <dhcpssdk.h> #define MAC_ADDRESS_SIZE 6 #define MAC_SOURCE_ADDRESS_OFFSET 28 BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_ca...
269
916
<gh_stars>100-1000 package com.vladmihalcea.flexypool.connection; import com.codahale.metrics.MetricRegistry; import com.codahale.metrics.Slf4jReporter; import com.codahale.metrics.Timer; import com.vladmihalcea.flexypool.util.TestUtils; import org.junit.Test; import org.mockito.Mockito; import org.slf4j.Logger; impor...
1,682
1,511
* * Linux-specific hypervisor handling. * * Copyright (c) 2002-2004, <NAME> * * This program is free software; you can redistribute it and/or * and to permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice sha...
233
328
package com.ctg.test.shiro; import com.alibaba.fastjson.JSONObject; import com.ctg.test.model.Permission; import com.ctg.test.model.Role; import com.ctg.test.model.User; import com.ctg.test.service.impl.UserServiceImpl; import org.apache.shiro.authc.*; import org.apache.shiro.authz.AuthorizationInfo; import org.apache...
2,034
3,508
package com.fishercoder.solutions; import java.util.LinkedList; import java.util.Queue; public class _695 { public static class Solution1 { public int maxAreaOfIsland(int[][] grid) { if (grid == null || grid.length == 0) { return 0; } int m = grid.lengt...
2,011
2,211
<filename>pay-java-common/src/main/java/com/egzosn/pay/common/bean/RefundResult.java package com.egzosn.pay.common.bean; import java.io.Serializable; import java.math.BigDecimal; import java.util.Map; /** * 退款结果 * <p> * * @author Egan * <pre> * email <EMAIL> * date 2020/8/16 9:55 * </pre> */ public interface...
1,279
653
<reponame>matrixji/cpp_study // Copyright (c) 2020 by Chrono // // sudo apt-get install libzmq3-dev // // g++ zmq.cpp -std=c++14 -lzmq -lpthread -o a.out;./a.out #include <iostream> #include <string> #include <vector> #include <future> #include <zmq.hpp> using namespace std; const auto thread_num = 1; zmq::contex...
1,198
406
package org.broad.igv.sam; import htsjdk.samtools.util.CloseableIterator; import org.broad.igv.sam.reader.BAMReader; import org.broad.igv.sam.reader.SAMReader; import org.broad.igv.util.ResourceLocator; import org.broad.igv.util.TestUtils; import org.junit.Test; import java.io.IOException; import static junit.framew...
722
335
<gh_stars>100-1000 { "word": "Decongestant", "definitions": [ "(chiefly of a medicine) used to relieve nasal congestion." ], "parts-of-speech": "Adjective" }
76
569
<filename>py_mini_racer/__about__.py<gh_stars>100-1000 __author__ = 'Sqreen' __email__ = '<EMAIL>' __version__ = '0.6.0'
57
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 "...
837
2,322
/* * Copyright (C) 2015 <NAME> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is di...
1,176
369
/* * Copyright © 2021 <NAME>, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
1,586
892
{ "schema_version": "1.2.0", "id": "GHSA-6456-xjm5-g3pg", "modified": "2022-05-13T01:01:02Z", "published": "2022-05-13T01:01:02Z", "aliases": [ "CVE-2018-1999007" ], "details": "A cross-site scripting vulnerability exists in Jenkins 2.132 and earlier, 2.121.1 and earlier in the Stapler web framework's...
530
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...
6,095
3,222
<reponame>fuss86/maven<filename>maven-core/src/main/java/org/apache/maven/plugin/CycleDetectedInPluginGraphException.java<gh_stars>1000+ package org.apache.maven.plugin; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with ...
475
8,772
package org.apereo.cas.support.events.mongo; import org.apereo.cas.config.CasCoreHttpConfiguration; import org.apereo.cas.config.MongoDbEventsConfiguration; import org.apereo.cas.support.events.AbstractCasEventRepositoryTests; import org.apereo.cas.support.events.CasEventRepository; import org.apereo.cas.util.junit.En...
538
402
from tensorboard import SummaryWriter from tensorboard.summary import scalar from tensorboard.src import summary_pb2 def test_log_scalar_summary(): logdir = './experiment/scalar' writer = SummaryWriter(logdir) for i in range(10): writer.add_scalar('test_scalar', i+1) writer.close() def test_...
346
431
<filename>contrib/testgen/miner_gen.cpp pblocktemplate->block.hashPrevBlock = uint256S("7497ea1b465eb39f1c8f507bc877078fe016d6fcb6dfad3a64c98dcc6e1e8496"); while(true) { CBlock *pblock = &pblocktemplate->block; // pointer for convenience std::cout << pblock->hashPrevBlock.ToString() << std::end...
1,461
2,813
package org.jabref.gui.util; import javafx.animation.Animation; import javafx.animation.Transition; import javafx.geometry.HPos; import javafx.geometry.VPos; import javafx.scene.control.Hyperlink; import javafx.scene.layout.Region; import javafx.scene.shape.Rectangle; import javafx.scene.text.Text; import javafx.scene...
1,050
1,056
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
2,457
640
<gh_stars>100-1000 /* Lib3D Extension, imported from: GFX - a small graphics library Copyright (C) 2004 <NAME> Dot product of v1 by v2 $Id: vector_dot_product.c,v 1.1 2009-04-10 12:47:42 stefano Exp $ */ #include <lib3d.h> int vector_dot_product (vector_t* v1, vector_t* v2) { //return (v1->x * v2->x + ...
208
322
<gh_stars>100-1000 /* log.c * * Copyright (C) 2014-2020 wolfSSL Inc. * * This file is part of wolfSSH. * * wolfSSH 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 3 of the License, or *...
1,682
435
package datawave.query.ancestor; import datawave.query.CloseableIterable; import datawave.query.config.ShardQueryConfiguration; import datawave.query.exceptions.DatawaveQueryException; import datawave.query.exceptions.InvalidQueryException; import datawave.query.jexl.visitors.RootNegationCheckVisitor; import datawave....
669
324
<filename>providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/VaultProperties.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 owners...
1,761
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....
905
578
// Copyright (c) 2019 <NAME> <EMAIL> // This software is provided 'as-is' under the zlib License, see the LICENSE.txt file. // This notice and the license may not be removed or altered from any source distribution. #pragma once #ifndef TWO_MODULES #include <stl/vector.h> #include <math/Vec.h> #endif #include <ctx/...
954
669
<gh_stars>100-1000 // Copyright(c) 2019 - 2020, #Momo // 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, this //...
4,765
1,909
<reponame>grmkris/XChange package org.knowm.xchange.examples.kraken.trade; import java.io.IOException; import java.math.BigDecimal; import java.util.List; import java.util.Map; import org.knowm.xchange.Exchange; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.Order.OrderType; import org.kn...
1,170
634
<filename>platform/platform-api/src/com/intellij/openapi/util/EdtRunnable.java<gh_stars>100-1000 /* * Copyright 2000-2009 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at...
371
902
package io.hawt.jmx; public interface JmxTreeWatcherMBean { long getCounter(); }
34
5,169
{ "name": "MLImageSegmentationLibrary", "version": "2.0.4.300", "summary": "HMS Core Image Segmentation.", "description": "Image Segmentation Framework", "homepage": "https://developer.huawei.com/consumer/cn/doc/development/HMS-Guides/3021001", "license": { "type": "MIT", "file": "LICENSE" }, "a...
314
2,113
//----------------------------------------------------------------------------- // Copyright (c) 2012 GarageGames, LLC // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restrictio...
6,846
1,094
<gh_stars>1000+ /** Logging interface for the library. */ #pragma once #include <akumuli.h> #include <string> namespace Akumuli { struct Logger { static aku_logger_cb_t set_logger(aku_logger_cb_t new_logger); static void msg(aku_LogLevel lvl, const char* msg); static void msg(aku_LogLevel lvl, std::stri...
134
387
<reponame>Jaikishan-Saroj-786/jpf-core<gh_stars>100-1000 /* * Copyright (C) 2014, United States Government, as represented by the * Administrator of the National Aeronautics and Space Administration. * All rights reserved. * * The Java Pathfinder core (jpf-core) platform is licensed under the * Apache License, Ve...
2,042
634
<filename>modules/base/external-tools-impl/src/main/java/consulo/backgroundTaskByVfsChange/ui/BackgroundTaskByVfsChangePanel.java /* * Copyright 2013-2016 consulo.io * * 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...
877
843
from threading import local import django.dispatch from django.core.signals import request_finished _to_save = local() def add_translation(*, instance, translation, field): """ Queue a `translation` that needs to be saved for a particular `field` on `instance`. """ if not hasattr(_to_save, 'tr...
582
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...
966
1,060
<gh_stars>1000+ package com.linkedin.parseq.batching; import java.util.Map; import java.util.Set; import com.linkedin.parseq.Context; import com.linkedin.parseq.Task; import com.linkedin.parseq.function.Try; /** * This is a base class for a batching strategy that leverages existing Task-based API. * <p> * Example...
1,539
1,778
#import <UIKit/UIKit.h> @interface GSKTableViewCell : UITableViewCell + (NSString *)reuseIdentifier; + (void)registerIn:(UITableView *)tableView; @end
57
1,056
<reponame>timfel/netbeans<gh_stars>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 Lice...
2,755
14,668
<gh_stars>1000+ // Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import android.a...
1,955
3,428
<reponame>ghalimi/stdlib {"id":"00420","group":"easy-ham-2","checksum":{"type":"MD5","value":"f6140b71df992b02cc59548039eb05ca"},"text":"From <EMAIL> Fri Aug 16 12:00:13 2002\nReturn-Path: <<EMAIL>>\nDelivered-To: y<EMAIL>.netnoteinc.com\nReceived: from localhost (localhost [127.0.0.1])\n\tby phobos.labs.netnoteinc.co...
1,036
518
<filename>tools/tag.py #!/usr/bin/env python3 import subprocess from pathlib import Path def run(*args): return subprocess.check_output(args).decode().strip() def main(): branch = run("git", "rev-parse", "--abbrev-ref", "HEAD") if branch != "master": print("Current branch not 'master', skipping ...
257
887
# Copyright (c) 2020 UATC, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
1,382
1,853
/* * Copyright 2018 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 applicable l...
1,006
1,183
<reponame>Doc-Pixel/vyper def test_values_should_be_increasing_ints(get_contract): code = """ enum Action: BUY SELL CANCEL @external @view def buy() -> Action: return Action.BUY @external @view def sell() -> Action: return Action.SELL @external @view def cancel() -> Action: return Action....
181
1,338
<filename>magick-installer/libiconv-1.13.1/lib/cp860.h /* * Copyright (C) 1999-2002 Free Software Foundation, Inc. * This file is part of the GNU LIBICONV Library. * * The GNU LIBICONV Library is free software; you can redistribute it * and/or modify it under the terms of the GNU Library General Public * License ...
3,789
2,151
/* * Copyright (c) 2011 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...
415
341
<filename>src/main/java/com/ccnode/codegenerator/util/JsonFeature.java package com.ccnode.codegenerator.util; /** * What always stop you is what you always believe. * <p> * Created by zhengjun.du on 2016/04/30 22:25 */ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonGene...
1,174
11,356
<gh_stars>1000+ /* * Copyright 2010-2017 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 * *...
883
682
public abstract class Return { Object returnThis() { return this; } Object returnNull() { return null; } void exit() { return; } Object returnCast() { return (BeanItemContainer<BEANTYPE>) super.getContainerDataSource(); } Object returnSomethingWhichDoNotBreak() { return oneVar...
347
678
<gh_stars>100-1000 /** * This header is generated by class-dump-z 0.2b. * * Source: /System/Library/PrivateFrameworks/OfficeImport.framework/OfficeImport */ #import <OfficeImport/OfficeImport-Structs.h> #import <OfficeImport/WDCharacterProperties.h> #import <OfficeImport/XXUnknownSuperclass.h> @class WDDocument; ...
5,338
348
<reponame>Amit0617/OpenMS #ifndef _TEMPLATESEARCH_HPP #define _TEMPLATESEARCH_HPP #include <assert.h> #include <utility> typedef unsigned char TEMPLATE_SEARCH_INT_TYPE; // For dynamically looking up a class and calling the static // function apply(...). This can be preferred to LogSearch when you // are amortizing t...
559
2,843
package com.ycbjie.note.markdown.parser; import com.ycbjie.note.markdown.Markdown; public class HeaderParser extends Markdown.MDParser { public static final String HEADER = "# "; public static final String HEADER2 = "## "; public static final String HEADER3 = "### "; @Override public Markdown.M...
381
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.network.generated; import com.azure.core.management.SubResource; import com.azure.core.util.Context; import com.azure.resourcema...
30,569
696
/* * Copyright (C) 2016 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.strata.measure.bond; import java.util.HashMap; import java.util.Map; import java.util.Optional; import java.util.Set; import com.google.common.collect.Immutabl...
2,448
435
// Copyright (c) 2016/17/18/19/20/21 <NAME> <<EMAIL>> // Copyright (c) 2008 <NAME> <<EMAIL>> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limit...
637
1,074
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from functools import wraps from crypten.config import cfg from .debug import MultiprocessingPdb, configure_logging...
285
435
{ "alias": "video/2322/planting-open-source-seeds", "category": "PyCon CA 2013", "copyright_text": "CC BY-SA 2.5 CA", "description": "", "duration": 40, "id": 2322, "language": "eng", "quality_notes": "", "recorded": "2013-08-11", "slug": "planting-open-source-seeds", "speakers": [ "<NAME>" ...
330
432
<gh_stars>100-1000 // vJoyInstall wrapper interface functions #ifdef __cplusplus #define EC "C" #else #define EC #endif extern EC int WINAPI Func3(void); extern EC BOOL WINAPI is_ppjoy_installed(void); extern EC BOOL WINAPI is_vjoy_installed(void); extern EC BOOL WINAPI is_vjoy_installed_specific(USHORT Revisio...
319
3,428
<filename>lib/node_modules/@stdlib/datasets/spam-assassin/data/easy-ham-1/01722.d77de28865080535c4e108eada26ed24.json<gh_stars>1000+ {"id":"01722","group":"easy-ham-1","checksum":{"type":"MD5","value":"d77de28865080535c4e108eada26ed24"},"text":"Return-Path: <EMAIL>\nDelivery-Date: Sun Sep 8 21:13:40 2002\nFrom: <EMAIL...
342
852
#!/usr/bin/env python3 """ mixture.py replaces the functionality of mixture.f Usage: $ python3 mixture.py filename.in Where `filename.in` contains a set of mixtures and its components: The format for `filename.in` is as follows: Each mixture description starts with a hash symbol (#) and contains the following inf...
5,645
777
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "core/html/parser/HTMLTreeBuilderSimulator.h" #include "core/html/parser/CompactHTMLToken.h" #include "core/html/parser/HTMLToken.h" #include "c...
987
320
<filename>jme3-code-check/src/com/jme3/gde/codecheck/hints/InternalMethodHint.java package com.jme3.gde.codecheck.hints; import com.jme3.system.Annotations; import com.sun.source.tree.BlockTree; import com.sun.source.tree.StatementTree; import com.sun.source.tree.Tree; import com.sun.source.util.TreePath; import java....
1,465
337
/* * Copyright 2018 The Polycube 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...
275
834
<filename>fboss/agent/NeighborUpdaterImpl.cpp<gh_stars>100-1000 /* * Copyright (c) 2004-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can...
3,142
378
/** * 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,751
2,268
<filename>sp/src/game/shared/hl2/achievements_hl2.cpp //========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // //============================================================================= #include "cbase.h" #if GAME_DLL #include "achievementmgr.h" #include "baseachievement....
4,805
190,993
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
2,018
347
<reponame>z1125096/ruoyi-cloud package com.ruoyi.common.swagger; import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI; import com.google.common.collect.Lists; import io.swagger.annotations.ApiOperation; import org.springframework.context.annotation.Bean; import org.springframework.c...
981
50,404
# coding=utf-8 # Copyright 2019-present, the HuggingFace Inc. team. # # 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,212
357
<reponame>nrs011/steady /** * This file is part of Eclipse Steady. * * 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...
8,083
1,144
package de.metas.contracts.commission.commissioninstance.services.repos; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Immuta...
2,990
585
<reponame>KevinKecc/caffe2 /** * Copyright (c) 2016-present, Facebook, 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 * * Unl...
1,650
442
/* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
443
531
#if defined(_HPUX) && !defined(_IA64) #include <dl.h> #else #include <dlfcn.h> #endif // HPUX #include <errno.h> #include <string> #include <cstring> #include <cstdio> #include <sstream> //#include <jni.h> #include "../../../native/jni_include/jni.h" void* jvmLibrary; jint(JNICALL * CreateJVM_Method)(JavaVM **pvm, voi...
1,276
4,697
<filename>source/device/acl/op/acl_convolution.cc /* * 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 Ap...
5,479
905
<reponame>naterenegar/ormar from typing import Optional import databases import pytest import sqlalchemy import ormar from ormar.exceptions import NoMatch, MultipleMatches, RelationshipInstanceError from tests.settings import DATABASE_URL database = databases.Database(DATABASE_URL, force_rollback=True) metadata = sq...
7,013
497
#ifndef __FILTERS_H__ #define __FILTERS_H__ #include "BitmapExt.h" #include "DSSProgress.h" #include "DSSTools.h" #include "DarkFrame.h" /* ------------------------------------------------------------------- */ class CImageFilter { public : CImageFilter() {}; virtual ~CImageFilter() {}; virtual void ApplyFilter(...
2,038
2,023
<filename>recipes/Python/578070_extending_xrange_support_slicing/recipe-578070.py def read_xrange(xrange_object): '''returns the xrange object's start, stop, and step''' start = xrange_object[0] if len(xrange_object) > 1: step = xrange_object[1] - xrange_object[0] else: step = 1 stop ...
1,517
591
import numpy as np import pytest from docarray import DocumentArray, Document from docarray.math.ndarray import to_numpy_array @pytest.fixture(scope='function') def docs(): d1 = Document(embedding=np.array([10, 0])) d2 = Document(embedding=np.array([0, 10])) d3 = Document(embedding=np.array([-10, -10])) ...
2,984
2,151
<reponame>sanarea/pdfium // Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fxge/fontdata/chromefontdata/chromefon...
98,280
1,599
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
818
1,745
//************************************ bs::framework - Copyright 2018 <NAME> **************************************// //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// #pragma once #include "BsMonoPrerequisites.h" namespace bs { /** @addtogro...
690
1,352
/* * 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 ...
568
3,670
# Copyright 2020 The TensorFlow Probability 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 o...
7,232
2,960
#include <stdio.h> #include <stdlib.h> static int trap(int* height, int heightSize) { /* In fact if we find the relative higher bar position and then the * water level of the position would be determined by the opposite side. */ int res = 0; int l = 0, lmax = 0; int r = heightSize - 1, rmax ...
530
611
// SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. #ifndef INCLUDED_NUMBERUTILS_H #define INCLUDED_NUMBERUTILS_H #if defined(_MSC_VER) #define really_inline __forceinline #else #define really_inline inline __attribute__((always_inline)) #endif #include <cstdlib> #include <...
1,555
1,191
/*****************************************************************************\ * * * Filename rmdir.c * * * * Description: WIN32 MBCS port of standard C library's rmdir() * * ...
1,550
575
// 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 CHROME_BROWSER_TASK_MANAGER_PROVIDERS_CROSAPI_CROSAPI_TASK_H_ #define CHROME_BROWSER_TASK_MANAGER_PROVIDERS_CROSAPI_CROSAPI_TASK_H_ #include "chr...
608
549
<gh_stars>100-1000 # This file was *autogenerated* from the file dijkstra_fast.test.gen.sage. from sage.all_cmdline import * # import sage library _sage_const_3 = Integer(3); _sage_const_2 = Integer(2); _sage_const_1 = Integer(1); _sage_const_0 = Integer(0); _sage_const_4 = Integer(4); _sage_const_8 = Integer(8); _sa...
1,147
3,486
package com.thinkaurelius.titan.graphdb.util; import com.google.common.base.Preconditions; import com.thinkaurelius.titan.core.TitanRelation; import com.thinkaurelius.titan.graphdb.internal.InternalVertex; import com.thinkaurelius.titan.graphdb.internal.RelationCategory; import org.apache.tinkerpop.gremlin.structure.D...
1,094
429
<filename>libc/string/strerror.c #include <string.h> #include <errno.h> static char * _error_strings[256] = { [EPERM] = "Operation not permitted", [ENOENT] = "No such file or directory", [ESRCH] = "No such process", [EINTR] = "Interrupted system call", [EIO] = "Input/Output error", [ENXIO] = "No such device or a...
1,787
3,182
<gh_stars>1000+ package de.plushnikov.fielddefault; import lombok.experimental.FieldDefaults; @FieldDefaults(makeFinal = true) public class BitwiseOperators { short s1 = 2; short s2 = 4; void foo() { short s3 = s1 ^ s2; } void foo2() { short s3 = 1; switch (s3) { case s1 | s2: br...
152
1,414
<filename>Real-Time Corruptor/BizHawk_RTC/psx/mednadisc/cdrom/CDAccess.h #ifndef __MDFN_CDROMFILE_H #define __MDFN_CDROMFILE_H #include <stdio.h> #include <string> #include "CDUtility.h" class CDAccess { public: CDAccess(); virtual ~CDAccess(); virtual void Read_Raw_Sector(uint8 *buf, int32 lba) = 0; // Retu...
323
903
<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 "...
3,697
32,544
package com.baeldung.privateconstructors; public class StringUtils { private StringUtils() { // this class cannot be instantiated } public static String toUpperCase(String s) { return s.toUpperCase(); } public static String toLowerCase(String s) { return s.toLowerCase(); ...
125
1,018
/* * Copyright (C) 2011 the original author or authors. * See the notice.md file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may ...
364
507
<reponame>mjuenema/python-terrascript<filename>terrascript/data/davidji99/split.py # terrascript/data/davidji99/split.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:27:33 UTC) import terrascript class split_traffic_type(terrascript.Data): pass class split_workspace(terrascript.Data): pass...
149