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 oss import ( "fmt" "strings" "testing" "time" "bytes" "crypto/md5" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/states/remote" "github.com/hashicorp/terraform/internal/states/statefil...
go
github
https://github.com/hashicorp/terraform
internal/backend/remote-state/oss/client_test.go
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry import test from telemetry.page import page_set from webgl_conformance import WebglConformanceValidator from webgl_conformance import conforman...
unknown
codeparrot/codeparrot-clean
from config import * REQUIRED_CORE_ARGS = [ '--travelTimes', '300', '600', '--travelType', 'walk', '--source', '52.52;13.405', '--outputDir', 'data/', '--outputFilename', 'core_args_output.geojson', '--serviceKey', API_KEY, '--serviceUrl', 'http://service.route360.net/germany/' ] FULL_ARGS...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # 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 #...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Tests for video outline API """ import ddt import itertools from uuid import uuid4 from collections import namedtuple from edxval import api from mobile_api.models import MobileApiConfig from xmodule.modulestore.tests.factories import ItemFactory from xmodule.video_module import transcript...
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
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio 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 ## ...
unknown
codeparrot/codeparrot-clean
############################################################################## # # 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
/* Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/controlplane/apiserver/samples/generic/main.go
# -*- coding: utf-8 -*- """ homeassistant.components.sensor.rpi_gpio ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Allows to configure a binary state sensor using RPi GPIO. Note: To use RPi GPIO, Home Assistant must be run as root. sensor: platform: rpi_gpio pull_mode: "UP" value_high: "Active" value_low: "Inactive...
unknown
codeparrot/codeparrot-clean
# An APEv2 tag reader # # Copyright 2005 Joe Wreschnig # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # $Id: apev2.py 4008 2007-04-21 04:02:07Z piman $ """APEv2 reading and writi...
unknown
codeparrot/codeparrot-clean
from django.db.backends.postgresql.psycopg_any import is_psycopg3 from django.db.models import ( CharField, Expression, Field, FloatField, Func, Lookup, TextField, Value, ) from django.db.models.expressions import CombinedExpression, register_combinable_fields from django.db.models.funct...
python
github
https://github.com/django/django
django/contrib/postgres/search.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-05-17 06:14 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ...
unknown
codeparrot/codeparrot-clean
#pragma once namespace at::mps { static const char* SCATTER_OPS_TEMPLATE = R"METAL_SCATTER( template<typename Y, typename X> Y cast(const X x); template<> {1} cast<{1}, {0}>(const {0} x) {{ return {2}; }} kernel void scatter_kernel_n(uint linear_index [[thread_position_in_grid]], ...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/mps/IndexKernels.h
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from copy import copy from typing import Any, List, Type, Union, Iterable, Optional, cast from functools import partial from typing_extensions import Literal, overload import httpx from ... impor...
python
github
https://github.com/openai/openai-python
src/openai/resources/responses/responses.py
""" Tests for the mhlib module Nick Mathewson """ ### BUG: This suite doesn't currently test the mime functionality of ### mhlib. It should. import unittest from test.test_support import run_unittest, TESTFN, import_module import os, StringIO import sys mhlib = import_module('mhlib', deprecated=True) if ...
unknown
codeparrot/codeparrot-clean
# Copyright 2021 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
python
github
https://github.com/huggingface/transformers
src/transformers/models/data2vec/convert_data2vec_audio_original_pytorch_checkpoint_to_pytorch.py
import math import warnings import numpy as np from scipy import optimize def _check_data_dim(data, dim): if data.ndim != 2 or data.shape[1] != dim: raise ValueError('Input data must have shape (N, %d).' % dim) class BaseModel(object): def __init__(self): self.params = None @property ...
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
#!/usr/bin/env python2 # # 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 "L...
unknown
codeparrot/codeparrot-clean
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; use PHPUnit\Framework\...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php
import axios from '../../../index.js'; import http from 'http'; import https from 'https'; import net from 'net'; import url from 'url'; import zlib from 'zlib'; import stream from 'stream'; import util from 'util'; import assert from 'assert'; import fs from 'fs'; import path from 'path'; import {lookup} from 'dns'; l...
javascript
github
https://github.com/axios/axios
test/unit/adapters/http.js
from django.contrib import admin from django.core.paginator import Paginator from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from .models import Event, Child, Parent, Swallow site = admin.AdminSite(name="admin") site.register(User, UserAdmin) class CustomPaginator(Paginat...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, division, unicode_literals from xml.dom import minidom, Node import weakref from . import _base from .. import constants from ..constants import namespaces from ..utils import moduleFactoryFactory def getDomBuilder(DomImplementation): Dom = DomImplementation class Att...
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 applica...
unknown
codeparrot/codeparrot-clean
import io import os import sys import pickle import subprocess import unittest from unittest.case import _Outcome from unittest.test.support import (LoggingResult, ResultWithNoStartTestRunStopTestRun) class TestCleanUp(unittest.TestCase): def testCleanUp(self): class T...
unknown
codeparrot/codeparrot-clean
#pragma once #include <ATen/core/Tensor.h> #include <ATen/SparseCsrTensorUtils.h> namespace at::sparse_csr { Tensor& _sparse_mm_mkl_( Tensor& self, const SparseCsrTensor& sparse_, const Tensor& dense, const Tensor& t, const Scalar& alpha, const Scalar& beta); } // namespace at
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/mkl/SparseCsrLinearAlgebra.h
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Portal Sale', 'version': '0.1', 'category': 'Sales', 'complexity': 'easy', 'description': """ This module adds a Sales menu to your portal as soon as sale and portal are installed. ========...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2010, 2011, 2013 CERN. ## ## Invenio 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 yo...
unknown
codeparrot/codeparrot-clean
# # This file is part of Invenio. # Copyright (C) 2016 CERN. # # Invenio 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. # # Invenio is...
unknown
codeparrot/codeparrot-clean
use rustc_errors::{Diag, EmissionGuarantee, Subdiagnostic}; use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic}; use rustc_middle::ty::Ty; use rustc_span::Span; use crate::rustc::{RustcPatCtxt, WitnessPat}; #[derive(Subdiagnostic)] #[label( "{$count -> [1] pattern `{$witness_1}` [2] patt...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_pattern_analysis/src/errors.rs
/* ANSI-C code produced by gperf version 3.1 */ /* Command-line: gperf -7 -c -j1 -i1 -t -C -P -T -H uniname2ctype_hash -Q uniname2ctype_pool -N uniname2ctype_p */ #ifndef USE_UNICODE_PROPERTIES /* Computed positions: -k'1,3' */ #else /* USE_UNICODE_PROPERTIES */ /* Computed positions: -k'1-3,5-6,12,16,$' */ #endif /* ...
c
github
https://github.com/ruby/ruby
enc/unicode/17.0.0/name2ctype.h
class _GetchUnix: def __init__(self): import tty, sys def __call__(self): import sys, tty, termios fd = sys.stdin.fileno() old_settings = termios.tcgetattr(fd) try: tty.setraw(sys.stdin.fileno()) ch = sys.stdin.read(1) finally: ...
unknown
codeparrot/codeparrot-clean
#---------------------------------------------------------------------------- # Name: scrolledpanel.py # Author: Will Sadkin # Created: 03/21/2003 # Copyright: (c) 2003 by Will Sadkin # RCS-ID: $Id$ # License: wxWindows license #----------------------------------------------------------...
unknown
codeparrot/codeparrot-clean
import pickle import mwapi from revscoring.datasources import revision_oriented as ro from revscoring.extractors.api.datasources import (LastUserRevDoc, PageCreationRevDoc, PropertySuggestionDoc, ...
unknown
codeparrot/codeparrot-clean
from helper import * def doTest(): _color() _complicated_color() _special() def _complicated_color(): fixer, msg = doFix('.test {background0:#dddddd url(dddddd) no-repeat left top;}', '') styleSheet = fixer.getStyleSheet() ruleSet = styleSheet.getRuleSets()[0] equal(ruleSet.getRuleByName('...
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
/* * Copyright (C) 2011 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
java
github
https://github.com/google/guava
android/guava/src/com/google/common/cache/AbstractLoadingCache.java
from distutils.command.sdist import sdist as _sdist from distutils.util import convert_path from distutils import log import os, re, sys, pkg_resources from glob import glob READMES = ('README', 'README.rst', 'README.txt') entities = [ ("&lt;","<"), ("&gt;", ">"), ("&quot;", '"'), ("&apos;", "'"), ("&amp;", "...
unknown
codeparrot/codeparrot-clean
from saml2 import BINDING_HTTP_POST from saml2.authn_context import INTERNETPROTOCOLPASSWORD from saml2.client import Saml2Client from saml2.server import Server from saml2.mongo_store import EptidMDB __author__ = 'rolandh' AUTHN = { "class_ref": INTERNETPROTOCOLPASSWORD, "authn_auth": "http://www.example.com...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (c) 2019 Zim Kalinowski, <zikalino@microsoft.com> # # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Exodus Add-on 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 option) any later version. This progra...
unknown
codeparrot/codeparrot-clean
# (c) 2018 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 # (at your option) any later version. # # Ansible is dis...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ This module contains text processing functions for the mangrove crawler. Wim Muskee, 2013-2017 wimmuskee@gmail.com License: GPL-3 """ import os from collections import defaultdict from nltk import tokenize from math import ceil class TextProcessor: def __init__(self,text,locale,calculat...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright 2016 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 appli...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package pki import ( "context" "crypto/rand" "encoding/base64" "fmt" "net/http" "path" "strings" "time" "github.com/hashicorp/go-uuid" "github.com/hashicorp/vault/builtin/logical/pki/observe" "github.com/hashicorp/vault/sdk/framework" ...
go
github
https://github.com/hashicorp/vault
builtin/logical/pki/path_acme_eab.go
"""Module for a single play of the two thirds games""" class TwoThirdsGame: """ Class for a game """ def __init__(self, data): if (type(data) is not list) and (type(data) is not dict): raise ValueError('Input must be either a list or a dictionary') self.data = data def ...
unknown
codeparrot/codeparrot-clean
data = ( 'Zhong ', # 0x00 'Qi ', # 0x01 'Pei ', # 0x02 'Yu ', # 0x03 'Diao ', # 0x04 'Dun ', # 0x05 'Wen ', # 0x06 'Yi ', # 0x07 'Xin ', # 0x08 'Kang ', # 0x09 'Yi ', # 0x0a 'Ji ', # 0x0b 'Ai ', # 0x0c 'Wu ', # 0x0d 'Ji ', # 0x0e 'Fu ', # 0x0f 'Fa ', # 0x10 'Xiu ', ...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import import pip from pip.wheel import WheelCache from pip.req import InstallRequirement, RequirementSet, parse_requirements from pip.basecommand import Command from pip.exceptions import InstallationError class UninstallCommand(Command): """ Uninstall packages. pip is ab...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # ...
unknown
codeparrot/codeparrot-clean
//===--- CompletionLookup.h -----------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2022 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE....
c
github
https://github.com/apple/swift
include/swift/IDE/CompletionLookup.h
## Input ```javascript // @enableNewMutationAliasingModel:false import {ValidateMemoization} from 'shared-runtime'; const Codes = { en: {name: 'English'}, ja: {name: 'Japanese'}, ko: {name: 'Korean'}, zh: {name: 'Chinese'}, }; function Component(a) { let keys; if (a) { keys = Object.keys(Codes); } ...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/bug-separate-memoization-due-to-callback-capturing.expect.md
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
unknown
codeparrot/codeparrot-clean
""" Puppy IDE. Copyright (C) 2015 Dan Pope and Nicholas H.Tollervey 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 option) any later version. This prog...
unknown
codeparrot/codeparrot-clean
# -*- encoding: 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...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Presence analyzer unit tests. """ import os.path import json import datetime import unittest from lxml import etree import mock from requests import ConnectionError from presence_analyzer import main, utils, views from presence_analyzer.utils import cache_data TEST_DATA_CSV = os.path.joi...
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 abc import six from cryptography import utils from cryptography....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Geant4 # # GEANT4 packages and versions for hyperK # # Author P G Jones - 2014-08-20 <p.g.jones@qmul.ac.uk> : New file. #################################################################################################### import nusoft.package.local as local_package import os class Geant4(loca...
unknown
codeparrot/codeparrot-clean
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function from testconfig import config from pyvcloud.system import System from pyvcloud.vcloudair import VCA class TestExtensions: def __init__(self): self.vca = None self.login_to_vcloud() def login_to_vcloud(self): """Login to vCloud""" username ...
unknown
codeparrot/codeparrot-clean
""" PushBullet platform for notify component. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.pushbullet/ """ import logging import voluptuous as vol from homeassistant.components.notify import ( ATTR_DATA, ATTR_TARGET, ATTR_TITLE, ATTR_TITLE...
unknown
codeparrot/codeparrot-clean
from pathlib import Path from string import Template import pandas as pd class CTXIndex: volumes_url = "https://pds-imaging.jpl.nasa.gov/volumes/mro.html" release_url_template = \ Template( "https://pds-imaging.jpl.nasa.gov/volumes/mro/release${release}.html") volume_url_template = \ ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
unknown
codeparrot/codeparrot-clean
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). from datetime import timedelta import httplib from lazr.enum import ( DBEnumeratedType, DBItem, EnumeratedType, Item, ) from lazr.restful.declarations imp...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage Check Point Firewall (c) 2019 # # 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 o...
unknown
codeparrot/codeparrot-clean
from nose import SkipTest from nose.tools import assert_raises, assert_true, assert_equal, raises import networkx as nx from networkx.testing import assert_graphs_equal from networkx.generators.classic import barbell_graph,cycle_graph,path_graph from networkx.testing.utils import assert_graphs_equal class TestConvert...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013 Rackspace, 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 wr...
unknown
codeparrot/codeparrot-clean
// created by cgo -cdefs and then converted to Go // cgo -cdefs defs_linux.go defs1_linux.go package runtime import "unsafe" const ( _EINTR = 0x4 _EAGAIN = 0xb _ENOMEM = 0xc _ENOSYS = 0x26 _PROT_NONE = 0x0 _PROT_READ = 0x1 _PROT_WRITE = 0x2 _PROT_EXEC = 0x4 _MAP_ANON = 0x20 _MAP_PRIVATE = 0x2 _MA...
go
github
https://github.com/golang/go
src/runtime/defs_linux_amd64.go
import pytest import numpy as np from numpy.f2py.tests import util from numpy.testing import assert_array_equal @pytest.mark.slow class TestInplace(util.F2PyTest): sources = [util.getpath("tests", "src", "inplace", "foo.f")] @pytest.mark.parametrize("func", ["inplace", "inplace_out"]) @pytest.mark.parame...
python
github
https://github.com/numpy/numpy
numpy/f2py/tests/test_inplace.py
'''OpenGL extension APPLE.ycbcr_422 This module customises the behaviour of the OpenGL.raw.GL.APPLE.ycbcr_422 to provide a more Python-friendly API Overview (from the spec) This extension provides a method for GL to read, store and optionally process textures that are defined in Y'CbCr 422 video formats. This ex...
unknown
codeparrot/codeparrot-clean
# # Cassandra Cluster Management lib # import fnmatch import os import platform import re import shutil import socket import stat import subprocess import sys import time from six import print_ import yaml BIN_DIR = "bin" CASSANDRA_CONF_DIR = "conf" DSE_CASSANDRA_CONF_DIR = "resources/cassandra/conf" OPSCENTER_CONF...
unknown
codeparrot/codeparrot-clean
/* Copyright 2022 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 agreed to in ...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/mlir/tensorflow/transforms/order_by_dialect.h
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const util = require("util"); /** @type {Map<string, () => void>} */ const deprecationCache = new Map(); /** * @typedef {object} FakeHookMarker * @property {true} _fakeHook it's a fake hook */ /** ...
javascript
github
https://github.com/webpack/webpack
lib/util/deprecation.js
import { addEmitHelpers, arrayFrom, Bundle, chainBundle, createExpressionForJsxElement, createExpressionForJsxFragment, createExpressionFromEntityName, createJsxFactoryExpression, createRange, Debug, emptyArray, Expression, filter, find, flatten, Generated...
typescript
github
https://github.com/microsoft/TypeScript
src/compiler/transformers/jsx.ts
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Page.xframe_options' db.add_column(u'cms_page', 'xframe_op...
unknown
codeparrot/codeparrot-clean
''' Simulator Test for affinity group antiHard policy. @author: Chao ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_state as test_state import zstackwoodpecker.operations.affinitygroup_operations as ag_ops import zstackwoodpecker.operation...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2013 CERN. ## ## Invenio 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 ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restrict...
unknown
codeparrot/codeparrot-clean
async function getTemplate(templateName) { try { let template = await import(`./templates/${templateName}`); console.log(template); } catch(err) { console.error("template error"); return new Error(err); } } getTemplate("foo"); getTemplate("bar"); getTemplate("baz");
javascript
github
https://github.com/webpack/webpack
examples/code-splitting-native-import-context/example.js
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
unknown
codeparrot/codeparrot-clean
import os import array import unittest import struct import inspect from test import test_support as support from test.test_support import (check_warnings, check_py3k_warnings) import sys ISBIGENDIAN = sys.byteorder == "big" IS32BIT = sys.maxsize == 0x7fffffff integer_codes = 'b', 'B', 'h', 'H', 'i', 'I', 'l', 'L', '...
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 applica...
unknown
codeparrot/codeparrot-clean
from positive_test_suite import PositiveTestSuite from negative_test_suite import NegativeTestSuite from mozdef_util.query_models import LessThanMatch class TestLessThanMatchPositiveTestSuite(PositiveTestSuite): def query_tests(self): boundry_date = "2016-08-12T21:07:12.316450+00:00" tests = { ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # APM automatic test suite # Andrew Tridgell, October 2011 import pexpect, os, sys, shutil, atexit sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), 'pysim')) import optparse, fnmatch, time, glob, traceback, signal, util, time, math, common, random from common import ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html from numpy import empty as empty_matrix from scipy.sparse import csr_matrix from scipy.sparse.linalg import eigs from six.moves import xrange try: from numpy import VisibleDeprecationWarning ...
unknown
codeparrot/codeparrot-clean
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import absolute_import import shutil import tempfile from random import randint import requests import...
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-test/src/test/java/org/springframework/boot/test/json/JsonbTesterTests.java
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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 * as fs from 'node:fs'; import { assert } from 'vitest'; import { migrate } from 'svelte/compiler'; import { try_read_file } from '../helpers.js'; import { suite, type BaseTest } from '../suite.js'; interface ParserTest extends BaseTest { skip_filename?: boolean; use_ts?: boolean; logs?: any[]; errors?: any...
typescript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/migrate/test.ts
#!/usr/bin/python # Urwid common display code # Copyright (C) 2004-2011 Ian Ward # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or ...
unknown
codeparrot/codeparrot-clean
import abc import MySQLdb import requests import os from datetime import datetime, timedelta from LMSAdaptiveFilter import LMSAdaptiveFilter # Global queries used throughout TEST_NAMES_QUERY = \ """ SELECT DISTINCT tr.test_name FROM test_run tr INNER JOIN test_run_phase_result tp USING(test_run_id) WHERE tp.end_e...
unknown
codeparrot/codeparrot-clean
#!/bin/sh # # Copyright (c) 2010 Ævar Arnfjörð Bjarmason # test_description="The Git C functions aren't broken by setlocale(3)" . ./lib-gettext.sh test_expect_success 'git show a ISO-8859-1 commit under C locale' ' . "$TEST_DIRECTORY"/t3901/8859-1.txt && test_commit "iso-c-commit" iso-under-c && git show >out 2>e...
unknown
github
https://github.com/git/git
t/t0203-gettext-setlocale-sanity.sh
# -*- coding: utf-8 -*- from openerp import models, fields, api, _ import openerp.addons.decimal_precision as dp from openerp.exceptions import UserError from openerp.osv import fields as old_fields class event_event(models.Model): _inherit = 'event.event' event_ticket_ids = fields.One2many( 'event.e...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/python2.4 # # Copyright 2010-2014 Google # 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
from common_fixtures import * # NOQA def test_project_template(new_context): user_client = new_context.user_client entry = { 'name': 'foo-' + random_str(), 'dockerCompose': 'test:\n image: nginx' } entry2 = { 'name': 'foo-' + random_str(), 'templateVersionId': 'foo:inf...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Database\Eloquent\Relations; use Illuminate\Contracts\Database\Eloquent\SupportsPartialRelations; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection as EloquentCollection; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\C...
php
github
https://github.com/laravel/framework
src/Illuminate/Database/Eloquent/Relations/HasOne.php
# # This file is a part of Siesta Help Scripts # # (c) Andrey Sobolev, 2013 # import numpy as np from abstract import PerAtomData class VPVolumeData(PerAtomData): _shortDoc = "Total VP volume" def getData(self, calc): self.nsteps = len(calc) # default plot options self.plot_options['d...
unknown
codeparrot/codeparrot-clean
import os, argparse from . import __VERSION__ from utils import validate_int, validate_float NPROC = 1 MIN_DIST = 0.001 DIST = 0.03 MAX_DIST = 0.5 MIN_ACCURACY = 0.99 MIN_QV = 15 FRACTION = 0.8 MIN_LENGTH = 500 MIN_RATIO = 0.5 PRECLUSTER_DIFFS = 4 MIN_CLUSTER_SIZE = 3 MIN_SNR = 3 CLUSTER_METHODS = ('nearest', 'averag...
unknown
codeparrot/codeparrot-clean
// Copyright 2020 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package cli import ( "bufio" "bytes" "context" "encoding/csv" "encoding/gob" "encoding/json" "fmt" "io" "net" "net/http" "os" "regexp" "strings" "sync" "...
go
github
https://github.com/cockroachdb/cockroach
pkg/cli/tsdump.go