code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.conf import settings from django.test import TestCase, override_settings from unittest import skip from zerver.lib.avatar import avatar_url from zerver.lib.bugdown import url_filename from zerver.lib.test_classes import ZulipTestCase from zerve...
unknown
codeparrot/codeparrot-clean
import Foundation import NIOHTTP1 // Comments on these properties are copied from the mozilla doc URL shown below. extension HTTPHeaders { /// Represents the HTTP `Cache-Control` header. /// - See Also: /// [Cache-Control docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) pu...
swift
github
https://github.com/vapor/vapor
Sources/Vapor/HTTP/Headers/HTTPHeaderCacheControl.swift
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## Licens...
unknown
codeparrot/codeparrot-clean
import { codeFixAll, createCodeFixAction, registerCodeFix, } from "../_namespaces/ts.codefix.js"; import { AsExpression, Diagnostics, factory, findAncestor, getTokenAtPosition, isAsExpression, isInJSFile, isTypeAssertionExpression, SourceFile, SyntaxKind, textChan...
typescript
github
https://github.com/microsoft/TypeScript
src/services/codefixes/addConvertToUnknownForNonOverlappingTypes.ts
from datetime import ( date, time, timedelta, ) import pickle import numpy as np import pytest from pandas._libs.missing import NA from pandas.core.dtypes.common import is_scalar import pandas as pd import pandas._testing as tm def test_singleton(): assert NA is NA new_NA = type(NA)() asser...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/scalar/test_na_scalar.py
# # Copyright (c) 2008--2010 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
unknown
codeparrot/codeparrot-clean
######################################################################## # # File Name: ParsedStep.py # # """ A Parsed token that represents a step on the result tree. WWW: http://4suite.org/XPATH e-mail: support@4suite.org Copyright (c) 2000-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suit...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** doGrid.py --------------------- Date : June 2010 Copyright : (C) 2010 by Giuseppe Sucameli Email : brush dot tyler at gmail dot com *********************...
unknown
codeparrot/codeparrot-clean
from ..base import BaseTest from ...models.base import get_session, sessions from ...models import base from ...models.User import UserModel from ...views import users from ...modules.carry import global_scope from ...lib.Encryption import Encryption class Test(BaseTest): def setUp(self): # Create validat...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import from django.conf import settings from django.core import validators from django.core.exceptions import ValidationError from django.db import connection from django.db.models import Q from zerver.decorator import authenticated_api_view, authenticated_json_post_view, \ has_requ...
unknown
codeparrot/codeparrot-clean
# # The Python Imaging Library. # $Id$ # # PDF (Acrobat) file handling # # History: # 1996-07-16 fl Created # 1997-01-18 fl Fixed header # 2004-02-21 fl Fixes for 1/L/CMYK images, etc. # 2004-02-24 fl Fixes for 1 and P images. # # Copyright (c) 1997-2004 by Secret Labs AB. All rights reserved. # Copyright (c) ...
unknown
codeparrot/codeparrot-clean
""" This module is home to the Page class """ from pyecobee.ecobee_object import EcobeeObject class Page(EcobeeObject): """ This class has been auto generated by scraping https://www.ecobee.com/home/developer/api/documentation/v1/objects/Page.shtml Attribute names have been generated by converting eco...
unknown
codeparrot/codeparrot-clean
import os import sys import itertools import imp from distutils.command.build_ext import build_ext as _du_build_ext from distutils.file_util import copy_file from distutils.ccompiler import new_compiler from distutils.sysconfig import customize_compiler, get_config_var from distutils.errors import DistutilsError from d...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.utils import format_datetime from frappe import _ def execute(filters=None): account_details = {} for acc in frappe.db.sql("""selec...
unknown
codeparrot/codeparrot-clean
""" This module contains the 'base' GEOSGeometry object -- all GEOS Geometries inherit from this object. """ # Python, ctypes and types dependencies. import re import warnings from ctypes import addressof, byref, c_double, c_size_t # super-class for mutable list behavior from django.contrib.gis.geos.mutable_list imp...
unknown
codeparrot/codeparrot-clean
// Copyright 2014 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. // Package context defines the Context type, which carries deadlines, // cancellation signals, and other request-scoped values across API boundaries // and betw...
go
github
https://github.com/golang/go
src/context/context.go
from optparse import OptionParser option_parser = OptionParser(usage='usage: %prog [options] file1 [file2...]') option_parser.add_option('-v', '--verbose', action='store_true', dest='verbose', default=False, help='display debug output') option_parser.add_option('-p', '--properties', dest='properties'...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
unknown
codeparrot/codeparrot-clean
// Copyright 2017 The Abseil Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
c
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/absl/strings/internal/stl_type_traits.h
# -*- test-case-name: twisted.internet.test.test_sigchld -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ This module is used to integrate child process termination into a reactor event loop. This is a challenging feature to provide because most platforms indicate process termination vi...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 - Mirantis, Inc. # Copyright 2015 - Huawei Technologies Co. Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
unknown
codeparrot/codeparrot-clean
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
python
github
https://github.com/apache/airflow
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_connections.py
#include "foobar.h" int x = foo(); // RUN: clang-include-cleaner -print=changes %s -- -I%S/Inputs/ | FileCheck --check-prefix=CHANGE %s // CHANGE: - "foobar.h" // CHANGE-NEXT: + "foo.h" // RUN: clang-include-cleaner -disable-remove -print=changes %s -- -I%S/Inputs/ | FileCheck --check-prefix=INS...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/include-cleaner/test/tool.cpp
""" This module implements the FormRequest class which is a more covenient class (than Request) to generate Requests based on form data. See documentation in docs/topics/request-response.rst """ import urllib import lxml.html from scrapy.http.request import Request from scrapy.utils.python import unicode_to_str clas...
unknown
codeparrot/codeparrot-clean
{ "RESET": { "summary": "Resets the connection.", "complexity": "O(1)", "group": "connection", "since": "6.2.0", "arity": 1, "function": "resetCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "FAST", ...
json
github
https://github.com/redis/redis
src/commands/reset.json
#ifndef BOOST_BIND_PROTECT_HPP_INCLUDED #define BOOST_BIND_PROTECT_HPP_INCLUDED // // protect.hpp // // Copyright 2002, 2020 Peter Dimov // Copyright 2009 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENS...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/bind/protect.hpp
from mitmproxy.net.http import http1 from mitmproxy import exceptions from mitmproxy import ctx from mitmproxy.utils import human class StreamBodies: def __init__(self): self.max_size = None def configure(self, updated): if "stream_large_bodies" in updated and ctx.options.stream_large_bodies: ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import os, signal, time, re import unittest import psutil from subprocess import PIPE class GpsshTestCase(unittest.TestCase): # return count of stranded ssh processes def searchForProcessOrChildren(self): euid = os.getuid() count = 0 for p in psutil.process_ite...
unknown
codeparrot/codeparrot-clean
@file:Suppress("NAMED_ARGUMENTS_NOT_ALLOWED", "DEPRECATION") // KT-21913 package kotlinx.coroutines import kotlinx.coroutines.testing.* import kotlin.test.* class DelayTest : TestBase() { @Test fun testCancellation() = runTest(expected = {it is CancellationException }) { runAndCancel(1000) } ...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/common/test/DelayTest.kt
import copy import numpy as np TEST_CYCLES = 100 """ GOAL: Take a 100 x 100 grid and square all values to the power of 2 and Test several difference approaches to completing this task, with python lists and numpy arrays. """ def make_2d_grid(x,y): list_based_2d_grid = [] for i in range(x): list_based_2d_grid.ap...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (C) 2005-2007 Carabos Coop. V. All rights reserved # Copyright (C) 2008-2019 Vicent Mas. All rights reserved # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License...
unknown
codeparrot/codeparrot-clean
-- -- Regression Tests for Label Management -- -- -- Setup -- CREATE TABLE t1 (a int, b text); INSERT INTO t1 VALUES (1, 'aaa'), (2, 'bbb'), (3, 'ccc'); CREATE TABLE t2 AS SELECT * FROM t1 WHERE a % 2 = 0; CREATE FUNCTION f1 () RETURNS text AS 'SELECT sepgsql_getcon()' LANGUAGE sql; CREATE FUNCTION f2 () RET...
sql
github
https://github.com/postgres/postgres
contrib/sepgsql/sql/label.sql
/* * 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.fir.test.cases.generated.cases.components.resolver; import com.inte...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/resolver/FirIdeDependentAnalysisSourceModuleNonPhysicalResolveDanglingFileReferenceTestGenerated.java
from models import * from services.member_service import MemberService from services.rate_service import RateService from services.user_service import UserService from services.milkcollection_service import MilkCollectionService from configuration_manager import ConfigurationManager from datetime import datetime import...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 Embrane, 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...
unknown
codeparrot/codeparrot-clean
An attempt was made to assign to a borrowed value. Erroneous code example: ```compile_fail,E0506 struct FancyNum { num: u8, } let mut fancy_num = FancyNum { num: 5 }; let fancy_ref = &fancy_num; fancy_num = FancyNum { num: 6 }; // error: cannot assign to `fancy_num` because it is borrowed println!("Num: {}, Ref...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0506.md
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- ##---------------------------------------------------------------------------## ## ## Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer ## Copyright (C) 2003 Mt. Hood Playing Card Co. ## Copyright (C) 2005-2009 Skomoroh ## ## This program is free ...
unknown
codeparrot/codeparrot-clean
from django.contrib import admin from django.contrib.auth.models import User as AuthUser from django.contrib.contenttypes.models import ContentType from django.core import checks, management from django.db import DEFAULT_DB_ALIAS, models from django.db.models import signals from django.test import TestCase, override_se...
unknown
codeparrot/codeparrot-clean
# Really simple expression types to handle arithmetic expressions referring # to other # defines class MacroExp: pass class MacroRef(MacroExp): def __init__(s, name): s._name = name; def eval(s): return lookup(s._name) def __add__(s, o): return MacroAdd(s, o) def __radd__(s, o): return MacroA...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/google/FloatTypesCheck.cpp
#!/bin/bash set -e set -x # Move up two levels to create the virtual # environment outside of the source folder cd ../../ python -m venv build_env source build_env/bin/activate python -m pip install numpy scipy cython python -m pip install twine build cd scikit-learn/scikit-learn python -m build --sdist # Check w...
unknown
github
https://github.com/scikit-learn/scikit-learn
build_tools/github/build_source.sh
# React Router Development ## Releases New 7.x releases should be created from release branches originating from the `dev` branch. If you are doing a 6.x release, please see the [v6 section](#v6-releases) below. When you are ready to begin the release process: - Make sure you've pulled all the changes from GitHub f...
unknown
github
https://github.com/remix-run/react-router
DEVELOPMENT.md
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
unknown
codeparrot/codeparrot-clean
/** * 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/TestStringSignerSecretProvider.java
# writeable [![crates.io](https://img.shields.io/crates/v/writeable)](https://crates.io/crates/writeable) <!-- cargo-rdme start --> This crate defines [`Writeable`], a trait representing an object that can be written to a sink implementing `std::fmt::Write`. It is an alternative to `std::fmt::Display` with the additi...
unknown
github
https://github.com/nodejs/node
deps/crates/vendor/writeable/README.md
# -*- coding: utf-8 -*- # $Id: da.py 7678 2013-07-03 09:57:36Z milde $ # Author: E D # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated for each...
unknown
codeparrot/codeparrot-clean
''' This module defines multiple utility functions for filtering, creation, slicing, etc. of neo.core objects. ''' import neo import copy import warnings import numpy as np import quantities as pq def get_events(container, **properties): """ This function returns a list of Event objects, corresponding to give...
unknown
codeparrot/codeparrot-clean
// Copyright 2016 The etcd 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 t...
go
github
https://github.com/etcd-io/etcd
pkg/netutil/routes_linux.go
require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 722: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropert...
javascript
github
https://github.com/vercel/next.js
.github/actions/upload-turboyet-data/dist/index.js
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/performance/InefficientStringConcatenationCheck.cpp
/*------------------------------------------------------------------------- * * pg_publication.h * definition of the "publication" system catalog (pg_publication) * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * ...
c
github
https://github.com/postgres/postgres
src/include/catalog/pg_publication.h
import pytest from pandas.util._validators import validate_args_and_kwargs @pytest.fixture def _fname(): return "func" def test_invalid_total_length_max_length_one(_fname): compat_args = ("foo",) kwargs = {"foo": "FOO"} args = ("FoO", "BaZ") min_fname_arg_count = 0 max_length = len(compat_ar...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/util/test_validate_args_and_kwargs.py
<script src="../../dist/vue.global.js"></script> <!-- item template --> <script type="text/x-template" id="item-template"> <li> <div :class="{bold: isFolder}" @click="toggle" @dblclick="changeType"> {{model.name}} <span v-if="isFolder">[{{open ? '-' : '+'}}]</span> </div> <u...
html
github
https://github.com/vuejs/core
packages/vue/examples/composition/tree.html
"""Test suite for the profile module.""" import sys import pstats import unittest from difflib import unified_diff from io import StringIO from test.support import run_unittest import profile from test.profilee import testfunc, timer class ProfileTest(unittest.TestCase): profilerclass = profile.Profile meth...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Author: darksky83 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...
unknown
codeparrot/codeparrot-clean
from django.dispatch.saferef import * from django.utils import unittest class Test1(object): def x(self): pass def test2(obj): pass class Test2(object): def __call__(self, obj): pass class Tester(unittest.TestCase): def setUp(self): ts = [] ss = [] for x in x...
unknown
codeparrot/codeparrot-clean
# (C) British Crown Copyright 2014 - 2016, Met Office # # This file is part of Iris. # # Iris 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 3 of the License, or # (at your option) any l...
unknown
codeparrot/codeparrot-clean
from celery import Celery from celery import Task from flask import Flask from flask import render_template def create_app() -> Flask: app = Flask(__name__) app.config.from_mapping( CELERY=dict( broker_url="redis://localhost", result_backend="redis://localhost", task...
python
github
https://github.com/pallets/flask
examples/celery/src/task_app/__init__.py
"""Config flow for NZBGet.""" import logging from typing import Any, Dict, Optional import voluptuous as vol from homeassistant.config_entries import CONN_CLASS_LOCAL_POLL, ConfigFlow, OptionsFlow from homeassistant.const import ( CONF_HOST, CONF_NAME, CONF_PASSWORD, CONF_PORT, CONF_SCAN_INTERVAL,...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.engine.mock import io.ktor.client.call.* import io.ktor.client.engine.* import io.ktor.client.request.* import io.ktor.client.statement.* import kotlinx.coroutines.* im...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-mock/common/src/io/ktor/client/engine/mock/MockEngineConfig.kt
/* Generated file to emulate the evaluator namespace. */ export * from "../../harness/_namespaces/evaluator.js";
typescript
github
https://github.com/microsoft/TypeScript
src/testRunner/_namespaces/evaluator.ts
import { type Target, isReadonly, isShallow, reactive, reactiveMap, readonly, readonlyMap, shallowReactiveMap, shallowReadonlyMap, toRaw, } from './reactive' import { arrayInstrumentations } from './arrayInstrumentations' import { ReactiveFlags, TrackOpTypes, TriggerOpTypes } from './constants' impo...
typescript
github
https://github.com/vuejs/core
packages/reactivity/src/baseHandlers.ts
// Copyright 2017 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. //go:build amd64 package math import "internal/cpu" var useFMA = cpu.X86.HasAVX && cpu.X86.HasFMA
go
github
https://github.com/golang/go
src/math/exp_amd64.go
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date from __future__ import unicode_literals DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATE...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing_extensions import Literal from ..._models import BaseModel __all__ = ["ResponseAudioTranscriptDeltaEvent"] class ResponseAudioTranscriptDeltaEvent(BaseModel): """Emitted when there is a partial transcript of audio....
python
github
https://github.com/openai/openai-python
src/openai/types/responses/response_audio_transcript_delta_event.py
"""Misc os module tests Made for Jython. """ import os import unittest from test import test_support class OSTestCase(unittest.TestCase): def setUp(self): open(test_support.TESTFN, 'w').close() def tearDown(self): if os.path.exists(test_support.TESTFN): os.remove(test_support.TES...
unknown
codeparrot/codeparrot-clean
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/apis/admission/v1/register.go
# Copyright 2011 OpenStack Foundation # Copyright 2011 Ilya Alekseyev # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
unknown
codeparrot/codeparrot-clean
[{"Limit":100,"ProximityPaths":["/usr/home/user/clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp"],"Query":"OMP","RestrictForCodeCompletion":true,"Scopes":["clang::"], "AnyScope":false, "PreferredTypes":[]}, {"Limit":100,"ProximityPaths":[],"Query":"s","RestrictForCodeCompletion":true,"Scopes":["llvm::", ""], "An...
json
github
https://github.com/llvm/llvm-project
clang-tools-extra/clangd/test/Inputs/requests.json
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/native/Cross.h> #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/TensorMeta.h> #include <ATen/WrapDimUtils.h> #include <ATen/ExpandUtils.h> #include <ATen/native/Resize.h> #include <ATen/MemoryOverlap.h> #ifndef AT_PER_OPERATOR_HEADERS #i...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/Cross.cpp
# Copyright (c) 2014 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 bash # Copyright 2022 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. set -euo pipefail google_credentials="$GOOGLE_EPHEMERAL_CREDENTIALS" dir="$(dirname $(dirname $(dirname $(dirname "${0}"))))" source "$dir/teamcity-sup...
unknown
github
https://github.com/cockroachdb/cockroach
build/teamcity/internal/release/build-and-publish-patched-go.sh
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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
import unittest from biicode.server.model.social_account import SocialAccount, SocialAccountToken from biicode.server.model.epoch.utc_datetime import UtcDatetime import datetime class SocialAccountTest(unittest.TestCase): def setUp(self): self.utc_datetime = UtcDatetime.deserialize(datetime.datetime.now())...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0 #include <linux/init.h> #include <linux/memblock.h> #include <linux/fs.h> #include <linux/sysfs.h> #include <linux/kobject.h> #include <linux/memory_hotplug.h> #include <linux/mm.h> #include <linux/mmzone.h> #include <linux/pagemap.h> #include <linux/rmap.h> #include <linux/mmu_notif...
c
github
https://github.com/torvalds/linux
mm/page_idle.c
/* * Copyright (C) 2009 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
java
github
https://github.com/google/guava
android/guava/src/com/google/common/collect/ArrayTable.java
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
unknown
codeparrot/codeparrot-clean
import urllib2 from StringIO import StringIO import gzip import cookielib import time class NZBDownloader(object): def __init__( self ): self.cj = cookielib.CookieJar() self.opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cj)) self.lastRequestTime = None def waitBeforeN...
unknown
codeparrot/codeparrot-clean
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
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 us...
unknown
codeparrot/codeparrot-clean
# Lint as: python3 # Copyright 2020 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 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright 2023 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. # This script is the third step of the "Publish Coverage" build. # # It takes the HTML mini-websites produced by the previous step and uploads them # to...
unknown
github
https://github.com/cockroachdb/cockroach
build/teamcity/cockroach/coverage/publish_upload.sh
# vi: ts=4 expandtab # # Copyright (C) 2009-2010 Canonical Ltd. # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # # Author: Scott Moser <scott.moser@canonical.com> # Author: Juerg Haefliger <juerg.haefliger@hp.com> # # This program is free software: you can redistribute it and/or modify # ...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * cmdtag.c * Data and routines for commandtag names and enumeration. * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION...
c
github
https://github.com/postgres/postgres
src/backend/tcop/cmdtag.c
import type { AppLoadContext } from "../server-runtime/data"; import type { RequestHandler } from "../server-runtime/server"; import type { MiddlewareEnabled } from "../types/future"; import { createPath, invariant } from "./history"; import type { Router } from "./router"; import type { ActionFunctionArgs, Agnosti...
typescript
github
https://github.com/remix-run/react-router
packages/react-router/lib/router/instrumentation.ts
# frozen_string_literal: true require "active_support/tagged_logging" require "active_support/logger" module ActiveJob module Logging extend ActiveSupport::Concern included do ## # Accepts a logger conforming to the interface of Log4r or the default # Ruby +Logger+ class. You can retrieve...
ruby
github
https://github.com/rails/rails
activejob/lib/active_job/logging.rb
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. #ifndef OPENCV_UTILS_FILESYSTEM_HPP #define OPENCV_UTILS_FILESYSTEM_HPP namespace cv { namespace utils { namespace fs { CV_...
unknown
github
https://github.com/opencv/opencv
modules/core/include/opencv2/core/utils/filesystem.hpp
#ifndef ITERATOR_H #define ITERATOR_H /* * Generic constants related to iterators. */ /* * The attempt to advance the iterator was successful; the iterator * reflects the new current entry. */ #define ITER_OK 0 /* * The iterator is exhausted. */ #define ITER_DONE -1 /* * The iterator experienced an error. T...
c
github
https://github.com/git/git
iterator.h
""" Make transformations/adjustments/reorganisations of the QOF data """ import os import datetime import json import sys import ffs import re from publish.lib.helpers import filename_for_resource, download_file from publish.lib.upload import Uploader DATA_DIR = None def get_metadata_file(filename): root = os.p...
unknown
codeparrot/codeparrot-clean
import numpy as np import time from cvxpy import * from utils import * np.random.seed(123) num_iters = 10 # WARNING: DO NOT SET ABOVE 4 (basic cvxpy dies) dim1 = 2 dim2 = 2 num_data = 1000 vec_perm = vecperm(dim1, dim2) tgt_kron1, tgt_kron2 = generate_pd_krons(dim1, dim2) rand_mat = np.kron(tgt_kron1, tgt_kron2) #...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 coding=utf-8 import os, glob from django.core.management.base import BaseCommand from django.core.management import call_command from django.utils.translation import ugettext_lazy from settings import PROJECT_ROOT import os from django.core.serializers import serial...
unknown
codeparrot/codeparrot-clean
# Copyright 2017 The Sonnet 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 l...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package token import ( "fmt" "io" "os" "strconv" "strings" "github.com/hashicorp/go-secure-stdlib/password" "github.com/hashicorp/vault/api" ) type CLIHandler struct { // for tests testStdin io.Reader testStdout io.Writer } func (h *...
go
github
https://github.com/hashicorp/vault
builtin/credential/token/cli.go
#!/usr/bin/env python3 # Copyright (C) 2017 Inria # # 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. import sys from testrunner import run PS_EXPECTED = ( ('\tpid | name | state ...
unknown
codeparrot/codeparrot-clean
{ "name": "angular.dev", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "angular.dev", "version": "0.0.0", "dependencies": { "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", "@angular/core": "^19.0.0", ...
json
github
https://github.com/angular/angular
adev/shared-docs/pipeline/tutorials/common/package-lock.json
from django.utils.encoding import smart_str from hashlib import sha1 from mediagenerator.generators.bundles.base import Filter from mediagenerator.utils import find_file, read_text_file from subprocess import Popen, PIPE import os import sys class CoffeeScript(Filter): takes_input = False def __init__(self, *...
unknown
codeparrot/codeparrot-clean
benchmark: vm_string_literal: | x = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" loop_count: 6000000
unknown
github
https://github.com/ruby/ruby
benchmark/vm_string_literal.yml
from __future__ import unicode_literals import boto3 import sure # noqa from moto import mock_opsworks from moto import mock_ec2 @mock_opsworks def test_create_instance(): client = boto3.client('opsworks', region_name='us-east-1') stack_id = client.create_stack( Name="test_stack_1", Region="u...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright 2023 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/install-protoc.sh