code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle; ...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/FormLoginBundle.php
// 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. //go:build (linux && cgo) || (darwin && cgo) || (freebsd && cgo) package plugin /* #cgo linux LDFLAGS: -ldl #include <dlfcn.h> #include <limits.h> #include <s...
go
github
https://github.com/golang/go
src/plugin/plugin_dlopen.go
/* 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/compiler/mlir/tensorflow/ir/tf_ops_n_z.h
# -*- coding: utf-8 -*- """ Legend: Classes to define Vega Legends """ from __future__ import (print_function, division) from .core import grammar, GrammarClass from .properties import PropertySet from ._compat import str_types class LegendProperties(GrammarClass): """Sets of Legend Properties. These proper...
unknown
codeparrot/codeparrot-clean
# # This file is part of Checkbox. # # Copyright 2008 Canonical Ltd. # # Checkbox 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. # # C...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals import codecs import importlib import os from django.apps import apps from django.core.management import CommandError, call_command from django.db import DatabaseError, connection, models from django.test import ignore_warnings, mock, override_settings f...
unknown
codeparrot/codeparrot-clean
from ns_portal.core.resources import ( MetaEndPointResource ) from marshmallow import ( Schema, fields, EXCLUDE, ValidationError ) from ns_portal.database.main_db import ( TUsers ) from sqlalchemy import ( and_ ) from sqlalchemy.orm.exc import ( MultipleResultsFound ) from pyramid.securi...
unknown
codeparrot/codeparrot-clean
import argparse import os import numpy as np from PIL import Image class InconsistentImageError(Exception): """thrown when a selection of images are not the same dimensions""" pass class InsufficientImagesError(Exception): """thrown when there are not enough images to average""" pass def parse(): ...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing import Union from typing_extensions import TypeAlias from .realtime_mcp_tool_call_param import RealtimeMcpToolCallParam from .realtime_mcp_list_tools_param import RealtimeMcpListToolsP...
python
github
https://github.com/openai/openai-python
src/openai/types/realtime/conversation_item_param.py
class BaseScale(object): def __init__(self, min, max, step=None, padding=None): """ Constructor. @param min: The minimum value to display on the scale. @param max: The maximum value to display on the scale. @param step: The value at multiples of which to draw gridlines. """ if step is None: step =...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2013 eNovance SAS <licensing@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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/bigintAmbientMinimal.ts] //// //// [ambient.d.ts] declare const fromDts = 789n; declare namespace Lib { const value = 999n; } //// [main.ts] // Minimal repro from issue declare const n = 123n; // Non-ambient for comparison const regular = 456n; //// [main.js] "use strict"; // Non-ambi...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/bigintAmbientMinimal(target=es2015).js
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import re import codecs class MalformedLocaleFileError(Exception): pass def parse_file(path): return parse(rea...
unknown
codeparrot/codeparrot-clean
import inspect from inspect import getsource import os.path as op from pkgutil import walk_packages import re import sys from unittest import SkipTest import pytest import mne from mne.utils import requires_numpydoc, _pl public_modules = [ # the list of modules users need to access for all functionality 'mne...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2003-2005 Maxim Sobolev. All rights reserved. # Copyright (c) 2006-2014 Sippy Software, Inc. All rights reserved. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistrib...
unknown
codeparrot/codeparrot-clean
import sys import os import client from kivy.app import App from kivy.uix.button import Button from kivy.uix.scatter import Scatter from kivy.uix.label import Label from kivy.uix.floatlayout import FloatLayout from kivy.uix.textinput import TextInput from kivy.uix.boxlayout import BoxLayout from kivy.uix.anchorlayout i...
unknown
codeparrot/codeparrot-clean
test_kind: multi_stmt_txn_passthrough selector: roots: - jstests/core/**/*.js exclude_files: # These tests run in the jscore_txn passthrough suites. - jstests/core/txns/**/*.js # The following tests fail because a certain command or functionality is not supported by # mongos. This command or f...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/suites/multi_stmt_txn_jscore_passthrough_with_migration.yml
#!/usr/bin/env python # Some simple tests for the Python bindings for TDB # Note that this tests the interface of the Python bindings # It does not test tdb itself. # # Copyright (C) 2007-2008 Jelmer Vernooij <jelmer@samba.org> # Published under the GNU LGPLv3 or later import tdb from unittest import TestCase import o...
unknown
codeparrot/codeparrot-clean
/// This file defines the data types we use for words, rules, and /// monoid presentations. Also, a few other fundamental algorithms /// for working with permutations and reduction orders. typealias Symbol = UInt8 let symbols: [Character] = ["a", "b", "c"] func printSymbol(_ s: Symbol) -> Character { return symbol...
swift
github
https://github.com/apple/swift
benchmark/multi-source/Monoids/Presentation.swift
# d3-scale Scales map a dimension of abstract data to a visual representation. Although most often used for encoding data as position, say to map time and temperature to a horizontal and vertical position in a scatterplot, scales can represent virtually any visual encoding, such as color, stroke width, or symbol size....
unknown
github
https://github.com/d3/d3
docs/d3-scale.md
import string from Tkinter import * from Delegator import Delegator #$ event <<redo>> #$ win <Control-y> #$ unix <Alt-z> #$ event <<undo>> #$ win <Control-z> #$ unix <Control-z> #$ event <<dump-undo-state>> #$ win <Control-backslash> #$ unix <Control-backslash> class UndoDelegator(Delegator): max_undo = 1000 ...
unknown
codeparrot/codeparrot-clean
import os import math from scipy import stats import matplotlib.pyplot as plt import matplotlib as mpl from matplotlib import rc import numpy as np import csv with open('2DormCorr-Limited.csv', 'r') as csvfile: fileReader = csv.reader(csvfile, delimiter=',') nameToVisitTimeMap = {} currentName= "" sta...
unknown
codeparrot/codeparrot-clean
""" Handlers for user-related pages: login, logout, signup, verify """ from google.appengine.api import users from webapp2_extras.auth import * from requestmodel import * from webapp2_extras.appengine.auth.models import UserToken from webapp2_extras.appengine.auth.models import User from google.appengine.ext import nd...
unknown
codeparrot/codeparrot-clean
import { type Component, type ComponentInternalInstance, type ComponentOptions, type ConcreteComponent, currentInstance, getComponentName, isInSSRComponentSetup, } from './component' import { isFunction, isObject } from '@vue/shared' import type { ComponentPublicInstance } from './componentPublicInstance'...
typescript
github
https://github.com/vuejs/core
packages/runtime-core/src/apiAsyncComponent.ts
#!/usr/bin/env python #-*-*- encoding: utf-8 -*-*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individual...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzer.java
#include "Python.h" #include "opcode.h" #include "pycore_code.h" #include "pycore_critical_section.h" #include "pycore_descrobject.h" // _PyMethodWrapper_Type #include "pycore_dict.h" // DICT_KEYS_UNICODE #include "pycore_function.h" // _PyFunction_GetVersionForCurrentState() #include "pycore_interpfr...
c
github
https://github.com/python/cpython
Python/specialize.c
#!/usr/bin/env python3 # Copyright (c) 2014-2019 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 the invalidateblock RPC.""" from test_framework.test_framework import BitcoinTestFramework from t...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Product.status' db.add_column('catalogue_product', 'status', self.gf('django.db.models.fields.Char...
unknown
codeparrot/codeparrot-clean
import pytest from tests.support.asserts import assert_success from tests.support.image import png_dimensions from . import viewport_dimensions DEFAULT_CONTENT = "<div id='content'>Lorem ipsum dolor sit amet.</div>" REFERENCE_CONTENT = "<div id='outer'>{}</div>".format(DEFAULT_CONTENT) REFERENCE_STYLE = """ <st...
unknown
codeparrot/codeparrot-clean
"""MongoDB event tracker backend.""" from __future__ import absolute_import import logging import pymongo from pymongo import MongoClient from pymongo.errors import PyMongoError from bson.errors import BSONError from track.backends import BaseBackend log = logging.getLogger(__name__) class MongoBackend(BaseBacken...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2008 Gustavo J. A. M. Carneiro <gjcarneiro@gmail.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 # (at your option) any later version. ...
unknown
codeparrot/codeparrot-clean
// Copyright 2017 The etcd 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 t...
go
github
https://github.com/etcd-io/etcd
server/etcdserver/api/v3client/v3client.go
#!/usr/bin/env python # # Generate seeds.txt from Pieter's DNS seeder # NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 337600 # These are hosts that have been observed to be behaving strangely (e.g. # aggressively connecting to every node). SUSPICIOUS_HOSTS = set([ "130.211.129.106", "178.63.107.226", "83.81.1...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 """ Replica implement the notion of technical replica for plate, in real, it represent one plate """ import pandas as pd import os import numpy as np import TransCellAssay as TCA from TransCellAssay.Core.GenericPlate import GenericPlate import logging log = logging.getLogger(__name__) __author__ = "Arn...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """Reading tools from EDF, EDF+, BDF, and GDF.""" # Authors: Teon Brooks <teon.brooks@gmail.com> # Martin Billinger <martin.billinger@tugraz.at> # Nicolas Barascud <nicolas.barascud@ens.fr> # Stefan Appelhoff <stefan.appelhoff@mailbox.org> # Joan Massich <mai...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/ambientClassDeclarationWithExtends.ts] //// //// [ambientClassDeclarationExtends_singleFile.ts] declare class A { } declare class B extends A { } declare class C { public foo; } namespace D { var x; } declare class D extends C { } var d: C = new D(); //// [ambientClassDeclarationExten...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/ambientClassDeclarationWithExtends.js
from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlencode, compat_urlparse, ) from ..utils import ( float_or_none, int_or_none, sanitized_Request, ) class ViddlerIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?viddler\.c...
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\Reposit...
php
github
https://github.com/composer/composer
src/Composer/Repository/ArrayRepository.php
# engine/default.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Default implementations of per-dialect sqlalchemy.engine classes. These are se...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0-or-later /* * Generic implementation of 64-bit atomics using spinlocks, * useful on processors that don't have 64-bit atomic instructions. * * Copyright © 2009 Paul Mackerras, IBM Corp. <paulus@au1.ibm.com> */ #include <linux/types.h> #include <linux/cache.h> #include <linux/spi...
c
github
https://github.com/torvalds/linux
lib/atomic64.c
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2007 Troy Melhase, Yichun Wei # Distributed under the terms of the GNU General Public License v2 # Author: Troy Melhase <troy@gci.net> # Yichun Wei <yichun.wei@gmail.com> import os from cPickle import PicklingError, UnpicklingError, dump, load from Py...
unknown
codeparrot/codeparrot-clean
// Copyright 2023 The etcd 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 t...
go
github
https://github.com/etcd-io/etcd
tests/robustness/validate/validate.go
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Ansible Project # Copyright: (c) 2019, Pavan Bidkar <pbidkar@vmware.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 A...
unknown
codeparrot/codeparrot-clean
""" #;+ #; NAME: #; ionic_clm #; Version 1.0 #; #; PURPOSE: #; Module for ionic column densities in Abs Systems #; 28-Oct-2014 by JXP #;- #;------------------------------------------------------------------------------ """ from __future__ import print_function, absolute_import, division, unicode_literals impor...
unknown
codeparrot/codeparrot-clean
--- - hosts: localhost gather_facts: no vars: my_var: become_method: sudo connection: local become: 1 tasks: - include_vars: "./vars/connection.yml" - command: whoami ignore_errors: yes register: result failed_when: result is not success and (result.module_stderr is defined...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/var_templating/test_connection_vars.yml
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 """ Example: Enumerate Hidden Markov Model ====================================== This example is ported from [1], which shows how to marginalize out discrete model variables in Pyro. This combines MCMC with a variable elimination al...
unknown
codeparrot/codeparrot-clean
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name' : 'Get-SQLInstanceDomain', 'Author': ['@_nullbind', '@0xbadjuju'], 'Description': ('Returns a list of SQL Server instances discovered by querying ' ...
unknown
codeparrot/codeparrot-clean
""" Utilities aimed to help achieve mostly basic tasks. """ from __future__ import division import re import os import time import datetime from subprocess import Popen, PIPE from kallithea.lib.vcs.exceptions import VCSError from kallithea.lib.vcs.exceptions import RepositoryError from kallithea.lib.vcs.utils.paths i...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) David Arnold (devCO). # Author David Arnold (devCO), dar@devco.co # Co-Authors Juan Pablo Aries (devCO), jpa@devco.co # Hector Ivan Valencia Muñoz (TIX SAS) # Nhomar ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/properties/TestcontainersPropertySourceAutoConfigurationWithSpringBootTestIntegrationTest.java
from direct.showbase.ShowBaseGlobal import * from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * from toontown.toonbase import ToontownTimer from DistributedMinigame import * from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM from direct.fsm import Stat...
unknown
codeparrot/codeparrot-clean
//===--- OldRemangler.cpp - Old Swift Re-mangler --------------------------===// // // 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/Demangling/OldRemangler.cpp
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const CaseSensitiveModulesWarning = require("./CaseSensitiveModulesWarning"); /** @typedef {import("./Compiler")} Compiler */ /** @typedef {import("./Module")} Module */ /** @typedef {import("./NormalMod...
javascript
github
https://github.com/webpack/webpack
lib/WarnCaseSensitiveModulesPlugin.js
# frozen_string_literal: true module ActiveRecord module Encryption # A KeyProvider that derives keys from passwords. class DeterministicKeyProvider < DerivedSecretKeyProvider def initialize(password) passwords = Array(password) raise ActiveRecord::Encryption::Errors::Configuration, "De...
ruby
github
https://github.com/rails/rails
activerecord/lib/active_record/encryption/deterministic_key_provider.rb
# -*- coding: utf-8 -*- # # Copyright (C) 2009, TUBITAK/UEKAE # # 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. # # Plea...
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 u...
unknown
github
https://github.com/apache/airflow
.github/workflows/additional-ci-image-checks.yml
#encoding=utf-8 __author__ = 'wufulin' import unittest import JsonParser jsonTest = r'''[ "JSON Test Pattern pass1", {"object with 1 member":["array with 1 element"]}, {}, [], -42, true, false, null, {"integer": 1234567890,"real": -9876.543210,"e": 0.123456789e-12} ] ''' ...
unknown
codeparrot/codeparrot-clean
from ajenti.api import * from ajenti.ui import * from api import Manager class RecoveryPlugin(CategoryPlugin): text = 'Recovery' icon = '/dl/recovery/icon.png' folder = 'bottom' def on_init(self): self.manager = Manager(self.app) self.providers = self.app.grab_plugins(IConfigurable) ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2015 Shaun Brady. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights t...
unknown
codeparrot/codeparrot-clean
from bgenOutput import * from bgenGeneratorGroup import GeneratorGroup class ObjectDefinition(GeneratorGroup): "Spit out code that together defines a new Python object type" basechain = "NULL" tp_flags = "Py_TPFLAGS_DEFAULT" basetype = None argref = "" # set to "*" if arg to <type>_New should be...
unknown
codeparrot/codeparrot-clean
from langchain_core.runnables import __all__ EXPECTED_ALL = [ "chain", "AddableDict", "ConfigurableField", "ConfigurableFieldSingleOption", "ConfigurableFieldMultiOption", "ConfigurableFieldSpec", "ensure_config", "run_in_executor", "patch_config", "RouterInput", "RouterRunn...
python
github
https://github.com/langchain-ai/langchain
libs/core/tests/unit_tests/runnables/test_imports.py
__author__ = 'danleyb2<ndieksman@gmail.com>' import os from setuptools import setup import setuptools with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.par...
unknown
codeparrot/codeparrot-clean
from django.template.base import TemplateSyntaxError from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import render, setup, SafeClass, UnsafeClass class AutoescapeTagTests(SimpleTestCase): @setup({'autoescape-tag01': '{% autoescape off %}hello{% endautoescape %}'}...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from Test_Column_ObjFnc import tac_column import time """ % ------------------------------------------------------------------------- % SIMULATION-BASED OPTIMIZATION OF A SINGLE CONVENTIONAL DISTILLATION % COLUMN USING THE PARTICLE SWARM OPTIMIZATION ALGORITHM %------------------------...
unknown
codeparrot/codeparrot-clean
'''Implement event handling for wydget GUIs. The `GUIEventDispatcher` class is automatically mixed into the `wydget.GUI` class and is activated by pushing the gui onto a window's event handlers stack:: gui = GUI(window) window.push_handlers(gui) Events ------ Standard pyglet events are passed through if han...
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.impl.base.test.cases.components.containingDeclarationProvider impor...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-impl-base/testFixtures/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/containingDeclarationProvider/AbstractContainingDeclarationProviderByDelegatedMemberScopeTest.kt
package client import ( "errors" "net/http" "testing" cerrdefs "github.com/containerd/errdefs" "github.com/moby/moby/api/types/swarm" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) func TestConfigInspectNotFound(t *testing.T) { client, err := New( WithMockClient(errorMock(http.StatusNotFound, "...
go
github
https://github.com/moby/moby
client/config_inspect_test.go
import zlib from . import register_test # Detect blacklisted files based on their extension. blacklisted_extensions = ("dll", "exe", "dylib", "so", "sh", "class") blacklisted_magic_numbers = ( (0x4d, 0x5a), # EXE/DLL (0x5a, 0x4d), # Alternative for EXE/DLL (0x7f, 0x45, 0x4c, 0x46), # UNIX ...
unknown
codeparrot/codeparrot-clean
//===--- QuotedString.cpp - Printing a string as a quoted string ----------===// // // 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/Basic/QuotedString.cpp
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h> #define NGX_MAX_PENDING_CONN 10 static CRITICAL_SECTION connect_lock; static int nconnects; static ngx_connection_t pending_connects[NGX_MAX_PENDING_CONN]; static HA...
c
github
https://github.com/nginx/nginx
src/event/ngx_event_connectex.c
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urlparse from ..utils import ( int_or_none, js_to_json, parse_duration, ) class NTVDeIE(InfoExtractor): IE_NAME = 'n-tv.de' _VALID_URL = r'https?://(?:www\.)?n-tv\.de/mediathek/v...
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/main/java/org/springframework/beans/factory/annotation/AnnotatedBeanDefinition.java
from django.forms import Form, MultipleChoiceField, MultipleHiddenInput from django.utils.datastructures import MultiValueDict from .base import WidgetTest class MultipleHiddenInputTest(WidgetTest): widget = MultipleHiddenInput() def test_render_single(self): self.check_html( self.widget,...
python
github
https://github.com/django/django
tests/forms_tests/widget_tests/test_multiplehiddeninput.py
var app = require('../../examples/error') , request = require('supertest'); describe('error', function(){ describe('GET /', function(){ it('should respond with 500', function(done){ request(app) .get('/') .expect(500,done) }) }) describe('GET /next', function(){ it('should re...
javascript
github
https://github.com/expressjs/express
test/acceptance/error.js
{ "backfill": { "affected_one": "จะมีการทริกเกอร์ให้ทำงาน 1 ครั้ง", "affected_other": "จะมีการทริกเกอร์ให้ทำงาน {{count}} ครั้ง", "affectedNone": "ไม่มีการทำงานที่ตรงกับเงื่อนไขที่เลือก", "allRuns": "ทุกการทำงาน", "backwards": "ทำงานแบบย้อนกลับ", "dateRange": "ช่วงวันที่", "errorStartDateB...
json
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/public/i18n/locales/th/components.json
import os import re import types from datetime import datetime, timedelta from decimal import Decimal from unittest import TestCase, mock from django.core.exceptions import ValidationError from django.core.files.base import ContentFile from django.core.validators import ( BaseValidator, DecimalValidator, EmailVali...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2011 Florian Mounier # Copyright (c) 2014 Sean Vig # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # Corrections & modifications by Noviat nv/sa, (http://www.noviat.be): # - VAT listing based upon year...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing import Optional from typing_extensions import Literal, Required, TypedDict from .._types import SequenceNotStr from .shared_params.metadata import Metadata from .file_chunking_strategy...
python
github
https://github.com/openai/openai-python
src/openai/types/vector_store_create_params.py
from coalib.bearlib.abstractions.Linter import linter from dependency_management.requirements.AnyOneOfRequirements import ( AnyOneOfRequirements) from dependency_management.requirements.CabalRequirement import ( CabalRequirement) from dependency_management.requirements.DistributionRequirement import ( Distr...
unknown
codeparrot/codeparrot-clean
import os import os.path import shutil try: import unittest2 as unittest except ImportError: import unittest from rope.base.exceptions import RopeError, ResourceNotFoundError from rope.base.fscommands import FileSystemCommands from rope.base.libutils import path_to_resource from rope.base.project import Projec...
unknown
codeparrot/codeparrot-clean
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.absp...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 PerfKitBenchmarker 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 appli...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='basic diff-pairs tests' . ./test-lib.sh # This creates a diff with added, modified, deleted, renamed, copied, and # typechange entries. This includes a submodule to test submodule diff support. test_expect_success 'setup' ' test_config_global protocol.file.allow always && git init sub &&...
unknown
github
https://github.com/git/git
t/t4070-diff-pairs.sh
import unittest import decimal import ddt from mock import patch from django.conf import settings from django.core.urlresolvers import reverse from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from util.testing import UrlResetMixin from embargo.test_utils import restrict_course from xmodule.modul...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2006-2007 Lukáš Lalinský # Copyright (C) 2009, 2018-2019 Philipp Wolfer # Copyright (C) 2011-2013 Michael Wiencek # Copyright (C) 2012 Chad Wilson # Copyright (C) 2013-2014, 2018 Laurent Monin # Copyright (C) 2014 Sophist-UK # ...
unknown
codeparrot/codeparrot-clean
def sum_Range_list(nums, m, n): sum_range = 0 for i in range(m, n+1, 1): sum_range += nums[i] return sum_range
unknown
mbpp
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Dedi Sinaga (<http://dedisinaga.blogspot.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
unknown
codeparrot/codeparrot-clean
"""An implementation of the Web Site Process Bus. This module is completely standalone, depending only on the stdlib. Web Site Process Bus -------------------- A Bus object is used to contain and manage site-wide behavior: daemonization, HTTP server start/stop, process reload, signal handling, drop privileges, PID f...
unknown
codeparrot/codeparrot-clean
use crate::spec::{Arch, StackProbeType, Target, TargetMetadata, TargetOptions, base}; pub(crate) fn target() -> Target { Target { llvm_target: "aarch64-unknown-openbsd".into(), metadata: TargetMetadata { description: Some("ARM64 OpenBSD".into()), tier: Some(3), h...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/targets/aarch64_unknown_openbsd.rs
from ..base.view import BaseGraphView from .wot_tab_uic import Ui_WotWidget from sakia.gui.widgets.busy import Busy from PyQt5.QtCore import QEvent class WotView(BaseGraphView, Ui_WotWidget): """ Wot graph view """ def __init__(self, parent): """ Constructor """ super()...
unknown
codeparrot/codeparrot-clean
from ctypes import * import unittest class X(Structure): _fields_ = [("a", c_int), ("b", c_int)] new_was_called = False def __new__(cls): result = super().__new__(cls) result.new_was_called = True return result def __init__(self): self.a = 9 sel...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright (c) 2016 Dimension Data # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ In this problem set you work with cities infobox data, audit it, come up with a cleaning idea and then clean it up. In the first exercise we want you to audit the datatypes that can be found in some particular fields in the dataset. The possible types of values can be: ...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Routing\Events; class RouteMatched { /** * Create a new event instance. * * @param \Illuminate\Routing\Route $route The route instance. * @param \Illuminate\Http\Request $request The request instance. */ public function __construct( public $rou...
php
github
https://github.com/laravel/framework
src/Illuminate/Routing/Events/RouteMatched.php
# -*- coding: utf-8 -*- import re import time from ..internal.SimpleHoster import SimpleHoster class MegasharesCom(SimpleHoster): __name__ = "MegasharesCom" __type__ = "hoster" __version__ = "0.37" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(d\d{2}\.)?megashares\.com/((index\.php)?\...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- #Autor: Thibaut120094 # Antoine "0x010C" Lamielle #Date: 10 December 2016 #License: GNU GPL v3 import feedparser import re import pywiki import pwutils supported_anime = { #u"title in args": [u"title in rss feed", u"on-wiki title"], u"Détective Conan": [u"Cas...
unknown
codeparrot/codeparrot-clean
"""Python version compatibility support for minidom. This module contains internal implementation details and should not be imported; use xml.dom.minidom instead. """ # This module should only be imported using "import *". # # The following names are defined: # # NodeList -- lightest possible NodeList implemen...
python
github
https://github.com/python/cpython
Lib/xml/dom/minicompat.py