code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# (c) 2012, Ovais Tariq <ovaistariq@gmail.com> # # This file is part of Xtrabackup Backup Manager # # 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...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package funcs import ( "fmt" "math" "testing" "github.com/hashicorp/terraform/internal/lang/marks" "github.com/zclconf/go-cty/cty" ) func TestLength(t *testing.T) { tests := []struct { Value cty.Value Want cty.Value }{ { cty.List...
go
github
https://github.com/hashicorp/terraform
internal/lang/funcs/collection_test.go
""" Tests dtype specification during parsing for all of the parsers defined in parsers.py """ from io import StringIO import numpy as np import pytest from pandas import ( Categorical, DataFrame, Index, MultiIndex, Series, concat, ) import pandas._testing as tm skip_pyarrow = pytest.mark.use...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/io/parser/dtypes/test_empty.py
use serde_derive::Serialize; #[derive(Serialize)] #[serde(transparent, try_from = "u64")] struct S { a: u8, } fn main() {}
rust
github
https://github.com/serde-rs/serde
test_suite/tests/ui/transparent/with_try_from.rs
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package command import ( "errors" "fmt" "strings" "testing" "time" "github.com/hashicorp/cli" "github.com/hashicorp/vault/helper/testhelpers" "github.com/stretchr/testify/require" ) func testStatusCommand(tb testing.TB) (*cli.MockUi, *St...
go
github
https://github.com/hashicorp/vault
command/status_test.go
""" Query subclasses which provide extra functionality beyond simple data retrieval. """ from django.core.exceptions import FieldError from django.db import connections from django.db.models.query_utils import Q from django.db.models.sql.constants import ( CURSOR, GET_ITERATOR_CHUNK_SIZE, NO_RESULTS, ) from django...
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
""" Single page performance tests for LMS. """ from bok_choy.web_app_test import WebAppTest, with_cache from ..pages.lms.auto_auth import AutoAuthPage from ..pages.lms.courseware import CoursewarePage from ..pages.lms.dashboard import DashboardPage from ..pages.lms.course_info import CourseInfoPage from ..pages.lms.log...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * nodeHash.c * Routines to hash relations for hashjoin * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION * src/b...
c
github
https://github.com/postgres/postgres
src/backend/executor/nodeHash.c
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
unknown
codeparrot/codeparrot-clean
"""Tests for distutils.command.build_scripts.""" import os import unittest from distutils.command.build_scripts import build_scripts from distutils.core import Distribution from distutils import sysconfig from distutils.tests import support from test.support import run_unittest class BuildScriptsTestCase(support.Te...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import fnmatch import os import sys from lib.util import execute IGNORE_FILES = [ os.path.join('atom', 'browser', 'mac', 'atom_application.h'), os.path.join('atom', 'browser', 'mac', 'atom_application_delegate.h'), os.path.join('atom', 'browser', 'resources', 'win', 'resource.h'), os.pa...
unknown
codeparrot/codeparrot-clean
""" Tests student admin.py """ from django.core.urlresolvers import reverse from student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory class AdminCourseRolesPageTest(SharedModuleStoreTestCas...
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\JsonPath; enum Nothing { case Nothing; }
php
github
https://github.com/symfony/symfony
src/Symfony/Component/JsonPath/Nothing.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
// RUN: %check_clang_tidy %s bugprone-unchecked-string-to-number-conversion %t typedef __SIZE_TYPE__ size_t; typedef signed ptrdiff_t; typedef long long intmax_t; typedef unsigned long long uintmax_t; typedef void * FILE; extern FILE *stdin; extern int fscanf(FILE *stream, const...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-tidy/checkers/bugprone/unchecked-string-to-number-conversion.c
// SPDX-License-Identifier: GPL-2.0 /* * High memory handling common code and variables. * * (C) 1999 Andrea Arcangeli, SuSE GmbH, andrea@suse.de * Gerhard Wichert, Siemens AG, Gerhard.Wichert@pdb.siemens.de * * * Redesigned the x86 32-bit VM architecture to deal with * 64-bit physical space. With curr...
c
github
https://github.com/torvalds/linux
mm/highmem.c
/* Copyright 2021 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/compiler/mlir/tfrt/transforms/mlrt/execute_op_registry.h
""" Tests for class dashboard (Metrics tab in instructor dashboard) """ import json from django.test.utils import override_settings from django.core.urlresolvers import reverse from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTes...
unknown
codeparrot/codeparrot-clean
""" Link extractor based on lxml.html """ from __future__ import annotations import logging import operator import re from collections.abc import Callable, Iterable from functools import partial from typing import TYPE_CHECKING, Any, TypeAlias, cast from urllib.parse import urljoin, urlparse from lxml import etree f...
python
github
https://github.com/scrapy/scrapy
scrapy/linkextractors/lxmlhtml.py
from odmtools.odmdata import * from odmtools.odmservices import SeriesService from tests import test_util class TestSeriesService: def setup(self): self.connection_string = "sqlite:///:memory:" self.series_service = SeriesService(self.connection_string, debug=False) self.session = self.ser...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2005 Carl Friedrich Bolz # MIT license """create chaosgame-like fractals """ import random import math random.seed(1234) import sys import time class GVector(object): def __init__(self, x = 0, y = 0, z = 0): self.x = x self.y = y self.z = z def Mag(self): ...
unknown
codeparrot/codeparrot-clean
//! The `wasm32-wali-linux-musl` target is a wasm32 target compliant with the //! [WebAssembly Linux Interface](https://github.com/arjunr2/WALI). use crate::spec::{Arch, Cc, LinkerFlavor, Target, TargetMetadata, base}; pub(crate) fn target() -> Target { let mut options = base::linux_wasm::opts(); options.add...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/targets/wasm32_wali_linux_musl.rs
/// <reference lib="es2018" /> /// <reference lib="es2019.array" /> /// <reference lib="es2019.object" /> /// <reference lib="es2019.string" /> /// <reference lib="es2019.symbol" /> /// <reference lib="es2019.intl" />
typescript
github
https://github.com/microsoft/TypeScript
src/lib/es2019.d.ts
#!/usr/bin/env python # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. ## See the LICENSE file in the project root for more information. # ## # Title :lst_creator.py # # Script to create a working list file from the ...
unknown
codeparrot/codeparrot-clean
/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; /** @typedef {import("./Compiler")} Compiler */ const PLUGIN_NAME = "ContextExclusionPlugin"; class ContextExclusionPlugin { /** * @param {RegExp} negativeMatcher Matcher regular expression */ constructor(negativeMatcher) { ...
javascript
github
https://github.com/webpack/webpack
lib/ContextExclusionPlugin.js
from __future__ import absolute_import, division, print_function from .common import Benchmark, squares import numpy as np class Copy(Benchmark): params = ["int8", "int16", "float32", "float64", "complex64", "complex128"] param_names = ['type'] def setup(self, typename): dtype = np...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ The module :mod:`openerp.tests.common` provides unittest2 test cases and a few helpers and classes to write tests. """ import errno import glob import json import logging import os import select import subprocess import threading import time import itertools import unittest2 import urllib2 ...
unknown
codeparrot/codeparrot-clean
import "@/styles/index.css"; function MyApp({ Component, pageProps }) { return <Component {...pageProps} />; } export default MyApp;
javascript
github
https://github.com/vercel/next.js
examples/cms-builder-io/pages/_app.js
import re from pprint import PrettyPrinter import numpy as np import pytest from sklearn import config_context from sklearn.base import BaseEstimator, TransformerMixin from sklearn.feature_selection import SelectKBest, chi2 from sklearn.linear_model import LogisticRegressionCV from sklearn.pipeline import make_pipeli...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/utils/tests/test_pprint.py
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "Emanuele" __version__ = "0.1.a" __email__ = "ema.muna95@gmail.com" __status__ = "Development" try: # For Python 3.0+ from urllib.request import urlopen except ImportError: # Fall back to python 2.0+ from urllib2 import urlopen import json fro...
unknown
codeparrot/codeparrot-clean
"""distutils.cygwinccompiler Provides the CygwinCCompiler class, a subclass of UnixCCompiler that handles the Cygwin port of the GNU C compiler to Windows. It also contains the Mingw32CCompiler class which handles the mingw32 port of GCC (same as cygwin in no-cygwin mode). """ # problems: # # * if you use a msvc com...
unknown
codeparrot/codeparrot-clean
"""`Runnable` objects that can be dynamically configured.""" from __future__ import annotations import enum import threading from abc import abstractmethod from collections.abc import ( AsyncIterator, Callable, Iterator, Sequence, ) from functools import wraps from typing import ( TYPE_CHECKING, ...
python
github
https://github.com/langchain-ai/langchain
libs/core/langchain_core/runnables/configurable.py
# -*- coding: utf-8 -*- import re from urllib import unquote_plus from module.common.json_layer import json_loads from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class MegaDebridEu(MultiHoster): __name__ = "MegaDebridEu" __type__ = "hoster" __version__ = "0.46" __p...
unknown
codeparrot/codeparrot-clean
from itertools import islice import collections, functools, time, string def validate_media(type): if not type in ('manga', 'anime'): raise ValueError("type has to be 'anime' or 'manga'") def valid_mal_username(user): legal_characters = string.digits + string.ascii_letters + '-_' valid_chars_test ...
unknown
codeparrot/codeparrot-clean
# # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2019 Jonathan Dent, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaining a copy # ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 #-*- coding: utf-8 -*- #@Filename : Pop3MailDownloader #@Date : 2017-03-03-09-37 #@Poject: emaildownloader #@AUTHOR : footballqq import poplib import email import os import sys import configparser import logging import datetime import time import re # def get_config(): # pass def get_emails...
unknown
codeparrot/codeparrot-clean
import textwrap from honcho.procfile import Procfile from ..helpers import assert_equal FIXTURES = [ [ # Simple """ web: command """, {'web': 'command'} ], [ # Simple 2 """ foo: python foo.py bar: python bar.py """, {'...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage.strictness; import static org.mockito.Mockito.when; import org.assertj.core.api.Assertions; import org.assertj.core.api.ThrowableAssert; import org.junit.Rule; import org.ju...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockitousage/strictness/LenientMockAnnotationTest.java
from AZutilities import dataUtilities import unittest import os import time import orange from trainingMethods import AZorngCvANN from AZutilities import evalUtilities from AZutilities import miscUtilities import AZOrangeConfig as AZOC import AZorngTestUtil import orngImpute class CvANNClassifierTest(AZorngTestUtil.A...
unknown
codeparrot/codeparrot-clean
CHANGELOG ========= 7.1 --- * Add support for `:is()` * Add support for `:where()` 6.3 --- * Add support for `:scope` 4.4.0 ----- * Added support for `*:only-of-type` 2.8.0 ----- * Added the `CssSelectorConverter` class as a non-static API for the component. * Deprecated the `CssSelector` static API of th...
unknown
github
https://github.com/symfony/symfony
src/Symfony/Component/CssSelector/CHANGELOG.md
"""engine.SCons.Tool.sunar Tool-specific initialization for Solaris (Forte) ar (library archive). If CC exists, static libraries should be built with it, so that template instantians can be resolved. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic S...
unknown
codeparrot/codeparrot-clean
import warnings from django.http import HttpResponse from django.utils import six from django.utils.deprecation import RemovedInDjango110Warning from .backends.django import Template as BackendTemplate from .base import Template from .context import Context, RequestContext, _current_app_undefined from .loader import ...
unknown
codeparrot/codeparrot-clean
""" PostgreSQL database backend for Django. Requires psycopg 2: http://initd.org/projects/psycopg2 """ from django.conf import settings from django.db.backends import (BaseDatabaseFeatures, BaseDatabaseWrapper, BaseDatabaseValidation) from django.db.backends.postgresql_psycopg2.operations import DatabaseOperation...
unknown
codeparrot/codeparrot-clean
# Usage: # bazel_compile [arguments] # # Required environment variables: # * ${target} - Build target # * ${args} - Extra command line args to pass to "bazel run" # * ${env} - Env variable string to set (ex. ENV_VAR_ABC=123) # * ${redact_args} - If set, redact the args in the report DIR="$(cd "$(dirname "${BASH_SOUR...
unknown
github
https://github.com/mongodb/mongo
evergreen/bazel_run.sh
''' This module performs the return type inference, according to symbolic types, It then reorders function declarations according to the return type deps. * type_all generates a node -> type binding ''' from pythran.analyses import (LazynessAnalysis, StrictAliases, YieldPoints, Loc...
unknown
codeparrot/codeparrot-clean
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
unknown
github
https://github.com/apache/kafka
.github/workflows/docker_build_and_test.yml
from langchain_core.output_parsers import BaseOutputParser from langchain_core.prompts import PromptTemplate from typing_extensions import override class FinishedOutputParser(BaseOutputParser[tuple[str, bool]]): """Output parser that checks if the output is finished.""" finished_value: str = "FINISHED" ""...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/chains/flare/prompts.py
#!/usr/bin/python import dbus import os import sys def printusage(): print 'bthstereoheadset.py <options>' print ' create - create a stereo headset' print ' start - connect sink' print ' stop - disconnect sink' return headsetAddress = os.getenv("BTSTEREO_HEADSET") print 'BT Stereo Headset Is : => ...
unknown
codeparrot/codeparrot-clean
# # (c) 2017 Red Hat, Inc. # # 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 ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms of the AGPLv3 License" import octoprint.pl...
unknown
codeparrot/codeparrot-clean
# =============================================================================== # Copyright 2014 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/licens...
unknown
codeparrot/codeparrot-clean
""" -------------------------------------------------------------------------------------------------------------------- limitControllers.py - Python Script -------------------------------------------------------------------------------------------------------------------- Copyright 2012 Carlos Chacon L. All rights res...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import json from django.conf import settings from django.conf.urls import url from django.contrib.admin.helpers import AdminForm from django.contrib.admin.util import get_deleted_objects from django.core.exceptions import PermissionDenied from django.db import router, transaction from django.ht...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='git am with options and not losing them' . ./test-lib.sh tm="$TEST_DIRECTORY/t4252" test_expect_success setup ' cp "$tm/file-1-0" file-1 && cp "$tm/file-2-0" file-2 && git add file-1 file-2 && test_tick && git commit -m initial && git tag initial ' test_expect_success 'interrupted...
unknown
github
https://github.com/git/git
t/t4252-am-options.sh
# # colour_finder_web.py - helps find the min and max Hue, Saturation and Brightness (aka Value) of a desired object # # Start from command line using 'python colour_finder_web.py' # # Access the final image at http://<ipaddress>:8081 # # Adjust the colour filters directly in the balloon_config.cnf file # h...
unknown
codeparrot/codeparrot-clean
# Copyright 2019 The gRPC 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 wri...
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 ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import datetime from django.test import TestCase from .models import Article, Comment, Category class DatesTests(TestCase): def test_related_model_traverse(self): a1 = Article.objects.create( title="First one", pub_date=datetime.date(2005, ...
unknown
codeparrot/codeparrot-clean
// This file is part of ICU4X. For terms of use, please see the file // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). //! Parsers for extended date time string and Duration parsing. //! //! The [Internet Extended Date/Time Fmt (IXDTF)]...
rust
github
https://github.com/nodejs/node
deps/crates/vendor/ixdtf/src/lib.rs
""" Internal helper files for user output. """ __author__ = "Luc Anselin luc.anselin@asu.edu, David C. Folch david.folch@asu.edu, Pedro V. Amaral pedro.amaral@asu.edu, Jing Yao jingyao@asu.edu" import textwrap as TW import numpy as np import copy as COPY import diagnostics as diagnostics import diagnostics_tsls as di...
unknown
codeparrot/codeparrot-clean
# the implementation here is a bit crappy. import time from Directories import resolveFilename, SCOPE_CONFIG PERCENTAGE_START = 0 PERCENTAGE_END = 100 profile_start = time.time() profile_data = {} total_time = 1 profile_file = None try: profile_old = open(resolveFilename(SCOPE_CONFIG, "profile"), "r").readlines() ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright 2017 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 applica...
unknown
github
https://github.com/kubernetes/kubernetes
hack/_update-generated-proto-bindings-dockerized.sh
from django.forms import URLField, ValidationError from django.test import SimpleTestCase from . import FormFieldAssertionsMixin class URLFieldTest(FormFieldAssertionsMixin, SimpleTestCase): def test_urlfield_1(self): f = URLField() self.assertWidgetRendersTo(f, '<input type="url" name="f" id="id...
unknown
codeparrot/codeparrot-clean
"""contextlib2 - backports and enhancements to the contextlib module""" import abc import sys import warnings from collections import deque from functools import wraps __all__ = ["contextmanager", "closing", "nullcontext", "AbstractContextManager", "ContextDecorator", "ExitStack", "re...
unknown
codeparrot/codeparrot-clean
# # The Python Imaging Library. # $Id$ # # a Windows DIB display interface # # History: # 1996-05-20 fl Created # 1996-09-20 fl Fixed subregion exposure # 1997-09-21 fl Added draw primitive (for tzPrint) # 2003-05-21 fl Added experimental Window/ImageWindow classes # 2003-09-05 fl Added fromstring/tostring me...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2020 Google LLC * * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file or at * https://developers.google.com/open-source/licenses/bsd */ #ifndef BASICS_H #define BASICS_H /* * miscellaneous utilities that are not provided by Git. */ #include "sys...
c
github
https://github.com/git/git
reftable/basics.h
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 2014, 2015 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 # License, or (at your option) any l...
unknown
codeparrot/codeparrot-clean
This is a simple example that shows the usage of an ES module packaging around a Rust module, built by wasm-pack. The ES module can be imported like other async modules with `import` or `import()`. When importing, the underlying WebAssembly module is downloaded and instantiated in a streaming way. # example.js ```ja...
unknown
github
https://github.com/webpack/webpack
examples/wasm-bindgen-esm/README.md
#!/usr/bin/env python from PyQt4 import QtGui, QtCore from Views import ui_dialog_session as dsess from poplerGUI import class_inputhandler as ini from poplerGUI import class_modelviewpandas as view class SessionDialog(QtGui.QDialog, dsess.Ui_Dialog): ''' Dialog box prompts the user to inpute unique metada...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-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
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
unknown
codeparrot/codeparrot-clean
{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations \u0026 Alerts", "type": "dashb...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/input/migrated_dev_dashboards/scenarios/v1beta1.tall_dashboard.v42.json
from pyspark import SparkContext, SparkConf ''' spark机器学习笔记:(二)用Spark Python进行数据处理和特征提取 http://blog.csdn.net/u013719780/article/details/51768720 ''' appName = 'spark-ml' master = 'local' scconf = SparkConf().setAppName(appName).setMaster(master) sc = SparkContext(conf=scconf) def plot(): import matplotlib.pyplot ...
unknown
codeparrot/codeparrot-clean
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import DisjointSet from '../Utils/DisjointSet'; type TestIdentifier = { id: number; name: string; }; describe('DisjointSet...
typescript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/DisjointSet-test.ts
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class VierIE(InfoExtractor): IE_NAME = 'vier' _VALID_URL = r'https?://(?:www\.)?vier\.be/(?:[^/]+/videos/(?P<display_id>[^/]+)(?:/(?P<id>\d+))?|video/v3/embed/(?P<embed_id>\d+))' _TESTS = [{ 'url':...
unknown
codeparrot/codeparrot-clean
import copy from hearthbreaker.cards.base import SpellCard from hearthbreaker.tags.action import Damage, Draw, Discard from hearthbreaker.tags.base import AuraUntil, Buff, Effect, CardQuery, CARD_SOURCE, ActionTag from hearthbreaker.tags.condition import GreaterThan, IsDamaged from hearthbreaker.tags.event import TurnE...
unknown
codeparrot/codeparrot-clean
#define USE_THE_REPOSITORY_VARIABLE #include "builtin.h" #include "config.h" #include "attr.h" #include "environment.h" #include "gettext.h" #include "object-name.h" #include "quote.h" #include "setup.h" #include "parse-options.h" #include "write-or-die.h" static int all_attrs; static int cached_attrs; static int stdi...
c
github
https://github.com/git/git
builtin/check-attr.c
from __future__ import absolute_import import datetime import pickle from StringIO import StringIO from django.conf import settings from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core import management from django.db import connections, router, DEFAU...
unknown
codeparrot/codeparrot-clean
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, ...
java
github
https://github.com/elastic/elasticsearch
benchmarks/src/main/java/org/elasticsearch/benchmark/common/util/IntArrayBenchmark.java
""" FastCGI (or SCGI, or AJP1.3 ...) server that implements the WSGI protocol. Uses the flup python package: http://www.saddi.com/software/flup/ This is a adaptation of the flup package to add FastCGI server support to run Django apps from Web servers that support the FastCGI protocol. This module can be run standalo...
unknown
codeparrot/codeparrot-clean
"""curses.wrapper Contains one function, wrapper(), which runs another function which should be the rest of your curses-based application. If the application raises an exception, wrapper() will restore the terminal to a sane state so you can read the resulting traceback. """ import sys, curses def wrapper(func, *r...
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
# NOT_RPYTHON """ A pure Python reimplementation of the _sre module from CPython 2.4 Copyright 2005 Nik Haldimann, licensed under the MIT license This code is based on material licensed under CNRI's Python 1.6 license and copyrighted by: Copyright (c) 1997-2001 by Secret Labs AB """ MAXREPEAT = 2147483648 #import ar...
unknown
codeparrot/codeparrot-clean
#define DISABLE_SIGN_COMPARE_WARNINGS #include "git-compat-util.h" #include "config.h" #include "color.h" #include "editor.h" #include "gettext.h" #include "hex-ll.h" #include "pager.h" #include "strbuf.h" static enum git_colorbool git_use_color_default = GIT_COLOR_AUTO; int color_stdout_is_tty = -1; /* * The list ...
c
github
https://github.com/git/git
color.c
# Copyright (C) 2013 Ian W. Harry # # 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 program is distributed in t...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Test descendant package tracking code from test_framework.test_framework import BitcoinTestFramework f...
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
import os from datetime import date from django.contrib.sitemaps import Sitemap from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigured from django.test import modify_settings, override_settings from django.utils import translation from django.utils.formats import localize ...
python
github
https://github.com/django/django
tests/sitemaps_tests/test_http.py
/* fpconv_dtoa.h -- floating point conversion utilities. * * Fast and accurate double to string conversion based on Florian Loitsch's * Grisu-algorithm[1]. * * [1] https://www.cs.tufts.edu/~nr/cs257/archive/florian-loitsch/printf.pdf * ---------------------------------------------------------------------------- ...
c
github
https://github.com/redis/redis
deps/fpconv/fpconv_dtoa.h
;<div>children</div> ;('<>hello</>')
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/loader/issue-32553/input.js
import sys from os.path import join, abspath, dirname, exists ROOT = abspath(join(dirname(__file__), "..")) sys.path.insert(0, ROOT) from shutil import move, rmtree from optparse import OptionParser from workspace_tools.paths import EXPORT_DIR, EXPORT_WORKSPACE, EXPORT_TMP from workspace_tools.paths import MBED_BASE,...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011-2013 Codernity (http://codernity.com) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/L...
unknown
codeparrot/codeparrot-clean
import dis import re import sys from io import StringIO import unittest def disassemble(func): f = StringIO() tmp = sys.stdout sys.stdout = f dis.dis(func) sys.stdout = tmp result = f.getvalue() f.close() return result def dis_single(line): return disassemble(compile(line, '', 'sin...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package backup import ( "context" "github.com/cockroachdb/cockroach/pkg/multitenant/mtinfopb" "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachd...
go
github
https://github.com/cockroachdb/cockroach
pkg/backup/backup_planning_tenant.go
# 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 errno import socket import time import traceback import urlparse import mozprocess from .base import get_free_p...
unknown
codeparrot/codeparrot-clean
import type { Config } from "tailwindcss"; const config: Config = { content: [ "./components/**/*.{js,ts,jsx,tsx,mdx}", "./app/**/*.{js,ts,jsx,tsx,mdx}", ], theme: { extend: {}, }, plugins: [], }; export default config;
typescript
github
https://github.com/vercel/next.js
examples/with-turso/tailwind.config.ts
# -*- coding: utf-8 -*- # Copyright (c) 2012-2015, Ben Lopatin and contributors # 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 ...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package command import ( "errors" "fmt" "log" "os" "strings" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hclsyntax" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/backend/backendru...
go
github
https://github.com/hashicorp/terraform
internal/command/import.go