code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ TAP plugin for creating telnet- and ssh-accessible manhole servers. @author: Jp Calderone """ from zope.interface import implements from twisted.internet import protocol from twisted.application import service, strports from twist...
unknown
codeparrot/codeparrot-clean
# module pyparsing.py # # Copyright (c) 2003-2008 Paul T. McGuire # # 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 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at you...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 """Read all test files for a particular file format using a single importer instance. Read them again in reversed order. This is used to verify that a loader does proper cleanup and can be called repeatedly.""" import sys import os import subprocess # hack-load utils.py and settings.py from .....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import os import unittest from mock import Mock from testutils import setup_test_env setup_test_env() from softwarecenter.region import RegionDiscover, get_region_name from softwarecenter.i18n import init_locale class TestRegion(unittest.TestCase): """ tests the region detection """ def s...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyrigh...
unknown
codeparrot/codeparrot-clean
# -*- coding: iso-8859-1 -*- # Copyright (C) 2005, 2006 Martin v. Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper # based on bdist_wininst """ Implements the bdist_msi command. """ import sys, os from distutils.core import Command from distutils.dir_util import remove_tree fro...
unknown
codeparrot/codeparrot-clean
import {Component} from '@angular/core'; import {ReversePipe} from './reverse.pipe'; @Component({ selector: 'app-root', template: ` Reverse Machine: {{ word | reverse }} `, imports: [ReversePipe], }) export class App { word = 'You are a champion'; }
typescript
github
https://github.com/angular/angular
adev/src/content/tutorials/learn-angular/steps/24-create-a-pipe/answer/src/app/app.ts
import discord import json import re from discord.ext import commands from subprocess import call from sys import argv class Mod: """ Staff commands. """ def __init__(self, bot): self.bot = bot print('Addon "{}" loaded'.format(self.__class__.__name__)) async def add_restriction(sel...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################### # # Inbox # Retrieves a list of messages in a specified user's inbox. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may n...
unknown
codeparrot/codeparrot-clean
{ "include": [ "**/*.ts", "**/*.tsx", "**/.server/**/*.ts", "**/.server/**/*.tsx", "**/.client/**/*.ts", "**/.client/**/*.tsx", ".react-router/types/**/*" ], "compilerOptions": { "lib": ["DOM", "DOM.Iterable", "ES2022"], "types": ["@react-router/node", "vite/client"], "verb...
json
github
https://github.com/remix-run/react-router
packages/create-react-router/__tests__/fixtures/basic/tsconfig.json
import {useEffect} from 'react'; function Component() { let local; const reassignLocal = newValue => { local = newValue; }; const onMount = newValue => { reassignLocal('hello'); if (local === newValue) { // Without React Compiler, `reassignLocal` is freshly created // on each render,...
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-reassign-local-variable-in-effect.js
#!/usr/bin/python # BSD LICENSE # # Copyright(c) 2010-2014 Intel Corporation. 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: # # * Redistributions of sourc...
unknown
codeparrot/codeparrot-clean
{ "name": "my-vend/my-app", "license": "MIT", "repositories": { } }
json
github
https://github.com/composer/composer
tests/Composer/Test/Config/Fixtures/composer-repositories.json
from django.contrib.auth.models import User from django.test import TestCase, RequestFactory from django.views.generic import TemplateView from blog.mixins import ResourceTypesMixin from blog.models import ResourceType from community.models import Community from users.models import SystersUser class ResourceTypesMixi...
unknown
codeparrot/codeparrot-clean
"""Tests covering the Programs listing on the Studio home.""" import json from django.conf import settings from django.core.urlresolvers import reverse import httpretty import mock from edx_oauth2_provider.tests.factories import ClientFactory from provider.constants import CONFIDENTIAL from openedx.core.djangoapps.pr...
unknown
codeparrot/codeparrot-clean
"""Tests for sync/async middleware composition with wrap_tool_call and awrap_tool_call. These tests verify the desired behavior: 1. If middleware defines both sync and async -> use both on respective paths 2. If middleware defines only sync -> use on sync path, raise NotImplementedError on async path 3. If middleware ...
python
github
https://github.com/langchain-ai/langchain
libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_sync_async_wrappers.py
"""Provides the Module and Type base classes that user code inherits from.""" __all__ = ["Module", "Type", "member"] from framer import struct, template from framer.function import Function, Method from framer.member import member from framer.slots import * from framer.util import cstring, unindent from types import...
unknown
codeparrot/codeparrot-clean
#---------------------------------------------------------------------- # Copyright (c) 2011-2016 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including ...
unknown
codeparrot/codeparrot-clean
/** @import { TaggedTemplateExpression } from 'estree' */ /** @import { Context } from '../types' */ import { is_pure } from './shared/utils.js'; /** * @param {TaggedTemplateExpression} node * @param {Context} context */ export function TaggedTemplateExpression(node, context) { if (context.state.expression && !is_...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/compiler/phases/2-analyze/visitors/TaggedTemplateExpression.js
#!/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
/////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2004, Industrial Light & Magic, a division of Lucas // Digital Ltd. LLC // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the fol...
c
github
https://github.com/opencv/opencv
3rdparty/openexr/IlmImf/ImfStdIO.h
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ werkzeug.contrib.lint ~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 0.5 This module provides a middleware that performs sanity checks of the WSGI application. It checks that :pep:`333` is properly implemented and warns on some common HTTP errors such as non-empty respons...
unknown
codeparrot/codeparrot-clean
"""fontTools.pens.pointInsidePen -- Pen implementing "point inside" testing for shapes. """ from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * from fontTools.pens.basePen import BasePen from fontTools.misc.bezierTools import solveQuadratic, solveCubic __all__ = ["PointI...
unknown
codeparrot/codeparrot-clean
""" Multi-part parsing for file uploads. Exposes one class, ``MultiPartParser``, which feeds chunks of uploaded data to file upload handlers for processing. """ from __future__ import unicode_literals import base64 import cgi from django.conf import settings from django.core.exceptions import SuspiciousOperation fro...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.contrib.admin.utils import quote from django.core.urlresolvers import reverse from django.template.response import TemplateResponse from django.test import TestCase, override_settings from .models import Action, Person, Car @override_settings(PASSWORD_HASHERS=('dja...
unknown
codeparrot/codeparrot-clean
"""Test the cloud.iot module.""" from aiohttp import web import pytest from homeassistant.components.cloud import DOMAIN from homeassistant.components.cloud.client import CloudClient from homeassistant.components.cloud.const import PREF_ENABLE_ALEXA, PREF_ENABLE_GOOGLE from homeassistant.core import State from homeass...
unknown
codeparrot/codeparrot-clean
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ Module contingency_applicator.py deals wit non-boolean contingencies: - ! ---> absolutely required - x ---> absolutely inhibitory - k+ ---> positive stimulation - k- ---> negative stimulation - 0 ---> no effect - ? ---> unknown effect or no effect Contingencies 0 and ? are ignored. - ctyp...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.db import models from breach.helpers import injector from django.utils import timezone class Victim(models.Model): ''' A particular instance of a target for a particular user-victim e.g. dionyziz@gmail.com ''' def attack(self): injector.in...
unknown
codeparrot/codeparrot-clean
# Copyright 2019 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
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import asn1 import hashlib import os # This file implements very minimal certificate and OCSP generation. It's # designed to test revocation checking. ...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 # pylint: disable=too-many-arguments, too-many-locals """Definition of various recurrent neural network cells.""" from __future__ import print_function import bisect import random import numpy as np from ..io import DataIter, DataBatch, DataDesc from .. import ndarray def encode_sentences(sentences, ...
unknown
codeparrot/codeparrot-clean
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
unknown
codeparrot/codeparrot-clean
""" The OGRGeometry is a wrapper for using the OGR Geometry class (see http://www.gdal.org/ogr/classOGRGeometry.html). OGRGeometry may be instantiated when reading geometries from OGR Data Sources (e.g. SHP files), or when given OGC WKT (a string). While the 'full' API is not present yet, the API is "pythonic" u...
unknown
codeparrot/codeparrot-clean
########################################################## # THIS IS A GENERATED FILE -- DO NOT MODIFY. # IF YOU WISH TO MODIFY THIS SUITE, MODIFY THE CORRESPONDING MATRIX SUITE MAPPING FILE # AND REGENERATE THE MATRIX SUITES. # # matrix suite mapping file: buildscripts/resmokeconfig/matrix_suites/mappings/multiversion...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/matrix_suites/generated_suites/multiversion_sanity_check_last_continuous_new_old_new.yml
#!/usr/bin/env python # -*- coding: utf-8 -*- # phppo2pypo unit tests # Author: Wil Clouser <wclouser@mozilla.com> # Date: 2009-12-03 from translate.tools import phppo2pypo from translate.storage import po from translate.convert import test_convert from translate.misc import wStringIO class TestPhpPo2PyPo: def ...
unknown
codeparrot/codeparrot-clean
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
python
github
https://github.com/huggingface/transformers
src/transformers/models/aimv2/__init__.py
import { test } from '../../test'; export default test({ get props() { return { todos: [ { description: 'implement keyed each blocks' }, { description: 'implement client-side hydration' } ] }; }, html: ` <p>1: implement keyed each blocks</p> <p>2: implement client-side hydra...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/each-block-keyed-object-identity/_config.js
# # Copyright (C) 2013,2014,2015,2016 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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)...
unknown
codeparrot/codeparrot-clean
# Copyright: (c) 2018, Pluribus Networks # 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 units.compat.mock import patch from ansible.modules.network.netvisor import pn_vrouter_ospf...
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/c/experimental/ops/gen/common/view_util.h
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Uploads files to Google Storage content addressed.""" import hashlib import optparse import os import Queue import re import st...
unknown
codeparrot/codeparrot-clean
""" Tests for Version Based App Upgrade Middleware """ from datetime import datetime from unittest import mock import ddt from django.core.cache import caches from django.http import HttpRequest, HttpResponse from pytz import UTC from lms.djangoapps.mobile_api.middleware import AppVersionUpgrade from lms.djangoapps....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash set -eux # Ensure that when a non-distro 'distro' package is in PYTHONPATH, we fallback # to our bundled one. new_pythonpath="$OUTPUT_DIR/pythonpath" mkdir -p "$new_pythonpath/distro" touch "$new_pythonpath/distro/__init__.py" export PYTHONPATH="$new_pythonpath:$PYTHONPATH" # Sanity test to make...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/module_utils_distro/runme.sh
/*============================================================================== Copyright (c) 2010-2011 Bryce Lelbach Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =========================================...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/detail/is_sorted.hpp
from __future__ import print_function, division from sympy import (sympify, diff, sin, cos, Matrix, Symbol, integrate, trigsimp, Function, symbols) from sympy.core.basic import S from sympy.core.compatibility import reduce from .vector import Vector, _check_vector from .frame import CoordinateSym, _...
unknown
codeparrot/codeparrot-clean
# Copyright 2020 Google # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
unknown
codeparrot/codeparrot-clean
"""Tests for distutils.msvc9compiler.""" import sys import unittest import os from distutils.errors import DistutilsPlatformError from distutils.tests import support from test.support import run_unittest # A manifest with the only assembly reference being the msvcrt assembly, so # should have the assembly completely ...
unknown
codeparrot/codeparrot-clean
#-*- coding: ISO-8859-1 -*- # pysqlite2/test/userfunctions.py: tests for user-defined functions and # aggregates. # # Copyright (C) 2005-2007 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warran...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.core.urlresolvers import NoReverseMatch from django.contrib.auth.views import logout from django.shortcuts import resolve_url from django.test import TestCase from .models import UnimportantThing class ResolveUrlTests(TestCase): """ Tests for the ``resolve_...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package audit import ( "testing" "time" "github.com/stretchr/testify/require" ) // TestOptions_withFormat exercises withFormat option to ensure it performs as expected. func TestOptions_withFormat(t *testing.T) { t.Parallel() tests := map[...
go
github
https://github.com/hashicorp/vault
audit/options_test.go
import pdb; import sys; import linecache def qdebug(options = None, expanded = None, typeformats = None, individualformats = None, watchers = None): class QDebug: def __init__(self, options = None, expanded = None, ...
unknown
codeparrot/codeparrot-clean
from tastypie.resources import ModelResource from apps.survey.models import Profile, SurveyUser, Survey from apps.survey.survey import parse_specification from apps.survey.spec import Question, Branch, Else from pickle import loads from inspect import isclass class EpiwebModelResource(ModelResource): class Meta: ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ flask.debughelpers ~~~~~~~~~~~~~~~~~~ Various helpers to make the development experience better. 1 :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from ._compat import implements_to_string class UnexpectedUnicodeError(AssertionErr...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ @package ion.agents.platform.rsn.simulator.oms_simulator_server @file ion/agents/platform/rsn/simulator/oms_simulator_server.py @author Carlos Rueda @brief OMS simulator XML/RPC server. Program intended to be run outside of pyon. USAGE: $ bin/python ion/agents/platform/rs...
unknown
codeparrot/codeparrot-clean
import { Comment, type VNode, type VNodeProps, closeBlock, createVNode, currentBlock, isBlockTreeEnabled, isSameVNodeType, normalizeVNode, openBlock, } from '../vnode' import { ShapeFlags, isArray, isFunction, toNumber } from '@vue/shared' import { type ComponentInternalInstance, handleSetupResult }...
typescript
github
https://github.com/vuejs/core
packages/runtime-core/src/components/Suspense.ts
# -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2010 Thomas Perl and the gPodder Team # # gPodder 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
# frozen_string_literal: true module Bundler; end require_relative "vendor/tsort/lib/tsort"
ruby
github
https://github.com/ruby/ruby
lib/bundler/vendored_tsort.rb
# -*- coding: utf-8 -*- ############################################################################## # # This program 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 L...
unknown
codeparrot/codeparrot-clean
import cv2 import numpy as np import os import sys import ntpath import time from . import util, html from subprocess import Popen, PIPE if sys.version_info[0] == 2: VisdomExceptionBase = Exception else: VisdomExceptionBase = ConnectionError def save_images(webpage, visuals, image_path, aspect_ratio=1.0, widt...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package addrs import ( "fmt" ) // InputVariable is the address of an input variable. type InputVariable struct { referenceable Name string } func (v InputVariable) String() string { return "var." + v.Name } func (v InputVariable) UniqueKey()...
go
github
https://github.com/hashicorp/terraform
internal/addrs/input_variable.go
antora: extensions: site: title: Spring Boot content: sources: [] asciidoc: sourcemap: true attributes: chomp: all hide-uri-scheme: '@' javadoc-location: xref:api:java/ page-pagination: '' page-stackoverflow-url: https://stackoverflow.com/tags/spring-boot tabs-sync-option: '@' extens...
unknown
github
https://github.com/spring-projects/spring-boot
buildSrc/src/main/resources/org/springframework/boot/build/antora/antora-playbook-template.yml
# Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com) # # MIT License (MIT) # # 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 limitat...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright 2017 F5 Networks Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) a...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2008 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
java
github
https://github.com/google/guava
android/guava-testlib/src/com/google/common/collect/testing/IteratorFeature.java
function Component(x = 'default', y = [{}]) { return [x, y]; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: ['TodoAdd'], isComponent: 'TodoAdd', };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/function-param-assignment-pattern.js
#!/usr/bin/env bash # Copyright IBM Corp. 2016, 2025 # SPDX-License-Identifier: BUSL-1.1 set -eou pipefail fail() { echo "$1" 1>&2 exit 1 } [[ -z "$VAULT_ADDR" ]] && fail "VAULT_ADDR env variable has not been set" [[ -z "$VAULT_INSTALL_DIR" ]] && fail "VAULT_INSTALL_DIR env variable has not been set" [[ -z "$VAU...
unknown
github
https://github.com/hashicorp/vault
enos/modules/vault_step_down/scripts/operator-step-down.sh
#!/usr/bin/env python ''' extra DMA mapping tables from a stm32 datasheet This assumes a csv file extracted from the datasheet using tablula: https://github.com/tabulapdf/tabula ''' import sys, csv, os def parse_dma_table(fname, table): dma_num = 1 csvt = csv.reader(open(fname,'rb')) i = 0 last_cha...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2011 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
java
github
https://github.com/google/guava
guava/src/com/google/common/hash/BloomFilter.java
-- -- Test foreign-data wrapper file_fdw. -- -- directory paths are passed to us in environment variables \getenv abs_srcdir PG_ABS_SRCDIR -- Clean up in case a prior regression run failed SET client_min_messages TO 'warning'; DROP ROLE IF EXISTS regress_file_fdw_superuser, regress_file_fdw_user, regress_no_priv_user...
sql
github
https://github.com/postgres/postgres
contrib/file_fdw/sql/file_fdw.sql
""" Fantasm: A taskqueue-based Finite State Machine for App Engine Python Docs and examples: http://code.google.com/p/fantasm/ Copyright 2010 VendAsta Technologies 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 ob...
unknown
codeparrot/codeparrot-clean
""" Model used by Video module for Branding configuration. Includes: BrandingInfoConfig: A ConfigurationModel for managing how Video Module will use Branding. """ import json from config_models.models import ConfigurationModel from django.core.exceptions import ValidationError from django.db.models import...
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
<?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; ...
php
github
https://github.com/composer/composer
src/Composer/Util/GitLab.php
/* * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.network.sockets import io.ktor.network.selector.* import io.ktor.network.sockets.nodejs.* import kotlinx.coroutines.* internal actual suspend fun tcpConnect( selector: Se...
kotlin
github
https://github.com/ktorio/ktor
ktor-network/web/src/io/ktor/network/sockets/SocketEngine.web.kt
//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration13_es5.ts] //// //// [asyncFunctionDeclaration13_es5.ts] async function foo(): Promise<void> { // Legal to use 'await' in a type context. var v: await; } //// [asyncFunctionDeclaration13_es5.js] "use strict"; function foo() { ...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/asyncFunctionDeclaration13_es5(target=es2015).js
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/ZStandardCodec.java
/* * Copyright (C) Nginx, Inc. * Copyright (C) Valentin V. Bartenev */ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h> #define NGX_HTTP_V2_TABLE_SIZE 4096 static ngx_int_t ngx_http_v2_table_account(ngx_http_v2_connection_t *h2c, size_t size); static ngx_http_v2_header_t ngx_http_v2_stat...
c
github
https://github.com/nginx/nginx
src/http/v2/ngx_http_v2_table.c
# Copyright 2014-2015 MongoDB, 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 writin...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import decimal import json import logging import re import arrow import boto3 from boto3.dynamodb.conditions import Key MOVIE_CODE_PATTERN = re.compile("popupSchedule\('.*','.*','(\d\d:\d\d)','\d*','\d*', '(\d*)', '\d*', '\d*',") class DecimalEncoder(json.JSONEncoder): def default(self, o...
unknown
codeparrot/codeparrot-clean
import unittest from underscore import array as _ from itertools import chain class TestFlatten(unittest.TestCase): def test_flat_list(self): l = [1,2,3,4] flat = list(_.flatten(l)) self.assertEqual(l,flat) def test_flat_generator(self): l = range(0, 10) flat = _.flatt...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** r_li_padsd.py ------------- Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ********************************...
unknown
codeparrot/codeparrot-clean
/* Copyright 2019 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/profiler/utils/event_span.h
from pt import ( # noqa: F401 add_test, ao_sparsifier_test, arange_test, as_strided_test, batchnorm_test, binary_inplace_test, binary_test, bmm_test, boolean_test, cat_test, channel_shuffle_test, chunk_test, conv_test, diag_test, embeddingbag_test, fill_t...
python
github
https://github.com/pytorch/pytorch
benchmarks/operator_benchmark/benchmark_all_other_test.py
"""Tests for scrapy.core.downloader.handlers.http10.HTTP10DownloadHandler.""" from __future__ import annotations from typing import TYPE_CHECKING import pytest from scrapy.core.downloader.handlers.http10 import HTTP10DownloadHandler from scrapy.http import Request from scrapy.utils.defer import deferred_f_from_coro...
python
github
https://github.com/scrapy/scrapy
tests/test_downloader_handler_twisted_http10.py
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. # # SPDX-License-Identifier: curl name: 'dist' 'on': push: branches: - master - '*/ci' pull_request: branches: - master concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-i...
unknown
github
https://github.com/curl/curl
.github/workflows/distcheck.yml
// Copyright 2009 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 !compiler_bootstrap package strconv import "internal/bytealg" // index returns the index of the first instance of c in s, or -1 if missing. func i...
go
github
https://github.com/golang/go
src/strconv/bytealg.go
# =========================================================================== # This software is subject to the provisions of the Zope Public License, # Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCL...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 Cisco Systems, 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 requi...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/interrupt-controller/intel,ce4100-lapic.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Intel Local Advanced Programmable Interrupt Controller (LAPIC) maintainers: - Rahul Tanwar <rtanwar@maxlin...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/interrupt-controller/intel,ce4100-lapic.yaml
# # Copyright (c) 2008-2011 Camptocamp. # 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. Redistributions of source code must retain the above copyright # notice, this list of conditions a...
unknown
codeparrot/codeparrot-clean
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for twisted.protocols.stateful """ from twisted.trial.unittest import TestCase from twisted.protocols.test import test_basic from twisted.protocols.stateful import StatefulProtocol from struct import pack, unpack, calcsize class ...
unknown
codeparrot/codeparrot-clean
"""This module contains general utility code that is used throughout the library. For users of this library, the C{L{log}} function is probably the most interesting. """ __all__ = ['log', 'appendArgs', 'toBase64', 'fromBase64'] import binascii import sys import urlparse from urllib import urlencode elementtree_mod...
unknown
codeparrot/codeparrot-clean
// Copyright 2022 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/common/alarm_test.go
"""Converts Illumina SampleSheet CSV files to the run_info.yaml input file. This allows running the analysis pipeline without Galaxy, using CSV input files from Illumina SampleSheet or Genesifter. """ import os import csv import itertools import difflib import glob import yaml from bcbio.illumina import flowcell fro...
unknown
codeparrot/codeparrot-clean
prompt_template = """Given the following question and context, return YES if the context is relevant to the question and NO if it isn't. > Question: {question} > Context: >>> {context} >>> > Relevant (YES / NO):""" # noqa: E501
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/retrievers/document_compressors/chain_filter_prompt.py
def npartitions(n): """ Calculate the partition function P(n), i.e. the number of ways that n can be written as a sum of positive integers. P(n) is computed using a straightforward implementation of the Hardy-Ramanujan-Rademacher formula, described e.g. at http://mathworld.wolfram.com/Partition...
unknown
codeparrot/codeparrot-clean