code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ############################################# # WARNING # ############################################# # # This file is auto generated by the resource # module bu...
unknown
codeparrot/codeparrot-clean
package image import ( dockerspec "github.com/moby/docker-image-spec/specs-go/v1" "github.com/moby/moby/api/types/storage" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) // RootFS returns Image's RootFS description including the layer IDs. type RootFS struct { Type string `json:",omitempty"` La...
go
github
https://github.com/moby/moby
api/types/image/image_inspect.go
import pyxform from meerkat_abacus.config import config country_config = config.country_config from pyxform import builder, xls2json from pyxform.utils import has_external_choices, sheet_to_csv for form in country_config["fake_data"].keys(): json_survey = { 'type': 'survey', 'name': form, 'title': form,...
unknown
codeparrot/codeparrot-clean
import numpy as np from scipy.ndimage.filters import convolve from scipy.ndimage import maximum_filter, gaussian_filter from .. import MaskSeparationBase, SeparationException from ..benchmark import HighLowPassFilter from ... import AudioSignal from ... import vamp_imported import numpy as np import scipy.signal if v...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright Yassine Lamgarchal <lamgarchal.yassine@gmail.com> # # 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
from incidentstransports.conf.settings import * DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = () # django project root, automatically adapt to your on plateform PROJECT_ROOT_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) MANAGERS = ADMINS DATABASES = { 'default': { ...
unknown
codeparrot/codeparrot-clean
""" ========================================= Compute source power using DICS beamfomer ========================================= Compute a Dynamic Imaging of Coherent Sources (DICS) filter from single trial activity to estimate source power for two frequencies of interest. The original reference for DICS is: Gross e...
unknown
codeparrot/codeparrot-clean
from graphics.widgets.checkbox_item_output_f import CheckboxItemOutputF from utils.train.data_augmentation import DataAugmentation import constants.output_constants as const import tkinter as tk class DataAugmentationOutputF(tk.Frame): def __init__(self, parent, disabled=False...
unknown
codeparrot/codeparrot-clean
/* 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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/grappler/utils/functions.h
from collections import OrderedDict import pytest from django.test import TestCase from mongoengine import Document, EmbeddedDocument, fields from rest_framework import fields as drf_fields from rest_framework.compat import unicode_repr from rest_framework.serializers import Field, Serializer from rest_framework_mong...
unknown
codeparrot/codeparrot-clean
# How to publish JPS locally to consume it in Intellij Idea You can use `installJps` task or run: ```shell cd .. ./gradlew installJps && \ echo Finished successfully ```
unknown
github
https://github.com/JetBrains/kotlin
jps/README.md
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # # -*- test-case-name: twisted.test.test_journal -*- """Logging that uses pickles. TODO: add log that logs to a file. """ # twisted imports from twisted.persisted import dirdbm from twisted.internet import defer from zope.interface i...
unknown
codeparrot/codeparrot-clean
from flask import request from flask_restful import Resource from flask_restful.reqparse import RequestParser from blueprints.api import require_api_key, register_api_access_token from blueprints.base import rest_api from blueprints.auth.util import check_authenticated_ip, add_authenticated_ip add_api_username_verifi...
unknown
codeparrot/codeparrot-clean
import { test } from '../../test'; export default test({ get props() { return { x: 1, y: false }; }, html: ` <span>1</span> `, test({ assert, component, target }) { component.x = 2; assert.htmlEqual( target.innerHTML, ` <span>2</span> ` ); } });
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/if-block-else-partial-outro/_config.js
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. **Example** ```esql ROW a=1.8 | EVAL a=FLOOR(a) ``` | a:double | | --- | | 1 |
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/functions/examples/floor.md
#!/usr/bin/env python # # $Id: _psosx.py 794 2010-11-12 13:29:52Z g.rodola $ # import errno import os try: from collections import namedtuple except ImportError: from psutil.compat import namedtuple # python < 2.6 import _psutil_osx import _psposix from psutil.error import AccessDenied, NoSuchProcess # ---...
unknown
codeparrot/codeparrot-clean
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/falcon_h1/modular_falcon_h1.py. # Do NOT edit this file manually as any edits will be overwritten by the generati...
python
github
https://github.com/huggingface/transformers
src/transformers/models/falcon_h1/modeling_falcon_h1.py
#!/usr/bin/python from __future__ import print_function from bcc import BPF import sys import socket import os import argparse import time import netifaces as ni from sys import argv from kafka import KafkaProducer from kafka.errors import KafkaError from datetime import datetime #args def usage(): print("USAGE:...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import os import csv import re from collections import Counter PRIVATE_PATH = "../../data/private/" PUBLIC_PATH = "../../data/public/" def buildAttendance(): id_map = dict() with open(PRIVATE_PATH + "withheld.csv", "rb") as inp: cr = csv.reader(inp) cr.next() fo...
unknown
codeparrot/codeparrot-clean
#~/usr/bin/env python #-*- coding: utf-8 -*- import os import numpy as np import matplotlib.pyplot as plt # set global settings def init_plotting(): plt.rcParams['figure.figsize'] = (4, 3) plt.rcParams['font.size'] = 8 plt.rcParams['font.family'] = 'Helvetica' plt.rcParams['axes.labelsize'] = plt.rcPar...
unknown
codeparrot/codeparrot-clean
""" Models can have a ``managed`` attribute, which specifies whether the SQL code is generated for the table on various manage.py operations. """ from django.db import models # All of these models are created in the database by Django. class A01(models.Model): f_a = models.CharField(max_length=10, db_index=True...
unknown
codeparrot/codeparrot-clean
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
unknown
codeparrot/codeparrot-clean
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
unknown
codeparrot/codeparrot-clean
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true module Jekyll class Stevenson < ::Logger def initialize formatter = proc do |_, _, _, msg| msg.to_s end super($stdout, :formatter => formatter) end def add(severity, message = nil, progname = nil) severity ||= UNKNOWN @logdev = logdevic...
ruby
github
https://github.com/jekyll/jekyll
lib/jekyll/stevenson.rb
# Patch (bugfix) release process The patch releases can be cut straight from the `master` branch if there are no changes that would warrant a non-patch release. However, if the `master` branch has changes that are not suitable for a patch release, a release branch should be created. See [BRANCHES-AND-TAGS.md](BRANCH...
unknown
github
https://github.com/moby/moby
project/PATCH-RELEASES.md
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/source/ConventionSourceAnnotated.java
""" E-commerce Tab Instructor Dashboard Query Registration Code Status. """ from django.core.urlresolvers import reverse from django.views.decorators.http import require_GET, require_POST from instructor.enrollment import get_email_params, send_mail_to_student from django.utils.translation import ugettext as _ from cou...
unknown
codeparrot/codeparrot-clean
# Django settings for DjangoApplication1 project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS from os import environ, path DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', ...
unknown
codeparrot/codeparrot-clean
# orm/exc.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """SQLAlchemy ORM exceptions.""" from .. import exc as sa_exc, util NO_STATE = (Attribut...
unknown
codeparrot/codeparrot-clean
"""Functions for prompting the user for project info.""" import json from collections import OrderedDict import click from jinja2.exceptions import UndefinedError from cookiecutter.environment import StrictEnvironment from cookiecutter.exceptions import UndefinedVariableInTemplate def read_user_variable(var_name, de...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/callWithWrongNumberOfTypeArguments.ts] //// //// [callWithWrongNumberOfTypeArguments.ts] function f<T, U>() { } f<number>(); f<number, string>(); f<number, string, number>(); //// [callWithWrongNumberOfTypeArguments.js] "use strict"; function f() { } f(); f(); f();
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/callWithWrongNumberOfTypeArguments.js
from collections import namedtuple from MySQLdb.constants import FIELD_TYPE from django.db.backends.base.introspection import ( BaseDatabaseIntrospection, FieldInfo, TableInfo, ) from django.utils.datastructures import OrderedSet from django.utils.encoding import force_text FieldInfo = namedtuple('FieldInfo', Fi...
unknown
codeparrot/codeparrot-clean
from nose.tools import * # flake8: noqa from framework.auth.core import Auth from website.models import Node from website.util import permissions from api.base.settings.defaults import API_BASE from tests.base import ApiTestCase from tests.factories import ( NodeFactory, ProjectFactory, RegistrationFac...
unknown
codeparrot/codeparrot-clean
## Input ```javascript function Component({value}) { const object = { get value() { return value; }, }; return <div>{object.value}</div>; } export const FIXTURE_ENTRYPOINT = { fn: foo, params: [{value: 0}], sequentialRenders: [{value: 1}, {value: 2}], }; ``` ## Error ``` Found 1 error: T...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-object-expression-get-syntax.expect.md
#!/usr/bin/python3 import requests, json import sys import netifaces import os import os.path import settings from datetime import datetime sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), './config'))) from config_func import add_to_config, read_config, get_device_info_and_config output = "...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python from __future__ import print_function import sys from time import sleep, time from argparse import ArgumentParser import os import sqlite3 from datetime import datetime import errno import socket from select import select import traceback from collections import deque, defaultdict, namedtuple try: ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, print_function import frappe, os from frappe.core.page.data_import_tool.data_import_tool import import_doc, export_json def sync_fixtures(app=None): """Import, overwrite fixtu...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # This file is part of Flask-SSO # Copyright (C) 2014, 2015 CERN. # # Flask-SSO 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 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/AdviceBindingTestAspect.java
from __future__ import unicode_literals import base64 from .common import InfoExtractor from ..utils import ( ExtractorError, int_or_none, sanitized_Request, urlencode_postdata, ) class SharedIE(InfoExtractor): IE_DESC = 'shared.sx and vivo.sx' _VALID_URL = r'https?://(?:shared|vivo)\.sx/(?P<...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8; -*- # # @file translation.py # @brief # @author Medhi BOULNEMOUR (INRA UMR1095) # @date 2017-01-03 # @copyright Copyright (c) 2016 INRA/CIRAD # @license MIT (see LICENSE file) # @details """ Install Country """ from django.core.management import BaseCommand from geonames.appsettings import TRANSL...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright 2014 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Functions for creating an Android.mk from already created dictionaries. """ import os def write_group(f, name, items, append): """Helper function to list all n...
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/security/oauthbearer/internals/secured/HttpRequestFormatter.java
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Alexander Akait @alexander-akait */ "use strict"; const { CSS_TYPE } = require("../ModuleSourceTypeConstants"); const makeSerializable = require("../util/makeSerializable"); const CssIcssExportDependency = require("./CssIcssExportDependency");...
javascript
github
https://github.com/webpack/webpack
lib/dependencies/CssIcssSymbolDependency.js
from coalib.parsing.StringProcessing import unescaped_split from coalib.tests.parsing.StringProcessing.StringProcessingTestBase import ( StringProcessingTestBase) class UnescapedSplitTest(StringProcessingTestBase): bs = StringProcessingTestBase.bs test_basic_pattern = r"'" test_basic_expected_results ...
unknown
codeparrot/codeparrot-clean
import {useHook} from 'shared-runtime'; function Component(props) { const o = {}; const x = <div>{props.value}</div>; // create within the range of x to group with x useHook(); // intersperse a hook call to prevent memoization of x o.value = props.value; const y = <div>{x}</div>; return <div>{y}</div>; }...
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/prune-scopes-whose-deps-invalidate-jsx.js
#Copyright 2007-2009 WebDriver committers #Copyright 2007-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 b...
unknown
codeparrot/codeparrot-clean
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v1beta1", "metadata": { "name": "v0alpha1.rows-to-fields.v42" }, "spec": { "annotations": { "list": [ { "builtIn": 1, "datasource": { "uid": "-- Grafana --" }, "enable": true, ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/transforms/v0alpha1.rows-to-fields.v42.v1beta1.json
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html #ifndef OPENCV_HAL_INTRIN_LSX_HPP #define OPENCV_HAL_INTRIN_LSX_HPP #include <lsxintrin.h> #define CV_SIMD128 1 #define CV_S...
unknown
github
https://github.com/opencv/opencv
modules/core/include/opencv2/core/hal/intrin_lsx.hpp
# -*- coding: utf-8 -*- """ werkzeug.useragents ~~~~~~~~~~~~~~~~~~~ This module provides a helper to inspect user agent strings. This module is far from complete but should work for most of the currently available browsers. :copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more detai...
unknown
codeparrot/codeparrot-clean
import keep_me from 'hello'; import { keep_me2 } from 'hello2'; import * as keep_me3 from 'hello3'; import { but_not_me } from 'bar'; var leave_me_alone = 1; function dont_bug_me_either() {} export var __N_SSG = true; export default function Test() { return __jsx("div", null); }
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/ssg/getStaticProps/should-remove-re-exported-function-declarations-dependents-variables-functions-imports/output.js
import pickle import random import os import sys import time import CORE_DATA def merge(d1, d2, merger=lambda x,y:x+y): #http://stackoverflow.com/questions/38987/how-can-i-merge-two-python-dictionaries-as-a-single-expression result = dict(d1) for k,v in d2.iteritems(): if k in result: result[k] = merger...
unknown
codeparrot/codeparrot-clean
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
java
github
https://github.com/apache/hadoop
hadoop-cloud-storage-project/hadoop-cos/src/test/java/org/apache/hadoop/fs/cosn/contract/TestCosNContractRename.java
""" Title: test_findpeaks.py Author: Tina Yang, tina.yang@ga.gov.au CreationDate: 2014-05-01 Description: Unit testing module for findpeaks function in findpeaks.py Version: $Rev$ $Id$ """ import sys import os.path import unittest import numpy as np from numpy.testing import assert_almost_equal...
unknown
codeparrot/codeparrot-clean
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v2alpha1", "metadata": { "name": "v0alpha1.panel_tests_bar_gauge2.v42" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "query": { "kind": "", "spec": {} },...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/panel-bargauge/v0alpha1.panel_tests_bar_gauge2.v42.v2alpha1.json
# Copyright (c) 2014-2015 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
unknown
codeparrot/codeparrot-clean
#![allow( clippy::cast_lossless, clippy::decimal_literal_representation, clippy::derive_partial_eq_without_eq, clippy::empty_enums, clippy::manual_assert, clippy::needless_pass_by_value, clippy::uninlined_format_args, clippy::unreadable_literal )] #![cfg_attr(feature = "unstable", featur...
rust
github
https://github.com/serde-rs/serde
test_suite/tests/test_de.rs
#ifndef MetalNeuronType_h #define MetalNeuronType_h #import <ATen/native/metal/mpscnn/MPSCNNNeuronOp.h> #import <MetalPerformanceShaders/MetalPerformanceShaders.h> #include <ATen/ATen.h> namespace at::native::metal { enum class NeuronType { None, Clamp, Relu, Sigmoid, HardSigmoid, Tanh, }; static inlin...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/metal/MetalNeuronType.h
""" EnOcean Component. For more details about this component, please refer to the documentation at https://home-assistant.io/components/EnOcean/ """ DOMAIN = "enocean" REQUIREMENTS = ['enocean==0.31'] CONF_DEVICE = "device" ENOCEAN_DONGLE = None def setup(hass, config): """Setup the EnOcean component.""" ...
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 "License");...
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...
go
github
https://github.com/tensorflow/tensorflow
tensorflow/go/tensor_test.go
function Component(props) { let x; let i = 0; do { if (i > 10) { x = 10; } else { x = 1; } i++; } while (i < props.test); // The values assigned to `x` are non-reactive, but the value of `x` // depends on the "control" variable `i`, whose value is affected by // `props.test` wh...
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reactive-control-dependency-do-while-test.js
#!/usr/bin/env python """ Install.py tool to download, unpack, build, and link to the MS-CG library used to automate the steps described in the README file in this dir """ from __future__ import print_function import sys, os, subprocess, shutil, tarfile from argparse import ArgumentParser sys.path.append('..') from ...
unknown
codeparrot/codeparrot-clean
/* * jutils.c * * Copyright (C) 1991-1996, Thomas G. Lane. * Modified 2009-2020 by Guido Vollbeding. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * * This file contains tables and miscellaneous utility routines needed ...
c
github
https://github.com/opencv/opencv
3rdparty/libjpeg/jutils.c
# -*- coding: utf-8 -*- import array import os # import pycurl import random import re from base64 import standard_b64decode from Crypto.Cipher import AES from Crypto.Util import Counter from module.common.json_layer import json_loads, json_dumps from module.plugins.internal.Hoster import Hoster from module.utils i...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutIteration(Koan): def test_iterators_are_a_type(self): it = iter(range(1,6)) fib = 0 for num in it: fib += num self.assertEqual(__ , fib) def test_iterating_with_next(self): ...
unknown
codeparrot/codeparrot-clean
{ "compilerOptions": { "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, "jsx": "re...
json
github
https://github.com/vercel/next.js
examples/with-mux-video/tsconfig.json
""" Support for monitoring the local system. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.systemmonitor/ """ import logging import os import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
unknown
codeparrot/codeparrot-clean
<?php $container->loadFromExtension('framework', [ 'request' => [ 'formats' => [], ], ]);
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/request.php
#!/usr/bin/python # # Copyright 2014 Google 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 b...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
from django.conf import settings from django.contrib import auth from django.contrib.auth.backends import ModelBackend from django.db.models import Q try: from django.contrib.auth import get_user_model except ImportError: import django.contrib.auth.models get_user_model = lambda: django.contrib.auth.models...
unknown
codeparrot/codeparrot-clean
# stdlib import threading import time from types import ListType import unittest # 3p from nose.plugins.attrib import attr # project from aggregator import MetricsAggregator from dogstatsd import Server from jmxfetch import JMXFetch from tests.checks.common import Fixtures STATSD_PORT = 8121 class DummyReporter(thr...
unknown
codeparrot/codeparrot-clean
// Copyright 2015 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. // Support for memory sanitizer. See runtime/cgo/mmap.go. //go:build (linux && (amd64 || arm64 || loong64)) || (freebsd && amd64) package runtime import "uns...
go
github
https://github.com/golang/go
src/runtime/cgo_mmap.go
# 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
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # django-lb-workflow documentation build configuration file, created by # sphinx-quickstart on Mon May 1 20:04:08 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present i...
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
class Object(object): def __init__(self, groups): for group in groups: group.add(self) self._groups = groups self.z = 0 def alive(self): return self._groups != [] def kill(self): for g in self.groups: g.remove(self) self._groups = []...
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
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
unknown
codeparrot/codeparrot-clean
# # # Copyright 2014 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (FWO) ...
unknown
codeparrot/codeparrot-clean
"""adjusting key length Revision ID: 956a063c52b3 Revises: f0fbf6129e13 Create Date: 2016-05-11 17:28:32.407340 """ # revision identifiers, used by Alembic. revision = '956a063c52b3' down_revision = 'f0fbf6129e13' from alembic import op import sqlalchemy as sa def upgrade(): with op.batch_alter_table('clusters...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2015 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 agre...
java
github
https://github.com/google/guava
android/guava-testlib/src/com/google/common/collect/testing/google/GoogleHelpers.java
from __future__ import absolute_import from pip.req import InstallRequirement, RequirementSet, parse_requirements from pip.basecommand import Command from pip.exceptions import InstallationError class UninstallCommand(Command): """ Uninstall packages. pip is able to uninstall most installed packages. Kno...
unknown
codeparrot/codeparrot-clean
""" A module for convolutions with cudnn. """ __author__ = "Nicolas Ballas" __license__ = "3-clause BSD" __credits__ = "Nicolas Ballas and Francesco Visin" __maintainer__ = "Lisa Lab" import functools import numpy as np from theano.sandbox.cuda.dnn import GpuDnnConv, GpuDnnConvDesc from theano.sandbox.cuda.basic_ops...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.tests.plugins import io.ktor.client.call.* import io.ktor.client.plugins.cache.* import io.ktor.client.plugins.cache.storage.* import io.ktor.client.plugins.logging.* i...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-tests/common/test/io/ktor/client/tests/plugins/CacheLegacyStorageTest.kt
from helper import timestamp_to_datetime class ApiModel(object): @classmethod def object_from_dictionary(cls, entry): # make dict keys all strings entry_str_dict = dict([(str(key), value) for key, value in entry.items()]) return cls(**entry_str_dict) def __repr__(self): re...
unknown
codeparrot/codeparrot-clean
- Feature Name: segmented_storage - Status: rejected - Start Date: 2015-07-29 - RFC PR: [#1866](https://github.com/cockroachdb/cockroach/pull/1866) - Cockroach Issue: [#1644](https://github.com/cockroachdb/cockroach/issues/1644) # Rejection notes This proposal was deemed too complex and expensive for the problem it s...
unknown
github
https://github.com/cockroachdb/cockroach
docs/RFCS/20150729_segmented_storage.md
#!/usr/bin/python # # Copyright (c) 2016, The OpenThread Authors. # 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 # not...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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 wi...
unknown
codeparrot/codeparrot-clean
""" Lmfit provides a high-level interface to non-linear optimization and curve fitting problems for Python. Lmfit builds on Levenberg-Marquardt algorithm of scipy.optimize.leastsq(), but also supports most of the optimization methods from scipy.optimize. It has a number of useful enhancements, including: * Using Pa...
unknown
codeparrot/codeparrot-clean
# Copyright 2011 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 or agreed to in writing,...
unknown
codeparrot/codeparrot-clean
/* * 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
buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/json/JsonStreamTests.java
#!/usr/bin/env python # -*- coding: utf-8 -*- """ High-level history functions. These wrap the basic his_read function to allow some alternate representations of the historical data. """ import hszinc import fysom import pytz from copy import deepcopy from datetime import tzinfo from six import string_types from .....
unknown
codeparrot/codeparrot-clean
[ { "pk": "4", "model": "fixtures_regress.person", "fields": { "name": "Neal Stephenson" } }, { "pk": "2", "model": "fixtures_regress.store", "fields": { "main": null, "name": "Amazon" } }, { ...
json
github
https://github.com/django/django
tests/fixtures_regress/fixtures/forward_ref_lookup.json
/*! * 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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/src/components/FlexibleForm/FieldBool.tsx
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate() mobile...
unknown
codeparrot/codeparrot-clean