code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
""" Files Pipeline See documentation in topics/media-pipeline.rst """ import hashlib import os import os.path import time import logging from email.utils import parsedate_tz, mktime_tz from six.moves.urllib.parse import urlparse from collections import defaultdict import six try: from cStringIO import StringIO a...
unknown
codeparrot/codeparrot-clean
""" Support for Unifi WAP controllers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/device_tracker.unifi/ """ import logging import urllib from homeassistant.components.device_tracker import DOMAIN from homeassistant.const import CONF_HOST, CONF_USERN...
unknown
codeparrot/codeparrot-clean
# 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 datetime import json import socket import threading import time import unittest import mozfile import mozlog c...
unknown
codeparrot/codeparrot-clean
# Installation source spoke classes # # Copyright (C) 2011, 2012 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program ...
unknown
codeparrot/codeparrot-clean
# # Secret Labs' Regular Expression Engine # # convert re-style regular expression to sre pattern # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # See the __init__.py file for information on usage and redistribution. # """Internal support module for sre""" # XXX: show string offset and offendi...
python
github
https://github.com/python/cpython
Lib/re/_parser.py
from django.db.models import signals from django.test import TestCase from django.core import management from django.utils import six from . import models PRE_SYNCDB_ARGS = ['app', 'create_models', 'verbosity', 'interactive', 'db'] SYNCDB_DATABASE = 'default' SYNCDB_VERBOSITY = 1 SYNCDB_INTERACTIVE = False class Pre...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Support for plugins.""" import os.path import sys from coverage.misc import CoverageException from coverage.plugin import CoveragePlugin, FileTracer, FileRepor...
unknown
codeparrot/codeparrot-clean
import os import lit.llvm lit.llvm.initialize(lit_config, config) lit.llvm.llvm_config.use_default_substitutions() # TODO: Consolidate the logic for turning on the internal shell by default for all LLVM test suites. # See https://github.com/llvm/llvm-project/issues/106636 for more details. # # We prefer the lit inte...
python
github
https://github.com/llvm/llvm-project
clang-tools-extra/include-cleaner/test/lit.cfg.py
# encoding=utf-8 from Products.CMFPlone.utils import safe_unicode from bika.lims.controlpanel.bika_analysisservices import AnalysisServicesView from bika.lims import bikaMessageFactory as _ from bika.lims.utils import t from plone.app.content.browser.interfaces import IFolderContentsView from zope.interface import imp...
unknown
codeparrot/codeparrot-clean
#![warn(rust_2018_idioms)] #![cfg(all(feature = "full", not(target_os = "wasi"), not(miri)))] // Wasi doesn't support bind // No `socket` on miri. use tokio::io::{self, AsyncReadExt, AsyncWriteExt}; use tokio::net::{TcpListener, TcpStream}; use tokio::...
rust
github
https://github.com/tokio-rs/tokio
tokio/tests/tcp_shutdown.rs
"""Unit tests for buildscripts/resmokelib/suitesconfig.py.""" import unittest import mock from buildscripts.resmokelib import parser, suitesconfig parser.set_run_options() RESMOKELIB = "buildscripts.resmokelib" class TestSuitesConfig(unittest.TestCase): @mock.patch(RESMOKELIB + ".testing.suite.Suite") @mo...
python
github
https://github.com/mongodb/mongo
buildscripts/tests/resmokelib/test_suitesconfig.py
import numpy from chainer import cuda from chainer import function from chainer import utils from chainer.utils import type_check class CrossCovariance(function.Function): """Cross-covariance loss.""" def __init__(self): self.y_centered = None self.z_centered = None self.covariance =...
unknown
codeparrot/codeparrot-clean
########################################################################## # # Copyright 2012, Electric Theatre Collective Limited. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Re...
unknown
codeparrot/codeparrot-clean
// Copyright 2015 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql_test import ( "context" "testing" "github.com/cockroachdb/cockroach/pkg/base" "github.com/cockroachdb/cockroach/pkg/keys" "github.com/cockroachdb/cock...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/database_test.go
#!/usr/bin/env python # A simple script that extracts config group entry names from a file, # generates variable definitions for d-classes and replaces the strings of # these entries with the defined variables. The result is stored in a new file. # Expects a file name as argument # # author: Johannes Wienke <languitar...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright(C) 2013 Vincent A # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opt...
unknown
codeparrot/codeparrot-clean
// Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package runtime_test import ( . "runtime" "strconv" "testing" _ "unsafe" // for go:linkname ) func TestReadRandom(t *testing.T) { if *ReadRandomFailed { ...
go
github
https://github.com/golang/go
src/runtime/rand_test.go
# frozen_string_literal: true require "base64" module ActiveRecord module Encryption # A message serializer that serializes +Messages+ with JSON. # # The generated structure is pretty simple: # # { # p: <payload>, # h: { # header1: value1, # header2: value2,...
ruby
github
https://github.com/rails/rails
activerecord/lib/active_record/encryption/message_serializer.rb
# Copyright 2014 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 traceback from app_yaml_helper import AppYamlHelper from appengine_wrappers import IsDeadlineExceededError, logservice, taskqueue from branch_utility...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # 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 of conditions and the following disclaimer. # * ...
unknown
codeparrot/codeparrot-clean
# React Compiler Knowledge Base This document contains knowledge about the React Compiler gathered during development sessions. It serves as a reference for understanding the codebase architecture and key concepts. ## Project Structure When modifying the compiler, you MUST read the documentation about that pass in `...
unknown
github
https://github.com/facebook/react
compiler/CLAUDE.md
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Title: CURLINFO_SSL_VERIFYRESULT Section: 3 Source: libcurl See-also: - CURLINFO_PROXY_SSL_VERIFYRESULT (3) - curl_easy_getinfo (3) - curl_easy_setopt (3) Protocol: - TLS TLS-backend: - OpenSSL - GnuTLS Added-in: 7....
unknown
github
https://github.com/curl/curl
docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.md
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software...
unknown
codeparrot/codeparrot-clean
# (c) 2014, Kent R. Spillner <kspillner@acm.org> # # 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 ve...
unknown
codeparrot/codeparrot-clean
name: Prepare Release on: workflow_dispatch: push: branches: - "master" - "release/**" env: XCODE_VERSION: "['16.3', '16.4', '26.0.1']" PLATFORM: "['ios', 'osx', 'watchos', 'tvos', 'catalyst', 'visionos']" RELEASE_VERSION: '26.0.1' DEVELOPER_DIR: /Applications/Xcode_26.0.1.app/Contents/Devel...
unknown
github
https://github.com/realm/realm-swift
.github/workflows/master-push.yml
#!/usr/bin/env python # this thing generates *enormous* files when converted to .png # # dependancy will just be a map from a file to a list of files # true if the directory contains a .svn in it def svn(dir): return '.svn' in dir def read_includes(file): import re input = open(file) local_include = ...
unknown
codeparrot/codeparrot-clean
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, ...
java
github
https://github.com/elastic/elasticsearch
benchmarks/src/main/java/org/elasticsearch/benchmark/routing/allocation/TestShardRoutingRoleStrategies.java
#!/usr/bin/env python #-*- coding=utf-8 -*- import sys header = [] compat_table = {} freq_table = {} def load_compat(filename): src = open(filename, 'r') for i in src.readlines(): list = i.strip().split('\t') key = unichr(int(list[0], 16)) value = unichr(int(list[1], 16)) com...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import math import time import numpy import scipy.stats from appionlib import apDisplay from appionlib.apImage import imagestat from appionlib.apCtf import ctftools, genctf, leastsq #=================================================== #=================================================== #=======...
unknown
codeparrot/codeparrot-clean
//===--- SwiftRemoteMirrorTypes.h - Remote reflection types -----*- C++ -*-===// // // 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...
c
github
https://github.com/apple/swift
include/swift/SwiftRemoteMirror/SwiftRemoteMirrorTypes.h
'''Complete the current word before the cursor with words in the editor. Each menu selection or shortcut key selection replaces the word with a different word with the same prefix. The search for matches begins before the target and moves toward the top of the editor. It then starts after the cursor and moves down. It...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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__ ...
unknown
codeparrot/codeparrot-clean
.wrapper { height: 100%; width: 100%; max-width: 1000px; margin: auto; display: flex; justify-content: flex-end; align-items: center; } .col { width: 100%; display: flex; flex-direction: column; justify-content: space-between; align-items: center; } .overall-stats { display: flex; flex-dir...
css
github
https://github.com/angular/angular
adev/src/content/tutorials/playground/3-minigame/src/game.css
/* * 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/config/MapFactoryBean.java
// Copyright 2020 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package featureflag import ( "context" "github.com/cockroachdb/cockroach/pkg/server/telemetry" "github.com/cockroachdb/cockroach/pkg/settings" "github.com/cockroac...
go
github
https://github.com/cockroachdb/cockroach
pkg/featureflag/feature_flags.go
""" Sahana Eden Automated Test - HRM001 Create Job Role @copyright: 2011-2012 (c) Sahana Software Foundation @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 with...
unknown
codeparrot/codeparrot-clean
import _base class Filter(_base.Filter): def __init__(self, source, encoding): _base.Filter.__init__(self, source) self.encoding = encoding def __iter__(self): state = "pre_head" meta_found = (self.encoding is None) pending = [] for token in _base.Filter.__iter...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import pprint import sys import simpleparse.dispatchprocessor declaration = r'''# note use of raw string when embedding in python code... full := ws,expr,ws number := [0-9eE+.-]+ expr := number,'+',number/number,'-',number ws := [ \t\v]* ''' class MyProcessorClass(s...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Translation; use Stringable; class PotentiallyTranslatedString implements Stringable { /** * The string that may be translated. * * @var string */ protected $string; /** * The translated string. * * @var string|null */ protected $tra...
php
github
https://github.com/laravel/framework
src/Illuminate/Translation/PotentiallyTranslatedString.php
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'Team.owner' db.delete_column(u'sentry_team', 'owner_id')...
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/common/ClassicGroupState.java
/* * 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.fir.test.cases.generated.cases.components.typeCreator; import com.i...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/typeCreator/FirIdeDependentAnalysisScriptSourceModuleBuildClassTypeTestGenerated.java
// // Rotating border // .spinner-grow, .spinner-border { display: inline-block; flex-shrink: 0; width: var(--#{$prefix}spinner-width); height: var(--#{$prefix}spinner-height); vertical-align: var(--#{$prefix}spinner-vertical-align); // stylelint-disable-next-line property-disallowed-list border-radius: ...
unknown
github
https://github.com/twbs/bootstrap
scss/_spinners.scss
@use '@angular/docs/styles/media-queries' as mq; // primary nav :host { display: flex; position: sticky; top: 0; z-index: var(--z-index-nav); .adev-mobile-nav-button { display: flex; align-items: center; gap: 0.75rem; } // render tablet primary nav under blur when secondary is open @inclu...
unknown
github
https://github.com/angular/angular
adev/src/app/core/layout/navigation/navigation.component.scss
# 3p from nose.plugins.attrib import attr # project from tests.checks.common import AgentCheckTest, Fixtures from utils.shell import which def mocked_varnishstatoutput(cmd): return Fixtures.read_file('dump.xml') COMMON_METRICS = [ 'varnish.SMA.Transient.g_alloc', 'varnish.SMA.Transient.g_bytes', 'var...
unknown
codeparrot/codeparrot-clean
// Copyright © 2023 Apple Inc. #pragma once #include <ATen/mps/MPSStream.h> #include <ctime> #include <stack> namespace at::mps { // NOTE: don't create instances of this class directly. // Use MPSEventPool to acquire instances of MPSEvent. class MPSEvent { public: explicit MPSEvent(id_t ID, MPSStream* stream, b...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/mps/MPSEvent.h
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package terraform import ( "github.com/hashicorp/hcl/v2" "github.com/hashicorp/terraform/internal/tfdiags" "github.com/zclconf/go-cty/cty" ) // defaultQueryLimit is the default value for the "limit" argument in a list block. const defaultQueryL...
go
github
https://github.com/hashicorp/terraform
internal/terraform/eval_query.go
// Copyright 2019 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. //go:build !windows && !freebsd && !dragonfly package server import ( "unsafe" "golang.org/x/sys/unix" ) // #include <sys/types.h> // #include <sys/sysctl.h> impor...
go
github
https://github.com/cockroachdb/cockroach
pkg/server/rlimit_darwin.go
import pytest from pandas import ( Index, Series, ) import pandas._testing as tm from pandas.api.types import is_bool_dtype @pytest.mark.parametrize( "data, index, drop_labels, axis, expected_data, expected_index", [ # Unique Index ([1, 2], ["one", "two"], ["two"], 0, [1], ["one"]), ...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/series/methods/test_drop.py
from functools import wraps class Task(object): """ Abstract base class for objects wishing to be picked up as Fabric tasks. Instances of subclasses will be treated as valid tasks when present in fabfiles loaded by the :doc:`fab </usage/fab>` tool. For details on how to implement and use `~fabric...
unknown
codeparrot/codeparrot-clean
// (C) Copyright Jeremy Siek 2001. // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software ...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/detail/algorithm.hpp
# -*- coding: utf-8 -*- # # PyDOAS documentation build configuration file, created by # sphinx-quickstart on Tue Apr 12 14:39:57 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
unknown
codeparrot/codeparrot-clean
import os import tempfile import shutil import re import datetime from django.test.utils import override_settings from django.conf import settings from speeches.tests import InstanceTestCase import speeches from speeches.models import Speech, Speaker, Section TEMP_MEDIA_ROOT = tempfile.mkdtemp() @override_settings...
unknown
codeparrot/codeparrot-clean
/* * By downloading, copying, installing or using the software you agree to this license. * If you do not agree to this license, do not download, install, * copy or use the software. * * * License Agreement * For Open Source Computer Vision Library * ...
cpp
github
https://github.com/opencv/opencv
hal/carotene/src/in_range.cpp
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, getdate from frappe import _ from frappe.model.mapper import get_mapped_doc from frappe.model.document imp...
unknown
codeparrot/codeparrot-clean
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
unknown
codeparrot/codeparrot-clean
<!doctype html> <html> <head> <title>axios - get example</title> <link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"/> </head> <body class="container"> <h1>axios.get</h1> <ul id="people" class="list-unstyled"></ul> <script src="/axios....
html
github
https://github.com/axios/axios
examples/get/index.html
import json steps = [[] for _ in range(500000)] steps[0].append({"light":'low', "room": 'Hall.1'}) steps[0].append({"light":'low', "room": 'Lab1.1'}) steps[0].append({"light":'low', "room": 'Lab2.1'}) def addAgentMovement(agent, room, stepStart, stepEnd): steps[stepStart+1].append({"agent":agent.unique_id, "moveTo"...
unknown
codeparrot/codeparrot-clean
# -*- coding:utf-8 -*- from django.shortcuts import render from django.shortcuts import render_to_response from django.core.context_processors import request from django.http.response import HttpResponse from models import Asset from test.test_httplib import CERT_fakehostname from web.models import UserInfo from web....
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('contentse...
unknown
codeparrot/codeparrot-clean
import enum import click import numpy as np import pandas as pd @enum.unique class Area(enum.Enum): core = 'core' tests = 'tests' build = 'build' apps = 'apps' docs = 'docs' def define_area(msg): areas = [e.value for e in Area] for area in areas: if msg.startswith(f'[{area}] '): ...
unknown
codeparrot/codeparrot-clean
import cgi import unittest import six from six.moves import xmlrpc_client as xmlrpclib from six.moves.urllib.parse import urlparse from scrapy.http import Request, FormRequest, XmlRpcRequest, Headers, HtmlResponse from scrapy.utils.python import to_bytes, to_native_str class RequestTest(unittest.TestCase): requ...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
unknown
codeparrot/codeparrot-clean
/* MIT License * * Copyright (c) 1998 Massachusetts Institute of Technology * Copyright (c) The c-ares project and its contributors * * 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 wi...
c
github
https://github.com/nodejs/node
deps/cares/src/lib/ares_strerror.c
# SPDX-License-Identifier: GPL-2.0 %YAML 1.2 --- $id: http://devicetree.org/schemas/bus/simple-pm-bus.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Simple Power-Managed Bus maintainers: - Geert Uytterhoeven <geert+renesas@glider.be> description: | A Simple Power-Managed Bus is a transparent...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/bus/simple-pm-bus.yaml
"""Unit tests for multiversion_service.py.""" from unittest import TestCase from packaging.version import Version import buildscripts.resmokelib.multiversion.multiversion_service as under_test class TestTagStr(TestCase): def test_require_fcv_tag_should_be_returned(self): self.assertEqual(under_test.tag_...
python
github
https://github.com/mongodb/mongo
buildscripts/tests/resmokelib/multiversion/test_multiversion_service.py
#!/usr/bin/env python from basetest import BaseTest, TestStores, StringIO, BytesIO, ExecMan, BackgroundException import sys, os, tempfile, subprocess, shutil import unittest sys.path.insert(0, '..') from zeroinstall import cmd, logger from zeroinstall.injector import model, selections, qdom, handler, gpg, config, back...
unknown
codeparrot/codeparrot-clean
// errorcheck // Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Verify that incorrect invocations of the complex predeclared function are detected. // Does not compile. package main type ( Float32 flo...
go
github
https://github.com/golang/go
test/cmplx.go
from __future__ import division, print_function, absolute_import import warnings from scipy.constants import constants, codata, find, value from numpy.testing import (assert_equal, assert_, run_module_suite, assert_almost_equal) def test_find(): with warnings.catch_warnings(): ...
unknown
codeparrot/codeparrot-clean
#ifndef SQL_JSON_PATH_INCLUDED #define SQL_JSON_PATH_INCLUDED /* Copyright (c) 2015, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. Th...
c
github
https://github.com/mysql/mysql-server
sql-common/json_path.h
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that missing 'sources' files are treated as fatal errors when the the generator flag 'msvs_error_on_missing_sources' is set. ""...
unknown
codeparrot/codeparrot-clean
from django.utils.translation import ugettext_lazy as _ TABLE_ID = _( "Choose something short, unique, and memorable using " "lowercase letters, numbers, and underscores") DISPLAY_NAME = _( "This is what the data source will be called in navigation, page title, etc.") DESCRIPTION = _( "Write yourself a...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import getpass from ._compat import string_types, ascii_lowercase, input def prompt(name, default=None): """ Grab user input from command line. :param name: prompt text :param default: default value if no input provided. """ prompt = name + (default and ' [%s]' % defa...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import xml.dom.minidom import pickle from Node import Node #import imp #from Node #import Node #newNode= #imp.reload(Node) from xml.dom import minidom #This is a independent file and it will be executed whenever there is a resource addition of removal based on nodeinfo.xml #======================...
unknown
codeparrot/codeparrot-clean
import os from io import BytesIO from django.utils import timezone from django.template.loader import get_template from django.template import Context from django.core.mail import EmailMessage from django.conf import settings from reportlab.pdfgen import canvas from reportlab.platypus import Table from reportlab.lib.p...
unknown
codeparrot/codeparrot-clean
function foo(x) { if (x <= 0) { return 0; } return x + foo(x - 1) + (() => foo(x - 2))(); } export const FIXTURE_ENTRYPOINT = { fn: foo, params: [10], };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/recursive-function.js
# -*- coding: utf-8 -*- """ Created on Mon Nov 30 17:28:58 2015 @author: fernando chaure """ from configuration import GENERAL_CONFIG as CONFIG from multiprocess_config import * import numpy as np from configuration import CONFIG_PARSER from os import path COMM = {} for x in CONFIG_PARSER['FORMAT_CONFIG']: if CO...
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines.exceptions import kotlinx.coroutines.testing.* import kotlinx.coroutines.* import kotlinx.coroutines.channels.* import org.junit.Test import kotlin.test.* class ProduceExceptionsTest : TestBase() { @Test fun testFailingProduce() = runTest(unhandled = listOf({ e -> e is TestExceptio...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/jvm/test/exceptions/ProduceExceptionsTest.kt
- name: Setup remote constraints include_tasks: setup-remote-constraints.yml - name: Install Paramiko for Python 3 on MacOS pip: # no homebrew package manager in core, just use pip name: paramiko extra_args: "-c {{ remote_constraints }}" environment: # Not sure why this fixes the test, but it does. ...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/setup_paramiko/install-Darwin-python-3.yml
# Copyright 2007, 2015 Free Software Foundation, Inc. # This file is part of GNU Radio # # GNU Radio Companion 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 opt...
unknown
codeparrot/codeparrot-clean
# UI base class # Copyright (C) 2002 John Goerzen # <jgoerzen@complete.org> # # 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) a...
unknown
codeparrot/codeparrot-clean
"""Support for Dyson Pure Cool Link Sensors.""" import logging from libpurecool.dyson_pure_cool import DysonPureCool from libpurecool.dyson_pure_cool_link import DysonPureCoolLink from homeassistant.const import PERCENTAGE, STATE_OFF, TEMP_CELSIUS, TIME_HOURS from homeassistant.helpers.entity import Entity from . im...
unknown
codeparrot/codeparrot-clean
import copy import warnings from bisect import bisect from collections import OrderedDict, defaultdict from itertools import chain from django.apps import apps from django.conf import settings from django.core.exceptions import FieldDoesNotExist, ImproperlyConfigured from django.db import connections from django.db.mo...
unknown
codeparrot/codeparrot-clean
# -*- coding:utf-8 -*- ''' 添加信息 ''' import uuid import tornado.web import libs import core.base_handler as base_handler from core.config import c from pycate.model.catalog_model import MCatalog from pycate.model.city_model import MCity # from model.member_mode_l import MUser class AddHandler(base_handler.PycateBas...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** FieldsCalculator.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **********************...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # #Copyright 2012-2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option...
unknown
codeparrot/codeparrot-clean
package client import ( "fmt" "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 TestServiceUpdateError(t *testing.T) { client, err := New(WithMockClient(errorMock(http.StatusInternalServerError,...
go
github
https://github.com/moby/moby
client/service_update_test.go
# Copyright 2013 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 logging import os from metrics import Metric class MediaMetric(Metric): """MediaMetric class injects and calls JS responsible for recording metrics...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
swift
github
https://github.com/apple/swift
benchmark/single-source/AnyHashableWithAClass.swift
# # 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...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Define here the models for your spider middleware # # See documentation in: # http://doc.scrapy.org/en/latest/topics/spider-middleware.html from scrapy import signals class NewscrawlerSpiderMiddleware(object): # Not all methods need to be defined. If a method is not defined, # scrap...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # pyswip -- Python SWI-Prolog bridge # Copyright (c) 2007-2012 Yüce Tekol # # 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 lim...
unknown
codeparrot/codeparrot-clean
import datetime from unittest import skipUnless from django.core.exceptions import FieldError from django.db import connection from django.test import TestCase, override_settings from .models import Article, Category, Comment class DatesTests(TestCase): def test_related_model_traverse(self): a1 = Article...
python
github
https://github.com/django/django
tests/dates/tests.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import random import time import unittest from mock import call from mock import patch from mock import MagicMock as Mock import pyrax from pyrax.manager import BaseManager from pyrax.clouddns import assure_domain from pyrax.clouddns import CloudDNSClient from pyrax.clou...
unknown
codeparrot/codeparrot-clean
import unittest, random, sys, time sys.path.extend(['.','..','../..','py']) import h2o, h2o_browse as h2b, h2o_exec as h2e, h2o_import as h2i DO_COMPOUND = False phrasesCompound = [ # use a dialetc with restricted grammar # 1. all functions are on their own line # 2. all functions only use data thru thei...
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 use ...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package userpass import ( "context" "crypto/tls" "fmt" "reflect" "strings" "testing" "time" "github.com/go-test/deep" "github.com/hashicorp/go-sockaddr" logicaltest "github.com/hashicorp/vault/helper/testhelpers/logical" "github.com/ha...
go
github
https://github.com/hashicorp/vault
builtin/credential/userpass/backend_test.go