code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# Copyright 2010-2011 OpenStack Foundation # Copyright 2012-2013 IBM Corp. # 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/li...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2018 Kevin Weiss, for HAW Hamburg <kevin.weiss@haw-hamburg.de> # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. """@package PyToAPI A test that can be used f...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED require 'json' end class Complex # See #as_json. def self.json_create(object) Complex(object['r'], object['i']) end # Methods <tt>Complex#as_json</tt> and +Complex.json_create+ may be used # to serialize and de...
ruby
github
https://github.com/ruby/ruby
ext/json/lib/json/add/complex.rb
import functools from pluss.app import app from pluss.util.cache import Cache RATE_LIMIT_CACHE_KEY_TEMPLATE = 'pluss--remoteip--ratelimit--1--%s' def ratelimited(func): """Includes the wrapped handler in the global rate limiter (60 calls/min).""" @functools.wraps(func) def wrapper(*args, **kwargs): ...
unknown
codeparrot/codeparrot-clean
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class OdnoklassnikiAccount(ProviderAccount): def get_profile_url(self): return self.account.extra_data.get('link') def get_avatar_url(self): ret = None ...
unknown
codeparrot/codeparrot-clean
#define DISABLE_SIGN_COMPARE_WARNINGS #include "git-compat-util.h" #include "environment.h" #include "tag.h" #include "object-name.h" #include "odb.h" #include "commit.h" #include "tree.h" #include "blob.h" #include "alloc.h" #include "gpg-interface.h" #include "hex.h" #include "packfile.h" #include "repository.h" co...
c
github
https://github.com/git/git
tag.c
# -*- coding: utf-8 -*- """ flaskext.sqlalchemy ~~~~~~~~~~~~~~~~~~~ Adds basic SQLAlchemy support to your application. :copyright: (c) 2014 by Armin Ronacher, Daniel Neuhäuser. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement, absolute_import import os import ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python #-*-*- encoding: utf-8 -*-*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individual...
unknown
codeparrot/codeparrot-clean
"""A library of helper functions for the CherryPy test suite. The actual script that runs the entire CP test suite is called "test.py" (in this folder); test.py calls this module as a library. Usage ===== Each individual test_*.py module imports this module (helper), usually to make an instance of CPWebCase, and then...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import os import sys import tempfile import unittest import warnings from django.apps import apps from django.contrib.sites.models import Site from django.core import management from django.core.files.temp import NamedTemporaryFile from django.core.management import CommandErro...
unknown
codeparrot/codeparrot-clean
type Primitive = null | undefined | string | number | boolean | symbol | bigint; type LiteralUnion<LiteralType, BaseType extends Primitive> = | LiteralType | (BaseType & Record<never, never>); interface HtmlLinkProps { /** * Address of the hyperlink */ href?: string; /** * How the element handles ...
typescript
github
https://github.com/remix-run/react-router
packages/react-router/lib/router/links.ts
# -*- coding: utf-8 -*- # # sympa documentation build configuration file, created by # sphinx-quickstart on Mon Aug 25 18:11:49 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python3 import os import signal import time import sys import gi try: gi.require_version('Gtk', '3.0') gi.require_version('Notify', '0.7') except: print('ERROR: Gtk 3.0 and Notify 0.7 are required') sys.exit(1) else: from gi.repository import Gtk, GLib, Notify # Tray icon try: gi....
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import datetime import json import re import sys import time from email.header import Header from django.conf import settings from django.core import signals from django.core import signing from django.core.exceptions import DisallowedRedirect from django.core.serializers.json ...
unknown
codeparrot/codeparrot-clean
""" Classification using the WEKA experimenter A WEKA classification process consists of executing a certain WEKA experiment. The results of all these processes are stored in a temporary directory and after the completion of all processes of the operation, the consolidate method of the *WekaClassificationOperation* is...
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/lite/op_resolver.h
import json import time dal = DAL('sqlite://wanke.sqlite3.sqlite') """ 获取推荐页顶部互动的广告信息 http://54.64.105.44/wanketv/live/ads """ def ads(): parseRequest() db = DAL('sqlite://wanke.sqlite3.sqlite') allAds = db.executesql("select * from ads order by _id") result = {} result["error"] = 0 jsonAds =...
unknown
codeparrot/codeparrot-clean
import sys from django import forms from django.core.exceptions import ValidationError from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Field, Fieldset, ButtonHolder, Submit, Div, Button, HTML, Hidden from crispy_forms.bootstrap import FormActions from layout import models as layout...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsMapLayerModel .. note:: 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 2 of the License, or (at your option) any later version. """ _...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals import re import os.path from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) from ..utils import ( ExtractorError, ) class PlayedIE(InfoExtractor): IE_NAME = 'played.to' _VALID_URL = r'https...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # Copyright (c) 2008, Willow Garage, 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 # no...
unknown
codeparrot/codeparrot-clean
""" Tests use cases related to LMS Entrance Exam behavior, such as gated content access (TOC) """ from django.conf import settings from django.test.client import RequestFactory from django.core.urlresolvers import reverse from courseware.model_data import FieldDataCache from courseware.module_render import get_module,...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import sys import os import string import re from xml.sax import make_parser from xml.sax.handler import ContentHandler, property_lexical_handler try: from _xmlplus.sax.saxlib import LexicalHandler no_comments = False except ImportError: class LexicalHandler: pass no_comments = True class parse...
unknown
codeparrot/codeparrot-clean
"""Tools for solving inequalities and systems of inequalities. """ from __future__ import print_function, division from sympy.core import Symbol, Dummy from sympy.core.compatibility import iterable, reduce from sympy.sets import Interval from sympy.core.relational import Relational, Eq, Ge, Lt from sympy.sets.sets im...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2021 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.fir.diagnostics import org.jetbrains.kotlin.analysis.api.fir.KaFirS...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/diagnostics/KaDiagnosticConverter.kt
from GlobalActions import globalActionMap from Components.ActionMap import ActionMap, HelpableActionMap from Components.Button import Button from Components.ChoiceList import ChoiceList, ChoiceEntryComponent from Components.SystemInfo import SystemInfo from Components.config import config, ConfigSubsection, ConfigText,...
unknown
codeparrot/codeparrot-clean
""" Kernel Density Estimation ------------------------- """ # Author: Jake Vanderplas <jakevdp@cs.washington.edu> import numpy as np from scipy.special import gammainc from ..base import BaseEstimator from ..utils import check_array, check_random_state from ..utils.extmath import row_norms from .ball_tree import BallT...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='diagnosing out-of-scope pathspec' . ./test-lib.sh test_expect_success 'setup a bare and non-bare repository' ' test_commit file1 && git clone --bare . bare ' test_expect_success 'log and ls-files in a bare repository' ' ( cd bare && test_must_fail git log -- .. >out 2>err && tes...
unknown
github
https://github.com/git/git
t/t6136-pathspec-in-bare.sh
""" Functions that are general enough to use for any model fitting. The idea is to untie these from LikelihoodModel so that they may be re-used generally. """ from __future__ import print_function import distutils.version from scipy import __version__ as scipy_version import numpy as np from scipy import optimize def...
unknown
codeparrot/codeparrot-clean
//! Traits and structures to aid consuming and writing HTTP payloads. //! //! "Body" and "payload" are used somewhat interchangeably in this documentation. // Though the spec kinda reads like "payload" is the possibly-transfer-encoded part of the message // and the "body" is the intended possibly-decoded version of th...
rust
github
https://github.com/actix/actix-web
actix-http/src/body/mod.rs
import subprocess, sys BUILD_MSBUILD_LIBS = False VCVARSALL_PATH = '"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat"' MSBUILD_PATH = '"C:\\program files (x86)\\msbuild\\14.0\\bin\\msbuild.exe"' THIRDPARTY_PATH = '..\\3rdparty\\' LIBJPEG_PROJ = '..\\3rdparty\\libjpeg\\build\\libjpegWin10\\lib...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright 2007-2021 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python #coding: utf-8 -*- # (c) 2017 Dag Wieers <dag@wieers.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Foundation; use Illuminate\Support\Collection; use Illuminate\Support\Stringable; /* .~))>> .~)>> .~))))>>> ...
php
github
https://github.com/laravel/framework
src/Illuminate/Foundation/Inspiring.php
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, parse_duration, ) class KontrTubeIE(InfoExtractor): IE_NAME = 'kontrtube' IE_DESC = 'KontrTube.ru - Труба зовёт' _VALID_URL = r'https?://(?:www\.)?kontrtube\.ru/v...
unknown
codeparrot/codeparrot-clean
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.forms.formsets import BaseFormSet, formset_factory from bootstrap3.tests import TestForm RADIO_CHOICES = ( ('1', 'Radio 1'), ('2', 'Radio 2'), ) MEDIA_CHOICES = ( ('Audio', ( ('vinyl', 'Vinyl'), ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # 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 = r''' --- author: Allen Sanabria (@linuxdynasty) module: include_vars short_descr...
unknown
codeparrot/codeparrot-clean
""" Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard python 2.3+ datetime module. """ __author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>" __license__ = "Simplified BSD" import datetime import struct import time import sys import os relativedelta = None...
unknown
codeparrot/codeparrot-clean
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v0alpha1", "metadata": { "name": "v12.template-variables.v42" }, "spec": { "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/migrated_dashboards_output/v1beta1-mig-v12.template-variables.v42.v0alpha1.json
# # # Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 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: # # 1. Redistributions of source code must retain the above ...
unknown
codeparrot/codeparrot-clean
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
unknown
codeparrot/codeparrot-clean
// Copyright 2011 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/enc/picture_enc.c
//===----------------------------------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
swift
github
https://github.com/apple/swift
benchmark/single-source/DictionaryOfAnyHashableStrings.swift
import * as evaluator from "../../_namespaces/evaluator.js"; import * as ts from "../../_namespaces/ts.js"; describe("unittests:: evaluation:: superInStaticInitializer", () => { it("super-property-get in es2015", () => { const result = evaluator.evaluateTypeScript( ` export function...
typescript
github
https://github.com/microsoft/TypeScript
src/testRunner/unittests/evaluation/superInStaticInitializer.ts
//// [tests/cases/compiler/arrayConcat3.ts] //// //// [arrayConcat3.ts] // TODO: remove lib hack when https://github.com/Microsoft/TypeScript/issues/20454 is fixed type Fn<T extends object> = <U extends T>(subj: U) => U function doStuff<T extends object, T1 extends T>(a: Array<Fn<T>>, b: Array<Fn<T1>>) { b.concat(...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/arrayConcat3.js
namespace std { class STD {}; } using namespace std;
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-change-namespace/Inputs/fake-std.h
#!/usr/bin/env python # # Copyright 2001-2002 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright n...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright 2025 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. set -euo pipefail dir="$(dirname $(dirname $(dirname $(dirname "${0}"))))" source "$dir/teamcity-support.sh" # For $root source "$dir/teamcity-bazel-...
unknown
github
https://github.com/cockroachdb/cockroach
build/teamcity/cockroach/nightlies/misc_tests.sh
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of Cockpit. # # Copyright (C) 2015 Red Hat, Inc. # # Cockpit is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the Lice...
unknown
codeparrot/codeparrot-clean
# 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 applica...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # This coding header is significant for tests, as the debug view is parsing # files to search for such a header to decode the source file content from __future__ import unicode_literals import importlib import inspect import os import re import shutil import sys from tempfile import NamedTempor...
unknown
codeparrot/codeparrot-clean
import { test } from '../../test'; export default test({ error: { code: 'derived_invalid_export', message: 'Cannot export derived state from a module. To expose the current derived value, export a function returning its value', position: [70, 76] } });
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/compiler-errors/samples/export-derived-state-indirect/_config.js
# Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause import importlib from functools import wraps from typing import Protocol, runtime_checkable import numpy as np from scipy.sparse import issparse from sklearn._config import get_config from sklearn.utils._available_if import available_if ...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/utils/_set_output.py
## @file # This file is used to be the main entrance of ECC tool # # Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full t...
unknown
codeparrot/codeparrot-clean
from flask import Flask app = Flask(__name__) app.config["DEBUG"] = True from blueprintapp.apps.admin import admin # noqa: E402 from blueprintapp.apps.frontend import frontend # noqa: E402 app.register_blueprint(admin) app.register_blueprint(frontend)
python
github
https://github.com/pallets/flask
tests/test_apps/blueprintapp/__init__.py
import cgi import json import os import traceback import urllib import urlparse from constants import content_types from pipes import Pipeline, template from ranges import RangeParser from request import Authentication from response import MultipartContent from utils import HTTPException __all__ = ["file_handler", "p...
unknown
codeparrot/codeparrot-clean
# Copyright 2010-2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright (c) .NET Foundation and contributors. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # import copy from pandocfilters import toJSONFilters, Para, Str, Header, Space, Link def remove_includes(key, value, form...
unknown
codeparrot/codeparrot-clean
@import url('https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined'); :host { display: flex; justify-content: flex-start; } [ngToolbar] { display: flex; flex-direction: column; } [ngToolbarWidget] { border: none; outline: none; cursor: pointer; width: 3rem; height: 3rem; font-size: 1...
css
github
https://github.com/angular/angular
adev/src/content/examples/aria/toolbar/src/vertical/material/app/app.css
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2006 Lukáš Lalinský # Copyright (C) 2013-2014, 2018 Laurent Monin # Copyright (C) 2014 Shadab Zafar # Copyright (C) 2016 Sambhav Kothari # # This program is free software; you can redistribute it and/or # ...
unknown
codeparrot/codeparrot-clean
from django.db import connection from django.db.migrations.executor import MigrationExecutor from django.test import modify_settings, override_settings from django.apps.registry import apps as global_apps from .test_base import MigrationTestBase @modify_settings(INSTALLED_APPS={'append': 'migrations2'}) class Executo...
unknown
codeparrot/codeparrot-clean
""" Copyright (c) 2015 Michael Bright and Bamboo HR 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...
unknown
codeparrot/codeparrot-clean
groups: - name: querylogtest interval: 1s rules: - record: test expr: query_in_rule
unknown
github
https://github.com/prometheus/prometheus
cmd/prometheus/testdata/rules/test.yml
import pytest from pandas import ( Interval, Timedelta, Timestamp, ) @pytest.fixture( params=[ (Timedelta("0 days"), Timedelta("1 day")), (Timestamp("2018-01-01"), Timedelta("1 day")), (0, 1), ], ids=lambda x: type(x[0]).__name__, ) def start_shift(request): """ ...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/scalar/interval/test_overlaps.py
# oracle/cx_oracle.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: oracle+cx_oracle :name: cx-Oracle :dbapi: cx_oracle ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2017 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.framework; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThrows; imp...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockito/internal/framework/DefaultMockitoFrameworkTest.java
import requests import sqlite3 import web import time import os import sys # 加密?-> 出租服务器 """ Using two server to provide wechat subscription service, one for acquring token, one for processing request """ PATH = os.path.abspath(os.path.dirname(sys.argv[0])) # The path of this file timer=os.times() web.config.debug = ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ pygments.lexers.jvm ~~~~~~~~~~~~~~~~~~~ Pygments lexers for JVM languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, ...
unknown
codeparrot/codeparrot-clean
import React from "react"; import "./index.scss"; const baseClass = "rich-text-label"; const LabelElement: React.FC<{ attributes: any; element: any; children: React.ReactNode; }> = ({ attributes, children }) => ( <div {...attributes}> <span className={baseClass}>{children}</span> </div> ); export defau...
typescript
github
https://github.com/vercel/next.js
examples/cms-payload/payload/fields/richText/label/Element/index.tsx
# -*- coding: utf-8 -*- # © 2017 Elico Corp (https://www.elico-corp.com). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, fields, models from openerp.exceptions import ValidationError from openerp.tools.translate import _ class BusinessRequirementDeliverable(models.Model):...
unknown
codeparrot/codeparrot-clean
<?php declare(strict_types=1); /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Test\Js...
php
github
https://github.com/composer/composer
tests/Composer/Test/Json/JsonManipulatorTest.php
''' sphinx_cython.py This module monkeypatches sphinx autodoc to support Cython generated function signatures in the first line of the docstring of functions implemented as C extensions. Copyright (C) Nikolaus Rath <Nikolaus@rath.org> This file is part of LLFUSE (http://python-llfuse.googlecode.com). LLFUSE can be ...
unknown
codeparrot/codeparrot-clean
from django.contrib.postgres.indexes import BrinIndex, GinIndex from django.db import connection from django.test import skipUnlessDBFeature from . import PostgreSQLTestCase from .models import CharFieldModel, IntegerArrayModel @skipUnlessDBFeature('has_brin_index_support') class BrinIndexTests(PostgreSQLTestCase): ...
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 # distributed unde...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function, division import sys,os # line 4 and line 5 below are for development purposes and can be removed qspin_path = os.path.join(os.getcwd(),"../../") sys.path.insert(0,qspin_path) ##################################################################### # example...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright 2016 Open Permissions Platform Coalition # 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 appl...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: false require_relative "../auto_ext.rb" headers = %w[sys/param.h sys/mount.h sys/vfs.h].select {|h| have_header(h)} if have_type("struct statfs", headers) have_struct_member("struct statfs", "f_fstypename", headers) have_struct_member("struct statfs", "f_type", headers) have_struct_membe...
ruby
github
https://github.com/ruby/ruby
ext/-test-/file/extconf.rb
// clinic/float.c.h uses internal pycore_modsupport.h API #define PYTESTCAPI_NEED_INTERNAL_API #include "parts.h" #include "util.h" #include "clinic/float.c.h" /*[clinic input] module _testcapi [clinic start generated code]*/ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=6361033e795369fc]*/ /*[clinic i...
c
github
https://github.com/python/cpython
Modules/_testcapi/float.c
data = ( 'toels', # 0x00 'toelt', # 0x01 'toelp', # 0x02 'toelh', # 0x03 'toem', # 0x04 'toeb', # 0x05 'toebs', # 0x06 'toes', # 0x07 'toess', # 0x08 'toeng', # 0x09 'toej', # 0x0a 'toec', # 0x0b 'toek', # 0x0c 'toet', # 0x0d 'toep', # 0x0e 'toeh', # 0x0f 'tyo', # 0x10...
unknown
codeparrot/codeparrot-clean
# Copyright 2013-2014 Mitchell Stanton-Cook Licensed under the # Educational Community 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.osedu.org/licenses/ECL-2.0 # # Unless required by ...
unknown
codeparrot/codeparrot-clean
# Copyright 2011 OpenStack LLC. # 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
/* * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.plugins.contentnegotiation.tests import io.ktor.client.plugins.websocket.* import io.ktor.client.plugins.websocket.WebSockets import io.ktor.serialization.* import io.k...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-plugins/ktor-client-content-negotiation/ktor-client-content-negotiation-tests/jvm/src/io/ktor/client/plugins/contentnegotiation/tests/JsonWebsocketsTest.kt
#!/usr/bin/env python from __future__ import print_function import redis import time import signal import argparse import sys import os # if PAPARAZZI_SRC not set, then assume the tree containing this # file is a reasonable substitute PPRZ_SRC = os.getenv("PAPARAZZI_SRC", os.path.normpath(os.path.join(os.path.dirnam...
unknown
codeparrot/codeparrot-clean
import { flushSync } from 'svelte'; import { ok, test } from '../../test'; export default test({ get props() { return { /** @type {string | null} */ name: null }; }, html: ` <editor contenteditable="true"><b>world</b></editor> <p>hello world</p> `, ssrHtml: ` <editor contenteditable="true"><b>wo...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/binding-contenteditable-text-initial/_config.js
"""SCons.Tool.filesystem Tool-specific initialization for the filesystem tools. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The...
unknown
codeparrot/codeparrot-clean
export default function Page() { return __jsx("div", null); } Page.getInitialProps = function () { return { prop: true, }; };
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/strip-page-exports/getInitialProps/function-anon-function/output-default.js
/// Partial percent-decoding. /// /// Performs percent-decoding on a slice but can selectively skip decoding certain sequences. /// /// # Examples /// ``` /// # use actix_router::Quoter; /// // + is set as a protected character and will not be decoded... /// let q = Quoter::new(&[], b"+"); /// /// // ...but the other e...
rust
github
https://github.com/actix/actix-web
actix-router/src/quoter.rs
""" ============================================================================ Analysing continuous features with binning and regression in sensor space ============================================================================ Predict single trial activity from a continuous variable. A single-trial regression is ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python from xml.dom.minidom import * import sys from optparse import OptionParser def extract_textlist(elements): "Given list of elements e, return as list the text enclosed by each." resultfragments = [] for element in elements: textfragment = [] for child in element.childNodes: if chi...
unknown
codeparrot/codeparrot-clean
import unittest2 from models.event import Event from models.match import Match from models.team import Team class TestKeyNameValidators(unittest2.TestCase): def setUp(self): self.valid_team_key = "frc177" self.valid_team_key2 = "frc1" self.invalid_team_key = "bcr077" self.invalid_t...
unknown
codeparrot/codeparrot-clean
![A retro 8-bit, pixel art style graphic announcing the upcoming release of Angular v21. The large, gradient 'v21' text dominates the frame. Next to it, in smaller text, are the words 'The Adventure Begins' and the release date '11-20-2025' inside a pink pixelated box. The Angular logo is in the bottom right corner.](a...
unknown
github
https://github.com/angular/angular
adev/src/content/events/v21.md
#!/usr/bin/env python # Meran - MERAN UNLP is a ILS (Integrated Library System) wich provides Catalog, # Circulation and User's Management. It's written in Perl, and uses Apache2 # Web-Server, MySQL database and Sphinx 2 indexing. # Copyright (C) 2009-2013 Grupo de desarrollo de Meran CeSPI-UNLP # # This file is part ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import sys, os, shutil, subprocess, re,...
unknown
codeparrot/codeparrot-clean
## Input ```javascript function foo(a, b, c, d) { let y = []; label: if (a) { if (b) { y.push(c); break label; } y.push(d); } return y; } export const FIXTURE_ENTRYPOINT = { fn: foo, params: ['TodoAdd'], isComponent: 'TodoAdd', }; ``` ## Code ```javascript import { c as _c } f...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/inverted-if.expect.md
// RUN: %check_clang_tidy -check-suffixes=DEFAULT %s cppcoreguidelines-avoid-do-while %t // RUN: %check_clang_tidy -check-suffixes=IGNORE-MACROS %s cppcoreguidelines-avoid-do-while %t -- -config='{CheckOptions: {cppcoreguidelines-avoid-do-while.IgnoreMacros: true}}' #define FOO(x) \ do { \ } while (x != 0) ...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-do-while.cpp
# -*- coding: utf-8 -*- import tempfile import os from flexmock import flexmock, flexmock_teardown from eloquent.migrations import MigrationCreator from eloquent.migrations.stubs import CREATE_STUB, UPDATE_STUB, BLANK_STUB from .. import EloquentTestCase class MigrationCreatorTestCase(EloquentTestCase): def tear...
unknown
codeparrot/codeparrot-clean