max_stars_count
int64
301
224k
text
stringlengths
6
1.05M
token_count
int64
3
727k
1,754
<reponame>leonard84/ratpack<gh_stars>1000+ /* * Copyright 2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LIC...
3,056
3,294
<reponame>BaruaSourav/docs // System::Net::WebPermission::WebPermission(PermissionState);System::Net::WebPermission::Copy; /** * This program demonstrates the WebPermission(PermissionState) constructor and * Copy method of the WebPermission class . * It creates a WebPermission instance with Permissionstate set to Non...
1,133
2,577
<reponame>mlehotsky13/camunda-bpm-platform /* * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH * under one or more contributor license agreements. See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. Camunda licenses this file to you ...
2,888
855
import pytest from kopf._cogs.structs.references import EVERYTHING, Selector @pytest.mark.parametrize('kw', ['kind', 'plural', 'singular', 'shortcut', 'category', 'any_name']) def test_repr_with_names(kw): selector = Selector(**{kw: 'name1'}) selector_repr = repr(selector) assert selector_repr == f"Selec...
511
17,275
package jenkins.security; import hudson.model.User; import hudson.security.SecurityRealm; import hudson.security.UserMayOrMayNotExistException2; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security...
598
2,663
{ "type": "Claim Votes", "definition": { "text": "In general terms, Claim Votes allow you to support the claims of other users. The term Claim Votes is a generalization referring to either or all of the existing types: Position Claim Vote, Feature Claim Vote, and Asset Claim Vote nodes.", "updat...
316
3,102
#define THROUGH3 int through3(int);
13
2,740
<filename>mlmodel/src/MILBlob/Blob/StorageWriter.cpp // Copyright (c) 2021, Apple Inc. All rights reserved. // // Use of this source code is governed by a BSD-3-clause license that can be // found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause #include "MILBlob/Blob/FileWriter.hpp" #include...
1,814
3,066
<gh_stars>1000+ /* * Licensed to Crate.io GmbH ("Crate") under one or more contributor * license agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. Crate licenses * this file to you under the Apache License, Version 2.0 (the "License"); * you ma...
6,079
679
<reponame>Grosskopf/openoffice /************************************************************** * * 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...
1,074
713
<filename>core/src/test/java/org/infinispan/api/SimpleCacheTest.java package org.infinispan.api; import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertNotNull; import static org.testng.AssertJUnit.assertNull; import static org.testng.AssertJUnit.assertTrue; import java.util.fun...
1,971
848
/*- * Copyright (c) 2015 <NAME> <<EMAIL>> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of co...
1,447
311
package com.sec.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.reflect.AnnotatedElement; /** * @author 0range */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME...
477
2,151
<reponame>fugu-helper/android_external_swiftshader //===-- llvm/Support/COFF.h -------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----...
4,933
432
/* * poll_1.c * * This code used to panic the kernel because of a filter bug. */ #include <fcntl.h> #include <stdio.h> #include <poll.h> int main() { struct pollfd fds[1]; int p = open("/dev/tty", O_RDWR); printf("tty: %d\n", p); fds[0].fd = p; fds[0].events = POLLIN|POLLPRI; fds[0].revents = 0; poll(f...
168
301
<gh_stars>100-1000 /* * //****************************************************************** * // * // Copyright 2016 Samsung Electronics All Rights Reserved. * // * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= * // * // Licensed under the Apache License, Version 2.0 (the "License"); * // ...
3,154
2,350
#pragma once #include "UEPySCompoundWidget.h" #if WITH_EDITOR #if ENGINE_MINOR_VERSION > 13 #include "Developer/DesktopWidgets/Public/Widgets/Input/SDirectoryPicker.h" extern PyTypeObject ue_PySDirectoryPickerType; typedef struct { ue_PySCompoundWidget s_compound_widget; /* Type-specific fields go here. */ } ue_...
159
5,651
import unicodedata encodings = 'ascii latin1 cp1252 cp437 gb2312 utf-8 utf-16le'.split() widths = {encoding:1 for encoding in encodings[:-3]} widths.update(zip(encodings[-3:], (2, 4, 4))) chars = sorted([ 'A', # \u0041 : LATIN CAPITAL LETTER A '¿', # \u00bf : INVERTED QUESTION MARK 'Ã', # \u00c3 : LAT...
804
640
<reponame>jpoikela/z88dk<gh_stars>100-1000 #include "ctype_test.h" void t_isascii_0x00() { Assert(isascii(0) ,"isascii should be 1 for 0x00"); } void t_isascii_0x01() { Assert(isascii(1) ,"isascii should be 1 for 0x01"); } void t_isascii_0x02() { Assert(isascii(2) ,"isascii should be 1 for 0x02"); } voi...
17,311
568
<gh_stars>100-1000 package com.jim.framework.web.config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.amqp.core.*; import org.springframework.amqp.rabbit.connection.CachingConnectionFactory; import org.springframework.amqp.rabbit.connection.ConnectionFactory; import org.sp...
1,264
839
<reponame>kimjand/cxf /** * 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 (th...
516
1,040
//{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. // Used by ddenum.rc // #define IDI_MAIN_ICON 101 #define IDD_DRIVERINFO 102 #define IDC_PREV 1001 #define IDC_NEXT 1002 #define IDC_DEVICEID 10...
711
942
#include "../src/tmultipartformdata.h"
16
384
<reponame>hejamu/gromacs /* * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team. * Copyright (c) 2018,2019,2020,2021, by the GROMACS development team, led by * <NAME>, <NAME>, <NAME>, and <NAME>, * and including many others, a...
6,045
409
<gh_stars>100-1000 package org.webrtc.kite.example.steps; import io.cosmosoftware.kite.interfaces.Runner; import io.cosmosoftware.kite.steps.TestStep; import org.webrtc.kite.example.pages.GoogleSearchPage; public class GoogleSearchStep extends TestStep { private final String TARGET = "CoSMo Software Consulting";...
248
440
<reponame>kurapov-peter/intel-graphics-compiler /*========================== begin_copyright_notice ============================ Copyright (C) 2017-2021 Intel Corporation SPDX-License-Identifier: MIT ============================= end_copyright_notice ===========================*/ /* * !!! DO NOT EDIT THIS FILE !!!...
336
650
<filename>spring-data-rest-core/src/test/java/org/springframework/data/rest/core/mapping/RepositoryResourceMappingsIntegrationTests.java /* * Copyright 2013-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 ...
2,028
839
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you m...
1,703
1,752
<filename>napalm/base/test/models.py try: from typing import TypedDict except ImportError: from typing_extensions import TypedDict configuration = TypedDict( "configuration", {"running": str, "candidate": str, "startup": str} ) alive = TypedDict("alive", {"is_alive": bool}) facts = TypedDict( "facts"...
4,080
3,262
/* * Tencent is pleased to support the open source community by making Angel available. * * Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. 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 m...
637
462
<reponame>matvaibhav/pensieve { "appName": { "message": "Gmail", "description": "App name." }, "appDesc": { "message": "Rask, søkbar e-post med mindre nettsøppel.", "description":"App description." } }
109
743
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "AdaptiveCards.Rendering.Uwp.h" namespace AdaptiveCards::Rendering::Uwp { class AdaptiveCardGetResourceStreamArgs : public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Mic...
332
448
// // Created by moqi on 2019-07-05. // #define LOG_TAG "xxx" #include <af_config.h> void testPacket(); void testFrame(); void testDemuxer(); #include <utils/frame_work_log.h> #include <cassert> #include "base/media/AVAFPacket.h" #include "demuxer/avFormatDemuxer.h" #include "../codec/avcodecDecoder.h" extern "C...
2,014
565
/* * Copyright (c) 2014 Spotify AB * * 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, ...
1,229
2,360
<filename>var/spack/repos/builtin/packages/py-pmw/package.py # 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) from spack import * class PyPmw(PythonPackage): """Pmw ...
277
388
# Lint as: python3 # Copyright 2019 Google LLC # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
2,948
1,428
<reponame>PushpneetSingh/Hello-world #include <iostream> #include <algorithm> using namespace std; typedef unsigned long long int ulli; int main() { ulli a, b, x, y, gcdiv; cin>>a>>b>>x>>y; gcdiv = __gcd(x, y); x /= gcdiv; y /= gcdiv; cout<<min(a / x, b / y); return 0; }
142
348
<reponame>chamberone/Leaflet.PixiOverlay {"nom":"Valence","circ":"3ème circonscription","dpt":"Charente","inscrits":160,"abs":83,"votants":77,"blancs":1,"nuls":4,"exp":72,"res":[{"nuance":"SOC","nom":"M. <NAME>","voix":46},{"nuance":"REM","nom":"Mme <NAME>","voix":26}]}
112
3,475
// 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
807
367
<gh_stars>100-1000 package com.shang.xposed; import android.util.Log; import com.forfan.bigbang.BuildConfig; import de.robv.android.xposed.XposedBridge; public class Logger { private static boolean sEnable = BuildConfig.DEBUG; private static final String TAG = "XposedBigBang"; public static void e(St...
405
429
/* vim: tabstop=4 shiftwidth=4 noexpandtab */ #pragma once #include <kernel/types.h> void return_from_signal_handler(void); void fix_signal_stacks(void); #include <sys/signal_defs.h>
76
1,305
<filename>src/javax/swing/plaf/synth/ColorType.java /* * Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.swing.plaf.synth; /** * A typesafe e...
1,457
2,151
<reponame>swimfish09/quiche<filename>quic/platform/api/quic_macros.h // Copyright (c) 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 QUICHE_QUIC_PLATFORM_API_QUIC_MACROS_H_ #define QUICHE_QUIC_PLATFORM_API_...
224
1,444
<filename>Mage.Sets/src/mage/cards/p/PsychicPossession.java package mage.cards.p; import java.util.Objects; import java.util.UUID; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.DrawC...
1,110
1,073
//===-- llvm/CodeGen/GlobalISel/CallLowering.h - Call lowering --*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
755
646
/* Copyright (c) 2017 TOSHIBA Digital Solutions Corporation This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This...
1,975
319
<gh_stars>100-1000 /** * 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 sourc...
5,323
379
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.oim.core.business.constant; /** * * @author xh */ public class RemoteConstant { public static final String action_type_shut = "0";//挂断 public static final String action_type_agree = "1";//接受 }
105
502
/* * 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 ...
747
639
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. """ Basic lexer and parser needed pip install ply """ from __future__ import generators import re import os.path import time import copy import sys import ply.yacc as yacc import ply.lex as lex # Python 3 compatibility if sys.version_info.major...
2,450
350
<gh_stars>100-1000 ''' This code is written by bidongqinxian ''' class Solution: def GetUglyNumber_Solution(self, index): # write code here if index == 0: return False array = [1,2,3,5] while len(array)-1 < index: array = self.GetUglyNumber(array) arra...
347
30,023
"""Describe logbook events.""" from homeassistant.components.logbook.const import ( LOGBOOK_ENTRY_ENTITY_ID, LOGBOOK_ENTRY_MESSAGE, LOGBOOK_ENTRY_NAME, ) from homeassistant.core import callback from .const import DOMAIN, EVENT_ALEXA_SMART_HOME @callback def async_describe_events(hass, async_describe_even...
517
460
<filename>trunk/win/Source/Includes/QtIncludes/src/network/access/qnetworkaccesshttpbackend_p.h /**************************************************************************** ** ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (<EMAIL>) ** *...
1,622
3,508
<filename>src/main/java/com/fishercoder/solutions/_1991.java package com.fishercoder.solutions; public class _1991 { public static class Solution1 { public int findMiddleIndex(int[] nums) { int middleIndex = -1; long sum = 0; for (int i = 0; i < nums.length; i++) { ...
422
1,178
/* * svc_auth.h, Service side of rpc authentication. * * Copyright (c) 2010, Oracle America, Inc. * * 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 the above...
652
1,540
<reponame>punamsapkale/testng package test.expectedexceptions.issue2235; import org.testng.annotations.Test; public class ExampleTestCase { @Test(timeOut = 1000, expectedExceptions = IllegalArgumentException.class) public void testMethod() { throw new IllegalArgumentException("foo"); } }
94
506
// https://open.kattis.com/problems/trainpassengers #include <iostream> using namespace std; int main() { int k, n, s = 0; cin >> k >> n; bool ok = true; while (n-- && ok) { int a, b, c; cin >> a >> b >> c; if (a > s) ok = false; s -= a; if (s + b > k) ok = false; s += b; if (c && s < k) ok = false;...
194
1,778
<gh_stars>1000+ /* * Copyright (c) 2014-2018 Cesanta Software Limited * 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/LI...
2,097
6,717
/* * Copyright (c) 2011, The Iconfactory. All rights reserved. * Copyright (c) 2016 Microsoft Corporation. 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 cod...
1,355
701
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-present <NAME> Permission is hereby granted, free of charge, to any person obtaining a co...
2,213
1,731
from setuptools import setup setup( name="demo-extras", version="0.0.1", description="test demo", py_modules=["demo"], install_requires=[], extras_require={"extra1": ["requests[security]"], "extra2": ["requests[socks]"]}, )
99
324
/* * 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,966
1,040
<gh_stars>1000+ //----------------------------------------------------------------------------- // File: GameProc.h // // Desc: Game processing routines // // Copyright (C) 1995-1999 Microsoft Corporation. All Rights Reserved. //----------------------------------------------------------------------------- #define IDIRE...
3,116
775
<reponame>badoo/Chateau<gh_stars>100-1000 package com.badoo.chateau.example.ui.conversations.list; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.badoo.barf.mvp.PresenterFactory; import com.badoo.chateau.core.u...
1,507
8,649
package org.hswebframework.web.context; import java.util.HashMap; import java.util.Map; import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Supplier; @SuppressWarnings("all") class MapContext implements Context { private Map<String, Object> map = new ConcurrentHash...
436
1,742
/** @file expairseq.cpp * * Implementation of sequences of expression pairs. */ /* * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany * (C) 2015-2018 <NAME> <<EMAIL>> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General P...
21,290
5,216
<reponame>Eason312/bleEason // // ViewController.h // BabyBluetoothOSDemo // // Created by liuyanwei on 15/9/6. // Copyright (c) 2015年 liuyanwei. All rights reserved. // #import <Cocoa/Cocoa.h> @interface ViewController : NSViewController @end
99
3,102
#pragma once extern int some_val; template <typename T> struct TS { int tsmeth() { ++some_val; return undef_tsval; } };
57
984
<filename>generation/WinSDK/RecompiledIdlHeaders/um/wincontypes.h /*++ Copyright (c) Microsoft Corporation. All rights reserved. Module Name: wincontypes.h Abstract: This module contains the common data types exported by the NT console subsystem. Created: 08-Sep-2017 Revision History: 26-Oct-...
1,957
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...
2,005
746
package org.protege.editor.core.ui.util; import javax.swing.*; import java.awt.*; /** * <NAME> * Stanford Center for Biomedical Informatics Research * 4 Aug 16 */ public class InlineFieldSearchIcon implements Icon { private static final int WIDTH = 12; private static final int HEIGHT = 12; private ...
782
573
#!/usr/bin/env python3 from taiseilib.common import ( run_main, ) from pathlib import Path, PureWindowsPath, PurePosixPath import sys def main(args): import argparse parser = argparse.ArgumentParser(description='Because Windows is the worst.', prog=args[0]) parser.add_argument('path', help...
482
2,671
if False: # NL True = False # NEWLINE
20
402
from .element import Element from .navbar import Navbar from .fontawesomeicon import FontAwesomeIcon class View(Element): """Main object representing a webpage""" def __init__(self, title=None, cl=None, style=None, bscss="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min...
1,170
572
<gh_stars>100-1000 /****************************************************************************/ /*! @file @brief DirectShowのHRESULTをメッセージに変える例外クラス ----------------------------------------------------------------------------- Copyright (C) 2004 T.Imoto <http://www.kaede-software.com> --------------------------------...
475
407
// MIT License // // Copyright (c) 2019 <NAME>, Chair for Embedded Security. All Rights reserved. // Copyright (c) 2021 Max Planck Institute for Security and Privacy. All Rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documenta...
2,202
1,005
#ifndef TACO_STORAGE_TYPED_VECTOR_H #define TACO_STORAGE_TYPED_VECTOR_H #include <cstring> #include <vector> #include <taco/type.h> #include <taco/storage/array.h> #include <taco/storage/typed_value.h> #include <taco/storage/typed_index.h> namespace taco { /// Like std::vector but for a dynamic DataType type. Backed ...
2,864
43,319
<gh_stars>1000+ { "name": "commonjs-esm", "private": true, "module": "dist/index.js", "dependencies": { "lodash": "*" } }
64
348
{"nom":"Tourtrol","circ":"2ème circonscription","dpt":"Ariège","inscrits":204,"abs":81,"votants":123,"blancs":8,"nuls":5,"exp":110,"res":[{"nuance":"REM","nom":"<NAME>","voix":60},{"nuance":"FI","nom":"<NAME>","voix":50}]}
89
366
<gh_stars>100-1000 #!/usr/bin/env python import distutils.core import sys version = "1.0" distutils.core.setup( name="pyxl", version=version, packages = ["pyxl", "pyxl.codec", "pyxl.scripts", "pyxl.examples"], author="<NAME>", author_email="<EMAIL>", url="http://github.com/awable/pyxl", d...
338
591
/* * ====================== BioSoupColor.h ========================== * -- tpr -- * CREATE -- 2020.03.10 * MODIFY -- * ---------------------------------------------------------- */ #ifndef TPR_BIO_SOUP_COLOR_H #...
1,848
488
<reponame>maurizioabba/rose<gh_stars>100-1000 #ifndef __removeInit #define __removeInit #include "AstNodePtrs.h" // [MS]: required because we use the STL find algorithm // DQ (12/7/2003): use platform independent macro defined in config.h // #include STL_ALGO_HEADER_FILE // Permited to include AST testing // #includ...
667
493
import numpy as np import torch from torch import nn from core import * from collections import namedtuple from itertools import count torch.backends.cudnn.benchmark = True device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") cpu = torch.device("cpu") @cat.register(torch.Tensor) def _(*xs): re...
6,698
335
/* * SampleGenerator.h * ----------------- * Purpose: Generate samples from math formulas using muParser * Notes : (currently none) * Authors: OpenMPT Devs * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. */ #pragma once #include "openmpt/all/BuildSettings.hpp" #if...
1,935
325
<gh_stars>100-1000 #include "il2c_private.h" ///////////////////////////////////////////////////////////// // System.Threading.ParameterizedThreadStart void System_Threading_ParameterizedThreadStart_Invoke(System_Threading_ParameterizedThreadStart* this__, System_Object* obj) { il2c_assert(this__ != NULL); il...
472
2,338
<reponame>mkinsner/llvm // RUN: %clangxx_msan -O0 -g %s -o %t && not %run %t 2>&1 | FileCheck %s // Verify that CHECK handler prints a stack on CHECK fail. #include <stdlib.h> int main(void) { // Allocate chunk from the secondary allocator to trigger CHECK(IsALigned()) // in its free() path. void *p = malloc(8...
184
334
#!/usr/bin/env python # # // SPDX-License-Identifier: BSD-3-CLAUSE # # (C) Copyright 2018, Xilinx, Inc. # import cv2 from turbojpeg import TurboJPEG import timeit import os import multiprocessing as mp import argparse # specifying library path explicitly # jpeg = TurboJPEG(r'D:\turbojpeg.dll') # jpeg = TurboJPEG('/usr/...
619
563
package com.gentics.mesh.core.data.root.impl; import static com.gentics.mesh.core.data.perm.InternalPermission.READ_PERM; import static com.gentics.mesh.core.data.relationship.GraphRelationships.HAS_ROLE; import static com.gentics.mesh.core.rest.error.Errors.error; import static com.gentics.mesh.madl.index.EdgeIndexDe...
1,170
909
import org.junit.Test; import java.util.Arrays; import java.util.List; import static org.junit.Assert.*; public class ClosestEntriesTest { private int expected; private List<List<Integer>> sortedArrays; @Test public void findMin1() throws Exception { expected = 1; sortedArrays = Arr...
463
16,461
#import <UIKit/UIKit.h> #import "ABI42_0_0RNCSafeAreaViewMode.h" #import "ABI42_0_0RNCSafeAreaViewEdges.h" NS_ASSUME_NONNULL_BEGIN @interface ABI42_0_0RNCSafeAreaViewLocalData : NSObject - (instancetype)initWithInsets:(UIEdgeInsets)insets mode:(ABI42_0_0RNCSafeAreaViewMode)mode edges:(ABI42_0_0RNCSafeAreaViewEdges)...
228
3,384
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>. // #pragma mark Blocks typedef void (^CDUnknownBlockType)(void); // return type and parameters are unknown #pragma mark Named Structures struct CGPoint { double x; double y; }; s...
28,919
14,668
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_GFX_GEOMETRY_GEOMETRY_SKIA_EXPORT_H_ #define UI_GFX_GEOMETRY_GEOMETRY_SKIA_EXPORT_H_ #if defined(COMPONENT_BUILD) #if defined(WIN32) #if defi...
336
831
<gh_stars>100-1000 /* * Copyright (C) 2016 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 * * Unl...
2,309
403
package org.camunda.bpm.example.multiple_versions_parallel; import java.util.Properties; import org.camunda.bpm.engine.delegate.DelegateExecution; import org.camunda.bpm.engine.delegate.ExecutionListener; public class SetVersionVariableListener implements ExecutionListener { @Override public void notify(Delegat...
183
335
<filename>B/Babe_noun.json { "word": "Babe", "definitions": [ "A sexually attractive young woman.", "An affectionate form of address, typically for someone with whom one has a sexual or romantic relationship.", "A baby.", "An innocent or helpless person." ], "parts-of-spe...
127
1,375
<gh_stars>1000+ #import "AppController.h" #import "Article.h" #import "ArticleConverter.h" #import "ArticleListView.h" #import "ArticleViewDelegate.h" #import "DisclosureView.h" #import "FolderView.h" #import "HelperFunctions.h" #import "NSFileManager+Paths.h" #import "OpenReader.h" #import "PluginManager.h" #import "P...
207
2,253
<filename>src/unit_tests/variant_array_view/variant_array_view_test.cpp /************************************************************************************ * * * Copyright (c) 2014 - 2018 <NAME> <<EMAIL>> * *...
14,264
482
<reponame>liangchengzhi/nutzboot package org.nutz.boot.starter.velocity; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine; import org.nutz.lang.Lang; import org.nutz.mvc.view.AbstractPathView; import javax.servlet.http.HttpServletRequest; ...
641
14,668
<filename>ios/chrome/browser/ui/settings/safety_check/safety_check_service_delegate.h // 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 IOS_CHROME_BROWSER_UI_SETTINGS_SAFETY_CHECK_SAFETY_CHECK_SER...
407
1,133
<gh_stars>1000+ #include <stdio.h> #include <stdlib.h> #include <math.h> #include "frToTEC.h" /** * Convert from a map of Faraday rotation to Total Electron Count (TEC) * This function assumes a constant value for the magnetic field in the * look direction of the radar (bdotk). * * @param frFilename the file con...
1,510