code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
""" Customisable progressbar decorator for iterators. Includes a default (x)range iterator printing to stderr. Usage: >>> from tqdm import trange[, tqdm] >>> for i in trange(10): #same as: for i in tqdm(xrange(10)) ... ... """ from __future__ import absolute_import # integer division / : float, // : int from ...
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 applicable ...
unknown
codeparrot/codeparrot-clean
@SuppressWarnings("JavaModuleNaming") module kotlinx.coroutines.jdk8 { }
java
github
https://github.com/Kotlin/kotlinx.coroutines
integration/kotlinx-coroutines-jdk8/src/module-info.java
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENSE...
unknown
codeparrot/codeparrot-clean
def flip_bbox(bbox, size, y_flip=False, x_flip=False): """Flip bounding boxes accordingly. Args: bbox (~numpy.ndarray): See the table below. size (tuple): A tuple of length 2. The height and the width of the image before resized. y_flip (bool): Flip bounding box according to...
unknown
codeparrot/codeparrot-clean
//===--- FunctionPassContext.swift ----------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
swift
github
https://github.com/apple/swift
SwiftCompilerSources/Sources/Optimizer/PassManager/FunctionPassContext.swift
#ifndef RUBY_INTERNAL_ENCODING_CTYPE_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_INTERNAL_ENCODING_CTYPE_H /** * @file * @author Ruby developers <ruby-core@ruby-lang.org> * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to ...
c
github
https://github.com/ruby/ruby
include/ruby/internal/encoding/ctype.h
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, 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 progra...
unknown
codeparrot/codeparrot-clean
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2010 OpenStack LLC. # All Rights Reserved. # # 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
''' The Discretized model, or the sun model. ''' from numpy import * from scipy import sparse as sps import pdb __all__=['DiscModel','load_discmodel'] class DiscModel(object): ''' Discrete model class. Construct: DiscModel((Elist_neg,Elist_pos),(Tlist_neg,Tlist_pos),z=1.) z could be one...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Database\Query\Grammars; use Illuminate\Database\Query\Builder; use Illuminate\Support\Arr; use Illuminate\Support\Collection; use Illuminate\Support\Str; use InvalidArgumentException; class SQLiteGrammar extends Grammar { /** * All of the available clause operators. * *...
php
github
https://github.com/laravel/framework
src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php
package gin import ( "net/http" "net/http/httptest" "testing" "github.com/stretchr/testify/assert" ) // TestContextFileSimple tests the Context.File() method with a simple case func TestContextFileSimple(t *testing.T) { // Test serving an existing file testFile := "testdata/test_file.txt" w := httptest.NewRec...
go
github
https://github.com/gin-gonic/gin
context_file_test.go
annotation class Anno(val value: KClass<*>) fun test() { class LocalClass {} @Anno(LocalClass::class) fun loc<caret>al() {} local() }
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/testData/annotations/annotationsOnDeclaration/direct/onLocalFunction.kt
""" Helper classes for parsers. """ from __future__ import unicode_literals import datetime import decimal import json import uuid from django.db.models.query import QuerySet from django.utils import six, timezone from django.utils.encoding import force_text from django.utils.functional import Promise from rest_fram...
unknown
codeparrot/codeparrot-clean
/* Copyright 2019 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 agree...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/kernels/collective_nccl_broadcaster.h
import json import logging from django.core.management.base import BaseCommand from django.conf import settings from django.utils import timezone from queue.models import Submission from queue.consumer import post_failure_to_lms, post_grade_to_lms, _http_post # TODO: Wrap the _http_post which is used to deliver to gr...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c)2012 Rackspace US, 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.ap...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/serialization/ByteBufferSerializer.java
/* * Copyright 2020 Google LLC * * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file or at * https://developers.google.com/open-source/licenses/bsd */ #ifndef TREE_H #define TREE_H /* tree_node is a generic binary search tree. */ struct tree_node { void *key; s...
c
github
https://github.com/git/git
reftable/tree.h
# (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # CAUTION: There are two implementations of the collection loader. # They must be kept functionally identical, although their implementations may differ. # # 1) The controller implementation...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2011 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. # memcheck_analyze.py ''' Given a valgrind XML file, parses errors and uniques them.''' import gdb_helper from collections impor...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context/src/main/java/org/springframework/context/config/PropertyPlaceholderBeanDefinitionParser.java
"""Subset of inspect module from upstream python We use this instead of upstream because upstream inspect is slow to import, and significanly contributes to numpy import times. Importing this copy has almost no overhead. """ import types __all__ = ['getargspec', 'formatargspec'] # ----------------------------------...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ This module implements a StringSubstitution class. """ import re class StringSubstitution(object): """ This class supplies methods for performing generalized string substitution using rules. """ @staticmethod def applySingleRule(rule, expression, restrict...
unknown
codeparrot/codeparrot-clean
// // This is an automatically generated file. // Do not edit. // const unsigned short expTable[] = { 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0...
c
github
https://github.com/opencv/opencv
3rdparty/openexr/IlmImf/b44ExpLogTable.h
# 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 distri...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-09-09 15:44 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0029_unicode_slugfield_dj19'), ('peopl...
unknown
codeparrot/codeparrot-clean
from carbon.protocols import MetricReceiver from unittest import TestCase from mock import Mock, patch from carbon.cache import _MetricCache import os.path import pickle class TestMetricReceiversHandler(TestCase): def test_build(self): expected_plugins = sorted(['line', 'udp', 'pickle', 'amqp', 'protobuf']) ...
unknown
codeparrot/codeparrot-clean
# Owner(s): ["oncall: jit"] import sys sys.argv.append("--jit-executor=profiling") from test_jit import * # noqa: F403 if __name__ == '__main__': if sys.version_info < (3, 14): run_tests()
python
github
https://github.com/pytorch/pytorch
test/test_jit_profiling.py
#!/usr/bin/python # pylint: disable= """@package ImageInstaller Installs RBF Image Board Installer """ import os import sys import subprocess from rbfutils import RbfUtils class BoardInstaller(object): """Board Installer""" BOARDS_DIR = "boards.d" SPECIAL_BOARDS = ['odroidc1', 'rpi2', 'lamobor1'] MLO_...
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/MachO/FunctionStarts.hpp
/* contrib/xml2/xml2--1.1.sql */ -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION xml2" to load this file. \quit --SQL for XML parser -- deprecated old name for xml_is_well_formed CREATE FUNCTION xml_valid(text) RETURNS bool AS 'xml_is_well_formed' LANGUAGE INTER...
sql
github
https://github.com/postgres/postgres
contrib/xml2/xml2--1.1.sql
# -*- coding: utf-8 -*- # Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the r...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import threading import mock from mopidy import backend as backend_api import spotify from mopidy_spotify import backend, library, playback, playlists def get_backend(config, session_mock=None): obj = backend.SpotifyBackend(config=config, audio=None) if session_mock...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import os from transifex.languages.models import Language from transifex.resources.models import Resource from transifex.resources.formats.joomla import JoomlaINIHandler from transifex.resources.formats.compilation import Mode from transifex.resources.tests.lib.base import FormatsBaseTestCase f...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """Classes for storing and manipulating a phylogenetic tree. These trees can be either strictly binary, or have polytomies (multiple children to a parent node). Trees consist of Nodes (or branches) that connect two nodes. The Tree can be created only from a newick formatted string read either fr...
unknown
codeparrot/codeparrot-clean
## ## Representation for AS events ## import misopy import misopy.json_utils as json_utils import misopy.pickle_utils as pickle_utils import misopy.Gene as Gene import time import csv import os class Event(object): """ Representation of an alternative splicing event. """ def __init__(self, label, pcr_p...
unknown
codeparrot/codeparrot-clean
""" Tests related to authenticating API requests """ import mock from nose.tools import * # flake8: noqa from framework.auth import cas from website.util import api_v2_url from website.addons.twofactor.tests import _valid_code from tests.base import ApiTestCase from tests.factories import AuthUserFactory, ProjectF...
unknown
codeparrot/codeparrot-clean
# easy_install boto # You will also need: # - A .pem keyfile generated using the Amazon web interface to launch new instances # - The secret and access keys created from the # The only pre-reqs are having created a keypair (.pem file) # via the amazon web interface and knowing the AWS key and secret # # Usage: # ex...
unknown
codeparrot/codeparrot-clean
import numpy as np from . import dtypes, nputils def dask_rolling_wrapper(moving_func, a, window, min_count=None, axis=-1): """Wrapper to apply bottleneck moving window funcs on dask arrays """ import dask.array as da dtype, fill_value = dtypes.maybe_promote(a.dtype) a = a.astype(dtype) # inp...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: UTF-8 -*- # (c) 2020 Mike Lewis import os import time import unittest import foursquare if ( "CLIENT_ID" in os.environ and "CLIENT_SECRET" in os.environ and "ACCESS_TOKEN" in os.environ ): CLIENT_ID = os.environ["CLIENT_ID"] CLIENT_SECRET = os.environ["CLIENT_S...
unknown
codeparrot/codeparrot-clean
import re import numpy as np import pytest from pandas import ( Categorical, CategoricalDtype, CategoricalIndex, DataFrame, DateOffset, DatetimeIndex, Index, MultiIndex, Series, Timestamp, concat, date_range, get_dummies, period_range, ) import pandas._testing a...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/frame/indexing/test_getitem.py
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RRcppprogress(RPackage): """Allows to display a progress bar in the R console for long runn...
unknown
codeparrot/codeparrot-clean
# IMPORTANT: the same tests are run from "test_xml_etree_c" in order # to ensure consistency between the C implementation and the Python # implementation. # # For this purpose, the module-level "ET" symbol is temporarily # monkey-patched when running the "test_xml_etree_c" test suite. import html import io import oper...
unknown
codeparrot/codeparrot-clean
""" Classes allowing "generic" relations through ContentType and object-id fields. """ from django import oldforms from django.core.exceptions import ObjectDoesNotExist from django.db import connection from django.db.models import signals from django.db.models.fields.related import RelatedField, Field, ManyToManyRel f...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2011 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
java
github
https://github.com/google/guava
android/guava-tests/test/com/google/common/collect/TreeRangeSetTest.java
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Softwa...
unknown
codeparrot/codeparrot-clean
use std::marker::PhantomData; use std::num::NonZero; use decoder::LazyDecoder; pub(crate) use decoder::{CrateMetadata, CrateNumMap, MetadataBlob, TargetModifiers}; use def_path_hash_map::DefPathHashMapRef; use encoder::EncodeContext; pub use encoder::{EncodedMetadata, encode_metadata, rendered_const}; pub(crate) use p...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_metadata/src/rmeta/mod.rs
// Copyright The Prometheus Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
go
github
https://github.com/prometheus/prometheus
util/testutil/roundtrip.go
# frozen_string_literal: true require "cases/helper" class Mixin < ActiveRecord::Base end class TouchTest < ActiveRecord::TestCase fixtures :mixins setup do travel_to Time.now end def test_update stamped = Mixin.new assert_nil stamped.updated_at assert_nil stamped.created_at stamped.sa...
ruby
github
https://github.com/rails/rails
activerecord/test/cases/mixin_test.rb
__author__ = "John Kirkham <kirkhamj@janelia.hhmi.org>" __date__ = "$Jul 28, 2014 11:50:37 EDT$" import nanshe.util.xglob from builtins import range as irange class TestXGlob(object): num_files = 10 def setup(self): import tempfile self.temp_dir = tempfile.mkdtemp() self.temp_files...
unknown
codeparrot/codeparrot-clean
<!DOCTYPE html> <html lang="en"> <head> <title>DataStreamSerializer Protocol Reference</title> <link rel="stylesheet" type="text/css" href="../css/jazzy.css" /> <link rel="stylesheet" type="text/css" href="../css/highlight.css" /> <meta charset="utf-8"> <script src="../js/jquery.min.js" defer></sc...
html
github
https://github.com/Alamofire/Alamofire
docs/Protocols/DataStreamSerializer.html
#!/usr/bin/env python # # Copyright (C) 2009 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 ...
unknown
codeparrot/codeparrot-clean
//===--- CodeCompletionContext.cpp ----------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2022 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE....
cpp
github
https://github.com/apple/swift
lib/IDE/CodeCompletionContext.cpp
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2016 CERN. # # Zenodo 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 v...
unknown
codeparrot/codeparrot-clean
""" Test split modulestore w/o using any django stuff. """ import datetime from importlib import import_module from path import path import random import re import unittest import uuid from contracts import contract from nose.plugins.attrib import attr from xblock.fields import Reference, ReferenceList, Reference...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from flask import Blueprint from flask import render_template from flask import abort from jinja2 import TemplateNotFound from flask import request from lib.settings import Settings from flask.ext.login import login_required from lib.gmail import Gmail bp_email = Blueprint('bp_email', __name__...
unknown
codeparrot/codeparrot-clean
#encoding=utf-8 """ 26. Invalid models This example exists purely to point out errors in models. """ from django.db import connection, models class FieldErrors(models.Model): charfield = models.CharField() charfield2 = models.CharField(max_length=-1) charfield3 = models.CharField(max_length="bad") de...
unknown
codeparrot/codeparrot-clean
# pylint: disable=W0614,W0401,W0611 import numpy as np from pandas.core.algorithms import factorize, match, unique, value_counts from pandas.core.common import isnull, notnull from pandas.core.categorical import Categorical from pandas.core.groupby import Grouper from pandas.core.format import set_eng_float_format fr...
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...
unknown
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/site/markdown/release/3.2.1/CHANGELOG.3.2.1.md
""" addons.xml generator """ import os import md5 class Generator: """ Generates a new addons.xml file from each addons addon.xml file and a new addons.xml.md5 hash file. Must be run from the root of the checked-out repo. Only handles single depth folder structure. """ def __init__...
unknown
codeparrot/codeparrot-clean
// Copyright 2018 The Abseil 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 by applicable law or agr...
c
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/absl/container/internal/node_slot_policy.h
# Copyright 2015 Abhijit Menon-Sen <ams@2ndQuadrant.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) any ...
unknown
codeparrot/codeparrot-clean
"""Compare the speed of exact one-norm calculation vs. its estimation. """ from __future__ import division, print_function, absolute_import import numpy as np try: import scipy.sparse.linalg import scipy.sparse except ImportError: pass from .common import Benchmark class BenchmarkOneNormEst(Benchmark): ...
unknown
codeparrot/codeparrot-clean
## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio 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...
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 applica...
unknown
codeparrot/codeparrot-clean
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
c
github
https://github.com/curl/curl
docs/examples/getinfo.c
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # Copyright 2016 Eddie Antonio Santos <easantos@ualberta.ca> # # 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/licens...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2016 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """v8_inspect presubmit script See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about ...
unknown
codeparrot/codeparrot-clean
<?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\Bundle\SecurityBundle\Tests\Fixtures; use Symfony\Component\Htt...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/SecurityBundle/Tests/Fixtures/DummyAuthenticator.php
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012, Nachi Ueno, NTT MCL, 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://ww...
unknown
codeparrot/codeparrot-clean
""" Open edX Documentation Builder Ties into Sphinx to generate files at the specified location(s) """ from __future__ import print_function import sys from paver.easy import cmdopts, needs, sh, task from .utils.timer import timed DOC_PATHS = { "dev": "docs/en_us/developers", "author": "docs/en_us/course_au...
unknown
codeparrot/codeparrot-clean
#!/bin/sh if [ "x${enable_prof}" = "x1" ] ; then export MALLOC_CONF="prof:true,prof_active:false,prof_gdump:true" fi
unknown
github
https://github.com/redis/redis
deps/jemalloc/test/unit/prof_gdump.sh
// Code generated by golex. DO NOT EDIT. // Copyright 2017 The Prometheus 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 // // Unle...
go
github
https://github.com/prometheus/prometheus
model/textparse/promlex.l.go
#------------------------------------------------------------------------------ # Copyright (C) 2009 Richard Lincoln # # 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 Free # Software Foundation; version 2 dated June...
unknown
codeparrot/codeparrot-clean
/* * Check that we don't assert on a duplicate static relocation added by lld * against _Z6myfuncv. The same address has a dynamic relocation against it. * * This test uses the clang driver + lld and will only succeed on Linux systems * with libc available. * REQUIRES: system-linux * * RUN: %clangxx %cxxflags -...
cpp
github
https://github.com/llvm/llvm-project
bolt/test/R_ABS.pic.lld.cpp
"""Low level HTTP server.""" import asyncio from .helpers import TimeService from .web_protocol import RequestHandler from .web_request import BaseRequest __all__ = ('Server',) class Server: def __init__(self, handler, *, request_factory=None, loop=None, **kwargs): if loop is None: loop = as...
unknown
codeparrot/codeparrot-clean
# These are versions of the functions in django.utils.translation.trans_real # that don't actually do anything. This is purely for performance, so that # settings.USE_I18N = False can use this module rather than trans_real.py. import warnings from django.conf import settings from django.utils.encoding import force_uni...
unknown
codeparrot/codeparrot-clean
#!/bin/bash set -eux -o pipefail source "${BINARY_ENV_FILE:-/c/w/env}" mkdir -p "$PYTORCH_FINAL_PACKAGE_DIR" if [[ "$OS" != "windows-arm64" ]]; then export CUDA_VERSION="${DESIRED_CUDA/cu/}" export USE_SCCACHE=1 export SCCACHE_BUCKET=ossci-compiler-cache export SCCACHE_IGNORE_SERVER_IO_ERROR=1 exp...
unknown
github
https://github.com/pytorch/pytorch
.circleci/scripts/binary_windows_build.sh
#!/usr/bin/env python # # Copyright (C) 2010-2011 Hideo Hattori # Copyright (C) 2011-2013 Hideo Hattori, Steven Myint # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, in...
unknown
codeparrot/codeparrot-clean
from decimal import Decimal as D class OfferApplications(object): """ A collection of offer applications and the discounts that they give. Each offer application is stored as a dict which has fields for: * The offer that led to the successful application * The result instance * The number of ...
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 from frappe import _ def get(): return { _("Application of Funds (Assets)"): { _("Current Assets"): { _("Accounts Receivabl...
unknown
codeparrot/codeparrot-clean
"Test scrolledlist, coverage 38%." from idlelib.scrolledlist import ScrolledList import unittest from test.support import requires requires('gui') from tkinter import Tk class ScrolledListTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.root = Tk() @classmethod def tearDownClas...
python
github
https://github.com/python/cpython
Lib/idlelib/idle_test/test_scrolledlist.py
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2012, 2013 CERN. ## ## Invenio 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 opt...
unknown
codeparrot/codeparrot-clean
"""Config flow for 1-Wire component.""" from __future__ import annotations from typing import Any import voluptuous as vol from homeassistant.config_entries import ConfigFlow from homeassistant.const import CONF_HOST, CONF_PORT, CONF_TYPE from homeassistant.core import HomeAssistant from homeassistant.data_entry_flo...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
unknown
codeparrot/codeparrot-clean
import os from distutils.core import setup def read_file(filename): """Read a file into a string""" path = os.path.abspath(os.path.dirname(__file__)) filepath = os.path.join(path, filename) try: return open(filepath).read() except IOError: return '' # Use the docstring of the __ini...
unknown
codeparrot/codeparrot-clean
#/**************************************************************************** #* * #* OpenNI 1.x Alpha * #* Copyright (C) 2012 PrimeSense Ltd. * #* ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ /*************************************************************************** SGDiagramDownloader A QGIS plugin A tool for QGIS that will download SG (South African Surveyor General) diagrams. ------------------- begin ...
unknown
codeparrot/codeparrot-clean
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes @webnotes.whitelist() def get_items(price_list, sales_or_purchase, item=None, item_group=None): condition = "" args = {"price_list...
unknown
codeparrot/codeparrot-clean
import codecs import datetime import os import shutil import tempfile import unittest from io import StringIO from unittest import mock from admin_scripts.tests import AdminScriptTestCase from django.conf import settings from django.contrib.staticfiles import storage from django.contrib.staticfiles.management.command...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h
from unittest import TestCase import simplejson.encoder CASES = [ (u'/\\"\ucafe\ubabe\uab98\ufcde\ubcda\uef4a\x08\x0c\n\r\t`1~!@#$%^&*()_+-=[]{}|;:\',./<>?', '"/\\\\\\"\\ucafe\\ubabe\\uab98\\ufcde\\ubcda\\uef4a\\b\\f\\n\\r\\t`1~!@#$%^&*()_+-=[]{}|;:\',./<>?"'), (u'\u0123\u4567\u89ab\ucdef\uabcd\uef4a', '"\\u0...
unknown
codeparrot/codeparrot-clean
pr: 139777 summary: Always do bulk scoring for rescoring when possible area: Vector Search type: enhancement issues: []
unknown
github
https://github.com/elastic/elasticsearch
docs/changelog/139777.yaml
/* Copyright 2002 Daryle Walker Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_IO_FWD_HPP #define BOOST_IO_FWD_HPP #include <iosfwd> namespace boost { namespace io { class ios_flags_saver; class ios_precision_saver; class ios_width_saver; class ios...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/io_fwd.hpp
# -*- coding: utf-8 -*- """ *************************************************************************** SelectByExpression.py --------------------- Date : July 2014 Copyright : (C) 2014 by Michaël Douchin ***********************************************************************...
unknown
codeparrot/codeparrot-clean
from setuptools import setup setup(name='remind', version='0.17.0', description='Remind Python library', long_description=open('README.rst').read(), author='Jochen Sprickerhof', author_email='remind@jochen.sprickerhof.de', license='GPLv3+', url='https://github.com/jspricke/pyt...
unknown
codeparrot/codeparrot-clean
#| This file is part of pyCAF. | #| | #| pyCAF is free software: you can redistribute it and/or modify | #| it under the terms of the GNU General Public License as published by | #| t...
unknown
codeparrot/codeparrot-clean
pub(crate) mod page_entry; pub use page_entry::create_page_ssr_entry_module;
rust
github
https://github.com/vercel/next.js
crates/next-core/src/next_pages/mod.rs