code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# (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
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2013 Hannes Bretschneider # 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. # This program is distribut...
unknown
codeparrot/codeparrot-clean
########################################################################## # # Copyright (c) 2014, Image Engine Design Inc. All rights reserved. # Copyright (c) 2014, John Haddon. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that ...
unknown
codeparrot/codeparrot-clean
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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,...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # # 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 la...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/conformance/expressions/commaOperator/commaOperatorOtherInvalidOperation.ts] //// //// [commaOperatorOtherInvalidOperation.ts] //Expect to have compiler errors //Comma operator in function arguments and return function foo(x: number, y: string) { return x, y; } var resultIsString: number = foo(1,...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/commaOperatorOtherInvalidOperation.js
#!/usr/bin/env python3 """ Python 3 script which converts simple RetroArch Cg shaders to modern GLSL (ES) format. Author: Hans-Kristian Arntzen (Themaister) License: Public domain """ import os import errno import subprocess import sys if sys.version_info < (3, 0, 0): sys.stderr.write("You need python 3.0 or lat...
unknown
codeparrot/codeparrot-clean
"""Class for a VectorStore-backed memory object.""" from collections.abc import Sequence from typing import Any from langchain_core._api import deprecated from langchain_core.documents import Document from langchain_core.vectorstores import VectorStoreRetriever from pydantic import Field from langchain_classic.base_...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/memory/vectorstore.py
import fnmatch import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured def matches_patterns(path, patterns=None): """ Return True or False depending on whether the ``path`` should be ignored (if it matches any pattern in ``ignore_patterns``). """ if patte...
unknown
codeparrot/codeparrot-clean
# The App Engine Console configuration options # Set this to true if you want to hide the console from non-authorized users # by returning HTTP 404 (file not found), instead of the normal behavior. hide_from_invalid_users = False # In production mode, only administrators may use the console. However, if you # really ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/factory/xml/AbstractListableBeanFactoryTests.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...
python
github
https://github.com/apache/airflow
airflow-ctl/src/airflowctl/ctl/commands/dag_command.py
from functools import update_wrapper from django.apps import apps from django.conf import settings from django.contrib.admin import ModelAdmin, actions from django.contrib.auth import REDIRECT_FIELD_NAME from django.core.exceptions import ImproperlyConfigured, PermissionDenied from django.core.urlresolvers import NoRe...
unknown
codeparrot/codeparrot-clean
// Copyright 2023 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package backup import ( "time" "github.com/cockroachdb/cockroach/pkg/jobs" "github.com/cockroachdb/cockroach/pkg/util/metric" ) type BackupMetrics struct { LastKM...
go
github
https://github.com/cockroachdb/cockroach
pkg/backup/backup_metrics.go
#!/usr/bin/env python #coding=utf-8 # Copyright (c) 2011, Alibaba Cloud Computing # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # wi...
unknown
codeparrot/codeparrot-clean
"""CherryPy Benchmark Tool Usage: benchmark.py --null --notests --help --cpmodpy --modpython --ab=path --apache=path --null: use a null Request object (to bench the HTTP server only) --notests: start the server but do not run the tests; this allows you to check the te...
unknown
codeparrot/codeparrot-clean
__author__ = 'gigi' RANGE_SIZE = 100 primes = [2, 3, 5, 7] last_range_start = None def get_next_range(): global last_range_start if last_range_start is None: last_range_start = 10 else: last_range_start += RANGE_SIZE return last_range_start, last_range_start + RANGE_SIZE def check_r...
unknown
codeparrot/codeparrot-clean
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v1beta1", "metadata": { "name": "v0alpha1.barchart-tooltips-legends.v42" }, "spec": { "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana -...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/panel-barchart/v0alpha1.barchart-tooltips-legends.v42.v1beta1.json
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/generator/factory/NumberHolderFactoryBean.java
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package renderers import ( "bytes" "fmt" "github.com/hashicorp/terraform/internal/command/jsonformat/computed" "github.com/hashicorp/terraform/internal/plans" ) var _ computed.DiffRenderer = (*listRenderer)(nil) func List(elements []computed...
go
github
https://github.com/hashicorp/terraform
internal/command/jsonformat/computed/renderers/list.go
from datetime import datetime from courseaffils.models import Course from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError from django.db import models from django.db.models import Q import reversion from threadedcommen...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # path.py: Path functions. # # Copyright (C) 2010 Yesudeep Mangalapilly <yesudeep@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software wi...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package pluginutil import ( "context" "fmt" "reflect" "testing" "google.golang.org/grpc" "google.golang.org/grpc/metadata" ) func TestMultiplexingSupported(t *testing.T) { type args struct { ctx context.Context cc grpc.ClientConnInt...
go
github
https://github.com/hashicorp/vault
sdk/helper/pluginutil/multiplexing_test.go
# Natural Language Toolkit: Probabilistic Chart Parsers # # Copyright (C) 2001-2013 NLTK Project # Author: Edward Loper <edloper@gmail.com> # Steven Bird <stevenbird1@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Classes and interfaces for associating probabilities with tr...
unknown
codeparrot/codeparrot-clean
from binascii import hexlify, unhexlify from hashlib import md5, sha1 from ..exceptions import SSLError try: # Test for SSL features SSLContext = None HAS_SNI = False import ssl from ssl import wrap_socket, CERT_NONE, PROTOCOL_SSLv23 from ssl import SSLContext # Modern SSL? from ssl import ...
unknown
codeparrot/codeparrot-clean
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2014 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the...
unknown
codeparrot/codeparrot-clean
# المحولات النمطية مكتبة `transformers` هي إطار عمل ذو فلسفة محدد؛ يتم تعريف فلسفتنا في [الدليل المفاهيمي](./philosophy). جوهر هذه الفلسفة يتمثل في مبدأ [نموذج واحد، ملف واحد](https://huggingface.co/blog/transformers-design-philosophy) في المكتبة. الجانب السلبي لهذا المكون هو تقييده لوراثة واستيراد مكونات الملفات. ن...
unknown
github
https://github.com/huggingface/transformers
docs/source/ar/modular_transformers.md
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package releaseauth // Authenticator is a generic interface for interacting with types that authenticate // an archive. type Authenticator interface { Authenticate() error } // All is a meta Authenticator that wraps other Authenticators and ensur...
go
github
https://github.com/hashicorp/terraform
internal/releaseauth/all.go
#include <ATen/ATen.h> #include <ATen/NativeFunctions.h> #include <ATen/Config.h> #if !AT_MKLDNN_ENABLED() namespace at::native { Tensor mkldnn_prelu(const Tensor& input, const Tensor& weight) { TORCH_CHECK(false, "mkldnn_prelu: ATen not compiled with MKLDNN support"); } std::tuple<Tensor, Tensor> mkldnn_prelu_ba...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/mkldnn/Prelu.cpp
"""Tests for Wake On LAN component.""" from unittest.mock import patch import pytest import voluptuous as vol from homeassistant.components.wake_on_lan import DOMAIN, SERVICE_SEND_MAGIC_PACKET from homeassistant.setup import async_setup_component async def test_send_magic_packet(hass): """Test of send magic pack...
unknown
codeparrot/codeparrot-clean
// MODULE: context //FILE: context.kt fun main() { class Foo <caret_context>output("hi") } fun output(text: String) {} // MODULE: main // MODULE_KIND: CodeFragment // CONTEXT_MODULE: context // FILE: fragment.kt // CODE_FRAGMENT_KIND: EXPRESSION Foo()
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/testData/components/compilerFacility/compilation/codeFragments/localClass.kt
"""Offer Home Assistant core automation rules.""" import voluptuous as vol from homeassistant.const import CONF_EVENT, CONF_PLATFORM, EVENT_HOMEASSISTANT_STOP from homeassistant.core import HassJob, callback # mypy: allow-untyped-defs EVENT_START = "start" EVENT_SHUTDOWN = "shutdown" TRIGGER_SCHEMA = vol.Schema( ...
unknown
codeparrot/codeparrot-clean
- hosts: localhost gather_facts: false tasks: - include_role: name: "{{ item }}" loop: - setup_test_user - role-meta-inheritance
unknown
github
https://github.com/ansible/ansible
test/integration/targets/keyword_inheritance/dep_keyword_inheritance.yml
# # 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...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/migrations/versions/0019_2_10_0_add_new_executor_field_to_db.py
A variable already borrowed with a certain mutability (either mutable or immutable) was borrowed again with a different mutability. Erroneous code example: ```compile_fail,E0502 fn bar(x: &mut i32) {} fn foo(a: &mut i32) { let y = &a; // a is borrowed as immutable. bar(a); // error: cannot borrow `*a` as muta...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0502.md
details { background-color: rgba(50, 150, 220, 0.08); margin-bottom: 0.5em; padding: 0 1em; overflow-y: hidden; /* Suppress margin-collapsing */ } details[open] { border-bottom: 1px solid rgba(0, 0, 128, 0.2); margin-bottom: 1em; } details summary { font-weight: bold; background-color: rgba(50, 150, 220...
css
github
https://github.com/llvm/llvm-project
clang-tools-extra/docs/_static/clang-tools-extra-styles.css
#!/bin/bash #set -x RATIO_LIST="${RATIO_LIST:-1/128 1/8 1/4 1/2 2/1 4/1 8/1 128/1}" VALUE_SIZE_POWER_RANGE="${VALUE_SIZE_POWER_RANGE:-8 14}" CONN_CLI_COUNT_POWER_RANGE="${CONN_CLI_COUNT_POWER_RANGE:-5 11}" REPEAT_COUNT="${REPEAT_COUNT:-5}" RUN_COUNT="${RUN_COUNT:-200000}" KEY_SIZE="${KEY_SIZE:-256}" KEY_SPACE_SIZE="...
unknown
github
https://github.com/etcd-io/etcd
tools/rw-heatmaps/rw-benchmark.sh
#------------------------------------------------------------- # # 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...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-25 00:34 from __future__ import unicode_literals from django.db import migrations, models import pdfapp.validators class Migration(migrations.Migration): dependencies = [ ('pdfapp', '0009_auto_20170223_2247'), ] operations = [ ...
unknown
codeparrot/codeparrot-clean
//===--- Path.h - Helper typedefs --------------------------------*- C++-*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/clangd/support/Path.h
/*------------------------------------------------------------------------- * * geo_spgist.c * SP-GiST implementation of 4-dimensional quad tree over boxes * * This module provides SP-GiST implementation for boxes using quad tree * analogy in 4-dimensional space. SP-GiST doesn't allow indexing of * overlappin...
c
github
https://github.com/postgres/postgres
src/backend/utils/adt/geo_spgist.c
from __future__ import absolute_import from ..packages.six.moves import http_client as httplib from ..exceptions import HeaderParsingError def is_fp_closed(obj): """ Checks whether a given file-like object is closed. :param obj: The file-like object to check. """ try: # Check via...
unknown
codeparrot/codeparrot-clean
from collections import ( abc, deque, ) from collections.abc import Iterator from datetime import datetime from decimal import Decimal import itertools import numpy as np import pytest from pandas.errors import ( InvalidIndexError, Pandas4Warning, ) import pandas as pd from pandas import ( DataFr...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/reshape/concat/test_concat.py
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from core import perf_benchmark from benchmarks import silk_flags from telemetry import benchmark from telemetry.timeline import tracing_category_filter fr...
unknown
codeparrot/codeparrot-clean
# Copyright 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 req...
unknown
codeparrot/codeparrot-clean
{ "goodbye": "world" }
json
github
https://github.com/hashicorp/terraform
testing/equivalence-tests/outputs/local_provider_update/output.json
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Adam Miller (maxamillion@fedoraproject.org) # # 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 ...
unknown
codeparrot/codeparrot-clean
package client import ( "net/http" "testing" cerrdefs "github.com/containerd/errdefs" "github.com/moby/moby/api/types/container" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) func TestContainerPruneError(t *testing.T) { client, err := New(WithMockClient(errorMock(http.StatusInternalServerError, "...
go
github
https://github.com/moby/moby
client/container_prune_test.go
# Distributed Data Parallel Benchmark This tool is used to measure distributed training iteration time. This is helpful for evaluating the performance impact of code changes to `torch.nn.parallel.DistributedDataParallel`, `torch.distributed`, or anything in between. It optionally produces a JSON file with all measure...
unknown
github
https://github.com/pytorch/pytorch
benchmarks/distributed/ddp/README.md
// Copyright(c) 2015-present, Gabi Melman & spdlog contributors. // Distributed under the MIT License (http://opensource.org/licenses/MIT) #pragma once #include <spdlog/details/log_msg_buffer.h> #include <spdlog/details/mpmc_blocking_q.h> #include <spdlog/details/os.h> #include <chrono> #include <functional> #includ...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/spdlog/include/spdlog/details/thread_pool.h
//===--- AnyFunctionRef.h - A Universal Function Reference ------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
c
github
https://github.com/apple/swift
include/swift/AST/AnyFunctionRef.h
""" Test functions for limits module. """ from __future__ import division, absolute_import, print_function import numpy as np from numpy.core import finfo, iinfo from numpy import half, single, double, longdouble from numpy.testing import ( TestCase, run_module_suite, assert_equal ) #############################...
unknown
codeparrot/codeparrot-clean
package client import ( "context" "encoding/json" "net/netip" "github.com/moby/moby/api/types/swarm" ) // SwarmInitOptions contains options for initializing a new swarm. type SwarmInitOptions struct { ListenAddr string AdvertiseAddr string DataPathAddr string DataPathPort uint32 ForceNewClu...
go
github
https://github.com/moby/moby
client/swarm_init.go
# 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
codeparrot/codeparrot-clean
"""Module to help with parsing and generating configuration files.""" import asyncio from collections import OrderedDict # pylint: disable=no-name-in-module from distutils.version import LooseVersion # pylint: disable=import-error import logging import os import re import shutil import sys # pylint: disable=unused-imp...
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines.reactor import kotlinx.coroutines.testing.* import kotlinx.coroutines.* import kotlinx.coroutines.channels.* import kotlinx.coroutines.flow.* import kotlinx.coroutines.reactive.* import org.junit.* import org.junit.Test import kotlin.test.* class ConvertTest : TestBase() { @Test fun...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
reactive/kotlinx-coroutines-reactor/test/ConvertTest.kt
# Copyright (C) 2011-2012 Yaco Sistemas (http://www.yaco.es) # Copyright (C) 2010 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.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 # # ...
unknown
codeparrot/codeparrot-clean
""" PT-specific Form helpers """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.utils.encoding import smart_unicode from django.utils.translation import ugettext_lazy as _ import re phone_digits_re = re.com...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
unknown
codeparrot/codeparrot-clean
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2016, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
unknown
codeparrot/codeparrot-clean
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
{ "dependencies": { "@angular/animations": "workspace:*", "@angular/benchpress": "workspace: *", "@angular/common": "workspace:*", "@angular/compiler-cli": "workspace:*", "@angular/compiler": "workspace:*", "@angular/core": "workspace:*", "@angular/elements": "workspace:*", "@angular/f...
json
github
https://github.com/angular/angular
integration/package.json
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/errors/DuplicateBrokerRegistrationException.java
/* Copyright (c) 2009, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including...
c
github
https://github.com/mysql/mysql-server
sql/sql_plugin_services.h
# Software License Agreement (BSD License) # # Copyright (c) 2012, 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...
unknown
codeparrot/codeparrot-clean
import datetime import decimal import warnings from importlib import import_module from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.backends import utils from django.utils import six, timezone from django.utils.dateparse import parse_duration from django.utils.dep...
unknown
codeparrot/codeparrot-clean
/** @import { Value } from '#client' */ import { internal_set } from './reactivity/sources.js'; import { untrack } from './runtime.js'; /** * @type {Set<Value> | null} * @deprecated */ export let captured_signals = null; /** * Capture an array of all the signals that are read when `fn` is called * @template T *...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/internal/client/legacy.js
""" Common utility functions useful throughout the contentstore """ import logging from opaque_keys import InvalidKeyError import re from datetime import datetime from pytz import UTC from django.conf import settings from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ''' Created on Jun 19, 2017 @author: dzh ''' from ..model.constant import (YP_SIGN_HOST, APIKEY, SIGN, VERSION_V2, OLD_SIGN) from .ypapi import YunpianApi, CommonResultHandler class SignApi(YunpianApi): '''签名接口 https://www.yunpian.com/api2.0/sign.html''' def _init(self, clnt): ...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.2.ts] //// //// [awaitUsingDeclarationsInForOf.2.ts] async function main() { for (await using of of []) { } } //// [awaitUsingDeclarationsInForOf.2.js] "use strict"; async function main() { for (awa...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/awaitUsingDeclarationsInForOf.2.js
''' CheckBox ======== .. versionadded:: 1.4.0 .. image:: images/checkbox.png :align: right :class:`CheckBox` is a specific two-state button that can be either checked or unchecked. If the CheckBox is in a Group, it becomes a Radio button. As with the :class:`~kivy.uix.togglebutton.ToggleButton`, only one Radio b...
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 applica...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Validation; use Closure; use Illuminate\Contracts\Container\Container; use Illuminate\Contracts\Translation\Translator; use Illuminate\Contracts\Validation\Factory as FactoryContract; use Illuminate\Support\Str; class Factory implements FactoryContract { /** * The Translator imple...
php
github
https://github.com/laravel/framework
src/Illuminate/Validation/Factory.php
//===--- GenPack.cpp - Swift IR Generation For Variadic Generics ----------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2022 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE....
cpp
github
https://github.com/apple/swift
lib/IRGen/GenPack.cpp
'use strict'; const common = require('../common.js'); const { deepEqual, deepStrictEqual, notDeepEqual, notDeepStrictEqual } = require('assert'); const bench = common.createBenchmark(main, { n: [2e3], len: [5e2], strict: [0, 1], method: [ 'deepEqual_primitiveOnly', 'deepEqual_objectOnly', 'deepE...
javascript
github
https://github.com/nodejs/node
benchmark/assert/deepequal-map.js
# -*- coding: utf-8 -*- from module.plugins.Account import Account class FourSharedCom(Account): __name__ = "FourSharedCom" __type__ = "account" __version__ = "0.04" __description__ = """FourShared.com account plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg...
unknown
codeparrot/codeparrot-clean
<!-- Thank you for sending a pull request! Here are some tips: 1. If this is your first time, please read our contribution guide at https://github.com/grafana/grafana/blob/main/CONTRIBUTING.md 2. Ensure you include and run the appropriate tests as part of your Pull Request. 3. In a new feature or configuration opti...
unknown
github
https://github.com/grafana/grafana
.github/PULL_REQUEST_TEMPLATE.md
// Copyright 2017 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package security_test import ( "fmt" "os" "path/filepath" "strings" "testing" "time" "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/coc...
go
github
https://github.com/cockroachdb/cockroach
pkg/security/certificate_manager_test.go
# frozen_string_literal: true module Bundler class RubyVersion attr_reader :versions, :patchlevel, :engine, :engine_versions, :gem_version, :engine_gem_version def initialize(versions, patchlevel, engine, engine_version) # The parameters to this method must satisfy the ...
ruby
github
https://github.com/ruby/ruby
lib/bundler/ruby_version.rb
import globals from "./globals.json?all"; import someGlobals from "./globals.json"; it("should be able to read all properties", () => { const walk = o => { for (const p of Object.keys(o)) { const child = o[p]; if (typeof child === "object") { walk(child); } else { expect(child).toBeTypeOf("boolean"...
javascript
github
https://github.com/webpack/webpack
test/cases/json/weird-properties/index.js
import sys from django.core.management.color import color_style from django.db import IntegrityError, migrations, transaction from django.db.models import Q WARNING = """ A problem arose migrating proxy model permissions for {old} to {new}. Permission(s) for {new} already existed. Codenames Q: {query...
python
github
https://github.com/django/django
django/contrib/auth/migrations/0011_update_proxy_permissions.py
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
unknown
codeparrot/codeparrot-clean
#!@PYTHON@ #-*- coding: utf-8 -*- """ Documentation i18n module """ import re import sys import os def lang_file_name (p, langext, ext): if langext != '': return p + '.' + langext + ext return p + ext class LanguageDef: def __init__ (self, code, name, webext=None, double_punct_char_sep='', html_...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.callbacks.whylabs_callback import WhyLabsCallbackHandler # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and #...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/callbacks/whylabs_callback.py
# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 ############################################################################### # OpenLP - Open Source Lyrics Projection # # ------------------------------------------------------...
unknown
codeparrot/codeparrot-clean
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from opus_core.variables.variable import Variable from urbansim.functions import attribute_label from numpy import reshape class income_less_housing_cost_scaled(Variable): """ (income - housing_co...
unknown
codeparrot/codeparrot-clean
from rope.base.fscommands import _decode_data from rope.base import ast, exceptions, utils class PyObject(object): def __init__(self, type_): if type_ is None: type_ = self self.type = type_ def get_attributes(self): if self.type is self: return {} retu...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- from abjad.tools.abctools.AbjadObject import AbjadObject class LilyPondNameManager(AbjadObject): r'''Base class from which LilyPond grob and setting managers inherit. ''' ### SPECIAL METHODS ### def __eq__(self, arg): r'''Is true when `arg` is a LilyPond name manager...
unknown
codeparrot/codeparrot-clean
import base64 import os.path from django.conf import settings from django.core import mail import mock from nose import SkipTest from nose.tools import eq_, ok_ import mkt from mkt.comm.models import CommunicationThread, CommunicationThreadToken from mkt.comm.tests.test_views import CommTestMixin from mkt.comm.utils...
unknown
codeparrot/codeparrot-clean
# Code adapted from "upfirdn" python library with permission: # # Copyright (c) 2009, Motorola, 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 re...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ### # Copyright (c) 2002-2007 Systems in Motion # # Permission to use, copy, modify, and distribute this software 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 "AS I...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, René Moser <mail@renemoser.net> # # 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 Lice...
unknown
codeparrot/codeparrot-clean
import psycopg2 from django.db.backends.base.schema import BaseDatabaseSchemaEditor class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): sql_create_sequence = "CREATE SEQUENCE %(sequence)s" sql_delete_sequence = "DROP SEQUENCE IF EXISTS %(sequence)s CASCADE" sql_set_sequence_max = "SELECT setval('%(sequ...
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
#pragma once // A fixed-size array type usable from both host and // device code. #include <c10/macros/Macros.h> #include <c10/util/irange.h> namespace at::detail { template <typename T, int size_> struct Array { // NOLINTNEXTLINE(*c-array*) T data[size_]; C10_HOST_DEVICE T operator[](int i) const { retu...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/core/Array.h
# -*- coding: utf-8 -*- from PyQt4.QtCore import * from PyQt4.QtGui import * from qgis.core import * from qgis.gui import * from ui_widgetInfo import Ui_GdalToolsWidget as Ui_Widget from widgetPluginBase import GdalToolsBasePluginWidget as BasePluginWidget import GdalTools_utils as Utils import platform class GdalTo...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python2.7 # # This file is part of khmer, http://github.com/ged-lab/khmer/, and is # Copyright (C) Michigan State University, 2009-2014. It is licensed under # the three-clause BSD license; see doc/LICENSE.txt. # Contact: khmer-project@idyll.org # # pylint: disable=invalid-name,missing-docstring """ Build a ...
unknown
codeparrot/codeparrot-clean
name: Turbopack Next.js production integration tests on: schedule: - cron: '0 6 * * *' workflow_dispatch: {} jobs: test-dev: name: Next.js integration tests uses: ./.github/workflows/integration_tests_reusable.yml with: name: turbopack-production test_type: production run_befor...
unknown
github
https://github.com/vercel/next.js
.github/workflows/turbopack-nextjs-build-integration-tests.yml
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import re import logging import time import xml.etree.ElementTree as ET from lib.cuckoo.common.config import Config from lib.cuckoo.common....
unknown
codeparrot/codeparrot-clean