code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# Copyright 2016 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
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
unknown
codeparrot/codeparrot-clean
package daemon import ( "sync" "github.com/moby/moby/v2/daemon/container" ) // linkIndex stores link relationships between containers, including their specified alias // The alias is the name the parent uses to reference the child type linkIndex struct { // idx maps a parent->alias->child relationship idx map[*c...
go
github
https://github.com/moby/moby
daemon/links.go
# mako/lexer.py # Copyright 2006-2019 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """provides the Lexer class for parsing template strings into parse trees.""" import codecs import re ...
unknown
codeparrot/codeparrot-clean
/* * 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-context/src/main/java/org/springframework/resilience/retry/MethodRetrySpec.java
import numpy as np import pytest from pandas import ( DataFrame, MultiIndex, Series, ) import pandas._testing as tm @pytest.fixture def simple_multiindex_dataframe(): """ Factory function to create simple 3 x 3 dataframe with both columns and row MultiIndex using supplied data or random da...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/indexing/multiindex/test_iloc.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2012-2015 University of Dundee & Open Microscopy Environment. # All rights reserved. Use is subject to license terms supplied in LICENSE.txt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General P...
unknown
codeparrot/codeparrot-clean
export { a } from "./a"; export { b } from "./b"; export { c } from "./c"; console.log("side effect");
javascript
github
https://github.com/webpack/webpack
examples/side-effects/node_modules/big-module-with-flag/index.js
/* * 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/reflect/Invokable.java
/* * Copyright (c) 2024 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal; import net.bytebuddy.ClassFileVersion; import net.bytebuddy.agent.ByteBuddyAgent; import net.bytebuddy.agent.Installer; import java.lang.instrument.Instrumentation; imp...
java
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/internal/PremainAttachAccess.java
""" I2C test for the CC3200 based boards. A MPU-9150 sensor must be connected to the I2C bus. """ from machine import I2C import os import time mch = os.uname().machine if "LaunchPad" in mch: i2c_pins = ("GP11", "GP10") elif "WiPy" in mch: i2c_pins = ("GP15", "GP10") else: raise Exception("Board not suppo...
unknown
codeparrot/codeparrot-clean
package specconv import ( "context" "fmt" "os" "path" "path/filepath" "strconv" "strings" "github.com/containerd/log" "github.com/opencontainers/runtime-spec/specs-go" ) // ToRootfulInRootless is used for "rootful-in-rootless" dind; // the daemon is running in UserNS but has no access to RootlessKit API soc...
go
github
https://github.com/moby/moby
daemon/internal/rootless/specconv/specconv_linux.go
import {Stringify} from 'shared-runtime'; function hoisting() { function onClick(x) { return x + bar.baz; } const bar = {baz: 1}; return <Stringify onClick={onClick} />; } export const FIXTURE_ENTRYPOINT = { fn: hoisting, params: [], isComponent: false, };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/hoisting-member-expression.js
#!/usr/bin/env python """Checks pilots mentioned in the EVE chatlogs against a KOS list.""" from evelink import api, eve from evelink.cache import shelf import sys, string, os, tempfile, time, json, urllib2, urllib KOS_CHECKER_URL = 'http://kos.cva-eve.org/api/?c=json&type=unit&%s' NPC = 'npc' LASTCORP = 'lastcorp' ...
unknown
codeparrot/codeparrot-clean
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # 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) an...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import UserError class StockPickingWave(models.Model): _inherit = "mail.thread" _name = "stock.picking.wave" _description = "Picking Wave" _or...
unknown
codeparrot/codeparrot-clean
""" Django settings for shoppinglist project. Generated by 'django-admin startproject' using Django 1.8.5. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build...
unknown
codeparrot/codeparrot-clean
from django.conf import settings import logging logger = logging.getLogger(__name__) # : Your facebook app id FACEBOOK_APP_ID = getattr(settings, 'FACEBOOK_APP_ID', None) # : Your facebook app secret FACEBOOK_APP_SECRET = getattr(settings, 'FACEBOOK_APP_SECRET', None) # : The default scope we should use, note that re...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2020 The Kubernetes 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 writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/controller/endpointslicemirroring/reconciler_test.go
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2013, Evgenii Terechkov # Written by Evgenii Terechkov <evg@altlinux.org> # Based on urpmi module written by Philippe Makowski <philippem@mageia.org> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publi...
unknown
codeparrot/codeparrot-clean
""" ========================================================================== Gaussian processes on discrete data structures ========================================================================== This example illustrates the use of Gaussian processes for regression and classification tasks on data that are not in...
python
github
https://github.com/scikit-learn/scikit-learn
examples/gaussian_process/plot_gpr_on_structured_data.py
# Copyright 2011 OpenStack Foundation # 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 requ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2013 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. """Launches Android Virtual Devices with a set configuration for testing Chrome. The script will launch a specified number of Andr...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import sys, os, random, sigproc import psr_utils as pu def spigot_samples_per_file(spigot_filenm): """ spigot_samples_per_file(spigot_filenm,): Return the number of samples present in the Spigot FITs file. """ hdrlen = 184320 bytes_per_sample = 2048 filelen = os.st...
unknown
codeparrot/codeparrot-clean
#ifndef SRC_ALIASED_STRUCT_INL_H_ #define SRC_ALIASED_STRUCT_INL_H_ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include "aliased_struct.h" #include "v8.h" #include <memory> namespace node { template <typename T> template <typename... Args> AliasedStruct<T>::AliasedStruct(v8::Isolate* isolate, Args&&......
c
github
https://github.com/nodejs/node
src/aliased_struct-inl.h
# Absolute Imports and Aliases This example shows how to configure [Absolute imports and Module path aliases](https://nextjs.org/docs/advanced-features/module-path-aliases) in `tsconfig.json` (or `jsconfig.json` for JavaScript projects). These options will allow absolute imports from `.` (the root directory), and allo...
unknown
github
https://github.com/vercel/next.js
examples/with-absolute-imports/README.md
# 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/. from __future__ import division import datetime from math import sqrt, log, pi, cos, sin, exp from configman import Na...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid at kovidgoyal.net>' __docformat__ = 'restructuredtext en' ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Standard packages import os import sys import argparse # Third-party packages from toil.job import Job # Package methods from ddb import configuration from ddb_ngsflow import pipeline from ddb_ngsflow.rna import hisat from ddb_ngsflow.rna import stringtie if __name__ == "__main__": parse...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """Test methods in twisted.internet.threads and reactor thread APIs.""" import time, sys from twisted.trial import unittest from twisted.internet import reactor, interfaces, threads from twisted.python import failure, threadable clas...
unknown
codeparrot/codeparrot-clean
import * as React from "react"; import * as TestRenderer from "react-test-renderer"; import { MemoryRouter, Routes, Route } from "react-router"; describe("<Routes>", () => { let consoleWarn: jest.SpyInstance; let consoleError: jest.SpyInstance; beforeEach(() => { consoleWarn = jest.spyOn(console, "warn").moc...
typescript
github
https://github.com/remix-run/react-router
packages/react-router/__tests__/Routes-test.tsx
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 // Package stackeval contains all of the internal logic of the stacks language // runtime. // // This package may be imported only by the "stackruntime" package. It's a // separate package only so we can draw a distinction between symbols that // ar...
go
github
https://github.com/hashicorp/terraform
internal/stacks/stackruntime/internal/stackeval/doc.go
/* * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.utils.io.locks import io.ktor.utils.io.InternalAPI /** * [SynchronizedObject] from `kotlinx.atomicfu.locks` * * [SynchronizedObject] is designed for inheritance. You write...
kotlin
github
https://github.com/ktorio/ktor
ktor-io/jvm/src/io/ktor/utils/io/locks/Synchronized.kt
"""Different kinds of SAX Exceptions""" import sys if sys.platform[:4] == "java": from java.lang import Exception del sys # ===== SAXEXCEPTION ===== class SAXException(Exception): """Encapsulate an XML error or warning. This class can contain basic error or warning information from either the XML parser o...
unknown
codeparrot/codeparrot-clean
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import os import sys import subprocess import getopt import unittest class GenTest(unittest.TestCase): def execute(self, cmd, cwd = None): p = subprocess.Popen(cmd, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) stdout, stderr = p...
unknown
codeparrot/codeparrot-clean
prelude: | def nested_hash h, n if n == 0 '' else 10.times{ h[Object.new] = nested_hash(h, n-1) } end end long_lived = Hash.new nested_hash long_lived, 6 GC.start GC.start benchmark: vm_gc_short_with_complex_long: | a = '' # short-lived String b = '' c =...
unknown
github
https://github.com/ruby/ruby
benchmark/vm_gc_short_with_complex_long.yml
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing_extensions import Literal from ..._models import BaseModel __all__ = ["ResponseReasoningSummaryTextDeltaEvent"] class ResponseReasoningSummaryTextDeltaEvent(BaseModel): """Emitted when a delta is added to a reasoni...
python
github
https://github.com/openai/openai-python
src/openai/types/responses/response_reasoning_summary_text_delta_event.py
/* Copyright 2022 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/transforms/graph_transform_wrapper.h
#!/usr/bin/env python # ===--- convertToJSON.py ------------------------------------------------===// # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See ...
unknown
codeparrot/codeparrot-clean
########################################################################## # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Mark Theunissen <mark.theunissen@gmail.com> # Sponsored by Four Kitchens http://fourkitchens.com. # # 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 publishe...
unknown
codeparrot/codeparrot-clean
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from django.core.management.base import BaseCommand from django.conf import settings from sis_provisioner.dao.term import ( get_term_by_year_and_quarter, get_current_active_term) from sis_provisioner.builders.courses import Unus...
unknown
codeparrot/codeparrot-clean
import json import os from c2corg_common.document_types import WAYPOINT_TYPE, ROUTE_TYPE, IMAGE_TYPE from c2corg_ui import caching from c2corg_ui.caching import cache_sitemap, CachedPage from c2corg_ui.tests import read_file from c2corg_ui.views.sitemap import Sitemap, generate_sitemap_index, \ generate_sitemap, g...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2025-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...
kotlin
github
https://github.com/spring-projects/spring-framework
framework-docs/src/main/kotlin/org/springframework/docs/testing/resttestclient/workflow/RestClientWorkflowTests.kt
# --------------------------------------------------------------------- # # Copyright (c) 2012 University of Oxford # # 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, incl...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='merge-recursive backend test' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh test_expect_success 'setup 1' ' echo hello >a && o0=$(git hash-object a) && cp a b && cp a c && mkdir d && cp a d/e && test_tick && git add a b c ...
unknown
github
https://github.com/git/git
t/t6430-merge-recursive.sh
# pylint: disable-msg=W0611, W0612, W0511 """Tests suite for MaskedArray. Adapted from the original test_ma by Pierre Gerard-Marchant :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu :version: $Id: test_extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $ """ from __future__ import division, absolute...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2016 University of Zurich. All rights reserved. # # This file is part of MSRegistry Backend. # # MSRegistry Backend is free software: you can redistribute it and/or # modify it under the terms of the version 3 of the GNU Affero General # Public License as published by the Free Software Foundation, or a...
unknown
codeparrot/codeparrot-clean
#-*- coding: UTF-8 -*- from app import app from app.models import db def query_server(): re = [] db_query = list(db.Device.find({"type": "server"},{"_id":0, "host":1})) for i in db_query: re.append(i.values()[0]) return re def query_script(): re = [] db_query = list(db.Script.find({},{...
unknown
codeparrot/codeparrot-clean
<!doctype html> <!-- #docregion --> <html lang="en"> <head> <base href="/" /> <title>Drag and Drop Disabled Dragging Example</title> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> </head> <body> <cdk-drag-drop-disabled-example></cdk-drag-drop-...
html
github
https://github.com/angular/angular
adev/src/content/examples/drag-drop/src/disable-drag/index.html
#!/usr/bin/python from __future__ import absolute_import import os import sys import httplib2 import logging from apiclient import discovery from oauth2client import client as oauth_client, tools as oauth_tools, file as oauth_file from oauth2client.service_account import ServiceAccountCredentials logger = logging.get...
unknown
codeparrot/codeparrot-clean
'use strict'; const common = require('../common'); const fs = require('fs'); const tmpdir = require('../../test/common/tmpdir'); tmpdir.refresh(); const bench = common.createBenchmark(main, { type: ['existing', 'non-existing'], n: [1e3], }); function main({ n, type }) { switch (type) { case 'existing': { ...
javascript
github
https://github.com/nodejs/node
benchmark/fs/bench-chmodSync.js
# -*- coding: utf-8 -*- # Copyright: (c) 2019-2020, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Version comparison helpers.""" from __future__ import annotations import operator from ansible.module_utils.compat.version import LooseVersion from ansib...
python
github
https://github.com/ansible/ansible
lib/ansible/galaxy/dependency_resolution/versioning.py
# -*- coding: utf-8 -*- """参照 twisted/asyncio重新设计下api""" import gevent.monkey gevent.monkey.patch_socket() import logging import gevent import gevent.queue import gevent.pywsgi import geventwebsocket.handler from .util import shorten logger = logging.getLogger(__name__) def id_generator(): i = 0 wall = ...
unknown
codeparrot/codeparrot-clean
import {shallowCopy} from 'shared-runtime'; function Component(props) { const x = shallowCopy(props); // These calls should view x as readonly and be grouped outside of the reactive scope for x: console.log(x); console.info(x); console.warn(x); console.error(x); console.trace(x); console.table(x); gl...
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/console-readonly.js
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
unknown
codeparrot/codeparrot-clean
## API Report File for "http_errors" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts // @public export const enum RuntimeErrorCode { // (undocumented) CACHE_NOT_SUPPORTED_WITH_XHR = 2814, // (undocumented) CANNOT_SPECIFY_BOTH_FROM_STRING_AND_FRO...
unknown
github
https://github.com/angular/angular
goldens/public-api/common/http/errors.api.md
{ "kind": "DashboardWithAccessInfo", "apiVersion": "dashboard.grafana.app/v0alpha1", "metadata": { "name": "value-mapping-test", "namespace": "default", "uid": "value-mapping-test", "resourceVersion": "1765384157199094", "generation": 2, "creationTimestamp": "2025-11-19T20:09:28Z", "la...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/v1beta1.value-mapping-and-overrides.v0alpha1.json
#!/usr/bin/env python # coding:utf-8 __version__ = '3.3.1' __password__ = '' __hostsdeny__ = () #__hostsdeny__ = ('.youtube.com', '.youku.com', ".googlevideo.com") import os import re import time import struct import zlib import base64 import logging import urlparse import httplib import io import string import trace...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: https://sickrage.github.io # Git: https://github.com/SickRage/SickRage.git # # This file is part of SickRage. # # SickRage 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...
unknown
codeparrot/codeparrot-clean
""" CLI related utilities for submitting Pulsar jobs. """ import json import logging import time from pulsar.client.util import from_base64_json from pulsar.main import ( load_pulsar_app, PulsarManagerConfigBuilder ) from pulsar.manager_endpoint_util import submit_job from pulsar.managers.status import is_job_...
unknown
codeparrot/codeparrot-clean
from opencog.atomspace import AtomSpace, types from opencog.utilities import initialize_opencog, finalize_opencog from opencog.bindlink import execute_atom import opencog.scheme_wrapper as scheme from opencog.scheme_wrapper import load_scm, scheme_eval from opencog.type_constructors import * atomspace = AtomSpace() #...
unknown
codeparrot/codeparrot-clean
# Copyright 2017 Battelle Energy Alliance, 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 t...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Matt Davis <mdavis_ansible@rolpdog.com> # # 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 t...
unknown
codeparrot/codeparrot-clean
<?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\PhpUnit\Tests; use PHPUnit\Framework\TestCase; use Symfo...
php
github
https://github.com/symfony/symfony
src/Symfony/Bridge/PhpUnit/Tests/EnumExistsMockTest.php
#pragma once #include <ATen/cudnn/Handle.h>
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/cudnn/Handles.h
{license_header} from __future__ import annotations from typing import Optional, Sequence from pydantic import BaseModel, root_validator, validator from datadog_checks.base.utils.functions import identity from datadog_checks.base.utils.models import validation from . import defaults, validators class InstanceConfi...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import os import re import yaml import argparse try: import pyrax HAS_PYRAX = True except ImportError: HAS_PYRAX = False from ansible.module_utils.six.moves import input def rax_list_iterator(svc, *args, **kwargs): method = kwargs.pop('method', 'list') items = getattr(svc, ...
unknown
codeparrot/codeparrot-clean
//===-- CanonicalIncludes.h - remap #include header -------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/clangd/index/CanonicalIncludes.h
function Component(props) { let items = []; for (const key in props) { items.push(<div key={key}>{key}</div>); } return <div>{items}</div>; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: [{hello: null, world: undefined, '!': true}], sequentialRenders: [ {a: null, b: null, c: null}, ...
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/for-in-statement.js
"""Support for interacting with and controlling the cmus music player.""" import logging import voluptuous as vol from homeassistant.components.media_player import ( MediaPlayerDevice, PLATFORM_SCHEMA) from homeassistant.components.media_player.const import ( MEDIA_TYPE_MUSIC, MEDIA_TYPE_PLAYLIST, SUPPORT_NEX...
unknown
codeparrot/codeparrot-clean
# -*- coding: 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 unique constraint on 'CredIcon', fields ['name'] db.create_unique('cred_credicon', ['name']) de...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Violin Memory, Inc. # 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 # # ...
unknown
codeparrot/codeparrot-clean
"""Convert a NT pathname to a file URL and vice versa.""" def url2pathname(url): """OS-specific conversion from a relative URL of the 'file' scheme to a file system path; not recommended for general use.""" # e.g. # ///C|/foo/bar/spam.foo # becomes # C:\foo\bar\spam.foo import string, urlli...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Cookie; use Illuminate\Contracts\Cookie\QueueingFactory as JarContract; use Illuminate\Support\Arr; use Illuminate\Support\InteractsWithTime; use Illuminate\Support\Traits\Macroable; use Symfony\Component\HttpFoundation\Cookie; class CookieJar implements JarContract { use InteractsWith...
php
github
https://github.com/laravel/framework
src/Illuminate/Cookie/CookieJar.php
#!/usr/bin/env python from __future__ import print_function import os import sys from time import sleep import boto3 import commands from botocore.exceptions import ClientError APP_NAME = os.getenv('BITBUCKET_REPO_SLUG') COMMIT_HASH = os.getenv('BITBUCKET_COMMIT') del os.environ['GIT_DIR'] TAG = commands.getoutput("g...
unknown
codeparrot/codeparrot-clean
# TODO: This is a really loose alias for a lot of files. # TODO(SERVER-89644): Tighten this up as we decide more the split between the teams. version: 2.0.0 filters: - "*": approvers: - 10gen/devprod-build - "burn_in_tests.py": approvers: - 10gen/devprod-correctness - "auto_install_db_contrib_...
unknown
github
https://github.com/mongodb/mongo
buildscripts/OWNERS.yml
# -*- coding: utf-8 -*- """ jinja2.ext ~~~~~~~~~~ Jinja extensions allow to add custom tags similar to the way django custom tags work. By default two example extensions exist: an i18n and a cache extension. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2 import nod...
unknown
codeparrot/codeparrot-clean
""" Tests for branding page """ import datetime from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.http import HttpResponseRedirect from django.test.utils import override_settings from django.test.client import RequestFactory from pytz import UTC from mock import patch,...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import rospy import wx import wx.lib.newevent import xml.etree.ElementTree as ET from optparse import OptionParser from sensor_msgs.msg import JointState from math import pi from threading import Thread from dynamixel_msgs.msg import JointState as DXJointState from std_msgs.msg import Float64 i...
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...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/ClassLoaderCheckThird.java
# -*- coding: utf-8 -*- # © 2015 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). class ChangesetMixin(object): def assert_changeset(self, partner, expected_source, expected_changes): """ Check if a changeset has been created according to expected values The part...
unknown
codeparrot/codeparrot-clean
// Copyright Antony Polukhin, 2016-2024. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_STACKTRACE_HPP #define BOOST_STACKTRACE_HPP #include <boost/config.hpp> #ifdef BOOST_HAS_PRAGMA_ONCE # ...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/stacktrace.hpp
/*------------------------------------------------------------------------- * * pg_tablespace.c * routines to support manipulation of the pg_tablespace relation * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * ...
c
github
https://github.com/postgres/postgres
src/backend/catalog/pg_tablespace.c
# 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
// Copyright 2016 The etcd 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 t...
go
github
https://github.com/etcd-io/etcd
pkg/expect/expect_test.go
# Copyright 2013-2020 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 Xxhash(MakefilePackage): """xxHash is an Extremely fast Hash algorithm, running at RAM spee...
unknown
codeparrot/codeparrot-clean
""" Goal: store shortcuts to common tasks @authors: Andrei Sura <sura.andrei@gmail.com> """ import sys from invoke import task from tasks_utils import ask_yes_no, get_db_name, check_db_exists STATUS_PASS = '✔' STATUS_FAIL = '✗' @task def list(ctx): """ Show available tasks """ ctx.run('inv -l') @task ...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 """ Uses /proc/loadavg to collect data on load average #### Dependencies * /proc/loadavg """ import diamond.collector import re import os from diamond.collector import str_to_bool class LoadAverageCollector(diamond.collector.Collector): PROC_LOADAVG = '/proc/loadavg' PROC_LOADAVG_RE = re....
unknown
codeparrot/codeparrot-clean
import { readFileSync } from 'node:fs' import { fileURLToPath } from 'node:url' import { bench } from 'vitest' import { createLineTable } from './line-table' const currentFolder = fileURLToPath(new URL('..', import.meta.url)) const cssFile = readFileSync(currentFolder + '../preflight.css', 'utf-8') const table = crea...
typescript
github
https://github.com/tailwindlabs/tailwindcss
packages/tailwindcss/src/source-maps/line-table.bench.ts
/* * 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/jmh/java/org/springframework/beans/factory/DefaultListableBeanFactoryBenchmark.java
# -*- coding: utf-8 -*- """ werkzeug.routing ~~~~~~~~~~~~~~~~ When it comes to combining multiple controller or view functions (however you want to call them) you need a dispatcher. A simple way would be applying regular expression tests on the ``PATH_INFO`` and calling registered callback fun...
unknown
codeparrot/codeparrot-clean
/********************************************************************** node_dump.c - dump ruby node tree $Author: mame $ created at: 09/12/06 21:23:44 JST Copyright (C) 2009 Yusuke Endoh **********************************************************************/ #include "internal.h" #include "internal/class....
c
github
https://github.com/ruby/ruby
node_dump.c
//===-- OverridePureVirtualsTests.cpp ---------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clangd/unittests/tweaks/OverridePureVirtualsTests.cpp
/* * 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-context/src/test/java/example/scannable/FooServiceImpl.java
# Copyright 2014 IBM Corp. # # 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
codeparrot/codeparrot-clean
import json from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponseBadRequest, HttpResponseNotFound, HttpResponse def format_session_increment_field(cls, id, field): return cls.__name__ + '-' + field + '-' + str(id) def ajax_base(request, event_processor, allowed_methods): "...
unknown
codeparrot/codeparrot-clean