code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Test for -rpcbind, as well as -rpcallowip and -rpcconnect import tempfile import traceback from test_...
unknown
codeparrot/codeparrot-clean
from django.test import RequestFactory from olympia.amo.tests import TestCase, user_factory from olympia.devhub.permissions import IsSubmissionAllowedFor from olympia.users.models import ( DisposableEmailDomainRestriction, EmailUserRestriction, IPNetworkUserRestriction, ) class TestIsSubmissionAllowedFor(...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2014 The tcollector Authors. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or (at your # option) any later version. This program is ...
unknown
codeparrot/codeparrot-clean
#include "test/jemalloc_test.h" #define MAXALIGN (((size_t)1) << 22) #define NITER 3 TEST_BEGIN(test_basic) { void *ptr = mallocx(64, 0); sdallocx(ptr, 64, 0); } TEST_END TEST_BEGIN(test_alignment_and_size) { size_t nsz, sz, alignment, total; unsigned i; void *ps[NITER]; for (i = 0; i < NITER; i++) { ps[i] ...
c
github
https://github.com/redis/redis
deps/jemalloc/test/integration/sdallocx.c
# LayerMapping -- A Django Model/OGR Layer Mapping Utility """ The LayerMapping class provides a way to map the contents of OGR vector files (e.g. SHP files) to Geographic-enabled Django models. For more information, please consult the GeoDjango documentation: http://geodjango.org/docs/layermapping.html """ impo...
unknown
codeparrot/codeparrot-clean
package org.mockitousage.androidtest open class BasicOpenClass { open fun emptyMethod() { //do nothing } } class BasicClosedClass { fun emptyMethod() { //do nothing } } interface BasicInterface { fun interfaceMethod() } class BasicOpenClassReceiver(private val basicOpenClass: Bas...
kotlin
github
https://github.com/mockito/mockito
mockito-integration-tests/android-tests/src/main/java/org/mockitousage/androidtest/BasicClassesForTesting.kt
/* * 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
distribution/tools/keystore-cli/src/main/java/org/elasticsearch/cli/keystore/AddStringKeyStoreCommand.java
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 //go:build !enterprise package server import ( "errors" "fmt" "github.com/hashicorp/hcl/hcl/ast" ) type entConfig struct{} func (ec *entConfig) parseConfig(list *ast.ObjectList, source string) error { return nil } func (ec entConfig) Merg...
go
github
https://github.com/hashicorp/vault
command/server/config_util.go
from __future__ import unicode_literals import datetime import pickle import unittest import warnings from django.test import TestCase from django.utils import six from django.utils.encoding import force_text from django.utils.version import get_version from .models import Container, Event, Group, Happening, M2MMode...
unknown
codeparrot/codeparrot-clean
/* Copyright 2015 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/lib/io/proto_encode_helper.h
# -*- coding: utf-8 -*- # Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations DOCUMENTATION = r""" --- module: wait_for_connection short_description: Waits until remote system is ...
python
github
https://github.com/ansible/ansible
lib/ansible/modules/wait_for_connection.py
//! Upvar (closure capture) collection from cross-body HIR uses of `Res::Local`s. use rustc_data_structures::fx::{FxHashSet, FxIndexMap}; use rustc_hir as hir; use rustc_hir::def::Res; use rustc_hir::intravisit::{self, Visitor}; use rustc_hir::{self, HirId}; use rustc_middle::query::Providers; use rustc_middle::ty::Ty...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_passes/src/upvars.rs
// Copyright 2013 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. #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <process.h> #include "_cgo_export.h" __stdcall static unsigned int addThread(void *p) { int i, max; ...
c
github
https://github.com/golang/go
src/cmd/cgo/internal/test/cthread_windows.c
#!/usr/bin/env python """ This script is used to run tests, create a coverage report and output the statistics at the end of the tox run. To run this script just execute ``tox``. """ import re from fabric.api import local, warn from fabric.colors import green, red if __name__ == '__main__': local('flake8 --ignore...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Peter Mounce <public@neverrunwithscissors.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...
unknown
codeparrot/codeparrot-clean
"""Support for IOTA wallets.""" from datetime import timedelta from iota import Iota import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.helpers.discovery import load_platform from homeassistant.helpers.entity import Entity CONF_IRI = "iri" CONF_TESTNET = "testnet" CONF_W...
unknown
codeparrot/codeparrot-clean
--- title: Cache API author: pathawks date: 2018-08-17 12:56:24 -0400 --- Jekyll includes a caching API, which is used both internally as well as exposed for plugins, which can be used to cache the output of deterministic functions to speed up site generation. This cache will be persistent across builds, but cleared w...
unknown
github
https://github.com/jekyll/jekyll
docs/_tutorials/cache-api.md
# Copyright 2013 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
unknown
codeparrot/codeparrot-clean
import os, sys, getopt try: from PyQt4 import QtCore, QtGui QtCore.Signal = QtCore.pyqtSignal QtCore.Slot = QtCore.pyqtSlot except ImportError: try: from PySide import QtCore, QtGui QtCore.QString = str except ImportError: raise ImportError("Cannot load either PyQt or PySide...
unknown
codeparrot/codeparrot-clean
#coding:utf-8 import functools from cactus.utils.internal import getargspec from cactus.plugin import defaults class PluginManager(object): def __init__(self, site, loaders): self.site = site self.loaders = loaders self.reload() for plugin_method in defaults.DEFAULTS: ...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/qcom,qcs615-dispcc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm Display Clock & Reset Controller on QCS615 maintainers: - Taniya Das <quic_tdas@quicinc.com> description: ...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/qcom,qcs615-dispcc.yaml
# 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 applicable law or agree...
unknown
codeparrot/codeparrot-clean
from denim.constants import RootUser from tests._utils import ApiTestCase from denim.service import supervisor class TestServiceSupervisor(ApiTestCase): def test_manager_start(self): supervisor.manager_start() self.assertSudo('/etc/init.d/supervisor start', user=RootUser) def test_manager_sto...
unknown
codeparrot/codeparrot-clean
/*M/////////////////////////////////////////////////////////////////////////////////////// // // This is a test file for the function decomposeHomography contributed to OpenCV // by Samson Yilma. // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing o...
cpp
github
https://github.com/opencv/opencv
modules/calib3d/test/test_homography_decomp.cpp
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os from distutils.version import LooseVersion from astropy.visualization.mpl_normalize import simple_norm from astropy import log from astropy.io.fits import getdata def fits2bitmap(filename, ext=0, out_fn=None, stretch='linear', ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # With the MindfulClock you turn your device into a Bell of Mindfulness. # Concept, Design: Marcurs Möller # <marcus.moeller@outlook.com> # <http://apps.microsoft.com/windows/de-de/app/ # mindfulclock/58063160-9cc6-4dee-9d92-...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- #import logging import re import os.path from traceback import format_exc from urllib import unquote, quote, urlencode from urlparse import urljoin, urlunsplit from datetime import datetime, timedelta import tenjin from tenjin.helpers import * from setting import * import tornado.web #Memca...
unknown
codeparrot/codeparrot-clean
// errorcheck // Copyright 2017 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. // Verify that copy arguments requirements are enforced by the // compiler. package main func main() { si := make([]int, 8) sf := make([]flo...
go
github
https://github.com/golang/go
test/copy1.go
from apgl.graph.GeneralVertexList import GeneralVertexList from apgl.graph.test.AbstractVertexListTest import AbstractVertexListTest from apgl.util.PathDefaults import PathDefaults import unittest import logging class GeneralVertexListTest(unittest.TestCase, AbstractVertexListTest): def setUp(self): self.V...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 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
# -*- coding: utf-8 -*- # Copyright 2010-2012 Kolab Systems AG (http://www.kolabsys.com) # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software ...
unknown
codeparrot/codeparrot-clean
test_kind: js_test selector: roots: - src/mongo/db/modules/enterprise/jstests/external_auth_oidc/*.js executor: config: shell_options: nodb: ""
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/suites/external_auth_oidc.yml
import weakref import parsel import pytest from packaging import version from scrapy.http import HtmlResponse, TextResponse, XmlResponse from scrapy.selector import Selector PARSEL_VERSION = version.parse(getattr(parsel, "__version__", "0.0")) PARSEL_18_PLUS = PARSEL_VERSION >= version.parse("1.8.0") class TestSele...
python
github
https://github.com/scrapy/scrapy
tests/test_selector.py
from __future__ import unicode_literals import copy from django.test import TestCase from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.settings import api_settings from rest_framework.test import APIRequestFactory from rest...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from cgi import escape from wtforms.compat import text_type, string_types, iteritems __all__ = ( 'CheckboxInput', 'FileInput', 'HiddenInput', 'ListWidget', 'PasswordInput', 'RadioInput', 'Select', 'SubmitInput', 'TableWidget', 'TextArea', 'TextInput', 'Option' ) d...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import datetime import pickle import warnings from operator import attrgetter from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core import management from django.db import DEFAULT_DB_ALIAS, connections, router, t...
unknown
codeparrot/codeparrot-clean
import logging #import traceback from pypes.component import Component log = logging.getLogger(__name__) class DeleteField(Component): __metatype__ = 'TRANSFORMER' def __init__(self): # initialize parent class Component.__init__(self) #Setup any user parameters required by this comp...
unknown
codeparrot/codeparrot-clean
import sys import datetime import os from contextlib import contextmanager import freezegun import pytest import pretend import pip from pip._vendor import lockfile from pip.utils import outdated @pytest.mark.parametrize( ['stored_time', 'newver', 'check', 'warn'], [ ('1970-01-01T10:00:00Z', '2.0', T...
unknown
codeparrot/codeparrot-clean
''' Native support for Multitouch devices on Linux, using libmtdev. =============================================================== The Mtdev project is a part of the Ubuntu Maverick multitouch architecture. You can read more on http://wiki.ubuntu.com/Multitouch To configure MTDev, it's preferable to use probesysfs p...
unknown
codeparrot/codeparrot-clean
#!/bin/sh # # Copyright (c) 2010 Johan Herland # test_description='Test notes merging with auto-resolving strategies' . ./test-lib.sh # Set up a notes merge scenario with all kinds of potential conflicts test_expect_success 'setup commits' ' test_commit 1st && test_commit 2nd && test_commit 3rd && test_commit 4t...
unknown
github
https://github.com/git/git
t/t3309-notes-merge-auto-resolve.sh
from pynes.tests import HexTestCase from pynes.compiler import lexical, syntax, semantic from pynes.cartridge import Cartridge ''' from pynes.examples.movingsprite_translated import game class MovingSpriteTranslatedTest(HexTestCase): def __init__(self, testname): super(MovingSpriteTranslatedTest, self)._...
unknown
codeparrot/codeparrot-clean
 import urllib import urllib2 import cookielib import time import StringIO import gzip import sys import re import time import os import copy import zlib import random import urlparse from patent_query import patent_query class quey_proc(): def __init__(self, input_file='setting.csv', output_file=u'结果.csv'): ...
unknown
codeparrot/codeparrot-clean
# Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2017, 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 import os from ast import l...
unknown
codeparrot/codeparrot-clean
# # Hubblemon - Yet another general purpose system monitor # # Copyright 2015 NAVER Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
unknown
codeparrot/codeparrot-clean
# -*- 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
#!/usr/bin/env python # comp_file_lines.py # # Python script to count number of exact matching lines between two files, no edit distance # 2014-09-07 Dan Ellis dpwe@ee.columbia.edu import sys verbose = False onefile = False if len(sys.argv) == 2: # Special case: if a single file, compare the first ws-separated...
unknown
codeparrot/codeparrot-clean
name: HLSL Tests permissions: contents: read on: workflow_dispatch: pull_request: branches: - main paths: - llvm/**/DirectX/** - .github/workflows/hlsl* - clang/*HLSL*/**/* - clang/**/*HLSL* - llvm/**/Frontend/HLSL/**/* jobs: HLSL-Tests: strategy: fail-fa...
unknown
github
https://github.com/llvm/llvm-project
.github/workflows/hlsl-matrix.yaml
#!/usr/bin/env python2 from __future__ import print_function import os import sys def find_match(line, fn, ln): match = {} msgid = "" start = False i = 0 while i < len(line): char = line[i] if start: seg = line[i:i+2] #~ if (seg == '")' and start == '_("') or (seg == "')" and start == "_('"): if (s...
unknown
codeparrot/codeparrot-clean
# Copyright 2005-2011 Mark Dufour and contributors; License Expat (See LICENSE) e = 2.7182818284590451 pi = 3.1415926535897931 def isinf(x): return True def isnan(x): return True def acosh(x): return 1.0 def asinh(x): return 1.0 def atanh(x): return 1.0 def copysign(x, y): return 1.0 def erf(x): return 1.0 def erfc(x...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/bus/qcom,ssc-block-bus.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: The AHB Bus Providing a Global View of the SSC Block on (some) qcom SoCs maintainers: - Michael Srba <Michael.Srba@sez...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/bus/qcom,ssc-block-bus.yaml
{ "private": true, "scripts": { "dev": "next", "build": "next build", "start": "next start" }, "dependencies": { "classnames": "2.3.1", "date-fns": "2.28.0", "next": "latest", "react": "^18.2.0", "react-dom": "^18.2.0" }, "devDependencies": { "@types/node": "18.0.0", ...
json
github
https://github.com/vercel/next.js
examples/cms-enterspeed/package.json
# -*- coding: utf-8 -*- # Copyright: (c) 2018, Johannes Brunswicker <johannes.brunswicker@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): DOCUMENTATION = r''' options: headers: description: - A dictionar...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Copyright (C) 2010 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # stdlib import logging from base64 import b64decode, b64encode # PyCrypto from ...
unknown
codeparrot/codeparrot-clean
// Code generated by "stringer -type=ValueType valuetype.go"; DO NOT EDIT. package schema import "strconv" func _() { // An "invalid array index" compiler error signifies that the constant values have changed. // Re-run the stringer command to generate them again. var x [1]struct{} _ = x[TypeInvalid-0] _ = x[Ty...
go
github
https://github.com/hashicorp/terraform
internal/legacy/helper/schema/valuetype_string.go
{ "html": { "type": "Fragment", "start": 0, "end": 31, "children": [ { "type": "Element", "start": 0, "end": 31, "name": "ul", "attributes": [], "children": [ { "type": "Text", "start": 4, "end": 6, "raw": "\n\t", "data": "\n\t" }, { ...
json
github
https://github.com/sveltejs/svelte
packages/svelte/tests/parser-legacy/samples/implicitly-closed-li/output.json
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Marius Gedminas <marius@pov.lt> # (c) 2016, Matthew Gamble <git@matthewgamble.net> # # 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...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-09-07 14:51 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contact', '0005_contactpage_email_2'), ] operations = [ migrations.AlterFiel...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ''' Production Configurations - Use djangosecure - Use Amazon's S3 for storing static files and uploaded media - Use mailgun to send emails - Use Redis on Heroku ''' from __future__ import absolute_import, unicode_literals from boto.s3.connection import OrdinaryCallingFormat from django.utils...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/interconnect/qcom,kaanapali-rpmh.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm RPMh Network-On-Chip Interconnect on Kaanapali maintainers: - Raviteja Laggyshetty <raviteja.laggyshetty...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/interconnect/qcom,kaanapali-rpmh.yaml
from django import forms from django.forms.models import modelformset_factory from django.utils.translation import ugettext_lazy as _ from . import handler from . import models class DeliveryMethodForm(forms.ModelForm): delivery_type = forms.ChoiceField(label=_('Delivery method'), choices=[]) class Meta: ...
unknown
codeparrot/codeparrot-clean
#pragma once #include <ATen/detail/XPUHooksInterface.h> namespace at::xpu::detail { // The real implementation of XPUHooksInterface struct XPUHooks : public at::XPUHooksInterface { XPUHooks(at::XPUHooksArgs) {} void init() const override; bool hasXPU() const override; std::string showConfig() const override;...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/xpu/detail/XPUHooks.h
#[macro_export] #[deprecated = " This macro has no effect on any version of Serde released in the past 2 years. It was used long ago in crates that needed to support Rustc older than 1.26.0, or Emscripten targets older than 1.40.0, which did not yet have 128-bit integer support. These days Serde requires a Rust compile...
rust
github
https://github.com/serde-rs/serde
serde/src/integer128.rs
######################################################################## # File : CLI.py # Author : Andrei Tsaregorodtsev ######################################################################## """ CLI is the base class for all the DIRAC consoles ( CLIs ). It contains several utilities and signal handlers of ge...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql_test import ( "bytes" "context" gosql "database/sql" "errors" "fmt" "testing" "github.com/cockroachdb/cockroach/pkg/base" "github.com/cockroachdb/c...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/unsplit_range_test.go
#!/usr/bin/env python import random #from math import log, exp, sqrt, pi def test_seed_state(): """test seed() and getstate()/setstate() """ # random ought to be able to deal with seeds in any form, of follows. # following code shouldn't cause an exception. random.seed() random.seed(0) ran...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.h
# -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2015 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by th...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ pygments.lexers.pascal ~~~~~~~~~~~~~~~~~~~~~~ Lexers for Pascal family languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, include, bygroups, ...
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 # distributed under the...
unknown
codeparrot/codeparrot-clean
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
unknown
codeparrot/codeparrot-clean
require 'benchmark_driver/output/simple' # This replicates the legacy benchmark/driver.rb behavior. class BenchmarkDriver::Output::Driver < BenchmarkDriver::Output::Simple def initialize(*) super @stdout = $stdout @strio = StringIO.new $stdout = IOMultiplexer.new(@stdout, @strio) end def with_b...
ruby
github
https://github.com/ruby/ruby
benchmark/lib/benchmark_driver/output/driver.rb
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014 Anler Hernández <hello@anler.me> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
# copied from python-2.7.3's traceback.py # CHANGES: # - some_str is replaced, trying to create unicode strings # from __future__ import absolute_import, division, print_function import types def format_exception_only(etype, value): """Format the exception part of a traceback. The arguments are the exception ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2018 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
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2005, 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 t...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """QGIS Unit tests for the postgres project storage. Note: to prepare the DB, you need to run the sql files specified in tests/testdata/provider/testdata_pg.sh .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright 2014 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 applica...
unknown
github
https://github.com/kubernetes/kubernetes
hack/build-cross.sh
/* * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.webrtc import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.launch import web.errors.DOMException import web.erro...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-webrtc/web/src/io/ktor/client/webrtc/Utils.kt
function Component() { // Cannot assign to globals someUnknownGlobal = true; moduleLocal = true; }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.reassignment-to-global.js
#!/bin/bash #===--- find-overlay-dependencies-loop.sh - driver for find-overlay-dependency.sh---===# # ## 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 ...
unknown
github
https://github.com/apple/swift
utils/find-overlay-dependencies-loop.sh
#!/usr/bin/python # # linearize-data.py: Construct a linear, no-fork version of the chain. # # Copyright (c) 2013 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import json import struct import re imp...
unknown
codeparrot/codeparrot-clean
from django.apps import apps from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.db.models.functions import AsKML, Transform from django.contrib.gis.shortcuts import render_to_kml, render_to_kmz from django.core.exceptions import FieldDoesNotExist from django.db import DEFAULT_DB_ALIAS...
unknown
codeparrot/codeparrot-clean
"""Array printing function $Id: arrayprint.py,v 1.9 2005/09/13 13:58:44 teoliphant Exp $ """ from __future__ import division, absolute_import, print_function __all__ = ["array2string", "array_str", "array_repr", "set_string_function", "set_printoptions", "get_printoptions", "printoptions", "for...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from setuptools import setup, find_packages version = '0.1dev' print '''------------------------------ Installing RNAseq version {} ------------------------------ '''.format(version) setup( name='rnaseq', version=version, author='lx Gui', author_email='guilixuan@gmail.com', ...
unknown
codeparrot/codeparrot-clean
{ "INFO": { "summary": "Returns information and statistics about the server.", "complexity": "O(1)", "group": "server", "since": "1.0.0", "arity": -1, "function": "infoCommand", "history": [ [ "7.0.0", "Added support...
json
github
https://github.com/redis/redis
src/commands/info.json
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
unknown
codeparrot/codeparrot-clean
//===-- ClangdFuzzer.cpp - Fuzz clangd ------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clangd/fuzzer/clangd-fuzzer.cpp
# epydoc # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: __init__.py 1558 2007-02-27 05:28:35Z edloper $ """ Automatic Python reference documentation generator. Epydoc processes Python modules and docstrings to generate formatted API documentation,...
unknown
codeparrot/codeparrot-clean
// Copyright 2025 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package raft import ( "fmt" "math/rand" "testing" pb "github.com/cockroachdb/cockroach/pkg/raft/raftpb" "github.com/stretchr/testify/require" ) func TestTermCach...
go
github
https://github.com/cockroachdb/cockroach
pkg/raft/term_cache_test.go
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2014 OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package cloud import ( "github.com/hashicorp/hcl/v2/hclwrite" "github.com/hashicorp/terraform/internal/backend/backendrun" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/terraform" "github.com/hashi...
go
github
https://github.com/hashicorp/terraform
internal/cloud/cloud_variables.go
#!/usr/bin/env python import os import re from sys import argv scripts, css = argv # filter icon name, ignore alias def fil_icname(line): if re.search('^\.fa-.*:before {$', line): ic_name = re.split("[.:]", line)[1][3:] return ic_name def fil_iccode(line): if re.search('^ content: .*;$', li...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Sylvain Afchain <sylvain.afchain@enovance.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apach...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals, division, absolute_import, print_function import re from flexget.config_schema import process_config # TODO: rename all validator.valid -> validator.accepts / accepted / accept ? class Errors(object): """Create and hold validator error messages.""" def __init__(self)...
unknown
codeparrot/codeparrot-clean
import unittest, os, errno from ctypes import * from ctypes.util import find_library from test import test_support try: import threading except ImportError: threading = None class Test(unittest.TestCase): def test_open(self): libc_name = find_library("c") if libc_name is None: r...
unknown
codeparrot/codeparrot-clean
/* * NOTE: The type resolution defined in this file is considered legacy. * * The new mechanism separates type resolution and promotion into two * distinct steps, as per NEP 43. * Further, the functions in this file rely on the operands rather than * only the DTypes/descriptors. They are still called and at this...
c
github
https://github.com/numpy/numpy
numpy/_core/src/umath/ufunc_type_resolution.c
# Copyright (C) 2011 Andrea Francia Trivolzio(PV) Italy import os from trashcli.trash import ListCmd from files import (write_file, require_empty_dir, make_sticky_dir, make_unsticky_dir, make_unreadable_file, make_empty_file, make_parent_for) from nose.tools import istest from .ou...
unknown
codeparrot/codeparrot-clean
use super::{log1pf, logf, sqrtf}; const LN2: f32 = 0.693147180559945309417232121458176568; /* asinh(x) = sign(x)*log(|x|+sqrt(x*x+1)) ~= x - x^3/6 + o(x^5) */ /// Inverse hyperbolic sine (f32) /// /// Calculates the inverse hyperbolic sine of `x`. /// Is defined as `sgn(x)*log(|x|+sqrt(x*x+1))`. #[cfg_attr(all(test, ...
rust
github
https://github.com/nodejs/node
deps/crates/vendor/libm/src/math/asinhf.rs
# -*- coding: utf-8 -*- ############################################################################### # # PutBucketNotification # Enables Amazon SNS notifications of specified events for a bucket. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (th...
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