code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# NOTE: Please avoid the use of numpy.testing since NPYV intrinsics # may be involved in their functionality. import itertools import math import operator import re import pytest from numpy._core._multiarray_umath import __cpu_baseline__ from numpy._core._simd import clear_floatstatus, get_floatstatus, targets def c...
python
github
https://github.com/numpy/numpy
numpy/_core/tests/test_simd.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of pygal # # A python svg graph plotting library # Copyright © 2012-2014 Kozea # # 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 Foun...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import logging from django.core.management.base import BaseCommand from django.db.models import F from scripts import utils as script_utils from osf.models import Preprint from website.preprints.tasks import on_preprint_updated logger = logging.getLogger(__name__) def update_...
unknown
codeparrot/codeparrot-clean
import os import shutil import tempfile import contextlib import unittest import argparse import sys import torch import __main__ import random import inspect from numbers import Number from torch._six import string_classes from collections import OrderedDict import numpy as np from PIL import Image from _assert_uti...
unknown
codeparrot/codeparrot-clean
//go:build linux /* Copyright 2017 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 agre...
go
github
https://github.com/kubernetes/kubernetes
pkg/kubelet/cadvisor/helpers_linux.go
use crate::spec::{Arch, RustcAbi, Target, TargetMetadata, base}; pub(crate) fn target() -> Target { let mut base = base::windows_uwp_msvc::opts(); base.rustc_abi = Some(RustcAbi::X86Sse2); base.cpu = "pentium4".into(); base.max_atomic_width = Some(64); Target { llvm_target: "i686-pc-window...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/targets/i686_uwp_windows_msvc.rs
#! python ''' Verifies that everything is working with the file system and python modules ''' def main(): print('Importing modules:') pygame_e = False config_e = False shmup_e = False pygbutton_e = False import time import random import os import sys print('\ttime\n\trandom\n\to...
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/precommit/TestingConventionsPrecommitPlugin.java
import time from datetime import datetime from elixir import * from elixir.ext.versioned import acts_as_versioned class TestVersioning(object): def teardown(self): cleanup_all(True) def test_versioning(self): nextOneValue = {'value': 0} def nextOne(): nextOneValue['value'...
unknown
codeparrot/codeparrot-clean
import logging from yaypm.utils import XOR from twisted.internet import defer from random import random logger = logging.getLogger("yaypm.resources") class Resource: def _match(self, *args): raise NotImplementedError("Abstract Method!") @defer.inlineCallbacks def play(self, yate, callid, targetid...
unknown
codeparrot/codeparrot-clean
''' Routing is the process of matching and parsing a URL to something we can use. Pulsar provides a flexible integrated routing system you can use for that. It works by creating a :class:`Router` instance with its own ``rule`` and, optionally, additional sub-routers for handling additional urls:: class Page(Router...
unknown
codeparrot/codeparrot-clean
from django.conf import settings from django.contrib.auth import models from django.contrib.auth.decorators import login_required, permission_required from django.core.exceptions import PermissionDenied from django.http import HttpResponse from django.test import TestCase, override_settings from django.test.client impo...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts] //// //// [awaitCallExpression5_es6.ts] declare var a: boolean; declare var p: Promise<boolean>; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boole...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/awaitCallExpression5_es6.js
#!/bin/bash # Set default values for dist-tag and registry for local development # to prevent running this script and accidentally publishing to npm dist_tag="canary" registry="http://localhost:4873" # Require either ACTIONS_ID_TOKEN_REQUEST_URL or NPM_TOKEN to be set if [ -z "$ACTIONS_ID_TOKEN_REQUEST_URL" ] && [ -z...
unknown
github
https://github.com/grafana/grafana
scripts/publish-npm-packages.sh
# -*- coding: utf-8 -*- """ Wire this into the root URLConf this way:: url(r'^stripe/', include('djstripe.urls', namespace="djstripe")), # url can be changed # Call to 'djstripe.urls' and 'namespace' must stay as is Call it from reverse():: reverse("djstripe:subscribe") Call from url tag:: {% u...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2012-2013 Red Hat, 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 la...
unknown
codeparrot/codeparrot-clean
#include <c10/util/Exception.h> #include <c10/util/numa.h> C10_DEFINE_bool(caffe2_cpu_numa_enabled, false, "Use NUMA whenever possible.") #if defined(__linux__) && defined(C10_USE_NUMA) && !defined(C10_MOBILE) #include <numa.h> #include <numaif.h> #include <unistd.h> #define C10_ENABLE_NUMA #endif // This code used ...
cpp
github
https://github.com/pytorch/pytorch
c10/util/numa.cpp
// 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 in w...
go
github
https://github.com/prometheus/prometheus
cmd/promtool/archive.go
// Trusty OS target for AArch64. use crate::spec::{ Arch, LinkSelfContainedDefault, Os, PanicStrategy, RelroLevel, Target, TargetMetadata, TargetOptions, }; pub(crate) fn target() -> Target { Target { llvm_target: "aarch64-unknown-unknown-musl".into(), metadata: TargetMetadata { ...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/targets/aarch64_unknown_trusty.rs
/* * 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/scheduling/annotation/AsyncAnnotationAdvisor.java
# -*- coding: utf-8 -*- """ Created on Fri Nov 25 08:25:36 2016 @author: Peter Knight """ import collections import socket import datetime ## Dictionary manipulation goes here. def listify_dicts(input_list_or_dict): """A function to allow just sending one dictionary into another function built to handle lists o...
unknown
codeparrot/codeparrot-clean
from ctypes import * import unittest class StringBufferTestCase(unittest.TestCase): def test_buffer(self): b = create_string_buffer(32) self.assertEqual(len(b), 32) self.assertEqual(sizeof(b), 32 * sizeof(c_char)) self.assertTrue(type(b[0]) is str) b = create_string_buffer...
unknown
codeparrot/codeparrot-clean
import warnings from urllib.parse import urlparse, urlunparse from django.conf import settings # Avoid shadowing the login() and logout() views below. from django.contrib.auth import ( REDIRECT_FIELD_NAME, get_user_model, login as auth_login, logout as auth_logout, update_session_auth_hash, ) from django.contr...
unknown
codeparrot/codeparrot-clean
from vtk import * import os.path data_dir = "../../../../VTKData/Data/Infovis/SQLite/" if not os.path.exists(data_dir): data_dir = "../../../../../VTKData/Data/Infovis/SQLite/" if not os.path.exists(data_dir): data_dir = "../../../../../../VTKData/Data/Infovis/SQLite/" sqlite_file = data_dir + "SmallEmailTest.db" ...
unknown
codeparrot/codeparrot-clean
// Copyright 2016 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 ( "bufio" "bytes" "debug/elf" "debug/macho" "debug/pe" "errors" "internal/abi" "internal/platform" "internal/testenv" "internal/x...
go
github
https://github.com/golang/go
src/cmd/link/link_test.go
#!/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
use std::iter; use GenericArgsInfo::*; use rustc_errors::codes::*; use rustc_errors::{Applicability, Diag, Diagnostic, EmissionGuarantee, MultiSpan, pluralize}; use rustc_hir as hir; use rustc_middle::ty::{self as ty, AssocItems, TyCtxt}; use rustc_span::def_id::DefId; use tracing::debug; /// Handles the `wrong numbe...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs
# Copyright 2018 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
'use strict'; const common = require('../common.js'); const assert = require('assert'); const bench = common.createBenchmark(main, { n: [1e6], stackCount: [99, 101], method: ['isInsideNodeModules', 'noop'], }, { flags: ['--expose-internals', '--disable-warning=internal/test/binding'], }); function main({ n, s...
javascript
github
https://github.com/nodejs/node
benchmark/internal/util_isinsidenodemodules.js
#!/usr/bin/env python # # Copyright 2005 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...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL module OID # :nodoc: class BitVarying < OID::Bit # :nodoc: def type :bit_varying end end end end end end
ruby
github
https://github.com/rails/rails
activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_varying.rb
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import TestCase, run_module_suite, \ assert_array_almost_equal, assert_almost_equal, \ assert_allclose from scipy.signal import cont2discrete as c2d from scipy.sig...
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 n...
java
github
https://github.com/apache/kafka
connect/api/src/test/java/org/apache/kafka/connect/header/ConnectHeaderTest.java
# -*- coding: utf8 -*- # $Id: __init__.py 6385 2010-08-13 12:17:01Z milde $ # Author: Engelbert Gruber <grubert@users.sourceforge.net> # Copyright: This module has been placed in the public domain. """LaTeX2e document tree Writer.""" __docformat__ = 'reStructuredText' # code contributions from several people include...
unknown
codeparrot/codeparrot-clean
//===--- CommentConversion.cpp - Conversion of comments to other formats --===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
cpp
github
https://github.com/apple/swift
lib/IDE/CommentConversion.cpp
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2013 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import os.path import sys from filecmp import dircmp from shutil import rmtree from tempfile import mkdtemp from mopy.p...
unknown
codeparrot/codeparrot-clean
from django import test from django.utils import timezone from model_bakery import baker from devilry.apps.core.models import Assignment from devilry.devilry_account.models import PermissionGroup from devilry.devilry_dbcache.customsql import AssignmentGroupDbCacheCustomSql from devilry.devilry_statistics.tests.test_ap...
unknown
codeparrot/codeparrot-clean
from django.conf.urls.defaults import * from django.contrib.admindocs import views urlpatterns = patterns('', url('^$', views.doc_index, name='django-admindocs-docroot' ), url('^bookmarklets/$', views.bookmarklets, name='django-admindocs-bookmarklets' ), url('^tags/$...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2025 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.renderer.declarations.renderers.callables import org.jetbrains.kotl...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/renderer/declarations/renderers/callables/KaSyntheticJavaPropertySymbolRenderer.kt
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/kernels/data/experimental/compression_ops.h
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package cache import ( "bytes" "context" "io" "net/http" "time" "github.com/hashicorp/vault/api" ) // SendRequest is the input for Proxier.Send. type SendRequest struct { Token string Request *http.Request // RequestBody is the store...
go
github
https://github.com/hashicorp/vault
command/agentproxyshared/cache/proxy.go
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`json` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of the :m...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import from itertools import groupby, imap, izip, tee import logging import types from django.conf import settings import jsonpath_rw from .aggregates import AGGREGATES_NAMES from .exceptions import LQLParseError from .filters import FILTER_CLASS_MAP, FILTER_NAMES from .literals impo...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2025 The HuggingFace Team. 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...
unknown
github
https://github.com/huggingface/transformers
docs/source/en/model_doc/lfm2_vl.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 n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/utils/CircularIterator.java
# -*- coding: utf-8 -*- # [HARPIA PROJECT] # # # S2i - Intelligent Industrial Systems # DAS - Automation and Systems Department # UFSC - Federal University of Santa Catarina # Copyright: 2006 - 2007 Luis Carlos Dill Junges (lcdjunges@yahoo.com.br), Clovis Peruchi Scotti (scotti@ieee.org), # Guilh...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 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-...
unknown
codeparrot/codeparrot-clean
"""Test that we're meeting delicious API specifications""" # Need to create a new renderer that wraps the jsonp renderer and adds these # heads to all responses. Then the api needs to be adjusted to use this new # renderer type vs jsonp. import json import logging import os import transaction import unittest from pyram...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 James McCauley # # 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 writi...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 import os import unittest import os.path import sys sys.path.insert(0, os.path.join(os.path.abspath(os.path.dirname(__file__)), "..")) import base from PyQt5.QtCore import Qt from PyQt5.QtTest import QTest from PyQt5.QtWidgets import QPlainTextEdit from PyQt5.QtGui import QColor, QFont, QText...
unknown
codeparrot/codeparrot-clean
""" Checks that Pylint does not complain about various methods on Django form forms. """ # pylint: disable=missing-docstring,R0904 from __future__ import print_function from datetime import datetime, date from django import forms from django.contrib.auth.forms import UserCreationForm class ManyFieldsForm(forms.Form):...
unknown
codeparrot/codeparrot-clean
import { isPlainObject } from '@vue/shared' import { DeprecationTypes, warnDeprecation } from './compatConfig' export function deepMergeData(to: any, from: any): any { for (const key in from) { const toVal = to[key] const fromVal = from[key] if (key in to && isPlainObject(toVal) && isPlainObject(fromVal)...
typescript
github
https://github.com/vuejs/core
packages/runtime-core/src/compat/data.ts
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package cloud import ( "context" "fmt" "log" tfe "github.com/hashicorp/go-tfe" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hclsyntax" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/backend" "githu...
go
github
https://github.com/hashicorp/terraform
internal/cloud/backend_context.go
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from ..._models import BaseModel __all__ = ["ContainerNetworkPolicyDomainSecret"] class ContainerNetworkPolicyDomainSecret(BaseModel): domain: str """The domain associated with the secret.""" name: str """The name ...
python
github
https://github.com/openai/openai-python
src/openai/types/responses/container_network_policy_domain_secret.py
from __future__ import absolute_import import time from sentry.digests.notifications import ( build_digest, split_key, ) from sentry.tasks.base import instrumented_task @instrumented_task( name='sentry.tasks.digests.schedule_digests', queue='digests.scheduling') def schedule_digests(): from sentr...
unknown
codeparrot/codeparrot-clean
/* Copyright (c) 2015, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including...
c
github
https://github.com/mysql/mysql-server
sql/sql_show_processlist.h
from unittest import TestCase from src.Piloto import Piloto from src.Escuderia import Escuderia from src.CampeonatoMundial import CampeonatoMundial from src.Circuito import Circuito from src.GranPremio import GranPremio from src.Formula1 import Formula1 from mockito import * __author__ = 'MAMISHO' class TestFormula1(...
unknown
codeparrot/codeparrot-clean
import { flushSync } from 'svelte'; import { test } from '../../assert'; const tick = () => Promise.resolve(); export default test({ async test({ assert, target }) { const element = document.createElement('custom-element'); target.appendChild(element); await tick(); flushSync(); /** @type {any} */ const ...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-browser/custom-elements-samples/reflect-attributes-add-remove/_config.js
import numpy as np from numpy.testing import assert_raises, assert_almost_equal from numpy import sqrt, ceil from skimage import data from skimage import img_as_float from skimage.feature import daisy def test_daisy_color_image_unsupported_error(): img = np.zeros((20, 20, 3)) assert_raises(ValueError, daisy, ...
unknown
codeparrot/codeparrot-clean
import {useState} from 'react'; function component() { let [x, setX] = useState(0); const handler = event => setX(event.target.value); return <input onChange={handler} value={x} />; } export const FIXTURE_ENTRYPOINT = { fn: component, params: [], isComponent: true, };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/controlled-input.js
# Copyright 2013-2016 Open Source Robotics Foundation, 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 applicabl...
unknown
codeparrot/codeparrot-clean
""" FlexForm """ # from itertools import count from rpw.utils.dotnet import Enum from rpw.ui.forms.resources import * class FlexForm(Window): """ Flex Form Usage >>> from rpw.ui.forms import (FlexForm, Label, ComboBox, TextBox, TextBox, ... Separator, Button) >>> compo...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Test the maas package.""" from __future__ import ( absolute_import, print_function, unicode_literals, ) str = None __metaclass__ = type __all__ = [] from imp...
unknown
codeparrot/codeparrot-clean
import { test } from '../../test'; export default test({ get props() { return { thePromise: new Promise((_) => {}) }; }, html: ` loading... `, async test({ assert, component, target }) { await (component.thePromise = Promise.resolve([1, 2, 3, 4, 5, 6, 7, 8])); assert.htmlEqual( target.innerHTML...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/await-then-destruct-array-nested-rest/_config.js
base_suite: replica_sets_reconfig_jscore_passthrough overrides: - "priority_ports.replica_sets_reconfig_priority_port_hooks" - "priority_ports.replica_sets_reconfig_fixture_priority_ports"
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/matrix_suites/mappings/replica_sets_reconfig_jscore_passthrough_priority_ports.yml
# Outspline - A highly modular and extensible outliner. # Copyright (C) 2011-2014 Dario Giovannetti <dev@dariogiovannetti.net> # # This file is part of Outspline. # # Outspline 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 Softw...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.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 ANSIB...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
unknown
codeparrot/codeparrot-clean
""" A set of objects that are suited to being the basis of font development tools. This works on UFO files. """ version = "0.1" from defcon.errors import DefconError from defcon.objects.font import Font from defcon.objects.layerSet import LayerSet from defcon.objects.layer import Layer from defcon.objects.glyph impo...
unknown
codeparrot/codeparrot-clean
""" This module is used to translate Events from Marathon's EventBus system. See: https://mesosphere.github.io/marathon/docs/event-bus.html """ from marathon.models.base import MarathonObject from marathon.models.app import MarathonHealthCheck from marathon.models.deployment import MarathonDeploymentPlan from marathon...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import six from .exceptions import InvalidQuery, InvalidParameterQuery, QueryError, \ ScriptFieldsError from .sort import SortFactory from .facets import FacetFactory from .aggs import AggFactory from .filters import ANDFilter, Filter from .highlight import HighLighter from .scriptfields im...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2019 Extreme Networks. # # 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. # #...
unknown
codeparrot/codeparrot-clean
require.ensure(["./a"], function(require) { expect(require("./a")).toBe("a"); })
javascript
github
https://github.com/webpack/webpack
test/cases/chunks/runtime/duplicate.js
# -*- coding: utf-8 -*- """ jinja2.utils ~~~~~~~~~~~~ Utility functions. :copyright: (c) 2017 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import json import errno from collections import deque from threading import Lock from jinja2._compat import text_type, string...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import print_function __author__ = 'Ostico <ostico@gmail.com>' import socket import struct import select from .exceptions import PyOrientBadMethodCallException, \ PyOrientConnectionException, PyOrientWrongProtocolVersionException, \ PyOrientConnectionPoolException fro...
unknown
codeparrot/codeparrot-clean
"""Sanity test using shellcheck.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os from xml.etree.ElementTree import ( fromstring, Element, ) from .. import types as t from ..sanity import ( SanityVersionNeutral, SanityMessage, SanityFailure, ...
unknown
codeparrot/codeparrot-clean
from django.contrib.admin.forms import AdminAuthenticationForm from django.contrib.admin.helpers import AdminForm from django.contrib.auth.models import User from django.test import SimpleTestCase, TestCase, override_settings from .admin import ArticleForm # To verify that the login form rejects inactive users, use a...
python
github
https://github.com/django/django
tests/admin_views/test_forms.py
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslPropertiesResolver.java
#!/bin/sh # # Copyright (c) 2007 Eric Wong test_description='git svn dcommit clobber series' . ./lib-git-svn.sh test_expect_success 'initialize repo' ' mkdir import && (cd import && awk "BEGIN { for (i = 1; i < 64; i++) { print i } }" > file && svn_cmd import -m "initial" . "$svnrepo" ) && git svn init "$svnrepo...
unknown
github
https://github.com/git/git
t/t9137-git-svn-dcommit-clobber-series.sh
"""Package used to manage the .mackup.cfg config file.""" import os import os.path import sys from .constants import (MACKUP_BACKUP_PATH, MACKUP_CONFIG_FILE, ENGINE_DROPBOX, ENGINE_GDRIVE, ENGINE_COPY, ...
unknown
codeparrot/codeparrot-clean
//go:build !windows package main import ( "fmt" "testing" "time" "github.com/moby/moby/api/types/swarm" "github.com/moby/moby/v2/integration-cli/checker" "github.com/moby/moby/v2/integration-cli/daemon" "github.com/moby/moby/v2/internal/testutil" "gotest.tools/v3/assert" "gotest.tools/v3/poll" ) func (s *D...
go
github
https://github.com/moby/moby
integration-cli/docker_api_swarm_node_test.go
# # 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 # distributed under...
unknown
codeparrot/codeparrot-clean
// Copyright 2024 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package security_test import ( "os" "path/filepath" "testing" "github.com/cockroachdb/cockroach/pkg/security" "github.com/cockroachdb/cockroach/pkg/security/secur...
go
github
https://github.com/cockroachdb/cockroach
pkg/security/certificate_metrics_test.go
- Feature Name: Non-Blocking Transactions - Status: in-progress - Start Date: 2020-08-11 - Authors: Nathan VanBenschoten - RFC PR: #52745 - Cockroach Issue: None # Summary Non-blocking transactions are a variant of CockroachDB's standard read-write transaction protocol that permit low-latency, global reads of read-mo...
unknown
github
https://github.com/cockroachdb/cockroach
docs/RFCS/20200811_non_blocking_txns.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");...
unknown
codeparrot/codeparrot-clean
import os import sys import math import time import types import numpy as np import vtkAll as vtk from ddapp.timercallback import TimerCallback from ddapp import transformUtils from ddapp import lcmUtils from ddapp import objectmodel as om from ddapp import visualization as vis import drc as lcmdrc class Gamepad(obj...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2019 Ansible Project # 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 class ModuleDocFragment(object): # Windows shell documentation fragment # FIXME: set_module_...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ test_datastore ~~~~~~~~~~~~~~ Datastore tests """ from pytest import raises from flask_security import UserMixin, RoleMixin from flask_security.datastore import Datastore, UserDatastore from utils import init_app_with_options class User(UserMixin): pass class Role(RoleM...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Robert Cernak # # 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 program is distributed in the ...
unknown
codeparrot/codeparrot-clean
from lcc.stars_processing.utilities.base_decider import BaseDecider from lcc.entities.exceptions import QueryInputError class CustomDecider(BaseDecider): ''' This decider allows to specify ranges of coordinates got from descriptors. So there is no need to run `learn` method. Anyway it is implemented to...
unknown
codeparrot/codeparrot-clean
# quoting.py """Various helpers for string quoting/unquoting.""" import re __all__ = [ # _pyqoting / _cquoting "quote_literal", "quote_copy", "quote_bytea_raw", "db_urlencode", "db_urldecode", "unescape", "unquote_literal", # local "quote_bytea_literal", "quote_bytea_copy", "quote_statement",...
unknown
codeparrot/codeparrot-clean
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v2beta1", "metadata": { "name": "v0alpha1.auto_decimals.v42" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "query": { "kind": "DataQuery", "group": "", ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/panel-common/v0alpha1.auto_decimals.v42.v2beta1.json
"""K-Hop Layer and Adaptive Filter Module from https://arxiv.org/pdf/1706.09916.pdf""" from __future__ import division from __future__ import unicode_literals __author__ = "Vignesh Ram Somnath" __license__ = "MIT" import numpy as np import tensorflow as tf import os import sys import logging from deepchem.models.te...
unknown
codeparrot/codeparrot-clean
{ "XCLAIM": { "summary": "Changes, or acquires, ownership of a message in a consumer group, as if the message was delivered a consumer group member.", "complexity": "O(log N) with N being the number of messages in the PEL of the consumer group.", "group": "stream", "since": "5.0.0", ...
json
github
https://github.com/redis/redis
src/commands/xclaim.json
"""Helpers for sun events.""" from __future__ import annotations import datetime from typing import TYPE_CHECKING from homeassistant.const import SUN_EVENT_SUNRISE, SUN_EVENT_SUNSET from homeassistant.core import HomeAssistant, callback from homeassistant.loader import bind_hass from homeassistant.util import dt as d...
unknown
codeparrot/codeparrot-clean
// Copyright 2022 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 // This file contains functions and apis to support the "merge" // subcommand of "go tool covdata". import ( "flag" "fmt" "internal/coverage" ...
go
github
https://github.com/golang/go
src/cmd/covdata/merge.go
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.matchers; import java.io.Serializable; public class LessOrEqual<T extends Comparable<T>> extends CompareTo<T> implements Serializable { public LessOrEqual(T value) ...
java
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/internal/matchers/LessOrEqual.java
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'qt_wfm_interface.ui' # # Created: Thu Jun 18 23:41:03 2009 # by: PyQt4 UI code generator 4.4.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_InterfaceWindow(object): def setupUi(...
unknown
codeparrot/codeparrot-clean