code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# Copyright 2016 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. import json import os import re COMPONENTS_DIR = 'components' DESTINATION_COMPONENTS_DIR = 'components-chromium' COMPONENT_SUMMARY =\ """Name: %(name)s Repo...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 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 req...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 import sys import unittest import numpy as np major, minor = [int(d) for d in np.__version__.split(".")[:2]] if major == 0: BadListError = TypeError else: BadListError = ValueError import Fortran ###################################################################### class FortranTest...
python
github
https://github.com/numpy/numpy
tools/swig/test/testFortran.py
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.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, including # without limitation the rights to use, copy, modi...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 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
""" Missing data handling for arithmetic operations. In particular, pandas conventions regarding division by zero differ from numpy in the following ways: 1) np.array([-1, 0, 1], dtype=dtype1) // np.array([0, 0, 0], dtype=dtype2) gives [nan, nan, nan] for most dtype combinations, and [0, 0, 0] for th...
python
github
https://github.com/pandas-dev/pandas
pandas/core/ops/missing.py
/* * 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/main/java/org/springframework/beans/factory/aot/BeanRegistrationsCode.java
from django.test import TestCase from .models import ( CompetingTeam, Event, Group, IndividualCompetitor, Membership, Person, ) class MultiTableTests(TestCase): @classmethod def setUpTestData(cls): cls.alice = Person.objects.create(name='Alice') cls.bob = Person.objects.create(name='Bob') ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2021 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.descriptors.types import org.jetbrains.kotlin.analysis.api.KaExperi...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/types/KaFe10ClassErrorType.kt
# -*- coding: iso-8859-2 -*- LanguageCodes = {"aar": ("Afar", "Hamitic"), "aa": ("Afar", "Hamitic"), "abk": ("Abkhazian", "Ibero-caucasian"), "ab": ("Abkhazian", "Ibero-caucasian"), "ace": ("Achinese", ""), "ach": ("Acoli", ""), "ada": ("Adangme", ""), "afa": ("Afro-Asiatic (Other)", ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2007-2009, Linden Research, Inc. # Copyright (c) 2007, 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 re...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # This file is part of python-tdbus. Python-tdbus is free software # available under the terms of the MIT license. See the file "LICENSE" that # was provided together with this source file for the licensing terms. # # Copyright (c) 2012 the python-tdbus authors. See the file "AUTHORS" for a # co...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
unknown
codeparrot/codeparrot-clean
"""add core minus pm column Revision ID: 011b5659ae29 Revises: cb4bddc0f5f8 Create Date: 2021-02-25 13:53:35.885347 """ from alembic import op import sqlalchemy as sa import rdr_service.model.utils from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus from rdr_service...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Tests\Database; use Closure; use Exception; use Illuminate\Database\Connection; use Illuminate\Database\ConnectionResolverInterface; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Query\Builder; use Illuminate\Database\Uni...
php
github
https://github.com/laravel/framework
tests/Database/DatabaseEloquentHasManyCreateOrFirstTest.php
""" Assertion helpers and base class for offsets tests """ from __future__ import annotations def assert_offset_equal(offset, base, expected): actual = offset + base actual_swapped = base + offset actual_apply = offset._apply(base) try: assert actual == expected assert actual_swapped =...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/tseries/offsets/common.py
<?php namespace Illuminate\Validation\Rules; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Contracts\Validation\Rule; use Illuminate\Contracts\Validation\ValidatorAwareRule; use Illuminate\Support\Arr; use Illuminate\Support\Traits\Conditionable; use Stringable; use TypeError; use function Illuminate\Su...
php
github
https://github.com/laravel/framework
src/Illuminate/Validation/Rules/Enum.php
""" @package mi.instrument.mclane.ras.ooicore.test.test_driver @file marine-integrations/mi/instrument/mclane/ras/ooicore/test/test_driver.py @author Bill Bollenbacher & Dan Mergens @brief Test cases for rasfl driver USAGE: Make tests verbose and provide stdout * From the IDK $ bin/test_driver $ bin/...
unknown
codeparrot/codeparrot-clean
package grpc import "google.golang.org/grpc" // Backend abstracts a registerable GRPC service. type Backend interface { RegisterGRPC(*grpc.Server) }
go
github
https://github.com/moby/moby
daemon/server/router/grpc/backend.go
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals import re import codecs from .common import InfoExtractor from ..utils import unified_strdate class GooglePlusIE(InfoExtractor): IE_DESC = 'Google Plus' _VALID_URL = r'https?://plus\.google\.com/(?:[^/]+/)*?posts/(?P<id>\w+)' IE_NAME = 'plus.google'...
unknown
codeparrot/codeparrot-clean
from django import template from mediagenerator.generators.bundles.utils import _render_include_media from mediagenerator import utils register = template.Library() class MediaNode(template.Node): def __init__(self, bundle, variation): self.bundle = bundle self.variation = variation def rende...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.apps import apps from django.conf import settings from django.contrib.sites import models from django.contrib.sites.management import create_default_site from django.contrib.sites.middleware import CurrentSiteMiddleware from django.contrib.sites.models import Site, c...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 Hewlett-Packard Development Company, L.P. # # 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...
unknown
codeparrot/codeparrot-clean
import unittest import numpy from chainer.backends import cuda from chainer import functions from chainer import testing from chainer.testing import attr from chainer.utils import type_check @testing.inject_backend_tests( None, # CPU tests [ {}, ] # GPU tests + testing.product({ ...
unknown
codeparrot/codeparrot-clean
__author__ = 'Sean Griffin' __version__ = '1.0.0' __email__ = 'sean@thoughtbot.com' import sys import os.path import json import shutil from pymel.core import * from maya.OpenMaya import * from maya.OpenMayaMPx import * kPluginTranslatorTypeName = 'Three.js' kOptionScript = 'ThreeJsExportScript' kDefaultOptionsStri...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe import json from six.moves.urllib.parse import parse_qs from six import string_types from frappe.utils import get_request_session fr...
unknown
codeparrot/codeparrot-clean
# TinyS2 MicroPython Helper Library # 2021 Seon Rozenblum - Unexpected Maker # # Project home: # https://tinys2.io # # 2021-Apr-10 - v0.1 - Initial implementation # Import required libraries from micropython import const from machine import Pin, SPI, ADC import machine, time # TinyS2 Hardware Pin Assignments # Sen...
unknown
codeparrot/codeparrot-clean
import markdownStyles from "./markdown-styles.module.css"; export default function PostBody({ content }) { return ( <div className="max-w-2xl mx-auto"> <div className={markdownStyles["markdown"]} dangerouslySetInnerHTML={{ __html: content }} /> </div> ); }
typescript
github
https://github.com/vercel/next.js
examples/cms-agilitycms/components/post-body.tsx
# 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 time from mcts.webapi_tests.semiauto import TestCase from mcts.webapi_tests.telephony import TelephonyTestCommon...
unknown
codeparrot/codeparrot-clean
""" Tests for course_metadata_utils. """ from collections import namedtuple from datetime import timedelta, datetime from unittest import TestCase from django.utils.timezone import UTC from xmodule.course_metadata_utils import ( clean_course_key, url_name_for_course_location, display_name_with_default, ...
unknown
codeparrot/codeparrot-clean
: included from 6002 and others >sed.script # Answer the sha1 has associated with the tag. The tag must exist under refs/tags tag () { _tag=$1 git rev-parse --verify "refs/tags/$_tag" || error "tag: \"$_tag\" does not exist" } # Generate a commit using the text specified to make it unique and the tree # named by ...
unknown
github
https://github.com/git/git
t/lib-t6000.sh
The documentation has been moved to the [https://kotlinlang.org/docs/channels.html](https://kotlinlang.org/docs/channels.html) page. To edit the documentation, open the [topics/channels.md](topics/channels.md) page.
unknown
github
https://github.com/Kotlin/kotlinx.coroutines
docs/channels.md
/* Copyright 2024 - 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/src/paging.hpp
""" The GeometryColumns and SpatialRefSys models for the SpatiaLite backend. """ from django.db import models from django.contrib.gis.db.backends.base import SpatialRefSysMixin from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class GeometryColumns(models.Model): """ T...
unknown
codeparrot/codeparrot-clean
apiVersion: mygroup.example.com/v1alpha1 kind: Kind metadata: name: myobj spec: key: value
unknown
github
https://github.com/kubernetes/kubernetes
hack/testdata/CRD/resource.yaml
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Recipes for NativeClient toolchain packages. The real entry plumbing is in toolchain_main.py. """ import collections import f...
unknown
codeparrot/codeparrot-clean
import { FormattingContext, FormattingRequestKind, FormattingScanner, getFormattingScanner, Rule, RuleAction, RuleFlags, RulesMap, SmartIndenter, } from "../_namespaces/ts.formatting.js"; import { Block, CallExpression, canHaveModifiers, CatchClause, CharacterCode...
typescript
github
https://github.com/microsoft/TypeScript
src/services/formatting/formatting.ts
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package terraform import ( "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" ) // GraphNodeAttachProvider is an interface that must be implemented by nodes // that want provider configurations atta...
go
github
https://github.com/hashicorp/terraform
internal/terraform/transform_attach_config_provider.go
from io import StringIO import pytest from datetime import datetime from flask import url_for from udata.frontend import csv from udata.models import Badge, Site, PUBLIC_SERVICE from udata.core.dataset import tasks as dataset_tasks from udata.core.dataset.factories import DatasetFactory, ResourceFactory from udata....
unknown
codeparrot/codeparrot-clean
# Defer Trigger Misconfiguration This diagnostic detects unreachable or redundant triggers in `@defer` blocks. ```typescript import {Component} from '@angular/core'; @Component({ template: ` @defer (on immediate; on timer(500ms)) { <large-component /> } `, }) class MyComponent {} ``` ## What's wro...
unknown
github
https://github.com/angular/angular
adev/src/content/reference/extended-diagnostics/NG8021.md
#!/usr/bin/python ''' # Spinnaker Import/Export Tool Python cli tool that imports and exports the following Spinnaker items: * Applications * Pipelines * Deployment Strategies * Task Logs * Echo * Triggers * Executions This is helpful for performing a Spinnaker upgrade. Simply export your items, shut dow...
unknown
codeparrot/codeparrot-clean
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v0alpha1", "metadata": { "name": "v38.timeseries_table_display_mode.v42" }, "spec": { "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana -...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/migrated_dashboards_output/v1beta1-mig-v38.timeseries_table_display_mode.v42.v0alpha1.json
# -*- 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 model 'Uso' db.create_table(u'produccion_finca_uso', ( (u'id', self.gf('django.db.models...
unknown
codeparrot/codeparrot-clean
/* 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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/distributed_runtime/rpc/grpc_channel.h
# -*- coding: utf-8 -*- """ Sahana Eden Stats Model @copyright: 2012-13 (c) Sahana Software Foundation @license: MIT 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 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python2.7 import random import pygame import sys import pygame.font import pygame.gfxdraw from button import Button from game import Board #GUI button_restart = Button("restart.png", 342, 400) button_help = Button("help.png", 371, 400) done = False message = "" pygame.init() clock = pygame.time.Clock() siz...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import json import sys import re if len(sys.argv) != 2: print "Usage: %s [file.json]" % sys.argv[0] sys.exit(0) def process_date(date_str): if re.match("^\d{4}$", date_str): return { "year": date_str} try: year,month,day = re.match("^(\d{4})[/,\-](\d+)[/,\-](\d+)$"...
unknown
codeparrot/codeparrot-clean
# Copyright 2011-2014 Splunk, 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 agreed to in wri...
unknown
codeparrot/codeparrot-clean
# -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # xierpa server # Copyright (c) 2014+ buro@petr.com, www.petr.com, www.xierpa.com # # X I E R P A 3 # Distribution by the MIT License. # # ---------------------------------------------------------------...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright 2013 Google 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
unknown
codeparrot/codeparrot-clean
""" This test can run only after overcloud cloud provider created and linked to undercloud infra provider, need to compare the cloud providers with the results of the relationships """ import pytest import cfme.fixtures.pytest_selenium as sel from selenium.common.exceptions import NoSuchElementException from cfme.infr...
unknown
codeparrot/codeparrot-clean
## Input ```javascript function Component(props) { let x; let i = 0; do { if (i > 10) { x = 10; } else { x = 1; } i++; } while (i < props.test); // The values assigned to `x` are non-reactive, but the value of `x` // depends on the "control" variable `i`, whose value is affected...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reactive-control-dependency-do-while-test.expect.md
""" Unittest for client side operations such as login and add post """ from django.test import TestCase from django.test.client import Client from django.contrib.auth.models import User from forum.models import Post import logging logger = logging.getLogger(__name__) class ClientTestCase(TestCase): def setUp(self...
unknown
codeparrot/codeparrot-clean
# Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or ht...
unknown
codeparrot/codeparrot-clean
data = ( 'dyil', # 0x00 'dyilg', # 0x01 'dyilm', # 0x02 'dyilb', # 0x03 'dyils', # 0x04 'dyilt', # 0x05 'dyilp', # 0x06 'dyilh', # 0x07 'dyim', # 0x08 'dyib', # 0x09 'dyibs', # 0x0a 'dyis', # 0x0b 'dyiss', # 0x0c 'dying', # 0x0d 'dyij', # 0x0e 'dyic', # 0x0f 'dyik', # ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from django.http import HttpResponse from ucenter.services import loginRequiredAJAX from utils.common import codeCheck from account.services import moneyCheck from rctrl import disk as rd from rctrl import instance as ri from rctrl import diskSnapshot as rds from rctrl import image as rim fro...
unknown
codeparrot/codeparrot-clean
//===--- Record.cpp - Record compiler events ------------------------------===// // // 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/include-cleaner/lib/Record.cpp
#!/usr/bin/env python """ Emit docs in a form acceptable to the old Ardupilot wordpress docs site """ from param import known_param_fields, known_units from emit import Emit try: from cgi import escape as cescape except Exception: from html import escape as cescape class HtmlEmit(Emit): def __init__(self...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright (c) 2014 Adafruit Industries # Author: Tony DiCola # 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
#ifndef Py_INTERNAL_LONG_H #define Py_INTERNAL_LONG_H #ifdef __cplusplus extern "C" { #endif #ifndef Py_BUILD_CORE # error "this header requires Py_BUILD_CORE define" #endif #include "pycore_bytesobject.h" // _PyBytesWriter #include "pycore_runtime.h" // _Py_SINGLETON() /* * Default int base conversion siz...
c
github
https://github.com/python/cpython
Include/internal/pycore_long.h
/// Must match the layout of `LLVMRustCounterKind`. #[derive(Copy, Clone, Debug)] #[repr(C)] pub(crate) enum CounterKind { Zero = 0, CounterValueReference = 1, Expression = 2, } /// A reference to an instance of an abstract "counter" that will yield a value in a coverage /// report. Note that `id` has diff...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_codegen_llvm/src/coverageinfo/ffi.rs
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems 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.o...
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/context/annotation/ConfigurationClassUtils.java
# # Copyright (C) 2005-2013 Team XBMC # http://xbmc.org # # 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, or (at your option) # any later version. # # This Progr...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.db.models.fields.files import ImageFieldFile from django.forms import CharField from django.contrib.auth.models import User from django.test.testcases import TestCase from tests.models import UserProfile, ModelWithImage from moderation.forms import BaseModeratedObjec...
unknown
codeparrot/codeparrot-clean
# 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 # di...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true module ActionView # == TODO # # * Support streaming from child templates, partials and so on. # * Rack::Cache needs to support streaming bodies class StreamingTemplateRenderer < TemplateRenderer # :nodoc: # A valid Rack::Body (i.e. it responds to each). # It is initializ...
ruby
github
https://github.com/rails/rails
actionview/lib/action_view/renderer/streaming_template_renderer.rb
# SPDX-License-Identifier: GPL-2.0 %YAML 1.2 --- $id: http://devicetree.org/schemas/dma/allwinner,sun6i-a31-dma.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Allwinner A31 DMA Controller maintainers: - Chen-Yu Tsai <wens@csie.org> - Maxime Ripard <mripard@kernel.org> allOf: - $ref: dma-co...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/dma/allwinner,sun6i-a31-dma.yaml
''' @author: Quarkonics ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_state as test_state import zstackwoodpecker.operations.net_operations as net_ops import os import tempfile test_stub = test_lib.lib_get_test_stub() test_obj_dict = test_...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2013-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from sqlalchemy.schema import ColumnCollectionConstraint from sqlalchemy.sql import expression class Exc...
unknown
codeparrot/codeparrot-clean
"""An FTP client class and some helper functions. Based on RFC 959: File Transfer Protocol (FTP), by J. Postel and J. Reynolds Example: >>> from ftplib import FTP >>> ftp = FTP('ftp.python.org') # connect to host, default port >>> ftp.login() # default, i.e.: user anonymous, passwd anonymous@ '230 Guest login ok, ac...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/mfd/iqs62x.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Azoteq IQS620A/621/622/624/625 Multi-Function Sensors maintainers: - Jeff LaBundy <jeff@labundy.com> description: | The Azoteq IQS62...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/mfd/iqs62x.yaml
#include <c10/util/Semaphore.h> #include <c10/util/irange.h> #include <gtest/gtest.h> #include <thread> using namespace ::testing; TEST(SemaphoreTest, TestConcurrency) { auto num_threads = std::thread::hardware_concurrency(); auto num_incr = 10000; c10::Semaphore sem; std::vector<std::thread> threads; fo...
cpp
github
https://github.com/pytorch/pytorch
c10/test/util/Semaphore_test.cpp
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # 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 #...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package audit import "errors" var ( // ErrInternal should be used to represent an unexpected error that occurred // within the audit system. ErrInternal = errors.New("audit system internal error") // ErrInvalidParameter should be used to rep...
go
github
https://github.com/hashicorp/vault
audit/errors.go
/* * Copyright (C) 2015 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-testlib/test/com/google/common/testing/AndroidIncompatible.java
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package computed import ( "github.com/mitchellh/colorstring" "github.com/hashicorp/terraform/internal/plans" ) // Diff captures the computed diff for a single block, element or attribute. // // It essentially merges common functionality across ...
go
github
https://github.com/hashicorp/terraform
internal/command/jsonformat/computed/diff.go
# 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
#!/usr/bin/env python __author__ = "InfinityLabs" __authors__ = ["Infinity"] __copyright__ = "Copyright 2013, InfinityLabs" __copyright__ = "Copyright 2012, ClouDev" __credits__ = ["infinity","thenoodle", "_frozen", "rmmh"] __license__ = "GPL v3" __version__ = "DEV" __maintainer__ = "InfinityLabs" __email__ = "root@in...
unknown
codeparrot/codeparrot-clean
# Copyright 2011,2012 James McCauley # # This file is part of POX. # # POX 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. # # POX is d...
unknown
codeparrot/codeparrot-clean
import io import textwrap import pytest from scripts import validate_docstrings # fmt: off class BadDocstrings: """Everything here has a bad docstring""" def private_classes(self) -> None: """ This mentions NDFrame, which is not correct. """ def prefix_pandas(self) -> None: ...
python
github
https://github.com/pandas-dev/pandas
scripts/tests/test_validate_docstrings.py
#!/usr/bin/env bash set -o pipefail -eux declare -a args IFS='/:' read -ra args <<< "$1" python="${args[1]}" if [ "${#args[@]}" -gt 2 ]; then target="shippable/generic/group${args[2]}/" else target="shippable/generic/" fi stage="${S:-prod}" # shellcheck disable=SC2086 ansible-test integration --color -v -...
unknown
github
https://github.com/ansible/ansible
.azure-pipelines/commands/generic.sh
# Author: Daniel Ortiz Mart\'inez # *- python -* # import modules import io, sys, getopt import thot_smt_preproc as smtpr ################################################## def print_help(): print >> sys.stderr, "thot_train_detok_model -r <string> [-t <string>] [-n <int>]" print >> sys.stderr, " ...
unknown
codeparrot/codeparrot-clean
import lasagne.layers as L import lasagne.nonlinearities as NL import lasagne.init import numpy as np import theano.tensor as TT from rllab.core.lasagne_layers import ParamLayer from rllab.core.lasagne_powered import LasagnePowered from rllab.core.network import GRUNetwork from rllab.core.serializable import Serializa...
unknown
codeparrot/codeparrot-clean
framework: esi: enabled: false
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/esi_disabled.yml
# coding: utf-8 from __future__ import unicode_literals import re import pytest from ..default import get_default_filter words_filter = get_default_filter() def test_is_word_good(): cases = [ 'хлебало', 'хлебала', 'скипидар', 'колебания', 'колебание', 'колебаний', 'заколебал', 'заколеба...
unknown
codeparrot/codeparrot-clean
/* * 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/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyNameAliases.java
// 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
server/proxy/grpcproxy/kv.go
/* 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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/mlir/tensorflow/transforms/graph_optimization_pass.h
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/connector/pcie-m2-m-connector.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: PCIe M.2 Mechanical Key M Connector maintainers: - Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.co...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/connector/pcie-m2-m-connector.yaml
#!/usr/bin/env python import RPi.GPIO as GPIO # Import SPI library (for hardware SPI) and MCP3008 library. import Adafruit_GPIO.SPI as SPI import Adafruit_MCP3008 # Hardware SPI configuration: SPI_PORT = 0 SPI_DEVICE = 0 CS = [18,26,22] mcp = Adafruit_MCP3008.MCP3008(spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE)) lower_bou...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # Copyright (C) 2022 Renesas Electronics Corp. %YAML 1.2 --- $id: http://devicetree.org/schemas/media/renesas,rzg2l-csi2.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Renesas RZ/G2L (and alike SoC's) MIPI CSI-2 receiver maintainers: - Lad Pr...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/media/renesas,rzg2l-csi2.yaml
# Copyright 2012 Google 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 OpenStack 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 agr...
unknown
codeparrot/codeparrot-clean
"""Graphical example illustrating improvement of convergence of KMeans when cluster centers are initialized by KMeans++ algorithm. In this example, 4 vertices of a rectangle are chosen: (0,0) (0,100) (10,0) (10,100). There are 500 points normally distributed about each vertex. Therefore, the ideal cluster centers for ...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\View\Compilers\Concerns; trait CompilesComments { /** * Compile Blade comments into an empty string. * * @param string $value * @return string */ protected function compileComments($value) { $pattern = sprintf('/%s--(.*?)--%s/s', $this->content...
php
github
https://github.com/laravel/framework
src/Illuminate/View/Compilers/Concerns/CompilesComments.php
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2014 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """PEP 376 implementation.""" from __future__ import unicode_literals import base64 import codecs import contextlib import hashlib import logging import os import posixpath import sys import z...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) Roman Arutyunyan * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h> #define ngx_http_v3_is_v2_frame(type) \ ((type) == 0x02 || (type) == 0x06 || (type) == 0x08 || (type) == 0x09) static void ngx_http_v3_...
c
github
https://github.com/nginx/nginx
src/http/v3/ngx_http_v3_parse.c
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, Chris Hoffman <choffman@chathamfinancial.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterface'], ...
unknown
codeparrot/codeparrot-clean