code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#!/usr/bin/env python ############################################################################ # Joshua R. Boverhof # See LBNLCopyright for copyright notice! ########################################################################### import sys, unittest from ServiceTest import main, ServiceTestCase, ServiceTestSu...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2014 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies 'AR' in make_global_settings. """ import os import sys import TestGyp def resolve_path(test, path): if path is None: re...
unknown
codeparrot/codeparrot-clean
name: "CodeQL" on: pull_request: schedule: # run weekly new vulnerability was added to the database - cron: '0 0 * * 0' jobs: analyze: name: Analyze runs-on: ubuntu-latest if: github.event_name != 'schedule' || github.repository == 'redis/redis' strategy: fail-fast: false ma...
unknown
github
https://github.com/redis/redis
.github/workflows/codeql-analysis.yml
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import json import pytest from django impo...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package dag import ( "strings" "testing" ) func TestGraphDot_empty(t *testing.T) { var g Graph g.Add(1) g.Add(2) g.Add(3) actual := strings.TrimSpace(string(g.Dot(nil))) expected := strings.TrimSpace(testGraphDotEmptyStr) if actual != ex...
go
github
https://github.com/hashicorp/terraform
internal/dag/marshal_test.go
########################################################################## # # Processor specific code # CPU = "8051" # Description = "Intel 8051 8-bit microprocessor." # DataWidth = 8 # 8-bit data # AddressWidth = 16 # 16-bit addresses # Maximum length of an instruction (for formatting purposes) maxLength = 3 # L...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
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...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/migrations/versions/0033_3_0_0_add_tables_for_backfill.py
# -*- encoding: utf-8 -*- """ Django settings for dp project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.j...
unknown
codeparrot/codeparrot-clean
"""Implement the rules of each Scala build utility type.""" import os import java_common as jc import shared_utils as su class Error(Exception): """Error class for this module.""" def get_scala_compile_command(rule_details, compile_libs, dir_path, file_list, warn_as_error): """Get s...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Python 3.x incompatible, use import builtins instead import __builtin__ as builtins import json import unittest import mock import pytest from django.core.exceptions import ValidationError from nose.tools import * # noqa: F403 (PEP8 asserts) from framework.auth import Auth from osf_tests.fa...
unknown
codeparrot/codeparrot-clean
# (C) Copyright 2017, 2019-2021 by Rocky Bernstein # # 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 progr...
unknown
codeparrot/codeparrot-clean
#include "perf_precomp.hpp" namespace opencv_test { using namespace perf; CV_ENUM(pnpAlgo, SOLVEPNP_ITERATIVE, SOLVEPNP_EPNP, SOLVEPNP_P3P, SOLVEPNP_DLS, SOLVEPNP_UPNP) typedef tuple<int, pnpAlgo> PointsNum_Algo_t; typedef perf::TestBaseWithParam<PointsNum_Algo_t> PointsNum_Algo; typedef perf::TestBaseWithParam<int...
cpp
github
https://github.com/opencv/opencv
modules/calib3d/perf/perf_pnp.cpp
// Copyright 2009 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 io_test import ( "bytes" "fmt" . "io" "slices" "strings" "testing" "time" ) func checkWrite(t *testing.T, w Writer, data []byte, c chan int) { ...
go
github
https://github.com/golang/go
src/io/pipe_test.go
# Copyright (c) 2022 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION: module: in_function short_description: Short description for in_function module description: - Description for in_function module options: test: descripti...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/ps_only/plugins/modules/in_function.yml
# BER encoder from pyasn1.type import base, tag, univ, char, useful from pyasn1.codec.ber import eoo from pyasn1.compat.octets import int2oct, oct2int, ints2octs, null, str2octs from pyasn1 import debug, error class Error(Exception): pass class AbstractItemEncoder: supportIndefLenMode = 1 def encodeTag(self, ...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.chat_models.mlflow_ai_gateway import ( ChatMLflowAIGateway, ChatParams, ) # Create a way to dynamically look up deprecated imports. # Used to consolidate logic f...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/chat_models/mlflow_ai_gateway.py
# -*- coding: utf-8 -*- # (c) 2020 Matt Martz <matt@sivel.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type from units.compat.mock import MagicMock import pytest from ansible.module_...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2017 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.creation; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.lang.reflect.Method; import org.junit.Before; import org.ju...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockito/internal/creation/DelegatingMethodTest.java
#!/bin/env python """ A simple example for the usage of Person.send() - random movement - output to visual player, which is executed as child process - you may try the other commented monitor examples - you can choose a single or multiple monitors - print a message send to another person """ import sy...
unknown
codeparrot/codeparrot-clean
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function INCLUDES = """ #include <openssl/crypto.h> """ TYPES = """ typedef ... C...
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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/src/pages/Dashboard/HistoricalMetrics/TaskInstanceMetrics.tsx
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. #ifndef CALIB_COMMON_HPP #define CALIB_COMMON_HPP #include <opencv2/core.hpp> #include <memory> #include <vector> #include ...
unknown
github
https://github.com/opencv/opencv
apps/interactive-calibration/calibCommon.hpp
#!/usr/bin/env python # -*- coding: utf-8 -*- import re import codecs from setuptools import setup, find_packages version = '' with open('pigar/version.py', 'r') as f: version = re.search( r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.M ).group(1) if not version: raise RuntimeError('Can...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ 2. Adding __str__() or __unicode__() to models Although it's not a strict requirement, each model should have a ``_str__()`` or ``__unicode__()`` method to return a "human-readable" representation of the object. Do this not only for your own sanity when dealing with the interactive prompt, ...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python """ This script will test highgui's window functionality """ # name of this test and it's requirements TESTNAME = "cvShowImage" REQUIRED = ["cvLoadImagejpg", "cvNamedWindow"] # needed for sys.exit(int) and .works file handling import os import sys import works # path to imagefiles we need PREF...
unknown
codeparrot/codeparrot-clean
name: Label Flaky Test Issues on: issues: types: [labeled] permissions: contents: read jobs: label: if: github.event.label.name == 'flaky-test' runs-on: ubuntu-slim permissions: issues: write steps: - name: Extract labels id: extract-labels env: BODY: $...
unknown
github
https://github.com/nodejs/node
.github/workflows/label-flaky-test-issue.yml
# Copyright 2016, Openstack Foundation (http://www.openstack.org/) # # 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 ap...
unknown
codeparrot/codeparrot-clean
from django.http import FileResponse, HttpResponse from django.urls import path def helloworld(request): return HttpResponse("Hello World!") def cookie(request): response = HttpResponse("Hello World!") response.set_cookie("key", "value") return response urlpatterns = [ path("", helloworld), p...
python
github
https://github.com/django/django
tests/wsgi/urls.py
# -*- coding: utf-8 -*- # # 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 ...
unknown
codeparrot/codeparrot-clean
# # test_codecmaps_jp.py # Codec mapping tests for Japanese encodings # from test import support from test import multibytecodec_support import unittest class TestCP932Map(multibytecodec_support.TestBase_Mapping, unittest.TestCase): encoding = 'cp932' mapfileurl = 'http://www.unicode.org/...
unknown
codeparrot/codeparrot-clean
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. **Example** ```esql ROW str1 = "5.20128E11", str2 = "foo" | EVAL dbl = TO_DOUBLE("520128000000"), dbl1 = TO_DOUBLE(str1), dbl2 = TO_DOUBLE(str2) ``` | str1:keyword | str2:keyword | dbl:double | dbl1:dou...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/functions/examples/to_double.md
""" support methods for python clients """ import json import collections from datetime import datetime from uuid import UUID from enum import Enum from dateutil import parser # python2/3 compatible basestring, for use in to_dict try: basestring except NameError: basestring = str def timestamp_from_datetime(...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # This is a 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. # # This Ansible library is distributed in the hope that i...
unknown
codeparrot/codeparrot-clean
//===--- ASTContext.cpp - ASTContext Implementation -----------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
cpp
github
https://github.com/apple/swift
lib/AST/ASTContext.cpp
# /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * 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) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boos...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/preprocessor.hpp
apiVersion: v1 kind: Service metadata: name: prune-svc labels: prune-group: "true" spec: selector: prune-group-nomatch: "true" ports: - port: 80 protocol: TCP
unknown
github
https://github.com/kubernetes/kubernetes
hack/testdata/prune/svc.yaml
# Copyright (C) 2013 Project Hatohol # # This file is part of Hatohol. # # Hatohol is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License, version 3 # as published by the Free Software Foundation. # # Hatohol is distributed in the hope that it will be usefu...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 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....
unknown
codeparrot/codeparrot-clean
#from flam import * from aspects import * from features import * from elixir import * class Page(Entity): name = Field(Unicode(128), primary_key=True) text = Field(Text, required=True) author = ManyToOne('Author', required=True) attachments = OneToMany('Attachment') class Attachment(Entity): filen...
unknown
codeparrot/codeparrot-clean
"""Common utilities for Numba operations""" from __future__ import annotations import inspect import types from typing import TYPE_CHECKING import numpy as np from pandas.compat._optional import import_optional_dependency from pandas.errors import NumbaUtilError if TYPE_CHECKING: from collections.abc import Ca...
python
github
https://github.com/pandas-dev/pandas
pandas/core/util/numba_.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
unknown
codeparrot/codeparrot-clean
import numpy as np import tables as ts import playground.group_rotation.amino_acids as amino import pele.amber.read_amber as ra import playground.group_rotation.chirality as chir import networkx as nx class RotamerGroupTemplate(ts.IsDescription): """ A compound data type for interoperating with ROTAMER_GROUP_T...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Tests\Database; use Illuminate\Database\Capsule\Manager as DB; use Illuminate\Database\Eloquent\Model as Eloquent; use Illuminate\Support\Carbon; use PHPUnit\Framework\TestCase; use RuntimeException; class DatabaseEloquentTimestampsTest extends TestCase { protected function setUp(): vo...
php
github
https://github.com/laravel/framework
tests/Database/DatabaseEloquentTimestampsTest.php
from __future__ import annotations from collections import ( abc, defaultdict, ) import csv from io import StringIO import re from typing import ( IO, TYPE_CHECKING, Any, DefaultDict, Literal, cast, final, ) import warnings import numpy as np from pandas._libs import lib from pand...
python
github
https://github.com/pandas-dev/pandas
pandas/io/parsers/python_parser.py
"""distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to PyPI).""" import os import socket import platform from urllib2 import urlopen, Request, HTTPError from base64 import standard_b64encode import urlparse import cStringIO as StringIO from hashlib import md5 from distutils.errors...
unknown
codeparrot/codeparrot-clean
from gen import * ########## # shared # ########## flow_var[0] = """ (declare-fun tau () Real) """ flow_dec[0] = """ (define-ode flow_1 ((= d/dt[tau] 1))) """ state_dec[0] = """ (declare-fun time_{0} () Real) (declare-fun tau_{0}_0 () Real) (declare-fun tau_{0}_t () Real) """ state_val[0] = """ (assert (<= 0 time_...
unknown
codeparrot/codeparrot-clean
### README first This section of the documentation contains a guide for Moby project users who want to contribute code or documentation to the Moby Engine project. As a community, we share rules of behavior and interaction. Make sure you are familiar with the <a href="https://github.com/moby/moby/blob/master/CONTRIBUT...
unknown
github
https://github.com/moby/moby
docs/contributing/who-written-for.md
from __future__ import division, absolute_import, print_function import os from numpy.testing import run_module_suite, assert_equal, dec import util def _path(*a): return os.path.join(*((os.path.dirname(__file__),) + a)) class TestSizeSumExample(util.F2PyTest): sources = [_path('src', 'size', 'foo.f90')] ...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 Dean Gardiner <gardiner91@gmail.com> # # 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...
unknown
codeparrot/codeparrot-clean
from androguard.core.analysis import analysis from datetime import datetime from blessings import Terminal t = Terminal() class InsecureStorageEnum(object): values = [ "getExternalFilesDir", "getSharedPreferences", "openFileOutput" "openFileInput" ] class InsecureStorage(obje...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * encnames.c * Encoding names and routines for working with them. * * Portions Copyright (c) 2001-2026, PostgreSQL Global Development Group * * IDENTIFICATION * src/common/encnames.c * *------------------------------------------...
c
github
https://github.com/postgres/postgres
src/common/encnames.c
/* * Written by Doug Lea with assistance from members of JCP JSR-166 * Expert Group and released to the public domain, as explained at * http://creativecommons.org/publicdomain/zero/1.0/ */ /* * Source: * http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/jsr166e/Striped64.java?revision=1.9 */ package com...
java
github
https://github.com/google/guava
android/guava/src/com/google/common/cache/Striped64.java
import numpy def vl_xyz2lab(I,il='E'): # VL_XYZ2LAB Convert XYZ color space to LAB # J = VL_XYZ2LAB(I) converts the image from XYZ format to LAB format. # # VL_XYZ2LAB(I,IL) uses one of the illuminants A, B, C, E, D50, D55, # D65, D75, D93. The default illuminant is E. # # See also:: VL_XYZ2LUV(), VL_HELP(). ...
unknown
codeparrot/codeparrot-clean
import re from django import forms from django.db.models import get_model, Q from django.utils.translation import ugettext_lazy as _ Product = get_model('catalogue', 'Product') Range = get_model('offer', 'Range') class RangeForm(forms.ModelForm): class Meta: model = Range exclude = ('included_pr...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 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 main import ( "fmt" "strings" ) // exprParser is a //go:build expression parser and evaluator. // The parser is a trivial precedence-based parser wh...
go
github
https://github.com/golang/go
src/cmd/dist/buildtag.go
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies two actions can be attached to the same input files. """ import sys import TestGyp test = TestGyp.TestGyp() test.run_gyp('a...
unknown
codeparrot/codeparrot-clean
import os import re from setuptools import setup def rel(*parts): '''returns the relative path to a file wrt to the current directory''' return os.path.abspath(os.path.join(os.path.dirname(__file__), *parts)) README = open('README.md', 'r').read() with open(rel('webpack_loader', '__init__.py')) as handler: ...
unknown
codeparrot/codeparrot-clean
--- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html - https://www.elastic.co/guide/en/serverless/current/elasticsearch-differences.html applies_to: stack: ga serverless: ga --- # REST APIs Elasticsearch exposes REST APIs that are used by the UI components and can...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch/rest-apis/index.md
# Copyright (c), Michael DeHaan <michael.dehaan@gmail.com>, 2012-2013 # Copyright (c), Toshio Kuratomi <tkuratomi@ansible.com> 2016 # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function FILE_ATTRIBUTE...
unknown
codeparrot/codeparrot-clean
# Copyright 2010-2015 RethinkDB, all rights reserved. import errno import json import numbers import socket import struct import time import ssl try: from importlib import import_module except ImportError: def import_module(name, package=None): # song & dance needed to do relative import in 2.6, which ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Kuulemma # Copyright (C) 2014, Fast Monkeys Oy # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later...
unknown
codeparrot/codeparrot-clean
############################################################################# ## ## ## This file is part of Owade : www.owade.org ## ## Offline Windows Analyzer and Data Extractor ## ## ...
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...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/models/hitl_history.py
# Copyright (c) 2010-2012 OpenStack Foundation # # 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
from numpy._core import _umath_tests from numpy._core._multiarray_umath import ( __cpu_baseline__, __cpu_dispatch__, __cpu_features__, ) from numpy.testing import assert_equal def test_dispatcher(): """ Testing the utilities of the CPU dispatcher """ targets = ( "X86_V2", "X86_V3", ...
python
github
https://github.com/numpy/numpy
numpy/_core/tests/test_cpu_dispatcher.py
/*------------------------------------------------------------------------- * * compression.c * * Shared code for compression methods and specifications. * * A compression specification specifies the parameters that should be used * when performing compression with a specific algorithm. The simplest * possible ...
c
github
https://github.com/postgres/postgres
src/common/compression.c
/*! * 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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/src/components/ui/Pagination/index.ts
""" .. module:: dj-stripe.tests.test_contrib.test_views :synopsis: dj-stripe Rest views for Subscription Tests. .. moduleauthor:: Philippe Luickx (@philippeluickx) """ from __future__ import unicode_literals from decimal import Decimal from django.utils import timezone from django.conf import settings from dja...
unknown
codeparrot/codeparrot-clean
""" Tests the interface.renew_vessels and interface.renew_all_vessels calls. """ #pragma out #pragma error OK # The clearinghouse testlib must be imported first. from clearinghouse.tests import testlib from clearinghouse.tests import mocklib from clearinghouse.common.api import maindb from clearinghouse.common.exce...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2007 Adriano Monteiro Marques # # Authors: Tianwei Liu <liutianweidlut@gmail.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 Foundation; either version 2 of the License, or # (at your...
unknown
codeparrot/codeparrot-clean
twig: cache: false
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/no-cache.yml
/* Copyright 2024 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
cmd/kube-proxy/app/options.go
from __future__ import absolute_import from .packages.six.moves.http_client import ( IncompleteRead as httplib_IncompleteRead ) # Base Exceptions class HTTPError(Exception): "Base exception used by this module." pass class HTTPWarning(Warning): "Base warning used by this module." pass class PoolE...
unknown
codeparrot/codeparrot-clean
import { A, B, C } from "./inner"; function x(type) { switch (type) { case "a": return withA("b"); case "b": return withB("c"); case "c": return "ok"; } } function y(v) { return withA(v); } function withA(v) { const value = x(v); return A(value); } function withB(v) { const value = x(v); ret...
javascript
github
https://github.com/webpack/webpack
test/cases/inner-graph/circular/module.js
//@flow const foo = undefined; component C(...{scope = foo ?? null}: any) { return scope; } export const FIXTURE_ENTRYPOINT = { fn: C, params: [{scope: undefined}], };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/logical-reorder.flow.js
<table border="1" class="dataframe"> <thead> <tr> <th></th> <th></th> <th></th> <th colspan="2" halign="left">a</th> <th>...</th> <th colspan="2" halign="left">b</th> </tr> <tr> <th></th> <th></th> <th></th> <th colspan="2" halign="left">c</th> ...
html
github
https://github.com/pandas-dev/pandas
pandas/tests/io/formats/data/html/trunc_df_index_named_multi_columns_unnamed_multi.html
// #docplaster import {Component, signal} from '@angular/core'; @Component({ selector: 'app-leave-binding', templateUrl: 'leave-binding.html', styleUrls: ['leave-binding.css'], }) export class LeaveBinding { isShown = signal(false); toggle() { this.isShown.update((isShown) => !isShown); } farewell ...
typescript
github
https://github.com/angular/angular
adev/src/content/examples/animations/src/app/enter-and-leave/leave-binding.ts
// Copyright 2021 The Abseil 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 by applicable law or agree...
c
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/absl/strings/cordz_test_helpers.h
/* * 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 n...
java
github
https://github.com/apache/kafka
clients/src/test/java/org/apache/kafka/common/network/NetworkReceiveTest.java
# Copyright (C) 2011 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 list of conditions and the ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2010 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 list of conditions and the ...
unknown
codeparrot/codeparrot-clean
"""Test the Cloudflare config flow.""" from pycfdns.exceptions import ( CloudflareAuthenticationException, CloudflareConnectionException, CloudflareZoneException, ) from homeassistant.components.cloudflare.const import CONF_RECORDS, DOMAIN from homeassistant.config_entries import SOURCE_USER from homeassis...
unknown
codeparrot/codeparrot-clean
// // Copyright 2018 Stefan Seefeld // Copyright 2005-2007 Adobe Systems Incorporated // // 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_GIL_HPP #define BOOST_GIL_HPP #include <boost/gil/algorithm....
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/gil.hpp
/* * Copyright (c) 2017 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitoutil; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.Assert.fail; import static...
java
github
https://github.com/mockito/mockito
mockito-core/src/testFixtures/java/org/mockitoutil/ClassLoadersTest.java
//===--- InputFile.h --------------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
c
github
https://github.com/apple/swift
include/swift/Frontend/InputFile.h
""" IPython extension: %lookfor command for searching docstrings """ # Pauli Virtanen <pav@iki.fi>, 2008. import re, inspect, pkgutil, pydoc #------------------------------------------------------------------------------ # Lookfor functionality #-----------------------------------------------------------------------...
unknown
codeparrot/codeparrot-clean
##Copyright 2009-2015 Thomas Paviot (tpaviot@gmail.com) ## ##This file is part of pythonOCC. ## ##pythonOCC 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 3 of the License, or ##(at your...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // 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/clang-tidy/readability/NamespaceCommentCheck.cpp
#!/usr/bin/python """ CodeHilite Extension for Python-Markdown ======================================== Adds code/syntax highlighting to standard Python-Markdown code blocks. Copyright 2006-2008 [Waylan Limberg](http://achinghead.com/). Project website: <http://packages.python.org/Markdown/extensions/code_hilite.ht...
unknown
codeparrot/codeparrot-clean
import smtplib import time from pell.assistant.text_to_speech import talk, listen import sys import os class EmailAction: def __init__(self, command, subject=None, message=None, receiver=None): self.command = command self.subject = subject self.message = message self.receiver = rec...
unknown
codeparrot/codeparrot-clean
package main import ( "io" "log" "net" "sync" "github.com/ishidawataru/sctp" ) // SCTPProxy is a proxy for SCTP connections. It implements the Proxy interface to // handle SCTP traffic forwarding between the frontend and backend addresses. type SCTPProxy struct { listener *sctp.SCTPListener frontendAddr *...
go
github
https://github.com/moby/moby
cmd/docker-proxy/sctp_proxy_linux.go
# -*- coding: utf-8 -*- import os import sys import unittest2 import stripe from mock import patch from stripe.test.helper import (StripeTestCase, NOW, DUMMY_CHARGE, DUMMY_CARD) class FunctionalTests(StripeTestCase): request_client = stripe.http_client.Urllib2Client def setUp(self): super(FunctionalT...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 --- $id: http://devicetree.org/schemas/arm/qcom,coresight-remote-etm.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm Coresight Remote ETM(Embedded Trace Macrocell) maintainers: - Jinlong Mao <quic_jinlmao@quicinc.com> -...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/arm/qcom,coresight-remote-etm.yaml
import os, time, random, getpass from os.path import abspath, dirname, isfile from fabric.api import * from fabric.contrib.files import append, exists from fabtools import require import fabtools SITE_ROOT = dirname(abspath(__file__)) from _set_local_env_vars import import_env_vars import_env_vars(SITE_ROOT) PRJ_EN...
unknown
codeparrot/codeparrot-clean
#from .util import util from .. import subpackage
python
github
https://github.com/python/cpython
Lib/test/test_import/data/circular_imports/subpkg/subpackage2.py
import json import os import sys import urllib2 URL = 'https://tldr-bot.starbeamrainbowlabs.com/' def post_comment(pr_id, comment_body): # Constructing the url req = urllib2.Request(URL, json.dumps({'body': comment_body, 'pr_id': pr_id }), {'Content-Type': 'applicatio...
unknown
codeparrot/codeparrot-clean
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import collections import itertools import re from ._structures import In...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ Test one data file """ from numpy import * import sys import kernel import distance import classifier import clustering import distribution import regression import preprocessor from modshogun import Math_init_random SUPPORTED=['kernel', 'distance', 'classifier', 'clustering', 'distribution...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2015 Tom Barron. 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 ob...
unknown
codeparrot/codeparrot-clean