code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package tfstackdata1 import ( "testing" "github.com/google/go-cmp/cmp" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/msgpack" "google.golang.org/protobuf/testing/protocmp" "github.com/hashicorp/terraform/internal/lang/marks...
go
github
https://github.com/hashicorp/terraform
internal/stacks/tfstackdata1/convert_test.go
name: docker-builds on: workflow_dispatch: pull_request: paths: - .ci/docker/** - .github/workflows/docker-builds.yml - .lintrunner.toml push: branches: - main - release/* - landchecks/* paths: - .ci/docker/** - .github/workflows/docker-builds.yml ...
unknown
github
https://github.com/pytorch/pytorch
.github/workflows/docker-builds.yml
<?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/ConfigValidatorTest.php
/*------------------------------------------------------------------------- * * pg_waldump.c - decode and display WAL * * Copyright (c) 2013-2026, PostgreSQL Global Development Group * * IDENTIFICATION * src/bin/pg_waldump/pg_waldump.c *------------------------------------------------------------------------...
c
github
https://github.com/postgres/postgres
src/bin/pg_waldump/pg_waldump.c
#!/usr/bin/env python """ Bootstrap the app-template. This module disables itself after execution. """ import os import uuid from fabric.api import execute, local, task import app_config import utils @task(default=True) def go(github_username=app_config.GITHUB_USERNAME, repository_name=None): """ Execute t...
unknown
codeparrot/codeparrot-clean
"""SCons.Tool.aixcc Tool-specific initialization for IBM xlc / Visual Age C compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 20...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """ Class representing the list of files in a distribution. Equivalent to distutils.filelist, but fixes some problems. """ import fnmatch import logging import os import re from . import DistlibEx...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 Cloudbase Solutions Srl # # 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 l...
unknown
codeparrot/codeparrot-clean
import contextlib import os import sys import tracemalloc import unittest from unittest.mock import patch from test.script_helper import assert_python_ok, assert_python_failure from test import support try: import threading except ImportError: threading = None EMPTY_STRING_SIZE = sys.getsizeof(b'') def get_fr...
unknown
codeparrot/codeparrot-clean
"""OpenEnergyMonitor Thermostat Support.""" from oemthermostat import Thermostat import requests import voluptuous as vol from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateEntity from homeassistant.components.climate.const import ( CURRENT_HVAC_HEAT, CURRENT_HVAC_IDLE, CURRENT_HVAC_OFF, ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """examples for multivariate normal and t distributions Created on Fri Jun 03 16:00:26 2011 @author: josef for comparison I used R mvtnorm version 0.9-96 """ from __future__ import print_function import numpy as np import statsmodels.sandbox.distributions.mv_normal as mvd from numpy.testing...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Database\Console\Migrations; use Illuminate\Console\Command; use Illuminate\Support\Collection; class BaseCommand extends Command { /** * Get all of the migration paths. * * @return string[] */ protected function getMigrationPaths() { // Here, we wil...
php
github
https://github.com/laravel/framework
src/Illuminate/Database/Console/Migrations/BaseCommand.php
# -*- coding: utf-8 -*- """ Unix下进程后台化 """ import atexit import os import re import subprocess import sys import warnings from os import path import grp import pwd # Ignore the DeprecationWarning caused by os.popen3 in Python 2.6 warnings.filterwarnings("ignore", category=DeprecationWarning) def find_process_by_nam...
unknown
codeparrot/codeparrot-clean
""" Offer sun based automation rules. For more details about this automation rule, please refer to the documentation at https://home-assistant.io/docs/automation/trigger/#sun-trigger """ import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.core import callback from...
unknown
codeparrot/codeparrot-clean
// RUN: clang-change-namespace -old_namespace "na::nb" -new_namespace "x::y" --file_pattern ".*" %s -- | sed 's,// CHECK.*,,' | FileCheck %s // CHECK: namespace x { // CHECK-NEXT: namespace y { namespace na { namespace nb { class A {}; // CHECK: } // namespace y // CHECK-NEXT: } // namespace x } }
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-change-namespace/simple-move.cpp
""" Copyright (c) 2018 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. Very small subset of tests for the YumRepo class. Most testing is done in test_add_yum_repo_by_url """ from __future__ import absolute_import fr...
unknown
codeparrot/codeparrot-clean
import asyncio from collections import namedtuple import struct from aerospike_py.connection import Connection, ASConnectionError from aerospike_py.result_code import ASMSGProtocolException class ASIOException(Exception): pass class InvalidMessageException(Exception): pass # --- all messages --- AerospikeO...
unknown
codeparrot/codeparrot-clean
//===--- IndexSymbol.cpp --------------------------------------------------===// // // 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...
cpp
github
https://github.com/apple/swift
lib/Index/IndexSymbol.cpp
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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 Lice...
unknown
codeparrot/codeparrot-clean
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const formatLocation = require("../formatLocation"); const UnsupportedWebAssemblyFeatureError = require("./UnsupportedWebAssemblyFeatureError"); /** @typedef {import("../Compiler")} Compiler */ /** @type...
javascript
github
https://github.com/webpack/webpack
lib/wasm-sync/WasmFinalizeExportsPlugin.js
# 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
# coding=utf-8 from safe.impact_functions.unit_definitions import parameter_unit_metres __author__ = 'lucernae' __date__ = '11/04/15' import sys from safe_extras.parameters.float_parameter import FloatParameter from safe_extras.parameters.string_parameter import StringParameter from safe.utilities.i18n import tr de...
unknown
codeparrot/codeparrot-clean
[ { "name": "ANumber", "kind": "NUMBER" }, { "name": "AFloat", "kind": "NUMBER" }, { "name": "ACategorical", "kind": "ENUM", "type": "ns1::ns2::TestEnum", "header": "decision_forest_model/CategoricalFeature.h" } ]
json
github
https://github.com/llvm/llvm-project
clang-tools-extra/clangd/unittests/decision_forest_model/features.json
{ "name": "symfony/http-kernel", "type": "library", "description": "Provides a structured process for converting a Request into a Response", "keywords": [], "homepage": "https://symfony.com", "license": "MIT", "authors": [ { "name": "Fabien Potencier", "email"...
json
github
https://github.com/symfony/symfony
src/Symfony/Component/HttpKernel/composer.json
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, Serge van Ginderachter <serge@vanginderachter.be> # 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 = {'me...
unknown
codeparrot/codeparrot-clean
/* * 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...
kotlin
github
https://github.com/spring-projects/spring-framework
framework-docs/src/main/kotlin/org/springframework/docs/core/beans/java/beansjavaprogrammaticregistration/MyConfiguration.kt
#! /usr/bin/python2.4 # Copyright 2007 Google Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program i...
unknown
codeparrot/codeparrot-clean
''' Copyright 2017 by Alex Mitrevski <aleksandar.mitrevski@h-brs.de> This file is part of delta-execution-models. delta-execution-models 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...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # pylint: disable=C0103 """ Base classes for predictors. """ # Author: bertrand-l # License: BSD from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np from .classification import confusion from .optimize.optimize import BaseUnconstrainedOptimizer ...
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
from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.encoding import python_2_unicode_compatible class Episode(models.Model): name = models.CharField(max_length=100) l...
unknown
codeparrot/codeparrot-clean
""" Course API forms """ from collections import namedtuple from django.core.exceptions import ValidationError from django.forms import CharField, Form from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.util.forms import ExtendedNullBooleanField class Use...
unknown
codeparrot/codeparrot-clean
import psycopg2 from flask import Blueprint, current_app, render_template, request, session, redirect, url_for events_app = Blueprint('events_app', __name__) @events_app.route('/show_events') def show_events(): if session.get('logged_in')== None: return redirect(url_for("loginpage")) with psycopg2.co...
unknown
codeparrot/codeparrot-clean
''' This file contains helper functions used throughout the PyPXE services ''' import os.path import logging class PathTraversalException(Exception): pass def normalize_path(base, filename): ''' Join and normalize a base path and filename. `base` may be relative, in which case it's converte...
unknown
codeparrot/codeparrot-clean
/* * 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-context/src/main/java/org/springframework/scripting/config/LangNamespaceUtils.java
/* Copyright 2014 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
pkg/apis/core/validation/validation_test.go
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const vm = require("vm"); const CommentCompilationWarning = require("../CommentCompilationWarning"); const CssModule = require("../CssModule"); const ModuleDependencyWarning = require("../ModuleDependency...
javascript
github
https://github.com/webpack/webpack
lib/css/CssParser.js
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import print_function import h2o import sys sys.path.insert(1,"../../../") # allow us to run this standalone from h2o.estimators.random_forest import H2ORandomForestEstimator from h2o.estimators.gbm import H2OGradientBoostingEstimator from h2o.estimato...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2007,2010,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 ...
unknown
codeparrot/codeparrot-clean
# jsb/plugs/socket/mpd.py # # # interact with (your) Music Player Daemon # (c) Wijnand 'tehmaze' Modderman - http://tehmaze.com # BSD License # # CHANGELOG # 2011-02-20 # * sMiLe - changed methods to be similar to the mpc commands # 2011-02-13 # * sMiLe - added several new functions # 2011-01-16 # * BHJTW - ad...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/ata/rockchip,dwc-ahci.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Synopsys DWC AHCI SATA controller for Rockchip devices maintainers: - Serge Semin <fancer.lancer@gmail.com> descriptio...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/ata/rockchip,dwc-ahci.yaml
# -*- 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
import unittest from django.db import NotSupportedError, connection from django.db.models import CharField from django.db.models.functions import SHA224 from django.test import TestCase from django.test.utils import register_lookup from ..models import Author class SHA224Tests(TestCase): @classmethod def set...
python
github
https://github.com/django/django
tests/db_functions/text/test_sha224.py
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package time provides functionality for measuring and displaying time. // // The calendrical calculations always assume a Gregorian calendar, with // no leap...
go
github
https://github.com/golang/go
src/time/time.go
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python2 import sys import struct try: from io import StringIO except ImportError: from io import StringIO from .cmapdb import CMapDB, CMapParser, FileUnicodeMap, CMap from .encodingdb import EncodingDB, name2unicode from .psparser import PSStackParser from .psparser import PSSyntaxError, PSEOF fr...
unknown
codeparrot/codeparrot-clean
''' Graphics ======== This package assemble all low level function to draw object. The whole graphics package is compatible OpenGL ES 2.0, and have a lot of rendering optimizations. The basics ---------- For drawing on a screen, you will need : 1. a :class:`~kivy.graphics.instructions.Canvas` object. 2. :cl...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2015 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
java
github
https://github.com/google/guava
guava/src/com/google/common/util/concurrent/AsyncCallable.java
export default function SetupPage() { return ( <div className="min-h-screen bg-gray-100 flex flex-col items-center py-12 px-6"> <div className="max-w-3xl w-full bg-white p-8 rounded-lg shadow-md border border-gray-300 overflow-y-auto h-[90vh]"> <div className="max-w-3xl bg-white p-8 rounded-lg shado...
typescript
github
https://github.com/vercel/next.js
examples/prisma-postgres/app/setup/page.tsx
# Generated by Django 2.0.1 on 2018-01-17 13:57 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('protein', '0001_initial'), ('mutation', '0001_initial'), ('common', '0001_initial'), ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2025 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.symbols.markers import org.jetbrains.kotlin.analysis.api.KaImplemen...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/symbols/markers/KaAnnotatedSymbol.kt
""" Plotting public API. Authors of third-party plotting backends should implement a module with a public ``plot(data, kind, **kwargs)``. The parameter `data` will contain the data structure and can be a `Series` or a `DataFrame`. For example, for ``df.plot()`` the parameter `data` will contain the DataFrame `df`. In ...
python
github
https://github.com/pandas-dev/pandas
pandas/plotting/__init__.py
// SPDX-License-Identifier: GPL-2.0-only /* * Context tracking: Probe on high level context boundaries such as kernel, * userspace, guest or idle. * * This is used by RCU to remove its dependency on the timer tick while a CPU * runs in idle, userspace or guest mode. * * User/guest tracking started by Frederic We...
c
github
https://github.com/torvalds/linux
kernel/context_tracking.c
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Slightly based on AboutModules in the Ruby Koans # from runner.koan import * class AboutMultipleInheritance(Koan): class Nameable: def __init__(self): self._name = None def set_name(self, new_name): self._name = new_name ...
unknown
codeparrot/codeparrot-clean
# Vault product documentation website > [!IMPORTANT] > > **Vault documentation change** > > Vault product documentation no longer publishes from the `/website` directory. The Vault docs now live in the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repo under `/content/vault/`. You can...
unknown
github
https://github.com/hashicorp/vault
website/README.md
--- setup: - skip: features: headers --- "Test without with single feature setup": - do: something: id: "something" - match: { acknowledged: true }
unknown
github
https://github.com/elastic/elasticsearch
build-tools-internal/src/test/resources/rest/transform/feature/with_feature_predefined.yml
""" Instructor API endpoint urls. """ from django.conf.urls import patterns, url urlpatterns = patterns( '', url(r'^students_update_enrollment$', 'instructor.views.api.students_update_enrollment', name="students_update_enrollment"), url(r'^register_and_enroll_students$', 'instructor.views...
unknown
codeparrot/codeparrot-clean
//===--- GenericArguments.h - IR generation for metadata requests ---------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2019 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
lib/IRGen/GenericArguments.h
"""\ Helper.py Helper functions for the current Flask web application. """ import os import logging from logging.handlers import SMTPHandler from flask import url_for, current_app def try_parse_int(s, default_value=None): """Parse an integer or return a default value if it cannot be done or the string is None.""...
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...
unknown
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/VDEX/Parser.hpp
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-05-06 01:22 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('m_comics', '0003_auto_20160505_1743'), ] operations = [ migrations.AlterField...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y' TIME_FORMAT = 'G:i' DATET...
unknown
codeparrot/codeparrot-clean
/* * 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.fe10.test.cases.generated.cases.components.expressionInfoProvider; ...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fe10/tests-gen/org/jetbrains/kotlin/analysis/api/fe10/test/cases/generated/cases/components/expressionInfoProvider/Fe10IdeNormalAnalysisSourceModuleReturnTargetSymbolTestGenerated.java
from __future__ import absolute_import, print_function import tensorflow as tf from niftynet.layer.crop import CropLayer from tests.niftynet_testcase import NiftyNetTestCase class CropTest(NiftyNetTestCase): def test_3d_shape(self): input_shape = (2, 16, 16, 16, 8) test_border = 3 x = tf.o...
unknown
codeparrot/codeparrot-clean
// scss-docs-start clearfix @mixin clearfix() { &::after { display: block; clear: both; content: ""; } } // scss-docs-end clearfix
unknown
github
https://github.com/twbs/bootstrap
scss/mixins/_clearfix.scss
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
unknown
codeparrot/codeparrot-clean
""" Read and write ZIP files. """ import struct, os, time, sys, shutil import binascii, cStringIO, stat try: import zlib # We may need its compression method crc32 = zlib.crc32 except ImportError: zlib = None crc32 = binascii.crc32 __all__ = ["BadZipfile", "error", "ZIP_STORED", "ZIP_DEFLATED", "is_zi...
unknown
codeparrot/codeparrot-clean
# debugger.py # A debugger for Pythonwin. Built from pdb. # Mark Hammond (MHammond@skippinet.com.au) - Dec 94. # usage: # >>> import pywin.debugger # >>> pywin.debugger.GetDebugger().run("command") import pdb import bdb import sys import string import os import types import win32ui import win32api import win32con...
unknown
codeparrot/codeparrot-clean
''' Provides a TrainingExample named tuple for convenience. Also, factory functions exist such as trainingExamplesFromSvm(). ''' from collections import namedtuple import numpy TrainingExample = namedtuple('TrainingExample', ('label', 'features')) # ''' # TrainingExample: NamedTuple to contain a single training exam...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import urllib import datetime import re from decimal import Decimal import scrapelib from bs4 import BeautifulSoup from urlparse import urlparse from sqlalchemy import or_ from purchasing.database import db, get_or_create from purchasing.data.contracts import ContractBase, ContractProperty, L...
unknown
codeparrot/codeparrot-clean
/** * \file ssl_misc.h * * \brief Internal functions shared by the SSL modules */ /* * Copyright The Mbed TLS Contributors * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ #ifndef MBEDTLS_SSL_MISC_H #define MBEDTLS_SSL_MISC_H #include "mbedtls/build_info.h" #include "common.h" #include "mbedtls/e...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/mbedtls/library/ssl_misc.h
# 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
data = ( '[?]', # 0x00 'N', # 0x01 'N', # 0x02 'H', # 0x03 '[?]', # 0x04 'a', # 0x05 'aa', # 0x06 'i', # 0x07 'ii', # 0x08 'u', # 0x09 'uu', # 0x0a 'R', # 0x0b 'L', # 0x0c '[?]', # 0x0d '[?]', # 0x0e 'e', # 0x0f 'ai', # 0x10 '[?]', # 0x11 '[?]', # 0x12 'o', # ...
unknown
codeparrot/codeparrot-clean
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. ```esql FROM employees | KEEP first_name, last_name, still_hired | RENAME still_hired AS employed ```
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/commands/examples/docs.csv-spec/rename.md
import {identity, createHookWrapper} from 'shared-runtime'; function useHook({isCond, value}) { return isCond ? identity({ getValue() { return value; }, }) : 42; } export const FIXTURE_ENTRYPOINT = { fn: createHookWrapper(useHook), params: [{isCond: true, value: 0}], };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/object-literal-method-derived-in-ternary-consequent.js
#!/usr/bin/python import datetime from dateutil.relativedelta import relativedelta import itertools import os import sys import time sys.path = ['/home/ben/Projects', '/home/ben/Projects/django'] + sys.path os.environ['DJANGO_SETTINGS_MODULE'] = 'boar.settings' from graphication import * from graphication.wavegraph ...
unknown
codeparrot/codeparrot-clean
import posixpath from ftplib import FTP, error_perm from posixpath import dirname from typing import IO def ftp_makedirs_cwd(ftp: FTP, path: str, first_call: bool = True) -> None: """Set the current directory of the FTP connection given in the ``ftp`` argument (as a ftplib.FTP object), creating all parent dire...
python
github
https://github.com/scrapy/scrapy
scrapy/utils/ftp.py
# -*- coding: utf-8 -*- ############################################################################## # # sale_payment_method for OpenERP # Copyright (C) 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 OpenERP SA (<http://openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals from .brightcove import ( BrightcoveLegacyIE, BrightcoveNewIE, ) from .common import InfoExtractor from ..compat import compat_str from ..utils import ( ExtractorError, sanitized_Request, ) class NownessBaseIE(InfoExtractor): def _extract_url...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2014-2020) # # This file is part of GWpy. # # GWpy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
unknown
codeparrot/codeparrot-clean
""" Discrete Fourier Transform (:mod:`numpy.fft`) ============================================= .. currentmodule:: numpy.fft Standard FFTs ------------- .. autosummary:: :toctree: generated/ fft Discrete Fourier transform. ifft Inverse discrete Fourier transform. fft2 Discrete Fourier tr...
unknown
codeparrot/codeparrot-clean
//go:build !windows package listeners import ( "fmt" "strconv" "github.com/moby/moby/v2/daemon/internal/usergroup" ) const defaultSocketGroup = "docker" func lookupGID(name string) (int, error) { group, err := usergroup.LookupGroup(name) if err == nil { return group.Gid, nil } gid, err := strconv.Atoi(nam...
go
github
https://github.com/moby/moby
daemon/listeners/group_unix.go
/* * 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-metadata-changelog-generator/src/main/java/org/springframework/boot/configurationmetadata/changelog/package-info.java
#### PATTERN | EN | INFLECT ######################################################################## # -*- coding: utf-8 -*- # Copyright (c) 2010 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). ######################################################...
unknown
codeparrot/codeparrot-clean
__author__ = 'sashgorokhov' __email__ = 'sashgorokhov@gmail.com' import tempfile, pickle, os.path, threading CACHEFILE = "cache" __cache = None __lock = threading.Lock() if not os.path.exists(CACHEFILE): pickle.dump(dict(), open(CACHEFILE, 'wb')) __cache = pickle.load(open(CACHEFILE, 'rb')) __temp_session = dic...
unknown
codeparrot/codeparrot-clean
/*--------------------------------------------------------------------------- * rmgrlist.h * * The resource manager list is kept in its own source file for possible * use by automatic tools. The exact representation of a rmgr is determined * by the PG_RMGR macro, which is not defined in this file; it can be * de...
c
github
https://github.com/postgres/postgres
src/include/access/rmgrlist.h
# (C) British Crown Copyright 2010 - 2015, Met Office # # This file is part of Iris. # # Iris 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 3 of the License, or # (at your option) any l...
unknown
codeparrot/codeparrot-clean
# Copyright 2015, 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 of conditions and the f...
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
connect/api/src/main/java/org/apache/kafka/connect/rest/package-info.java
__all__ = [ 'LXMLTreeBuilderForXML', 'LXMLTreeBuilder', ] import collections from lxml import etree from bs4.element import Comment, Doctype, NamespacedAttribute from bs4.builder import ( FAST, HTML, HTMLTreeBuilder, PERMISSIVE, TreeBuilder, XML) from bs4.dammit import UnicodeDammit...
unknown
codeparrot/codeparrot-clean
// Copyright 2016 The etcd Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
go
github
https://github.com/etcd-io/etcd
tests/framework/integration/cluster.go
# Copyright 2015 Adam Greenstein <adamgreenstein@comcast.net> # # Switcharoo Cartographer is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
unknown
codeparrot/codeparrot-clean
from .abstract_trimming_input_stream import AbstractTrimmingInputStream class H264PictureTimingTrimmingInputStream(AbstractTrimmingInputStream): def __init__(self, input_stream_id, start_pic_timing=None, end_pic_timing=None, id_=None, custom_data=None, name=None, description=None): super(...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 # # # 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import from __...
unknown
codeparrot/codeparrot-clean
""" Built-in, globally-available admin actions. """ from django.core.exceptions import PermissionDenied from django.contrib.admin import helpers from django.contrib.admin.util import get_deleted_objects, model_ngettext from django.db import router from django.template.response import TemplateResponse from django.utils...
unknown
codeparrot/codeparrot-clean
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2007 Albert Strasheim <fullung@gmail.com> # # 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