code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# # The MIT License (MIT) # # Copyright (c) 2015 Philippe Faist # # 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 rights # to use, copy, ...
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/clients/consumer/internals/metrics/KafkaShareConsumerMetrics.java
from __future__ import unicode_literals from django.contrib.gis.db.models import fields from django.core.exceptions import ImproperlyConfigured from django.db import connection, migrations, models from django.db.migrations.migration import Migration from django.db.migrations.state import ProjectState from django.test ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is subject to the terms and conditions defined in # file 'LICENSE.md', which is part of this source code package. # from kubernetes_py.models.v1.JobCondition import JobCondition from kubernetes_py.utils import is_valid_list, is_valid_string class JobStatus(...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/stable/config # -- Path setup ------------------------------------------------------------...
unknown
codeparrot/codeparrot-clean
from django.db import IntegrityError from rest_framework import serializers as ser from rest_framework import exceptions from website.files import exceptions as file_exceptions from api.base.serializers import IDField class DestinationSerializer(ser.Serializer): parent = ser.CharField(write_only=True) target...
unknown
codeparrot/codeparrot-clean
type Props = { children: React.ReactNode; }; export default function Container({ children }: Props) { return <div className="container mx-auto px-5">{children}</div>; }
typescript
github
https://github.com/vercel/next.js
examples/cms-enterspeed/components/container.tsx
/* * 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/aop/aspectj/autoproxy/TestAnnotation.java
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { DirectiveProfile, ElementPosition, ElementProfile, LifecycleProfile, ProfilerFrame, } from '../.....
typescript
github
https://github.com/angular/angular
devtools/projects/ng-devtools-backend/src/lib/hooks/capture.ts
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
unknown
codeparrot/codeparrot-clean
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # This is a 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 Ansible library is distributed in the hope that i...
unknown
codeparrot/codeparrot-clean
#!/bin/bash set -ex # Optionally install conda if [ -n "$ANACONDA_PYTHON_VERSION" ]; then BASE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" # @lint-ignore CONDA_FILE="Miniforge3-Linux-$(uname -m).sh" MAJOR_PYTHON_VERSION=$(echo "$ANACONDA_PYTHON_VERSION" | cut -d . -f 1) MINOR_PYT...
unknown
github
https://github.com/pytorch/pytorch
.ci/docker/common/install_conda.sh
import datetime from couchpotato.core.helpers.rss import RSS from couchpotato.core.logger import CPLog from couchpotato.core.media.movie.providers.automation.base import Automation log = CPLog(__name__) autoload = 'Kinepolis' class Kinepolis(Automation, RSS): interval = 1800 rss_url = 'http://kinepolis.be/...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ''' Local Configurations - Runs in Debug mode - Uses console backend for emails - Use Django Debug Toolbar ''' from configurations import values from .common import Common class Local(Common): # DEBUG DEBUG = values.BooleanValue(True) TEMPLATE_DEBUG = DEBUG # END DEBUG # ...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, unicode_literals import sys from functools import partial from billiard.einfo import ExceptionInfo from django.core.urlresolvers import reverse from django.http import HttpResponse from django.test.testcases import TestCase as DjangoTestCase from django.template import Templat...
unknown
codeparrot/codeparrot-clean
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> {% feed_meta %} <link type="application/atom+xml" rel="alternate" href="{{ 'feed/release.xml' | relative_url }}" title="Jekyll releases posts" /> <link rel="alternate" type="appli...
html
github
https://github.com/jekyll/jekyll
docs/_includes/top.html
import numpy as np import scipy.sparse as sp from scipy import linalg, optimize, sparse from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_equal from sklearn.util...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # 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 # "...
python
github
https://github.com/apache/airflow
dev/retag_docker_images.py
# -*- coding: utf-8 -*- from mock import patch from unittest import TestCase from datetime import date, timedelta from nose.tools import assert_equal from django.http import Http404 from django.test import RequestFactory, override_settings from fr_notices.navigation import make_preamble_nav from regulations.generato...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2015 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # ...
unknown
codeparrot/codeparrot-clean
#Funções de bitwise: #Como tivemos problemas de tipagem, utilizamos um tipo próprio para a criptografia #No caso, um array de 1s e 0s representando bits. #E, claro, tivemos que criar operadores pra agir sobre esse novo "tipo". def xor( a, b ): result = [0] * 8 for i in range( 7, -1, -1 ): result[i] = a...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
kotlin
github
https://github.com/spring-projects/spring-framework
framework-docs/src/main/kotlin/org/springframework/docs/web/webmvc/mvcconfig/mvcconfigvalidation/WebConfiguration.kt
// Copyright 2022 The etcd Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
go
github
https://github.com/etcd-io/etcd
tests/robustness/client/watch.go
# Copyright (C) 2022-present MongoDB, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the Server Side Public License, version 1, # as published by MongoDB, Inc. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without e...
python
github
https://github.com/mongodb/mongo
buildscripts/cost_model/experiment.py
# -*- coding: utf-8 -*- # # Copyright (c) 2020 SUNET # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # noti...
unknown
codeparrot/codeparrot-clean
from time import clock from math import * from Numeric import * from presto import * from miscutils import * from Statistics import * import Pgplot # Some admin variables showplots = 0 # True or false showsumplots = 0 # True or false debugout = 0 # True or false outfiledir = '/home/ransom' outfil...
unknown
codeparrot/codeparrot-clean
"""text_file provides the TextFile class, which gives an interface to text files that (optionally) takes care of stripping comments, ignoring blank lines, and joining lines with backslashes.""" __revision__ = "$Id$" import sys class TextFile: """Provides a file-like object that takes care of all the things you...
unknown
codeparrot/codeparrot-clean
require("../build-common");
javascript
github
https://github.com/webpack/webpack
examples/asset-svg-data-uri/build.js
# Illustrate parity check code using a directed graphical model # Authors: murphyk@, Drishtii@ # Based on #https://github.com/probml/pmtk3/blob/master/demos/errorCorrectingCodeDemo.m #!pip install pgmpy import pyprobml_utils as pml import pgmpy_utils as pgm from pgmpy.models import BayesianModel from pgmpy.factors.dis...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright (c) 2012 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. import os import subprocess import sys import tempfile import time script_dir = os.path.dirname(__file__) sys.path.append(os.path.join...
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 ma...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/prefetch/BlockCache.java
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
unknown
codeparrot/codeparrot-clean
# -*- 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 pytest import sys if sys.version_info < (2, ...
unknown
codeparrot/codeparrot-clean
from twitcher.utils import sanitize import logging LOGGER = logging.getLogger("TWITCHER") class OWSRegistry(object): """ OWS Service Registry is a service to register OWS services for the OWS proxy. """ def __init__(self, servicestore): self.store = servicestore def register_service(self,...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * pg_parameter_acl.c * routines to support manipulation of the pg_parameter_acl relation * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California ...
c
github
https://github.com/postgres/postgres
src/backend/catalog/pg_parameter_acl.c
#!/usr/bin/env python # Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 (FSF), e...
unknown
codeparrot/codeparrot-clean
import asposewordscloud from asposewordscloud.WordsApi import WordsApi from asposewordscloud.WordsApi import ApiException from asposewordscloud.models import RunResponse import asposestoragecloud from asposestoragecloud.StorageApi import StorageApi from asposestoragecloud.StorageApi import ResponseMessage apiKey = "X...
unknown
codeparrot/codeparrot-clean
import inspect from typing import cast def is_caller_internal(depth: int = 2) -> bool: """Return whether the caller at `depth` of this function is internal.""" try: frame = inspect.currentframe() except AttributeError: return False if frame is None: return False try: ...
python
github
https://github.com/langchain-ai/langchain
libs/core/langchain_core/_api/internal.py
//===----------------------------------------------------------------------===// // // 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/abseil/UpgradeDurationConversionsCheck.cpp
import unittest from streamlink.plugins.raiplay import RaiPlay class TestPluginRaiPlay(unittest.TestCase): def test_can_handle_url(self): # should match self.assertTrue(RaiPlay.can_handle_url("http://www.raiplay.it/dirette/rai1")) self.assertTrue(RaiPlay.can_handle_url("http://www.raiplay....
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.tests.http import io.ktor.http.* import io.ktor.utils.io.charsets.Charsets import kotlin.test.* class ContentTypeTest { @Test fun contentTypeTextPlain() { val ...
kotlin
github
https://github.com/ktorio/ktor
ktor-http/common/test/io/ktor/tests/http/ContentTypeTest.kt
#------------------------------------------------------------------------------ # Functions module # Various functions #------------------------------------------------------------------------------ import subprocess import serial #------------------------------------------------------------------------------ # Blueto...
unknown
codeparrot/codeparrot-clean
from django.db.models.manager import Manager from django.contrib.gis.db.models.query import GeoQuerySet class GeoManager(Manager): "Overrides Manager to return Geographic QuerySets." # This manager should be used for queries on related fields # so that geometry columns on Oracle and MySQL are selected ...
unknown
codeparrot/codeparrot-clean
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
unknown
codeparrot/codeparrot-clean
- name: handler block: - name: due to how handlers are implemented, this is correct as it is equivalent to an implicit block debug: - name: this is a parser error, blocks as handlers are not supported block: - name: handler in a nested block debug:
unknown
github
https://github.com/ansible/ansible
test/integration/targets/handlers/test_block_as_handler-include_import-handlers.yml
import keyword import sys import warnings import rope.base.codeanalyze import rope.base.evaluate from rope.base import pyobjects, pyobjectsdef, pynames, builtins, exceptions, worder from rope.base.codeanalyze import SourceLinesAdapter from rope.contrib import fixsyntax from rope.refactor import functionutils def code...
unknown
codeparrot/codeparrot-clean
from booty import BootyNoKernelWarning from bootloaderInfo import * class ia64BootloaderInfo(efiBootloaderInfo): def getBootloaderConfig(self, instRoot, bl, kernelList, chainList, defaultDev): config = bootloaderInfo.getBootloaderConfig(self, instRoot, ...
unknown
codeparrot/codeparrot-clean
# This test can be run stand-alone with something like: # > PYTHONPATH=. python2 openerp/tests/test_misc.py import unittest2 from ..tools import misc class test_countingstream(unittest2.TestCase): def test_empty_stream(self): s = misc.CountingStream(iter([])) self.assertEqual(s.index, -1) ...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 IBM Corp. # # 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
#!/bin/sh test_description='test for no lazy fetch with the commit-graph' . ./test-lib.sh test_expect_success 'setup: prepare a repository with a commit' ' git init with-commit && test_commit -C with-commit the-commit && oid=$(git -C with-commit rev-parse HEAD) ' test_expect_success 'setup: prepare a repository ...
unknown
github
https://github.com/git/git
t/t5330-no-lazy-fetch-with-commit-graph.sh
package swarm import ( "net/netip" "github.com/moby/moby/api/types/network" ) // Endpoint represents an endpoint. type Endpoint struct { Spec EndpointSpec `json:",omitempty"` Ports []PortConfig `json:",omitempty"` VirtualIPs []EndpointVirtualIP `json:",omitempty"` } // EndpointSpec rep...
go
github
https://github.com/moby/moby
api/types/swarm/network.go
<!--Copyright 2022 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
unknown
github
https://github.com/huggingface/transformers
docs/source/en/model_doc/chinese_clip.md
#!/usr/bin/env python3 ''' lib/schema/request.py Schema definition for request parameters. The request parameter class wraps the json parameters required in most ycmd handlers. These parameters are required for the ycmd server to even consider handling. Without them, an error response is sent during the validation st...
unknown
codeparrot/codeparrot-clean
## Input ```javascript // @validateNoSetStateInRender function Component(props) { const [x, setX] = useState(0); const aliased = setX; setX(1); aliased(2); return x; } ``` ## Error ``` Found 2 errors: Error: Cannot call setState during render Calling setState during render may trigger an infinite loop...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-unconditional-set-state-in-render.expect.md
import gtk, gobject import gourmet.convert as convert import gourmet.gglobals as gglobals from gourmet.gtk_extras.mnemonic_manager import MnemonicManager from gourmet.defaults import lang as defaults from gourmet.gtk_extras.pageable_store import PageableViewStore from nutritionLabel import NUT_LAYOUT, SEP, RECOMMENDED_...
unknown
codeparrot/codeparrot-clean
from test import TestCase class BinVectorization(TestCase): def getname(self): return "Binary quantization: verify vectorized vs scalar paths produce consistent results" def test(self): # Test with different dimensions to exercise different code paths: # - dim=1: Edge case for minimal ...
python
github
https://github.com/redis/redis
modules/vector-sets/tests/bin_vectorization.py
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Loic Blot <loic.blot@unix-experience.fr> # Sponsored by Infopro Digital. http://www.infopro-digital.com/ # Sponsored by E.T.A.I. http://www.etai.fr/ # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ impo...
unknown
codeparrot/codeparrot-clean
.bd-gutter { --bs-gutter-x: #{$bd-gutter-x}; } .bd-layout { @include media-breakpoint-up(lg) { display: grid; grid-template-areas: "sidebar main"; grid-template-columns: 1fr 5fr; gap: $grid-gutter-width; } } .bd-sidebar { grid-area: sidebar; } .bd-main { grid-area: main; @include media-...
unknown
github
https://github.com/twbs/bootstrap
site/src/scss/_layout.scss
{ "description": "tests updating an attribute that forces the overall resource to be replaced", "include_files": [], "ignore_fields": {} }
json
github
https://github.com/hashicorp/terraform
testing/equivalence-tests/tests/simple_object_replace/spec.json
2
unknown
deepmind/code_contests
/* 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 a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/kernels/data/parallel_interleave_dataset_op.h
## Input ```javascript function Component(p) { let x; const foo = () => { x = {}; }; foo(); return x; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: ['TodoAdd'], isComponent: 'TodoAdd', }; ``` ## Code ```javascript import { c as _c } from "react/compiler-runtime"; function Compon...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/declare-reassign-variable-in-closure.expect.md
test_kind: js_test selector: roots: - jstests/change_streams/**/*.js exclude_files: # Parallel Shell - we do not signal the override to end a txn when a parallel shell closes. - jstests/change_streams/only_wake_getmore_for_relevant_changes.js # TODO: SERVER-98064 Investigate split_large_event.js fa...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/suites/change_streams_multi_stmt_txn_sharded_collections_passthrough_v2.yml
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: anyauth Help: Pick any authentication method Protocols: HTTP Category: http proxy auth Added: 7.10.6 Multi: custom See-also: - proxy-anyauth - basic - digest Example: - --anyauth --user me:pwd $URL --- # `--anyau...
unknown
github
https://github.com/curl/curl
docs/cmdline-opts/anyauth.md
/* * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ config.set({ "browsers": ["MyChromeHeadless"], "customLaunchers": { "MyChromeHeadless": { base: "ChromeHeadless", flags: [ "--allow-fail...
javascript
github
https://github.com/ktorio/ktor
karma/chrome_bin.js
#!/usr/bin/env python # -*- coding: utf-8 -*- # Autentificación mínima con # sesiones # dai ugr.es Oct-13 import web from web.contrib.template import render_mako from web import form # Para poder usar sesiones con web.py web.config.debug = False urls = ( '/', 'inicio', '/login', 'login', '/logout', 'logout', ...
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines.intrinsics import kotlinx.coroutines.* import kotlinx.coroutines.internal.* import kotlin.coroutines.* import kotlin.coroutines.intrinsics.* /** * Use this function to start coroutine in a cancellable way, so that it can be cancelled * while waiting to be dispatched. * * @suppress **Thi...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/common/src/intrinsics/Cancellable.kt
"""Ensure we can parse events sent to us from the segment.io webhook integration""" from datetime import datetime import json from ddt import ddt, data, unpack from mock import sentinel from django.contrib.auth.models import User from django.test.client import RequestFactory from django.test.utils import override_se...
unknown
codeparrot/codeparrot-clean
#!/bin/python # this file contains functions for 'meta genetic algorithm', # this acts to allow settings value manipulation via command line, # making possible a simple GA of GAs under bash. # TBD from .parameterOperations import flattenParameters, expandNestedParameters def generateCommandLineArguments(parser, sett...
unknown
codeparrot/codeparrot-clean
from .utils import kwarg_decorator, last_arg_decorator from .version import version as __version__ from .version import version_info __all__ = [ '__version__', 'version_info', 'registry', 'register_model_chooser', 'register_simple_model_chooser', 'register_filter', ] class Registry(object): def __init__(s...
unknown
codeparrot/codeparrot-clean
# Added Fortran compiler support to config. Currently useful only for # try_compile call. try_run works but is untested for most of Fortran # compilers (they must define linker_exe first). # Pearu Peterson from __future__ import division, absolute_import, print_function import os, signal import warnings import sys fr...
unknown
codeparrot/codeparrot-clean
# # The Python Imaging Library. # $Id$ # # TIFF tags # # This module provides clear-text names for various well-known # TIFF tags. the TIFF codec works just fine without it. # # Copyright (c) Secret Labs AB 1999. # # See the README file for information on usage and redistribution. # ## # This module provides constant...
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 law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/lib/io/zlib_inputstream.h
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/GenericIntegerBean.java
"use strict"; expect.extend({ toBeTypeOf(received, expected) { const objType = typeof received; const pass = objType === expected; const message = pass ? () => `${this.utils.matcherHint(".not.toBeTypeOf")}\n\n` + "Expected value to not be (using typeof):\n" + ` ${this.utils.printExpected(exp...
javascript
github
https://github.com/webpack/webpack
test/setupTestFramework.js
// Copyright Oliver Kowalke 2009. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <boost/config.hpp> #if defined(BOOST_WINDOWS) # include <boost/coroutine/windows/protected_stack_a...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/coroutine/protected_stack_allocator.hpp
# -*- coding: utf-8 -*- # Scrapy settings for mytest project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en/latest/...
unknown
codeparrot/codeparrot-clean
""" ==================================== Linear algebra (:mod:`scipy.linalg`) ==================================== .. currentmodule:: scipy.linalg Linear algebra functions. .. seealso:: `numpy.linalg` for more linear algebra functions. Note that although `scipy.linalg` imports most of them, identically named...
unknown
codeparrot/codeparrot-clean
""" This module houses the OGR & SRS Exception objects, and the check_err() routine which checks the status code returned by OGR methods. """ #### OGR & SRS Exceptions #### class GDALException(Exception): pass class OGRException(Exception): pass class SRSException(Exception): pass class OGRIndexError...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential #...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import nipype.pipeline.engine as pe import nipype.interfaces.utility as niu from nipype.interfaces import fsl from nipype.interfaces import dipy def nlmeans_pipeline(name='Denoise', ...
unknown
codeparrot/codeparrot-clean
import os from .base import NullBrowser, ExecutorBrowser, require_arg from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorservo import ServoTestharnessExecutor, ServoRefTestExecutor, ServoWdspecExecutor here = os.path.join(os.path.split(__file__)[0]) __wptrunner__ = { "produc...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from __future__ import print_function import argparse import calendar import codecs import datetime import io import os.path import re import subprocess import sys from pycoin.convention import tx_fee, satoshi_to_mbtc from pycoin.encoding import hash160 from pycoin.key import Key from pycoin.ke...
unknown
codeparrot/codeparrot-clean
<%- include('header.html') -%> <h1>Users</h1> <ul id="users"> <% users.forEach(function(user){ %> <li><%= user.name %> &lt;<%= user.email %>&gt;</li> <% }) %> </ul> <%- include('footer.html') -%>
html
github
https://github.com/expressjs/express
examples/ejs/views/users.html
# -*- coding: utf-8 -*- ''' lucterios.contacts package @author: Laurent GAY @organization: sd-libre.fr @contact: info@sd-libre.fr @copyright: 2015 sd-libre.fr @license: This file is part of Lucterios. Lucterios is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Licens...
unknown
codeparrot/codeparrot-clean
import urllib2 import os import math import json endpoint = "curl --header 'token: oSgDmnvLL9GwKZwFoiKHJE' https://www.find.foo/api/challenge" # data = os.system(endpoint) # print data import subprocess result = os.popen(endpoint).read() data = json.loads(result) challenge = data['challenge'] if challenge[1] == 'b' ...
unknown
codeparrot/codeparrot-clean
from django.db import models from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType __all__ = ('Link', 'Place', 'Restaurant', 'Person', 'Address', 'CharLink', 'TextLink', 'OddRelation1', 'OddRelation2', 'Contact', 'Organization', 'Note') class ...
unknown
codeparrot/codeparrot-clean
#========================================================================== # # Copyright Insight Software Consortium # # 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...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright (C) 2003-2009 Edgewall Software # Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com> # Copyright (C) 2004-2005 Christopher Lenz <cmlenz@gmx.de> # Copyright (C) 2005-2006 Christian Boos <cboos@edgewall.org> # All rights reserved. # # This software is licensed as described ...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, print_function, division import os from theano import Apply, Op from theano.tensor.extra_ops import CumOp from .basic_ops import infer_context_name try: from pygpu import gpuarray except ImportError: pass from .basic_ops import (as_gpuarray_variable, GpuKernelBase, Kerne...
unknown
codeparrot/codeparrot-clean
def sum_Of_Subarray_Prod(arr,n): ans = 0 res = 0 i = n - 1 while (i >= 0): incr = arr[i]*(1 + res) ans += incr res = incr i -= 1 return (ans)
unknown
mbpp
- hosts: localhost gather_facts: true
unknown
github
https://github.com/ansible/ansible
test/integration/targets/ansible-pull/pull-integration-test/gather_facts.yml
# Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from units.compat import unittest from oneview_module_loader import SanManagerFactsModule from hpe_test_utils import FactsParamsTestCase class SanManagerFact...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
unknown
codeparrot/codeparrot-clean
import type { AxiosRequestConfig, AxiosResponse } from 'axios'; import type { ApiRequestOptions } from './ApiRequestOptions'; type Headers = Record<string, string>; type Middleware<T> = (value: T) => T | Promise<T>; type Resolver<T> = (options: ApiRequestOptions<T>) => Promise<T>; export class Interceptors<T> { _fn...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/openapi-gen/requests/core/OpenAPI.ts
#!/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
import socket from mcstatus import MinecraftServer from cloudbot import hook mc_colors = [('\xa7f', '\x0300'), ('\xa70', '\x0301'), ('\xa71', '\x0302'), ('\xa72', '\x0303'), ('\xa7c', '\x0304'), ('\xa74', '\x0305'), ('\xa75', '\x0306'), ('\xa76', '\x0307'), ('\xa7e', '\x0308'), ('\xa7a', '\...
unknown
codeparrot/codeparrot-clean
# Compiling Swift Generics This is a book about the *implementation* of generic programming--also known as parametric polymorphism--in the Swift compiler. The first four chapters also give an overview of the Swift compiler architecture in general. ## Downloading the PDF A periodically-updated PDF is available here: ...
unknown
github
https://github.com/apple/swift
docs/Generics/README.md
# Upload sccache stats to artifacts, and also as benchmark data when on an aws # linux or windows machine. Does not currently handle mac builds name: Upload sccache stats description: Upload sccache stats to artifacts inputs: github-token: description: GITHUB_TOKEN required: true build-time: descript...
unknown
github
https://github.com/pytorch/pytorch
.github/actions/upload-sccache-stats/action.yml