code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2017 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by th...
unknown
codeparrot/codeparrot-clean
""" Support the sensor of a BloomSky weather station. For more details about this component, please refer to the documentation at https://home-assistant.io/components/sensor.bloomsky/ """ import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const impo...
unknown
codeparrot/codeparrot-clean
from django.conf.urls import patterns, url from versions.feeds import VersionsRss from addons.urls import ADDON_ID from . import views urlpatterns = patterns( '', url('^$', views.version_list, name='addons.versions'), url('^beta$', views.version_list, name='addons.beta-versions', k...
unknown
codeparrot/codeparrot-clean
""" Common utility functions useful throughout the contentstore """ import logging from datetime import datetime from django.conf import settings from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from opaque_keys.edx.keys import CourseKey, UsageKey from pytz import UTC f...
unknown
codeparrot/codeparrot-clean
import { createApp, nodeOps, render } from '@vue/runtime-test' import { defineComponent, h, ref } from '../src' describe('api: expose', () => { test('via setup context', () => { const Child = defineComponent({ render() {}, setup(_, { expose }) { expose({ foo: 1, bar: ref(2...
typescript
github
https://github.com/vuejs/core
packages/runtime-core/__tests__/apiExpose.spec.ts
/* Copyright 2021 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/core/util/autotune_maps/autotune_serialize.h
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. """Overrides and support functions for arbit...
unknown
codeparrot/codeparrot-clean
################################ # These variables are overwritten by Zenoss when the ZenPack is exported # or saved. Do not modify them directly here. # NB: PACKAGES is deprecated NAME = 'ZenPacks.smbambling.ActiveDirectory' VERSION = '1.0' AUTHOR = 'Steven Bambling' LICENSE = 'GPLv2' NAMESPACE_PACKAGES = ['ZenPacks'...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # Copyright (c) 2016 Dave McCoy (dave.mccoy@cospandesign.com) # # NAME 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 # any later version. # # NAME ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2014 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """usage: %prog [options] filename Parse a document to a tree, with optional profiling """ import sys import os import traceback from optparse import OptionParser from html5lib import html5parser, sanitizer from html5lib.tokenizer import HTMLTokenizer from html5lib import treebuilders, serializ...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * lockfuncs.c * Functions for SQL access to various lock-manager capabilities. * * Copyright (c) 2002-2026, PostgreSQL Global Development Group * * IDENTIFICATION * src/backend/utils/adt/lockfuncs.c * *----------------------------...
c
github
https://github.com/postgres/postgres
src/backend/utils/adt/lockfuncs.c
__author__ = 'mramire8' __copyright__ = "Copyright 2013, ML Lab" __version__ = "0.1" __status__ = "Development" import numpy as np import copy import random class BaseLearner(object): def __init__(self, model=None, cost_model=None, accuracy_model=None, budget=None, seed=1234567, subpool=None): self.curre...
unknown
codeparrot/codeparrot-clean
import xmlrpclib, httplib, sys # Usage: python xmlrpc_test.py command [params...] # # python script for sending an xmlrpc command to ser's xmlrpc module. # Note: it uses a re-defined transport class that does not depend on the # server side closing the connection (it can be used to send multiple # commands without cl...
unknown
codeparrot/codeparrot-clean
# -*- coding:iso-8859-1 -*- """ Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard python 2.3+ datetime module. """ from __future__ import unicode_literals __author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>" __license__ = "Simplified BSD" import datetime ...
unknown
codeparrot/codeparrot-clean
__author__ = 'Frank Sehnke, sehnke@in.tum.de' from pybrain.rl.environments import EpisodicTask from pybrain.rl.environments.ode.sensors import * #@UnusedWildImport from scipy import ones, tanh, clip #Basic class for all Johnnie tasks class JohnnieTask(EpisodicTask): def __init__(self, env): EpisodicTask....
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe, erpnext import frappe.model from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry from frapp...
unknown
codeparrot/codeparrot-clean
''' Created on Dec 25, 2012 @author: Paulson McIntyre (GpMidi) <paul@gpmidi.net> ''' import unittest from Fourchapy.tests.BoardIndex import BoardConfigBasedTests class BoardPageConfigBasedTests(BoardConfigBasedTests): def setUp(self): BoardConfigBasedTests.setUp(self) self.log.debug("Setting up %...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
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 appl...
unknown
codeparrot/codeparrot-clean
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2011-2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This p...
unknown
codeparrot/codeparrot-clean
"""Tests for distutils.core.""" import StringIO import distutils.core import os import shutil import sys import test.test_support import unittest # setup script that uses __file__ setup_using___file__ = """\ __file__ from distutils.core import setup setup() """ setup_prints_cwd = """\ import os print os.getcwd() ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2008-2012 testtools developers. See LICENSE for details. from testtools.tests.helpers import FullStackRunTest class TestMatchersInterface(object): run_tests_with = FullStackRunTest def test_matches_match(self): matcher = self.matches_matcher matches = self.matches_matches ...
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-beans/src/main/java/org/springframework/beans/propertyeditors/StringArrayPropertyEditor.java
// Copyright 2018 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. // Test that the error message for an unrepresentable typedef in a // union appears on the right line. This test is only run if the size // of long double is la...
go
github
https://github.com/golang/go
src/cmd/cgo/internal/testerrors/testdata/issue28069.go
# -*- coding: utf-8 -*- import os import sys from paste.fixture import TestApp from __init__ import test_root lang_setup = None def setup_py_trans(): global lang_setup import pylons from pylons.i18n.translation import _get_translator root = os.path.join(test_root, 'sample_controllers') lang_setu...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/hwmon/adi,ltc4282.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Analog Devices LTC4282 I2C High Current Hot Swap Controller over I2C maintainers: - Nuno Sa <nuno.sa@analog.com> descripti...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/hwmon/adi,ltc4282.yaml
.a.svelte-xyz + .b:where(.svelte-xyz) { color: green; } .a.svelte-xyz + .c:where(.svelte-xyz) { color: green; } .b.svelte-xyz + .d:where(.svelte-xyz) { color: green; } .c.svelte-xyz + .d:where(.svelte-xyz) { color: green; } /* no match */ /* (unused) .a + .d { color: green; }*/ /* (unused) .b + .c { color: green...
css
github
https://github.com/sveltejs/svelte
packages/svelte/tests/css/samples/siblings-combinator-each-else/expected.css
### # Copyright (c) 2004-2005, Jeremiah Fincher # 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 co...
unknown
codeparrot/codeparrot-clean
from scripts.sort_whatsnew_note import sort_whatsnew_note def test_sort_whatsnew_note() -> None: content = ( ".. _whatsnew_200:\n" "\n" "What's new in 2.0.0 (March XX, 2023)\n" "------------------------------------\n" "\n" "Timedelta\n" "^^^^^^^^^\n" ...
python
github
https://github.com/pandas-dev/pandas
scripts/tests/test_sort_whatsnew_note.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 P. Christeas, Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2013 OpenERP SA. (http://www.openerp.com) # # This program is free so...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Contracts\Container; use Exception; use Psr\Container\ContainerExceptionInterface; class BindingResolutionException extends Exception implements ContainerExceptionInterface { // }
php
github
https://github.com/laravel/framework
src/Illuminate/Contracts/Container/BindingResolutionException.php
#!/usr/bin/python # Copyright 2013 Google 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 vers...
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/. class EmulatorBattery(object): def __init__(self, emulator): self.emulator = emulator def get_state(se...
unknown
codeparrot/codeparrot-clean
"""Tests of comprehensive theming.""" from django.conf import settings from django.test import TestCase from path import path # pylint: disable=no-name-in-module from django.contrib import staticfiles from openedx.core.djangoapps.theming.test_util import with_comprehensive_theme from openedx.core.lib.tempd...
unknown
codeparrot/codeparrot-clean
############################################################################## # 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
# 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
# Copyright 2016 Mycroft AI, Inc. # # This file is part of Mycroft Core. # # Mycroft Core 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
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A "Test Server Spawner" that handles killing/stopping per-test test servers. It's used to accept requests from the device to spawn and kill instances of ...
unknown
codeparrot/codeparrot-clean
import { codeFixAll, createCodeFixAction, generateAccessorFromProperty, registerCodeFix, } from "../_namespaces/ts.codefix.js"; import { CodeFixAllContext, CodeFixContext, Debug, Diagnostics, getEffectiveBaseTypeNode, getSourceFileOfNode, getTextOfPropertyName, getTokenAt...
typescript
github
https://github.com/microsoft/TypeScript
src/services/codefixes/fixPropertyOverrideAccessor.ts
#!/usr/bin/env python # -*- coding: utf-8 -*- """ multitasking: Non-blocking Python methods using decorators https://github.com/ranaroussi/multitasking Copyright 2016-2018 Ran Aroussi """ import codecs import os from setuptools import setup, find_packages # Get the long description from the README file with codecs.op...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * import time '''...
unknown
codeparrot/codeparrot-clean
import os import tempfile import numpy as np nd = np.array([[1, 2], [3, 4]]) scalar_array = np.array(1) # item scalar_array.item() nd.item(1) nd.item(0, 1) nd.item((0, 1)) # tolist is pretty simple # itemset scalar_array.itemset(3) nd.itemset(3, 0) nd.itemset((0, 0), 3) # tobytes nd.tobytes() nd.tobytes("C") nd.t...
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/ELF/ParserConfig.hpp
{{ request.path }}
html
github
https://github.com/django/django
tests/template_loader/templates/template_loader/request.html
import os from hokusai.lib.command import command from hokusai.lib.config import config from hokusai.services.ecr import ECR from hokusai.lib.common import print_green, shout from hokusai.lib.exceptions import HokusaiError from hokusai.services.docker import Docker @command() def push(tag, local_tag, build, filename,...
unknown
codeparrot/codeparrot-clean
'use strict'; const common = require('../common.js'); const assert = require('assert'); const bench = common.createBenchmark(main, { n: [5e6], }); function main({ n }) { let timer = setTimeout(() => {}, 1); for (let i = 0; i < n; i++) { setTimeout(cb, 1); } let next = timer._idlePrev; clearTimeout(ti...
javascript
github
https://github.com/nodejs/node
benchmark/timers/timers-cancel-pooled.js
################################################### # header_operations.py # This file cfontains opcode declarations # DO NOT EDIT THIS FILE! ################################################### #----------------------------------------------------------------------------- # CONTROL OPERATIONS #------------------------...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """!weather <zip or place name> return the 5-day forecast""" try: from urllib import quote except ImportError: from urllib.request import quote import re import requests import time # http://openweathermap.org/weather-conditions iconmap = { "01": ":sunny:", "02": ":partly_sunny...
unknown
codeparrot/codeparrot-clean
use rustc_hir::attrs::AttributeKind; use rustc_hir::find_attr; use rustc_middle::bug; use rustc_middle::ty::{self, TyCtxt}; use rustc_span::sym; pub(crate) fn inferred_outlives(tcx: TyCtxt<'_>) { for id in tcx.hir_free_items() { if !find_attr!(tcx.get_all_attrs(id.owner_id), AttributeKind::RustcOutlives) {...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_hir_analysis/src/outlives/dump.rs
{% load i18n %} {% if app_list %} {% for app in app_list %} <div class="app-{{ app.app_label }} module{% if app.app_url in request.path|urlencode %} current-app{% endif %}"> <table> <caption> <a href="{{ app.app_url }}" class="section">{{ app.name }}</a> </caption> <thead ...
html
github
https://github.com/django/django
django/contrib/admin/templates/admin/app_list.html
#coding:utf8 ''' Created on 2014-2-23 @author: lan (www.9miao.com) ''' from gtwisted.utils import log import struct class DataPackError(Exception): """An error occurred binding to an interface""" def __str__(self): s = self.__doc__ if self.args: s = '%s: %s' % (s, ' '.join(self.ar...
unknown
codeparrot/codeparrot-clean
""" This file contains utility functions which will responsible for sending emails. """ import os import logging import pynliner import urlparse import uuid import HTMLParser from django.conf import settings from django.contrib.auth.models import User from django.contrib.staticfiles import finders from django.core.c...
unknown
codeparrot/codeparrot-clean
# Copyright Google Research and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
python
github
https://github.com/huggingface/transformers
src/transformers/models/bigbird_pegasus/configuration_bigbird_pegasus.py
"""Constants/functions for interpreting results of os.stat() and os.lstat(). Suggested usage: from stat import * """ # Indices for stat struct members in the tuple returned by os.stat() ST_MODE = 0 ST_INO = 1 ST_DEV = 2 ST_NLINK = 3 ST_UID = 4 ST_GID = 5 ST_SIZE = 6 ST_ATIME = 7 ST_MTIME = 8 ST_CTIME = 9 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Wojciech Sciesinski <wojciech[at]sciesinski[dot]net> # Copyright: (c) 2017, Daniele Lazzari <lazzari@mailup.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # this is a windows documentation stub. actual...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from django.db import migrations, models from opaque_keys.edx.django.models import CourseKeyField from opaque_keys.edx.keys import CourseKey log = logging.getLogger(__name__) def revert_alter_unique(apps, schema_editor): CertificateTe...
unknown
codeparrot/codeparrot-clean
from django.conf import settings from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation from django.utils.functional import cached_property class PostGISCreation(DatabaseCreation): geom_index_type = 'GIST' geom_index_ops = 'GIST_GEOMETRY_OPS' geom_index_ops_nd = 'GIST_GEOMETRY_OPS_ND'...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # (c) 2016 Red Hat 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 ver...
unknown
codeparrot/codeparrot-clean
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Title: CURLOPT_PROXYPASSWORD Section: 3 Source: libcurl See-also: - CURLOPT_HTTPAUTH (3) - CURLOPT_PASSWORD (3) - CURLOPT_PROXYAUTH (3) - CURLOPT_PROXYUSERNAME (3) Protocol: - All Added-in: 7.19.1 --- # NAME CURLOPT...
unknown
github
https://github.com/curl/curl
docs/libcurl/opts/CURLOPT_PROXYPASSWORD.md
minor_changes: - ansible-test - Replace Alpine 3.22 container and remote with 3.23.
unknown
github
https://github.com/ansible/ansible
changelogs/fragments/ansible-test-alpine.yml
<!--- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may...
unknown
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/site/markdown/release/0.16.3/CHANGELOG.0.16.3.md
#!/bin/sh test_description='pack-objects --stdin' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh packed_objects () { git show-index <"$1" >tmp-object-list && cut -d' ' -f2 tmp-object-list | sort && rm tmp-object-list } test_expect_success 'setup for --stdin...
unknown
github
https://github.com/git/git
t/t5331-pack-objects-stdin.sh
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors # # This file is part of Alignak. # # Alignak is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, ei...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h> static ngx_int_t ngx_poll_init(ngx_cycle_t *cycle, ngx_msec_t timer); static void ngx_poll_done(ngx_cycle_t *cycle); static ngx_int_t ngx_poll_add_event(ngx_event_t *ev, ngx_int_t even...
c
github
https://github.com/nginx/nginx
src/event/modules/ngx_poll_module.c
kind: NEW FEATURES body: We now produce builds for Windows ARM64 time: 2025-09-26T16:41:34.771437+02:00 custom: Issue: "32719"
unknown
github
https://github.com/hashicorp/terraform
.changes/v1.15/NEW FEATURES-20250926-164134.yaml
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
unknown
codeparrot/codeparrot-clean
# pylint: skip-file # flake8: noqa class PolicyUserException(Exception): ''' PolicyUser exception''' pass class PolicyUserConfig(OpenShiftCLIConfig): ''' PolicyUserConfig is a DTO for user related policy. ''' def __init__(self, namespace, kubeconfig, policy_options): super(PolicyUserConfig, s...
unknown
codeparrot/codeparrot-clean
import msilib,os,win32com,tempfile,sys PCBUILD="PCBuild" certname = None from config import * Win64 = "amd64" in PCBUILD mod_dir = os.path.join(os.environ["ProgramFiles"], "Common Files", "Merge Modules") msi = None if len(sys.argv)==2: msi = sys.argv[1] if Win64: modules = ["Microsoft_VC90_CRT_x86_x64.msm", ...
unknown
codeparrot/codeparrot-clean
""" :mod: DErrno ========================== .. module: DErrno :synopsis: Error list and utilities for handling errors in DIRAC This module contains list of errors that can be encountered in DIRAC. It complements the errno module of python. It also contains utilities to manipulate these erro...
unknown
codeparrot/codeparrot-clean
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
unknown
codeparrot/codeparrot-clean
# pylint: disable=invalid-name from __future__ import absolute_import, division, print_function import numpy import os import re from mantid.kernel import V3D from mantid.api import (MatrixWorkspace, ITableWorkspace) from mantid.simpleapi import (mtd, CreateEmptyTableWorkspace, DeleteWorkspace, ...
unknown
codeparrot/codeparrot-clean
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from dplcm_estimation_config import dplcm_configuration as dplcm_gridcell_config from estimation_zone_config import run_configuration as config class dplcm_configuration(dplcm_gridcell_config): de...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/display/ingenic,ipu.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Ingenic SoCs Image Processing Unit (IPU) maintainers: - Paul Cercueil <paul@crapouillou.net> properties: compatible: on...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/display/ingenic,ipu.yaml
from __future__ import absolute_import import errno import logging import sys import warnings from socket import error as SocketError, timeout as SocketTimeout import socket from .exceptions import ( ClosedPoolError, ProtocolError, EmptyPoolError, HeaderParsingError, HostChangedError, Location...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # gh-115832: An object destructor running during the final GC of interpreter # shutdown triggered an infinite loop in the instrumentation code. import sys class CallableCycle: def __init__(self): self._cycle = self def __del__(self): pass def __call__(self, code, ...
python
github
https://github.com/python/cpython
Lib/test/_test_monitoring_shutdown.py
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: basic Help: HTTP Basic Authentication Protocols: HTTP Category: auth Added: 7.10.6 Multi: boolean See-also: - proxy-basic Example: - -u name:password --basic $URL --- # `--basic` Use HTTP Basic authentication with t...
unknown
github
https://github.com/curl/curl
docs/cmdline-opts/basic.md
""" Paparazzi transport encoding utilities """ from __future__ import absolute_import, division, print_function import struct from .message import PprzMessage # use Enum from python 3.4 if available (https://www.python.org/dev/peps/pep-0435/) # (backports as enum34 on pypi) try: from enum import Enum except Impo...
unknown
codeparrot/codeparrot-clean
use std::collections::HashMap; use std::ffi::OsStr; use std::fmt::Debug; use std::fs; #[cfg(unix)] use std::os::unix::process::ExitStatusExt; use std::path::{Path, PathBuf}; use std::process::{Command, ExitStatus, Output}; fn exec_command( input: &[&dyn AsRef<OsStr>], cwd: Option<&Path>, env: Option<&HashM...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_codegen_gcc/build_system/src/utils.rs
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, ...
java
github
https://github.com/elastic/elasticsearch
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/distribution/DockerElasticsearchDistributionType.java
import { DeprecationTypes, compatUtils, warn } from '@vue/runtime-core' import { includeBooleanAttr } from '@vue/shared' import { unsafeToTrustedHTML } from '../nodeOps' // functions. The user is responsible for using them with only trusted content. export function patchDOMProp( el: any, key: string, value: any,...
typescript
github
https://github.com/vuejs/core
packages/runtime-dom/src/modules/props.ts
// +k8s:openapi-gen=true // +k8s:defaulter-gen=TypeMeta // +k8s:conversion-gen=github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard // +groupName=dashboard.grafana.app // NOTE (@radiohead): we do not use package-wide deepcopy generation // because grafana-app-sdk already provides deepcopy functions. // Kinds w...
go
github
https://github.com/grafana/grafana
apps/dashboard/pkg/apis/dashboard/v1beta1/doc.go
import time import cv2 from vision.modules import ModuleBase import gui_options import buoy_common capture_source = 'forward' vision_options = [gui_options.IntOption('l_min', 39, 0, 255), gui_options.IntOption('l_max', 152, 0, 255), gui_options.IntOption('a_min', 45, 0, 255), gui_options.IntOption...
unknown
codeparrot/codeparrot-clean
/* Copyright 2022 - 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...
unknown
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/PDB/types/Function.hpp
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
unknown
codeparrot/codeparrot-clean
# Copyright 2017 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
import sys, pickle from unittest import TestCase import simplejson as json from simplejson.compat import u, b class TestErrors(TestCase): def test_string_keys_error(self): data = [{'a': 'A', 'b': (2, 4), 'c': 3.0, ('d',): 'D tuple'}] self.assertRaises(TypeError, json.dumps, data) def test_dec...
unknown
codeparrot/codeparrot-clean
from django.db import models from django.core.mail import send_mail class Visitor(models.Model): name = models.CharField(max_length=50) email = models.EmailField(unique=True) phone = models.CharField(max_length=16, default='') is_valid = models.BooleanField(default=False) date_joined = models.DateT...
unknown
codeparrot/codeparrot-clean
'''Production settings and globals.''' from os import environ from base import * # Normally you should not import ANYTHING from Django directly # into your settings, but ImproperlyConfigured is an exception. from django.core.exceptions import ImproperlyConfigured def get_env_setting(setting): ''' Get the enviro...
unknown
codeparrot/codeparrot-clean
#!/bin/sh # # Copyright (c) 2020 Google LLC # test_description='reftable basics' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME GIT_TEST_DEFAULT_REF_FORMAT=reftable export GIT_TEST_DEFAULT_REF_FORMAT . ./test-lib.sh INVALID_OID=$(test_oid 001) test_expect_success 'pack-refs d...
unknown
github
https://github.com/git/git
t/t0610-reftable-basics.sh
# -*- coding: utf-8 -*- # server.py # Copyright (C) 2014 LEAP # # 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) 2010 Google Inc. All rights reserved. # Copyright (C) 2009 Torch Mobile Inc. # Copyright (C) 2009 Apple Inc. All rights reserved. # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided t...
unknown
codeparrot/codeparrot-clean
from django import Xtemplate # NOQA
python
github
https://github.com/django/django
tests/template_tests/broken_tag.py
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
configuration-metadata/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/fieldvalues/javac/VariableTree.java
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
unknown
codeparrot/codeparrot-clean
from flask import Flask, render_template, session, redirect, url_for, flash from flask.ext.script import Manager from flask.ext.bootstrap import Bootstrap from flask.ext.moment import Moment from flask.ext.wtf import Form from wtforms import TextAreaField,StringField,SubmitField,SelectField,PasswordField from wtforms.v...
unknown
codeparrot/codeparrot-clean
''' Created on May 4, 2017 @author: Leo Zhong ''' import os from PIL import Image, ImageDraw from numpy import * import numpy as np from nbformat.v2.tests.nbexamples import jpeg def drawdendrogram(clust,imlist,jpeg="clusters.jpg"): #height and WIDTH h=getheight(clust)*20 w=1200 depth=getdepth(clust) ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright 2024 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. set -xeuo pipefail bazel build //pkg/cmd/bazci $(bazel info bazel-bin)/pkg/cmd/bazci/bazci_/bazci -- test --config=ci //pkg/ui:test
unknown
github
https://github.com/cockroachdb/cockroach
build/teamcity/cockroach/ci/tests-aws-linux-arm64/ui_test_impl.sh