max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
2,268 | //========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef UTLQUEUE_H
#define UTLQUEUE_H
#ifdef _WIN32
#pragma once
#endif
#include "utlmemory.h"
//#define TEST_UTLQUEUE
e... | 5,671 |
572 | <reponame>fangniu/redis-port<filename>pkg/rdb/cgo_3rd_redis1.c
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
extern long int random(void);
#include <redis/src/adlist.c>
#include <redis/src/crc64.c>
#include <redis/src/dict.c>
#include <redis/src/endianconv.c>
#include <redis/src/intset.c>
#include <redi... | 317 |
11,435 | # vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
from powerline.renderers.shell.readline import ReadlineRenderer
renderer = ReadlineRenderer
| 66 |
328 | <reponame>nian8/flow<filename>flow-api/src/main/java/com/dragon/flow/model/flowable/FlowListener.java
package com.dragon.flow.model.flowable;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.... | 511 |
739 | <reponame>takipsizad/pyjs<gh_stars>100-1000
is_desktop = False
def setup(application, appdir=None, width=800, height=600):
pass
def run(one_event=False, block=True):
pass
| 73 |
387 | <filename>processor/src/main/java/org/jokar/permissiondispatcher/processor/exception/WrongClassException.java
package org.jokar.permissiondispatcher.processor.exception;
import javax.lang.model.element.TypeElement;
/**
* Created by JokAr on 16/8/23.
*/
public class WrongClassException extends RuntimeException {
... | 157 |
436 | <gh_stars>100-1000
package com.jdon.jivejdon.presentation.form;
import java.awt.image.BufferedImage;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionMapping;
impo... | 1,455 |
634 | import re
import colorsys
def text_color_for_background_color(color):
if not re.match(r'^[0-9a-fA-F]{3,6}$', color):
return "000"
if len(color) == 3:
color = "".join(2 * c for c in color)
try:
hls = colorsys.rgb_to_hls(float(int(color[0:2], 16))/255.0,
... | 335 |
945 | <filename>Modules/ThirdParty/GDCM/src/gdcm/Source/Common/gdcmSmartPointer.h
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 <NAME>
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyrig... | 1,053 |
1,711 | <gh_stars>1000+
package org.squirrelframework.foundation.fsm.builder;
import org.squirrelframework.foundation.fsm.StateMachine;
public interface DeferBoundActionFrom<T extends StateMachine<T, S, E, C>, S, E, C> {
/**
* Build transition target state and return to clause builder
* @param stateId id o... | 188 |
9,717 | /*
This and the shell builder was originally written by
https://github.com/tpoechtrager but I had to modify both so that
they played nicely and were reproducible with nixpkgs. Much thanks
to MixRank for letting me work on this.
<NAME> <<EMAIL>>
*/
#ifndef TARGET_CPU
#define TARGET_CPU "armv7"
#endif
#ifnde... | 2,165 |
575 | <reponame>mghgroup/Glide-Browser<gh_stars>100-1000
// 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 UI_OZONE_PLATFORM_WAYLAND_TEST_TEST_OUTPUT_H_
#define UI_OZONE_PLATFORM_WAYLAND_TEST_TEST_OUTPU... | 414 |
755 | /**
* @project: Overload
* @author: <NAME>.
* @licence: MIT
*/
#include "OvCore/Scripting/LuaGlobalsBinder.h"
#include <OvDebug/Utils/Logger.h>
#include <OvTools/Utils/Random.h>
#include "OvCore/ECS/Actor.h"
#include "OvCore/ECS/PhysicsWrapper.h"
#include "OvCore/Global/ServiceLocator.h"
#include "OvCore/SceneSystem... | 4,741 |
324 | <reponame>bovink/sa-sdk-android-plugin2
package com.sensorsdata.analytics.android.plugin.hook.config;
import com.sensorsdata.analytics.android.plugin.SensorsAnalyticsMethodCell;
import org.objectweb.asm.Opcodes;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
public class SensorsFra... | 1,376 |
15,577 | #pragma once
#include "Internals.h"
namespace DB
{
struct ShardPartitionPiece
{
ShardPartitionPiece(ShardPartition &parent, size_t current_piece_number_, bool is_present_piece_)
: is_absent_piece(!is_present_piece_), current_piece_number(current_piece_number_),
shard_partition(parent) ... | 774 |
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... | 1,310 |
640 | <filename>examples/graphics/julia.c
#include <stdio.h>
#include <math.h>
#include <graphics.h>
#define iterates 101
float r,r1,r2,i,i1,i2,sr,si;
float a,b,d,d1;
float x0,y0,ux,uy;
float zr,zi;
float eps;
int n;
float xmax,ymax;
void main()
{
clg();
xmax=(float)getmaxx();
ymax=(float)getmaxy();
r1=-1.6; r2... | 690 |
890 | /*
* MIT License
*
* Copyright (c) 2017 Twitter
*
* 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, modify, ... | 827 |
2,103 | #!/usr/bin/env python
# Copyright (c) 2019 The Khronos Group Inc.
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE.txt file.
"""
Generator for textureformat* tests.
This file needs to be run in its folder.
"""
import sys
_DO_NOT_EDIT_WARNING = """<!--
This file i... | 1,141 |
410 | <gh_stars>100-1000
{
"authors": [],
"date_download": "2018-01-10T23:37:21",
"date_modify": null,
"date_publish": null,
"description": "Police in New Orleans have arrested a 67-year-old man after they say he helped swindle people out of thousands of dollars as a middleman in a \u201cNigerian prince\u201d inter... | 753 |
348 | {"nom":"Saint-Père","circ":"7ème circonscription","dpt":"Ille-et-Vilaine","inscrits":1851,"abs":871,"votants":980,"blancs":15,"nuls":2,"exp":963,"res":[{"nuance":"REM","nom":"Mme <NAME>","voix":333},{"nuance":"LR","nom":"<NAME>","voix":315},{"nuance":"FI","nom":"M. <NAME>","voix":96},{"nuance":"FN","nom":"<NAME>","voix... | 313 |
1,077 | <filename>Quicksilver/Code-External/NDClasses/IntegerMath.h
/*
IntegerMath.h
Created by <NAME> on 29.06.03 under a MIT-style license.
Copyright (c) 2008 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to de... | 729 |
4,335 | /*----------------------------------------------------------------------------
* Copyright (c) Huawei Technologies Co., Ltd. 2013-2020. All rights reserved.
* Description: LiteOS Kernel Demo Entry
* Author: Hu<NAME>
* Create: 2013-01-01
* Redistribution and use in source and binary forms, with or without modificat... | 1,486 |
397 | # Exploit Title: Microsoft Windows SMB Client Null Pointer Dereference Denial of Service
# Date: 26/02/2018
# Exploit Author: <NAME>
# Version: SMBv3
# Tested on: Windows 8.1 (x86), Windows Server 2012 R2 (x64)
# CVE : CVE-2018-0833
import SocketServer
from binascii import unhexlify
payload = '000000ecfd534d4241414141... | 612 |
340 | <filename>src/rtpp_math.c
/*
* Copyright (c) 2014 S<NAME>, Inc., http://www.sippysoft.com
* 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 t... | 975 |
1,340 | <reponame>dummylung/MetalPetal
//
// MTIMPSGaussianBlurFilter.h
// Pods
//
// Created by YuAo on 03/08/2017.
//
//
#if __has_include(<MetalPetal/MetalPetal.h>)
#import <MetalPetal/MTIFilter.h>
#else
#import "MTIFilter.h"
#endif
NS_ASSUME_NONNULL_BEGIN
__attribute__((objc_subclassing_restricted))
@interface MTIMPS... | 183 |
348 | {"nom":"Franvillers","circ":"4ème circonscription","dpt":"Somme","inscrits":450,"abs":282,"votants":168,"blancs":19,"nuls":9,"exp":140,"res":[{"nuance":"REM","nom":"<NAME>","voix":94},{"nuance":"FN","nom":"<NAME>","voix":46}]} | 89 |
6,989 | <reponame>ZhekehZ/catboost<filename>library/comptrie/write_trie_backwards.cpp<gh_stars>1000+
#include "write_trie_backwards.h"
#include "comptrie_impl.h"
#include "leaf_skipper.h"
#include <util/generic/buffer.h>
#include <util/generic/vector.h>
namespace NCompactTrie {
size_t WriteTrieBackwards(IOutputStream& o... | 1,782 |
2,073 | /**
* 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,938 |
538 | #!/usr/bin/env python3
import sys
from argparse import ArgumentParser
from pathlib import Path
from pprint import pprint
vint_root = Path(__file__).resolve().parent.parent
sys.path.insert(0, str(vint_root))
from vint.ast.node_type import NodeType
from vint.ast.traversing import traverse
from vint.ast.parsing import ... | 379 |
521 | <reponame>Fimbure/icebox-1
/*
* Copyright © 2013 <NAME>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that copyright
* notice and this perm... | 874 |
1,016 | <filename>core/operational-metadata/operational-metadata-jpa/src/main/java/com/thinkbiganalytics/metadata/jpa/jobrepo/job/BatchJobExecutionRepository.java
package com.thinkbiganalytics.metadata.jpa.jobrepo.job;
/*-
* #%L
* thinkbig-operational-metadata-jpa
* %%
* Copyright (C) 2017 ThinkBig Analytics
* %%
* Lice... | 3,938 |
713 | <reponame>pradeshm/infinispan<filename>query/src/test/java/org/infinispan/query/tx/TwoPhaseCommitIndexingTest.java
package org.infinispan.query.tx;
import static org.infinispan.configuration.cache.IndexStorage.LOCAL_HEAP;
import java.util.concurrent.atomic.AtomicBoolean;
import org.hibernate.search.util.common.Searc... | 1,603 |
1,262 | package com.netflix.metacat.metadata.store.data.converters;
import com.netflix.metacat.common.QualifiedName;
import lombok.extern.slf4j.Slf4j;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
/**
* The attribute converter for the QualifiedName type.
*
* @author rveeramacheneni
*/
... | 271 |
518 | <filename>src/main/java/io/sdb/form/SysNewsForm.java
package io.sdb.form;
import io.sdb.common.validator.group.AddGroup;
import io.sdb.common.validator.group.UpdateGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* Created by IntelliJ IDEA.
* User: quendi
* Date: 2018/6/10
*/
@Data
pu... | 260 |
994 | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
long long int a[100], n, i, b, c;
int main()
{
cin>>n;
for(i=0;i<n;i++)
{
cin>>a[i];
}
//cout<<max_element(a, a+n)-min_element(a, a+n);
if(abs(max_element(a, a+n)-min_element(a, a+n))==n-1)
{
cout<<n-1;
retur... | 416 |
319 | /**
* Copyright (c) 2011, The University of Southampton and the individual contributors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain ... | 2,547 |
1,821 | /*
* Copyright 2018- The Pixie 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 ag... | 843 |
743 | <filename>myinttypes.h
#if defined(_MSC_VER) && _MSC_VER <= 1700
#include "msvc/headers/inttypes.h"
#elif defined(CAPSTONE_HAS_OSXKERNEL)
/* this is a trimmed copy of system inttypes.h that doesn't exist
in OSX kernel framework headers */
#include "osxkernel_inttypes.h"
#else
#include <inttypes.h>
#endif
| 113 |
963 | <gh_stars>100-1000
package cn.enilu.flash.service.system;
import cn.enilu.flash.bean.entity.system.User;
import cn.enilu.flash.cache.CacheDao;
import cn.enilu.flash.dao.system.UserRepository;
import cn.enilu.flash.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springfram... | 770 |
1,350 | <reponame>Shashi-rk/azure-sdk-for-java<gh_stars>1000+
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.core.amqp.implementation.handler;
import com.azure.core.util.logging.ClientLogger;
import org.apache.qpid.proton.engine.BaseHandler;
import org.apache... | 375 |
3,024 | """Tests for the core library."""
| 10 |
3,269 | #include "core/lsp/PreemptionTaskManager.h"
#include "core/ErrorQueue.h"
#include "core/NullFlusher.h"
#include "core/lsp/Task.h"
#include "core/lsp/TypecheckEpochManager.h"
using namespace std;
namespace sorbet::core::lsp {
PreemptionTaskManager::PreemptionTaskManager(shared_ptr<TypecheckEpochManager> epochManager)... | 1,420 |
1,089 | <reponame>azakrytnoi/logbook<filename>logbook-httpclient5/src/main/java/org/zalando/logbook/httpclient5/HttpEntities.java
package org.zalando.logbook.httpclient5;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.experimental.Delegate;
import lombok.experimental.UtilityClass;
import org.apache... | 480 |
634 | <reponame>halotroop2288/consulo<filename>modules/base/lang-injecting-impl/src/main/java/org/intellij/plugins/intelliLang/inject/DefaultLanguageInjector.java
/*
* 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 ... | 759 |
348 | //import <GLUP/current_profile/vertex_shader_preamble.h>
//import <GLUPES/vertex_shader_state.h>
//import <GLUP/stdglup.h>
//import <GLUP/current_profile/toggles.h>
//import <GLUP/current_profile/primitive.h>
glup_in vec4 vertex_in;
glup_in vec4 color_in; ... | 1,205 |
587 | /*
* Copyright 2017-2020 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... | 3,114 |
5,703 | /*
*
* Copyright 2015-2019 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 req... | 4,102 |
348 | <filename>docs/data/leg-t2/074/07403313.json
{"nom":"Vovray-en-Bornes","circ":"3ème circonscription","dpt":"Haute-Savoie","inscrits":371,"abs":193,"votants":178,"blancs":3,"nuls":2,"exp":173,"res":[{"nuance":"LR","nom":"M. <NAME>","voix":88},{"nuance":"REM","nom":"<NAME>","voix":85}]} | 121 |
488 | #include <cstdio>
#include <cstdlib>
#define ARR_SIZE 100
int main() {
int* arr[100];
for(int index = 0; index < ARR_SIZE; index++) {
arr[index] = (int*)malloc(sizeof(int)*ARR_SIZE);
}
for(int index = 0; index < ARR_SIZE; index++) {
free(arr[index]);
}
return 0;
}
| 149 |
868 | // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the
// License at
//
// https://opensource.org/licenses/BSD-3-Clause
//
// Unless req... | 3,481 |
1,759 | <gh_stars>1000+
#define PCM_VERSION " ($Format:%ci ID=%h$)"
| 27 |
3,083 | <reponame>utumen/binnavi
// Copyright 2011-2016 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 applic... | 1,244 |
1,107 | <reponame>leoatchina/MachineLearning
import numpy as np
class RNN1:
def __init__(self, u, v, w):
self._u, self._v, self._w = np.asarray(u), np.asarray(v), np.asarray(w)
self._states = None
def activate(self, x):
return x
def transform(self, x):
return x
... | 991 |
5,823 | <gh_stars>1000+
// Copyright 2013 The Flutter 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 "flutter/shell/platform/common/geometry.h"
#include "gtest/gtest.h"
namespace flutter {
TEST(Point, SetsCoordinates) {
Point ... | 599 |
1,847 | /*
* 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 required by app... | 3,874 |
12,252 | <filename>services/src/main/java/org/keycloak/keys/loader/PublicKeyStorageManager.java<gh_stars>1000+
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file ex... | 1,476 |
2,151 | <reponame>bopopescu/webrtc-streaming-node<filename>third_party/webrtc/src/chromium/src/third_party/flac/include/share/alloc.h
// Copyright (c) 2011 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 THIRD_PARTY_FLAC... | 322 |
1,144 | package de.metas.dataentry.layout;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.function.Predicate;
import org.adempiere.ad.element.api.AdWindowId;
import org.adempiere.ad.table.api.AdTableId;
import org.adempiere.exceptions.AdempiereException;
import java.util.Objects;
im... | 982 |
459 | /*
Copyright 2005-2015 Intel Corporation. All Rights Reserved.
This file is part of Threading Building Blocks. Threading Building Blocks is free software;
you can redistribute it and/or modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundat... | 1,540 |
1,825 | <reponame>thy486/unidbg
package com.github.unidbg.hook;
import com.github.unidbg.memory.SvcMemory;
public interface HookListener {
int EACH_BIND = -1;
int WEAK_BIND = -2;
/**
* 返回0表示没有hook,否则返回hook以后的调用地址
*/
long hook(SvcMemory svcMemory, String libraryName, String symbolName, long old);
... | 165 |
389 | <reponame>dmcreyno/gosu-lang
package gw.plugin;
/**
* This simple interface provides the core foundation for component architecture in Gosu.
*/
public interface IPluginHost
{
/**
* Provides an implementation of a specified interface.
* @param apiInterface
* @param <T>
* @return The implementation of th... | 136 |
1,060 | <gh_stars>1000+
/*
* Copyright 2017 LinkedIn, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | 543 |
2,206 | <filename>contrib/codegen-tools/onnx-def-gen/test_op_def_gen.py
# /* ******************************************************************************
# *
# *
# * This program and the accompanying materials are made available under the
# * terms of the Apache License, Version 2.0 which is available at
# * ... | 477 |
2,338 | //===- DWARFDebugArangeSet.h ------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | 858 |
432 | /*
* This file is part of Cubic Chunks Mod, licensed under the MIT License (MIT).
*
* Copyright (c) 2015-2019 OpenCubicChunks
* Copyright (c) 2015-2019 contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "So... | 5,965 |
1,337 | <filename>modules/gui/src/com/haulmont/cuba/gui/components/RelativePathResource.java
/*
* Copyright (c) 2008-2017 Haulmont.
*
* 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... | 350 |
1,798 | /*
* Copyright (C) 2021 pedroSG94.
*
* 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,105 |
1,034 | /*
Copyright 2021 Picovoice Inc.
You may not use this file except in compliance with the license. A copy of the license is
located in the "LICENSE" file accompanying this source.
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an ... | 4,780 |
496 | <gh_stars>100-1000
package org.nativescript.staticbindinggenerator.generating.parsing.classes.hierarchy.generics.impl.test4;
import java.util.List;
public interface Interface1<T> extends Interface2<List<String>, T> {
}
| 74 |
14,668 | <reponame>zealoussnow/chromium
// 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 "chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.h"
#include "base/bind.h"
#include "base/stri... | 1,908 |
732 | /*
* strftime.c
*
* Public-domain relatively quick-and-dirty implementation of
* ANSI library routine for System V Unix systems.
*
* It's written in old-style C for maximal portability.
* However, since I'm used to prototypes, I've included them too.
*
* If you want stuff in the System V ascftime routine, add ... | 342 |
349 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in the project root
# for license information.
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import re
import threading
from ptvsd.common import fmt, log
class Ca... | 1,620 |
412 | <filename>server/src/main/java/datart/server/base/params/ResourcePermissionParam.java
package datart.server.base.params;
import datart.security.base.ResourceType;
import lombok.Data;
@Data
public class ResourcePermissionParam {
private String resourceId;
private ResourceType resourceType;
private int ... | 110 |
372 | <reponame>Shafaq-Siddiqi/systemml
/*
* 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, Ve... | 1,518 |
1,781 | <filename>src/chapter5/section5/Genome.java
package chapter5.section5;
import edu.princeton.cs.algs4.Alphabet;
import edu.princeton.cs.algs4.BinaryStdIn;
import edu.princeton.cs.algs4.BinaryStdOut;
/**
* Created by <NAME> on 13/04/18.
*/
public class Genome {
public static void compress() {
Alphabet DN... | 596 |
507 | <gh_stars>100-1000
import terrascript
import terrascript.provider
import terrascript.resource
config = terrascript.Terrascript()
# AWS provider
config += terrascript.provider.aws(region="us-east-1")
# Define Variable and add to config
v = terrascript.Variable("image_id", type="string")
config += v
# AWS EC2 instanc... | 145 |
4,145 | <reponame>hamjam/NeMo
# Copyright (c) 2020, NVIDIA CORPORATION. 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
#
# Un... | 2,246 |
497 | <filename>src/test/java/org/threeten/bp/chrono/TestChronology.java
/*
* Copyright (c) 2007-present, <NAME> & <NAME>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions... | 3,031 |
1,209 | /*
Fontname: -Adobe-Helvetica-Medium-R-Normal--14-100-100-100-P-76-ISO10646-1
Copyright: Copyright (c) 1984, 1987 Adobe Systems Incorporated. All Rights Reserved. Copyright (c) 1988, 1991 Digital Equipment Corporation. All Rights Reserved.
Capital A Height: 11, '1' Height: 11
Calculated Max Values w=13 h=14 x= ... | 7,767 |
308 | /*
* Copyright 2018, <NAME>
*
* 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 conditions and the following di... | 1,989 |
2,151 | from __future__ import absolute_import
from future.utils import PY3
if PY3:
from copyreg import *
else:
__future_module__ = True
from copy_reg import *
| 58 |
369 | // Copyright (c) 2017-2021, Mudita <NAME>.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include <utf8/UTF8.hpp>
#include <ctime>
namespace utils::time
{
std::time_t getCurrentTime();
std::time_t calculateTimeDifference(std::time_t alarmTime, std:... | 187 |
2,338 | <filename>Wikipedia/Code/UIView+WMFSnapshotting.h
@import UIKit;
@interface UIView (WMFSnapshotting)
- (nullable UIImage *)wmf_snapshotImageAfterScreenUpdates:(BOOL)afterScreenUpdates;
- (nullable UIImage *)wmf_snapshotImage;
@end
| 88 |
950 | <reponame>hao14293/2021-Postgraduate-408
bool IsComplete(BiTree T){
InitQueue(Q);
if(!T) return 1;
EnQueue(Q, T);
while(!IsEmpty(Q)){
DeQueue(Q, p);
if(p){
EnQueue(Q, p->lchild);
EnQueue(Q, p->rchild);
}
else{
while(!IsEmpty(Q)){
DeQueue(Q, p);
if(p) return 0;
}
}
}
return 1;
}
| 173 |
606 | package org.arend.util;
import org.intellij.lang.annotations.Language;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
@Retention(RetentionPolicy.CLASS)
@Target({METHOD, FIELD, PARAMETER, LOCAL_... | 133 |
328 | <filename>springboot-lombok/src/main/java/com/ctg/test/springbootlombok/SpringbootLombokApplication.java
package com.ctg.test.springbootlombok;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* idea安装lombok插件
*/
@SpringBootApplication
publi... | 163 |
849 | package milkman.ui.main.dialogs;
import com.jfoenix.controls.JFXDialogLayout;
import com.jfoenix.controls.JFXSpinner;
import javafx.scene.control.Dialog;
import javafx.scene.control.Label;
import lombok.Getter;
import lombok.SneakyThrows;
import milkman.utils.fxml.FxmlUtil;
import reactor.core.Disposable;
import react... | 573 |
416 | <filename>sfm-poi/src/main/java/org/simpleflatmapper/poi/impl/StaticSheetMapper.java
package org.simpleflatmapper.poi.impl;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.simpleflatmapper.map.ContextualSourceFieldMapper;
import org.simpleflatmapper.map.SourceFieldMapper;
... | 1,471 |
852 | ##########################################################################
# Parse the alignment_merge.py file for additional information
#
import logging
import Alignment.MillePedeAlignmentAlgorithm.mpslib.tools as mps_tools
class AdditionalData:
""" stores the additional information of the alignment_merge.py f... | 724 |
3,102 | // RUN: %clang_cc1 -triple x86_64-windows-msvc -fms-extensions -verify -std=c++11 %s
// RUN: %clang_cc1 -triple x86_64-windows-msvc -fms-extensions -verify -std=c++17 %s
// expected-no-diagnostics
struct __declspec(dllimport) Foo { int get_a(); };
template <int (Foo::*Getter)()> struct HasValue { };
HasValue<&Foo::ge... | 139 |
343 | <gh_stars>100-1000
from mayan.apps.documents.models import Document
from mayan.apps.documents.permissions import permission_document_create
from mayan.apps.documents.tests.base import GenericDocumentViewTestCase
from mayan.apps.sources.tests.mixins.web_form_source_mixins import WebFormSourceTestMixin
from mayan.apps.so... | 760 |
1,668 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import ralph.lib.mixins.fields
class Migration(migrations.Migration):
dependencies = [
('back_office', '0009_auto_20181016_1252'),
]
operations = [
migrations.AddField(
m... | 218 |
2,996 | <reponame>opl-/Terasology
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.engine.math;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import gnu.trove.map.TObjectByteMap;
import gnu.trove.map.hash.TObjectByteHashMap;
import java... | 1,117 |
1,338 | <reponame>Kirishikesan/haiku
/*
* Copyright 2006-2008, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* <NAME>, <EMAIL>
*/
#include "accelerant.h"
#include "intel_extreme.h"
#include <errno.h>
#include <unistd.h>
#undef TRACE
//#define TRACE_MEMORY
#ifdef TRA... | 492 |
2,338 | #include "benchmark/benchmark.h"
#include "VariantBenchmarks.h"
using namespace VariantBenchmarks;
BENCHMARK_TEMPLATE(BM_Visit, 2, 1);
BENCHMARK_TEMPLATE(BM_Visit, 2, 2);
BENCHMARK_TEMPLATE(BM_Visit, 2, 3);
BENCHMARK_TEMPLATE(BM_Visit, 2, 4);
BENCHMARK_TEMPLATE(BM_Visit, 2, 5);
BENCHMARK_TEMPLATE(BM_Visit, 2, 6);
BE... | 324 |
1,209 | /*
Fontname: -Adobe-Helvetica-Bold-R-Normal--17-120-100-100-P-92-ISO10646-1
Copyright: Copyright (c) 1984, 1987 Adobe Systems Incorporated. All Rights Reserved. Copyright (c) 1988, 1991 Digital Equipment Corporation. All Rights Reserved.
Capital A Height: 0, '1' Height: 12
Calculated Max Values w= 8 h=12 x= 2 y... | 871 |
419 | <gh_stars>100-1000
#include "Module.h"
#include "Engine/Core/Modules/EngineModuleContext.h"
//-------------------------------------------------------------------------
namespace KRG
{
namespace Animation
{
bool EngineModule::Initialize( ModuleContext& context )
{
auto co... | 532 |
675 | <reponame>bigplayszn/nCine<gh_stars>100-1000
#include "Application.h"
#include "Random.h"
#include "IAppEventHandler.h"
#include "FileSystem.h"
#include "IFile.h"
#include "ArrayIndexer.h"
#include "GfxCapabilities.h"
#include "RenderResources.h"
#include "RenderQueue.h"
#include "GLDebug.h"
#include "Timer.h" // for ... | 3,408 |
425 | // Include MicroPython API.
#include "py/runtime.h"
#include "py/objstr.h"
/***** Constants *****/
static const int WIDTH = 240;
static const int HEIGHT = 240;
/***** Extern of Class Definition *****/
extern const mp_obj_type_t breakout_colourlcd240x240_BreakoutColourLCD240x240_type;
/***** Extern of Class Methods ... | 937 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.