code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
/* Copyright 2021 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/apis/kubeadm/v1beta3/register.go
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.cpp
# pylint:skip-file import logging import sys, random, time, math import mxnet as mx import numpy as np from nce import * from operator import itemgetter from optparse import OptionParser from collections import Counter import logging head = head = '%(asctime)-15s %(message)s' logging.basicConfig(level=logging.INFO, fo...
unknown
codeparrot/codeparrot-clean
{ "auditLog": { "columns": { "event": "事件", "extra": "额外信息", "user": "用户", "when": "时间" }, "filters": { "eventType": "事件类型" }, "title": "审计日志" }, "xcom": { "columns": { "dag": "Dag", "key": "键", "value": "值" }, "title": "XCom" } }
json
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/browse.json
DOCUMENTATION: name: failed author: Ansible Core version_added: "1.9" short_description: did the task fail aliases: [failure] description: - Tests if task finished in failure, opposite of C(succeeded). - This test checks for the existence of a C(failed) key in the input dictionary and that it is V(T...
unknown
github
https://github.com/ansible/ansible
lib/ansible/plugins/test/failed.yml
# PLY package # Author: David Beazley (dave@dabeaz.com) # ----------------------------------------------------------------------------- # ply: yacc.py # # Copyright (C) 2001-2011, # David M. Beazley (Dabeaz LLC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/simple/HierarchicalPropertiesGrandparent.java
/* * Copyright (C) 2006 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
java
github
https://github.com/google/guava
android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java
########################################################## # THIS IS A GENERATED FILE -- DO NOT MODIFY. # IF YOU WISH TO MODIFY THIS SUITE, MODIFY THE CORRESPONDING MATRIX SUITE MAPPING FILE # AND REGENERATE THE MATRIX SUITES. # # matrix suite mapping file: buildscripts/resmokeconfig/matrix_suites/mappings/change_strea...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_whole_db_sharded_collections_passthrough.yml
from django.contrib import auth from django.core.exceptions import ImproperlyConfigured from models import CertificateIndex, Certificate from binascii import crc32 def get_user(request): if not hasattr(request, '_cached_user'): request._cached_user = auth.get_user(request) return request._cached_user ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (C) 2013 Google Inc. 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 ...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/misc/MisleadingBidirectionalCheck.h
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import abc import functools import itertools import re from ._compat impo...
unknown
codeparrot/codeparrot-clean
# gui_term.py # # openipmi GUI terminal handling for SoL # # Author: MontaVista Software, Inc. # Corey Minyard <minyard@mvista.com> # source@mvista.com # # Copyright 2006 MontaVista Software Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU L...
unknown
codeparrot/codeparrot-clean
/** * \file pkcs5.h * * \brief PKCS#5 functions * * \author Mathias Olsson <mathias@kompetensum.com> */ /* * Copyright The Mbed TLS Contributors * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ #ifndef MBEDTLS_PKCS5_H #define MBEDTLS_PKCS5_H #include "mbedtls/build_info.h" #include "mbedtls/plat...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/mbedtls/include/mbedtls/pkcs5.h
# $Id: a384faeed9e9e609ca4b056c682c8ecda51f9e64 $ """ MySQL extended database driver. """ __docformat__ = "restructuredtext en" # --------------------------------------------------------------------------- # Imports # --------------------------------------------------------------------------- import os import sys i...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
"""Implementation of JSONDecoder """ from __future__ import absolute_import import re import sys import struct from .compat import fromhex, b, u, text_type, binary_type, PY3, unichr from .scanner import make_scanner, JSONDecodeError def _import_c_scanstring(): try: from ._speedups import scanstring ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2007 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
guava/src/com/google/common/collect/ImmutableSet.java
#### Note: this error code is no longer emitted by the compiler. Too few type arguments were supplied for a function. For example: ```compile_fail,E0107 fn foo<T, U>() {} fn main() { foo::<f64>(); // error: wrong number of type arguments: expected 2, found 1 } ``` Note that if a function takes multiple type arg...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0089.md
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.c...
unknown
codeparrot/codeparrot-clean
# (c) 2017, Ansible by RedHat Inc, # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ans...
unknown
codeparrot/codeparrot-clean
""" The :mod:`sklearn.pipeline` module implements utilities to build a composite estimator, as a chain of transforms and estimators. """ # Author: Edouard Duchesnay # Gael Varoquaux # Virgile Fritsch # Alexandre Gramfort # Lars Buitinck # Licence: BSD from collections import defaultdict...
unknown
codeparrot/codeparrot-clean
from tests.unit import unittest from tests.unit import AWSMockServiceTestCase from boto.vpc import VPCConnection, InternetGateway class TestDescribeInternetGateway(AWSMockServiceTestCase): connection_class = VPCConnection def default_body(self): return b""" <DescribeInternetGatewaysRespo...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Created on Wed Dec 7 16:23:52 2016 Copyright 2015 Nicolo' Navarin This file is part of count-mean-sketch based on https://github.com/rafacarrascosa/countminsketch. count-mean-sketch is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Licen...
unknown
codeparrot/codeparrot-clean
""" Tests of neo.io.NSDFIO """ import numpy as np import quantities as pq from datetime import datetime import os import unittest from neo.io.nsdfio import HAVE_NSDF, NSDFIO from neo.test.iotest.common_io_test import BaseTestIO from neo.core import AnalogSignal, Segment, Block, ChannelIndex from neo.test.tools impor...
unknown
codeparrot/codeparrot-clean
from __future__ import annotations import logging import re from typing import TYPE_CHECKING from warnings import warn from w3lib import html from scrapy.exceptions import NotConfigured, ScrapyDeprecationWarning from scrapy.http import HtmlResponse, Response from scrapy.utils.url import escape_ajax if TYPE_CHECKING...
python
github
https://github.com/scrapy/scrapy
scrapy/downloadermiddlewares/ajaxcrawl.py
from zerver.lib.test_classes import WebhookTestCase class AnsibletowerHookTests(WebhookTestCase): STREAM_NAME = "ansibletower" URL_TEMPLATE = "/api/v1/external/ansibletower?api_key={api_key}&stream={stream}" FIXTURE_DIR_NAME = "ansibletower" def test_ansibletower_project_update_successful_message(self...
unknown
codeparrot/codeparrot-clean
// Copyright 2015 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" "syscall" "testing" ) func TestFixedGOROOT(t *testing.T) { // Restore both the real GOROOT environment variable, a...
go
github
https://github.com/golang/go
src/runtime/env_test.go
import unittest from lifx.color import HSBK, color_from_message, message_from_color, modify_color COLOR_MESSAGE_TEST = [ (HSBK(0, 0, 0, 0), HSBK(0, 0, 0, 0)), (HSBK(360, 1, 1, 9000), HSBK(pow(2, 16), pow(2, 16), pow(2, 16), 9000)), (HSBK(0, 0, 0.5, 3000), HSBK(0, 0, 32767, 3000)), ] class Col...
unknown
codeparrot/codeparrot-clean
from io import StringIO from django.core.management import call_command from django.test.utils import modify_settings from . import PostgreSQLTestCase @modify_settings(INSTALLED_APPS={'append': 'django.contrib.postgres'}) class InspectDBTests(PostgreSQLTestCase): def assertFieldsInModel(self, model, field_output...
unknown
codeparrot/codeparrot-clean
""" ============================ Underfitting vs. Overfitting ============================ This example demonstrates the problems of underfitting and overfitting and how we can use linear regression with polynomial features to approximate nonlinear functions. The plot shows the function that we want to approximate, wh...
unknown
codeparrot/codeparrot-clean
/********************************************************************************** * Copyright (c) 2008-2012 The Khronos Group Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and/or associated documentation files (the * "Materials"), to deal in the Material...
c
github
https://github.com/opencv/opencv
3rdparty/include/opencl/1.2/CL/cl_gl_ext.h
# -*- coding:utf-8 -*- from __future__ import absolute_import, unicode_literals import datetime import pytz from django.contrib.auth.models import User from django.test.testcases import TestCase from django.test.utils import override_settings from elephantblog.models import Entry @override_settings(USE_TZ=True) cl...
unknown
codeparrot/codeparrot-clean
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
c
github
https://github.com/curl/curl
lib/gopher.c
data = ( 'Fa ', # 0x00 'Ge ', # 0x01 'He ', # 0x02 'Kun ', # 0x03 'Jiu ', # 0x04 'Yue ', # 0x05 'Lang ', # 0x06 'Du ', # 0x07 'Yu ', # 0x08 'Yan ', # 0x09 'Chang ', # 0x0a 'Xi ', # 0x0b 'Wen ', # 0x0c 'Hun ', # 0x0d 'Yan ', # 0x0e 'E ', # 0x0f 'Chan ', # 0x10 'Lan ', ...
unknown
codeparrot/codeparrot-clean
import asyncio import pytest from pydispatch import dispatcher from testfixtures import LogCapture from twisted.internet import defer from twisted.python.failure import Failure from scrapy.utils.asyncio import call_later from scrapy.utils.defer import deferred_from_coro from scrapy.utils.signal import ( send_catc...
python
github
https://github.com/scrapy/scrapy
tests/test_utils_signal.py
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT // taken from https://github.com/thedodd/trunk/blob/5c799dc35f1f1d8f8d3d30c8723cbb761a9b6a08/src/autoreload.js ;(function () { const reload_url = '{{reload_url}}' const url ...
javascript
github
https://github.com/tauri-apps/tauri
crates/tauri-cli/src/dev/auto-reload.js
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v2alpha1", "metadata": { "name": "v0alpha1.postgres_unittest.v42" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "query": { "kind": "", "spec": {} }, ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/datasource-postgres/v0alpha1.postgres_unittest.v42.v2alpha1.json
#LICENCE : for adam optimizer (Modified from https://gist.github.com/Newmu/acb738767acb4788bac3) """ The MIT License (MIT) Copyright (c) 2015 Alec Radford 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 Sof...
unknown
codeparrot/codeparrot-clean
"""Utility code for constructing importers, etc.""" from ._abc import Loader from ._bootstrap import module_from_spec from ._bootstrap import _resolve_name from ._bootstrap import spec_from_loader from ._bootstrap import _find_spec from ._bootstrap_external import MAGIC_NUMBER from ._bootstrap_external import cache_fro...
python
github
https://github.com/python/cpython
Lib/importlib/util.py
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ 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");...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from odoo import api, fields, models class SaleOrder(models.Model): _inherit = "sale.order" @api.multi def action_confirm(self): self.ensure_one() res = super(SaleOrder, self).action_confirm() self.order_line._update_registrations(confirm=True) if a...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import os try: from shlex import quote except ImportError: from pipes import quote from django.contrib.staticfiles import finders from django.core.files.base import ContentFile from django.utils.encoding import smart_str, smart_bytes from pipeline.conf import settings...
unknown
codeparrot/codeparrot-clean
""" Convenience methods for working with datetime objects """ from datetime import datetime, timedelta import re from pytz import timezone, UTC, UnknownTimeZoneError from django.utils.translation import pgettext, ugettext def get_default_time_display(dtime): """ Converts a datetime to a string representation...
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 distributed...
unknown
codeparrot/codeparrot-clean
# -*- coding: latin-1 -*- # # Copyright (C) AB Strakt # Copyright (C) Jean-Paul Calderone # See LICENSE for details. """ Simple SSL client, using blocking I/O """ from OpenSSL import SSL import sys, os, select, socket def verify_cb(conn, cert, errnum, depth, ok): # This obviously has to be updated print 'Got...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test new Goldcoin multisig prefix functionality. # from test_framework.test_framework import Bitcoin...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package statemgr import ( "context" "errors" "sync" "github.com/hashicorp/terraform/internal/schemarepo" "github.com/hashicorp/terraform/internal/states" ) // NewFullFake returns a full state manager that really only supports transient // sn...
go
github
https://github.com/hashicorp/terraform
internal/states/statemgr/statemgr_fake.go
from __future__ import print_function import numpy as np import numba.unittest_support as unittest from numba.ctypes_support import * from numba import _helperlib class ArrayStruct3D(Structure): # Mimick the structure defined in numba.targets.arrayobj's make_array() _fields_ = [ ("meminfo", c_void_p)...
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
# This program is free software; you can redistribute it and/or modify # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ...
unknown
codeparrot/codeparrot-clean
''' Find and delete AWS resources matching the provided --match string. Unless --yes|-y is provided, the prompt for confirmation prior to deleting resources. Please use caution, you can easily delete you're *ENTIRE* EC2 infrastructure. ''' import os import re import sys import boto import optparse import yaml import ...
unknown
codeparrot/codeparrot-clean
#pragma once #include <c10/core/Device.h> #include <c10/core/DeviceType.h> #include <c10/macros/Export.h> #include <c10/util/Exception.h> #include <cstddef> #include <cstdint> #include <functional> #include <ostream> namespace c10 { /// An index representing a specific stream. A StreamId is not independently /// me...
c
github
https://github.com/pytorch/pytorch
c10/core/Stream.h
#!/usr/bin/env python # 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 argparse import os import sys import unittest SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARENT_DIR = os.path.dirn...
unknown
codeparrot/codeparrot-clean
"""ZAP Authenticator integrated with the asyncio IO loop. .. versionadded:: 15.2 """ # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. import asyncio import zmq from zmq.asyncio import Poller from .base import Authenticator class AsyncioAuthenticator(Authenticator): ""...
unknown
codeparrot/codeparrot-clean
// This file was automatically generated from coroutines-guide-ui.md by Knit tool. Do not edit. package kotlinx.coroutines.javafx.guide.exampleUiBasic01 import kotlinx.coroutines.* import kotlinx.coroutines.channels.* import kotlinx.coroutines.javafx.JavaFx as Main import javafx.application.Application import javafx.e...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
ui/kotlinx-coroutines-javafx/test/guide/example-ui-basic-01.kt
#!/usr/bin/env python # -*- coding: utf-8 -*- # PROGRAM : sql_connector # AUTHOR : codeunsolved@gmail.com # CREATED : August 22 2016 # VERSION : v0.0.1a import mysql.connector from mysql.connector import errorcode # CONFIG AREA mysql_config_example = { 'user': 'username', 'password': 'password', 'host': ...
unknown
codeparrot/codeparrot-clean
import macpath from test import test_support import unittest class MacPathTestCase(unittest.TestCase): def test_abspath(self): self.assert_(macpath.abspath("xx:yy") == "xx:yy") def test_isabs(self): isabs = macpath.isabs self.assert_(isabs("xx:yy")) self.assert_(isabs("xx:yy:"...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Jasper N. Brouwer <jasper@nerdsweide.nl> # (c) 2014, Ramon de la Fuente <ramon@delafuente.nl> # # 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...
unknown
codeparrot/codeparrot-clean
"""API for the Universal Device's ISY This is a Work in progress Supporting a Simple and OO interface for ISY home automation netapp see also : http://www.universal-devices.com/residential/ http://wiki.universal-devices.com/index.php?title=Main_Page NOTE: This Libaray is not written my or supported by un...
unknown
codeparrot/codeparrot-clean
#define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> #include <structmember.h> #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "numpy/npy_math.h" #include "npy_config.h" #include "npy_pycompat.h" // PyObject_GetOptionalAttr #i...
c
github
https://github.com/numpy/numpy
numpy/_core/src/multiarray/scalarapi.c
""" mbed SDK Copyright (c) 2011-2015 ARM Limited 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 wr...
unknown
codeparrot/codeparrot-clean
/* Copyright (c) 2016, 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. This program is designed to work with certain software (including...
c
github
https://github.com/mysql/mysql-server
strings/uca_data.h
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Video Capture Example</title> <link href="js_example_style.css" rel="stylesheet" type="text/css" /> </head> <body> <h2>Video Capture Example</h2> <p> Click <b>Start/Stop</b> button to start or stop the camera capture.<br> The <b>videoInput</b> is a &lt...
html
github
https://github.com/opencv/opencv
doc/js_tutorials/js_assets/js_video_display.html
package plugin import ( "context" "encoding/json" "io" "os" "path/filepath" "reflect" "sort" "strings" "sync" "syscall" "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/plugins/content/local" "github.com/containerd/log" "github.com/moby/moby/api/types/events" "git...
go
github
https://github.com/moby/moby
daemon/pkg/plugin/manager.go
//---------------------------------------------------------------------------// // Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.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 // // See http://boostorg.gi...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/compute/event.hpp
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Softwa...
unknown
codeparrot/codeparrot-clean
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2009,2011, Oracle and/or its affiliates. All rights reserved. # Use is subject to license terms. (See COPYING) # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publ...
unknown
codeparrot/codeparrot-clean
from . import InstanceResource, ListResource class Token(InstanceResource): """ A Token instance. .. attribute:: username The temporary username that uniquely identifies a Token. .. attribute:: password The temporary password that the username will use when authenticating with Twil...
unknown
codeparrot/codeparrot-clean
# shellcheck shell=bash
unknown
github
https://github.com/ansible/ansible
test/integration/targets/ansible-test-integration-no-exec-script/ansible_collections/ns/col/tests/integration/targets/hello/runme.sh
from django.contrib.gis.db import models from django.contrib.gis.tests.utils import gisfield_may_be_null from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class NamedModel(models.Model): name = models.CharField(max_length=30) objects = models.GeoManager() class Me...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys def Main(argv): """This is like 'env -i', but it uses a whitelist of env variables to allow through to the co...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ pygments.lexers.elm ~~~~~~~~~~~~~~~~~~~ Lexer for the Elm programming language. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, words, include from pygments.token impo...
unknown
codeparrot/codeparrot-clean
from django.shortcuts import render,HttpResponseRedirect,HttpResponse from django.core import serializers import json import socket import nis,crypt import paramiko from vnc.models import * import os,re,stat from multiprocessing import Pool,Queue #from django.contrib import auth # Create your views here. q=Queue() def...
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines.rx3 import kotlinx.coroutines.testing.* import io.reactivex.rxjava3.core.* import kotlinx.coroutines.* import kotlinx.coroutines.flow.* import kotlinx.coroutines.reactive.* import org.junit.* import org.junit.Test import kotlin.test.* class FlowableContextTest : TestBase() { private val...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
reactive/kotlinx-coroutines-rx3/test/FlowableContextTest.kt
#!/usr/bin/env python3 # Copyright (c) 2016-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test RPC commands for signing and verifying messages.""" from test_framework.test_framework import Piv...
unknown
codeparrot/codeparrot-clean
// Copyright 2017 The etcd Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
go
github
https://github.com/etcd-io/etcd
client/v3/leasing/txn.go
// SPDX-License-Identifier: GPL-2.0 #include <linux/objpool.h> #include <linux/slab.h> #include <linux/vmalloc.h> #include <linux/atomic.h> #include <linux/irqflags.h> #include <linux/cpumask.h> #include <linux/log2.h> /* * objpool: ring-array based lockless MPMC/FIFO queues * * Copyright: wuqiang.matt@bytedance.c...
c
github
https://github.com/torvalds/linux
lib/objpool.c
/* * 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-test/src/main/java/org/springframework/boot/test/web/server/LocalServerPort.java
# Copyright 2016 Capital One Services, LLC # # 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...
unknown
codeparrot/codeparrot-clean
from collections import Counter, defaultdict, OrderedDict import os import sys import threading import warnings from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured from django.utils import lru_cache from django.utils.deprecation import RemovedInDjango19Warning from django.utils._os import upat...
unknown
codeparrot/codeparrot-clean
# ====================================================================== import numpy vb = False # Age of the Universe: t0 = 13.73 # Gyr, XXX et al XXXX t0err = 0.15 # Units etc: Gyr2sec = 1e9*365.25*24*3600 Mpc2km = 1e6*3.0856e16/1e3 kms2MpcperGyr = Gyr2sec/Mpc2km # print "To convert km/s to Mpc/Gyr, multiply by",...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2020 The SymbiFlow Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC import os from toolchains.toolchain import T...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
cli/spring-boot-cli/src/intTest/java/org/springframework/boot/cli/infrastructure/CommandLineInvoker.java
#!/usr/bin/env pmpython # # Copyright (C) 2014-2018 Red Hat. # # 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 ...
unknown
codeparrot/codeparrot-clean
import random print "What's your name?" name = raw_input("> "); print "Hello", name print "Let's play a game!" print "In fact, let's play 'Guess the secret number'!" print "The rules are simple, you just have to try to guess the secret number! You have a limited amount of tries." print "We will help you out when you...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright 2008 Jaap Karssenberg <jaap.karssenberg@gmail.com> '''Store module for storing pages as files. With this store each page maps to a single text file. Sub-pages and attachments go into a directory of the same name as the page. So page names are mapped almost one on one to filesystem...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib from base64 import b64encode from .compat import urlparse, str from .cookies import extract_cookies_to_jar from .utils import parse_dict_header, ...
unknown
codeparrot/codeparrot-clean
import time,datetime,re, hashlib from dateutil import tz import os from .constants import YowConstants import codecs, sys import logging import tempfile import base64 import hashlib logger = logging.getLogger(__name__) class HexTools: decode_hex = codecs.getdecoder("hex_codec") @staticmethod def decodeHex...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Generate .h file. """ __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>" __copyright__ = "Copyright 2012, Lluís Vilanova <vilanova@ac.upc.edu>" __license__ = "GPL version 2 or (at your option) any later version" __maintainer__ = "Stefan Hajnoczi" __email__ ...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/assignToEnum.ts] //// //// [assignToEnum.ts] enum A { foo, bar } A = undefined; // invalid LHS A = A.bar; // invalid LHS A.foo = 1; // invalid LHS A.foo = A.bar; // invalid LHS //// [assignToEnum.js] "use strict"; var A; (function (A) { A[A["foo"] = 0] = "foo"; A[A["bar"...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/assignToEnum.js
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # # 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 la...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package depsfile import ( "testing" "github.com/google/go-cmp/cmp" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/getproviders/providerreqs" ) func TestLocksEqual(t *testing.T) { boopProvider := add...
go
github
https://github.com/hashicorp/terraform
internal/depsfile/locks_test.go
# frozen_string_literal: true module Bundler class Worker POISON = Object.new class WrappedException < StandardError attr_reader :exception def initialize(exn) @exception = exn end end # @return [String] the name of the worker attr_reader :name # Creates a worker ...
ruby
github
https://github.com/ruby/ruby
lib/bundler/worker.rb
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Script to parse perf data from Chrome Endure test executions, to be graphed. This script connects via HTTP to a buildbot master...
unknown
codeparrot/codeparrot-clean
import numpy as np import cv2 from matplotlib import pyplot as plt import os import sys from scipy import linalg as LA from matplotlib import cm ##############################Hyperspectral Image PCA Visualization###########################################################################################################...
unknown
codeparrot/codeparrot-clean
/* Copyright 2021 - 2025 R. Thomas * * 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...
cpp
github
https://github.com/nodejs/node
deps/LIEF/src/MachO/ChainedFixup.cpp
//go:build linux /* Copyright 2018 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 agre...
go
github
https://github.com/kubernetes/kubernetes
pkg/kubelet/kuberuntime/helpers_linux.go