max_stars_count
int64
301
224k
text
stringlengths
6
1.05M
token_count
int64
3
727k
1,444
package mage.cards.o; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.FilterCard; import mage.filter.predicate.Predicat...
532
487
/* * Copyright 2012-2014 <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.0 * * Unless required by applicable law or agreed to in w...
1,054
998
<reponame>ADMTec/VoxelPlugin<gh_stars>100-1000 // Copyright 2021 Phyronnaz #pragma once #include "CoreMinimal.h" #include "Toolkits/AssetEditorToolkit.h" class FAdvancedPreviewScene; class FVoxelGraphCompiler; class UVoxelGraphGenerator; class UEdGraphNode; class FVoxelCompilationNode; struct FVoxelGra...
542
332
import requests import urllib.parse from bs4 import BeautifulSoup from utils import pretty_print INDEX = 'https://www.ptt.cc/bbs/movie/index.html' NOT_EXIST = BeautifulSoup('<a>本文已被刪除</a>', 'lxml').a def get_posts_on_page(url): response = requests.get(url) soup = BeautifulSoup(response.text, 'lxml') ar...
564
562
<reponame>ibrumar/CompilerGym // 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. #pragma once #include "compiler_gym/service/proto/compiler_gym_service.pb.h" namespace compiler_gym::llvm_s...
422
529
<reponame>PervasiveDigital/netmf-interpreter /* crypto/asn1/f_string.c */ /* Copyright (C) 1995-1998 <NAME> (<EMAIL>) * All rights reserved. * * This package is an SSL implementation written * by <NAME> (<EMAIL>). * The implementation was written so as to conform with Netscapes SSL. * * This library is ...
2,768
787
// OJ: https://leetcode.com/problems/regions-cut-by-slashes/ // Author: github.com/lzl124631x // Time: O(N^2) // Space: O(N^2) #define TO(d) dfs(grid, g, x + dirs[d][0], y + dirs[d][1], d, color) class Solution { int N; void setLeftColor(vector<vector<int>> &g, int x, int y, int color) { g[x][y] += colo...
1,980
1,686
// Copyright (c) 2019 The Chromium Embedded Framework 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 CEF_LIBCEF_COMMON_FRAME_UTIL_H_ #define CEF_LIBCEF_COMMON_FRAME_UTIL_H_ #include <stdint.h> #include <string> #include "b...
977
1,903
<reponame>hongwen-sun/muzic # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # from tqdm import tqdm import sys if __name__ == '__main__': assert len(sys.argv) == 2 name = sys.argv[1] prefix = f'data/{name}' for sp in ['train', 'valid', 'test']: ...
967
499
import logging from collections import defaultdict import numpy as np from SetSimilaritySearch.utils import _frequency_order_transform, \ _similarity_funcs, _overlap_threshold_funcs, _position_filter_funcs, \ _symmetric_similarity_funcs def all_pairs(sets, similarity_func_name="jaccard", simil...
1,248
12,252
<reponame>rmartinc/keycloak /* D-Bus Java Implementation Copyright (c) 2005-2006 <NAME> This program is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 2 or the Academic Free Licence Version 2.1. Full licence texts are i...
230
2,071
<reponame>Kabimon/DataSphereStudio /* * Copyright 2019 WeBank * 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 appli...
4,004
333
<filename>src/main/java/com/alipay/api/domain/AlipayUserTwostageCommonUseModel.java package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 通用当面付二阶段接口 * * @author <NAME> * @since 1.0, 2021-07-29 14:13:05 */ public class AlipayUserTwosta...
1,107
989
# -*- coding: utf-8 -*- """ Unit tests for the potential dialect selection. Author: <NAME> """ import unittest from clevercsv.potential_dialects import filter_urls from clevercsv.potential_dialects import get_delimiters from clevercsv.potential_dialects import get_quotechars from clevercsv.potential_dialects impor...
643
454
package io.smallrye.mutiny.math.tck; import java.util.Iterator; import java.util.NoSuchElementException; public final class TckHelper { private TckHelper() { // avoid direct instantiation } public static Iterable<Long> iterate(long elements) { return iterate(elements > Integer.MAX_VALUE,...
1,052
5,263
# 可以自己import我们平台支持的第三方python模块,比如pandas、numpy等 import talib import numpy as np # 在这个方法中编写任何的初始化逻辑。context对象将会在你的算法策略的任何方法之间做传递 def init(context): # context内引入全局变量s1,存储目标合约信息 context.s1 = "IF88" # 使用MACD需要设置长短均线和macd平均线的参数 context.SHORTPERIOD = 12 context.LONGPERIOD = 26 context.SMOOTHPERIOD =...
1,479
2,151
#!/usr/bin/env python # 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. from grit.gather import interface class JsonLoader(interface.GathererBase): '''A simple gatherer that loads and parses a JSON ...
235
575
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_LOGIN_DETECTION_LOGIN_DETECTION_KEYED_SERVICE_H_ #define CHROME_BROWSER_LOGIN_DETECTION_LOGIN_DETECTION_KEYED_SERVICE_H_ #include ...
567
9,680
<gh_stars>1000+ import time def add_one(inputs): return inputs + 1 def add_two(inputs): return inputs + 2 def add_three(inputs): return inputs + 3 def add_four(inputs): return inputs + 4 def main(): images = 5 """@nni.mutable_layers( { layer_choice: [add_one(), add_two(), add...
553
709
#define MLton_Platform_Arch_host "arm64"
15
763
package org.batfish.representation.palo_alto; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; /** Represents a Palo Alto configuration template */ @ParametersAreNonnullByDefault public class Template extends PaloAltoConfiguration { private final String _name; private @Null...
179
521
<gh_stars>100-1000 /** * @file include/retdec/rtti-finder/vtable/vtable_gcc.h * @brief GCC C++ virtual table structures. * @copyright (c) 2017 Avast Software, licensed under the MIT license */ #ifndef RETDEC_RTTI_FINDER_VTABLE_VTABLE_GCC_H #define RETDEC_RTTI_FINDER_VTABLE_VTABLE_GCC_H #include <cstdint> #include...
510
1,742
<gh_stars>1000+ import sage.dynamics.cellular_automata.catalog as cellular_automata from sage.misc.lazy_import import lazy_import lazy_import("sage.dynamics.cellular_automata.solitons", ["SolitonCellularAutomata", "PeriodicSolitonCellularAutomata"])
104
4,772
/* * Copyright 2016-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
769
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,646
4,640
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
1,179
2,568
<gh_stars>1000+ { "Contentful": { "domain": "contentful.com", "url": "https://www.contentful.com/", "tfa": [ "totp" ], "documentation": "https://www.contentful.com/faq/two-factor-authentication/", "keywords": [ "other" ] } }
129
14,668
<reponame>chromium/chromium<filename>extensions/browser/updater/update_service_factory.h<gh_stars>1000+ // 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 EXTENSIONS_BROWSER_UPDATER_UPDATE_SERVICE_...
404
6,215
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # from base64 import b64encode from typing import Any, List, Mapping, Tuple from airbyte_cdk import AirbyteLogger from airbyte_cdk.models import SyncMode from airbyte_cdk.sources import AbstractSource from airbyte_cdk.sources.streams import Stream from airbyt...
723
532
#ifndef _WOB_PLEDGE_H #define _WOB_PLEDGE_H #include <stdbool.h> bool wob_pledge(void); #endif
51
3,193
<reponame>oblanchet/sol2<filename>tests/environment/source/shadowing.cpp // sol2 // The MIT License (MIT) // Copyright (c) 2013-2021 Rapptz, ThePhD and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Soft...
1,726
938
<reponame>Justin12138/TinkersConstruct { "modifier_id": "tconstruct:shiny", "text": [ { "text": "Makes the tool glow as if enchanted. Thats is it, it is just decorative." } ], "more_text_space": true, "effects": [ "Single use", "Slotless" ] }
117
6,989
<filename>library/cpp/dot_product/bench/main.cpp #include <library/cpp/dot_product/dot_product.h> #include <library/cpp/dot_product/dot_product_sse.h> #include <library/cpp/dot_product/dot_product_avx2.h> #include <library/cpp/dot_product/dot_product_simple.h> #include <benchmark/benchmark.h> #include <contrib/libs/e...
2,733
312
<gh_stars>100-1000 /******************************************************************************* * Copyright (c) 2015 Eclipse RDF4J contributors, Aduna, and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Distribution License v1.0 * w...
514
1,851
<filename>ios/dist/ViroRenderer/x86_64/ViroKit.framework/Headers/VROFrameTimer.h<gh_stars>1000+ // // VROFrameTimer.h // ViroRenderer // // Created by <NAME> on 4/5/17. // Copyright © 2017 Viro Media. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of thi...
928
452
<filename>security/java-android-rsa-aes-des/src/test/java/xyz/rocko/security/AESCipherStrategyTest.java /* * Copyright 2015 Rocko (http://rocko.xyz) <<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 c...
501
3,294
// Counter.cs // <snippet0> using namespace System; public ref class Counter: public MarshalByRefObject { private: int count; public: Counter() { count = 0; } property int Count { int get() { return (count)++; } } }; // </snippet0>
130
7,069
<gh_stars>1000+ /* Copyright (c) 2016 The crouton Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * * LD_PRELOAD hack to make Xorg happy in a system without VT-switching. * gcc -shared -fPIC -ldrm -ldl -I/usr/include/libdrm -Wall -...
4,853
6,210
/* * 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,090
910
<filename>java/streams/src/test/java/org/dbsp/compute/RelationalOperatorTest.java<gh_stars>100-1000 /* * Copyright (c) 2021 VMware, Inc. * SPDX-License-Identifier: MIT * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Softwa...
6,417
454
package io.vertx.up.uca.rs; public interface Extractor<T> { T extract(Class<?> clazz); }
38
1,666
// Copyright 2020 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. #ifndef V8_HEAP_CPPGC_OBJECT_ALLOCATOR_H_ #define V8_HEAP_CPPGC_OBJECT_ALLOCATOR_H_ #include "include/cppgc/internal/gc-info.h" #include "src/heap/cppg...
502
1,008
{ "name": "Snov.io", "image": "https://logo.clearbit.com/snov.io", "auth": { "authType": "OAUTH2", "grantType": "client_credentials", "bodyFormat": "form", "tokenURL": "https://api.snov.io/v1/oauth/access_token", "authorizationMethod": "body", "authorizationParams": {} }, "request": { ...
234
732
<gh_stars>100-1000 package io.eventuate.tram.spring.messaging.common; import io.eventuate.tram.messaging.common.ChannelMapping; import io.eventuate.tram.messaging.common.DefaultChannelMapping; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotatio...
188
2,872
from NWENV import * from qtpy.QtWidgets import QTextEdit from qtpy.QtGui import QFontMetrics import numpy as np class MatrixWidget(MWB, QTextEdit): def __init__(self, params, base_width=50, base_height=50): MWB.__init__(self, params) QTextEdit.__init__(self) c = self.node.color ...
1,975
438
/* * ssheven * * Copyright (c) 2021 by cy384 <<EMAIL>> * See LICENSE file for details */ #include "ssheven.h" #include "ssheven-net.h" #include "ssheven-console.h" #include "ssheven-debug.h" #include <errno.h> #include <Script.h> #include <Threads.h> #include <mbedtls/base64.h> void ssh_write(char* buf, size...
6,581
3,765
/* * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ package net.sourceforge.pmd.lang.java.rule.design.singularfield; public class Issue3303 { // "private" is a must for reproducing the problem private final NoThrowingCloseable first; Issue3303(NoThrowingCloseable first...
229
447
<reponame>Rafa13el/stm32-usart-uart-dma-rx-tx<filename>middlewares/FreeRTOS/Source/CMSIS_RTOS/cpu_utils.c /********************** NOTES ********************************************** To use this module, the following steps should be followed : 1- in the _OS_Config.h file (ex. FreeRTOSConfig.h) enable the following mac...
1,255
9,782
/* * 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 * distribut...
395
13,006
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
1,397
335
package ezy.demo.noticeview; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Toast; import java.util.Arrays; import ezy.ui.view.NoticeView; public class MainActivity extends AppCompatActivity implements View.OnClickListener { public s...
811
4,013
'''配置文件''' import os '''屏幕大小''' SCREENSIZE = (993, 477) '''游戏素材路径''' ROOTDIR = os.getcwd() HAMMER_IMAGEPATHS = [os.path.join(ROOTDIR, 'resources/images/hammer0.png'), os.path.join(ROOTDIR, 'resources/images/hammer1.png')] GAME_BEGIN_IMAGEPATHS = [os.path.join(ROOTDIR, 'resources/images/begin.png'), os.path.join(ROOTD...
656
14,425
<filename>hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestConnectionManager.java<gh_stars>1000+ /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additi...
4,253
1,745
<gh_stars>1000+ //************************************ bs::framework - Copyright 2019 <NAME> **************************************// //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// #include "BsNetwork.h" #include "RakNet/RakPeer.h" #include ...
9,482
2,996
<reponame>Elyahu41/Terasology // Copyright 2021 The Terasology Foundation // SPDX-License-Identifier: Apache-2.0 package org.terasology.utilities; import org.junit.jupiter.api.Test; import org.terasology.engine.utilities.procedural.WhiteNoise; import org.terasology.engine.utilities.random.FastRandom; import static o...
645
743
<gh_stars>100-1000 """Unit tests for Minkowski space.""" import math import numpy as np import geomstats.backend as gs import geomstats.tests from geomstats.geometry.minkowski import Minkowski class TestMinkowski(geomstats.tests.TestCase): def setUp(self): gs.random.seed(1234) self.time_like_d...
3,316
5,964
<filename>third_party/WebKit/Source/platform/animation/TimingFunction.cpp // 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 "config.h" #include "platform/animation/TimingFunction.h" #include "pl...
5,550
3,227
namespace ArrTraits { /*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects * \cgalConcept * * \cgalRefines Functor * * \cgalHasModel ArrangementXMonotoneTraits_2::Merge_2 */ class Merge_2 { public: /// \name Operations /// A model of this concept must provide: /// @{ /*! accepts two <I>mergeabl...
305
846
<gh_stars>100-1000 package dsl_json.java.time; import com.dslplatform.json.Configuration; import com.dslplatform.json.DslJson; import com.dslplatform.json.JavaTimeConverter; import java.time.OffsetDateTime; public class OffsetDateTimeDslJsonConverter implements Configuration { @Override public void confi...
185
2,023
def partition(it): for i in range(len(it)): if i == len(it) - 1: yield [it[0:i+1]] else: for p in partition(it[i+1:]): yield [it[0:i+1]] + p print list(partition(range(4))) [[0], [1], [2], [3]] [[0], [1], [2, 3]] [[0], [1, 2], [3]] [[0]...
248
1,263
<gh_stars>1000+ from __future__ import unicode_literals import unittest from oauthlib.oauth2 import WebApplicationClient, MobileApplicationClient from oauthlib.oauth2 import LegacyApplicationClient, BackendApplicationClient from requests import Request from requests_oauthlib import OAuth2 class OAuth2AuthTest(unitte...
953
372
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2000, 2002, 2003, 2007, 2008 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may * require a specific license from the United States Government. * I...
19,367
1,963
<reponame>Yavari/ambar class FileParserResponse: def __init__(self): self.meta = {} self.text = '' self.thumbnail = None self.success = False self.message = '' self.ocrPerformed = False
109
2,151
// 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 "chrome/browser/ui/views/passwords/password_sign_in_promo_view.h" #include <memory> #include "base/metrics/user_metrics.h" #include "build/buil...
1,444
387
""" #################################################################################################### # Copyright Info : Copyright (c) <NAME> @ Hikvision Research Institute. All rights reserved. # Filename : character_mask_att_head.py # Abstract : Character Mask Attention predtion # Current Ver...
6,825
3,227
<reponame>brucerennie/cgal #include <CGAL/Surface_mesh.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Real_timer.h> #include <CGAL/IO/OFF.h> #include <CGAL/boost/graph/property_maps.h> #include <CGAL/number_utils.h> #include <CGAL/Coercion_traits.h> #include <fstream> #include <ostr...
3,910
1,531
package com.sleekbyte.tailor.utils; import com.sleekbyte.tailor.common.YamlConfiguration; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.Constructor; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Optional; /** * R...
686
3,066
<filename>material-intro-screen/src/main/java/agency/tango/materialintroscreen/listeners/MessageButtonBehaviourOnPageSelected.java package agency.tango.materialintroscreen.listeners; import android.util.SparseArray; import android.view.View; import android.view.animation.AnimationUtils; import android.widget.Button; ...
1,047
2,151
<gh_stars>1000+ // 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. #ifndef CHROME_BROWSER_UI_WEBUI_NTP_APP_ICON_WEBUI_HANDLER_H_ #define CHROME_BROWSER_UI_WEBUI_NTP_APP_ICON_WEBUI_HANDLER_H_ #include <mem...
512
645
package com.novoda.bonfire.user.view; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; import com.novoda.bonfire.R; import com.novoda.bonfire....
513
526
from matplotlib import pyplot as plt import matplotlib with open( '/data/vision/torralba/ganprojects/placesgan/tracer/metrics/patch_fid.txt' ) as f: results = { k: (float(v1), float(v2)) for k, v1, v2 in [l.strip().split(" ") for l in f.readlines()] } font = {'family' : 'normal', ...
652
2,517
<reponame>seewpx/actor-framework // This file is part of CAF, the C++ Actor Framework. See the file LICENSE in // the main distribution directory for license terms and copyright or visit // https://github.com/actor-framework/actor-framework/blob/master/LICENSE. #pragma once #include "caf/abstract_actor.hpp" #include ...
491
1,338
<gh_stars>1000+ /* * Copyright 2007-2014 Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: * <NAME>, <EMAIL> */ #include "DebugNow.h" #include <Catalog.h> #include <DefaultSettingsView.h> #include <Font.h> #include <StringView.h> #include <View.h> #undef B_TRANS...
916
7,073
<gh_stars>1000+ #!/usr/bin/env python """Script to extract examples from library docs to ease testing them. Usage: extract_examples.py path_to_lib """ import os.path import sys def extract_tests(path): initialize(path) read_tests(path) def initialize(path): lib = os.path.splitext(os.path.basename(pat...
463
15,179
<filename>jina/helloworld/chatbot/app.py import os import urllib.request import webbrowser from pathlib import Path from jina import Flow from jina.importer import ImportExtensions from jina.logging.predefined import default_logger from jina.logging.profile import ProgressBar from jina.parsers.helloworld import set_hw...
1,501
419
#pragma once #include "Engine/Core/_Module/API.h" #include "System/TypeSystem/TypeRegistrationMacros.h" #include "System/Core/Types/UUID.h" #include "System/Core/Types/Function.h" //------------------------------------------------------------------------- struct ImGuiWindowClass; //---------------------------------...
1,052
347
from pathlib import Path import pyrallis from dataclasses import dataclass from prepare_data.landmarks_handler import LandmarksHandler @dataclass class Options: """ Input Args """ # Path to raw images raw_root: Path # Path to aligned images aligned_root: Path # Path to cropped images cr...
463
14,668
// 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. #include "components/sync/protocol/proto_value_conversions.h" #include <string> #include "base/strings/string_number_conversions.h" #include "base/t...
4,570
1,738
/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or t...
402
671
<gh_stars>100-1000 #include "quiet-lwip/util.h" size_t pbuf2buf(uint8_t *buf, struct pbuf *p) { pbuf_header(p, -ETH_PAD_SIZE); size_t len = 0; for(struct pbuf *q = p; q != NULL; q = q->next) { memcpy(buf + len, q->payload, q->len); // XXX check over send_temp_len? len += q->len; ...
698
1,068
<reponame>systemmonkey42/KiTTY /* * winsftp.c: the Windows-specific parts of PSFTP and PSCP. */ #include <winsock2.h> /* need to put this first, for winelib builds */ #include <assert.h> #define NEED_DECLARATION_OF_SELECT #include "putty.h" #include "psftp.h" #include "ssh.h" #include "winsecur.h" #ifdef MOD_PERS...
7,869
575
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.share.long_screenshots.bitmap_generation; import android.graphics.Bitmap; import android.graphics.Rect; import andro...
1,827
16,500
#include <math.h> #include <errno.h> double ldexp( double value, int exp ) { if ( !finite(value) || value == 0.0 ) return value; value = scalbn(value,exp); if ( !finite(value) || value == 0.0 ) errno = ERANGE; return value; }
104
2,269
<gh_stars>1000+ /* * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
2,945
1,254
#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function from __future__ import division import time import torch import torch.nn as nn from torch.autograd import gradcheck from modules.modulated_dcn import ModulatedDeformConvPack from modules.modulated_dcn import DeformRoIPo...
1,778
309
<gh_stars>100-1000 /* * Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * * 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 * ...
783
313
<gh_stars>100-1000 //------------------------------------------------------------------------------ // GB_sort_template: sort all vectors in a matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, <NAME>, (c) 2017-2022, All Rights Reserved. // SPDX-License-Id...
15,202
573
/* * This software is licensed under the terms of the MIT License. * See COPYING for further information. * --- * Copyright (c) 2011-2019, <NAME> <<EMAIL>>. * Copyright (c) 2012-2019, <NAME> <<EMAIL>>. */ #include "taisei.h" #include "platform_paths.h" #include "util.h" #include <SDL.h> const char *vfs_platfor...
205
5,964
// 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. // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! #ifndef V8NotificationPermissionCallback_h #define V8NotificationPerm...
485
310
package org.seasar.doma.jdbc; import org.seasar.doma.message.Message; /** Thrown to indicate that a script file is not found. */ public class ScriptFileNotFoundException extends JdbcException { private static final long serialVersionUID = 1L; /** the script file path */ protected final String path; /** ...
209
1,127
// Copyright (C) 2018-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include <functional> #include <unordered_map> #include <atomic> #include "cache_entry.h" namespace ov { namespace intel_cpu { /** * @brief Class that represent a preemptive cache for different key/value pair types....
1,000
343
<gh_stars>100-1000 /* Copyright 2020-2021 White Magic Software, Ltd. -- All rights reserved. */ package com.keenwrite.service.events.impl; import com.keenwrite.service.events.Notification; import java.text.MessageFormat; /** * Responsible for alerting the user to prominent information. */ public class DefaultNotif...
301
721
<reponame>vaginessa/ApkAnalyser<gh_stars>100-1000 /* * Copyright (C) 2012 Sony Mobile Communications AB * * This file is part of ApkAnalyser. * * 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 Licen...
694
646
<reponame>zhyinty/HeliumRain #pragma once #include "../../Flare.h" UENUM() namespace EFlareLogTarget { enum Type { Game, Combat, }; } UENUM() namespace EFlareLogEvent { enum Type { // Game event GAME_LOADED, GAME_UNLOADED, DAY_SIMULATED, AI_CONSTRUCTION_STARTED, COMPANY_UNLOCK_RESEARCH, // Co...
961
1,132
#! /usr/bin/env python # -*- coding: utf-8 -*- import random import atx import cv2 from atx import imutils # codeskyblue by 2016-05-03 # 过新手流程倒是挺容易的,不过还是有好多东西识别不出来,比如退出键,阴影下的属性切换键 # 还需要结合其他的方法继续去弄 def choose_point(frame): h, w = frame.shape[:2] framesize = h*w minarea = framesize/1000 print 'minare...
1,286
1,403
<reponame>beldenfox/LLGL /* * ShaderProgram.h * * This file is part of the "LLGL" project (Copyright (c) 2015-2019 by <NAME>) * See "LICENSE.txt" for license information. */ #ifndef LLGL_SHADER_PROGRAM_H #define LLGL_SHADER_PROGRAM_H #include "RenderSystemChild.h" #include "ShaderProgramFlags.h" namespace LL...
2,132
3,603
<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, softw...
642
619
from typing import List from pyrep.objects.proximity_sensor import ProximitySensor from pyrep.objects.shape import Shape from rlbench.backend.conditions import NothingGrasped, DetectedCondition from rlbench.backend.task import Task class SolvePuzzle(Task): def init_task(self) -> None: piece2 = Shap...
343
3,353
<reponame>lujiefsi/jetty.project<gh_stars>1000+ // // ======================================================================== // Copyright (c) 1995-2021 Mort Bay Consulting Pty Ltd and others. // // This program and the accompanying materials are made available under the // terms of the Eclipse Public License v. 2.0 w...
2,852
5,250
<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, softw...
1,218