max_stars_count
int64
301
224k
text
stringlengths
6
1.05M
token_count
int64
3
727k
1,783
<filename>src/base/SubprocessToString.hpp #ifndef __ET_SUBPROCESS_TO_STRING__ #define __ET_SUBPROCESS_TO_STRING__ #include "Headers.hpp" namespace et { inline std::string SystemToStr(const char* cmd) { std::array<char, 128> buffer; std::string result; std::shared_ptr<FILE> pipe(popen(cmd, "r"), pclose);...
267
372
import os import re import subprocess from datetime import datetime from lxml import html from dateutil import parser MEDLINE = 'ftp://ftp.nlm.nih.gov/nlmdata/.medleasebaseline/gz/' PUBMED_OA = 'ftp://ftp.ncbi.nlm.nih.gov/pub/pmc/oa_bulk/' def get_update_date(option='medline'): """ Download index page and gra...
652
607
package dev.cheerfun.pixivic.biz.notify.constant; /** * @author OysterQAQ * @version 1.0 * @date 2020/3/24 5:44 下午 * @description NotifySender */ public class NotifySender { public final static Integer SYSTEM = 0; }
88
3,459
<filename>Cores/Dolphin/PVDolphinCore/Compatibility/Video/Render.cpp // Copyright 2008 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. #include "VideoBackends/OGL/Render.h" #include <algorithm> #include <cinttypes> #include <cmath> #include <cstdio> #include <memory> #incl...
20,419
10,948
#!/usr/bin/python import os, socket, sys, time host = '' port = 2007 if len(sys.argv) > 1: mps = float(sys.argv[1]) else: mps = 1.0 bps = mps * 1000000 BUFSIZE = int(bps/10) # sleep 100ms at full speed print "Mbytes/s =", mps if len(sys.argv) > 3: host = sys.argv[2] port = int(sys.argv[3]) print "connecting t...
554
5,169
<filename>Specs/7/8/f/ManUp/1.0/ManUp.podspec.json { "name": "ManUp", "version": "1.0", "summary": "A server side check of the app version and configuration options for your iOS/tvOS app.", "description": "Adds a server side check for a mandatory app update and server-side configuration options to your iOS/tvOS...
328
8,747
/* * SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include "esp_flash_partitions.h" #include "esp32s3/rom/spi_flash.h" #include "esp32s3/rom/opi_flash.h" #include "mspi_timing_tuning_configs.h" #ifdef __cplusplus extern "C" { #endif...
5,084
679
<gh_stars>100-1000 /************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF license...
726
5,964
// Copyright 2013 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. #if V8_TARGET_ARCH_ARM64 #include "src/codegen.h" #include "src/ic/ic.h" #include "src/ic/ic-compiler.h" #include "src/ic/stub-cache.h" namespace v8 {...
4,195
372
<filename>colossus/apps/accounts/tests/test_forms.py from colossus.apps.accounts.forms import AdminUserCreationForm, UserForm from colossus.apps.accounts.tests.factories import UserFactory from colossus.test.testcases import TestCase class AdminUserCreationFormTests(TestCase): def test_create_admin(self): ...
558
338
package com.camnter.newlife.widget.autoresizetextview; /* * Copyright (C) 2010 <NAME> * * 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...
3,589
988
<gh_stars>100-1000 //------------------------------------------------------------------------------ // GB_stringify_load: return a string to load/save a value //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, <NAME>, (c) 2021, All Rights Reserved. // SPDX-Licens...
559
595
<gh_stars>100-1000 import os from typing import TYPE_CHECKING from modules.base import ModuleProcessor if TYPE_CHECKING: from opta.layer import Layer from opta.module import Module class CustomTerraformProcessor(ModuleProcessor): def __init__(self, module: "Module", layer: "Layer"): super(Custom...
372
1,089
package org.zalando.logbook; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; final class BodyFilterTest { @Test void noneShouldDefaultToNoOp() { final BodyFilter unit = BodyFilter.none(); assertThat(unit.filter("text/plain", "Hello, world!")).isE...
134
1,177
def classify(number): """ A perfect number equals the sum of its positive divisors. :param number: int a positive integer :return: str the classification of the input integer """ pass
60
412
<gh_stars>100-1000 public class Test { // This tests the case where multiple interfaces define the same function-- // the interface should still be a valid functional interface even // though its one abstract method satisfies more than one type, or a single // type that is inherited by multiple routes. inte...
461
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 ...
1,356
993
<reponame>no-name-xiaosheng/PaddleViT<gh_stars>100-1000 from . import maskrcnn_head from . import retinanet_head from . import det_utils
52
735
// NOTE: This file was generated by the ServiceGenerator. // ---------------------------------------------------------------------------- // API: // Smart Device Management API (smartdevicemanagement/v1) // Description: // Allow select enterprise partners to access, control, and manage Google and // Nest devices...
3,026
4,054
<gh_stars>1000+ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.http.client.core.communication; import com.yahoo.vespa.http.client.core.Document; import java.time.Clock; import java.time.Duration; import java.util.ArrayDeque; import java...
1,565
546
<filename>api/common/service/src/main/java/org/apache/servicecomb/authentication/token/Token.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 ownership. * Th...
433
2,587
package cn.hikyson.godeye.core.internal.modules.viewcanary.levenshtein; public interface ViewWithSizeInsDelInterface { double deletionCost(ViewIdWithSize c); double insertionCost(ViewIdWithSize c); }
69
448
// // Created by moqi on 2018/4/25. // #ifndef FRAMEWORK_PLAYLIST_H #define FRAMEWORK_PLAYLIST_H #include <list> #include "Period.h" //using namespace std; namespace Cicada{ class Period; class playList { public: playList() { } ~playList(); void addPeriod(Perio...
456
4,822
/* * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to * this file be licensed under the Apache-2.0 license or a * compatible open source license. */ /* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distribute...
3,117
348
{"nom":"Aix","circ":"6ème circonscription","dpt":"Nord","inscrits":877,"abs":392,"votants":485,"blancs":34,"nuls":11,"exp":440,"res":[{"nuance":"LR","nom":"<NAME>","voix":227},{"nuance":"REM","nom":"Mme <NAME>","voix":213}]}
89
5,250
<filename>modules/flowable-idm-engine/src/test/java/org/flowable/idm/engine/test/api/identity/authentication/JasyptPasswordEncryptor.java /* 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 * ...
789
331
# # Example file for working with loops # def main(): x = 0 # define a while loop # define a for loop # use a for loop over a collection # use the break and continue statements #using the enumerate() function to get index if __name__ == "__main__": main()
94
474
package org.javacord.api.event.channel.server.voice; import java.util.Optional; /** * A server voice channel change user limit event. */ public interface ServerVoiceChannelChangeUserLimitEvent extends ServerVoiceChannelEvent { /** * Gets the new user limit of the channel. * * @return The new use...
185
836
package androidx.test.testing.fixtures; import static org.junit.Assert.fail; import androidx.test.internal.runner.TestRequestBuilder; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; /** Fixture used to test {@link TestRequestBuilder} */ @RunWith(JUnit4.class) public class Run...
140
1,478
<gh_stars>1000+ /** * @file axes_labels.cpp * * @section LICENSE * * The MIT License * * @copyright Copyright (c) 2020-2021 TileDB, Inc. * * 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 So...
3,581
679
<filename>main/sc/source/ui/unoobj/unoreflist.cxx /************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyri...
643
1,909
package org.knowm.xchange.kucoin.dto; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.HOURS; import static java.util.concurrent.TimeUnit.MINUTES; /** * The Kucoin KlineInterval is similar to the Binance KlineInterval enum. This is used to convert * back and forth betwee...
542
22,028
#ifndef LINKLIST_H #define LINKLIST_H #include <stdlib.h> #include <stdio.h> typedef char ElemType; typedef struct LNode { ElemType data; struct LNode*next; }LinkList; void CreateListHead(LinkList *&L,ElemType a[],int n); void CreateListTail(LinkList *&L,ElemType a[],int n); void InitList(LinkList *&L); void Destr...
250
5,964
<reponame>wenfeifei/miniblink49<gh_stars>1000+ /* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkPackBits.h" size_t SkPackBits::ComputeMaxSize8(int count) { // worst case is the number of 8bit values + 1 byte ...
1,689
15,577
<gh_stars>1000+ #include <Parsers/MySQL/ASTDeclareTableOptions.h> #include <IO/ReadBufferFromMemory.h> #include <Parsers/ASTLiteral.h> #include <Parsers/ASTIdentifier.h> #include <Parsers/ExpressionListParsers.h> #include <Parsers/ExpressionElementParsers.h> #include <Parsers/MySQL/ASTDeclareOption.h> namespace DB { ...
2,037
1,440
from django.urls import path from . import views urlpatterns = [ path( '', views.index, name='community-index' ), path( 'mine/', views.my_feeds, name='community-my-feeds' ), path( '<feed_type_slug>/', views.FeedListView.as_view(), ...
373
1,238
#!/usr/bin/env python3 import sys import os.path import re def increase_style_resource_id_value(path, delta=100): with open(path, encoding='utf-8', newline='\n') as fd: doc = fd.read() updated = re.sub(r'\d{5}', lambda m: str(int(m.group(0)) + delta), doc) print('update:', path) with open(path, 'w', encoding='ut...
957
332
/* * Copyright 2013-2014 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
304
763
<filename>projects/batfish/src/main/java/org/batfish/representation/cisco_xr/Ipv4Nexthop.java package org.batfish.representation.cisco_xr; import java.io.Serializable; import javax.annotation.Nonnull; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; import org.batfish.datamodel....
288
1,817
<filename>springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app173/HelloController.java package test.org.springdoc.api.app173; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class HelloController { ...
144
573
<filename>test/aarch64/traces/sim-sqdmlsl2-4s-trace-aarch64.h // 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 reta...
15,896
685
import pynlpir import re pynlpir.open() s = '不让我上桌吃饭我还不会自己抢吗![doge][doge][doge](投稿:@还没怀上的葛一他麻麻)http://t.cn/RqKTebK ' stop = [line.strip() for line in open('ad/stop.txt', 'r', encoding='utf-8').readlines()] # 停用词 print(list(set(pynlpir.segment(s, pos_tagging=False)))) #['cn', '全民', 'R68kD0I', '饮酒', '醉', ' ', '一人', ...
357
709
<reponame>emadurandal/OpenSiv3D //----------------------------------------------- // // This file is part of the Siv3D Engine. // // Copyright (c) 2008-2021 <NAME> // Copyright (c) 2016-2021 OpenSiv3D Project // // Licensed under the MIT License. // //----------------------------------------------- # pragma once # in...
766
335
{ "word": "Punch", "definitions": [ "Strike with the fist.", "Press (a button or key on a machine)", "Enter information by punching a button or key on a machine.", "Drive (cattle) by prodding them with a stick." ], "parts-of-speech": "Verb" }
119
3,799
<gh_stars>1000+ /* * Copyright (C) 2017 The Android Open Source Project * * 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...
339
852
#include "CondFormats/CSCObjects/interface/CSCChamberTimeCorrections.h" #include "FWCore/Utilities/interface/typelookup.h" TYPELOOKUP_DATA_REG(CSCChamberTimeCorrections);
64
839
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you m...
747
2,023
def import_once(modulenames, silent=1): ## import_once ## Fedmich Last modified: 3:38 PM 5/15/2006 ## version 1.1 ## Usage: ## import_once('os') ## import_once( ["os", 'sys'] ) if type(modulenames) is list: pass elif type(modulenames) is tuple: pass else: mod...
541
7,886
/* * Copyright (c) Meta Platforms, Inc. and 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/licenses/LICENSE-2.0 * * Unless required by appl...
8,443
521
<filename>src/boost/test/impl/test_tree.ipp // (C) Copyright <NAME> 2001. // 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) // See http://www.boost.org/libs/test for the library home page. // /// @file /// Pr...
4,911
372
<gh_stars>100-1000 /* * 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, software ...
2,517
332
<reponame>straight-into-the-wall/orca<filename>specs/discord/sticker.json { "namespace": ["discord"], "defs": [ { "title":"Sticker Types", "namespace":["sticker"], "enum":"types", "items": [ { "name": "STANDARD", "value":1, "comment":"an official sticker in a pack, part o...
1,500
332
<reponame>wtlgo/vk-java-sdk<gh_stars>100-1000 // Autogenerated from vk-api-schema. Please don't edit it manually. package com.vk.api.sdk.exceptions; public class ApiUnknownApplicationException extends ApiException { public ApiUnknownApplicationException(String message) { super(38, "Unknown application", me...
116
446
#include "catch2/catch.hpp" #include "adls_client.h" #include "adls_test_base.h" TEST_CASE("Client General", "[adls][client]") { for (bool exception_enabled : {true, false}) { azure::storage_adls::adls_client client = as_test::adls_base::test_adls_client(exception_enabled); REQUIRE(client.exce...
520
631
/** * 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,078
937
""" __new__()方法, 对象创建的过程, 1- new方法返回一个对象 2- init利用new返回的对象进行属性的添加 """ class Person(object): # 监听创建一个实例对象的过程,需要返回一个对象赋值给xiaoming # new中不return的话,那么久不会执行init方法 def __new__(cls, *args, **kwargs): print("new") print((object.__new__(cls))) return object.__new__(cls) # 构造方法...
1,224
315
<filename>src/main/java/io/budgetapp/application/AccessDeniedException.java package io.budgetapp.application; /** * */ public class AccessDeniedException extends RuntimeException { private static final long serialVersionUID = 1531130566708589124L; }
73
852
<filename>RecoLocalCalo/HcalRecProducers/python/hbheRecHitProducerGPUTask_cff.py import FWCore.ParameterSet.Config as cms # Run 3 HCAL workflow on GPU # EventSetup modules used by HBHERecHitProducerGPU from RecoLocalCalo.HcalRecProducers.hcalGainsGPUESProducer_cfi import hcalGainsGPUESProducer from RecoLocalCalo.Hcal...
1,378
739
package org.fxmisc.richtext; import java.util.OptionalInt; /** * Object that stores information relating to the position in an area's content that corresponds to a given position * in some visible entity (e.g. the area, a paragraph in the area, a line on a paragraph). */ public class CharacterHit { /** *...
942
530
#ifndef INSTRECLIB_SEGMENTATIONRESULT_H #define INSTRECLIB_SEGMENTATIONRESULT_H #include "SegmentationDataset.h" #include "Utils/Mask.h" #include <cstring> #include <iostream> #include <memory> #include <vector> namespace instreclib { namespace segmentation { class InstanceSegmentationResult; /// \brief Describe...
1,355
673
""" propertylist """ from __future__ import absolute_import, division, print_function from collections import namedtuple import logging from PySide.QtCore import Qt from mceditlib import nbt from PySide import QtGui, QtCore from mcedit2.util.load_ui import registerCustomWidget log = logging.getLogger(__name__) cl...
3,254
416
/* * Copyright (c) 2016 Apple, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compl...
1,171
1,374
<filename>transpiler/src/test/java/source/extension/HelloWorldService.java package source.extension; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; @Path("/hello") public class HelloWorldService { @GET @Path("/{param}") ...
191
461
<gh_stars>100-1000 #ifndef __RISCV32_H__ #define __RISCV32_H__ #define ISA_QEMU_BIN "qemu-system-riscv32" #define ISA_QEMU_ARGS #include "../../../../../../src/isa/riscv32/include/isa/diff-test.h" union isa_gdb_regs { struct { uint32_t gpr[32]; uint32_t pc; }; struct { uint32_t array[77]; }; }; ...
168
379
<gh_stars>100-1000 package com.javafx.demo.webview; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.ContextMenu; import javafx.scene.control.MenuItem; import javafx.scene.control.TextField; import javafx.scene.input.Clipboard; import javafx.scene.input.ClipboardContent; im...
1,030
388
<filename>Source/CesiumRuntime/Private/CesiumActors.cpp<gh_stars>100-1000 // Copyright 2020-2021 CesiumGS, Inc. and Contributors #include "CesiumActors.h" #include "CesiumRuntime.h" #include "Engine/World.h" #include <glm/glm.hpp> glm::dvec4 CesiumActors::getWorldOrigin4D(const AActor* actor) { if (!IsValid(actor)...
317
587
/* * Copyright 2018-2021 Crown Copyright * * 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...
625
1,527
<reponame>KEVINYZY/tdb """ Test networks consisting only of hypertree nodes (no TensorFlow nodes) This replicates the pure-Tensorflow network from test_pure_tf, but implements the ops as HyperTree PythonOps. """ import tensorflow as tf import unittest import tdb def myadd(ctx,a,b): """ a,b are scalars """ return...
703
676
package com.alorma.github.bean; import core.notifications.Notification; import core.repositories.Repo; import java.util.List; public class NotificationsParent { public Repo repo; public List<Notification> notifications; }
70
2,671
""" quick hack script to convert from quake2 .bsp to simple format to draw. drops most information. keeps only raw polys and lightmaps. makes .blv and .llv file (big and little endian level) file format is 'BLV1' or 'LLV1' int texwidth int texheight int numtris float startx, starty, startz, start...
3,539
407
<filename>paas/appmanager/tesla-appmanager-server/src/main/java/com/alibaba/tesla/appmanager/server/controller/StageController.java package com.alibaba.tesla.appmanager.server.controller; import com.alibaba.tesla.appmanager.api.provider.StageProvider; import com.alibaba.tesla.appmanager.auth.controller.AppManagerBaseC...
1,364
310
package org.seasar.doma.internal.apt.processor.dao; public class IllegalConstructorDelegateDaoDelegate {}
33
303
<filename>platform/switch/source/objects/source.cpp #include "objects/source/source.h" #include "modules/audio/audio.h" #include "driver/audiodrv.h" #include "pools/audiopool.h" using namespace love; #define AudioModule() (Module::GetInstance<Audio>(Module::M_AUDIO)) StaticDataBuffer::StaticDataBuffer(void* data, s...
2,773
5,169
{ "name": "TransnSDK", "version": "4.0.4", "summary": "传神SDK", "description": "TODO: Add long description of the pod here.", "homepage": "https://github.com/jackie-jiang-ios/TransnSDK", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { "jackie": "<EMAIL>" }, "source": { "...
575
1,235
<gh_stars>1000+ /* * Copyright 2020 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 t...
889
5,975
# 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. # pyre-strict from typing import Any, Callable, Iterable, List, Optional, Type try: from graphql3 import GraphQLSchema except ModuleNotF...
1,089
1,210
// (C) Copyright 2005 <NAME> // Use, modification and distribution is subject to 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) // Authors: <NAME> #ifndef BOOST_MPI_DETAIL_FORWARD_OPRIMITIVE_HPP #define BOOST_MPI_DETAIL_FORWARD...
713
5,300
<reponame>xsoheilalizadeh/FrameworkBenchmarks package com.techempower.minijax; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xm...
369
348
<filename>docs/data/leg-t2/034/03404261.json {"nom":"Saint-Guilhem-le-Désert","circ":"4ème circonscription","dpt":"Hérault","inscrits":268,"abs":130,"votants":138,"blancs":16,"nuls":10,"exp":112,"res":[{"nuance":"REM","nom":"<NAME>","voix":72},{"nuance":"FN","nom":"<NAME>","voix":40}]}
118
1,132
#include "gb-include.h" #include <errno.h> #include <sys/types.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <ctype.h> int main ( int argc , char *argv[] ) { loop: printf("keepalive\n"); //printf("%c",0x07); // the bell! sleep(400); goto loop; }
128
1,410
import asyncio from abc import ABC, abstractmethod from ..utils.exceptions import LockError class LockBase(ABC): """A asynchronous locking primitive associated to a given name. An asynchronous lock is in one of two states, 'locked' or 'unlocked'. It is created in the unlocked state. It has two basic met...
1,431
357
#include <stdio.h> #include <stdlib.h> #define MAXSIZE 100 #define INFINITY 9999 void BELLMAN_FORD(int G[][MAXSIZE], int d[], int source, int n, int pre[]) { d[source] = 0; for (int i = 0; i < n; i++) { if (i == source) continue; d[i] = INFINITY; } int i; for (int times = 0; times < n - 1; times++) { ...
816
1,656
/* * Copyright (c) 2011, The Iconfactory. 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 list of condi...
1,050
704
#include <string.h> #include <stdint.h> #include <stdlib.h> #include "vec.h" void vec_add1(struct vec_basestruct *ctl,size_t sz) { if (!ctl->alen) { ctl->alen = 8; if (SIZE_MAX / 8 < sz) ctl->alen = 1; ctl->buf = malloc(ctl->alen * sz); if (!ctl->buf) abort(); } else if (ctl->len >= ctl->alen) { ctl-...
499
4,391
<filename>packages/pyright-internal/src/tests/samples/variadicTypeVar9.py # This sample tests the handling of variadic type variables used # in generic type aliases and with suffixes. from typing import Callable, Generic, Literal, TypeVar, Union from typing_extensions import TypeVarTuple, Unpack P = TypeVarTuple("P"...
354
1,921
def get_stab_points(intervals): starts, ends = zip(*intervals) return (min(ends), max(starts)) # Tests assert get_stab_points([(1, 4), (4, 5), (7, 9), (9, 12)]) == (4, 9) assert get_stab_points([(1, 4), (-2, 6), (4, 5), (7, 9), (9, 12)]) == (4, 9) assert get_stab_points([(1, 4), (-2, 0), (4, 5), (7, 9)]) == (...
153
317
/* * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) * * This file is part of Orfeo Toolbox * * https://www.orfeo-toolbox.org/ * * 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 ...
698
884
<reponame>slyoldfox/blaze-persistence<filename>core/testsuite/src/test/java/com/blazebit/persistence/testsuite/EntityEqualityGeneralTest.java<gh_stars>100-1000 /* * Copyright 2014 - 2021 Blazebit. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance wi...
912
3,834
<reponame>luna/luna package org.enso.interpreter.node.expression.builtin.number; import org.enso.interpreter.dsl.BuiltinType; import org.enso.interpreter.node.expression.builtin.Builtin; @BuiltinType(name = "Standard.Base.Data.Numbers.Number") public class Number extends Builtin {}
99
427
<filename>externals/wasm-compiler/llvm/tools/llvm-pdbdump/PrettyTypeDumper.cpp //===- PrettyTypeDumper.cpp - PDBSymDumper type dumper *------------ C++ *-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.T...
1,170
593
package org.ananas.cli.commands; import java.io.File; import java.nio.file.Paths; import java.util.Arrays; import java.util.Map; import java.util.concurrent.Callable; import org.ananas.cli.CommandLineTable; import org.ananas.cli.YamlHelper; import org.ananas.cli.model.AnalyticsBoard; import org.ananas.runner.kernel.mo...
2,361
711
package com.java110.goods.smo.impl; import com.java110.core.base.smo.BaseServiceSMO; import com.java110.dto.PageDto; import com.java110.dto.storeCart.StoreCartDto; import com.java110.goods.dao.IStoreCartServiceDao; import com.java110.intf.goods.IStoreCartInnerServiceSMO; import com.java110.po.storeCart.StoreCartPo; i...
1,060
462
<filename>backend/tests/libs/cinq_test_cls.py from cinq_auditor_domain_hijacking import DomainHijackAuditor from cinq_auditor_ebs import EBSAuditor from cinq_auditor_required_tags import RequiredTagsAuditor from cloud_inquisitor.constants import ActionStatus class MockNotify(object): def notify(self, notices): ...
287
1,306
<filename>vm/mterp/c/OP_CONST_4.cpp HANDLE_OPCODE(OP_CONST_4 /*vA, #+B*/) { s4 tmp; vdst = INST_A(inst); tmp = (s4) (INST_B(inst) << 28) >> 28; // sign extend 4-bit value ILOGV("|const/4 v%d,#0x%02x", vdst, (s4)tmp); SET_REGISTER(vdst, tmp); } FINISH(1); OP_END
187
372
<reponame>dsmogor/boon package org.boon.slumberdb.service.client; /** * Created by Richard on 7/3/14. */ public interface DataStoreClientProvider { DataStoreClient get(String context); DataStoreClient get(); }
78
320
<filename>MoPub Mediation Demo/Pods/mopub-ios-sdk/MoPubSDK/Internal/VAST/MPVASTLinearAd.h // // MPVASTLinearAd.h // // Copyright 2018-2021 Twitter, Inc. // Licensed under the MoPub SDK License Agreement // http://www.mopub.com/legal/sdk-license-agreement/ // #import <Foundation/Foundation.h> #import "MPVASTModel.h...
568
679
<filename>main/cppcanvas/source/mtfrenderer/textaction.cxx /************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regardi...
70,959
1,779
/* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
1,075
372
<filename>clients/google-api-services-youtubeAnalytics/v2/1.30.1/com/google/api/services/youtubeAnalytics/v2/model/GroupContentDetails.java /* * 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 *...
1,051
2,151
/* * Copyright (C) 2014 The Android Open Source Project * * 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 app...
4,312