code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.tools import AINAppOps from langchain_community.tools.ainetwork.app import AppOperationType, AppSchema # Create a way to dynamically look up deprecated imports. # Used to consol...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/tools/ainetwork/app.py
from pandas._libs import ( NaT, Period, Timedelta, Timestamp, ) from pandas._libs.missing import NA from pandas.core.dtypes.dtypes import ( ArrowDtype, CategoricalDtype, DatetimeTZDtype, IntervalDtype, PeriodDtype, ) from pandas.core.dtypes.missing import ( isna, isnull, ...
python
github
https://github.com/pandas-dev/pandas
pandas/core/api.py
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\SecurityBundle\Tests\Functional; use PHPUnit\Framework\A...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php
import os import sys import unittest import test.support import collections import email from email.message import Message from email._policybase import compat32 from test.test_email import __file__ as landmark # Run all tests in package for '-m unittest test.test_email' def load_tests(loader, standard_tests, pattern)...
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/configurationprocessor/test/TestableAnnotationProcessor.java
# 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 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.descriptors.symbols.pointers import org.jetbrains.kotlin.analysis.a...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/pointers/KaFe10NeverRestoringSymbolPointer.kt
# -*- coding: utf-8 -*- import logging import os import time from os import listdir from os.path import join from threading import Thread, Lock from select import select from Queue import Queue, Empty import openerp import openerp.addons.hw_proxy.controllers.main as hw_proxy from openerp import http from openerp.http ...
unknown
codeparrot/codeparrot-clean
"""The unittest.TestCase to inject multiple cluster connection strings into TestData.""" from typing import Optional from buildscripts.resmokelib import logging from buildscripts.resmokelib.testing.testcases import jsrunnerfile class BulkWriteClusterTestCase(jsrunnerfile.JSRunnerFileTestCase): """A test to execu...
python
github
https://github.com/mongodb/mongo
buildscripts/resmokelib/testing/testcases/bulk_write_cluster_js_test.py
/* * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.standalone.fir.test.cases.generated.cases.symbols; import com.intel...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/generated/cases/symbols/FirStandaloneNormalAnalysisSourceModuleSymbolByReferenceTestGenerated.java
An import was unresolved. Erroneous code example: ```compile_fail,E0432 use something::Foo; // error: unresolved import `something::Foo`. ``` In Rust 2015, paths in `use` statements are relative to the crate root. To import items relative to the current and parent modules, use the `self::` and `super::` prefixes, re...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0432.md
This guide explains what to do to send a GCC patch for review. All the commands are supposed to be run in the folder where you cloned GCC. ```bash ./contrib/gcc-changelog/git_check_commit.py ``` You can provide a specific commit hash: ```bash ./contrib/gcc-changelog/git_check_commit.py abdef78989 ``` a range: ```...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_codegen_gcc/doc/sending-gcc-patch.md
# -*- 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
{ "description": "Angular Elements", "files":[ "!**/*.d.ts", "!**/*.js", "!**/*.[1].*" ], "file": "src/app/popup.service.ts", "tags":["cookbook"] }
json
github
https://github.com/angular/angular
adev/src/content/examples/elements/stackblitz.json
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocol...
unknown
codeparrot/codeparrot-clean
function Component() { 'use strict'; let [count, setCount] = React.useState(0); const update = () => { 'worklet'; setCount(count => count + 1); }; return <button onClick={update}>{count}</button>; }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/arrow-expr-directive.js
# 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
# @MUNTJAC_COPYRIGHT@ # @MUNTJAC_LICENSE@ """Interface for validatable objects.""" class IValidatable(object): """Interface for validatable objects. Defines methods to verify if the object's value is valid or not, and to add, remove and list registered validators of the object. @author: Vaadin Ltd. ...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts] //// //// [ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts] class clodule<T> { id: string; ...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js
import sys import os import gzip import zipfile from optparse import make_option from django.core.management.base import BaseCommand from django.core.management.color import no_style try: set except NameError: from sets import Set as set # Python 2.3 fallback try: import bz2 has_bz2 = True except I...
unknown
codeparrot/codeparrot-clean
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\LegacyBundle; us...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/LegacyBundle/LegacyBundle.php
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import unitt...
unknown
codeparrot/codeparrot-clean
# # Copyright 2008,2009 Free Software Foundation, Inc. # # This application 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 your option) # any later version. # # This application is di...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function, division import matplotlib import logging from sys import stdout matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from neuralnilm import (Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer, Bidirectiona...
unknown
codeparrot/codeparrot-clean
pr: 138217 summary: Increase DiskBBQ vector block bulk size to 32 area: Vector Search type: enhancement issues: - 134224
unknown
github
https://github.com/elastic/elasticsearch
docs/changelog/138217.yaml
# # 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 distributed in the hope tha...
unknown
codeparrot/codeparrot-clean
{ "title": "Create housing location component", "type": "editor", "answerSrc": "../04-interfaces/src", "answerRootDir": "../04-interfaces/", "openFiles": ["src/app/home/home.ts"] }
json
github
https://github.com/angular/angular
adev/src/content/tutorials/first-app/steps/03-HousingLocation/config.json
import errno import functools import glob import logging import os import shutil from functools import partial from multiprocessing.pool import ThreadPool from typing import AnyStr from typing import Dict from typing import List from typing import Optional from urllib.parse import unquote from urllib.parse import urljo...
unknown
codeparrot/codeparrot-clean
package org.mockitousage.androidtest import org.junit.After import org.junit.Before import org.junit.Test import org.mockito.Mock import org.mockito.MockitoAnnotations class JUnit4BasicTests { private var closeable: AutoCloseable? = null private lateinit var sharedJUnitTests: SharedJUnitTests @Mock priv...
kotlin
github
https://github.com/mockito/mockito
mockito-integration-tests/android-tests/src/test/java/org/mockitousage/androidtest/JUnit4BasicTests.kt
#!/usr/bin/env bash # 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. # Generate Go code listing errors and other #defined constant # values (ENAMETOOLONG etc.), by asking the preprocessor # about the definitions....
unknown
github
https://github.com/golang/go
src/syscall/mkerrors.sh
from services.acservice.constants import LICENSE_UNKNOWN, LICENSE_CC0, LICENSE_CC_BY, LICENSE_CC_BY_NC, \ LICENSE_CC_BY_NC_ND, LICENSE_CC_BY_NC_SA, LICENSE_CC_BY_ND, LICENSE_CC_BY_SA, LICENSE_CC_SAMPLING_PLUS from pyparsing import CaselessLiteral, Word, alphanums, alphas8bit, nums, quotedString, \ operatorPrece...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 import argparse import os import sys import boto3 import json def get_entity_sizes(bucket, prefix): s3 = boto3.client("s3") prefix = f"{prefix}social_network/csv/raw/composite-merged-fk/dynamic/" more = True token = None sizes = {} while more: resp = s3.list_obj...
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
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright (C) 2014 Harvard # # Authors: # Xavier Antoviaque <xavier@antoviaque.org> # # This software's license gives you freedom; you can copy, convey, # propagate, redistribute and/or modify this program under the terms of # the GNU Affero General Public License (AGPL) as publishe...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python #-*- coding: utf-8 -*- __author__ = 'mah' __email__ = 'andrew.makhotin@gmail.com' import logging import logging.handlers logger = logging.getLogger('Logging for check_sound') logger.setLevel(logging.DEBUG) formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') handler = loggi...
unknown
codeparrot/codeparrot-clean
############################################################################## # # Copyright (c) 2004 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. # THIS SOF...
unknown
codeparrot/codeparrot-clean
import numpy as np import blockmodels as bm def draw(b): """Draw a graph from a blockmodel. """ graph = np.zeros((b.n, b.n)) for e in bm.ndindex(graph.shape): gix = tuple(b.groups[list(e)]) graph[e] = 1 if b.p[gix] > np.random.random() else 0 return graph def produce_stats(b, N=10...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################### # # RunXPathQuery # Executes an XPath query against a specified XML file and returns the result in CSV or JSON format. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache ...
unknown
codeparrot/codeparrot-clean
def Odd_Length_Sum(arr): Sum = 0 l = len(arr) for i in range(l): Sum += ((((i + 1) *(l - i) + 1) // 2) * arr[i]) return Sum
unknown
mbpp
// Copyright 2019 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package acceptance import ( "bytes" "io" "os" "os/exec" "path/filepath" "strconv" "testing" "github.com/cockroachdb/cockroach/pkg/acceptance/cluster" "github....
go
github
https://github.com/cockroachdb/cockroach
pkg/acceptance/compose_test.go
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\ExpressionLanguage; /** * Represents a function that...
php
github
https://github.com/symfony/symfony
src/Symfony/Component/ExpressionLanguage/ExpressionFunction.php
# =============================================================================== # Copyright 2012 Jake Ross # # 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...
unknown
codeparrot/codeparrot-clean
# coding: utf8 { '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN', '%Y-%m-%d': '%Y-%m-%d', '%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S', '%s r...
unknown
codeparrot/codeparrot-clean
""" Created on 30 Sep 2016 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) example JSON: {"calibrated-on": "2017-07-19T13:56:48.289+00:00", "v20": 0.002891} """ from collections import OrderedDict from scs_core.data.datetime import LocalizedDatetime from scs_core.data.datum import Datum from scs_core.dat...
unknown
codeparrot/codeparrot-clean
import { test } from '../../test'; export default test({ warnings: [ { code: 'css_unused_selector', message: 'Unused CSS selector ".b + .c"', start: { character: 137, column: 1, line: 11 }, end: { character: 144, column: 8, line: 11 } } ] });
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/css/samples/siblings-combinator-slot/_config.js
""" raven.utils ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import hashlib import hmac import logging try: import pkg_resources except ImportError: pkg_resources = None import sys logger = logging.getLogger('raven...
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/util/proto/decode.h
/* 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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/util/gpu_kernel_helper.h
from contextlib import contextmanager import re from .common import * from .scraper import VhxScraper, AuthenticationError listings = [ ('all', { 'label': 'All videos', 'iconImage': base_path('icon.png'), 'thumbnailImage': base_path('icon.png'), }), ] for channel, l...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.document_loaders import TomlLoader # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imp...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/document_loaders/toml.py
#!/bin/sh test_description='test finding specific blobs in the revision walking' . ./test-lib.sh test_expect_success 'setup ' ' git commit --allow-empty -m "empty initial commit" && echo "Hello, world!" >greeting && git add greeting && git commit -m "add the greeting blob" && # borrowed from Git from the Bottom...
unknown
github
https://github.com/git/git
t/t4064-diff-oidfind.sh
from __future__ import print_function from bokeh.browserlib import view from bokeh.models import ColumnDataSource, DataRange1d, Plot, LinearAxis, Grid, Circle, HoverTool, BoxSelectTool from bokeh.models.widgets import ( Select, DataTable, TableColumn, StringFormatter, NumberFormatter, StringEditor, IntEditor, ...
unknown
codeparrot/codeparrot-clean
#-*- coding:utf-8 -*- ############################################################################## # # Copyright (C) 2015 One Click Software (http://oneclick.solutions) # and Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # This program is free software: you ca...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage Check Point Firewall (c) 2019 # # 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 o...
unknown
codeparrot/codeparrot-clean
""" Base classes for writing management commands (named commands which can be executed through ``django-admin.py`` or ``manage.py``). """ import os import sys from optparse import make_option, OptionParser import django from django.core.exceptions import ImproperlyConfigured from django.core.management.color import ...
unknown
codeparrot/codeparrot-clean
from django.conf import settings from django.core import signals from django.core.exceptions import ImproperlyConfigured from django.db.utils import (ConnectionHandler, ConnectionRouter, load_backend, DEFAULT_DB_ALIAS, DatabaseError, IntegrityError) __all__ = ('backend', 'connection', 'connections', 'router', 'Dat...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str from os.path import dirname, abspath, join from indra.benchmarks import bioprocesses as bp # from indra.benchmarks import complexes as cp from indra.benchmarks import phosphorylations as phos from indra.util import u...
unknown
codeparrot/codeparrot-clean
# pylint: disable=C0111 # pylint: disable=W0621 from lettuce import world, step @step(u'I open the help form') def open_help_modal(step): help_css = 'div.help-tab' world.css_click(help_css) @step(u'I report a "([^"]*)"$') def submit_problem_type(step, submission_type): type_css = '#feedback_link_{}'.form...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import abc from json import dumps import mock import pytest import mendeley from nose.tools import * # flake8: noqa from github3.repos import Repository from addons.bitbucket.tests.factories import BitbucketAccountFactory, BitbucketNodeSettingsFactory from addons.box.tests.factories import Bo...
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
connect/mirror/src/test/java/org/apache/kafka/connect/mirror/MirrorHeartbeatTaskTest.java
# -*- coding: utf-8 -*- # # simple.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 # (a...
unknown
codeparrot/codeparrot-clean
# Copyright 2018 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
--- setup: - do: something: here: ok --- teardown: - do: something_else: here: true --- "First test": - do: something: that_is: true - do: and: again - match: { copied.from.real.test.total: 1 } - match: { hits.hits.0._index: "single_doc_index"} - match: {...
unknown
github
https://github.com/elastic/elasticsearch
build-tools-internal/src/test/resources/rest/transform/match/match_original.yml
# Copyright (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: nmap plugin_type: inventory version_added: "2.6" short_des...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2006-2008 The Regents of The University of Michigan # Copyright (c) 2012-2015 Mark D. Hill and David A. Wood # 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 so...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 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; eith...
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/. from lib import l10n_utils import jingo from django.core.mail import EmailMessage from django.shortcuts import redirect...
unknown
codeparrot/codeparrot-clean
from distutils.version import StrictVersion from pyparsing import ( __version__, alphanums, alphas, CaselessKeyword, CaselessLiteral, Combine, delimitedList, FollowedBy, Forward, Group, LineEnd, Literal, OneOrMore, Optional, printables, quotedString, Regex, Word, ZeroOrMore, ) grammar = Forward() express...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software 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 t...
unknown
codeparrot/codeparrot-clean
"""Tests for db backends Authors: * Min RK """ #------------------------------------------------------------------------------- # Copyright (C) 2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #...
unknown
codeparrot/codeparrot-clean
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2014 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the righ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2010-2015 Free Software Foundation, Inc. # 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 Foundation; either version 3 of the License, or # (at your option) any later version. # # This progr...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import math from nose import SkipTest from nose.tools import * import networkx class TestKatzCentrality(object): def test_K5(self): """Katz centrality: K5""" G = networkx.complete_graph(5) alpha = 0.1 b = networkx.katz_centrality(G, alpha) v = math.s...
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 applica...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import re import misaka as m from tornado import escape from pygments import highlight from pygments.lexers import get_lexer_by_name from pygments.formatters import HtmlFormatter __all__ = ['markdown'] _emoji_list = [ "-1", "0", "1", "109", "2", "3", "4", "5", "6", "7", "8", "8ball", "9", ...
unknown
codeparrot/codeparrot-clean
#/usr/bin/env python #PBS -l nodes=4:ppn=8 #PBS -l walltime=02:15:00 from ase import Atom, Atoms from ase.io import read from ase.constraints import FixAtoms from ase.optimize.test import run_test from gpaw import GPAW from gpaw import Mixer from gpaw.poisson import PoissonSolver name = 'nanoparticle' def get_atoms(...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context/src/main/java/org/springframework/scheduling/config/FixedDelayTask.java
import logging import time from scrapy.dupefilters import BaseDupeFilter from scrapy.utils.request import request_fingerprint from . import defaults from .connection import get_redis_from_settings logger = logging.getLogger(__name__) # TODO: Rename class to RedisDupeFilter. class RFPDupeFilter(BaseDupeFilter): ...
unknown
codeparrot/codeparrot-clean
import datetime from nlservice import db from flask import jsonify class Subscriber(db.Model): id = db.Column(db.Integer, primary_key = True) email = db.Column(db.String(120), index = True, unique = True) datesubbed = db.Column(db.String(12), index = True, unique = False) # Add a user to the database @staticmeth...
unknown
codeparrot/codeparrot-clean
name: Build CI Container permissions: contents: read on: push: branches: - main paths: - .github/workflows/build-ci-container.yml - '.github/workflows/containers/github-action-ci/**' - '.github/actions/build-container/**' - '.github/actions/push-container/**' pull_request: ...
unknown
github
https://github.com/llvm/llvm-project
.github/workflows/build-ci-container.yml
#!/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 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals import os import json import collections import warnings from pymatgen.core.periodic_table import get_el_sp """ This class implements definitions for various ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ Commandable Feedback """ from bacpypes.debugging import bacpypes_debugging, ModuleLogger from bacpypes.consolelogging import ConfigArgumentParser from bacpypes.core import run from bacpypes.basetypes import StatusFlags from bacpypes.app import BIPSimpleApplication from bacpypes.object imp...
unknown
codeparrot/codeparrot-clean
from pandas.core.internals.api import make_block # pseudo-public version from pandas.core.internals.array_manager import ( ArrayManager, SingleArrayManager, ) from pandas.core.internals.base import ( DataManager, SingleDataManager, ) from pandas.core.internals.blocks import ( # io.pytables, io.packers...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as BaseProvider # Taiwan jobs from # http://www.104.com.tw/public/function01/utf8/jsonJobCat.js # on Fri May 20 23:13:46 CST 2016 class Provider(BaseProvider): jobs = [ 'BIOS工程師', 'CAD/CAM工程師', 'CNC機台操作人員', ...
unknown
codeparrot/codeparrot-clean
function component(a) { let z = {a: {a}}; let x = function () { console.log(z.a.a); }; return x; } export const FIXTURE_ENTRYPOINT = { fn: component, params: ['TodoAdd'], isComponent: 'TodoAdd', };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/capturing-nested-member-expr.js
import base64 import hashlib import hmac try: import simplejson as json except ImportError: import json # flake8: noqa import time from datetime import datetime from facepy.exceptions import * class SignedRequest(object): """ Facebook uses "signed requests" to communicate with applications on the Fa...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 import logging import os import re import sys EXIT_SUCCESS = 0 EXIT_FAILURE = 1 SELFNAME = str(os.path.basename(__file__)) LOG = logging.getLogger(SELFNAME) def read_all_lines_from_file(filepath): with open(filepath, mode='r', encoding='utf8', errors='ignore') as fh: ...
unknown
codeparrot/codeparrot-clean
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Loader\Configurator; use Symfony\...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/SecurityBundle/Resources/config/password_hasher.php
import os from .plugin import Plugin from .messenger import Messenger from .context import Context class Dispatcher(object): def __init__(self, base_directory): self._log = Messenger() self._setup_context(base_directory) self._load_plugins() def _setup_context(self, base_directory): ...
unknown
codeparrot/codeparrot-clean
/** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distribute...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestZKSignerSecretProvider.java
from __future__ import print_function import os import re from esp8266_setup.tools import BASE_DIR, current_user, replace_placeholders def make_project_makefile(mk, args): # Add the SDK libs as requested if args.sdk_libs is not None: libs = " ".join(args.sdk_libs.split(",")) m = re.search(r'^...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import fields, models from openerp import tools class crm_activity_report(models.Model): """ CRM Lead Analysis """ _name = "crm.activity.report" _auto = False _description = "CRM Activity An...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import msgprint, _ from frappe.utils import cint from erpnext.accounts.doctype.sales_invoice.sales_invoice import set_account_...
unknown
codeparrot/codeparrot-clean
from django import forms from django.utils.datastructures import SortedDict from django.utils.html import escape from django.utils.encoding import force_unicode from xadmin.sites import site from xadmin.views import BaseAdminPlugin, ListAdminView, ModelFormAdminView, DetailAdminView NON_FIELD_ERRORS = '__all__' class...
unknown
codeparrot/codeparrot-clean
/* @Copyright Barrett Adair 2015-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_CLBL_TRTS_REMOVE_MEMBER_CONST_HPP #define BOOST_CLBL_TRTS_REMOVE_MEMBER_CONST_HPP #include <boost/callable_traits/detail/co...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/callable_traits/remove_member_const.hpp
#!/usr/bin/python # -*- coding: utf-8 -*- """ Helpers for cgroup testing. :copyright: 2011 Red Hat Inc. :author: Lukas Doktor <ldoktor@redhat.com> """ import logging import os import shutil import subprocess import time import re import random import commands from tempfile import mkdtemp from autotest.client import ut...
unknown
codeparrot/codeparrot-clean