code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/native/AdaptivePooling.h> #include <c10/util/irange.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/adaptive_max_pool2d_backward_native.h> #include <ATen/ops...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/AdaptiveMaxPooling2d.cpp
/* * Copyright (C) 2012 The Guava 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 agreed ...
java
github
https://github.com/google/guava
android/guava/src/com/google/common/base/StandardSystemProperty.java
# 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 applica...
unknown
codeparrot/codeparrot-clean
from pyparsing import * wikiInput = """ Here is a simple Wiki input: *This is in italics.* **This is in bold!** ***This is in bold italics!*** Here's a URL to {{Pyparsing's Wiki Page->http://pyparsing.wikispaces.com}} """ def convertToHTML(opening,closing): def conversionParseAction(s,l,t): return...
unknown
codeparrot/codeparrot-clean
# -*- test-case-name: twisted.conch.test.test_userauth -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implementation of the ssh-userauth service. Currently implemented authentication types are public-key and password. Maintainer: Paul Swartz """ import struct, warnings from twisted.c...
unknown
codeparrot/codeparrot-clean
// Copyright 2013 The Go 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 html import ( "strings" "testing" ) type unescapeTest struct { // A short description of the test case. desc string // The HTML text. html strin...
go
github
https://github.com/golang/go
src/html/escape_test.go
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/protobuf/internal/more_extensions_dynamic.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from go...
unknown
codeparrot/codeparrot-clean
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import matplotlib.pyplot as plt from matplotlib.testing.decorators import image_comparison from mpl_toolkits.axes_grid1 import make_axes_locatable import numpy as np @image_comparison(baseline_imag...
unknown
codeparrot/codeparrot-clean
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import json import re from threading import Thread from Queue import Queue from contextlib import contextmanager import...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
unknown
codeparrot/codeparrot-clean
from paste.fixture import * from paste.exceptions.errormiddleware import ErrorMiddleware from paste import lint from paste.util.quoting import strip_html # # For some strange reason, these 4 lines cannot be removed or the regression # test breaks; is it counting the number of lines in the file somehow? # def do_reques...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ A series of tests to establish that the command-line management tools work as advertised - especially with regards to the handling of the DJANGO_SETTINGS_MODULE and default settings.py files. """ from __future__ import unicode_literals import codecs import os import re import shutil import ...
unknown
codeparrot/codeparrot-clean
""" @package antlr3.dottreegenerator @brief ANTLR3 runtime package, tree module This module contains all support classes for AST construction and tree parsers. """ # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary fo...
unknown
codeparrot/codeparrot-clean
''' New Integration Test for testing deleting cluster @author: Youyk ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_state as test_state import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.header.vm as vm_header import zstackwoodpecker.operations.resource_operations a...
unknown
codeparrot/codeparrot-clean
otlp: promote_all_resource_attributes: true
unknown
github
https://github.com/prometheus/prometheus
config/testdata/otlp_sanitize_resource_attributes_promote_all.good.yml
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
unknown
codeparrot/codeparrot-clean
""" =============== Incremental PCA =============== Incremental principal component analysis (IPCA) is typically used as a replacement for principal component analysis (PCA) when the dataset to be decomposed is too large to fit in memory. IPCA builds a low-rank approximation for the input data using an amount of memo...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for twisted.enterprise.adbapi. """ from twisted.trial import unittest import os, stat, new from twisted.enterprise.adbapi import ConnectionPool, ConnectionLost, safe from twisted.enterprise.adbapi import Connection, Transact...
unknown
codeparrot/codeparrot-clean
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import ts from 'typescript'; export interface AutocompleteItem { kind: string; name: string; sortText: string...
typescript
github
https://github.com/angular/angular
adev/src/app/editor/code-editor/workers/interfaces/autocomplete-response.ts
# Test case for the os.poll() function import os import subprocess import random import select import threading import time import unittest from test.support import ( cpython_only, requires_subprocess, requires_working_socket, requires_resource ) from test.support import threading_helper from test.support.os_helpe...
python
github
https://github.com/python/cpython
Lib/test/test_poll.py
# -*- coding: utf-8 -*- # # DataTransferKit documentation build configuration file, created by # sphinx-quickstart on Fri Nov 20 11:03:37 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated fil...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
python
github
https://github.com/openai/openai-python
tests/__init__.py
base_suite: multiversion excludes: - "multiversion.multiversion_future_git_tag_exclude_files"
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/matrix_suites/mappings/multiversion_future_git_tag.yml
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export function estimateFrameRate(timeSpent: number): number { const multiplier = Math.max(Math.ceil(timeSpent / 1...
typescript
github
https://github.com/angular/angular
devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/shared/estimate-frame-rate.ts
class Message < ApplicationRecord has_rich_text :content has_rich_text :body has_one :review accepts_nested_attributes_for :review end
ruby
github
https://github.com/rails/rails
actiontext/test/dummy/app/models/message.rb
{ "key": { "algo": "rsa", "size": 2048 }, "names": [ { "O": "etcd", "OU": "etcd Security", "L": "San Francisco", "ST": "California", "C": "USA" } ], "CN": "example.com", "hosts": [ "*.etcd.local", "etcd.local", "127.0.0.1", "localhost" ] }
json
github
https://github.com/etcd-io/etcd
tests/fixtures/server-ca-csr-wildcard.json
# Support for JVM's ACC_NATIVE flag Goal: enable JNI interop for Kotlin, so that anything that works through JNI in Java could be reproduced 1-to-1 in Kotlin ## Syntax The following definition is present in the library: ``` kotlin package kotlin.jvm Retention(RetentionPolicy.SOURCE) public annotation class native ...
unknown
github
https://github.com/JetBrains/kotlin
spec-docs/jvm-native-flag-support.md
# Copyright 2022 The OFA-Sys Team Authors and The HuggingFace Team. 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 # #...
python
github
https://github.com/huggingface/transformers
src/transformers/models/chinese_clip/convert_chinese_clip_original_pytorch_to_hf.py
import os import yaml from beets import ui from beets import config import _common class ConfigCommandTest(_common.TestCase): def setUp(self): super(ConfigCommandTest, self).setUp() self.io.install() if 'EDITOR' in os.environ: del os.environ['EDITOR'] os.environ['BE...
unknown
codeparrot/codeparrot-clean
// // AFError.swift // // Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) // // 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, includi...
swift
github
https://github.com/Alamofire/Alamofire
Source/Core/AFError.swift
# # 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 us...
unknown
codeparrot/codeparrot-clean
"""Port forwarder USAGE: twisted_portforward.py local_port remote_host remote_port""" import sys from twisted.internet import reactor from eventlet.twistedutil import join_reactor from eventlet.twistedutil.protocol import GreenClientCreator, SpawnFactory, UnbufferedTransport from eventlet import proc def forward(sourc...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2006-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet.stdio}. """ import os, sys, itertools from twisted.trial import unittest from twisted.python import filepath, log from twisted.python.runtime import platform from twisted.internet import error, defer, p...
unknown
codeparrot/codeparrot-clean
import json from django import template from django.template.context import Context from .base import InclusionAdminNode register = template.Library() def prepopulated_fields_js(context): """ Create a list of prepopulated_fields that should render JavaScript for the prepopulated fields for both the admi...
python
github
https://github.com/django/django
django/contrib/admin/templatetags/admin_modify.py
'use strict'; const fs = require('fs'); const path = require('path'); const common = require('../common.js'); const tmpdir = require('../../test/common/tmpdir'); const benchmarkDirectory = tmpdir.resolve('benchmark-module-circular'); const bench = common.createBenchmark(main, { n: [1e4], }); function main({ n }) {...
javascript
github
https://github.com/nodejs/node
benchmark/module/module-loader-circular.js
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\Doctrine\SchemaListener; use Doctrine\ORM\Tools\Event\Ge...
php
github
https://github.com/symfony/symfony
src/Symfony/Bridge/Doctrine/SchemaListener/DoctrineDbalCacheAdapterSchemaListener.php
# -*- coding: utf-8 -*- import datetime import json import ddt import mock from nose.plugins.attrib import attr from pytz import UTC from django.utils.timezone import UTC as django_utc from django.core.urlresolvers import reverse from django.test import TestCase, RequestFactory from edxmako import add_lookup from dja...
unknown
codeparrot/codeparrot-clean
# 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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # This file is part of Ansible # # Ansible 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 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2009 Barry Pederson <bp@barryp.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Example based on tutorial found here : # https://databricks-training.s3.amazonaws.com/movie-recommendation-with-mllib.html import sys import itertools from math import sqrt from operator import add from os.path import join, isfile, dirname from pyspark import SparkConf, SparkContext from pysp...
unknown
codeparrot/codeparrot-clean
# # randpool.py : Cryptographically strong random number generation # # Part of the Python Cryptography Toolkit # # Written by Andrew M. Kuchling, Mark Moraes, and others # # =================================================================== # The contents of this file are dedicated to the public domain. To # the ex...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function, division import random from itertools import permutations import numpy as np from scipy.stats.distributions import vonmises from msmbuilder.example_datasets import AlanineDipeptide from msmbuilder.featurizer import DihedralFeaturizer from msmbuilder.hmm import VonMisesHMM def ...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'UserProfile.is_vouched' db.add_column('profile', 'is_vouched', self.gf('django.db.models.fields.Bo...
unknown
codeparrot/codeparrot-clean
# Generated from MySQLParser.g4 by ANTLR 4.5.3 from antlr4 import * class TableInfo: table_name_to_alias = {} table_alias_to_name = {} on_conditions = [] @staticmethod def reset(): TableInfo.table_name_to_alias = {} TableInfo.table_alias_to_name = {} TableInfo.on_conditions...
unknown
codeparrot/codeparrot-clean
from sqlalchemy.testing import assert_raises_message, eq_, \ AssertsCompiledSQL, is_ from sqlalchemy.testing import fixtures from sqlalchemy.orm import relationships, foreign, remote from sqlalchemy import MetaData, Table, Column, ForeignKey, Integer, \ select, ForeignKeyConstraint, exc, func, and_, String, Boo...
unknown
codeparrot/codeparrot-clean
//! Types for tracking pieces of source code within a crate. //! //! The [`SourceMap`] tracks all the source code used within a single crate, mapping //! from integer byte positions to the original source code location. Each bit //! of source parsed during crate parsing (typically files, in-memory strings, //! or vario...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_span/src/source_map.rs
from __future__ import absolute_import, division, unicode_literals from . import base class Filter(base.Filter): def __init__(self, source, encoding): base.Filter.__init__(self, source) self.encoding = encoding def __iter__(self): state = "pre_head" meta_found = (self.encoding...
unknown
codeparrot/codeparrot-clean
# Copyright 2020, Microsoft and the HuggingFace Inc. 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...
python
github
https://github.com/huggingface/transformers
src/transformers/models/deberta/configuration_deberta.py
from langchain_core.callbacks import __all__ EXPECTED_ALL = [ "RetrieverManagerMixin", "LLMManagerMixin", "ChainManagerMixin", "ToolManagerMixin", "Callbacks", "CallbackManagerMixin", "RunManagerMixin", "BaseCallbackHandler", "AsyncCallbackHandler", "BaseCallbackManager", "B...
python
github
https://github.com/langchain-ai/langchain
libs/core/tests/unit_tests/callbacks/test_imports.py
'''Mock classes that imitate idlelib modules or classes. Attributes and methods will be added as needed for tests. ''' from idlelib.idle_test.mock_tk import Text class Func: '''Mock function captures args and returns result set by test. Attributes: self.called - records call even if no args, kwds passed...
unknown
codeparrot/codeparrot-clean
# # @file TestAnnotationCopyAndClone.py # @brief Test the copy and clone methods for annotation classes # # @author Akiya Jouraku (Python conversion) # @author Sarah Keating # # ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ====== # # DO NOT EDIT THIS FILE. # # This file was generated au...
unknown
codeparrot/codeparrot-clean
'''What's the origin of this file? It is not ours. Does not run because of missing mtx files, now included changes: JP corrections to imports so it runs, comment out print ''' from __future__ import print_function import numpy as np from numpy import dot, outer, random, argsort from scipy import io, linalg, optimize ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # documentation build configuration file, created by # sphinx-quickstart on Sat Sep 27 13:23:22 2008-2009. # # This file is execfile()d with the current directory set to its # containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleab...
unknown
codeparrot/codeparrot-clean
# Pretty-printers for libstc++. # Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2022 - 2025 R. Thomas * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
unknown
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/DWARF/Type.hpp
#if defined(PY_CALL_TRAMPOLINE) #include <emscripten.h> // EM_JS, EM_JS_DEPS #include <Python.h> EM_JS( PyObject*, _PyEM_TrampolineCall_inner, (int* success, PyCFunctionWithKeywords func, PyObject *arg1, PyObject *arg2,...
c
github
https://github.com/python/cpython
Python/emscripten_trampoline.c
import unittest import colander from cornice_swagger.converters import convert_schema as convert from cornice_swagger.converters import TypeConversionDispatcher from cornice_swagger.converters.exceptions import NoSuchConverter from ..support import AnyType, AnyTypeConverter class ConversionTest(unittest.TestCase): ...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from AbstractProcessor import AbstractProcessor from com.hurence.logisland.record import StandardRecord # # Simple python processor to test ability to run python code and process some # records. # # The python_processor.python_processor_script_path config property of the # java python processor must po...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. 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 restriction, including # without limitation the rights ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2012 Google 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: # # * Redistributions of source code must retain the above copyright # notice, this lis...
unknown
codeparrot/codeparrot-clean
# # Secret Labs' Regular Expression Engine # # convert template to internal format # # Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved. # # See the __init__.py file for information on usage and redistribution. # """Internal support module for sre""" import _sre from . import _parser from ._constants i...
python
github
https://github.com/python/cpython
Lib/re/_compiler.py
import { createRequestHandler } from "@react-router/express"; import compression from "compression"; import express from "express"; import morgan from "morgan"; const viteDevServer = process.env.NODE_ENV === "production" ? undefined : await import("vite").then((vite) => vite.createServer({ ...
javascript
github
https://github.com/remix-run/react-router
playground/framework-express/server.js
from __future__ import annotations import tempfile try: import ansible.module_utils.six # intentionally trigger pylint ansible-bad-import error # pylint: disable=unused-import except ImportError: pass try: from ansible.module_utils.six import PY3 # intentionally trigger pylint ansible-bad-import-from ...
python
github
https://github.com/ansible/ansible
test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/tests/integration/targets/hello/files/bad.py
#!/usr/bin/env bash # Copyright 2022 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. set -euxo pipefail apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ apt-transport-https \ autoc...
unknown
github
https://github.com/cockroachdb/cockroach
build/toolchains/toolchainbuild/osxcross/perform-build.sh
__all__ = [] # The following pattern is used below for importing sub-modules: # # 1. "from foo import *". This imports all the names from foo.__all__ into # this module. But, this does not put those names into the __all__ of # this module. This enables "from sympy.physics.quantum import State" to # work. # 2...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.platform import org.jetbrains.kotlin.analysis.api.KaPlatformInterfa...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-platform-interface/src/org/jetbrains/kotlin/analysis/api/platform/KaEngineService.kt
""" # Majic # Copyright (C) 2014 CEH # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This pr...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # This file is part of Ansible # # Ansible 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 3 of the Lice...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2019 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitoinline.bugs; import org.junit.Test; import static org.mockito.Mockito.framework; import static org.mockito.Mockito.spy; public class SelfSpyReferenceMemoryLeakTest { private ...
java
github
https://github.com/mockito/mockito
mockito-integration-tests/inline-mocks-tests/src/test/java/org/mockitoinline/bugs/SelfSpyReferenceMemoryLeakTest.java
""" Test for assert_deallocated context manager and gc utilities """ import gc from scipy._lib._gcutils import (set_gc_state, gc_state, assert_deallocated, ReferenceError, IS_PYPY) from numpy.testing import assert_equal import pytest def test_set_gc_state(): gc_status = gc.isena...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2010 The Guava 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 agre...
java
github
https://github.com/google/guava
android/guava-tests/benchmark/com/google/common/base/CharMatcherBenchmark.java
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # Ansible 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 3 of the Li...
unknown
codeparrot/codeparrot-clean
// Copyright 2022 Google Inc. All Rights Reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the COPYING file in the root of the source // tree. An additional intellectual property rights grant can be found // in the file PATENTS. All contributing project authors may // be...
c
github
https://github.com/opencv/opencv
3rdparty/libwebp/src/dsp/cpu.h
#!/bin/sh test_description='diff function context' . ./test-lib.sh dir="$TEST_DIRECTORY/t4051" commit_and_tag () { tag=$1 && shift && git add "$@" && test_tick && git commit -m "$tag" && git tag "$tag" } first_context_line () { awk ' found {print; exit} /^@@/ {found = 1} ' } last_context_line () { se...
unknown
github
https://github.com/git/git
t/t4051-diff-function-context.sh
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package http import ( "io" "net/http" "net/url" "testing" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/hashicorp/vault/api" "github.com/hashicorp/vault/helper/constants" "github.com/hashicorp/vault/sd...
go
github
https://github.com/hashicorp/vault
http/sys_health_test.go
#!/usr/bin/env python # 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 # d...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################### # # RetrieveLastColumnValue # Returns the value of the last cell in a specified column. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "Lice...
unknown
codeparrot/codeparrot-clean
import subprocess import datetime import os VERSION = __version__ = (0, 2, 0, 'final', 0) NAME='django-uuid-pk' __author__ = 'sax' def get_version(version=None): """Derives a PEP386-compliant version number from VERSION.""" if version is None: version = VERSION assert len(version) == 5 assert ...
unknown
codeparrot/codeparrot-clean
import random from twisted.internet import defer, endpoints, protocol, reactor from twisted.trial import unittest from p2pool import networks, p2p from p2pool.bitcoin import data as bitcoin_data from p2pool.util import deferral class Test(unittest.TestCase): @defer.inlineCallbacks def test_sharereq(self): ...
unknown
codeparrot/codeparrot-clean
# rhn_register.py - GUI front end code for firstboot screen resolution # # Copyright 2003 Red Hat, Inc. # Copyright 2003 Brent Fox <bfox@redhat.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundat...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2011 The Guava 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 agre...
java
github
https://github.com/google/guava
android/guava-tests/test/com/google/common/cache/CacheStatsTest.java
/* * Copyright 2002-present 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 b...
java
github
https://github.com/spring-projects/spring-framework
spring-beans/src/test/java/org/springframework/beans/factory/Spr5475Tests.java
// Copyright 2022 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package server import ( "context" "crypto/tls" "io" "net" "sync" "github.com/cockroachdb/cmux" "github.com/cockroachdb/cockroach/pkg/rpc" "github.com/cockroach...
go
github
https://github.com/cockroachdb/cockroach
pkg/server/start_listen.go
Some type parameters have the same name. Erroneous code example: ```compile_fail,E0403 fn f<T, T>(s: T, u: T) {} // error: the name `T` is already used for a generic // parameter in this item's generic parameters ``` Please verify that none of the type parameters are misspelled, and ...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0403.md
import sys import time from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler from client_config import * from xmlrpc import * from threading import Thread import os def get_dir(path): p=path.split('/') size=len(p) return p[size-2],p[size-1] class custom_han...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package physical import ( "context" "math/rand" "sync" "time" log "github.com/hashicorp/go-hclog" uberAtomic "go.uber.org/atomic" ) const ( // DefaultJitterPercent is used if no cache size is specified for NewCache DefaultJitterPercent = ...
go
github
https://github.com/hashicorp/vault
sdk/physical/latency.go
#!/usr/bin/env python3 # 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 "Lic...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013 - 2016 EMC 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 # # Unle...
unknown
codeparrot/codeparrot-clean
// Clang on MacOS can find libc++ living beside the installed compiler. // This test makes sure clang-tidy emulates this properly. // // RUN: rm -rf %t // RUN: mkdir %t // // Install the mock libc++ (simulates the libc++ directory structure). // RUN: cp -r %S/Inputs/mock-libcxx %t/ // // Pretend clang is installed besi...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-tidy/infrastructure/clang-tidy-mac-libcxx.cpp
/* * Copyright 2012-present 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 b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/properties/TestcontainersPropertySourceAutoConfigurationTests.java
{ "name": "plugin/b", "version": "2.2.2", "require": { "plugin/a": "*", "composer-plugin-api": "^2" }, "autoload": { "classmap": ["PluginB.php"] }, "type": "composer-plugin", "extra": { "class": "PluginB" } }
json
github
https://github.com/composer/composer
tests/Composer/Test/Fixtures/functional/installed-versions/plugin-b/composer.json
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
c
github
https://github.com/curl/curl
docs/examples/crawler.c
// Copyright The Prometheus 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 agreed to in w...
go
github
https://github.com/prometheus/prometheus
tsdb/chunks/head_chunks_test.go
#!/usr/bin/python # This file is part of Ansible # # Ansible 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 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
unknown
codeparrot/codeparrot-clean
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ @tailwind base; @tailwind components; @tailwind utilities; @layer base { @font-face { font-family: "Source Code Pro"; ...
css
github
https://github.com/facebook/react
compiler/apps/playground/styles/globals.css
""" Flexx has a command line interface to perform some simple tasks. Invoke it via ``python -m flexx``. Additional command line arguments can be provided to configure Flexx, see :func:`configuring flexx <flexx.config>`. .. code-block:: none """ import sys ALIASES = {'-h': 'help', '--help': 'help', '--ver...
unknown
codeparrot/codeparrot-clean
/* Copyright 2018 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...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/grappler/optimizers/data/map_and_filter_fusion.h
// runoutput ./rotate.go // Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Generate test of bit rotations. // The output is compiled and run. package main const mode = 0
go
github
https://github.com/golang/go
test/rotate0.go