code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
from django.test import RequestFactory from django.http import Http404 from nose import tools as nt import mock from tests.base import AdminTestCase from website import settings from framework.auth import User from tests.factories import UserFactory, AuthUserFactory, ProjectFactory from admin_tests.utilities import se...
unknown
codeparrot/codeparrot-clean
// // consign.hpp // ~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) // #ifndef BOOST_ASIO_CONSIGN_HPP #define BOOST_...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/asio/consign.hpp
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/abseil/DurationUnnecessaryConversionCheck.h
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.document_loaders import BlockchainDocumentLoader from langchain_community.document_loaders.blockchain import BlockchainType # Create a way to dynamically look up deprecated impo...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/document_loaders/blockchain.py
""" Team Testing Module """ import pytest import api.user import api.team import api.common import bcrypt from api.common import WebException, InternalException from common import clear_collections, ensure_empty_collections from common import base_team, base_user from conftest import setup_db, teardown_db class Test...
unknown
codeparrot/codeparrot-clean
from time import time from typing import Type, TypeVar, MutableMapping, Any, Iterable, Generator, Union import arrow import datetime import math from datapipelines import DataSource, PipelineContext, Query, NotFoundError, validate_query from .common import RiotAPIService, APINotFoundError from ...data import Platform...
unknown
codeparrot/codeparrot-clean
""" Command line script to change user enrollments. """ import logging from django.core.management.base import BaseCommand, CommandError from django.db import transaction from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.locations import SlashSeparatedCourseKey fr...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 Esteve Fernandez <esteve@apache.org> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # 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. """ Verify that relinking a solib doesn't relink a dependent executable if the solib's public API hasn't changed. """ import os import sys ...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType3.ts] //// //// [TupleType3.ts] var v: [] //// [TupleType3.js] "use strict"; var v;
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/TupleType3.js
<style> main ul li { margin: 0.5em 0; } </style> ## DRAFT RELEASE NOTES — Introduction to Go 1.27 {#introduction} **Go 1.27 is not yet released. These are work-in-progress release notes. Go 1.27 is expected to be released in August 2026.**
unknown
github
https://github.com/golang/go
doc/next/1-intro.md
from __future__ import unicode_literals import copy import logging import sys import warnings from django.conf import LazySettings from django.core import mail from django.test import TestCase, RequestFactory from django.test.utils import override_settings, patch_logger from django.utils.encoding import force_text fr...
unknown
codeparrot/codeparrot-clean
# Author: Travis Oliphant from __future__ import division, print_function, absolute_import __all__ = ['odeint'] from . import _odepack from copy import copy _msgs = {2: "Integration successful.", 1: "Nothing was done; the integration time was 0.", -1: "Excess work done on this call (perhaps wrong D...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- # Pilas engine - A video game framework. # # Copyright 2010 - Hugo Ruscitti # License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html) # # Website - http://www.pilas-engine.com.ar class Tarea(object): def __init__(self, planificador, tiempo, dt, funcion, parametros, una_vez): ...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Support\Facades; /** * @method static array preloadedAssets() * @method static string|null cspNonce() * @method static string useCspNonce(string|null $nonce = null) * @method static \Illuminate\Foundation\Vite useIntegrityKey(string|false $key) * @method static \Illuminate\Foundation\V...
php
github
https://github.com/laravel/framework
src/Illuminate/Support/Facades/Vite.php
"use strict"; const path = require("path"); /** @type {import("webpack").Configuration} */ const config = { entry: "./example.js", output: { path: path.join(__dirname, "dist"), filename: "[name].js", chunkFilename: "[name].js", publicPath: "/dist/" }, optimization: { chunkIds: "deterministic" // To keep...
javascript
github
https://github.com/webpack/webpack
examples/module-worker/webpack.config.js
#!/usr/bin/python # # Copyright (C) 2013 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...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Tests for the configuration file/command-line arguments. """ # This test should be run from its directory. # TODO A configmanager object cannot parse multiple times a config file # and/or the command line, preventing to 'reload' a configuration. import os import config config_file_00 =...
unknown
codeparrot/codeparrot-clean
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Creates a session object in your WSGI environment. Use like: ..code-block:: Python environ['paste.session.factory']() This will return a d...
unknown
codeparrot/codeparrot-clean
import numpy from numba import jit, prange from tqdm import tqdm class DifferentialEvolution: def __init__(self, amount_of_individuals, end_cond, end_method='max_iter', f=0.5, p=0.9, min_element=-1, max_element=1): self.amount_of_individuals = amount_of_individuals self.end_cond = ...
unknown
codeparrot/codeparrot-clean
--- title: BrowserRouter --- # BrowserRouter <!-- ⚠️ ⚠️ IMPORTANT ⚠️ ⚠️ Thank you for helping improve our documentation! This file is auto-generated from the JSDoc comments in the source code, so please edit the JSDoc comments in the file below and this file will be re-generated once those changes are merged. http...
unknown
github
https://github.com/remix-run/react-router
docs/api/declarative-routers/BrowserRouter.md
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants_test.pant...
unknown
codeparrot/codeparrot-clean
# Background processing using web workers [Web workers](https://developer.mozilla.org/docs/Web/API/Web_Workers_API) let you run CPU-intensive computations in a background thread, freeing the main thread to update the user interface. Application's performing a lot of computations, like generating Computer-Aided Design ...
unknown
github
https://github.com/angular/angular
adev/src/content/ecosystem/web-workers.md
import os import subprocess import sys import logging import re import gzip import tempfile import signal from time import sleep #queue for threads #regex for hash at start of line try: import Queue as Queue except ImportError: import queue as Queue from threading import Thread logger = logging.getLogger(__nam...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """A recalculation engine, something like a spreadsheet. Goals: - Allow construction of a calculation in a flexible and declarative way. - Enable caching at any step in the calculation where it makes sense. Terms: - Definition - defines one cachable step in a complex calculation. - Parameter...
unknown
codeparrot/codeparrot-clean
""" ========================= Multi-dimensional scaling ========================= An illustration of the metric and non-metric MDS on generated noisy data. The reconstructed points using the metric MDS and non metric MDS are slightly shifted to avoid overlapping. """ # Author: Nelle Varoquaux <nelle.varoquaux@gmail....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # Copyright (c) 2013, Benno Joy <benno@ansible.com> # # This module 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 vers...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python from xml.dom import minidom import re import sys import time import pickle if len(sys.argv) < 2: sys.stderr.write('Usage: sys.argv[0] numer\n') sys.exit(1) numer=sys.argv[1] def loaddata(): #otwieramy plik w parserze DOMTree = minidom.parse('T1-PSTN.xml') cNodes = DOMTree.childN...
unknown
codeparrot/codeparrot-clean
from functools import total_ordering from django.db.migrations.state import ProjectState from django.utils.datastructures import OrderedSet from .exceptions import CircularDependencyError, NodeNotFoundError @total_ordering class Node: """ A single node in the migration graph. Contains direct links to adjacen...
python
github
https://github.com/django/django
django/db/migrations/graph.py
"""Provide class for testing in French locale """ import locale import sys import pytest __ALL__ = ['CommaDecimalPointLocale'] def find_comma_decimal_point_locale(): """See if platform has a decimal point as comma locale. Find a locale that uses a comma instead of a period as the decimal point. Re...
python
github
https://github.com/numpy/numpy
numpy/_core/tests/_locales.py
import os.path from os.path import join from scipy._build_utils import numpy_nodepr_api def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration from scipy._build_utils.system_info import get_info from scipy._build_utils import (gfortran_legacy_flag_hook, ...
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
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation # # 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, incl...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """add new notification type Revision ID: 1431e7094e26 Revises: 2b89912f95f1 Create Date: 2015-05-14 13:02:12.165612 """ from alembic import op import sqlalchemy as sa from sqlalchemy.sql import table, co...
unknown
codeparrot/codeparrot-clean
from .utils import get_pokemon_rarity, get_pokemon_name from pogom.utils import get_args from datetime import datetime args = get_args() # Temporarily disabling because -o and -i is removed from # 51f651228c00a96b86f5c38d1a2d53b32e5d9862. # IGNORE = None # ONLY = None # if args.ignore: # IGNORE = [i.lower().strip...
unknown
codeparrot/codeparrot-clean
""" Routines for determining whether a given story is syndicated from the Associated Press. The algorithm used in this module was developed using a decision tree algorithm: 'ap_mentions_sentences', '1' => '1', X '0' => [ X 'associated_press_mentions', '1' => [ X ...
unknown
codeparrot/codeparrot-clean
""" Coroutine related boilerplate and wrappers. """ __all__ = ['local', 'coro', 'coroutine', 'Coroutine', 'CoroutineInstance', 'CoroutineException'] import types import sys import traceback import events from util import priority ident = None class local(object): """A threadlocal-like object that works in the c...
unknown
codeparrot/codeparrot-clean
# Copyright 2021 The Fairseq Authors and 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 # #...
python
github
https://github.com/huggingface/transformers
src/transformers/models/bart/modeling_bart.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package initwd import ( "bytes" "context" "flag" "fmt" "io/ioutil" "os" "path/filepath" "strings" "testing" "github.com/davecgh/go-spew/spew" "github.com/go-test/deep" "github.com/google/go-cmp/cmp" version "github.com/hashicorp/go-ve...
go
github
https://github.com/hashicorp/terraform
internal/initwd/module_install_test.go
/* * The public DType API */ #ifndef NUMPY_CORE_INCLUDE_NUMPY___DTYPE_API_H_ #define NUMPY_CORE_INCLUDE_NUMPY___DTYPE_API_H_ struct PyArrayMethodObject_tag; /* * Largely opaque struct for DType classes (i.e. metaclass instances). * The internal definition is currently in `ndarraytypes.h` (export is a bit * more...
c
github
https://github.com/numpy/numpy
numpy/_core/include/numpy/dtype_api.h
# -*- coding: utf-8 -*- """ requests.api ~~~~~~~~~~~~ This module implements the Requests API. :copyright: (c) 2012 by Kenneth Reitz. :license: Apache2, see LICENSE for more details. """ from . import sessions def request(method, url, **kwargs): """Constructs and sends a :class:`Request <Request>`. :param...
unknown
codeparrot/codeparrot-clean
import A from "./a.js"; import { A1 } from "./dep1"; export default class B { constructor() {} test() { this.a = new A(); this.a2 = new A1(); } }
javascript
github
https://github.com/webpack/webpack
test/cases/inner-graph/extend-class/b.js
from __future__ import absolute_import import numpy as np from ..models import FactorRange, DataRange1d, Range1d, BoxSelectTool from ..plotting import figure from .plotting import make_continuous_bar_source, make_categorical_bar_source class CrossFilterPlugin(object): """An adapter class between CrossFilter an...
unknown
codeparrot/codeparrot-clean
import django from django.db.models.signals import class_prepared from django.utils import six try: from django.contrib.auth import get_user_model as auth_get_user_model except ImportError: auth_get_user_model = None from django.contrib.auth.models import User from account.conf import settings AUTH_USER...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it unde...
unknown
codeparrot/codeparrot-clean
""" Wheel command-line utility. """ import os import hashlib import sys import json import wheel.paths from glob import iglob from .. import signatures from ..util import (urlsafe_b64decode, urlsafe_b64encode, native, binary, matches_requirement) from ..install import WheelFile def require_pkgres...
unknown
codeparrot/codeparrot-clean
"""Test for Inter Satellite Sync related Upgrade Scenario's :Requirement: Upgraded Satellite :CaseAutomation: Automated :CaseLevel: Component :CaseComponent: InterSatelliteSync :TestType: Functional :CaseImportance: High :Upstream: No """ from fauxfactory import gen_string from nailgun import entities from robot...
unknown
codeparrot/codeparrot-clean
# (c) 2017 Ansible Project # 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 DOCUMENTATION = """ name: vars author: Ansible Core Team version_added: "2.5" short_description...
unknown
codeparrot/codeparrot-clean
<!--- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may...
unknown
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/site/markdown/release/0.23.9/CHANGELOG.0.23.9.md
import { __String, addInternalEmitFlags, addRange, addRelatedInfo, append, arrayIsEqualTo, AsExpression, BuilderProgram, CancellationToken, canHaveDecorators, canHaveIllegalDecorators, chainDiagnosticMessages, changeExtension, changesAffectingProgramStructure, ...
typescript
github
https://github.com/microsoft/TypeScript
src/compiler/program.ts
# # distutils/version.py # # Implements multiple version numbering conventions for the # Python Module Distribution Utilities. # # $Id$ # """Provides classes to represent module version numbers (one class for each style of version numbering). There are currently two such classes implemented: StrictVersion and LooseVe...
unknown
codeparrot/codeparrot-clean
# Dependency management ## Table of Contents - **[Main branch](#main-branch)** - [Dependencies used in workflows](#dependencies-used-in-workflows) - [Bumping order](#bumping-order) - [Steps to bump a dependency](#steps-to-bump-a-dependency) - [Alternative: Using the update_dep.sh script](#alternative-using-...
unknown
github
https://github.com/etcd-io/etcd
Documentation/contributor-guide/dependency_management.md
# Copyright (C) Daniel Fandrich, <dan@coneharvesters.com>, et al. # # SPDX-License-Identifier: curl # This workflow will triage pull requests and apply a label based on the # paths that are modified in the pull request. # # To use this workflow, you will need to set up a .github/labeler.yml # file with configuration. ...
unknown
github
https://github.com/curl/curl
.github/workflows/label.yml
// Copyright 2015 Google Inc. All Rights Reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the COPYING file in the root of the source // tree. An additional intellectual property rights grant can be found // in the file PATENTS. All contributing project authors may // be...
c
github
https://github.com/opencv/opencv
3rdparty/libwebp/src/dsp/rescaler_sse2.c
/* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not u...
java
github
https://github.com/elastic/elasticsearch
benchmarks/src/main/java/org/elasticsearch/benchmark/tdigest/SortBench.java
/* Copyright (c) 2015, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including...
c
github
https://github.com/mysql/mysql-server
sql/opt_hints.h
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import json import os import tempfile import unittest from StringIO import StringIO import mozun...
unknown
codeparrot/codeparrot-clean
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import SocketServer import socket import json class LogMessageServer(SocketServer.TCPServer): def __init__(self, se...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # 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 #...
unknown
codeparrot/codeparrot-clean
import warnings warnings.warn("sklearn.metrics.metrics is deprecated and will be removed in " "0.18. Please import from sklearn.metrics", DeprecationWarning) from .ranking import auc from .ranking import average_precision_score from .ranking import label_ranking_average_precision_score from...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, division, print_function from itertools import product from math import ceil from numbers import Number from operator import getitem, add import numpy as np from toolz import merge, first, accumulate, pluck from ..base import tokenize from ..compatibility import long def sani...
unknown
codeparrot/codeparrot-clean
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/lite/allocation.h
import re from django.db.backends import BaseDatabaseIntrospection field_size_re = re.compile(r'^\s*(?:var)?char\s*\(\s*(\d+)\s*\)\s*$') def get_field_size(name): """ Extract the size number from a "varchar(11)" type name """ m = field_size_re.search(name) return int(m.group(1)) if m else None # This lig...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Jimmy Tang <jcftang@gmail.com> # Based on okpg (Patrick Pelletier <pp.pelletier@gmail.com>), pacman # (Afterburn) and pkgin (Shaun Zinck) modules # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public ...
unknown
codeparrot/codeparrot-clean
# pylint: disable=g-bad-file-header # 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/LICENS...
unknown
codeparrot/codeparrot-clean
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
unknown
codeparrot/codeparrot-clean
// Modules to control application life and create native browser window const {app, BrowserWindow} = require('electron') const path = require('path') // Keep a global reference of the window object, if you don't, the window will // be closed automatically when the JavaScript object is garbage collected. let mainWindow...
javascript
github
https://github.com/opencv/opencv
doc/js_tutorials/js_assets/webnn-electron/main.js
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0...
go
github
https://github.com/kubernetes/kubernetes
pkg/apis/certificates/v1/zz_generated.validations.go
<!--Copyright 2024 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/llava_onevision.md
""" Unittests for migrating a course to split mongo """ from django.core.management import CommandError, call_command from django.test import TestCase from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError from xm...
unknown
codeparrot/codeparrot-clean
""" Copyright (C) 2018 Quinn D Granfor <spootdev@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ve...
unknown
codeparrot/codeparrot-clean
""" ============================================================ Visualize channel over epochs as images in sensor topography ============================================================ This will produce what is sometimes called event related potential / field (ERP/ERF) images. One sensor topography plot is produced...
unknown
codeparrot/codeparrot-clean
/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const RuntimeModule = require("../RuntimeModule"); const Template = require("../Template"); const { generateJavascriptHMR } = require("../hmr/JavascriptHotModuleReplacementHelper")...
javascript
github
https://github.com/webpack/webpack
lib/node/ReadFileChunkLoadingRuntimeModule.js
# -*- coding: utf-8 -*- from south.db import db from django.db import models from adm.application.models import * class Migration: def forwards(self, orm): # Adding field 'Applicant.is_offline' db.add_column('application_applicant', 'is_offline', orm['application.applicant:is_offline']) def...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 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
{ "dependencies": { "browser-ui-test": "^0.23.3", "es-check": "^9.4.4", "eslint": "^8.57.1", "typescript": "^5.8.3" } }
json
github
https://github.com/rust-lang/rust
package.json
from django.http import HttpResponse import json import socket from data.models import Comment def processRequestFromOtherServer(obj, dict_type): json_dict = {} json_dict_list = [] if dict_type is "author": json_dict_list.append(getAuthorDict(obj)) elif dict_type is "posts": for posts ...
unknown
codeparrot/codeparrot-clean
# prerequisites imports from ctypes import c_void_p from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException from django.contrib.gis.gdal.prototypes import ds as capi from django.utils import six from django.utils.encoding import force_bytes # For more information, see ...
unknown
codeparrot/codeparrot-clean
import os import sys from django.db.backends.creation import BaseDatabaseCreation class DatabaseCreation(BaseDatabaseCreation): # SQLite doesn't actually support most of these types, but it "does the right # thing" given more verbose field definitions, so leave them as is so that # schema inspection is mor...
unknown
codeparrot/codeparrot-clean
# Copyright 2020 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 applicabl...
python
github
https://github.com/huggingface/transformers
src/transformers/utils/hp_naming.py
# coding=utf-8 # Copyright 2020 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
unknown
codeparrot/codeparrot-clean
// Copyright 2018 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package storage import ( "bytes" "fmt" "github.com/cockroachdb/cockroach/pkg/keys" "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroac...
go
github
https://github.com/cockroachdb/cockroach
pkg/storage/mvcc_logical_ops.go
#define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> #include "npy_config.h" #include "npy_pycompat.h" #include "numpy/arrayobject.h" #define NPY_NUMBER_MAX(a, b) ((a) > (b) ? (a) : (b)) #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0])) /* * Functions us...
c
github
https://github.com/numpy/numpy
numpy/_core/src/multiarray/temp_elide.c
# Copyright 2015 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
from pybench import Test from string import join class ConcatStrings(Test): version = 2.0 operations = 10 * 5 rounds = 100000 def test(self): # Make sure the strings are *not* interned s = join(map(str,range(100))) t = join(map(str,range(1,101))) for i in xrange(self...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """ Syncs a database table to the `DocType` (metadata) .. note:: This module is only used internally """ import os import frappe from frappe import _ from frappe.utils import...
unknown
codeparrot/codeparrot-clean
#------------------------------------------------------------------------ # # Copyright (C) 2000 Autonomous Zone Industries # # License: This is free software. You may use this software for any # purpose including modification/redistribution, so long as # this header remains intact and...
unknown
codeparrot/codeparrot-clean
""" Base classes for writing management commands (named commands which can be executed through ``django-admin`` or ``manage.py``). """ import argparse import os import sys from argparse import ArgumentParser, HelpFormatter from functools import partial from io import TextIOBase import django from django.core import c...
python
github
https://github.com/django/django
django/core/management/base.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
unknown
codeparrot/codeparrot-clean
// Subscripts.swift - Very brief description // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information /...
swift
github
https://github.com/apple/swift
benchmark/cxx-source/ReadAccessor.swift
"""Classes handling iconic fonts""" from __future__ import print_function import json import os from .. import six from ..Qt import QtCore, QtGui _default_options = { 'color': QtGui.QColor(50, 50, 50), 'color_disabled': QtGui.QColor(150, 150, 150), 'opacity': 1.0, 'scale_factor': 1.0, } def set_glo...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
unknown
codeparrot/codeparrot-clean
import unittest from unittest.mock import patch, MagicMock, PropertyMock from saspy.sas_magic import SASMagic from saspy import SASsession class TestSASMagic(unittest.TestCase): @classmethod def setUpClass(cls): pass @classmethod def tearDownClass(cls): pass def setUp(self): ...
unknown
codeparrot/codeparrot-clean
from datetime import datetime from django.conf import settings from django.db.models import Q from django.db.transaction import non_atomic_requests from django.utils.datastructures import MultiValueDictKeyError from django.http import Http404 from django.views.decorators.cache import cache_control import commonware f...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2011 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
java
github
https://github.com/google/guava
android/guava/src/com/google/common/math/DoubleUtils.java
/*------------------------------------------------------------------------- * * jsonb_op.c * Special operators for jsonb only, used by various index access methods * * Copyright (c) 2014-2026, PostgreSQL Global Development Group * * * IDENTIFICATION * src/backend/utils/adt/jsonb_op.c * *------------------...
c
github
https://github.com/postgres/postgres
src/backend/utils/adt/jsonb_op.c
"""Dates and times""" __copyright__ = "Copyright (C) 2014 Ivan D Vasin" __docformat__ = "restructuredtext" import spruce.datetime as _dt import sqlalchemy as _sqla def current_datetime(engine): # TODO (Python 3): #def current_datetime(*, engine): """The current date and time on the database server The resul...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2008, 2009, 2010, 2011, 2012 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## Licens...
unknown
codeparrot/codeparrot-clean