code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
// Row // // Rows contain your columns. :root { @each $name, $value in $grid-breakpoints { --#{$prefix}breakpoint-#{$name}: #{$value}; } } @if $enable-grid-classes { .row { @include make-row(); > * { @include make-col-ready(); } } } @if $enable-cssgrid { .grid { display: grid; ...
unknown
github
https://github.com/twbs/bootstrap
scss/_grid.scss
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true ActiveRecord::Schema.define do create_table :defaults, force: true do |t| t.integer :random_number, default: -> { "ABS(RANDOM())" } t.string :ruby_on_rails, default: -> { "('Ruby ' || 'on ' || 'Rails')" } t.date :modified_date, default: -> { "CURRENT_DATE" } t.da...
ruby
github
https://github.com/rails/rails
activerecord/test/schema/sqlite_specific_schema.rb
# Copyright (c) 2014 Openstack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
unknown
codeparrot/codeparrot-clean
#! coding:utf-8 """Tests exceptions and DB-API exception wrapping.""" from sqlalchemy import exc as sa_exceptions from sqlalchemy.engine import default from sqlalchemy.testing import eq_ from sqlalchemy.testing import fixtures from sqlalchemy.util import compat from sqlalchemy.util import u class Error(Exception): ...
unknown
codeparrot/codeparrot-clean
""" This file is not used by the integration test, but serves a related purpose. It triggers sanity test failures that can only occur for ansible-core, which need to be ignored to ensure the pylint plugin is functioning properly. """ from __future__ import annotations from ansible.module_utils.datatag import deprecato...
python
github
https://github.com/ansible/ansible
test/integration/targets/ansible-test-sanity-pylint/deprecated_thing.py
/* * 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/convert/DataSizeUnit.java
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2013 Intel, Inc. # Copyright (c) 2013 OpenStack Foundation # 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 Li...
unknown
codeparrot/codeparrot-clean
# # # Copyright (C) 2013 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed ...
unknown
codeparrot/codeparrot-clean
from numpy import * from util import * class TennisData: # Outlook Temperature Hum Wind # S? O? R? H? M? C? H? S? X = array([[ 1, 0, 0, 1, 0, 0, 1, 0 ], [ 1, 0, 0, 1, 0, 0, 1, 1 ], [ 0, 1, 0, ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012 - Seweryn Dynerowicz, FUNDP. # 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 #...
unknown
codeparrot/codeparrot-clean
from kivy.adapters.dictadapter import DictAdapter from kivy.uix.listview import ListItemButton, ListItemLabel, \ CompositeListItem, ListView from kivy.uix.gridlayout import GridLayout from fixtures import integers_dict class MainView(GridLayout): '''Uses :class:`CompositeListItem` for list item views comp...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """Test utilities.""" # # (C) Pywikibot team, 2013-2014 # # Distributed under the terms of the MIT license. # from __future__ import print_function, unicode_literals __version__ = '$Id$' # import os import re import subprocess import sys import time import traceback from warnings import warn ...
unknown
codeparrot/codeparrot-clean
import warnings def test_deprecated_concurrent_requests_per_ip_attribute(): with warnings.catch_warnings(record=True) as warns: from scrapy.settings.default_settings import ( # noqa: PLC0415 CONCURRENT_REQUESTS_PER_IP, ) assert CONCURRENT_REQUESTS_PER_IP is not None as...
python
github
https://github.com/scrapy/scrapy
tests/test_scrapy__getattr__.py
import re from loguru import logger from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils.cached_input import cached from flexget.utils.requests import RequestException from flexget.utils.soup import get_soup logger = logger.bind(name='horriblesubs') class Hor...
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...
unknown
codeparrot/codeparrot-clean
from bika.lims.browser import BrowserView from bika.lims.interfaces import IInvoiceView from Products.CMFCore.utils import getToolByName from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from zope.i18n.locales import locales from zope.interface import implements class InvoiceView(BrowserView): ...
unknown
codeparrot/codeparrot-clean
""" Unit test for treadmill.cli.show """ import importlib import unittest import click import click.testing import mock import requests from treadmill import restclient class ShowTest(unittest.TestCase): """Mock test for treadmill.cli.show""" def setUp(self): """Setup common test variables""" ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
unknown
codeparrot/codeparrot-clean
import os import tempfile from os.path import abspath, dirname, join, normcase, sep from pathlib import Path from django.core.exceptions import SuspiciousFileOperation def safe_join(base, *paths): """ Join one or more path components to the base path component intelligently. Return a normalized, absolute ...
python
github
https://github.com/django/django
django/utils/_os.py
#!/usr/bin/env python # Copyright (C) 2011-2014 Swift Navigation Inc. # Contact: Fergus Noble <fergus@swift-nav.com> # # This source is subject to the license found in the file 'LICENSE' which must # be be distributed together with this source. All other rights reserved. # # THIS CODE AND INFORMATION IS PROVIDED "AS IS...
unknown
codeparrot/codeparrot-clean
from django.db import models from django.contrib.auth.models import User class FormModel(models.Model): name = models.CharField(max_length=60, verbose_name=u'name form') user = models.ForeignKey(User, verbose_name=u'user form') created = models.DateField(auto_now_add=True, verbose_name=u'date created') ...
unknown
codeparrot/codeparrot-clean
// Copyright 2019 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql import ( "context" "github.com/cockroachdb/cockroach/pkg/kv" "github.com/cockroachdb/cockroach/pkg/sql/execinfrapb" "github.com/cockroachdb/cockroach/p...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/distsql_plan_ctas.go
# Copyright 2012 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
import { CdkDrag, CdkDragDrop, CdkDropList, copyArrayItem, moveItemInArray, } from '@angular/cdk/drag-drop'; import {Component} from '@angular/core'; /** * @title Drag&Drop copy between lists */ @Component({ selector: 'cdk-drag-drop-copy-list-example', templateUrl: 'app.html', styleUrl: 'app.css', ...
typescript
github
https://github.com/angular/angular
adev/src/content/examples/drag-drop/src/copy-list/app/app.ts
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """The data layer used during training to train a Fast R-CNN network. ...
unknown
codeparrot/codeparrot-clean
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" . "$DIR/prelude.sh" cd src set -eou pipefail # Only run on unit test tasks so we don't target mongod binaries from cores. if [ "${task_name}" != "run_dbtest" ] && [[ ${task_name} != integration_tests* ]] && [[ "${task_name}" != unit_test_gro...
unknown
github
https://github.com/mongodb/mongo
evergreen/failed_unittests_gather.sh
import collections import re import sys import time import traceback import pytest import threading import logging from flaky import flaky from enum import Enum from queue import Empty from functools import partial from multiprocessing import Process, Queue from cassandra import ConsistencyLevel, InvalidRequest, Writ...
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...
unknown
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/site/markdown/release/0.12.0/CHANGELOG.0.12.0.md
""" Common code shared by course and library fixtures. """ import re import requests import json from lazy import lazy from common.test.acceptance.fixtures import STUDIO_BASE_URL class StudioApiLoginError(Exception): """ Error occurred while logging in to the Studio API. """ pass class StudioApiFixtu...
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines.flow import kotlinx.coroutines.testing.* import kotlinx.coroutines.* import kotlinx.coroutines.channels.* import kotlin.test.* class MapTest : TestBase() { @Test fun testMap() = runTest { val flow = flow { emit(1) emit(2) } val result...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/common/test/flow/operators/MapTest.kt
// RUN: %check_clang_tidy %s bugprone-not-null-terminated-result %t -- \ // RUN: -- -I %S/Inputs/not-null-terminated-result #include "not-null-terminated-result-c.h" #define __STDC_LIB_EXT1__ 1 #define __STDC_WANT_LIB_EXT1__ ((unsigned)1) void f(const char *src) { char dest[13]; memcpy_s(dest, 13, src, strlen(sr...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-tidy/checkers/bugprone/not-null-terminated-result-stdc-want-lib-ext1-not-a-literal.c
# Copyright David Abrahams 2004. 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) ''' >>> from shared_ptr_ext import * Test that shared_ptr<Derived> can be converted to shared_ptr<Base> >>> Y.store(YYY(42)) >>> x...
unknown
codeparrot/codeparrot-clean
"""Preliminary callable-object modelling classes""" from basicproperty import propertied, basic, common import inspect from basictypes import list_types __NULL__ = [] class Argument( propertied.Propertied ): """Representation of a single argument on a callable object""" name = common.StringLocaleProperty( 'name',...
unknown
codeparrot/codeparrot-clean
// Copyright 2017 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package server_test import ( "context" gosql "database/sql" "fmt" "path/filepath" "strconv" "testing" "time" "github.com/cockroachdb/cockroach/pkg/base" "gith...
go
github
https://github.com/cockroachdb/cockroach
pkg/server/version_cluster_test.go
#!/usr/bin/env python # 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...
unknown
codeparrot/codeparrot-clean
#---------------------------------------------------------------------- # Name: wx.lib.ticker_xrc # Purpose: A XRC handler for wx.lib.ticker # # Author: Chris Mellon # # Created: 17-May-2005 # RCS-ID: $Id: ticker_xrc.py 34119 2005-05-18 00:39:38Z RD $ # Copyright: (c) 2005 by Chris Mellon # L...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 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
"""Test suite for the profile module.""" import sys import pstats import unittest import os from difflib import unified_diff from io import StringIO from test.support import TESTFN, run_unittest, unlink from contextlib import contextmanager import profile from test.profilee import testfunc, timer class ProfileTest(u...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.server.http.content import com.sun.nio.file.SensitivityWatchEventModifier import io.ktor.http.* import io.ktor.http.content.* import io.ktor.server.application.* import io.kto...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-core/jvm/src/io/ktor/server/http/content/StaticContent.kt
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing import Dict, Optional from typing_extensions import Literal, Required, TypedDict __all__ = ["ResponseFormatTextJSONSchemaConfigParam"] class ResponseFormatTextJSONSchemaConfigParam(Ty...
python
github
https://github.com/openai/openai-python
src/openai/types/responses/response_format_text_json_schema_config_param.py
from tests.support.asserts import assert_error, assert_success from tests.support.image import png_dimensions from tests.support.inline import inline from . import element_dimensions def take_element_screenshot(session, element_id): return session.transport.send( "GET", "session/{session_id}/eleme...
unknown
codeparrot/codeparrot-clean
import logging from collections import defaultdict from langid.langid import LanguageIdentifier, model # https://github.com/saffsd/langid.py from aleph.core import language_whitelist from aleph.analyze.analyzer import Analyzer log = logging.getLogger(__name__) THRESHOLD = 0.9 CUTOFF = 50 class LanguageAnalyzer(Anal...
unknown
codeparrot/codeparrot-clean
/** @type {import('next').NextConfig} */ module.exports = { images: { remotePatterns: [ { protocol: "https", hostname: "b-cdn.net", port: "", pathname: "/my-account/**", }, { protocol: "https", hostname: "*.stream.prepr.io", port: "", ...
javascript
github
https://github.com/vercel/next.js
examples/cms-prepr/next.config.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 may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/requests/OffsetCommitRequest.java
import warnings from django.utils.deprecation import RemovedInDjango19Warning warnings.warn("django.utils.dictconfig will be removed in Django 1.9.", RemovedInDjango19Warning, stacklevel=2) # This is a copy of the Python logging.config.dictconfig module, # reproduced with permission. It is provided here for back...
unknown
codeparrot/codeparrot-clean
############################################################################### # This file is part of openWNS (open Wireless Network Simulator) # _____________________________________________________________________________ # # Copyright (C) 2004-2009 # Chair of Communication Networks (ComNets) # Kopernikusstr. 5, D-5...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python import sys from getopt import getopt,GetoptError from copy import deepcopy from ROOT import TCanvas,TFile,TH1F,TLegend,TPaveText from ROOT import kRed,kBlack,kBlue,gROOT from Helper import FileReaderException,HistNotFoundException,NormaliseBinWidth gObjects = list() def ReadHistograms(filename...
unknown
codeparrot/codeparrot-clean
from django.apps import apps from django.contrib.contenttypes.models import ContentType, ContentTypeManager from django.contrib.contenttypes.prefetch import GenericPrefetch from django.db import models from django.db.migrations.state import ModelState, ProjectState from django.test import TestCase, override_settings fr...
python
github
https://github.com/django/django
tests/contenttypes_tests/test_models.py
# frozen_string_literal: true module ActiveRecord module Encryption # This is a wrapper for a hash of encryption properties. It is used by # +Key+ (public tags) and +Message+ (headers). # # Since properties are serialized in messages, it is important for storage # efficiency to keep their keys as...
ruby
github
https://github.com/rails/rails
activerecord/lib/active_record/encryption/properties.rb
"""Base classes for chain routing.""" from __future__ import annotations from abc import ABC from collections.abc import Mapping from typing import Any, NamedTuple from langchain_core.callbacks import ( AsyncCallbackManagerForChainRun, CallbackManagerForChainRun, Callbacks, ) from pydantic import ConfigD...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/chains/router/base.py
from setuptools import setup, find_packages from codecs import open from os import path __version__ = '0.2.4' here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() # get the dependen...
unknown
codeparrot/codeparrot-clean
""" Tests that work on both the Python and C engines but do not have a specific classification into the other test modules. """ import codecs import csv from datetime import datetime from inspect import signature from io import BytesIO, StringIO import os import platform from urllib.error import URLError import numpy ...
unknown
codeparrot/codeparrot-clean
#!/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
<?php namespace Illuminate\Tests\Foundation; use Illuminate\Foundation\Testing\Concerns\InteractsWithTime; use Illuminate\Support\Carbon; use PHPUnit\Framework\TestCase; class FoundationInteractsWithTimeTest extends TestCase { use InteractsWithTime; protected function tearDown(): void { Carbon::...
php
github
https://github.com/laravel/framework
tests/Foundation/FoundationInteractsWithTimeTest.php
# Copyright 2019-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos 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 versio...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'OpenIDAccount' db.delete_table('openid_openidaccount') def backwards(self, orm): # Adding model 'OpenIDAccount' db.crea...
unknown
codeparrot/codeparrot-clean
""" This module includes some utility functions for inspecting the layout of a GDAL data source -- the functionality is analogous to the output produced by the `ogrinfo` utility. """ from django.contrib.gis.gdal import DataSource from django.contrib.gis.gdal.geometries import GEO_CLASSES def ogrinfo(data_source, num_...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, David Stygstra <david.stygstra@gmail.com> # # This file is part of Ansible # # 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 ...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 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
""" Parser for an obscure FMV file format: bin files from the game "The Amazing Spider-Man vs. The Kingpin" (Sega CD) Author: Mike Melanson Creation date: 2006-09-30 File samples: http://samples.mplayerhq.hu/game-formats/spiderman-segacd-bin/ """ from lib.hachoir_parser import Parser from lib.hachoir_core.field impor...
unknown
codeparrot/codeparrot-clean
/* Copyright 2023 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/phases/bootstraptoken/node/token_test.go
# Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
unknown
codeparrot/codeparrot-clean
from django.db import models class Building(models.Model): name = models.CharField(max_length=10) def __unicode__(self): return u"Building: %s" % self.name class Device(models.Model): building = models.ForeignKey('Building') name = models.CharField(max_length=10) def __unicode__(self): ...
unknown
codeparrot/codeparrot-clean
prelude: | # frozen_string_literal: true benchmark: long: File.dirname("/Users/george/src/github.com/ruby/ruby/benchmark/file_dirname.yml") short: File.dirname("foo/bar") n_4: File.dirname("/Users/george/src/github.com/ruby/ruby/benchmark/file_dirname.yml", 4)
unknown
github
https://github.com/ruby/ruby
benchmark/file_dirname.yml
# 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
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016, René Moser <mail@renemoser.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterface'], 'supported...
unknown
codeparrot/codeparrot-clean
import typing from .. import enums, markups, typings from ..bundle import LilyPondFormatBundle from ..overrides import LilyPondOverride, TweakInterface from ..storage import StorageFormatManager from ..string import String class StartTextSpan: r""" LilyPond ``\startTextSpan`` command. .. container:: exa...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/clients/admin/ExpireDelegationTokenResult.java
# 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 may ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """NumPy: array processing for numbers, strings, records, and objects. NumPy is a general-purpose array-processing package designed to efficiently manipulate large multi-dimensional arrays of arbitrary records without sacrificing too much speed for small multi-dimensional arrays. NumPy is built ...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package api import ( "bytes" "encoding/json" "fmt" "io" "net/http" ) // Response is a raw response that wraps an HTTP response. type Response struct { *http.Response } // DecodeJSON will decode the response body to a JSON structure. This //...
go
github
https://github.com/hashicorp/vault
api/response.go
""" Support for FRITZ!Box routers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/device_tracker.fritz/ """ import logging from datetime import timedelta import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.c...
unknown
codeparrot/codeparrot-clean
import itertools import numpy as np import pytest from pandas import ( DataFrame, Series, notna, ) def create_series(): return [ Series(dtype=np.float64, name="a"), Series([np.nan] * 5), Series([1.0] * 5), Series(range(5, 0, -1)), Series(range(5)), Seri...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/window/moments/conftest.py
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from future.moves.urllib.parse import unquote import hashlib import io import logging import mimetypes import os import shutil import socket import sys import tempfile fro...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2009-2019 The Bitcoin Core developers # Copyright (c) 2014-2019 The DigiByte Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test BIP66 (DER SIG). Test that the DERSIG soft...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 The Oppia 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 ...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 Canonical Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
unknown
codeparrot/codeparrot-clean
from threading import RLock from pycoin.convention.tx_fee import TX_FEE_PER_THOUSAND_BYTES from pycoin.tx.tx_utils import create_tx, sign_tx class SQLite3Wallet(object): def __init__(self, keychain, persistence, desired_spendable_count=None, min_extra_spendable_amount=1000000): self.keychain = keychain ...
unknown
codeparrot/codeparrot-clean
# Radial lines [Examples](https://observablehq.com/@d3/d3-lineradial) · A radial line generator is like the Cartesian [line generator](./line.md) except the [x](./line.md#line_x) and [y](./line.md#line_y) accessors are replaced with [angle](#lineRadial_angle) and [radius](#lineRadial_radius) accessors. Radial lines ar...
unknown
github
https://github.com/d3/d3
docs/d3-shape/radial-line.md
# # The BSD License # # Copyright (c) 2008, Florian Noeding # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list o...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts] //// //// [accessorsAreNotContextuallyTyped.ts] // accessors are not contextually typed class C { set x(v: (a: string) => string) { } get x() { return (x: string) => ""...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/accessorsAreNotContextuallyTyped.js
# fly ArduPlane QuadPlane in SITL from __future__ import print_function import os import pexpect import shutil from pymavlink import mavutil from common import * from pysim import util # get location of scripts testdir = os.path.dirname(os.path.realpath(__file__)) HOME_LOCATION = '-27.274439,151.290064,343,8.7' MISS...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package statefile import ( "encoding/json" "errors" "fmt" "io" "io/ioutil" "os" version "github.com/hashicorp/go-version" "github.com/hashicorp/terraform/internal/tfdiags" tfversion "github.com/hashicorp/terraform/version" ) // ErrNoSta...
go
github
https://github.com/hashicorp/terraform
internal/states/statefile/read.go
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/yeison/Documentos/python/developing/pinguino/pinguino-ide/qtgui/gide/bloques/inside/part.ui' # # Created: Fri Dec 19 15:43:18 2014 # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes made in this file will be ...
unknown
codeparrot/codeparrot-clean
''' vivo.sx urlresolver plugin Copyright (C) 2015 y2000j This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distr...
unknown
codeparrot/codeparrot-clean
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
unknown
codeparrot/codeparrot-clean
// 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 #ifndef __OPENCV_PERF_PRECOMP_HPP__ #define __OPENCV_PERF_PRECOMP_HPP__ #include "opencv2/ts.hpp" #endif
unknown
github
https://github.com/opencv/opencv
modules/core/perf/perf_precomp.hpp
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2012-TODAY OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.server.application import io.ktor.server.request.* import io.ktor.server.response.* import io.ktor.util.pipeline.* /** * Pipeline configuration for executing [PipelineCall] in...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-core/common/src/io/ktor/server/application/ApplicationCallPipeline.kt
import type { RouterProviderProps } from "react-router/dom"; import { HydratedRouter, RouterProvider } from "react-router/dom"; // TODO: Confirm if this causes tree-shaking issues and if so, convert to named exports export type * from "react-router"; export * from "react-router"; export type { RouterProviderProps }; ...
typescript
github
https://github.com/remix-run/react-router
packages/react-router-dom/index.ts
""" Tutorial Diagrams ----------------- This script plots the flow-charts used in the scikit-learn tutorials. """ import numpy as np import pylab as pl from matplotlib.patches import Circle, Rectangle, Polygon, Arrow, FancyArrow def create_base(box_bg = '#CCCCCC', arrow1 = '#88CCFF', ...
unknown
codeparrot/codeparrot-clean
"""Representing and manipulating email headers via custom objects. This module provides an implementation of the HeaderRegistry API. The implementation is designed to flexibly follow RFC5322 rules. """ from types import MappingProxyType from email import utils from email import errors from email import _header_value_...
python
github
https://github.com/python/cpython
Lib/email/headerregistry.py
#!/usr/bin/python3 # -*- coding: utf-8 -*- '''Pychemqt, Chemical Engineering Process simulator Copyright (C) 2009-2017, Juan José Gómez Romera <jjgomera@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 Softwar...
unknown
codeparrot/codeparrot-clean
# Written by Bram Cohen # see LICENSE.txt for license information from random import randrange, shuffle from BitTornado.clock import clock try: True except: True = 1 False = 0 class PiecePicker: def __init__(self, numpieces, rarest_first_cutoff = 1, rarest_first_priority_cutoff = 3, ...
unknown
codeparrot/codeparrot-clean
import array import math import struct import StringIO import logging from ttypes import Type logger = logging.getLogger("parquet") def read_plain_boolean(fo): """Reads a boolean using the plain encoding""" raise NotImplemented def read_plain_int32(fo): """Reads a 32-bit int using the plain encoding""" ...
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
from __future__ import annotations from typing import TYPE_CHECKING from scrapy.utils.test import get_crawler from tests.spiders import SimpleSpider from tests.utils.decorators import coroutine_test if TYPE_CHECKING: import pytest from tests.mockserver.http import MockServer @coroutine_test async def test_...
python
github
https://github.com/scrapy/scrapy
tests/test_core_scraper.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Website-context rendering needs to add some metadata to rendered fields, as well as render a few fields differently. Also, adds methods to convert values back to openerp models. """ import cStringIO import datetime import itertools import logging import os import urllib2 import urlparse im...
unknown
codeparrot/codeparrot-clean