max_stars_count
int64
301
224k
text
stringlengths
6
1.05M
token_count
int64
3
727k
892
<filename>advisories/unreviewed/2022/05/GHSA-wpqw-x29j-wf9j/GHSA-wpqw-x29j-wf9j.json<gh_stars>100-1000 { "schema_version": "1.2.0", "id": "GHSA-wpqw-x29j-wf9j", "modified": "2022-05-01T18:21:31Z", "published": "2022-05-01T18:21:31Z", "aliases": [ "CVE-2007-4222" ], "details": "Buffer overflow in the T...
639
313
# -*- coding: utf-8 -*- # Copyright 2021, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. import json import os from qiskit import ClassicalRegister from qiskit.compiler import assemble, transpile from qiskit impor...
941
348
{"nom":"Agonac","circ":"3ème circonscription","dpt":"Dordogne","inscrits":1299,"abs":575,"votants":724,"blancs":57,"nuls":17,"exp":650,"res":[{"nuance":"SOC","nom":"<NAME>","voix":351},{"nuance":"MDM","nom":"<NAME>","voix":299}]}
94
348
<gh_stars>100-1000 {"nom":"Péronville","circ":"4ème circonscription","dpt":"Eure-et-Loir","inscrits":198,"abs":94,"votants":104,"blancs":5,"nuls":6,"exp":93,"res":[{"nuance":"UDI","nom":"<NAME>","voix":62},{"nuance":"REM","nom":"Mme <NAME>","voix":31}]}
106
348
<gh_stars>100-1000 class EllipticCurve: """An elliptic curve over a prime field. The field is specified by the parameter 'p'. The curve coefficients are 'a' and 'b'. The base point of the cyclic subgroup is 'g'. The order of the subgroup is 'n'. """ def __init__(self, p, a, b, g, n): ...
1,721
578
/* * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
1,001
60,067
#ifndef INTEGRAL_IMAGE_OP_H_ #define INTEGRAL_IMAGE_OP_H_ #include "caffe2/core/context.h" #include "caffe2/core/logging.h" #include "caffe2/core/operator.h" #include "caffe2/utils/math.h" namespace caffe2 { template <typename T, class Context> class IntegralImageOp final : public Operator<Context> { public: temp...
330
630
<filename>src/check_platform.c #include <stdio.h> #include <inttypes.h> #include <assert.h> #include "tcpkali_atomic.h" struct atomic_holder_1 { char c; atomic_wide_t atomic; }; struct atomic_holder_2 { char c; atomic_wide_t atomic __attribute__((aligned(sizeof(atomic_wide_t)))); }; int main() { ...
329
323
<filename>spot_real/Control/Teensy/SpotMiniMini/lib/ros_lib/mini_ros/JointAngles.h #ifndef _ROS_mini_ros_JointAngles_h #define _ROS_mini_ros_JointAngles_h #include <stdint.h> #include <string.h> #include <stdlib.h> #include "ros/msg.h" namespace mini_ros { class JointAngles : public ros::Msg { public: ...
6,393
6,224
/* * Copyright (c) 2021 Microchip Technology Inc. and its subsidiaries. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef _MEC_UART_H #define _MEC_UART_H #include <stdint.h> #include <stddef.h> #define MCHP_UART_RX_FIFO_MAX_LEN 16u #define MCHP_UART_TX_FIFO_MAX_LEN 16u #define MCHP_UART_BAUD_RATE_MIN 50u #def...
3,060
1,909
<reponame>grmkris/XChange package org.knowm.xchange.kuna.service; import org.knowm.xchange.Exchange; /** @author <NAME> */ public class KunaAccountServiceRaw extends KunaBaseService { /** * Constructor. * * @param exchange */ protected KunaAccountServiceRaw(Exchange exchange) { super(exchange); ...
117
354
<reponame>iabernikhin/VK-GL-CTS /*------------------------------------------------------------------------- * OpenGL Conformance Test Suite * ----------------------------- * * Copyright (c) 2021 Google Inc. * Copyright (c) 2021 The Khronos Group Inc. * * Licensed under the Apache License, Version 2.0 (the "Licen...
32,456
2,164
// // BugsnagErrorReportApiClient.h // Pods // // Created by <NAME> on 11/08/2017. // // #import <Foundation/Foundation.h> #import "BSG_KSCrashReportFilterCompletion.h" #import "BugsnagCrashReport.h" #import "BugsnagConfiguration.h" #import "BugsnagApiClient.h" @interface BugsnagErrorReportApiClient : BugsnagApiC...
135
412
<filename>regression/cbmc-incr/simpleloop3/main.c<gh_stars>100-1000 int main() { int x; for(unsigned i = 0;i<=5;i++) x--; assert(x!=0); }
70
1,144
<reponame>rlourette/TI_SDK_u-boot-2019.01<gh_stars>1000+ /* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright (C) 2017 <NAME> <<EMAIL>> * * Derived from linux/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h */ #ifndef __DT_BINDINGS_CLOCK_BCM6328_H #define __DT_BINDINGS_CLOCK_BCM6328_H #define BCM6328_CLK_PHYM...
357
451
/*Header-MicMac-eLiSe-25/06/2007 MicMac : Multi Image Correspondances par Methodes Automatiques de Correlation eLiSe : ELements of an Image Software Environnement www.micmac.ign.fr Copyright : Institut Geographique National Author : <NAME> Contributors : <NAME>, <NAME>. [1] <NAME>, <NAM...
13,589
722
<filename>model_tools/tools/tensorflow2caffe/bert/tensorflow2caffe_bert.py #!/usr/local/bin/python # -*- coding: utf-8 -*- import math import sys sys.path.append("../") from tensorflow2caffe import Tensorflow2Caffe class Tensorflow2CaffeBert(Tensorflow2Caffe): def __init__(self, tensorflow_model_path,...
4,052
581
<filename>src/1/policy_iteration.py #!/usr/bin/env python #MIT License #Copyright (c) 2017 <NAME> # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limita...
3,162
743
<gh_stars>100-1000 /* Copyright (c) 2006-2012, DNSPod Inc. * 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 *...
5,794
348
{"nom":"Manama","circ":"10ème circonscription","dpt":"Français établis hors de France","inscrits":616,"abs":458,"votants":158,"blancs":4,"nuls":0,"exp":154,"res":[{"nuance":"REM","nom":"<NAME>","voix":116},{"nuance":"LR","nom":"<NAME>","voix":38}]}
94
14,668
// Copyright 2015 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 "third_party/blink/renderer/platform/scheduler/main_thread/main_thread.h" #include "base/location.h" #include "base/task/sequence_manager/task_q...
392
3,200
<gh_stars>1000+ /** * Copyright 2021 Huawei Technologies Co., Ltd * * 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 b...
501
310
""" Copyright (c) 2021 Intel Corporation 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 writin...
665
663
<reponame>denisesato/scikit-multiflow import numpy as np from skmultiflow.transform.base_transform import StreamTransform from skmultiflow.utils import FastBuffer, get_dimensions class WindowedMinmaxScaler(StreamTransform): """ Transform features by scaling each feature to a given range. This estimator scale...
1,441
2,177
# -*- coding: utf-8 -*- import config import os from uuid import uuid4 import parser import yaml from collections import defaultdict from datetime import datetime import helpers # overall list management def clear_todos(): todo_db = config.get('todo.db') if ( os.path.exists( todo_db ) ): os.remove( todo_db ) con...
1,657
6,205
# coding=utf-8 import textwrap import unittest from conans.model.ref import ConanFileReference from conans.test.utils.tools import TestClient class RemoveEditablePackageTest(unittest.TestCase): conanfile = textwrap.dedent("""\ from conans import ConanFile class APck(ConanFile): pass...
527
498
package com.bizzan.bitrade.entity; import cn.afterturn.easypoi.excel.annotation.Excel; import com.bizzan.bitrade.constant.*; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import org.hibernate.annotations.CreationTimestamp; import org.hiber...
2,219
1,056
<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 additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * ...
4,525
777
// Copyright 2015 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/contextual_search/renderer/overlay_page_notifier_service_impl.h" #include <utility> #include "components/contextual_search/renderer...
258
1,040
<reponame>jarmonik/orbiter<filename>Src/Plugin/TransX/mapfunction.h /* Copyright (c) 2007 <NAME>, <NAME> ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to deal ** in the Software without restriction, including w...
948
619
<reponame>moredu/upm<filename>examples/c++/ads1x15-adc-sensor.cxx /* * Author: <NAME> <<EMAIL>> * Copyright (c) 2015 Intel Corporation. * * This program and the accompanying materials are made available under the * terms of the The MIT License which is available at * https://opensource.org/licenses/MIT. * * SPD...
676
436
<reponame>edfincham/pyhsmm<gh_stars>100-1000 from __future__ import division from builtins import range, zip, filter import numpy as np from numpy.lib.stride_tricks import as_strided as ast import scipy.linalg import copy, collections, os, shutil, hashlib from contextlib import closing from six.moves.urllib.request im...
5,160
607
package com.sandwich.koan.path; import static org.junit.Assert.assertNotNull; import java.util.Locale; import org.junit.Test; import com.sandwich.koan.LocaleSwitchingTestCase; public class PathToEnlightenmentTest extends LocaleSwitchingTestCase { @Test public void testFallsBackToEnglishXmlWhenNoXmlForLocaleIsFo...
424
1,391
/* * Deterministic regexp program. */ typedef struct Dreprog Dreprog; typedef struct Dreinst Dreinst; typedef struct Drecase Drecase; struct Dreinst { int isfinal; int isloop; Drecase *c; int nc; }; struct Dreprog { Dreinst *start[4]; int ninst; Dreinst inst[1]; }; struct Drecase { uint start; Dreinst *ne...
200
552
<filename>doc/integrations/siddhi-celery/_celery/monitor.py import logging import time import boto3 import config SCAN_INTERVAL = 1 * 60 SCAN_INTERVAL = 5 def compare_buckets(previous_buckets, buckets): return buckets.difference(previous_buckets), previous_buckets.difference(buckets) def get_buckets(client): ...
480
465
/* * Copyright (c) 2018 Uber Technologies, Inc. * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, p...
1,206
1,927
import sqlalchemy as sa from mealie.db.models.model_base import SqlAlchemyBase class Nutrition(SqlAlchemyBase): __tablename__ = "recipe_nutrition" id = sa.Column(sa.Integer, primary_key=True) parent_id = sa.Column(sa.Integer, sa.ForeignKey("recipes.id")) calories = sa.Column(sa.String) fat_content...
451
675
<reponame>Texas-C/echo<gh_stars>100-1000 #pragma once #include "engine/core/scene/node.h" namespace Echo { class RecastNavConvexVolume : public Node { ECHO_CLASS(RecastNavConvexVolume, Node) public: }; }
89
892
<filename>advisories/unreviewed/2022/05/GHSA-wg6q-527f-jmrg/GHSA-wg6q-527f-jmrg.json { "schema_version": "1.2.0", "id": "GHSA-wg6q-527f-jmrg", "modified": "2022-05-01T02:20:02Z", "published": "2022-05-01T02:20:02Z", "aliases": [ "CVE-2005-3667" ], "details": "Multiple unspecified vulnerabilities in mu...
642
4,538
#ifndef L2CM_INT_H_ #define L2CM_INT_H_ /** **************************************************************************************** * @addtogroup L2C_INT Logical Link Control and Adaptation Protocol internals * @ingroup HOST * @brief Logical Link Control and Adaptation Protocol - Internal API. * * @{ *********...
1,564
1,727
def factorize(n): factors = {} d = 2 while n > 1: power = 0 while n % d == 0: power += 1 n //= d if power > 0: factors[d] = power d += 1 if d * d > n: d = n return factors def get_all_divisors(n): divisors = []...
363
1,602
/* * (C) Copyright 2020 Hewlett Packard Enterprise Development LP * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this sourc...
4,701
1,007
<gh_stars>1000+ from __future__ import print_function from logging import getLogger logger = getLogger(__name__) import traceback import socket import struct import sys import os import atexit import signal import errno import platform import weakref try: import signalfd except ImportError: signalfd = None tr...
6,889
521
<filename>qemu_mode/qemu-2.10.0/roms/ipxe/src/drivers/infiniband/qib_7322_regs.h /* * Copyright (c) 2008, 2009 QLogic Corporation. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (...
110,499
560
# coding:utf-8 import logging import pandas as pd import numpy as np import re from scipy.sparse import csr_matrix, hstack from sklearn.preprocessing import OneHotEncoder def onehot_features(train, test, features, full=False, sparse=False, dummy_na=True): """Encode categorical features using a one-hot scheme. ...
2,229
1,338
/* Copyright (C) 1994 Free Software Foundation This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This...
1,820
1,433
// Copyright (c) Microsoft. All rights reserved. #include "pch.h" #include "StartupTask.h" using namespace WeatherStation; using namespace Platform; using namespace Windows::ApplicationModel::Background; using namespace Windows::Foundation; using namespace Windows::Devices::I2c; using namespace Windows::Devices::Enu...
671
1,799
<gh_stars>1000+ // Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // //...
488
321
""" The size of the hash table is not determinate at the very beginning. If the total size of keys is too large (e.g. size >= capacity / 10), we should double the size of the hash table and rehash every keys. Say you have a hash table looks like below: size=3, capacity=4 [null, 21->9->null, 14->null, null] The hash f...
877
892
<filename>advisories/unreviewed/2022/05/GHSA-vvqg-75f9-88hx/GHSA-vvqg-75f9-88hx.json { "schema_version": "1.2.0", "id": "GHSA-vvqg-75f9-88hx", "modified": "2022-05-01T18:12:21Z", "published": "2022-05-01T18:12:21Z", "aliases": [ "CVE-2007-3289" ], "details": "PHP remote file inclusion vulnerability in...
505
1,767
<reponame>slaveuser/Lightweight-Stream-API20171027 package com.annimon.stream.iterator; import java.util.NoSuchElementException; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public class LsaIteratorTest { ...
748
522
import glob import pycocotools.mask as cocomask import tensorflow as tf import numpy as np from core import Extractions from datasets import DataKeys from datasets.Dataset import FileListDataset from datasets.Loader import register_dataset from datasets.KITTI.segtrack.KITTI_segtrack import DEFAULT_PATH NAME = "KITTI_...
672
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. #include "third_party/blink/renderer/core/css/css_image_value.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/renderer/core...
653
530
{ "manufacturer": "Napco Security Technologies, Inc.", "manufacturerId": "0x0121", "label": "IBR-ZREMOTE", "description": "I-Bridge Z-Wave Controller", "devices": [ { "productType": "0x0001", "productId": "0x0101", "zwaveAllianceId": [3689, 968] } ], "firmwareVersion": { "min": "0.0", "max": "25...
154
5,813
/* * 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 ...
3,411
396
package com.kunminx.samples.ui.operators; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullabl...
843
449
<gh_stars>100-1000 /* * Copyright (C) 2018 Yubico AB - See COPYING */ #ifndef B64_H #define B64_H int b64_encode(const void *, size_t, char **); int b64_decode(const char *, void **, size_t *); #endif /* B64_H */
95
1,772
from django.conf.urls import url from dojo.google_sheet import views urlpatterns = [ # google_sheet url(r'^configure_google_sheets$', views.configure_google_sheets, name='configure_google_sheets'), url(r'^export_to_sheet/(?P<tid>\d+)$', views.export_to_sheet, name='export_to_sheet'), ]
127
3,181
/* * Copyright (C) 2013-2017 microG Project Team * * 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 ...
649
342
package me.zq.youjoin.model; import android.os.Parcel; import android.os.Parcelable; import java.util.List; /** * YouJoin-Android * Created by ZQ on 2015/12/4. */ public class TweetInfo { /** * result : success * tweets : [{"friend_id":"16","tweets_id":"14","comment_num":"4","upvote_num":"0","upvote...
2,195
1,560
<reponame>pierky/exabgp # encoding: utf-8 """ icmp.py Created by <NAME> on 2010-01-15. Copyright (c) 2009-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ from exabgp.protocol.resource import Resource # ============================================================== ICMP Co...
83,273
879
import pytest from sqlalchemy_utils.relationships import chained_join from ..mixins import ( ThreeLevelDeepManyToMany, ThreeLevelDeepOneToMany, ThreeLevelDeepOneToOne ) @pytest.mark.usefixtures('postgresql_dsn') class TestChainedJoinFoDeepToManyToMany(ThreeLevelDeepManyToMany): def test_simple_join...
1,572
30,785
<filename>jadx-plugins/jadx-java-input/src/main/java/jadx/plugins/input/java/data/attributes/JavaAttrType.java package jadx.plugins.input.java.data.attributes; import java.util.HashMap; import java.util.Map; import org.jetbrains.annotations.Nullable; import jadx.api.plugins.input.data.annotations.AnnotationVisibilit...
1,895
2,996
<gh_stars>1000+ // Copyright 2021 The Terasology Foundation // SPDX-License-Identifier: Apache-2.0 package org.terasology.persistence.typeHandling.inMemory.arrays; import com.google.common.collect.Lists; import org.terasology.persistence.typeHandling.PersistedData; import org.terasology.persistence.typeHandling.inMem...
511
1,066
/* * Copyright 2017 GcsSloop * * 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,429
5,169
{ "name": "DaDataAddressSuggester", "version": "1.1.0", "summary": "Suggests Address to UITextField", "description": "Suggests Address to UITextField. Gets the suggestions from DaData service.", "homepage": "https://github.com/iNorD/DaDataAddressSuggester.git", "license": "MIT", "authors": { "<NAME>":...
246
589
<filename>include/wrappers/debug_messenger.h // // Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved. // // 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 restricti...
2,940
5,169
<reponame>Gantios/Specs { "name": "LSDailyNotes", "version": "1.0.1", "summary": "A Time CountDown.", "description": "一个倒计时管理", "homepage": "https://github.com/tianyc1019/LSDailyNotes", "license": "MIT", "authors": { "John_LS": "<EMAIL>" }, "platforms": { "ios": "9.0" }, "source": { "g...
235
1,531
package com.sleekbyte.tailor.format; import com.sleekbyte.tailor.common.ColorSettings; import com.sleekbyte.tailor.common.Messages; import com.sleekbyte.tailor.output.ViolationMessage; import org.fusesource.jansi.Ansi; import org.fusesource.jansi.AnsiConsole; import java.io.File; import java.io.IOException; import j...
1,249
543
/** * Copyright 2016 Twitter. 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...
1,250
1,273
package org.broadinstitute.hellbender.tools.funcotator; import htsjdk.variant.variantcontext.Allele; import org.broadinstitute.hellbender.GATKBaseTest; import org.broadinstitute.hellbender.tools.funcotator.dataSources.TableFuncotation; import org.broadinstitute.hellbender.tools.funcotator.metadata.FuncotationMetadataU...
2,463
369
<filename>module-bluetooth/Bluetooth/interface/profiles/A2DP/AVDTP.cpp // Copyright (c) 2017-2021, Mudita <NAME>.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include "AVDTP.hpp" namespace bluetooth { AVDTP::SbcConfiguration AVDTP::sbcConfig; btstack_sbc_encoder_...
460
438
{ "DESCRIPTION": "DM a user", "USAGE": "dm <user> <message>", "TITLE": "DM received from guild: {{NAME}}", "SUCCESS": "Successfully sent DM to {{TAG}}." }
63
711
<filename>java110-generator/src/main/resources/newTemplate/IDeleteBMO.java package com.java110.api.bmo.@@templateCode@@; import org.springframework.http.ResponseEntity; public interface IDelete@@TemplateCode@@BMO { /** * 修改@@templateName@@ * add by wuxw * @param @@templateCode@@Po * @return ...
154
564
<reponame>timgates42/libsrt /* * imgd.c * * Image comparison/diff example using libsrt * * Copyright (c) 2015-2019 <NAME>. All rights reserved. * Released under the BSD 3-Clause License (see the doc/LICENSE) * * Observations: * - In order to have PNG and JPEG support: make imgc HAS_JPG=1 HAS_PNG=1 */ #includ...
1,947
5,279
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
1,029
359
import torch def is_gpu_available(): return torch.cuda.is_available() def get_device_id(device): if device == "cpu": return -1 elif device == "auto": return 0 if is_gpu_available() else -1 elif device.startswith("cuda:"): device_no = device.replace("cuda:", "") if dev...
181
7,883
// Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma // de Barcelona (UAB). // // This work is licensed under the terms of the MIT license. // For a copy, see <https://opensource.org/licenses/MIT>. #pragma once #include "carla/client/Actor.h" #include "carla/client/detail/WalkerNavigation.h"...
258
2,453
<gh_stars>1000+ // // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 30 2020 21:18:12). // // Copyright (C) 1997-2019 <NAME>. // #import <DVTKit/NSObject-Protocol.h> @class NSAttributedString, NSString, NSUndoManager; @protocol DVTDiffSessionTextEditBuffer <NSObject> @property(readonly, copy) ...
226
892
<gh_stars>100-1000 { "schema_version": "1.2.0", "id": "GHSA-pwqf-9h7j-7mv8", "modified": "2021-09-23T19:05:25Z", "published": "2020-08-21T16:25:26Z", "aliases": [ "CVE-2020-6174" ], "summary": "Incorrect threshold signature computation in TUF", "details": "### Impact\nMetadadata signature verificati...
1,164
1,355
<filename>include/jet/apic_solver3.h // Copyright (c) 2018 <NAME> // // I am making my contributions/submissions to this project solely in my // personal capacity and am not conveying any rights to any intellectual // property of any third parties. #ifndef INCLUDE_JET_APIC_SOLVER3_H_ #define INCLUDE_JET_APIC_SOLVER3_H...
726
892
{ "schema_version": "1.2.0", "id": "GHSA-55m3-2rm2-4mpv", "modified": "2022-05-01T17:54:39Z", "published": "2022-05-01T17:54:39Z", "aliases": [ "CVE-2007-1534" ], "details": "DFSR.exe in Windows Meeting Space in Microsoft Windows Vista remains available for remote connections on TCP port 5722 for 2 mi...
585
459
<gh_stars>100-1000 /* * This file is part of choco-solver, http://choco-solver.org/ * * Copyright (c) 2021, IMT Atlantique. All rights reserved. * * Licensed under the BSD 4-clause license. * * See LICENSE file in the project root for full license information. */ package org.chocosolver.util.tools; import org....
1,628
14,668
<filename>encrypted-media/polyfill/make-polyfill-tests.py #!/usr/bin/python from __future__ import print_function import os, re, os.path, glob head = re.compile( r"^(\s*</head>)", re.MULTILINE ) runtest = re.compile( r"runTest\(\s*(\S.*?)\s*\)", re.DOTALL ) scripts = ''' <!-- Polyfill files (NOTE: These are add...
539
516
/* * Copyright (c) 2002-2017, the original author or authors. * * This software is distributable under the BSD license. See the terms of the * BSD license in the documentation provided with this software. * * https://opensource.org/licenses/BSD-3-Clause */ package org.jline.utils; import java.io.IOException; im...
4,981
852
#ifndef GENERS_IOISCLASSTYPE_HH_ #define GENERS_IOISCLASSTYPE_HH_ namespace gs { template <typename T> class IOIsClassType { typedef char One; typedef struct { char a[2]; } Two; template <typename C> static One test(int C::*); template <typename C> static Two test(...); public:...
200
825
<reponame>jiangkang/Hummer<filename>android/hummer-sdk/src/main/java/com/didi/hummer/lifecycle/IFullLifeCycle.java package com.didi.hummer.lifecycle; public interface IFullLifeCycle extends ILifeCycle { void onStart(); void onResume(); void onPause(); void onStop(); }
110
556
<reponame>AndersonALAC/Conf-for-Surge-Shadowrocket<gh_stars>100-1000 #!/usr/bin/env python3 # coding=utf-8 # # 感谢dalao # https://www.logcg.com import urllib3 import re import datetime import certifi import codecs def getList(listUrl): http = urllib3.PoolManager( cert_reqs='CERT_REQUIRED', # Force certif...
4,384
442
#!/usr/bin/env python import npyscreen class EditorFormExample(npyscreen.FormMutt): MAIN_WIDGET_CLASS = npyscreen.MultiLineEdit class TestApp(npyscreen.NPSApp): def main(self): F = EditorFormExample() F.wStatus1.value = "Status Line " F.wStatus2.value = "Second Status Line " ...
177
1,364
package kilim.test.ex; public class ExA { }
19
14,425
<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 additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the *...
975
1,884
<filename>tests/test_models/test_backbones/test_sr_backbones/test_real_basicvsr_net.py # Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from mmedit.models.backbones.sr_backbones.real_basicvsr_net import \ RealBasicVSRNet def test_real_basicvsr_net(): """Test RealBasicVSR.""" # ...
944
488
// anonymous inline struct fields // originally found in package elinks_0.9.3-1 // a.i:4:62: error: field `dummy2' is not a class member // ERR-MATCH: is not a class member int main () { // invalid, rejected by gcc-3.4.3 //ERROR(1): int x = (int) &((struct {int dummy1; int dummy2;} *) 0)->dummy2; ...
251
14,668
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import shared_page_state from telemetry import story from page_sets import top_pages def _IssueMarkerAndScroll(action_runner, scroll_fo...
2,535
1,644
// Copyright 2018 The Nomulus Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by a...
1,240
379
package am.appwise.components.ni; /** * Created by robertlevonyan on 11/21/17. */ interface ConnectionListener { void onWifiTurnedOn(); void onWifiTurnedOff(); }
65
831
<gh_stars>100-1000 from siuba.spec.series import spec from siuba.siu import CallTreeLocal, FunctionLookupError from siuba.experimental.pd_groups.translate import SeriesGroupBy, GroupByAgg, GROUP_METHODS from siuba.experimental.pd_groups.groupby import broadcast_agg, is_compatible # TODO: make into CallTreeLocal fact...
2,396
563
<filename>ldm/models/autoencoder.py import torch import pytorch_lightning as pl import torch.nn.functional as F from contextlib import contextmanager from taming.modules.vqvae.quantize import VectorQuantizer2 as VectorQuantizer from ldm.modules.diffusionmodules.model import Encoder, Decoder from ldm.modules.distribut...
9,251
2,116
<reponame>therodfather/neko<gh_stars>1000+ { "go.formatTool": "goformat", "go.inferGopath": false, "go.autocompleteUnimportedPackages": true, "go.delveConfig": { "useApiV1": false, "dlvLoadConfig": { "followPointers": true, "maxVariableRecurse": 3, "maxStringLen": 40...
272
1,921
<gh_stars>1000+ def get_first_recurring(string): seen = set() for char in string: if char in seen: return char seen.add(char) return None # Tests assert get_first_recurring("acbbac") == "b" assert not get_first_recurring("abcdef")
117