max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
848 | <gh_stars>100-1000
#
# Copyright 2019 Xilinx 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... | 1,379 |
634 | <filename>modules/base/project-model-impl/src/main/java/consulo/roots/impl/OptimizedSingleContentEntryImpl.java
/*
* Copyright 2013-2020 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 obtain a copy of the L... | 1,113 |
529 | <gh_stars>100-1000
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Microsoft Corporation. All rights reserved.
////////////////////////////////////... | 735 |
937 | """
自定义的sum模块,需要自测成功后再使用
1- 书写格式,如果在本模块下执行这个模块,python会自定义一个值为__main__的__name__变量
2- main()可以直接写,但是开发时候常用if __name__ == '__main__'的方式
3- if __name__ == '__main__': 类似于main函数的入口
4- 如果在其他模块中引入并且调用这个模块任何方法和属性,那么__name__就变成了本函数名
"""
# 模块中的全局变量
name = "加法运算"
# 模块中自定义类
class Person(object):
pass
# 加法... | 656 |
427 | // RUN: rm -rf %t
// RUN: %clang_cc1 -fsyntax-only -fapinotes -fapinotes-cache-path=%t %s -I %S/Inputs/BrokenHeaders -verify
#include "SomeBrokenLib.h"
// expected-error@AP<EMAIL>:4{{unknown key 'Nu llabilityOfRet'}}
| 96 |
2,757 | <gh_stars>1000+
#!/usr/bin/env python2.7
#Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by appli... | 880 |
474 | #!/usr/bin/env python
from setuptools import setup
setup(
name="asyncio_redis",
author="<NAME>",
version="0.16.0",
license="LICENSE.txt",
classifiers=[
"Development Status :: 4 - Beta",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"Topic :: Database",
... | 340 |
435 | <filename>pycon-au-2020/videos/oh-no-i-think-my-project-is-outgrowing-my-jupyter-notebook-how-do-i-survive.json
{
"copyright_text": "CC-BY-NC-SA 4.0",
"description": "Lydia Peabody\n\nhttps://2020.pycon.org.au/program/BAAES3\n\nAn example-focused discussion of the pitfalls and strengths of interactive Python notebo... | 835 |
348 | {"nom":"Saint-Gilles-les-Forêts","dpt":"Haute-Vienne","inscrits":54,"abs":14,"votants":40,"blancs":4,"nuls":4,"exp":32,"res":[{"panneau":"1","voix":25},{"panneau":"2","voix":7}]} | 77 |
360 | __all__ = ['groups']
from .groups import LieGroupParameter, SO3, RxSO3, SE3, Sim3, cat, stack
| 33 |
421 | <reponame>hamarb123/dotnet-api-docs<filename>samples/snippets/cpp/VS_Snippets_Data/XmlDocument.XmlResolver/CPP/docresolver.cpp
// <snippet1>
#using <System.dll>
#using <System.Xml.dll>
using namespace System;
using namespace System::IO;
using namespace System::Xml;
using namespace System::Net;
int main()
... | 325 |
356 | <reponame>svishevsky/testcontainers-spring-boot
package com.playtika.test.mongodb;
import com.playtika.test.common.operations.NetworkTestOperations;
import lombok.Value;
import lombok.extern.slf4j.Slf4j;
import org.assertj.core.data.Offset;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.an... | 1,138 |
619 | package com.jzh.news.entity;
import java.io.Serializable;
/**
* Created by jzh on 2015/9/28.
*/
public class News_pinglun implements Serializable {
private int pid;
private int pcid;
private String user;
private String plocation;
private String ptime;
private String pcontent;
private String pzan;
//plid... | 683 |
721 | /**
* Copyright 2011 <NAME> <<EMAIL>>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | 7,310 |
412 | <filename>src/goto-instrument/generate_function_bodies.h<gh_stars>100-1000
/*******************************************************************\
Module: Replace bodies of goto functions
Author: <NAME>.
\*******************************************************************/
#ifndef CPROVER_GOTO_PROGRAMS_GENERATE_FUNCT... | 1,602 |
14,668 | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/display/projecting_observer.h"
#include <memory>
#include <vector>
#include "chromeos/dbus/power/fake_power_manager_client.h"
#include "te... | 2,147 |
456 | // SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2019-2020 <NAME>
// All rights reserved.
#include <djvUIPy/UIPy.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
namespace py = pybind11;
PYBIND11_MODULE(djvUIPy, m)
{
//! \todo Base classes need to be wrapped first?
wrapWidget(m);
wr... | 157 |
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.
#include "chrome/browser/sharing/shared_clipboard/shared_clipboard_message_handler_android.h"
#include "base/android/jni_string.h"
#include "base/trace_e... | 376 |
341 | package com.aventstack.extentreports.markuputils;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
abstract class HtmlList {
@SuppressWarnings("unchecked")
protected String getList(Object object, ListType listType) {
final StringB... | 670 |
477 | #!/usr/bin/env python
"""Test faster version of sematic similarity"""
from __future__ import print_function
# Computing basic semantic similarities between GO terms
# Adapted from book chapter written by _<NAME> and <NAME>_
# How to compute semantic similarity between GO terms.
# First we need to write a function ... | 1,321 |
453 | <filename>tce/newlib-1.17.0/newlib/libc/machine/spu/vprintf.c
#include <_ansi.h>
#include <stdio.h>
#include "c99ppe.h"
#ifdef _HAVE_STDC
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#ifdef INTEGER_ONLY
# define vprintf viprintf
#endif
typedef struct
{
_CONST char* fmt;
unsigned int pad0[ 3 ];
va_li... | 313 |
5,169 | <reponame>Gantios/Specs
{
"name": "VAMPMaioAdapter",
"version": "1.5.5.3",
"summary": "Maio Adapter for VAMP.",
"description": "VAMP is Video Ad Mediation Platform, including maio and more ad networks. The maio adapter helps you to use maio with VAMP.",
"license": {
"type": "Copyright",
"text": "Copyr... | 337 |
879 | package org.zstack.core.eventlog;
import java.util.ArrayList;
import java.util.Collections;
public class EventLogBuilder {
String content;
String resourceUuid;
String resourceType;
String category;
String trackingId;
ArrayList<Object> arguments = new ArrayList<Object>();
EventLogType type ... | 441 |
374 | <filename>CoreFoundation/CFFileDescriptor.h
/* Copyright (c) 2008-2009 <NAME>
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 limitation the rights to use,copy,m... | 854 |
351 | <filename>data/json/countries/er.json
{"name":{"common":"Eritrea","official":"State of Eritrea","Native":{"ara":{"common":"إرتريا","official":"دولة إرتريا"},"eng":{"common":"Eritrea","official":"State of Eritrea"},"tir":{"common":"ኤርትራ","official":"ሃገረ ኤርትራ"}}},"EuMember":false,"LandLocked":false,"Nationality":"","tld... | 465 |
6,717 | <reponame>crossmob/WinObjC
//******************************************************************************
//
// Copyright (c) 2016 Microsoft Corporation. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IM... | 7,763 |
575 | // Copyright (c) 2012 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 MEDIA_BASE_AUDIO_CAPTURER_SOURCE_H_
#define MEDIA_BASE_AUDIO_CAPTURER_SOURCE_H_
#include <string>
#include <vector>
#include "base/memory/re... | 973 |
1,577 | <gh_stars>1000+
# flake8: noqa
from rastervision.core.analyzer.analyzer import *
from rastervision.core.analyzer.analyzer_config import *
from rastervision.core.analyzer.stats_analyzer import *
from rastervision.core.analyzer.stats_analyzer_config import *
| 85 |
971 | /*
* argument_matchers.hpp
* Copyright (c) 2014 <NAME>.
*
* This program is made available under the terms of the MIT License.
*
* Created on Jan 12, 2015
*/
#pragma once
namespace fakeit {
struct IMatcher : Destructible {
~IMatcher() = default;
virtual std::string format() const = 0;
... | 4,270 |
386 | <reponame>ccoderJava/bus
/*********************************************************************************
* *
* The MIT License (MIT) *
* ... | 2,374 |
710 | <gh_stars>100-1000
package me.panavtec.cleancontacts.domain.interactors.contacts;
import me.panavtec.cleancontacts.domain.interactors.InteractorError;
public class GetContactError implements InteractorError {
}
| 70 |
1,717 | package com.fasterxml.jackson.core.filter;
import com.fasterxml.jackson.core.JsonPointer;
/**
* Simple {@link TokenFilter} implementation that takes a single
* {@link JsonPointer} and matches a single value accordingly.
* Instances are immutable and fully thread-safe, shareable,
* and efficient to use.
*
* @si... | 714 |
2,151 | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chromeos/arc/boot_phase_monitor/arc_instance_throttle.h"
#include "ash/shell.h"
#include "ash/wm/window_util.h"
#include "compon... | 449 |
5,279 | /*
* 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 ... | 685 |
735 | <gh_stars>100-1000
package com.mcxiaoke.next.http;
import org.junit.Assert;
/**
* User: mcxiaoke
* Date: 15/7/6
* Time: 14:41
*/
public class BaseTest {
void isTrue(boolean condition) {
Assert.assertTrue(condition);
}
void isFalse(boolean condition) {
Assert.assertFalse(condition);
... | 364 |
1,602 | <filename>third-party/libfabric/libfabric-src/prov/util/src/util_ns.c
/*
* Copyright (c) 2017 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, av... | 5,751 |
507 | <reponame>spacerace/romfont<gh_stars>100-1000
#include <stdlib.h>
#include <SDL/SDL.h>
#include <SDL/SDL_gfxPrimitives.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <sys/stat.h>
#include <string.h>
#include <SDL/SDL_rotozoom.h>
#define FTYPE8x8 1
#de... | 1,848 |
808 | // Copyright (c) 2019 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.org/licenses/LICENSE-2.0
//
// Unless required... | 1,314 |
1,844 | import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt # noqa: E402
def plot(out, history):
plt.figure()
n = max(map(len, history.values()))
plt.xticks(range(n), [v + 1 for v in range(n)])
plt.grid()
for values in history.values():
plt.plot(values)
plt.xlabel("ep... | 181 |
2,151 | //===-- XCoreSelectionDAGInfo.h - XCore SelectionDAG Info -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | 249 |
377 | // REQUIRES: system-linux
// RUN: clang -o %t %s -O2 -mno-sse
// RUN: llvm-mctoll -d -I /usr/include/stdio.h -I /usr/include/string.h -I /usr/include/stdlib.h %t
// RUN: clang -o %t1 %t-dis.ll
// RUN: %t1 2>&1 | FileCheck %s
// CHECK: Copied String: Hello
/* Raising the binary of this source file tests
a) correct ... | 647 |
3,678 | //
// Person.h
// CoreDataDemo
//
// Created by <NAME> on 19/11/12.
// Copyright (c) 2012 iOSCreator. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@interface Person : NSManagedObject
@property (nonatomic, retain) NSNumber * age;
@property (nonatomic, retain) NSString *... | 134 |
1,172 | // Copyright (C) 2008 Google 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 t... | 10,370 |
1,682 | <gh_stars>1000+
/*
Copyright (c) 2019 LinkedIn Corp.
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 ... | 2,010 |
1,541 | package com.bwssystems.HABridge.plugins.moziot;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class MozIotDevice {
@SerializedName("gatewayName")
@Expose
private String gatewayName;
@SerializedName("deviceDetail")
@Expose
private MozillaTh... | 266 |
1,056 | <reponame>timfel/netbeans<filename>php/php.latte/src/org/netbeans/modules/php/latte/completion/LatteDocumentationFactory.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
* regar... | 1,664 |
575 | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/metrics/metrics_service.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/macros.h"
#include "base/strings/str... | 810 |
2,151 | <filename>src/trusted/service_runtime/win/vm_hole.c
/*
* Copyright (c) 2012 The Native Client 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 "native_client/src/shared/platform/nacl_sync_checked.h"
#include "native_clie... | 868 |
380 | <gh_stars>100-1000
#include <string.h>
#include <stdlib.h>
#include "w2xconv.h"
int
main(int argc, char **argv)
{
char *dst_path;
size_t path_len;
struct W2XConv *c;
int r;
char *src_path;
if (argc < 2) {
puts("usage : w2xc <in.png>");
return 1;
}
src... | 589 |
450 | /*
* Copyright (C) 2015-2021 <NAME> <<EMAIL>>
* Copyright (C) 2020 <NAME> <<EMAIL>>
*
* Licence: wxWindows Library Licence, Version 3.1
*/
#ifndef __GUM_EXCEPTOR_H__
#define __GUM_EXCEPTOR_H__
#include <glib-object.h>
#include <gum/gummemory.h>
#include <gum/gumprocess.h>
#include <setjmp.h>
G_BEGIN_DECLS
#def... | 1,251 |
665 | <filename>testing/MLDB-2161-utf8-in-script-apply.py
# coding=utf-8 #
# MLDB-2161-utf8-in-script-apply.py
# <NAME>, 2017-03-08
# This file is part of MLDB. Copyright 2017 mldb.ai inc. All rights reserved.
#
from mldb import mldb, MldbUnitTest, ResponseException
class MLDB2161Utf8InScriptApply(MldbUnitTest): # noqa
... | 739 |
483 | <filename>nitrite/src/main/java/org/dizitart/no2/migration/commands/RenameField.java<gh_stars>100-1000
package org.dizitart.no2.migration.commands;
import lombok.AllArgsConstructor;
import org.dizitart.no2.Nitrite;
import org.dizitart.no2.collection.Document;
import org.dizitart.no2.collection.NitriteId;
import org.di... | 1,156 |
3,702 | <gh_stars>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, soft... | 1,675 |
488 | // -*- C++ -*-
#ifndef __LTL_H__
#define __LTL_H__
//#include <boost/shared_ptr.hpp>
#include <string>
#include <iostream>
#include <sstream>
#include <cassert>
extern FILE* ltl_input;
extern int ltl_parse();
extern bool ltl_eof;
extern unsigned short ltl_label;
/// Linear Temporal Logic (LTL) Abstract syntax tree (... | 5,436 |
841 | <reponame>tkobayas/jbpm<gh_stars>100-1000
/*
* Copyright 2021 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/license... | 5,100 |
1,442 | <filename>escher/src/message_table_cell_with_editable_text.cpp
#include <escher/message_table_cell_with_editable_text.h>
#include <escher/palette.h>
namespace Escher {
MessageTableCellWithEditableText::MessageTableCellWithEditableText(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate,... | 333 |
1,144 | package de.metas.contracts.impl;
/*
* #%L
* de.metas.contracts
* %%
* Copyright (C) 2015 metas GmbH
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of the
* Licen... | 902 |
333 | <reponame>coreyp1/graphlab
/*
* Copyright (c) 2009 Car<NAME> University.
* 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.or... | 4,533 |
1,167 | <reponame>jontrulson/mraa
#!/usr/bin/env python
# Author: <NAME> <<EMAIL>>
# Copyright (c) 2015 Intel Corporation.
#
# SPDX-License-Identifier: MIT
#
# Example Usage: Loopbacks data between MISO and MOSI 100 times
import mraa as m
import random as rand
# intialise SPI
dev = m.Spi(0)
for x in range(0,100):
txbuf... | 233 |
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.automation.fluent;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure... | 2,735 |
12,887 | package com.zhisheng.connectors.kafka;
import com.zhisheng.common.model.MetricEvent;
import com.zhisheng.common.schemas.KafkaMetricSchema;
import com.zhisheng.common.utils.ExecutionEnvUtil;
import com.zhisheng.common.utils.GsonUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.flink.api.common.functions.FlatMap... | 1,000 |
12,718 | struct user {
struct {
unsigned long gpr[32], nip, msr, orig_gpr3, ctr, link, xer, ccr, mq;
unsigned long trap, dar, dsisr, result;
} regs;
unsigned long u_tsize, u_dsize, u_ssize;
unsigned long start_code, start_data, start_stack;
long signal;
void *u_ar0;
unsigned long magic;
char u_comm[32];
};
#define ... | 268 |
1,963 | /*
*******************************************************************************
* Copyright (c) 201-2021, STMicroelectronics
* All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You ... | 2,094 |
10,225 | package io.quarkus.devtools.codestarts.core.strategy;
import io.quarkus.devtools.codestarts.CodestartResource.Source;
import java.io.IOException;
import java.nio.file.Path;
public interface DefaultCodestartFileStrategyHandler extends CodestartFileStrategyHandler {
void copyStaticFile(Source source, Path targetPa... | 106 |
794 | <reponame>JasperMorrison/PytorchToCaffe
import numpy as np
from .blob import Blob
from .layers import Base
class Flatten(Base):
def __init__(self,input, name='permute'):
super(Flatten, self).__init__(input, name)
dim=[np.prod(input.data.shape)]
self.out = Blob(dim, self)
class PSROIPool(B... | 505 |
3,102 | // RUN: %clang_cc1 -fsyntax-only -verify %s
typedef double * __attribute__((align_value(64))) aligned_double;
void foo(aligned_double x, double * y __attribute__((align_value(32)))) { };
// expected-error@+1 {{requested alignment is not a power of 2}}
typedef double * __attribute__((align_value(63))) aligned_double1... | 414 |
5,169 | <gh_stars>1000+
{
"name": "SYAlertController",
"version": "0.1.0",
"summary": "一个在UIAlertController基础上增加图片的Alert",
"description": "一个基于UIAlertController 上修改的一个可以在顶部插入一个图片的Alert弹窗,你可以使用不同的icon使提示更加醒目,并对接系统Alert自动布局,不用担心文字过多过少引起的样式异常的问题",
"homepage": "https://github.com/wanghao20150901/SYAlertController",
"li... | 417 |
4,901 | <reponame>OneRom/external_okhttp<gh_stars>1000+
/*
* Copyright (C) 2014 Square, 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... | 663 |
1,102 | // Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id:$
//
// Copyright (C) 1993-1996 by id Software, Inc.
//
// This source is available for distribution and/or modification
// only under the terms of the DOOM Source Code License as
... | 399 |
476 | import argparse
import os
import sys
import tempfile
from pathlib import Path
from timeit import default_timer as timer
from typing import List
from printer import Printer as P
from printer import print_test_results, print_test_results_machine
from testrunner import TestRunner
from testsuite import TestSuite
def m... | 949 |
1,711 | <reponame>sobolevn/paasta<gh_stars>1000+
# coding: utf-8
# flake8: noqa
"""
Paasta API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
... | 290 |
410 | <filename>lib/bk/bkblock.c
#include "bkblock.h"
static void bkblock_acells(bk_Block *b, uint32_t len) {
if (len <= b->length + b->free) {
// We have enough space
b->free -= len - b->length;
b->length = len;
} else {
// allocate space
b->length = len;
b->free = (len >> 1) & 0xFFFFFF;
RESIZE(b->cells, b-... | 1,627 |
602 | <gh_stars>100-1000
#pragma once
#include <string>
#include <vector>
#include "common/goos/Object.h"
#include "common/goos/Reader.h"
#include "common/goos/Printer.h"
namespace pretty_print {
// main pretty print function
std::string to_string(const goos::Object& obj, int line_length = 110);
} // namespace pretty_pri... | 114 |
11,356 | <filename>deps/src/boost_1_65_1/libs/phoenix/test/function/lazy_list2_tests.cpp
////////////////////////////////////////////////////////////////////////////
// lazy_list2_tests.cpp
//
// more tests on list<T>
//
////////////////////////////////////////////////////////////////////////////
/*=============================... | 523 |
11,868 | <reponame>MalcolmScoffable/openapi-generator
{"mine":1,"sold":18,"string":568,"Dead":2,"test":2,"Nonavailable":1,"custom":3,"pending":20,"available":2212,"notAvailable":26,"avaiflable":1,"AVAILABLE":1,"swimming":1,"availablee":2,"success":1,"105":1,"missing":11,"disabled":1,"Available":1,"]]>":1} | 112 |
308 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#import "MSACModel.h"
#import "MSACSerializableObject.h"
static NSString *const kMSACAppId = @"id";
static NSString *const kMSACAppLocale = @"locale";
static NSString *const kMSACAppName ... | 320 |
675 | /*
* Copyright 2017 The Bazel Authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 1,148 |
9,402 | <reponame>pyracanda/runtime<gh_stars>1000+
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#include "ildasmpch.h"
#include "mdfileformat.h"
#include "../tools/metainfo/mdinfo.cpp"
#include "../tools/metainfo/mdobj.cpp"
| 106 |
3,172 | <gh_stars>1000+
# Copyright (c) 2021 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.org/licenses/LICENSE-2.0
#
# Unless... | 1,476 |
570 | <reponame>AmbientAI/amazon-kinesis-client
/*
* Copyright 2019 Amazon.com, Inc. or its affiliates.
* Licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/L... | 610 |
2,151 | <reponame>zipated/src
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "services/network/public/cpp/cors/preflight_result.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_numb... | 2,539 |
634 | <gh_stars>100-1000
package com.intellij.util;
import consulo.util.dataholder.Key;
import org.jetbrains.annotations.NonNls;
import javax.annotation.Nonnull;
import java.util.HashMap;
import java.util.Map;
/**
* @author peter
*/
public class ProcessingContext {
private Map<Object, Object> myMap;
private SharedPr... | 471 |
3,358 | <reponame>urgu00/QuantLib
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Copyright (C) 2000, 2001, 2002, 2003 RiskMap srl
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is fr... | 2,099 |
2,151 | /*
* Copyright © 2014 Google, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to use, copy, modify, and distribute this
* software and its documentation for any purpose, provided that the
* above copy... | 1,689 |
701 | <gh_stars>100-1000
#include <cc/ast/val.h>
const char *cval_type_to_str_raw[CVAL_COUNT] =
{
[CVAL_SIGNED] = "signed",
[CVAL_UNSIGNED] = "unsigned",
[CVAL_FLOAT] = "float",
[CVAL_STRING] = "string",
};
Str cval_type_to_str(CValType type)
{
return str$(cval_type_to_str_raw[type])... | 171 |
440 | <filename>IGC/Compiler/PromoteResourceToDirectAS.h
/*========================== begin_copyright_notice ============================
Copyright (C) 2017-2021 Intel Corporation
SPDX-License-Identifier: MIT
============================= end_copyright_notice ===========================*/
#pragma once
#include "common/L... | 725 |
6,034 | <reponame>ssSlowDown/onemall<filename>moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/event/OperationLogListener.java
package cn.iocoder.mall.system.biz.log.operation.event;
import cn.iocoder.mall.system.biz.log.operation.service.OperationLogSaveService;
import lombok.extern.slf4j.Slf4j;... | 304 |
3,269 | <filename>Algo and DSA/LeetCode-Solutions-master/Python/number-of-paths-with-max-score.py
# Time: O(n^2)
# Space: O(n)
class Solution(object):
def pathsWithMaxScore(self, board):
"""
:type board: List[str]
:rtype: List[int]
"""
MOD = 10**9+7
directions = [[1, 0], [0... | 718 |
984 | /*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
spapidef.h
Abstract:
Public header file for Windows NT Setup and Device Installer services Dll.
--*/
#ifndef _INC_SPAPIDEF
#define _INC_SPAPIDEF
#if _MSC_VER > 1000
#pragma once
#endif
#include <winapifamily.h>
#pragma region ... | 1,515 |
666 | <gh_stars>100-1000
/**
*
* Copyright 2018 iQIYI.com
*
* 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 ... | 695 |
2,151 | <filename>components/invalidation/impl/profile_invalidation_provider.h
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_INVALIDATION_IMPL_PROFILE_INVALIDATION_PROVIDER_H_
#define COMPO... | 436 |
777 | <gh_stars>100-1000
// Copyright 2016 The open-vcdiff 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
//... | 582 |
834 | <reponame>nathanawmk/fboss
/*
* 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 be found in the PATENTS file in the ... | 268 |
335 | {
"word": "Hurt",
"definitions": [
"Cause pain or injury to.",
"(of a part of the body) suffer pain.",
"Cause distress to.",
"(of a person) feel distress.",
"Be detrimental to.",
"Have a pressing need for."
],
"parts-of-speech": "Verb"
} | 134 |
389 | <gh_stars>100-1000
/*
* Copyright 2014 <NAME>, Inc.
*/
package gw.internal.gosu.parser.statements;
import gw.internal.gosu.parser.Statement;
import gw.lang.parser.statements.IClassFileStatement;
import gw.lang.parser.statements.INamespaceStatement;
import gw.lang.parser.statements.ITerminalStatement;
import gw.lang... | 446 |
565 |
// The files containing the tree of child classes of |DynamicFrame| must be
// included in the order of inheritance to avoid circular dependencies. This
// class will end up being reincluded as part of the implementation of its
// parent.
#ifndef PRINCIPIA_PHYSICS_DYNAMIC_FRAME_HPP_
#include "physics/dynamic_frame.h... | 1,506 |
1,062 | //
// Generated by class-dump 3.5b1 (64 bit) (Debug version compiled Dec 3 2019 19:59:57).
//
// Copyright (C) 1997-2019 <NAME>.
//
#import <AppKit/NSToolbarItem.h>
@class NSSegmentedControl;
@interface MUISegmentedToolbarItem : NSToolbarItem
{
}
- (void)sizeToFit; // IMP=0x000000000001e3a5
- (void)validate; ... | 188 |
5,169 | {
"name": "ViVuTech",
"version": "1.0.6",
"summary": "Small test to test code sharing via cocoapods.",
"description": "This is some superl oco framework that was made by kevin vugts.",
"homepage": "https://github.com/trunghieunt/ViVuTech",
"license": "MIT",
"authors": {
"Hieu": "<EMAIL>"
},
"platf... | 254 |
2,360 | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class PyHdbscan(PythonPackage):
"""HDBSCAN - Hierarchical Density-Based Spatial Clustering of
Applications with N... | 553 |
14,668 | <reponame>chromium/chromium
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_VIEWS_PAGE_INFO_SAFETY_TIP_PAGE_INFO_BUBBLE_VIEW_H_
#define CHROME_BROWSER_UI_VIEWS_PAGE_INFO_SAFETY... | 1,137 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.