code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
/* Copyright (c) 2006, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including...
c
github
https://github.com/mysql/mysql-server
sql/sql_derived.h
import matplotlib.pyplot as plt import numpy as np import metpy.calc as mpcalc from metpy.plots import SkewT from metpy.units import units fig = plt.figure(figsize=(9, 9)) skew = SkewT(fig) # Create arrays of pressure, temperature, dewpoint, and wind components p = [902, 897, 893, 889, 883, 874, 866, 857, 849, 841, 8...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ jinja2.testsuite.lexnparse ~~~~~~~~~~~~~~~~~~~~~~~~~~ All the unittests regarding lexing, parsing and syntax. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import sys import unittest from jinja2.testsuite import JinjaTestCase ...
unknown
codeparrot/codeparrot-clean
import numpy as np import matplotlib as mpl from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from PyKEP import epoch, DAY2SEC, planet_ss, AU, MU_SUN, lambert_problem from PyKEP.orbit_plots import plot_planet, plot_lambert mpl.rcParams['legend.fontsize'] = 10 fig = plt.figure() ax = fig.gca(pro...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cpp
from helper import unittest, PillowTestCase from PIL import Image, ImageFont, ImageDraw image_font_installed = True try: ImageFont.core.getfont except ImportError: image_font_installed = False @unittest.skipIf(not image_font_installed, "image font not installed") class TestImageFontBitmap(PillowTestCase): ...
unknown
codeparrot/codeparrot-clean
"""distutils.fancy_getopt Wrapper around the standard getopt module that provides the following additional features: * short and long options are tied together * options have help strings, so fancy_getopt could potentially create a complete usage summary * options set attributes of a passed-in object """ im...
unknown
codeparrot/codeparrot-clean
# (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
""" Module for GFXprim grabbers. """ # Import the SWIG wrapper from . import c_grabbers from ..utils import extend def extend_grabber(_Grabber): """ Extends _grabber class with convenience methods. Called once on module initialization. """ @extend(_Grabber) def start(self): "Starts frame capture." ...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 """Computational engine for InaSAFE core. Provides the function calculate_impact() """ import numpy from datetime import datetime import logging from PyQt4.QtCore import QSettings from safe.common.exceptions import RadiiException from safe.gis.geodesy import Point from safe.storage.geometry import Po...
unknown
codeparrot/codeparrot-clean
## Input ```javascript // @enableEmitFreeze @instrumentForget let makeReadOnly = 'conflicting identifier'; function useFoo(props) { return foo(props.x); } ``` ## Code ```javascript import { makeReadOnly as _makeReadOnly } from "react-compiler-runtime"; import { c as _c } from "react/compiler-runtime"; // @enable...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/emit-freeze-conflicting-imports.expect.md
""" Downloader Middleware manager See documentation in docs/topics/downloader-middleware.rst """ from __future__ import annotations import warnings from functools import wraps from typing import TYPE_CHECKING, Any, cast from scrapy.exceptions import ScrapyDeprecationWarning, _InvalidOutput from scrapy.http import R...
python
github
https://github.com/scrapy/scrapy
scrapy/core/downloader/middleware.py
# num-traits [![crate](https://img.shields.io/crates/v/num-traits.svg)](https://crates.io/crates/num-traits) [![documentation](https://docs.rs/num-traits/badge.svg)](https://docs.rs/num-traits) [![minimum rustc 1.60](https://img.shields.io/badge/rustc-1.60+-red.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-vers...
unknown
github
https://github.com/nodejs/node
deps/crates/vendor/num-traits/README.md
import shlex import six from .. import errors from .. import utils class ExecApiMixin(object): @utils.minimum_version('1.15') @utils.check_resource def exec_create(self, container, cmd, stdout=True, stderr=True, tty=False, privileged=False, user=''): if privileged and utils.co...
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. //go:build unix package syscall_test import ( "flag" "fmt" "internal/testenv" "io" "net" "os" "os/exec" "path/filepath" "runtime" "strconv" "syscal...
go
github
https://github.com/golang/go
src/syscall/syscall_unix_test.go
# # The Python Imaging Library. # $Id$ # # XBM File handling # # History: # 1995-09-08 fl Created # 1996-11-01 fl Added save support # 1997-07-07 fl Made header parser more tolerant # 1997-07-22 fl Fixed yet another parser bug # 2001-02-17 fl Use 're' instead of 'regex' (Python 2.1) (0.4) # 2001-05-13 fl Ad...
unknown
codeparrot/codeparrot-clean
/* SPDX-License-Identifier: MIT * origin: musl src/math/floor.c */ //! Generic `floor` algorithm. //! //! Note that this uses the algorithm from musl's `floorf` rather than `floor` or `floorl` because //! performance seems to be better (based on icount) and it does not seem to experience rounding //! errors on i386. ...
rust
github
https://github.com/nodejs/node
deps/crates/vendor/libm/src/math/generic/floor.rs
from app.resources import ApiResponse from satoyama.models import * import unittest from datetime import datetime import json from seeds.nodes import NodeSeeder class Badboy(object): def __init__(self, msg = "I'm a bad object."): self.message = msg def json(self): """ This badboy deliberately returns somethi...
unknown
codeparrot/codeparrot-clean
// 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 runtime var sigtable = [...]sigTabT{ /* 0 */ {0, "SIGNONE: no trap"}, /* 1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"}, /* 2 */ {_...
go
github
https://github.com/golang/go
src/runtime/signal_openbsd.go
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2014 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # 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, eithe...
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/io/erasurecode/CodecRegistry.java
# -*- coding: utf-8 -*- # # Virtlink.Vfs documentation build configuration file, created by # sphinx-quickstart on Mon Feb 29 16:49:29 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- #----------------------------------------------------------- # # fTools # Copyright (C) 2008-2011 Carson Farmer # EMAIL: carson.farmer (at) gmail.com # WEB : http://www.ftools.ca/fTools.html # # A collection of data management and analysis tools for vector data # #-----------------------------...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2006-2013 Regents of the University of Minnesota. # For licensing terms, see the file LICENSE. try: from osgeo import ogr from osgeo import osr except ImportError: import ogr import osr from decimal import Decimal import os import sys import time import conf import g log = g.log.getLogge...
unknown
codeparrot/codeparrot-clean
""" Tests for reductions where we want to test for matching behavior across Array, Index, Series, and DataFrame methods. """
python
github
https://github.com/pandas-dev/pandas
pandas/tests/reductions/__init__.py
/* * 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");...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/service/launcher/ServiceLaunchException.java
# -*- coding: utf-8 -*- # Copyright (c) 2014, Brandon Nielsen # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE file for details. import unittest import datetime from aniso8601.time import get_time_resolution, parse_time, parse_datetime, \...
unknown
codeparrot/codeparrot-clean
import os import glob from gppylib.test.behave_utils.utils import execute_sql_singleton master_data_dir = os.environ.get('MASTER_DATA_DIRECTORY') if master_data_dir is None: raise Exception('Please set MASTER_DATA_DIRECTORY in environment') def gp_fts_log_in_master_log_count(mdd): return gp_in_master_log_cou...
unknown
codeparrot/codeparrot-clean
############################################################################## # Copyright (c) 2013-2017, 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 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
# -*- coding: utf-8 -*- import uuid import ddt import httpretty from django.core.exceptions import ValidationError from django.db import IntegrityError from django.test import override_settings from django.utils.translation import ugettext_lazy as _ from factory.fuzzy import FuzzyText from oscar.templatetags.currency...
unknown
codeparrot/codeparrot-clean
import {Component} from '@angular/core'; @Component({ selector: 'hello-world', templateUrl: 'app.component.html', styleUrl: 'app.component.css', }) export class HelloWorldComponent { message = 'Hello Angular World!'; }
typescript
github
https://github.com/angular/angular
adev/src/content/examples/hello-world/src/app/app.component.ts
//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
cmd/kubeadm/app/apis/output/v1alpha3/zz_generated.deepcopy.go
# Copyright (c) 2017 Citrix Systems # # 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. # # A...
unknown
codeparrot/codeparrot-clean
// @ts-check const path = require('path') const fsp = require('fs/promises') const process = require('process') const execa = require('execa') const { Octokit } = require('octokit') const SemVer = require('semver') const yargs = require('yargs') /** @type {any} */ const fetch = require('node-fetch') const repoOwner ...
javascript
github
https://github.com/vercel/next.js
scripts/sync-react.js
# Copyright 2014 Google Inc. All Rights Reserved. """Command for adding a backend to a backend service.""" import copy from googlecloudapis.compute.v1 import compute_v1_messages from googlecloudsdk.calliope import exceptions from googlecloudsdk.compute.lib import backend_services_utils from googlecloudsdk.compute.lib ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import pytz import time from datetime import datetime, timedelta from openerp import _, api, fields, models from openerp.exceptions import UserError _logger = logging.getLogger(__name__) def _create_sequ...
unknown
codeparrot/codeparrot-clean
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ This example illustrates embedding a visvis figure in a wx application. """ import wx import visvis as vv # Create a visvis app instance, which wraps a wx application object. # This needs to be done *before* instantiating the main window. app = vv.use('wx') class MainWindow(wx.Frame): d...
unknown
codeparrot/codeparrot-clean
""" Simple config ============= Although CherryPy uses the :mod:`Python logging module <logging>`, it does so behind the scenes so that simple logging is simple, but complicated logging is still possible. "Simple" logging means that you can log to the screen (i.e. console/stdout) or to a file, and that you can easily ...
unknown
codeparrot/codeparrot-clean
import os from tempfile import mkdtemp from shutil import rmtree from nipype.testing import assert_equal, assert_true import nipype.pipeline.engine as pe from nipype.interfaces.utility import Function def mytestFunction(insum=0): ''' Run a multiprocessing job and spawn child processes. ''' # need to ...
unknown
codeparrot/codeparrot-clean
{ "name": "angular.dev", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "angular.dev", "version": "0.0.0", "dependencies": { "@angular/common": "^21.1.0-next", "@angular/compiler": "^21.1.0-next", "@angular/core": "^21.1.0-...
json
github
https://github.com/angular/angular
adev/src/content/tutorials/first-app/common/package-lock.json
/* * 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-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBeanTests.java
""" This code was generated by Codezu. Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. """ from mozurestsdk.mozuclient import default as default_client from mozurestsdk.mozuurl import MozuUrl; from mozurestsdk.urllocation import UrlLocation from mozurestsdk.a...
unknown
codeparrot/codeparrot-clean
{% extends "three.html" %} {% block content %}{{ block.super }} two{% endblock %}
html
github
https://github.com/django/django
tests/template_tests/recursive_templates/fs/two.html
#!/usr/bin/python # -*- coding: utf-8 -*- DOCUMENTATION = ''' --- module: hipchat version_added: "1.2" short_description: Send a message to hipchat description: - Send a message to hipchat options: token: description: - API token. required: true room: description: - ID or name of the roo...
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines.jdk9 import kotlinx.coroutines.* import kotlinx.coroutines.flow.* import kotlinx.coroutines.reactive.asFlow import kotlinx.coroutines.reactive.asPublisher as asReactivePublisher import kotlinx.coroutines.reactive.collect import kotlinx.coroutines.channels.* import org.reactivestreams.* impor...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
reactive/kotlinx-coroutines-jdk9/src/ReactiveFlow.kt
# # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy.misc.doccer import inherit_docstring_from from scipy import optimize from scipy import integrate impor...
unknown
codeparrot/codeparrot-clean
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/api_fastapi/core_api/datamodels/variables.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # # Example program using irc.client for SSL connections. # # This program is free without restrictions; do anything you like with # it. # # Jason R. Coombs <jaraco@jaraco.com> import sys import ssl import argparse import itertools import irc.client target = None "The nick or channel to which ...
unknown
codeparrot/codeparrot-clean
from urllib2 import urlopen import os from cthulhubot.views import create_job_assignment from django.conf import settings from cthulhubot.models import Job, BuildComputer, ProjectClient from django.utils.simplejson import dumps from tests.helpers import BuildmasterTestCase class TestMasterApi(BuildmasterTestCase): ...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
unknown
codeparrot/codeparrot-clean
<?php // autoload_psr4.php @generated by Composer $vendorDir = dirname(__DIR__); $baseDir = dirname(dirname($vendorDir)); return array( 'Acme\\Fruit\\' => array($baseDir . '/src-fruit'), 'Acme\\Cake\\' => array($baseDir . '/src-cake', $baseDir . '/lib-cake'), );
php
github
https://github.com/composer/composer
tests/Composer/Test/Autoload/Fixtures/autoload_psr4_2.php
#!/usr/bin/env python # Bzrflag # Copyright 2008-2011 Brigham Young University # # This file is part of Bzrflag. # # Bzrflag 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 ...
unknown
codeparrot/codeparrot-clean
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl --> # curl client writers Client writers is a design in the internals of libcurl, not visible in its public API. They were started in curl v8.5.0. This document describes the concepts, its high level implementation and the mot...
unknown
github
https://github.com/curl/curl
docs/internals/CLIENT-WRITERS.md
# -*- coding: utf-8 -*- """ *************************************************************************** dlg_field_properties.py --------------------- Date : April 2012 Copyright : (C) 2012 by Giuseppe Sucameli Email : brush dot tyler at gmail dot com ******...
unknown
codeparrot/codeparrot-clean
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Processing of metarelate metOcean content to provide Iris encodings of metOcean mapping translations. """ from datetime i...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 """Tasks.""" import glob import os import shutil import subprocess import sys from shlex import quote from segzify import Segzify tasks = {} def run(command: str, capture_output=False, text=None) -> subprocess.CompletedProcess: """Run command.""" command = command.strip() print("+ ...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/qcom,a7pll.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm A7 PLL clock maintainers: - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> description: The A7 PLL on ...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/qcom,a7pll.yaml
// Code generated by "stringer -type ConfigChangeMode"; DO NOT EDIT. package cloud import "strconv" func _() { // An "invalid array index" compiler error signifies that the constant values have changed. // Re-run the stringer command to generate them again. var x [1]struct{} _ = x[ConfigMigrationIn-8600] _ = x[...
go
github
https://github.com/hashicorp/terraform
internal/cloud/configchangemode_string.go
import neat def eval_mono_image(genome, config, width, height): net = neat.nn.FeedForwardNetwork.create(genome, config) image = [] for r in range(height): y = -2.0 + 4.0 * r / (height - 1) row = [] for c in range(width): x = -2.0 + 4.0 * c / (width - 1) outpu...
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/metrics2/MetricsTag.java
#!/bin/sh test_description='test handling of bogus index entries' . ./test-lib.sh test_expect_success 'create tree with null sha1' ' tree=$(printf "160000 commit $ZERO_OID\\tbroken\\n" | git mktree) ' test_expect_success 'read-tree refuses to read null sha1' ' test_must_fail git read-tree $tree ' test_expect_suc...
unknown
github
https://github.com/git/git
t/t1601-index-bogus.sh
# frozen_string_literal: true module ActiveRecord module ConnectionAdapters class StatementPool # :nodoc: include Enumerable DEFAULT_STATEMENT_LIMIT = 1000 def initialize(statement_limit = nil) @cache = Hash.new { |h, pid| h[pid] = {} } @statement_limit = statement_limit || DE...
ruby
github
https://github.com/rails/rails
activerecord/lib/active_record/connection_adapters/statement_pool.rb
rfr: author_id: 1 name: "Ruby for Rails" format: "ebook"
unknown
github
https://github.com/rails/rails
activerecord/test/fixtures/encrypted_book_that_ignores_cases.yml
Config Component ================ The Config component helps find, load, combine, autofill and validate configuration values of any kind, whatever their source may be (YAML, XML, INI files, or for instance a database). Resources --------- * [Documentation](https://symfony.com/doc/current/components/config.html) * ...
unknown
github
https://github.com/symfony/symfony
src/Symfony/Component/Config/README.md
'use strict'; const { SecureContext, createSecureContext, translatePeerCertificate } = require('internal/tls/common'); module.exports = { SecureContext, createSecureContext, translatePeerCertificate, }; process.emitWarning('The _tls_common module is deprecated. Use `node:tls` instead.', 'Depr...
javascript
github
https://github.com/nodejs/node
lib/_tls_common.js
#!/usr/bin/env python # Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Main program for testing the infrastructure.""" __author__ = "Guido van Rossum <guido@python.org>" # Support imports (need to be imported first) from . import support # Python imports import ...
unknown
codeparrot/codeparrot-clean
""" Freeing up space for new observations by deleting old files. """ import ctypes import os import platform import sys import shutil import datetime import ephem from RMS.CaptureDuration import captureDuration def availableSpace(dirname): """ Returns the number of free bytes on the drive that p is on. ...
unknown
codeparrot/codeparrot-clean
import logging import re import sys import time import warnings from contextlib import contextmanager from functools import wraps from unittest import skipIf, skipUnless from xml.dom.minidom import Node, parseString from django.apps import apps from django.conf import UserSettingsHolder, settings from django.core impo...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Ken Pepple # # 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 # #...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # __version__ = '0.11.2803' import socket import re import urllib import urllib2 from optparse import OptionParser import hashlib import os import sys import random import paramiko from paramiko import SSHClient from time import sleep from cm_api.api_client import ApiResource, ApiException from...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import from __future__ import print_function from keras.datasets import mnist from keras.models import Sequential from keras.layers.core import Dense, Activation from keras.utils import np_utils from keras.wrappers.scikit_learn import * import numpy as np batch_size = 128 nb_epoch = 1 ...
unknown
codeparrot/codeparrot-clean
from test.test_support import run_unittest, verbose, TestSkipped import unittest import locale import sys import codecs enUS_locale = None def get_enUS_locale(): global enUS_locale if sys.platform == 'darwin': raise TestSkipped("Locale support on MacOSX is minimal") if sys.platform.startswith("win...
unknown
codeparrot/codeparrot-clean
export interface StringChange { start: number end: number replacement: string } /** * Apply the changes to the string such that a change in the length * of the string does not break the indexes of the subsequent changes. */ export function spliceChangesIntoString(str: string, changes: StringChange[]) { // I...
typescript
github
https://github.com/tailwindlabs/tailwindcss
packages/@tailwindcss-upgrade/src/utils/splice-changes-into-string.ts
# -*- coding: utf-8 -*- from nose import SkipTest from nose.tools import * import networkx as nx from networkx.algorithms.bipartite import spectral_bipartivity as sb # Examples from Figure 1 # E. Estrada and J. A. Rodríguez-Velázquez, "Spectral measures of # bipartivity in complex networks", PhysRev E 72, 046105 (2005...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/python # Copyright (c) 2009 Marshall Vandegrift # # 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
<?php namespace Illuminate\Queue\Connectors; use Aws\Sqs\SqsClient; use Illuminate\Queue\SqsQueue; use Illuminate\Support\Arr; class SqsConnector implements ConnectorInterface { /** * Establish a queue connection. * * @param array $config * @return \Illuminate\Contracts\Queue\Queue */ ...
php
github
https://github.com/laravel/framework
src/Illuminate/Queue/Connectors/SqsConnector.php
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package format import ( "strings" "github.com/mitchellh/colorstring" wordwrap "github.com/mitchellh/go-wordwrap" ) // HorizontalRule returns a newline character followed by a number of // horizontal line characters to fill the given width. // ...
go
github
https://github.com/hashicorp/terraform
internal/command/format/trivia.go
# -*- coding: utf-8 -*- """ werkzeug.utils ~~~~~~~~~~~~~~ This module implements various utilities for WSGI applications. Most of them are used by the request and response wrappers but especially for middleware development it makes sense to use them without the wrappers. :copyright: (c) 2014 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Encoding: utf-8 # ----------------------------------------------------------------------------- # Project : OKF - Spending Stories # ----------------------------------------------------------------------------- # Author : Edouard Richard <edou4rd@gmail.com> # ---...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # phpMyAdmin documentation build configuration file, created by # sphinx-quickstart on Wed Sep 26 14:04:48 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
unknown
codeparrot/codeparrot-clean
"""Use the HTMLParser library to parse HTML files that aren't too bad.""" __all__ = [ 'HTMLParserTreeBuilder', ] from HTMLParser import HTMLParser try: from HTMLParser import HTMLParseError except ImportError, e: # HTMLParseError is removed in Python 3.5. Since it can never be # thrown in 3.5, we...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.core.exceptions import FieldError from django.test import TestCase from django.utils import six from .models import (SelfRefer, Tag, TagCollection, Entry, SelfReferChild, SelfReferChildSibling, Worksheet, RegressionModelSplit) class M2MRegressionTests(TestCase)...
unknown
codeparrot/codeparrot-clean
/* * "git rm" builtin command * * Copyright (C) Linus Torvalds 2006 */ #define USE_THE_REPOSITORY_VARIABLE #include "builtin.h" #include "advice.h" #include "config.h" #include "environment.h" #include "lockfile.h" #include "dir.h" #include "gettext.h" #include "hash.h" #include "tree-walk.h" #include "object-nam...
c
github
https://github.com/git/git
builtin/rm.c
test_kind: js_test selector: roots: - jstests/sharding/**/*.js exclude_files: - jstests/sharding/**/libs/**/*.js # Expects hint(_id) to yield an index scan instead of a table scan. - jstests/sharding/shard2.js # Expects to use the SBE plan cache - jstests/sharding/invalidate_plan_cache_entr...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/suites/sharding_clustered_collections.yml
from xml.etree import ElementTree as ET class GrAFtree: def __init__(self,f): self.textd = {} self.edged = {} self.meaningd = {} self.edgeclosured = {} self.f = f try: self.tree = ET.parse(f) except IOError: self.tree = None return self.root = self.tree.getroot() self.anchors = self.root.f...
unknown
codeparrot/codeparrot-clean
#!/usr/local/bin/python #-*- coding: UTF-8 -*- # subwork __author__ ="tommy (bychyahoo@gamil.com)" __date__ ="2009-01-06 16:33" __copyright__="Copyright 2009 tudou, Inc" __license__ ="Td, Inc" __version__ ="0.1" import os import time import signal import tempfile import traceback import subprocess __all__ = ...
unknown
codeparrot/codeparrot-clean
from sipTransport import SIPTransport from udpSIPTransportConnection import UDPSIPTransportConnection from udpSIPTwistedProtocol import UDPSIPTwistedProtocol class UDPSIPTransport(SIPTransport): def __init__(self, bind_address, bind_port): super(UDPSIPTransport, self).__init__(bind_address, bind_port) ...
unknown
codeparrot/codeparrot-clean
-- -- SHA1 message digest -- SELECT digest('', 'sha1'); SELECT digest('a', 'sha1'); SELECT digest('abc', 'sha1'); SELECT digest('message digest', 'sha1'); SELECT digest('abcdefghijklmnopqrstuvwxyz', 'sha1'); SELECT digest('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789', 'sha1'); SELECT digest('1234567...
sql
github
https://github.com/postgres/postgres
contrib/pgcrypto/sql/sha1.sql
minor_changes: - ansible-test - Support automatic loading of test collections in core integration tests.
unknown
github
https://github.com/ansible/ansible
changelogs/fragments/ansible-test-auto-collection-loading.yml
toc: - file: index.md - file: plugin-management.md children: - file: installation.md - file: plugin-management-custom-url.md - file: installing-multiple-plugins.md - file: mandatory-plugins.md - file: listing-removing-updating.md - file: _other_command_line_parameters.md ...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch-plugins/toc.yml
imports: - { resource: "../config/default.yml" } framework: uid: default_uuid_version: 7 time_based_uuid_version: 7
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Uid/config_enabled.yml
from __future__ import absolute_import from django.http import Http404 from django.shortcuts import get_object_or_404, get_list_or_404 from django.test import TestCase from .models import Author, Article class GetObjectOr404Tests(TestCase): def test_get_object_or_404(self): a1 = Author.objects.create(nam...
unknown
codeparrot/codeparrot-clean
# Given an encoded string, return it's decoded string. # # The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated # exactly k times. Note that k is guaranteed to be a positive integer. # # You may assume that the input string is always valid; No extra white spaces...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** QgisAlgorithmProvider.py --------------------- Date : December 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***************...
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/. DEFAULT_TIMEOUT = 10 # seconds LONG_TIMEOUT = 60 # seconds import os import mozinfo from wptmanifest.parser import ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2016 Synology Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
unknown
codeparrot/codeparrot-clean