code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
<!-- 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
github
https://github.com/apache/hadoop
dev-support/git-jira-validation/README.md
import asyncio import json from gameobjects.vector2 import Vector2 connected_clients = 0 clients = {} class Client(object): def __init__(self, id): self.id = id self.pos = [0, 0] class EchoServerClientProtocol(asyncio.Protocol): def connection_made(self, transport): peername = transpo...
unknown
codeparrot/codeparrot-clean
# # Broker peering simulation (part 2) in Python # Prototypes the request-reply flow # # While this example runs in a single process, that is just to make # it easier to start and stop the example. Each thread has its own # context and conceptually acts as a separate process. # # Author : Min RK # Contact...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django.utils.timezone from django.conf import settings import pyconde.tagging class Migration(migrations.Migration): dependencies = [ ('speakers', '__first__'),...
unknown
codeparrot/codeparrot-clean
from winwin.graph import Graph class Writer: ''' Write a graph or a list of nodes into a file. ''' def write_nodes(self, nodes, file_location): ''' Writes a list of nodes into a file with their x and y coordinates @type nodes: list @param nodes: a list of nodes. ...
unknown
codeparrot/codeparrot-clean
name: Rail Inspector on: pull_request: paths: - "tools/rail_inspector/**" push: paths: - "tools/rail_inspector/**" permissions: contents: read jobs: rail_inspector: name: rail_inspector tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Remove Gemf...
unknown
github
https://github.com/rails/rails
.github/workflows/rail_inspector.yml
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\Doctrine\DependencyInjection\Security\UserProvider; use ...
php
github
https://github.com/symfony/symfony
src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # 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) an...
unknown
codeparrot/codeparrot-clean
########################### 1. 導入所需模組 import cherrypy import os ########################### 2. 設定近端與遠端目錄 # 確定程式檔案所在目錄, 在 Windows 有最後的反斜線 _curdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) # 設定在雲端與近端的資料儲存目錄 if 'OPENSHIFT_REPO_DIR' in os.environ.keys(): # 表示程式在雲端執行 download_root_dir = os.environ['OPE...
unknown
codeparrot/codeparrot-clean
require 'thread' # many producers, many consumers nr = 1_000_000 n = 10 m = 10 q = Thread::SizedQueue.new(100) consumers = n.times.map do Thread.new do while q.pop # consuming end end end producers = m.times.map do Thread.new do while nr > 0 q.push true nr -= 1 end end end pr...
ruby
github
https://github.com/ruby/ruby
benchmark/vm_thread_sized_queue4.rb
"""Metadata Sheet.""" from logging import getLogger from pyramid.registry import Registry import colander from adhocracy_core.interfaces import IResource from adhocracy_core.interfaces import ISheet from adhocracy_core.interfaces import SheetToSheet from adhocracy_core.sheets import add_sheet_to_registry from adhocra...
unknown
codeparrot/codeparrot-clean
// Copyright 2013 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 bufio_test import ( "bufio" "bytes" "fmt" "os" "strconv" "strings" ) func ExampleWriter() { w := bufio.NewWriter(os.Stdout) fmt.Fprint(w, "Hel...
go
github
https://github.com/golang/go
src/bufio/example_test.go
// Code generated by "enumer -type=PluginRuntimeType -trimprefix=PluginRuntimeType -transform=snake"; DO NOT EDIT. package api import ( "fmt" ) const _PluginRuntimeTypeName = "unsupportedcontainer" var _PluginRuntimeTypeIndex = [...]uint8{0, 11, 20} func (i PluginRuntimeType) String() string { if i >= PluginRunt...
go
github
https://github.com/hashicorp/vault
api/pluginruntimetype_enumer.go
//go:build !windows /* Copyright 2017 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 a...
go
github
https://github.com/kubernetes/kubernetes
cmd/kubeadm/app/preflight/checks_unix.go
from os import path, makedirs, remove, listdir, environ, pathsep from subprocess import list2cmdline, run, Popen, PIPE import numpy as np from ..utils import read_htk_header from ..tcdtimit.files import phoneme_file, phoneme_list, viseme_file, viseme_list, character_file, character_list current_path = path.abspath(pat...
unknown
codeparrot/codeparrot-clean
# A reaction to: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/552751 from webob import Request, Response from webob import exc from simplejson import loads, dumps import traceback import sys class JsonRpcApp(object): """ Serve the given object via json-rpc (http://json-rpc.org/) """ def __i...
unknown
codeparrot/codeparrot-clean
# Test the Unicode versions of normal file functions # open, os.open, os.stat. os.listdir, os.rename, os.remove, os.mkdir, os.chdir, os.rmdir import os import sys import unittest import warnings from unicodedata import normalize from test import support filenames = [ '1_abc', '2_ascii', '3_Gr\xfc\xdf-Gott'...
unknown
codeparrot/codeparrot-clean
<?php return array( 'root' => array( 'name' => '__root__', 'pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => 'sourceref-by-default', 'type' => 'library', 'install_path' => __DIR__ . '/./', 'aliases' => array( 0 => '1.10.x-...
php
github
https://github.com/composer/composer
tests/Composer/Test/Repository/Fixtures/installed.php
""" A set of request processors that return dictionaries to be merged into a template context. Each function takes the request object as its only parameter and returns a dictionary to add to the context. These are referenced from the 'context_processors' option of the configuration of a DjangoTemplates backend and use...
unknown
codeparrot/codeparrot-clean
import sys import unittest from libcloud.test import MockHttp from libcloud.test.file_fixtures import DNSFileFixtures from libcloud.test.secrets import DNS_PARAMS_BUDDYNS from libcloud.dns.drivers.buddyns import BuddyNSDNSDriver from libcloud.utils.py3 import httplib from libcloud.dns.types import ZoneDoesNotExistErro...
unknown
codeparrot/codeparrot-clean
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', # Examples: # url(r'^$', 'server.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^viewadd_activity$', 'server.views.viewAddActivity', name='viewAddActivity'), url...
unknown
codeparrot/codeparrot-clean
import unittest from django.core.exceptions import ImproperlyConfigured from django.db import ProgrammingError try: from django.contrib.gis.db.backends.postgis.operations import PostGISOperations HAS_POSTGRES = True except ImportError: HAS_POSTGRES = False except ImproperlyConfigured as e: # If psycop...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """a quick hack to demonstrate getting data between python and marsyas. """ import sys import numpy import pylab import marsyas import marsyas_util #PLOT = True PLOT = False def make_input(filename_input): series = ["Series/input", ["SoundFileSource/src"]] this_net = marsyas_util.c...
unknown
codeparrot/codeparrot-clean
<h1>partial html</h1>
html
github
https://github.com/rails/rails
actionview/test/fixtures/test/_partialhtml.html
package kotlinx.coroutines.android import kotlinx.coroutines.* import kotlin.coroutines.* // Classes for testing service loader internal class EmptyCoroutineScopeImpl1 : CoroutineScope { override val coroutineContext: CoroutineContext get() = EmptyCoroutineContext } internal class EmptyCoroutineScopeImpl...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
ui/kotlinx-coroutines-android/android-unit-tests/src/EmptyCoroutineScopeImpl.kt
# Copyright (c) 2015 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * toast_compression.c * Functions for toast compression. * * Copyright (c) 2021-2026, PostgreSQL Global Development Group * * * IDENTIFICATION * src/backend/access/common/toast_compression.c * *---------------------------------...
c
github
https://github.com/postgres/postgres
src/backend/access/common/toast_compression.c
############################################################################### # # temboo.core.proxy.TembooProxy # temboo.core.proxy.TembooProxifiedChoreography # # Classes to proxy choreo execution requests made from the JavaScript SDK # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed und...
unknown
codeparrot/codeparrot-clean
# (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 version. # # Ansible is dis...
unknown
codeparrot/codeparrot-clean
{ "html": { "type": "Fragment", "start": 0, "end": 16, "children": [ { "type": "Element", "start": 0, "end": 16, "name": "div", "attributes": [ { "type": "Attribute", "start": 5, "end": 9, "name": "id", "name_loc": { "start": { "line": 1,...
json
github
https://github.com/sveltejs/svelte
packages/svelte/tests/parser-legacy/samples/attribute-shorthand/output.json
#!/usr/bin/python # encoding: utf-8 # (c) 2012, Matt Wright <matt@nobien.net> # (c) 2013, Alexander Saltanov <asd@mokote.com> # (c) 2014, Rutger Spiertz <rutger@kumina.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...
unknown
codeparrot/codeparrot-clean
/** @import * as ESTree from 'estree' */ /** @import { AST, ValidatedCompileOptions, ValidatedModuleCompileOptions } from '#compiler' */ /** @import { ComponentServerTransformState, ComponentVisitors, ServerTransformState, Visitors } from './types.js' */ /** @import { Analysis, ComponentAnalysis } from '../../types.js'...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/compiler/phases/3-transform/server/transform-server.js
/* 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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/kernels/deep_conv2d.h
import json from itertools import chain from operator import attrgetter import pyperclip from datetime import date,datetime import csv from django.contrib.auth.decorators import login_required from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse, reverse_lazy from django....
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "abstract_unit" class DebugExceptionsTest < ActionDispatch::IntegrationTest InterceptedErrorInstance = StandardError.new class CustomActionableError < StandardError include ActiveSupport::ActionableError action "Action 1" do nil end action "Action 2" ...
ruby
github
https://github.com/rails/rails
actionpack/test/dispatch/debug_exceptions_test.rb
/// One or many patterns. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum Patterns { Single(String), List(Vec<String>), } impl Patterns { pub fn is_empty(&self) -> bool { match self { Patterns::Single(_) => false, Patterns::List(pats) => pats.is_empty(), } ...
rust
github
https://github.com/actix/actix-web
actix-router/src/pattern.rs
from __future__ import division, print_function, absolute_import import numpy as np class _FakeMatrix(object): def __init__(self, data): self._data = data self.__array_interface__ = data.__array_interface__ class _FakeMatrix2(object): def __init__(self, data): self._data = data d...
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/test/java/org/springframework/context/conversionservice/Bar.java
/** * 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...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestHttpCrossOriginFilterInitializer.java
// Copyright 2016 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package base import ( "context" "strconv" "sync/atomic" "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/util" "github.com/co...
go
github
https://github.com/cockroachdb/cockroach
pkg/base/node_id.go
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: multigpu.py # Author: Yuxin Wu <ppwwyyxxc@gmail.com> import tensorflow as tf import itertools, re from six.moves import zip, range from ..models import TowerContext from ..utils import * from ..utils.concurrency import LoopThread from ..tfutils.summary import summ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ @author: Jeff Cavner @contact: jcavner@ku.edu @license: gpl2 @copyright: Copyright (C) 2014, University of Kansas Center for Research Lifemapper Project, lifemapper [at] ku [dot] edu, Biodiversity Institute, 1345 Jayhawk Boulevard, Lawrence, Kansas, 66045, USA...
unknown
codeparrot/codeparrot-clean
## Input ```javascript function Foo(props) { const onFoo = useCallback( reason => { log(props.router.location); }, [props.router.location] ); return onFoo; } ``` ## Code ```javascript import { c as _c } from "react/compiler-runtime"; function Foo(props) { const $ = _c(2); let t0; if (...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/capturing-function-member-expr-arguments.expect.md
# coding=utf-8 from __future__ import unicode_literals from ..es import Provider as AddressProvider class Provider(AddressProvider): building_number_formats = ('%', '%#', '%#', '%#', '%##') street_prefixes = ( 'Plaza', 'Calle', 'Avenida', 'Via', 'Vial', 'Rambla', 'Glorieta', 'Urbanización', 'Callejón'...
unknown
codeparrot/codeparrot-clean
--- layout: step title: Liquid position: 2 --- Liquid is where Jekyll starts to get more interesting. It is a templating language which has three main components: * [objects](#objects) * [tags](#tags) * [filters](#filters) ## Objects Objects tell Liquid to output predefined [variables](../../variables/) as cont...
unknown
github
https://github.com/jekyll/jekyll
docs/_docs/step-by-step/02-liquid.md
#!/usr/bin/env python """ crate_anon/crateweb/manage.py =============================================================================== Copyright (C) 2015-2021 Rudolf Cardinal (rudolf@pobox.com). This file is part of CRATE. CRATE is free software: you can redistribute it and/or modify it under the ...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
unknown
codeparrot/codeparrot-clean
from ctypes import * import os import sys import unittest import test.support from ctypes.util import find_library libc_name = None def setUpModule(): global libc_name if os.name == "nt": libc_name = find_library("c") elif os.name == "ce": libc_name = "coredll" elif sys.platform == "cy...
unknown
codeparrot/codeparrot-clean
/** * This header is used internally by all current supported SIMD extensions, * except for AVX512. */ #ifndef NPY_SIMD #error "Not a standalone header, use simd/simd.h instead" #endif #ifndef _NPY_SIMD_EMULATE_MASKOP_H #define _NPY_SIMD_EMULATE_MASKOP_H /** * Implements conditional addition and subtraction. ...
c
github
https://github.com/numpy/numpy
numpy/_core/src/common/simd/emulate_maskop.h
use crate::abi::GCThreadTLS; use crate::upcalls; use crate::utils::ChunkedVecCollector; use crate::Ruby; use crate::RubySlot; use mmtk::memory_manager; use mmtk::scheduler::GCWork; use mmtk::scheduler::GCWorker; use mmtk::scheduler::WorkBucketStage; use mmtk::util::ObjectReference; use mmtk::util::VMWorkerThread; use ...
rust
github
https://github.com/ruby/ruby
gc/mmtk/src/scanning.rs
#!/usr/bin/env python3 """ Generate powers of ten using William Clinger's ``AlgorithmM`` for use in decimal to floating point conversions. Specifically, computes and outputs (as Rust code) a table of 10^e for some range of exponents e. The output is one array of 64 bit significands and another array of corresponding ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python #coding: utf-8 -*- # (c) 2016 Krzysztof Magosa <krzysztof@magosa.pl> # # 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
from setuptools import setup, find_packages exec(open('thunderfish/version.py').read()) long_description = """ # ThunderFish Algorithms and programs for analysing electric field recordings of weakly electric fish. [Documentation](https://bendalab.github.io/thunderfish) | [API Reference](https://bendalab.github.io/t...
unknown
codeparrot/codeparrot-clean
"""Adds xref targets to the top of files.""" import sys import os testing = False DONT_TOUCH = ( './index.txt', ) def target_name(fn): if fn.endswith('.txt'): fn = fn[:-4] return '_' + fn.lstrip('./').replace('/', '-') def process_file(fn, lines): lines.insert(0, '\n') lines...
unknown
codeparrot/codeparrot-clean
#---------------------------------------------------------------------- # Name: wx.lib.mixins.gridlabelrenderer # Purpose: A Grid mixin that enables renderers to be plugged in # for drawing the row and col labels, similar to how the # cell renderers work. # # Author: Robin Dunn...
unknown
codeparrot/codeparrot-clean
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright 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...
go
github
https://github.com/kubernetes/kubernetes
pkg/apis/rbac/v1/zz_generated.conversion.go
from __future__ import absolute_import from django.conf import settings from django.core.cache import cache from functools import partial from twitter import Twitter, OAuth, TwitterHTTPError from twitter.stream import TwitterStream from urlparse import parse_qs import json import re from utils.datatools import chunk f...
unknown
codeparrot/codeparrot-clean
from django.db.models.fields.related import ( RECURSIVE_RELATIONSHIP_CONSTANT, ManyToManyField, ManyToManyRel, RelatedField, ReverseManyRelatedObjectsDescriptor, create_many_to_many_intermediary_model, ) from django.utils.functional import curry class CustomManyToManyField(RelatedField): """ Ticket...
unknown
codeparrot/codeparrot-clean
{ "apiVersion": "v1", "kind": "APIGroup", "name": "apps", "preferredVersion": { "groupVersion": "apps/v1", "version": "v1" }, "versions": [ { "groupVersion": "apps/v1", "version": "v1" } ] }
json
github
https://github.com/kubernetes/kubernetes
api/discovery/apis__apps.json
# -*- coding: utf-8 -*- from hachoir_core.compatibility import any, sorted from hachoir_core.endian import endian_name from hachoir_core.tools import makePrintable, makeUnicode from hachoir_core.dict import Dict from hachoir_core.error import error, HACHOIR_ERRORS from hachoir_core.i18n import _ from hachoir_core.log i...
unknown
codeparrot/codeparrot-clean
""" =================================================================== Decision Tree Regression =================================================================== A 1D regression with decision tree. The :ref:`decision trees <tree>` is used to fit a sine curve with addition noisy observation. As a result, it learns ...
unknown
codeparrot/codeparrot-clean
from __future__ import annotations import numbers from typing import ( TYPE_CHECKING, ClassVar, Self, cast, ) import numpy as np from pandas._libs import ( lib, missing as libmissing, ) from pandas.util._decorators import set_module from pandas.core.dtypes.common import is_list_like from pan...
python
github
https://github.com/pandas-dev/pandas
pandas/core/arrays/boolean.py
from django.conf.urls.defaults import patterns, url urlpatterns = patterns("symposion.reviews.views", url(r"^section/(?P<section_slug>[\w\-]+)/all/$", "review_section", {"reviewed": "all"}, name="review_section"), url(r"^section/(?P<section_slug>[\w\-]+)/reviewed/$", "review_section", {"reviewed": "reviewed"},...
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...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/AnnotatedSecurityInfo.java
# Add the localize package To take advantage of the localization features of Angular, use the [Angular CLI][CliMain] to add the `@angular/localize` package to your project. To add the `@angular/localize` package, use the following command to update the `package.json` and TypeScript configuration files in your project...
unknown
github
https://github.com/angular/angular
adev/src/content/guide/i18n/add-package.md
# SIL Initializer Conventions A nominal type can define a number of initializers, some of which may delegate initialization to another initializer. There are specific calling conventions for these initializers within SIL that make up a part of the ABI for a type. This document aims to summarize the key calling convent...
unknown
github
https://github.com/apple/swift
docs/SIL/SILInitializerConventions.md
# -*- coding: utf-8 -*- from django.utils import timezone from website import settings def no_addon(email): return len([addon for addon in email.user.get_addons() if addon.config.short_name != 'osfstorage']) == 0 def no_login(email): from osf.models.queued_mail import QueuedMail, NO_LOGIN_TYPE sent = Que...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, division, unicode_literals import os import sys import traceback import warnings import re warnings.simplefilter('error') from .support import get_data_files from .support import TestData, convert, convertExpected, treeTypes from html5lib import html5parser, constants # Run t...
unknown
codeparrot/codeparrot-clean
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v0alpha1", "metadata": { "name": "v13.minimal_graph_config.v42" }, "spec": { "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/migrated_dashboards_output/v1beta1-mig-v13.minimal_graph_config.v42.v0alpha1.json
""" Integrity check debugging tool for IMAP accounts. Run as: python -m inbox.util.consistency_check --help """ from __future__ import absolute_import, division, print_function import argparse import errno import os import pkg_resources import subprocess import sys from fnmatch import fnmatch from inbox.models...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Author: Dennis Strasser mailto:dennis.f.strasser@gmail.com import configparser as cp __version__ = "1.0" class ConfigReader(object): """This class holds information on devices in the network This class holds information about people and their contact information: first- and last nam...
unknown
codeparrot/codeparrot-clean
use crate::runtime::scheduler::multi_thread::{queue, Stats}; use std::cell::RefCell; use std::thread; use std::time::Duration; #[allow(unused)] macro_rules! assert_metrics { ($stats:ident, $field:ident == $v:expr) => { #[cfg(target_has_atomic = "64")] { use crate::runtime::WorkerMetric...
rust
github
https://github.com/tokio-rs/tokio
tokio/src/runtime/tests/queue.rs
/* * 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/src/main/java/org/springframework/boot/SpringApplicationRunListener.java
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2010-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 required by applicable law or agree...
unknown
codeparrot/codeparrot-clean
''' Created on: Jun 28, 2013 @author: qwang ''' import hashlib import unittest # configure django settings for test from django.conf import settings #NOTICE configure in weibonews/test.py in setUpTests #settings.configure() from weibonews.utils.web.decorators import authenticate class MockRequestFunc(object): '...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ This file defines a set of system_info classes for getting information about various resources (libraries, library directories, include directories, etc.) in the system. Currently, the following classes are available: atlas_info atlas_threads_info atlas_blas_info atlas_blas_threads_in...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Support\Testing\Fakes; use Closure; use Exception; use Illuminate\Contracts\Notifications\Dispatcher as NotificationDispatcher; use Illuminate\Contracts\Notifications\Factory as NotificationFactory; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Contracts\Translation\HasLocalePr...
php
github
https://github.com/laravel/framework
src/Illuminate/Support/Testing/Fakes/NotificationFake.php
config = { "interfaces": { "google.container.v1.ClusterManager": { "retry_codes": { "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], "non_idempotent": [], }, "retry_params": { "default": { "initial_ret...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # (C) 2017 Red Hat Inc. # Copyright (C) 2017 Lenovo. # # GNU General Public License v3.0+ # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE...
unknown
codeparrot/codeparrot-clean
""" Test view handler for rerun (and eventually create) """ from django.test.client import RequestFactory from opaque_keys.edx.keys import CourseKey from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory from student.roles import CourseInstr...
unknown
codeparrot/codeparrot-clean
from test.test_support import verbose, verify import sys import new class Eggs: def get_yolks(self): return self.yolks print 'new.module()' m = new.module('Spam') if verbose: print m m.Eggs = Eggs sys.modules['Spam'] = m import Spam def get_more_yolks(self): return self.yolks + 3 print 'new.clas...
unknown
codeparrot/codeparrot-clean
import inspect import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module DEFAULT_DB_ALIAS = 'default' # Define some exceptions that mirror the PEP249 interface. # We will rethrow any backend-specific errors using these # common...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
unknown
codeparrot/codeparrot-clean
//go:build !ignore_autogenerated // +build !ignore_autogenerated // SPDX-License-Identifier: AGPL-3.0-only // Code generated by openapi-gen. DO NOT EDIT. package v2alpha1 import ( common "k8s.io/kube-openapi/pkg/common" spec "k8s.io/kube-openapi/pkg/validation/spec" ) func GetOpenAPIDefinitions(ref common.Refere...
go
github
https://github.com/grafana/grafana
apps/dashboard/pkg/apis/dashboard/v2alpha1/zz_generated.openapi.go
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
cpp
github
https://github.com/opencv/opencv
modules/calib3d/src/fundam.cpp
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # docmaker.py # # Convert source code markup to HTML documentation. # # Copyright 2002, 2004, 2008, 2013, 2014 by # David Turner. # # This file is part of the FreeType project, and may only be used, # modified, and distributed under the terms of the FreeType project # license, LICENSE.T...
unknown
codeparrot/codeparrot-clean
import os import sys import pygame from common.constants import * from client.constants import * from common import boundint from common.util.rect import Rect class FX(object): def __init__(self, inPos, inFacing, inType): self.preciseLoc = inPos self.facingRight = inFacing self.frames = ...
unknown
codeparrot/codeparrot-clean
import numpy as np import tensorflow as tf import h5py import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import sys # Functions for initializing neural nets parameters def init_weight_variable(shape, nameIn): initial = tf.truncated_normal(shape, stddev=0.1, dtype=tf.float32) retur...
unknown
codeparrot/codeparrot-clean
import theano import theano.tensor as T from lasagne import init from lasagne.layers import Conv2DLayer, TransposedConv2DLayer, ConcatLayer, SliceLayer, DropoutLayer from base import Model from ..lasagne_extensions.layers import (SampleLayer, MultinomialLogDensityLayer, GaussianLo...
unknown
codeparrot/codeparrot-clean
import sys import threading import pytest from pydev_tests_python.debugger_unittest import IS_PY36_OR_GREATER, IS_CPYTHON from pydev_tests_python.debug_constants import TEST_CYTHON pytestmark = pytest.mark.skipif(not IS_PY36_OR_GREATER or not IS_CPYTHON or not TEST_CYTHON, reason='Requires CPython >= 3.6') def get_fo...
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
# 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 writi...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2014 Red Hat, Inc., Bryn M. Reeves <bmr@redhat.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # T...
unknown
codeparrot/codeparrot-clean
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, ...
java
github
https://github.com/elastic/elasticsearch
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/info/RuntimeJava.java
# -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # 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 import os import json import sys from nose.plugins.skip import SkipTest...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Dumps all pwndbg-specific configuration points. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import pwndbg.commands import pwndbg.config from pw...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Tests that quoting specifications are properly handled during parsing for all of the parsers defined in parsers.py """ import csv import pandas.util.testing as tm from pandas import DataFrame from pandas.compat import PY3, StringIO, u class QuotingTests(object): def test_bad_quote_c...
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 ...
java
github
https://github.com/apache/hadoop
hadoop-cloud-storage-project/hadoop-huaweicloud/src/test/java/org/apache/hadoop/fs/obs/TestOBSContractSeek.java