code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#!/usr/bin/env python # # Copyright 2012,2013 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 optio...
unknown
codeparrot/codeparrot-clean
// Copyright 2019 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 syscall import "unsafe" func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeva...
go
github
https://github.com/golang/go
src/syscall/syscall_freebsd_arm64.go
# # 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 us...
unknown
codeparrot/codeparrot-clean
""" Provides a sensor to track various status aspects of a UPS. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.nut/ """ import logging from datetime import timedelta import voluptuous as vol from homeassistant.components.sensor import PLATFORM_S...
unknown
codeparrot/codeparrot-clean
function useHook(a, b) { b.test = 1; a.test = 2; }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.mutate-hook-argument.js
# -*- coding: utf-8 -*- # Copyright 2010 Google Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to u...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/mtd/loongson,ls1b-nand-controller.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Loongson NAND Controller maintainers: - Keguang Zhang <keguang.zhang@gmail.com> - Binbin Zhou <zhoubinbin...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/mtd/loongson,ls1b-nand-controller.yaml
# BurnMan - a lower mantle toolkit # Copyright (C) 2012, 2013, Heister, T., Unterborn, C., Rose, I. and Cottaar, S. # Released under GPL v2 or later. class Material(object): """ Base class for all materials. The main functionality is unroll() which returns a list of objects of type :class:`~burnman.mineral...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # encoding: utf-8 # Eclipse CDT 5.0 generator for Waf # Richard Quirk 2009-1011 (New BSD License) # Thomas Nagy 2011 (ported to Waf 1.6) """ Usage: def options(opt): opt.load('eclipse') $ waf configure eclipse """ import sys, os from waflib import Utils, Logs, Context, Build, TaskGen, Script...
unknown
codeparrot/codeparrot-clean
- hosts: testhost gather_facts: no tasks: - name: Test proper bool evaluation of ansible_become (issue #70476) shell: whoami register: output - name: Assert we are NOT the become user specified assert: that: - "output.stdout != 'ansibletest1'"
unknown
github
https://github.com/ansible/ansible
test/integration/targets/inventory_ini/test_ansible_become.yml
/* Copyright 2023 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/mlir/tf2xla/api/v1/compile_tf_graph.h
# -*- coding: UTF-8 -*- from flask import (jsonify, request, render_template, redirect, session, current_app) from flask.ext.wtf import Form from flask.ext.babel import _ from wtforms import TextField, PasswordField from wtforms.validators import DataRequired from werkzeug.security import generate_pa...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import json from .common import InfoExtractor from ..utils import ( ExtractorError, float_or_none, sanitized_Request, ) class AzubuIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?azubu\.(?:tv|uol.com.br)/[^/]+#!/play/(?P<id>\d+)' _TESTS = [ { ...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function from builtins import str import os import unittest import shutil import unittest import yaml from fundamentals.utKit import utKit from fundamentals import tools from os.path import expanduser home = expanduser("~") packageDirectory = utKit("").get_project_root() settingsFile = pac...
unknown
codeparrot/codeparrot-clean
package overlay import ( "context" "encoding/json" "net" "net/http" "sync" "github.com/Microsoft/hcsshim" "github.com/containerd/log" "github.com/moby/moby/v2/daemon/libnetwork/driverapi" "github.com/moby/moby/v2/daemon/libnetwork/scope" ) const ( NetworkType = "overlay" ) var _ driverapi.TableWatcher = (...
go
github
https://github.com/moby/moby
daemon/libnetwork/drivers/windows/overlay/overlay_windows.go
#!/usr/bin/env python # Copyright (c) 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 cStringIO import logging import os import sys import textwrap import unittest ROOT_DIR = os.path.dirname(os.path.dirname(os...
unknown
codeparrot/codeparrot-clean
# some accessing of the semantic concordance data for wordnet 1.6 # by Des Berry, berry@ais.it import string, os from wordnet import binarySearchFile # Sample entries in the 'taglist' file # ordinary%1:18:01:: 1 br-a01:78,1;86,1;88,4 # ordered%5:00:00:organized:01 2 br-j23:6,14;13,32;66,12 # where the general for...
unknown
codeparrot/codeparrot-clean
## Input ```javascript function Component(props) { const x = makeOptionalObject(props); const y = makeObject(props); const z = x?.optionalMethod?.(y.a, props.a, foo(y.b), bar(props.b)); return z; } ``` ## Code ```javascript import { c as _c } from "react/compiler-runtime"; function Component(props) { cons...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/optional-receiver-optional-method.expect.md
package schemaversion import "context" // V41 removes the deprecated time_options property from dashboard timepicker configuration. // // This migration addresses technical debt by cleaning up legacy timepicker settings that have // been obsolete since Grafana version 5. The time_options property was originally desig...
go
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/schemaversion/v41.go
//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression8_es2017.ts] //// //// [awaitCallExpression8_es2017.ts] declare var a: boolean; declare var p: Promise<boolean>; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; declare var o: { fn(arg0: boolean, arg1: boolean, ar...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/awaitCallExpression8_es2017.js
import datetime import re from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.forms.widgets import Widget, Select from django.utils import six from django.utils.dates import MONTHS from django.utils.safestring import mark_safe from .mod...
unknown
codeparrot/codeparrot-clean
""" Test suite for the fixer modules """ # Python imports import os import unittest from itertools import chain from operator import itemgetter # Local imports from lib2to3 import pygram, pytree, refactor, fixer_util from lib2to3.tests import support class FixerTestCase(support.TestCase): # Other test cases can...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
unknown
codeparrot/codeparrot-clean
"""Build and install the colormaps package.""" # Copyright (c) 2012 Andrew Dawson # # 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 right...
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\Test\Ut...
php
github
https://github.com/composer/composer
tests/Composer/Test/Util/MetadataMinifierTest.php
from insights.parsers.mysql_log import MysqlLog from insights.tests import context_wrap MYSQL_LOG = """ 2018-03-13T06:37:37.268209Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000) 2018-03-13T06:37:37.268417Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000) 2018-03-13T06:37:37.268549...
unknown
codeparrot/codeparrot-clean
############################################################################### ## ## Copyright (C) 2011-2013 Tavendo GmbH ## ## 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 ## ## h...
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 sys import os import unittest sys.path.insert(0, os.path.abspath("..")) from cStringIO import StringIO from .. ...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package oci import ( "bytes" "context" "crypto/md5" "encoding/base64" "encoding/json" "errors" "fmt" "io" "github.com/hashicorp/go-hclog" "github.com/hashicorp/terraform/internal/states/remote" "github.com/hashicorp/terraform/internal/s...
go
github
https://github.com/hashicorp/terraform
internal/backend/remote-state/oci/client.go
// Copyright 2015 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package cli import ( "os" "testing" "github.com/cockroachdb/cockroach/pkg/base" "github.com/cockroachdb/cockroach/pkg/build" "github.com/cockroachdb/cockroach/pkg...
go
github
https://github.com/cockroachdb/cockroach
pkg/cli/main_test.go
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com> # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> and others # (c) 2017, Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import ...
unknown
codeparrot/codeparrot-clean
# Copyright 2008-2009 WebDriver committers # Copyright 2008-2009 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 requ...
unknown
codeparrot/codeparrot-clean
{ "RENAMENX": { "summary": "Renames a key only when the target key name doesn't exist.", "complexity": "O(1)", "group": "generic", "since": "1.0.0", "arity": 3, "function": "renamenxCommand", "history": [ [ "3.2.0", ...
json
github
https://github.com/redis/redis
src/commands/renamenx.json
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ArduPilot BiquadFilter 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 ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2004-2009 Sergey Lyubka # # 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, copy, modify, merge, publ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ oreos.monkeys ~~~~~~~~~~~~~ Monkeypatches. """ #!/usr/bin/env python # #### # Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu> # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software # and its documentation for any purpose and without...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (c) 2014 Docker. # # 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
# Because division is different in Python 2 and 3 from __future__ import division from typing import Tuple import numpy as np from . import _ops as math from . import extrapolation as extrapolation from ._config import GLOBAL_AXIS_ORDER from ._ops import stack from ._shape import Shape, channel, batch, spatial from ...
unknown
codeparrot/codeparrot-clean
use crate::spec::{ Cc, LinkerFlavor, Lld, Os, PanicStrategy, RelroLevel, TargetOptions, add_link_args, }; pub(crate) fn opts() -> TargetOptions { let lld_args = &["-zmax-page-size=4096", "-znow", "-ztext", "--execute-only"]; let cc_args = &["-Wl,-zmax-page-size=4096", "-Wl,-znow", "-Wl,-ztext", "-mexecute-...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/base/teeos.rs
# -*- coding: utf-8 -*- import nixops.deployment import os import os.path import sqlite3 import sys import threading class Connection(sqlite3.Connection): def __init__(self, db_file, **kwargs): sqlite3.Connection.__init__(self, db_file, **kwargs) self.db_file = db_file self.nesting = 0 ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsTaskManager. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ __...
unknown
codeparrot/codeparrot-clean
"""Functions to convert NetworkX graphs to and from other formats. The preferred way of converting data to a NetworkX graph is through the graph constuctor. The constructor calls the to_networkx_graph() function which attempts to guess the input type and convert it automatically. Examples -------- Create a graph wit...
unknown
codeparrot/codeparrot-clean
"""Base interface that all chains should implement.""" import builtins import contextlib import inspect import json import logging import warnings from abc import ABC, abstractmethod from pathlib import Path from typing import Any, cast import yaml from langchain_core._api import deprecated from langchain_core.callba...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/chains/base.py
# Copyright (c) 2018 PaddlePaddle 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 app...
unknown
codeparrot/codeparrot-clean
// Copyright 2014 Manu Martinez-Almeida. All rights reserved. // Use of this source code is governed by a MIT style // license that can be found in the LICENSE file. package gin import ( "errors" "fmt" "net/http" "strings" "testing" "time" "github.com/stretchr/testify/assert" ) func init() { SetMode(TestMod...
go
github
https://github.com/gin-gonic/gin
logger_test.go
/* * 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/TestMapEntrySetGenerator.java
fun test() { while (cond()) { <expr>if (foo() == 5) { break } else if (foo() == 6) { continue }</expr> consume("foo") } } fun cond(): Boolean = true fun foo(): Int = 0 fun consume(text: String?) = {}
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/testData/components/dataFlowInfoProvider/exitPointSnapshot/controlFlow/breakContinue.kt
# 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
#ifndef SEND_PACK_H #define SEND_PACK_H #include "string-list.h" struct child_process; struct oid_array; struct ref; struct repository; /* Possible values for push_cert field in send_pack_args. */ #define SEND_PACK_PUSH_CERT_NEVER 0 #define SEND_PACK_PUSH_CERT_IF_ASKED 1 #define SEND_PACK_PUSH_CERT_ALWAYS 2 /* At l...
c
github
https://github.com/git/git
send-pack.h
import unittest import builtins import os from platform import system as platform_system class ExceptionClassTests(unittest.TestCase): """Tests for anything relating to exception objects themselves (e.g., inheritance hierarchy)""" def test_builtins_new_style(self): self.assertIsSubclass(Exception...
python
github
https://github.com/python/cpython
Lib/test/test_baseexception.py
// // stream_file.hpp // ~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) // #ifndef BOOST_ASIO_STREAM_FILE_HPP #d...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/asio/stream_file.hpp
use std::borrow::Cow; use std::error::Error; use std::fmt; use rustc_error_messages::fluent_bundle::resolver::errors::{ReferenceKind, ResolverError}; use rustc_error_messages::{FluentArgs, FluentError}; #[derive(Debug)] pub enum TranslateError<'args> { One { id: &'args Cow<'args, str>, args: &'arg...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_errors/src/error.rs
#!/usr/bin/python # # Copyright (c) 2018 Yuwei Zhou, <yuwzho@microsoft.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
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/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. import TestGyp test = TestGyp.TestGyp() # The xcode-ninja generator handles gypfiles which are not at the # project root incorrectly. # cf...
unknown
codeparrot/codeparrot-clean
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/api_fastapi/common/types.py
from config import config, ConfigSelection, ConfigSubsection from boxbranding import getBoxType, getMachineBuild def InitHdmiRecord(): full_hd = getMachineBuild() in ('et10000','dm900', 'dm920', 'et13000', 'sf5008', 'vuuno4kse', 'vuduo4k') or getBoxType() in ('spycat4k','spycat4kcombo','gbquad4k') config.hdmi...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from ast import literal_eval from odoo import api, fields, models, _ from odoo.exceptions import ValidationError class Project(models.Model): _inherit = 'project.project' sale_line_id = fields.Many2one( ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2016 EMC Corporation. # 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 requ...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 Huawei Technologies Co.,LTD. # Copyright 2012 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 License at # # http://www.apac...
unknown
codeparrot/codeparrot-clean
# etcd Governance ## Principles The etcd community adheres to the following principles: - Open: etcd is open source. - Welcoming and respectful: See [Code of Conduct]. - Transparent and accessible: Changes to the etcd code repository and CNCF related activities (e.g. level, involvement, etc) are done in public. - Me...
unknown
github
https://github.com/etcd-io/etcd
GOVERNANCE.md
import dynamic from 'next/dynamic'; export const NextDynamicNoSSRServerComponent = dynamic(()=>import('../text-dynamic-no-ssr-server'), { loadableGenerated: { webpack: ()=>[ require.resolveWeak("../text-dynamic-no-ssr-server") ] }, ssr: false });
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/next-dynamic-app-dir/no-ssr/output-prod.js
#!/usr/bin/python # Author: Jon Trulson <jtrulson@ics.com> # Copyright (c) 2016 Intel Corporation. # # 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 l...
unknown
codeparrot/codeparrot-clean
/* Copyright 2017 - 2025 R. Thomas * Copyright 2017 - 2025 Quarkslab * * 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 req...
cpp
github
https://github.com/nodejs/node
deps/LIEF/src/MachO/FunctionStarts.cpp
#!/usr/bin/python # # Copyright (c) 2008--2015 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should...
unknown
codeparrot/codeparrot-clean
raise "Use https://github.com/keflavich/h2co_modeling/blob/master/h2co_modeling/constrain_parameters.py instead" """ Functions for fitting temperature (and density and column) from the line ratio plus whatever other constraints are available """ import inspect import time import os import numpy as np from scipy.ndimag...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ''' fantastic Add-on 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 pro...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package addrs import ( "fmt" "testing" ) // TestUniqueKeyer aims to ensure that all of the types that have unique keys // will continue to meet the UniqueKeyer contract under future changes. // // If you add a new implementation of UniqueKey, co...
go
github
https://github.com/hashicorp/terraform
internal/addrs/unique_key_test.go
import base64 import boto3 import json import logging import os import random from botocore.stub import Stubber from cis_profile import profile from cis_profile import fake_profile from everett.ext.inifile import ConfigIniEnv from everett.manager import ConfigManager from everett.manager import ConfigOSEnv from moto i...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you c...
unknown
codeparrot/codeparrot-clean
// Copyright 2015 The etcd Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
go
github
https://github.com/etcd-io/etcd
server/etcdserver/api/rafthttp/peer_status.go
from __future__ import unicode_literals import logging import sys import types import warnings from django import http from django.conf import settings from django.core import signals, urlresolvers from django.core.exceptions import ( MiddlewareNotUsed, PermissionDenied, SuspiciousOperation, ) from django.db impo...
unknown
codeparrot/codeparrot-clean
import numpy as np from numpy.testing import assert_equal, assert_array_equal from skimage._shared.testing import assert_greater, test_parallel from skimage.segmentation import felzenszwalb from skimage import data @test_parallel() def test_grey(): # very weak tests. This algorithm is pretty unstable. img = n...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
unknown
codeparrot/codeparrot-clean
# Safely load fast C Yaml loader/dumper if they are available try: from yaml import CSafeLoader as Loader except ImportError: from yaml import SafeLoader as Loader # type: ignore[assignment, misc] try: from yaml import CSafeDumper as Dumper except ImportError: from yaml import SafeDumper as Dumper # ...
python
github
https://github.com/pytorch/pytorch
torchgen/yaml_utils.py
#!/usr/bin/env python # # Copyright 2012 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
# Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause from abc import abstractmethod from typing import List import numpy as np from scipy.sparse import issparse from sklearn import get_config from sklearn.metrics._dist_metrics import BOOL_METRICS, METRIC_MAPPING64, DistanceMetric from sklea...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/metrics/_pairwise_distances_reduction/_dispatcher.py
// Package splunk provides the log driver for forwarding server logs to // Splunk HTTP Event Collector endpoint. package splunk import ( "bytes" "compress/gzip" "context" "crypto/tls" "crypto/x509" "encoding/json" "fmt" "io" "net/http" "net/url" "os" "strconv" "strings" "sync" "time" "github.com/conta...
go
github
https://github.com/moby/moby
daemon/logger/splunk/splunk.go
import { ReactNode } from "react"; type ContainerProps = { children: ReactNode; }; const Container = (props: ContainerProps) => { const { children } = props; return <div className="container mx-auto px-5">{children}</div>; }; export default Container;
typescript
github
https://github.com/vercel/next.js
examples/cms-cosmic/components/container.tsx
# Copyright (C) 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Th...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB * Copyright (C) 2009-2011, 2014-2016, 2018, 2022, 2024, D. R. Commander. * Copyright (C) 2015-2016, 2018, 2022, Matthieu Darbois. * * Based on the x86 SIMD extension for IJG JPEG library, * Copyright (C) 1999-2006, MIYASAKA Masaru. * For conditio...
c
github
https://github.com/opencv/opencv
3rdparty/libjpeg-turbo/simd/powerpc/jsimd.c
#!/usr/bin/env python import os import pexpect import sys from ansible.module_utils.six import PY2 if PY2: log_buffer = sys.stdout else: log_buffer = sys.stdout.buffer env_vars = { 'ANSIBLE_ROLES_PATH': './roles', 'ANSIBLE_NOCOLOR': 'True', 'ANSIBLE_RETRY_FILES_ENABLED': 'False', } def run_test...
unknown
codeparrot/codeparrot-clean
"""distutils.msvccompiler Contains MSVCCompiler, an implementation of the abstract CCompiler class for the Microsoft Visual Studio. """ # Written by Perry Stoll # hacked by Robin Becker and Thomas Heller to do a better job of # finding DevStudio (through the registry) # This module should be kept compatible with P...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 Red Hat, 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 agre...
unknown
codeparrot/codeparrot-clean
fun main(args: Array<String>) { val a = ArrayList<String>() a.add("") <expr>a</expr>[0]++ }
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/testData/components/compileTimeConstantProvider/evaluate/arrayWithInc.kt
export function getStaticProps() {} export default function() { return null; }
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/errors/react-server-components/client-graph/get-static-props/output.js
import pytest import json class TestMDSs(object): @pytest.mark.no_docker def test_mds_is_installed(self, node, host): assert host.package("ceph-mds").is_installed def test_mds_service_is_running(self, node, host): service_name = "ceph-mds@{hostname}".format( hostname=node["var...
unknown
codeparrot/codeparrot-clean
use serde_derive::Serialize; #[derive(Serialize)] #[serde(field_identifier)] enum F { A, B, } fn main() {}
rust
github
https://github.com/serde-rs/serde
test_suite/tests/ui/precondition/serialize_field_identifier.rs
#!/usr/bin/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 b...
unknown
codeparrot/codeparrot-clean
# urllib3/request.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php try: from urllib.parse import urlencode except ImportError: from urllib import urlencod...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** __init__.py --------------------- Date : January 2016 Copyright : (C) 2016 by Matthias Kuhn Email : matthias@opengis.ch *********************************...
unknown
codeparrot/codeparrot-clean
"""Runtime projections to provide template/var-visible views of objects that are not natively allowed in Ansible's type system.""" from __future__ import annotations import dataclasses import typing as t from ansible.module_utils._internal import _traceback, _event_utils, _messages from ansible.parsing.vault import ...
python
github
https://github.com/ansible/ansible
lib/ansible/_internal/_templating/_transform.py
"""Support for BT Smart Hub (Sometimes referred to as BT Home Hub 6).""" import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.device_tracker import ( DOMAIN, PLATFORM_SCHEMA, DeviceScanner) from homeassistant.const import CONF_HOST _LOGGER = l...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ MiniTwit Tests ~~~~~~~~~~~~~~ Tests the MiniTwit application. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import minitwit import tempfile import pytest @pytest.fixture def client(request): db_fd, minitwit.app.c...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl from openpyxl.compat import iteritems, OrderedDict, deprecated from openpyxl.styles.differential import DifferentialStyle from .rule import Rule def unpack_rules(cfRules): for key, rules in iteritems(cfRules): for idx,rule in enumer...
unknown
codeparrot/codeparrot-clean
# This file is part of VoltDB. # Copyright (C) 2008-2016 VoltDB Inc. # # 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, c...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2013-2017 Free Software Foundation, 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 3 of the License, or # (at your option) any later version. # # This progr...
unknown
codeparrot/codeparrot-clean
################################################################ # # menu.py provides terminal control capabilities to browse # through a user-defined menu. # It employs the Python curses library. # An alternative (text-based) menu is also possible if the # --no-curses is given in the command line options. # # Last mod...
unknown
codeparrot/codeparrot-clean
# # SPDX-License-Identifier: ISC # # Author: Ulf Magnusson # https://github.com/ulfalizer/Kconfiglib # This is Kconfiglib, a Python library for scripting, debugging, and extracting # information from Kconfig-based configuration systems. To view the # documentation, run # # $ pydoc kconfiglib # # or, if you prefer H...
unknown
codeparrot/codeparrot-clean
''' Created on Aug 26, 2014 @author: moloyc ''' import sqlalchemy from sqlalchemy.orm import sessionmaker, scoped_session from sqlalchemy.orm import exc import util import logging import contextlib from model import Base, Device, InterfaceDefinition, LeafSetting from common import SingletonBase moduleName = 'dao' lo...
unknown
codeparrot/codeparrot-clean