code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from cc...
unknown
codeparrot/codeparrot-clean
# -*- coding:utf-8 -*- from __future__ import unicode_literals from yepes.types import Undefined class ModelMixin(object): """ Adds a convenience method for easily obtain the model of the view object. """ _model = Undefined def get_model(self): """ Returns the model of the view ...
unknown
codeparrot/codeparrot-clean
// RUN: %check_clang_tidy %s bugprone-sizeof-container %t -- -- -target x86_64-unknown-unknown namespace std { typedef unsigned int size_t; template <typename T> struct basic_string { size_t size() const; }; template <typename T> basic_string<T> operator+(const basic_string<T> &, const T *); typedef basic_string...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-container.cpp
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-04 16:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('proposals', '0017_auto_20160104_0728'), ] operations = [ migrations.AlterField(...
unknown
codeparrot/codeparrot-clean
from django.apps import AppConfig from django.core.signals import setting_changed from django.db import connections from django.db.backends.postgresql.psycopg_any import RANGE_TYPES from django.db.backends.signals import connection_created from django.db.migrations.writer import MigrationWriter from django.db.models im...
python
github
https://github.com/django/django
django/contrib/postgres/apps.py
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/memory-controllers/canaan,k210-sram.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Canaan K210 SRAM memory controller description: The Canaan K210 SRAM memory controller is responsible for...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/memory-controllers/canaan,k210-sram.yaml
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Matt Wright <matt@nobien.net> # # 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...
unknown
codeparrot/codeparrot-clean
# encoding: UTF-8 __author__ = 'CHENXY' # C++和python类型的映射字典 type_dict = { 'int': 'int', 'char': 'string', 'double': 'float', 'short': 'int', 'unsigned': 'string' } def process_line(line): """处理每行""" if '///' in line: # 注释 py_line = process_comment(line) elif 'typedef...
unknown
codeparrot/codeparrot-clean
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softw...
go
github
https://github.com/kubernetes/kubernetes
pkg/controller/devicetainteviction/config/v1alpha1/conversion.go
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function import sys, requests, random, optparse, time, json from itertools import islice from threading import Thread from collections import Counter import requests import six from six.moves.queue import Queue from .utils import SplashServer, MockServer class StressTest(): def __i...
unknown
codeparrot/codeparrot-clean
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
unknown
codeparrot/codeparrot-clean
import { CancellationToken, codefix, Debug, fileShouldUseJavaScriptRequire, findAncestor, findIndex, findTokenOnLeftOfPosition, forEachChild, formatting, getNewLineOrDefaultFromHost, getQuotePreference, getTokenAtPosition, isIdentifier, Program, rangeContainsP...
typescript
github
https://github.com/microsoft/TypeScript
src/services/pasteEdits.ts
"""The tests for the Owntracks device tracker.""" import json import os import unittest from collections import defaultdict from homeassistant.components import device_tracker from homeassistant.const import (STATE_NOT_HOME, CONF_PLATFORM) import homeassistant.components.device_tracker.owntracks as owntracks from te...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: GPL-2.0-only %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/qcom,gcc-apq8064.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm Global Clock & Reset Controller on APQ8064/MSM8960 maintainers: - Stephen Boyd <sboyd@kernel.org> - Taniya Das <quic_tdas@qui...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/qcom,gcc-apq8064.yaml
import lit.formats config.name = "clangIncludeCleaner Unit Tests" config.test_format = lit.formats.GoogleTest(".", "Tests") config.test_source_root = config.clang_include_cleaner_binary_dir + "/unittests" config.test_exec_root = config.clang_include_cleaner_binary_dir + "/unittests" # Point the dynamic loader at dyna...
python
github
https://github.com/llvm/llvm-project
clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
data = ( ' ', # 0x00 'a', # 0x01 '1', # 0x02 'b', # 0x03 '\'', # 0x04 'k', # 0x05 '2', # 0x06 'l', # 0x07 '@', # 0x08 'c', # 0x09 'i', # 0x0a 'f', # 0x0b '/', # 0x0c 'm', # 0x0d 's', # 0x0e 'p', # 0x0f '"', # 0x10 'e', # 0x11 '3', # 0x12 'h', # 0x13 '9', # ...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package awsauth import ( "context" "fmt" "github.com/hashicorp/go-secure-stdlib/strutil" "github.com/hashicorp/vault/sdk/framework" "github.com/hashicorp/vault/sdk/helper/authmetadata" "github.com/hashicorp/vault/sdk/logical" ) var ( // i...
go
github
https://github.com/hashicorp/vault
builtin/credential/aws/path_config_identity.go
/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst */ #ifndef DATE_TIME_DATE_DST_TRANSITION_DAY...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/date_time/dst_transition_generators.hpp
/* * Protractor support is deprecated in Angular. * Protractor is used in this example for compatibility with Angular documentation tools. */ import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; import {App} from './app/app'; import {provideRouter} from '@angular/router'...
typescript
github
https://github.com/angular/angular
adev/src/content/tutorials/first-app/steps/11-details-page/src/main.ts
export function f() { return 1; } export const b = 2; export const usedExports = __webpack_exports_info__.usedExports;
javascript
github
https://github.com/webpack/webpack
test/cases/chunks/statical-dynamic-import/dir4/lib/b.js
#!/usr/bin/python -u # # # This source code is part of tcga, a TCGA processing pipeline, written by Ivana Mihalek. # Copyright (C) 2014-2016 Ivana Mihalek. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software ...
unknown
codeparrot/codeparrot-clean
# 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
""" ==================================== Plotting Cross-Validated Predictions ==================================== This example shows how to use :func:`~sklearn.model_selection.cross_val_predict` together with :class:`~sklearn.metrics.PredictionErrorDisplay` to visualize prediction errors. """ # Authors: The scikit-l...
python
github
https://github.com/scikit-learn/scikit-learn
examples/model_selection/plot_cv_predict.py
""" Jacobian matrix operations. @author: Peter Corke @copyright: Peter Corke """ from numpy import * from robot.utility import * from robot.transform import * from robot.kinematics import * from numpy.linalg import norm def jacob0(robot, q): """ Compute manipulator Jacobian in world coordinates for joint coo...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import os.path import fireplace from setuptools import setup, find_packages README = open(os.path.join(os.path.dirname(__file__), "README.md")).read() CLASSIFIERS = [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Affero General Publ...
unknown
codeparrot/codeparrot-clean
--- navigation_title: "Word delimiter graph" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-word-delimiter-graph-tokenfilter.html --- # Word delimiter graph token filter [analysis-word-delimiter-graph-tokenfilter] Splits tokens at non-alphanumeric characters. The `word_deli...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/text-analysis/analysis-word-delimiter-graph-tokenfilter.md
## Input ```javascript import {useHook} from 'shared-runtime'; function Component(props) { const data = useHook(); const items = []; // NOTE: `item` is a context variable because it's reassigned and also referenced // within a closure, the `onClick` handler of each item for (let key in props.data) { key...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-for-in-loop-with-context-variable-iterator.expect.md
# -*- coding: utf-8 -*- """ For a massive matrix of colors and color labels you can download the follow two files # http://lyst-classifiers.s3.amazonaws.com/color/lab-colors.pk # http://lyst-classifiers.s3.amazonaws.com/color/lab-matrix.pk lab-colors is a cPickled list of color names and lab-matrix is a cPickled (n,3...
unknown
codeparrot/codeparrot-clean
import subprocess import sys import os def start(args, logfile, errfile): if os.name == 'nt': subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\webgo&&go get ./...", shell=True, cwd="webgo", stderr=errfile, stdout=logfile) subprocess.Popen("setup.bat", shell=True, cwd="webgo", stderr=errfile, stdout=logfi...
unknown
codeparrot/codeparrot-clean
libfpconv ---------------------------------------------- Fast and accurate double to string conversion based on Florian Loitsch's Grisu-algorithm[1]. This port contains a subset of the 'C' version of Fast and accurate double to string conversion based on Florian Loitsch's Grisu-algorithm available at [github.com/nig...
unknown
github
https://github.com/redis/redis
deps/fpconv/README.md
/** * 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...
c
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/erasurecode/jni_erasure_code_native.c
"""Module stub""" import re from madcow.util import Module, strip_html from madcow.util.http import getsoup from madcow.util.text import * from urlparse import urljoin class Main(Module): pattern = re.compile(r'^\s*urban(?:\s+(.+?)(?:\s+(\d+))?)?\s*$', re.I) help = 'urban <term> [#] - lookup word/phrase on u...
unknown
codeparrot/codeparrot-clean
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j E Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = "j E Y H:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT...
python
github
https://github.com/django/django
django/conf/locale/pl/formats.py
"""HDF5 tools tests.""" # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- import os import tempfile import numpy as np import tables as tb from nose import with_setup from kwiklib.utils.six import ...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/arrayTypeInSignatureOfInterfaceAndClass.ts] //// //// [arrayTypeInSignatureOfInterfaceAndClass.ts] declare namespace WinJS { class Promise<T> { then<U>(success?: (value: T) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; } }...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/arrayTypeInSignatureOfInterfaceAndClass.js
#!/usr/bin/env python3 # Copyright (c) 2014-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Run regression test suite. This module calls down into individual test cases via subprocess. It will f...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2023 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/ja/create_a_model.md
# 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
package daemon import ( "github.com/moby/moby/api/types/container" libcontainerdtypes "github.com/moby/moby/v2/daemon/internal/libcontainerd/types" ) func toContainerdResources(resources container.Resources) *libcontainerdtypes.Resources { // We don't support update, so do nothing return nil }
go
github
https://github.com/moby/moby
daemon/update_windows.go
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2019-05-31 09:44 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('creation', '0012_tutorialreso...
unknown
codeparrot/codeparrot-clean
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. **Description** Returns all unique values from the combined input fields (set union). Null values are treated as empty sets; returns `null` only if both fields are null.
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/functions/description/mv_union.md
"""Metrics to assess performance on classification task given class prediction Functions named as ``*_score`` return a scalar value to maximize: the higher the better Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize: the lower the better """ # Authors: Alexandre Gramfort <alexandre.gramf...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * foreigncmds.c * foreign-data wrapper/server creation/manipulation commands * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * * * IDENTIFICATION * src/backend/commands/foreigncmds.c * *---------------...
c
github
https://github.com/postgres/postgres
src/backend/commands/foreigncmds.c
from social.exceptions import NotAllowedToDisconnect def allowed_to_disconnect(strategy, user, name, user_storage, association_id=None, *args, **kwargs): if not user_storage.allowed_to_disconnect(user, name, association_id): raise NotAllowedToDisconnect() def get_entries(strategy...
unknown
codeparrot/codeparrot-clean
#ifndef JEMALLOC_INTERNAL_PROF_TYPES_H #define JEMALLOC_INTERNAL_PROF_TYPES_H typedef struct prof_bt_s prof_bt_t; typedef struct prof_cnt_s prof_cnt_t; typedef struct prof_tctx_s prof_tctx_t; typedef struct prof_info_s prof_info_t; typedef struct prof_gctx_s prof_gctx_t; typedef struct prof_tdata_s prof_tdata_t; typed...
c
github
https://github.com/redis/redis
deps/jemalloc/include/jemalloc/internal/prof_types.h
""" Django settings for growth_studio project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ imp...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # encoding: utf-8 """Parses a UltiSnips snippet definition and launches it into Vim.""" from UltiSnips.snippet.parsing.base import ( tokenize_snippet_text, finalize, resolve_ambiguity, ) from UltiSnips.snippet.parsing.lexer import ( EscapeCharToken, VisualToken, Transfor...
unknown
codeparrot/codeparrot-clean
import { type CodegenResult, type CompilerOptions, type DirectiveTransform, type NodeTransform, type ParserOptions, type RootNode, baseCompile, baseParse, noopDirectiveTransform, } from '@vue/compiler-core' import { parserOptions } from './parserOptions' import { transformStyle } from './transforms/tr...
typescript
github
https://github.com/vuejs/core
packages/compiler-dom/src/index.ts
# Copyright (C) 2013 - 2016 - Oscar Campos <oscar.campos@member.fsf.org> # This program is Free Software see LICENSE file for details import logging import traceback from ..anagonda.context import guru, godef from ..anagonda.context.error import AnaGondaError from commands.base import Command class Goto(Command): ...
unknown
codeparrot/codeparrot-clean
# Copyright 2007 Matt Chaput. 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 notice, # this list of conditions and the...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'AimsUI/AimsClient/Gui/Ui_AimsQueueWidget.ui' # # Created: Tue Jun 14 09:56:35 2016 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCo...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2021 The HuggingFace Inc. 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 # # U...
python
github
https://github.com/huggingface/transformers
examples/pytorch/language-modeling/run_mlm_no_trainer.py
import { assertCode, compileSFCScript as compile } from '../utils' // in dev mode, declared bindings are returned as an object from setup() // when using TS, users may import types which should not be returned as // values, so we need to check import usage in the template to determine // what to be returned. test('co...
typescript
github
https://github.com/vuejs/core
packages/compiler-sfc/__tests__/compileScript/importUsageCheck.spec.ts
<?php namespace Illuminate\Tests\Routing; use Illuminate\Routing\RouteUri; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class RouteUriTest extends TestCase { #[DataProvider('uriProvider')] public function testRouteUrisAreProperlyParsed($uri, $expectedParsedUri, $expectedBind...
php
github
https://github.com/laravel/framework
tests/Routing/RouteUriTest.php
# 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
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.util.reflection; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; import stati...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockito/internal/util/reflection/ParameterizedConstructorInstantiatorTest.java
# Copyright (C) 2016-2019 Dmitry Marakasov <amdmi3@amdmi3.ru> # # This file is part of repology # # repology 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 optio...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # (c) 2016 Alfredo de la Fuente - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, fields, api, _ import openerp.addons.decimal_precision as dp class StockInformation(models.Model): _inherit = 'stock.information' @api.multi def _...
unknown
codeparrot/codeparrot-clean
use std::{collections::BTreeSet, sync::LazyLock}; use anyhow::{Context, Result}; use regex::Regex; use serde::Serialize; use turbo_esregex::EsRegex; use turbo_rcstr::{RcStr, rcstr}; use turbo_tasks::{ResolvedVc, Vc}; use turbo_tasks_fs::{self, FileSystemEntryType, FileSystemPath, to_sys_path}; use turbopack::module_op...
rust
github
https://github.com/vercel/next.js
crates/next-core/src/next_shared/webpack_rules/babel.rs
# -*- coding: utf-8 -*- """This file contains a parser for the Android usage-history.xml file.""" import os from xml.etree import ElementTree from dfvfs.helpers import text_file from plaso.lib import errors from plaso.lib import event from plaso.lib import eventdata from plaso.lib import timelib from plaso.parsers i...
unknown
codeparrot/codeparrot-clean
# Logic copied from PEP 513 def is_manylinux1_compatible(): # Only Linux, and only x86-64 / i686 from distutils.util import get_platform if get_platform() not in ["linux-x86_64", "linux-i686", "linux-s390x"]: return False # Check for presence of _manylinux module try: import _many...
python
github
https://github.com/pytorch/pytorch
.ci/docker/manywheel/build_scripts/manylinux1-check.py
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
unknown
codeparrot/codeparrot-clean
import glob import os from subprocess import call import shutil import pytest from tests.testing_harness import TestHarness class TrackTestHarness(TestHarness): def _test_output_created(self): """Make sure statepoint.* and track* have been created.""" TestHarness._test_output_created(self) ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from __future__ import print_function import IMP import IMP.multifit from IMP import OptionParser __doc__ = "Write assembly transformation file in other formats." class Formatter(object): def __init__(self, fh): self.fh = fh def write_header(self, settings): pass clas...
unknown
codeparrot/codeparrot-clean
#!c:\python\python.exe import sys from xml.sax import make_parser from xml.sax import ContentHandler from xml.sax.handler import feature_namespaces ######################################################################################################################## class ParsePDML (ContentHandler): def __ini...
unknown
codeparrot/codeparrot-clean
""" urllib3 - Thread-safe connection pooling and re-using. """ __author__ = 'Andrey Petrov (andrey.petrov@shazow.net)' __license__ = 'MIT' __version__ = 'dev' from .connectionpool import ( HTTPConnectionPool, HTTPSConnectionPool, connection_from_url ) from . import exceptions from .filepost import encode...
unknown
codeparrot/codeparrot-clean
# Copyright 2020 Google LLC # # 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
configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/source/ParentWithHintProperties.java
"""Utilities needed to emulate Python's interactive interpreter. """ # Inspired by similar code by Jeff Epler and Fredrik Lundh. import sys import traceback import argparse from codeop import CommandCompiler, compile_command __all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact", "compile_...
unknown
codeparrot/codeparrot-clean
{ "openFiles": ["src/app/app.routes.ts", "src/app/home/home.ts", "src/app/user/user.ts"], "title": "Define a route", "type": "editor" }
json
github
https://github.com/angular/angular
adev/src/content/tutorials/learn-angular/steps/13-define-a-route/config.json
""" Copyright 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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 ...
unknown
codeparrot/codeparrot-clean
//===--- SimplifyStrongRetainRelease.swift - strong_retain/release opt ----===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2021 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/InstructionSimplification/SimplifyStrongRetainRelease.swift
# from .models import User, Playlist, Results, Video from django.http import HttpResponse # from django.template import loader from django.shortcuts import render, redirect # from django.conf import settings from django.core.urlresolvers import reverse from django.template.loader import render_to_string from .helpers ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2009-current, Redis Ltd. * Copyright (c) 2012, Twitter, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above...
c
github
https://github.com/redis/redis
src/util.c
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to configure .deb packages. (c) 2014, Brian Coca <briancoca+ansible@gmail.com> This file is part of Ansible Ansible is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Softwa...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.db.backends import BaseDatabaseIntrospection class DatabaseIntrospection(BaseDatabaseIntrospection): # Maps type codes to Django Field types. data_types_reverse = { 16: 'BooleanField', 20: 'BigIntegerField', 21: 'SmallIntegerField', ...
unknown
codeparrot/codeparrot-clean
# Copyright 2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
unknown
codeparrot/codeparrot-clean
import sys from django.core.management.base import LabelCommand from django.template import TemplateDoesNotExist, loader from django_extensions.management.utils import signalcommand def get_template_path(path): try: template = loader.find_template(path) if template[1]: return template...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # NimCfitsio documentation build configuration file, created by # sphinx-quickstart on Mon Dec 15 15:56:38 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
unknown
codeparrot/codeparrot-clean
# Webhooks for external integrations. from django.utils.translation import ugettext as _ from zerver.lib.actions import check_send_stream_message from zerver.lib.response import json_success, json_error from zerver.decorator import REQ, has_request_variables, api_key_only_webhook_view from zerver.lib.validator import c...
unknown
codeparrot/codeparrot-clean
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
cmd/kubeadm/app/cmd/phases/init/controlplane.go
from django.db import models class NiceModel(models.Model): pass
python
github
https://github.com/django/django
tests/proxy_model_inheritance/app2/models.py
#!/usr/bin/env python # # Copyright 2006,2007,2010,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors # # This file is part of Alignak. # # Alignak 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 S...
unknown
codeparrot/codeparrot-clean
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
cmd/kube-controller-manager/app/options/deprecatedcontroller.go
#!/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
--- title: State Management --- # State Management [MODES: framework, data] <br/> <br/> State management in React typically involves maintaining a synchronized cache of server data on the client side. However, when using React Router as your framework, most of the traditional caching solutions become redundant beca...
unknown
github
https://github.com/remix-run/react-router
docs/explanation/state-management.md
#ifdef USE_VULKAN_API #include <ATen/native/quantized/PackedParams.h> #include <ATen/native/vulkan/ops/Batchnorm.h> #include <ATen/native/vulkan/ops/Common.h> #include <ATen/native/vulkan/ops/Convolution.h> #include <ATen/native/vulkan/ops/Gru.h> #include <ATen/native/vulkan/ops/Layernorm.h> #include <ATen/native/vulk...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/vulkan/ops/Register.cpp
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
unknown
codeparrot/codeparrot-clean
//////////////////////////////////////////////////////////////////////////// // // Copyright 2014 Realm 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/li...
swift
github
https://github.com/realm/realm-swift
RealmSwift/Tests/SwiftTestObjects.swift
// errorcheck // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Test that incorrect short declarations and redeclarations are detected. // Does not compile. package main func f1() int {...
go
github
https://github.com/golang/go
test/declbad.go
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
unknown
codeparrot/codeparrot-clean
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2008 Princeton University # Copyright (c) 2009 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above c...
unknown
codeparrot/codeparrot-clean
#pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) import math from mantid.kernel import * from mantid.api import * class EnggFitPeaks(PythonAlgorithm): EXPECTED_DIM_TYPE = 'Time-of-flight' PEAK_TYPE = 'BackToBackExponential' # Max limit on the estimat...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 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 by applicable law or a...
unknown
codeparrot/codeparrot-clean
from __future__ import nested_scopes """ ################################################################################ # # SOAPpy - Cayce Ullman (cayce@actzero.com) # Brian Matthews (blm@actzero.com) # Gregory Warnes (Gregory.R.Warnes@Pfizer.com) # Christopher Blunck (blunck...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import copy import ntpath import os import posixpath import re import subprocess import sys import gyp.common import gyp.easy_xml as easy_xml import gyp.MSVSNew a...
unknown
codeparrot/codeparrot-clean