code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
from __future__ import unicode_literals, division, absolute_import from tests import FlexGetBase from nose.plugins.attrib import attr class TestRottenTomatoesLookup(FlexGetBase): __yaml__ = """ tasks: test: mock: # tests search - {title: 'Toy Story'} ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
unknown
codeparrot/codeparrot-clean
# default separator (whitespace) print("a b".rsplit()) #print(" a b ".rsplit(None)) #print(" a b ".rsplit(None, 1)) #print(" a b ".rsplit(None, 2)) #print(" a b c ".rsplit(None, 1)) #print(" a b c ".rsplit(None, 0)) #print(" a b c ".rsplit(None, -1)) # empty separator should fail...
unknown
codeparrot/codeparrot-clean
# # (c) 2015, Peter Sprygada <psprygada@ansible.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) any late...
unknown
codeparrot/codeparrot-clean
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: disallow-username-in-url Help: Disallow username in URL Added: 7.61.0 Category: curl Multi: boolean See-also: - proto Example: - --disallow-username-in-url $URL --- # `--disallow-username-in-url` Exit with error if ...
unknown
github
https://github.com/curl/curl
docs/cmdline-opts/disallow-username-in-url.md
import unittest import rugby_rankings.ratings_input class TestRatingsInput(unittest.TestCase): def test_construct(self): inputObj = rugby_rankings.ratings_input.RatingsInput(0.0, 0.0, 0, 0) self.assertTrue( isinstance(inputObj, rugby_rankings.ratings_input.RatingsInput) ) ...
unknown
codeparrot/codeparrot-clean
import sys from benchmark_base import BenchmarkBase import torch class Benchmark(BenchmarkBase): N = 20 def __init__(self): super().__init__( category="update_hint", backend="inductor", device="cpu", ) def name(self): return f"{self.category()...
python
github
https://github.com/pytorch/pytorch
benchmarks/dynamo/pr_time_benchmarks/benchmarks/update_hint_benchmark.py
# (C) British Crown Copyright 2010 - 2015, Met Office # # This file is part of Iris. # # Iris 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 l...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import bisect import QtCore import rospy import rospkg from python_qt_binding.QtCore import Qt, QObject, QAbstractItemModel from vigir_pluginlib_msgs.msg import PluginState, PluginDescription # Tree Model for Plugins class PluginTreeModel(QtCore.QAbstractItemModel): def __init__(self, p...
unknown
codeparrot/codeparrot-clean
#include "snowball_runtime.h" #ifdef SNOWBALL_RUNTIME_THROW_EXCEPTIONS # include <new> # include <stdexcept> # define SNOWBALL_RETURN_OK return # define SNOWBALL_RETURN_OR_THROW(R, E) throw E # define SNOWBALL_PROPAGATE_ERR(F) F #else # define SNOWBALL_RETURN_OK return 0 # define SNOWBALL_RETURN_OR_THROW(R, E) return ...
c
github
https://github.com/postgres/postgres
src/backend/snowball/libstemmer/utilities.c
# Copyright 2015, 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 or agreed to in writing,...
unknown
codeparrot/codeparrot-clean
### CAPOW (calculation and plotting of optimal weights) ### # NOTES: # # Written using pyqt (4.10.1), matplotlib (2.0.2), numpy (1.12.1), scipy (0.19.0), python (2.7.5) # requires window_tab.py (gui) and shelx_weighting.py (code to run weighting minimization) # input: .fcf, SHELX LIST 4 or 8, (with .cif and .ins) or...
unknown
codeparrot/codeparrot-clean
from os import system import pyttsx #Setting up the speaker def onStart(name): print "" def onWord(name, location, length): print "" def onEnd(name, completed): print "" engine = pyttsx.init() rate = engine.getProperty('rate') engine.setProperty('rate', rate-50) engine.connect('started-utterance', onStart) en...
unknown
codeparrot/codeparrot-clean
from scenario.lib import * # test begins, register start time start() # Generic tests for host in scenario.nodes(): hostinfo = scenario.platform.hosts[host].info osname = hostinfo['osname'] if 'osname' in hostinfo else "" run(host, 'fusion', Err.CONTINUE, OSNAME=osname) run_on("all", 'agent', Err.CONTINUE) # ...
unknown
codeparrot/codeparrot-clean
""" Airy Functions -------------- * airy -- Airy functions and their derivatives. * airye -- Exponentially scaled Airy functions * ai_zeros -- [+]Zeros of Airy functions Ai(x) and Ai'(x) * bi_zeros -- [+]Zeros of Airy functions Bi(x) and Bi'(x) Elliptic Functions and Integrals -----------------------------...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/generator/injection/InjectionComponent.java
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage.stubbing; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import static org.mockit...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockitousage/stubbing/SmartNullsStubbingTest.java
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. // Copyright (C) 2025, Institute of Software, Chinese Academy of Sciences. #include "rvv_hal.hpp" #include <cfloat> #include...
cpp
github
https://github.com/opencv/opencv
hal/riscv-rvv/src/core/lu.cpp
"""Support for scanning a network with nmap.""" from collections import namedtuple from datetime import timedelta import logging from getmac import get_mac_address from nmap import PortScanner, PortScannerError import voluptuous as vol from homeassistant.components.device_tracker import ( DOMAIN, PLATFORM_SCH...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/mtd/arasan,nand-controller.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Arasan NAND Flash Controller with ONFI 3.1 support allOf: - $ref: nand-controller.yaml maintainers: - Michal Si...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml
""" This file is a copy of the scipy.sparse.csgraph._laplacian module from SciPy 1.12 scipy.sparse.csgraph.laplacian supports sparse arrays only starting from Scipy 1.12, see https://github.com/scipy/scipy/pull/19156. This vendored file can be removed as soon as Scipy 1.12 becomes the minimum supported version. Lapla...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/externals/_scipy/sparse/csgraph/_laplacian.py
"""Tools for specifying BSON codec options.""" import collections from distutils import version # pylint: disable=no-name-in-module try: from bson import codec_options import pymongo _PYMONGO_VERSION = version.LooseVersion(pymongo.version) except ImportError: codec_options = None _PYMONGO_VERSION...
unknown
codeparrot/codeparrot-clean
--- name: Verify released binary assets permissions: read-all on: release: types: [published] jobs: verify-assets: name: Verify released binary assets runs-on: ubuntu-latest steps: - name: Verify binary assets env: GH_TOKEN: ${{ github.token }} RELEASE: ${{ github...
unknown
github
https://github.com/etcd-io/etcd
.github/workflows/verify-released-assets.yaml
# 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
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + impo...
unknown
codeparrot/codeparrot-clean
from multiprocessing import Event, Value from pathlib import Path from tempfile import TemporaryDirectory import pytest from intercom.back_end_binding import InterComBackEndBinding from objects.firmware import Firmware from scheduler.Analysis import AnalysisScheduler from scheduler.Unpacking import UnpackingScheduler...
unknown
codeparrot/codeparrot-clean
"""Functions to construct sparse matrices """ from __future__ import division, print_function, absolute_import __docformat__ = "restructuredtext en" __all__ = ['spdiags', 'eye', 'identity', 'kron', 'kronsum', 'hstack', 'vstack', 'bmat', 'rand', 'diags', 'block_diag'] from warnings import warn import num...
unknown
codeparrot/codeparrot-clean
#!/bin/bash set -euo pipefail VALIDATION_SCRIPTS_VERSION=2.7.1 GRADLE_ENTERPRISE_ACCESS_KEY=$(vault kv get -field=value secret/ci/elastic-elasticsearch/gradle-enterprise-api-key) export GRADLE_ENTERPRISE_ACCESS_KEY curl -s -L -O https://github.com/gradle/gradle-enterprise-build-validation-scripts/releases/download/v$...
unknown
github
https://github.com/elastic/elasticsearch
.buildkite/scripts/gradle-build-cache-validation.sh
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
unknown
codeparrot/codeparrot-clean
function Component() { const foo = () => { // Cannot assign to globals someUnknownGlobal = true; moduleLocal = true; }; foo(); }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.reassignment-to-global-indirect.js
# Copyright 2014 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 ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/mlir/lite/stablehlo/transforms/transforms.h
import fs from 'node:fs/promises' import { dirname, resolve } from 'node:path' import { type Plugin, type Root } from 'postcss' import { parseImportParams } from '../../../../tailwindcss/src/at-import' import { segment } from '../../../../tailwindcss/src/utils/segment' import * as ValueParser from '../../../../tailwind...
typescript
github
https://github.com/tailwindlabs/tailwindcss
packages/@tailwindcss-upgrade/src/codemods/css/migrate-import.ts
#!/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
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from neutron.models import Word from .models import AlternateData class AlternateDataForm(forms.ModelForm): word = forms.CharField() class Meta: model = AlternateData fields = '__all__' def __init__(self, *args, **kw...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2024 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.fe10.test.cases.generated.cases.components.javaInteroperabilityCompo...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fe10/tests-gen/org/jetbrains/kotlin/analysis/api/fe10/test/cases/generated/cases/components/javaInteroperabilityComponent/Fe10IdeNormalAnalysisSourceModuleExpressionTypeAsPsiTypeTestGenerated.java
from templeplus.pymod import PythonModifier from toee import * import tpdp from utilities import * print "Registering sp-Magic Circle Outward Fixed" # args: (0-4) # 0 - spell_id # 1 - duration # 2 - Type Flag (1-Good, 2- Evil, 3- Law, 4- Chaos) # 3 - aoe id # 4 - spare #List of spells protection from evil grants immu...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.web.resource}. """ from twisted.trial.unittest import TestCase from twisted.web.error import UnsupportedMethod from twisted.web.resource import ( NOT_FOUND, FORBIDDEN, Resource, ErrorPage, NoResource, ForbiddenResourc...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class Canalc2IE(InfoExtractor): IE_NAME = 'canalc2.tv' _VALID_URL = r'http://.*?\.canalc2\.tv/video\.asp\?.*?idVideo=(?P<id>\d+)' _TEST = { 'url': 'http://www.canalc2.tv/video.asp?idVideo=12163&vo...
unknown
codeparrot/codeparrot-clean
from __future__ import annotations import gzip import io import tarfile from typing import ( TYPE_CHECKING, Any, ) import zipfile from pandas.compat._optional import import_optional_dependency import pandas as pd if TYPE_CHECKING: from collections.abc import Callable from pathlib import Path fr...
python
github
https://github.com/pandas-dev/pandas
pandas/_testing/_io.py
# -*- coding: utf-8 -*- from dateutil.relativedelta import relativedelta from openerp import fields from openerp.tests import common class TestEventCommon(common.TransactionCase): def setUp(self): super(TestEventCommon, self).setUp() # Usefull models self.Users = self.env['res.users'] ...
unknown
codeparrot/codeparrot-clean
# -- encoding: UTF-8 -- import re import sys, json, time import argparse def read_messages(filenames): messages = set() user_map = {} for fn in sorted(filenames): with open(fn, "r") as infp: data = json.load(infp) for m in data["messages"]: messages.add((floa...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid at kovidgoyal.net>' __docformat__ = 'restructuredtext en' ...
unknown
codeparrot/codeparrot-clean
# TODO: Test robust skewness # TODO: Test robust kurtosis import numpy as np import pandas as pd from numpy.testing import (assert_almost_equal, assert_raises, TestCase) from statsmodels.stats.stattools import (omni_normtest, jarque_bera, durbin_watson, _medcouple_1d, medcouple,...
unknown
codeparrot/codeparrot-clean
# Script for building the _ssl and _hashlib modules for Windows. # Uses Perl to setup the OpenSSL environment correctly # and build OpenSSL, then invokes a simple nmake session # for the actual _ssl.pyd and _hashlib.pyd DLLs. # THEORETICALLY, you can: # * Unpack the latest SSL release one level above your main Python ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import os import re from unittest import skipUnless from django.contrib.gis.db.models import Extent3D, Union from django.contrib.gis.db.models.functions import ( AsGeoJSON, AsKML, Length, Perimeter, Scale, Translate, ) from django.contrib.gis.gdal import HAS_GDAL from djang...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations DOCUMENTATION = """ module: _not_deprecated short_description: This module is not deprecated description: Its name has a leading underscore, but it is not deprecated. autho...
python
github
https://github.com/ansible/ansible
test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/_not_deprecated.py
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Run regression test suite. This module calls down into individual test cases via subprocess. It will f...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ A simple countdown timer. This is a very basic countdown timer. You can change the timer length as well as pausing, restarting and resetting it. Currently this is more of a demo of a composite. Each part of the timer can be changed independently hours, minutes, seconds using mouse button...
unknown
codeparrot/codeparrot-clean
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
cmd/kubeadm/app/cmd/version.go
--- title: RouterProvider --- # RouterProvider <!-- ⚠️ ⚠️ IMPORTANT ⚠️ ⚠️ Thank you for helping improve our documentation! This file is auto-generated from the JSDoc comments in the source code, so please edit the JSDoc comments in the file below and this file will be re-generated once those changes are merged. ht...
unknown
github
https://github.com/remix-run/react-router
docs/api/data-routers/RouterProvider.md
module.exports = { redirects() { return [ { source: "/", destination: "/en", permanent: true, }, ]; }, };
javascript
github
https://github.com/vercel/next.js
examples/with-i18n-rosetta/next.config.js
'''Just two examples for using rpy These examples are mainly for developers. # example 1: OLS using LM # example 2: GLM with binomial family The second results isn't exactly correct since it assumes that each obvervation has the same number of trials see datasets/longley for an R script with the correct s...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 """ Salt Edge Account Information API API Reference for services # noqa: E501 OpenAPI spec version: 5.0.0 Contact: support@saltedge.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python ...
unknown
codeparrot/codeparrot-clean
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
unknown
codeparrot/codeparrot-clean
# settings file for builds. # if you want to have custom builds, copy this file to "localbuildsettings.py" and make changes there. # possible fields: # resourceBaseUrl - optional - the URL base for external resources (all resources embedded in standard IITC) # distUrlBase - optional - the base URL to use for update c...
unknown
codeparrot/codeparrot-clean
''' This file contains all the necessary functions for encrypting the message ''' #import the necessary files import sys, pickle, ReadFromFile DEFAULT = 128 #default block size BYTE_SIZE = 256 #One byte has 256 different values according to ASCII ''' Convert the message in the block form ''...
unknown
codeparrot/codeparrot-clean
import { Comment, type Component, type ComponentInternalInstance, type DirectiveBinding, Fragment, type FunctionalComponent, Static, Text, type VNode, type VNodeArrayChildren, type VNodeProps, mergeProps, ssrUtils, warn, } from 'vue' import { NOOP, ShapeFlags, escapeHtml, escapeHtmlC...
typescript
github
https://github.com/vuejs/core
packages/server-renderer/src/render.ts
#ifndef INTERNAL_RANDOM_H /*-*-C-*-vi:se ft=c:*/ #define INTERNAL_RANDOM_H /** * @author Ruby developers <ruby-core@ruby-lang.org> * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute ...
c
github
https://github.com/ruby/ruby
internal/random.h
import numpy as np from sklearn.metrics.cluster import adjusted_rand_score from sklearn.metrics.cluster import homogeneity_score from sklearn.metrics.cluster import completeness_score from sklearn.metrics.cluster import v_measure_score from sklearn.metrics.cluster import homogeneity_completeness_v_measure from sklearn...
unknown
codeparrot/codeparrot-clean
"""Test rate limiter.""" import time import pytest from freezegun import freeze_time from langchain_core.rate_limiters import InMemoryRateLimiter @pytest.fixture def rate_limiter() -> InMemoryRateLimiter: """Return an instance of InMemoryRateLimiter.""" return InMemoryRateLimiter( requests_per_secon...
python
github
https://github.com/langchain-ai/langchain
libs/core/tests/unit_tests/rate_limiters/test_in_memory_rate_limiter.py
""" The `ast` module helps Python applications to process trees of the Python abstract syntax grammar. The abstract syntax itself might change with each Python release; this module helps to find out programmatically what the current grammar looks like and allows modifications of it. An abstract syntax tree can be gen...
python
github
https://github.com/python/cpython
Lib/ast.py
.sk-global { /* Definition of color scheme common for light and dark mode */ --sklearn-color-text: #000; --sklearn-color-text-muted: #666; --sklearn-color-line: gray; /* Definition of color scheme for unfitted estimators */ --sklearn-color-unfitted-level-0: #fff5e6; --sklearn-color-unfitted-level-1: #f6e4...
css
github
https://github.com/scikit-learn/scikit-learn
sklearn/utils/_repr_html/estimator.css
""" Caching utilities for robotic browsers. Credit to https://github.com/Lukasa/httpcache """ import logging import datetime from requests.adapters import HTTPAdapter from robobrowser.compat import OrderedDict, iteritems logger = logging.getLogger(__name__) # Modified from https://github.com/Lukasa/httpcache/blob/m...
unknown
codeparrot/codeparrot-clean
--- setup: - skip: features: - allowed_warnings - allowed_warnings_regex --- "Test with existing allowed warnings": - do: allowed_warnings: - "a" - "b" allowed_warnings_regex: - "c" - "d" something: id: "something" - match: { acknowledg...
unknown
github
https://github.com/elastic/elasticsearch
build-tools-internal/src/test/resources/rest/transform/warnings/with_existing_allowed_warnings.yml
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true # :markup: markdown require "nio" module ActionCable module Connection class StreamEventLoop def initialize @nio = @executor = @thread = nil @map = {} @stopping = false @todo = Queue.new @spawn_mutex = Mutex.new end def t...
ruby
github
https://github.com/rails/rails
actioncable/lib/action_cable/connection/stream_event_loop.rb
import unittest from django.template.smartif import IfParser, Literal class SmartIfTests(unittest.TestCase): def assertCalcEqual(self, expected, tokens): self.assertEqual(expected, IfParser(tokens).parse().eval({})) # We only test things here that are difficult to test elsewhere # Many other test...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function, division from sympy import sqrt, exp, S, pi, I from sympy.physics.quantum.constants import hbar def wavefunction(n, x): """ Returns the wavefunction for particle on ring. n is the quantum number, x is the angle, here n can be positive as well as negative whic...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Cloudbase Solutions SRL # 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 r...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
unknown
codeparrot/codeparrot-clean
# Copyright 2011 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
unknown
codeparrot/codeparrot-clean
from yowsup.stacks import YowStack from .layer import SyncLayer from yowsup.layers import YowLayerEvent from yowsup.layers.auth import YowCryptLayer, YowAuthenticationProtocolLayer, AuthError from yowsup.layers.coder import YowCoderLayer from yowsup.layers.network ...
unknown
codeparrot/codeparrot-clean
#pragma once #include <c10/core/impl/PyInterpreter.h> #include <c10/macros/Export.h> namespace c10::impl { struct C10_API PythonDispatcherTLS { static void set_state(PyInterpreter* state); static PyInterpreter* get_state(); static void reset_state(); }; struct C10_API DisablePythonDispatcher { DisablePython...
c
github
https://github.com/pytorch/pytorch
c10/core/impl/PythonDispatcherTLS.h
import functools import os import re from io import open from designer.core.undo_manager import WidgetDragOperation, WidgetOperation from designer.uix.confirmation_dialog import ConfirmationDialogSave from designer.uix.settings import SettingListContent from designer.utils.toolbox_widgets import toolbox_widgets as widg...
unknown
codeparrot/codeparrot-clean
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package runtime import ( "internal/abi" "internal/goarch" "unsafe" ) const ( _NSIG = 33 _SI_USER = 0 _SS_DISABLE = 4 _SIG_BLOCK = 1 _SIG...
go
github
https://github.com/golang/go
src/runtime/os_dragonfly.go
import os import sys from xbmcswift2 import Plugin import xbmcaddon __addonname__ = 'plugin.video.rainiertamayo' __addonpath__ = xbmcaddon.Addon(id=__addonname__).getAddonInfo('path') # append lib directory sys.path.append(os.path.join(__addonpath__, 'resources', 'lib')) from rainiertamayo import RainierTamayo plug...
unknown
codeparrot/codeparrot-clean
// Copyright 2011 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 image import ( "image/color" "image/color/palette" "testing" ) type image interface { Image Opaque() bool Set(int, int, color.Color) SubImage(R...
go
github
https://github.com/golang/go
src/image/image_test.go
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package command import ( "encoding/json" "errors" "fmt" "sort" "strings" "time" "github.com/hashicorp/cli" "github.com/hashicorp/vault/api" "github.com/posener/complete" "github.com/ryanuber/columnize" ) var ( _ cli.Command ...
go
github
https://github.com/hashicorp/vault
command/operator_usage.go
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #ifndef _NGX_MAIL_H_INCLUDED_ #define _NGX_MAIL_H_INCLUDED_ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h> #include <ngx_event_connect.h> #if (NGX_MAIL_SSL) #include <ngx_mail_ssl_module.h> #endif typedef struct { void ...
c
github
https://github.com/nginx/nginx
src/mail/ngx_mail.h
use crate::future::maybe_done::{maybe_done, MaybeDone}; use pin_project_lite::pin_project; use std::future::Future; use std::pin::Pin; use std::task::{Context, Poll}; pub(crate) fn try_join3<T1, F1, T2, F2, T3, F3, E>( future1: F1, future2: F2, future3: F3, ) -> TryJoin3<F1, F2, F3> where F1: Future<O...
rust
github
https://github.com/tokio-rs/tokio
tokio/src/future/try_join.rs
# -*- coding: utf-8 -*- # (c) 2012 Canonical Ltd. # # Authors: Alberto Milone <alberto.milone@canonical.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013 Mirantis 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 writ...
unknown
codeparrot/codeparrot-clean
CHANGELOG ========= 7.4 --- * Wire the `$profilerDumper` argument in `DumpListener` 4.1.0 ----- * Added the `server:dump` command to run a server collecting and displaying dumps on a single place with multiple formats support
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/DebugBundle/CHANGELOG.md
# -*- coding: utf-8 -*- # (c) 2018 Matt Martz <matt@sivel.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible.module_utils.urls import generic_urlparse from ansible.module_u...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2011 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...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 # Dear future self, # # You're looking at this file because # the parse function finally broke. # # It's not fixable. You have to rewrite it. # Sincerely, past self # # Also, it's probably at least # 2013. Did you ever take # that trip to Iceland? import re def get_type_link(typ, file): from gen_d...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2021 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.CoreMatchers.endsWith; import static org.hamcrest.CoreMatchers.not; import static org.hamcres...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockito/MockitoEnvTest.java
# 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
#!/usr/bin/env bash # Copyright 2021 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. set -xeuo pipefail if [ -z "$1" ] then echo 'Usage: build_impl.sh CONFIG' exit 1 fi CONFIG="$1" EXTRA_TARGETS= # Extra targets to build on L...
unknown
github
https://github.com/cockroachdb/cockroach
build/teamcity/cockroach/ci/builds/build_impl.sh
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you ca...
unknown
codeparrot/codeparrot-clean
"use strict"; const { describeCases } = require("./TestCases.template"); describe("TestCases", () => { describeCases({ name: "devtool-eval-cheap-source-map", devtool: "eval-cheap-source-map" }); });
javascript
github
https://github.com/webpack/webpack
test/TestCasesDevtoolEvalCheapSourceMap.test.js
from cement.core.foundation import TestApp from cement.utils.misc import init_defaults def test_dummy_output(): with TestApp() as app: app.run() app.render({'foo': 'bar'}) assert app.last_rendered == ({'foo': 'bar'}, None) def test_dummy_template(tmp): with TestApp() as app: ap...
unknown
codeparrot/codeparrot-clean
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
cmd/kube-controller-manager/app/options/deploymentcontroller.go
# -*- coding: utf-8 -*- # Copyright(C) 2012 Arno Renevier # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
unknown
codeparrot/codeparrot-clean
<?php declare(strict_types=1); /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Util\Ht...
php
github
https://github.com/composer/composer
src/Composer/Util/Http/RequestProxy.php
/* * By downloading, copying, installing or using the software you agree to this license. * If you do not agree to this license, do not download, install, * copy or use the software. * * * License Agreement * For Open Source Computer Vision Library * ...
cpp
github
https://github.com/opencv/opencv
hal/carotene/src/common.cpp