code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package e2etest import ( "os" "path/filepath" "strings" "testing" "github.com/hashicorp/terraform/internal/e2e" "github.com/hashicorp/terraform/internal/getproviders" ) // TestProviderProtocols verifies that Terraform can execute provider p...
go
github
https://github.com/hashicorp/terraform
internal/command/e2etest/provider_plugin_test.go
# -*- coding: utf-8 -*- # Copyright 2016 LasLabs Inc. # License GPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from odoo.tests.common import TransactionCase class TestCrmLead(TransactionCase): def setUp(self): super(TestCrmLead, self).setUp() self.crm_lead_1 = self.env.ref( ...
unknown
codeparrot/codeparrot-clean
/* Generated from russian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */ #include "stem_UTF_8_russian.h" #include <stddef.h> #include "snowball_runtime.h" struct SN_local { struct SN_env z; int i_p2; int i_pV; }; typedef struct SN_local SN_local; #ifdef __cplusplus extern "C" { #endif extern int...
c
github
https://github.com/postgres/postgres
src/backend/snowball/libstemmer/stem_UTF_8_russian.c
"""Support for Habitica sensors.""" from datetime import timedelta import logging from homeassistant.components import habitica from homeassistant.helpers.entity import Entity from homeassistant.util import Throttle _LOGGER = logging.getLogger(__name__) MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=15) async def asy...
unknown
codeparrot/codeparrot-clean
--- navigation_title: "Update By Query API" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update.html#update-api-example applies_to: stack: all --- # Update by query API examples The [Update by query API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-upd...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch/rest-apis/update-by-query-api.md
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v1beta1", "metadata": { "name": "v0alpha1.status-history-thresholds-mappings.v42" }, "spec": { "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/panel-status-history/v0alpha1.status-history-thresholds-mappings.v42.v1beta1.json
""" Test Display Options """ __RCSID__ = "$Id$" import unittest import thread from DIRAC.FrameworkSystem.private.standardLogging.test.TestLoggingBase import Test_Logging, gLogger, cleaningLog class Test_DisplayOptions(Test_Logging): """ Test the creation of subloggers and their properties """ def setUp(sel...
unknown
codeparrot/codeparrot-clean
import binascii import struct from django.forms import ValidationError from .const import ( GDAL_TO_POSTGIS, GDAL_TO_STRUCT, POSTGIS_HEADER_STRUCTURE, POSTGIS_TO_GDAL, STRUCT_SIZE, ) def pack(structure, data): """ Pack data into hex string with little endian format. """ return binascii.hexlif...
unknown
codeparrot/codeparrot-clean
// Copyright 2019 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 agr...
c
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/absl/strings/internal/cordz_info.h
import openturns as ot from math import exp from matplotlib import pyplot as plt from openturns.viewer import View # Create the time grid # In the context of the spectral estimate or Fourier transform use, # we use data blocs with size of form 2^p tMin = 0. timeStep = 0.1 size = pow(2, 12) myTimeGrid = ot.RegularGrid(...
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 # ...
unknown
codeparrot/codeparrot-clean
from config.experiment_config_lib import ControllerConfig from sts.topology import StarTopology, BufferedPatchPanel, MeshTopology, GridTopology, BinaryLeafTreeTopology from sts.controller_manager import UserSpaceControllerPatchPanel from sts.control_flow.fuzzer import Fuzzer from sts.control_flow.interactive import Int...
unknown
codeparrot/codeparrot-clean
"""Manage shelves of pickled objects. A "shelf" is a persistent, dictionary-like object. The difference with dbm databases is that the values (not the keys!) in a shelf can be essentially arbitrary Python objects -- anything that the "pickle" module can handle. This includes most class instances, recursive data type...
unknown
codeparrot/codeparrot-clean
# # The Python Imaging Library. # $Id$ # # PIL raster font management # # History: # 1996-08-07 fl created (experimental) # 1997-08-25 fl minor adjustments to handle fonts from pilfont 0.3 # 1999-02-06 fl rewrote most font management stuff in C # 1999-03-17 fl take pth files into account in load_path (from Rich...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # Copyright 2020 BayLibre, SAS %YAML 1.2 --- $id: http://devicetree.org/schemas/media/amlogic,axg-ge2d.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Amlogic GE2D Acceleration Unit maintainers: - Neil Armstrong <neil.armstrong@linaro.org> pr...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/media/amlogic,axg-ge2d.yaml
import pathlib import tomllib import pytest import yaml from scripts.validate_min_versions_in_sync import ( get_toml_map_from, get_yaml_map_from, pin_min_versions_to_yaml_file, ) DATA_PATH = pathlib.Path(__file__).parents[2] / "scripts/tests/data/" @pytest.mark.parametrize( "src_toml, src_yaml, expe...
python
github
https://github.com/pandas-dev/pandas
scripts/tests/test_validate_min_versions_in_sync.py
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2019 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # T...
unknown
codeparrot/codeparrot-clean
{ "name": "eslint-plugin-mongodb", "version": "1.0.0", "private": true, "main": "plugin.js", "type": "module" }
json
github
https://github.com/mongodb/mongo
buildscripts/eslint-plugin-mongodb/package.json
// Copyright David Abrahams 2002. // 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_WORKAROUND_DWA2002126_HPP #define BOOST_WORKAROUND_DWA2002126_HPP #include <boost/config/workaround.hpp> #endif //...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/detail/workaround.hpp
"""Adding in a suspicious crash table Revision ID: 2c03d8ea0a50 Revises: 35604f61bc24 Create Date: 2013-08-09 18:46:42.618063 """ # revision identifiers, used by Alembic. revision = '2c03d8ea0a50' down_revision = '49bf379b5a8' import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql...
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines import kotlinx.atomicfu.* import kotlin.coroutines.* import kotlin.test.* class MultithreadedDispatcherStressTest { private val shared = atomic(0) /** * Tests that [newFixedThreadPoolContext] will not drop tasks when closed. */ @Test fun testClosingNotDroppingTask...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/concurrent/test/MultithreadedDispatcherStressTest.kt
import os import six import logging from collections import defaultdict from scrapy.exceptions import NotConfigured from scrapy.http import Response from scrapy.http.cookies import CookieJar from scrapy.utils.python import to_native_str logger = logging.getLogger(__name__) class CookiesMiddleware(object): """Thi...
unknown
codeparrot/codeparrot-clean
from datetime import datetime import itertools import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy as np from scipy.optimize import leastsq, fsolve import time import random import labrad from labrad.units import Unit ns, us, GHz, MHz = [Unit(s) for s in ('ns', 'us', 'GHz', 'MHz')] f...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2011-2020 ycmd contributors # # This file is part of ycmd. # # ycmd 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. # #...
unknown
codeparrot/codeparrot-clean
<?php /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Autoload; /** * ClassLoader im...
php
github
https://github.com/composer/composer
tests/Composer/Test/Fixtures/functional/installed-versions2/vendor/composer/ClassLoader.php
#!/usr/bin/python # # Problem: Spinning Blade # Language: Python # Author: KirarinSnow # Usage: pypy thisfile.py <input.in >output.out # Comments: Runs in 7 minutes using pypy for the large input. mb = [] for i in range(500): mb.append([]) for j in range(500): mb[i].append(None) s = [] for i in range(5...
unknown
codeparrot/codeparrot-clean
# Copyright 2013-present Barefoot Networks, 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 agr...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 OpenStack, LLC. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
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/support/MessageSourceAccessor.java
from Tkinter import * from idlelib import SearchEngine from idlelib.SearchDialogBase import SearchDialogBase def replace(text): root = text._root() engine = SearchEngine.get(root) if not hasattr(engine, "_replacedialog"): engine._replacedialog = ReplaceDialog(root, engine) dialog = engine._rep...
unknown
codeparrot/codeparrot-clean
import { __String, arrayFrom, arrayToMultiMap, Block, BreakOrContinueStatement, CancellationToken, canHaveSymbol, CaseClause, cast, concatenate, ConstructorDeclaration, contains, createGetCanonicalFileName, createTextSpanFromBounds, createTextSpanFromNode, ...
typescript
github
https://github.com/microsoft/TypeScript
src/services/documentHighlights.ts
import pygame from pygame.locals import * class Block(object): # Static params height = 60 font = pygame.font.Font(None, 42) # Object params size = None pos_x = None pos_y = None box_text = None color = None text_color = None cleared = False ...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "cgi/escape" warn <<-WARNING, uplevel: Gem::BUNDLED_GEMS.uplevel if $VERBOSE CGI library is removed from Ruby 4.0. Please use cgi/escape instead for CGI.escape and CGI.unescape features. If you need to use the full features of CGI library, please add 'gem "cgi"' to your script or...
ruby
github
https://github.com/ruby/ruby
lib/cgi.rb
/*! * 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/ResizableWrapper.tsx
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import http, _ from odoo.addons.website.models.website import slug from odoo.http import request class WebsiteHrRecruitment(http.Controller): @http.route([ '/jobs', '/jobs/country/<model("r...
unknown
codeparrot/codeparrot-clean
# Copyright 2017 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
# Tests some corner cases with isinstance() and issubclass(). While these # tests use new style classes and properties, they actually do whitebox # testing of error conditions uncovered when using extension types. import unittest import typing from test import support class TestIsInstanceExceptions(unittest.TestCase...
python
github
https://github.com/python/cpython
Lib/test/test_isinstance.py
''' XML parser. One function for each top-level element in the schema. Most functions just declare a new object and add it to the module. For typedefs, eventcopies, xidtypes, and other aliases though, we do not create a new type object, we just record the existing one under a new name. ''' from os.path import join f...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de> # 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_fu...
unknown
codeparrot/codeparrot-clean
//===--- SILStage.swift ---------------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
swift
github
https://github.com/apple/swift
SwiftCompilerSources/Sources/SIL/SILStage.swift
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK """Manage upstream ansible-core releases.""" from __future__ import annotations import argparse import contextlib import dataclasses import datetime import enum import functools import gzip import hashlib import http.client import inspect import json import math import os...
python
github
https://github.com/ansible/ansible
packaging/release.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/InjectionPoint.java
""" Grades related signals. """ from django.dispatch import Signal # Signal that indicates that a user's grade for a course has been updated. # This is a downstream signal of SUBSECTION_SCORE_CHANGED. # Signal that indicates that a user's raw score for a problem has been updated. # This signal is generated when a sco...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 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 ...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function, unicode_literals, absolute_import, division class Tableau(object): def __init__(self): # Map of variable to set of variables self.columns = {} # Map of variable to LinearExpression self.rows = {} # Set of Variables self.infeas...
unknown
codeparrot/codeparrot-clean
// Copyright 2018 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 runtime const ( // vdsoArrayMax is the byte-size of a maximally sized array on this architecture. // See cmd/compile/internal/arm/galign.go arch.MAXW...
go
github
https://github.com/golang/go
src/runtime/vdso_linux_arm.go
# -*- coding: utf-8 -*- """ *************************************************************************** v_what_rast.py --------------------- Date : January 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ************************...
unknown
codeparrot/codeparrot-clean
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
unknown
codeparrot/codeparrot-clean
"""Classes to deal with output of simulation data. Copyright (C) 2013, Joshua More and Michele Ceriotti This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your o...
unknown
codeparrot/codeparrot-clean
# $Id: __init__.py 7621 2013-03-04 13:20:49Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This package contains directive implementation modules. """ __docformat__ = 'reStructuredText' import codecs import re import sys from docutils import ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/reply" require "models/warehouse_thing" require "models/guid" require "models/event" require "models/dashboard" require "models/uuid_item" require "models/author" require "models/person" require "models/essay" require "models/k...
ruby
github
https://github.com/rails/rails
activerecord/test/cases/validations/uniqueness_validation_test.rb
# Copyright (c) 2014 Red Hat, 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
module.exports = 4;
javascript
github
https://github.com/webpack/webpack
test/cases/chunks/context-weak/dir/four.js
/* * 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/main/java/org/apache/kafka/clients/consumer/internals/events/ShareAcknowledgementCommitCallbackRegistrationEvent.java
# -*- coding: utf-8 -*- import xbmcgui, xbmc, xbmcplugin enable_debug = False ####################################### # Xbmc Helpers ####################################### def select(title, menuItems): select = xbmcgui.Dialog().select(title, menuItems) if select == -1: return None else: ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """Menu. Base class for any menu. """ # Import: std import sys # Import: OpenGL from OpenGL.GLUT import * # Import: PyCEGUI import PyCEGUI # Import: User from errors import InitializationError # Menu class Menu(object): # Initialize def initialize(self, name, tit...
unknown
codeparrot/codeparrot-clean
# $Id: __init__.py 7648 2013-04-18 07:36:22Z milde $ # Authors: David Goodger <goodger@python.org>; Ueli Schlaepfer # Copyright: This module has been placed in the public domain. """ This package contains Docutils Reader modules. """ __docformat__ = 'reStructuredText' import sys from docutils import utils, parsers,...
unknown
codeparrot/codeparrot-clean
/* SPDX-License-Identifier: MIT Source: https://github.com/grafana/grafana/blob/main/public/vendor/flot/jquery.flot.time.js */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-useless-concat */ /* eslint-disable default-case */ /* eslint-disable prefer-spread */ /* eslint-disable no-loop-func */ /* eslint-...
javascript
github
https://github.com/prometheus/prometheus
web/ui/react-app/src/vendor/flot/jquery.flot.time.js
name: vllm-test on: push: branches: - main - release/* tags: - ciflow/vllm/* workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_disp...
unknown
github
https://github.com/pytorch/pytorch
.github/workflows/vllm.yml
/* * Copyright (C) 2014 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/src/com/google/common/graph/MutableNetwork.java
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import __all__ = ["test_tutorial"] import numpy as np from .. import kernels from ..gp import GP from ..basic import BasicSolver from ..hodlr import HODLRSolver def test_tutorial(): def model(params, t): _, _, amp, loc, s...
unknown
codeparrot/codeparrot-clean
""" MongoDB/GridFS-level code for the contentstore. """ import os import json import pymongo import gridfs from gridfs.errors import NoFile from fs.osfs import OSFS from bson.son import SON from mongodb_proxy import autoretry_read from opaque_keys.edx.keys import AssetKey from xmodule.contentstore.content import XASSE...
unknown
codeparrot/codeparrot-clean
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: ssl-no-revoke Help: Disable cert revocation checks (Schannel) Added: 7.44.0 Protocols: TLS Category: tls Multi: boolean See-also: - crlfile Example: - --ssl-no-revoke $URL --- # `--ssl-no-revoke` (Schannel) Disable ...
unknown
github
https://github.com/curl/curl
docs/cmdline-opts/ssl-no-revoke.md
#!/bin/sh # # Copyright (c) 2012 Mozilla Foundation # test_description='diff.context configuration' . ./test-lib.sh test_expect_success 'setup' ' cat >template <<-\EOF && firstline b c d e f preline TARGET postline i j k l m n EOF sed "/TARGET/d" >x <template && git update-index --add x && git co...
unknown
github
https://github.com/git/git
t/t4055-diff-context.sh
import { execSync } from "child_process"; import * as fs from "fs"; import * as path from "path"; import { combinePaths, createGetCanonicalFileName, getDirectoryPath, MapLike, normalizePath, normalizeSlashes, sys, toPath, version, } from "../typescript/typescript.js"; import * as ts...
typescript
github
https://github.com/microsoft/TypeScript
src/typingsInstaller/nodeTypingsInstaller.ts
""" /*************************************************************************** Plugin Installer module Plugin version comparison functions ------------------- Date : 2008-11-24 Copyright : (C) 2008 by Borys...
unknown
codeparrot/codeparrot-clean
base_suite: replica_sets_jscore_passthrough_base overrides: - "multiversion.replica_sets_temporarily_disable_due_to_fcv_upgrade" - "multiversion.replica_fixture_last_continuous_new_new_old"
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/matrix_suites/mappings/replica_sets_jscore_passthrough_last_continuous_new_new_old.yml
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v2alpha1", "metadata": { "name": "v34.multiple_stats_cloudwatch.v42" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "datasource": { "type": "grafana", "uid": "-- Gr...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/migrated_dashboards_output/v1beta1-mig-v34.multiple_stats_cloudwatch.v42.v2alpha1.json
"""Common settings and globals.""" from os.path import abspath, basename, dirname, join, normpath from sys import path ########## PATH CONFIGURATION # Absolute filesystem path to the Django project directory: DJANGO_ROOT = dirname(dirname(abspath(__file__))) print "DJANGO_ROOT" + DJANGO_ROOT # Absolute filesystem pa...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import copy from lxml import etree, html from openerp import SUPERUSER_ID, api from openerp.addons.website.models import website from openerp.http import request from openerp.osv import osv, fields class view(osv.osv): _inherit = "ir.ui.view" _columns = { 'page': fields.boolea...
unknown
codeparrot/codeparrot-clean
// Copyright 2011 Google Inc. All Rights Reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the COPYING file in the root of the source // tree. An additional intellectual property rights grant can be found // in the file PATENTS. All contributing project authors may // be...
c
github
https://github.com/opencv/opencv
3rdparty/libwebp/src/enc/vp8i_enc.h
from __future__ import unicode_literals import re try: # Python 3 from urllib.parse import urlencode except ImportError: # Python 2 from urllib import urlencode from django.contrib.admin import AdminSite from django.contrib.admin.options import InlineModelAdmin from django.contrib.sites.models import...
unknown
codeparrot/codeparrot-clean
import numpy.testing as npt import numpy as np import nose from scipy import stats DECIMAL_meanvar = 0#1 # was 0 distdiscrete = [ ['bernoulli',(0.3,)], ['binom', (5, 0.4)], ['boltzmann',(1.4, 19)], ['dlaplace', (0.8,)], #0.5 ['geom', (0.5,)], ['hypergeom',(30, 12, 6)], ['hypergeom...
unknown
codeparrot/codeparrot-clean
// Copyright The Prometheus Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
go
github
https://github.com/prometheus/prometheus
tsdb/fileutil/direct_io.go
# Functions that should behave the same as Numeric and need changing import numpy as np import numpy.core.multiarray as mu import numpy.core.numeric as nn from typeconv import convtypecode, convtypecode2 __all__ = ['take', 'repeat', 'sum', 'product', 'sometrue', 'alltrue', 'cumsum', 'cumproduct', 'compress...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2012 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. """Generate java DescriptorProto file. Usage: protobuf_lite_java_descriptor_proto.py {protoc} {java_out} {include} {proto_file...
unknown
codeparrot/codeparrot-clean
# Copyright 2012, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/mfd/brcm,bcm6358-gpio-sysctl.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Broadcom BCM6358 GPIO System Controller maintainers: - Álvaro Fernández Rojas <noltari@gmail.com> - Jonas Gors...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/mfd/brcm,bcm6358-gpio-sysctl.yaml
name: Filter test configs matrix description: | Apply filter to the test configs matrix to keep only entries specified by the PR test-config labels. If no test-config label is set, the same test configs matrix is returned untouched. inputs: github-token: description: GITHUB_TOKEN required: true test...
unknown
github
https://github.com/pytorch/pytorch
.github/actions/filter-test-configs/action.yml
/* Copyright 2021 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/ir/tf_ops_canonicalization_helper.h
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cint from frappe.model.document import Document from frappe.modules.export_file import export_to_files from frappe.m...
unknown
codeparrot/codeparrot-clean
urlpatterns = [] handler404 = "csrf_tests.views.csrf_token_error_handler"
python
github
https://github.com/django/django
tests/csrf_tests/csrf_token_error_handler_urls.py
# 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 threading import Lock import codecs from ..structuredlog import log_levels class BaseHandler(object): """A ba...
unknown
codeparrot/codeparrot-clean
// 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 OPENCV_CORE_HAL_MSA_MACROS_H #define OPENCV_CORE_HAL_MSA_MACROS_H #ifdef __mips_msa #include "msa.h" #include <stdin...
c
github
https://github.com/opencv/opencv
modules/core/include/opencv2/core/hal/msa_macros.h
""" Tests of the maxout functionality. So far these don't test correctness, just that you can run the objects. """ __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2013, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" import numpy as np import ...
unknown
codeparrot/codeparrot-clean
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, ...
java
github
https://github.com/elastic/elasticsearch
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/docker/DockerBuildTask.java
#!/usr/bin/python import unittest import json import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) from nysa.cbuilder import sdb_component SDB_DATA = \ " Set the Vendor ID (Hexidecimal 64-bit Number)\n" \ ...
unknown
codeparrot/codeparrot-clean
import numpy as np import pandas as pd import numpy as np import pandas as pd from altair import api from .. import api, spec VALID_MARKTYPES = spec.SPEC['properties']['marktype']['enum'] def test_empty_data(): d = api.Data() assert d.formatType=='json' assert 'formatType' in d assert 'url' not in d...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.tools import ( BaseSparkSQLTool, InfoSparkSQLTool, ListSparkSQLTool, QueryCheckerTool, QuerySparkSQLTool, ) # Create a way to dynamically...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/tools/spark_sql/tool.py
# stdlib from collections import defaultdict, namedtuple import time import urlparse # 3p import requests # project from checks import AgentCheck from config import _is_affirmative from util import headers class NodeNotFound(Exception): pass ESInstanceConfig = namedtuple( 'ESInstanceConfig', [ 'psha...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ExtractorError class YinYueTaiIE(InfoExtractor): IE_NAME = 'yinyuetai:video' IE_DESC = '音悦Tai' _VALID_URL = r'https?://v\.yinyuetai\.com/video(?:/h5)?/(?P<id>[0-9]+)' _TESTS = [{ 'url'...
unknown
codeparrot/codeparrot-clean
# Author: Mr_Orange <mr_orange@hotmail.it> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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...
unknown
codeparrot/codeparrot-clean
// This file was automatically generated from exception-handling.md by Knit tool. Do not edit. package kotlinx.coroutines.guide.test import kotlinx.coroutines.knit.* import org.junit.Test class ExceptionsGuideTest { @Test fun testExampleExceptions01() { test("ExampleExceptions01") { kotlinx.coroutines...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/jvm/test/guide/test/ExceptionsGuideTest.kt
# Copyright (c) 2005-2007 The Regents of The University of Michigan # 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 ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals, division, absolute_import import logging import urllib import re from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.config_schema import one_or_more from flexget.utils import requests from flexget.utils.soup import get_soup f...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # # CherryMusic - a standalone music server # Copyright (c) 2012 - 2014 Tom Wallroth & Tilman Boerner # # Project page: # http://fomori.org/cherrymusic/ # Sources on github: # http://github.com/devsnd/cherrymusic/ # # CherryMusic is based on # jPlayer (GPL/MIT license) http://www.jplayer.or...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Http\Resources\Json; use Illuminate\Support\Arr; class PaginatedResourceResponse extends ResourceResponse { /** * Create an HTTP response that represents the object. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\JsonResponse */ p...
php
github
https://github.com/laravel/framework
src/Illuminate/Http/Resources/Json/PaginatedResourceResponse.php
import calendar import time from email.utils import formatdate, parsedate, parsedate_tz from datetime import datetime, timedelta TIME_FMT = "%a, %d %b %Y %H:%M:%S GMT" def expire_after(delta, date=None): date = date or datetime.utcnow() return date + delta def datetime_to_header(dt): return formatdate(...
unknown
codeparrot/codeparrot-clean