code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
<?php namespace Illuminate\Session\Console; use Illuminate\Console\MigrationGeneratorCommand; use Symfony\Component\Console\Attribute\AsCommand; use function Illuminate\Filesystem\join_paths; #[AsCommand(name: 'make:session-table', aliases: ['session:table'])] class SessionTableCommand extends MigrationGeneratorCom...
php
github
https://github.com/laravel/framework
src/Illuminate/Session/Console/SessionTableCommand.php
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
unknown
codeparrot/codeparrot-clean
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from urbansim.abstract_variables.abstract_number_of_agents_with_same_attribute_value import abstract_number_of_agents_with_same_attribute_value class same_sector_employment_in_zone(abstract_number_of_...
unknown
codeparrot/codeparrot-clean
""" termcolors.py """ from django.utils import six color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white') foreground = {color_names[x]: '3%s' % x for x in range(8)} background = {color_names[x]: '4%s' % x for x in range(8)} RESET = '0' opt_dict = {'bold': '1', 'underscore': '4', 'blink...
unknown
codeparrot/codeparrot-clean
""" Annotation Component Page. """ from bok_choy.page_object import PageObject from selenium.webdriver import ActionChains class AnnotationComponentPage(PageObject): """ View of annotation component page. """ url = None active_problem = 0 def is_browser_on_page(self): return self.q(cs...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2020 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.util.reflection; import net.bytebuddy.ByteBuddy; import net.bytebuddy.dynamic.loading.ByteArrayClassLoader; import net.bytebuddy.dynamic.loading.InjectionClassLoader; imp...
java
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/internal/util/reflection/InstrumentationMemberAccessor.java
/*! * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { Injectable, InjectionToken, Provider, inject, linkedSignal, resource, signal, } from '@angula...
typescript
github
https://github.com/angular/angular
adev/shared-docs/services/search.service.ts
# Authors: # Jr Aquino <jr.aquino@citrixonline.com> # # Copyright (C) 2010 Red Hat # see file 'COPYING' for use and warranty information # # 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, eith...
unknown
codeparrot/codeparrot-clean
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, ...
java
github
https://github.com/elastic/elasticsearch
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ResolveAllDependencies.java
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot/src/main/java/org/springframework/boot/ssl/NoSuchSslBundleException.java
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 versio...
unknown
codeparrot/codeparrot-clean
{ "type": "editor-only", "title": "Signals template", "openFiles": ["src/main.ts"] }
json
github
https://github.com/angular/angular
adev/src/content/tutorials/playground/1-signals/config.json
//===--- SwiftCompletionInfo.h --------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2019 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/IDE/SwiftCompletionInfo.h
from django.apps import apps as global_apps from django.db import DEFAULT_DB_ALIAS, migrations, router, transaction from django.db.utils import IntegrityError class RenameContentType(migrations.RunPython): def __init__(self, app_label, old_model, new_model): self.app_label = app_label self.old_mode...
unknown
codeparrot/codeparrot-clean
import React from "react"; import classes from "./index.module.scss"; export type VerticalPaddingOptions = "large" | "medium" | "none"; type Props = { top?: VerticalPaddingOptions; bottom?: VerticalPaddingOptions; children: React.ReactNode; className?: string; }; export const VerticalPadding: React.FC<Props>...
typescript
github
https://github.com/vercel/next.js
examples/cms-payload/components/VerticalPadding/index.tsx
// @validateRefAccessDuringRender false function VideoTab() { const ref = useRef(); let x = () => { console.log(ref.current.x); }; return <VideoList videos={x} />; }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/ref-current-field-not-added-to-dep.js
<script setup> import * as d3 from "d3"; import WorldMap from "../components/WorldMap.vue"; const width = 688; const height = 400; </script> # Spherical shapes These shape generators return spherical GeoJSON for use with [geoPath](./path.md). :::tip To generate a [great arc](https://en.wikipedia.org/wiki/Great-ci...
unknown
github
https://github.com/d3/d3
docs/d3-geo/shape.md
# Copyright 2015 The Bazel 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 la...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 # Copyright 2011 Tree.io Limited # This file is part of Treeio. # License www.tree.io/license # encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deletin...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2014 GigaSpaces Technologies Ltd. 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 ...
unknown
codeparrot/codeparrot-clean
# numpy: numerical library import numpy as np # avoid broken installs by forcing Agg backend... #import matplotlib #matplotlib.use('Agg') # pylab: matplotlib's matlab-like interface import pylab as plt # The data we will fit: # x, y, sigma_y data1 = np.array([[201,592,61],[244,401,25],[47,583,38],[287,402,15],[203,49...
unknown
codeparrot/codeparrot-clean
# Copyright 2012-2013 Greg Horn # # This file is part of rawesome. # # rawesome 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 later version. ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from .decorators import coroutine from .tools import genPassthrough, genFilter, genMap, genPairs,\ coReceive, pushFromIterable @coroutine def coSplit(predicate, trueTarget, falseTarget): while True: val = (yield) if predicate(val): trueTarget.send(val) ...
unknown
codeparrot/codeparrot-clean
# BEGIN_COPYRIGHT # # Copyright (C) 2009-2013 CRS4. # # This file is part of biodoop-core. # # biodoop-core 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) ...
unknown
codeparrot/codeparrot-clean
""" Path Converter. pymdownx.pathconverter An extension for Python Markdown. An extension to covert tag paths to relative or absolute: Given an absolute base and a target relative path, this extension searches for file references that are relative and converts them to a path relative to the base path. -or- Given a...
unknown
codeparrot/codeparrot-clean
"Test the functionality of Python classes implementing operators." import unittest from test import test_support testmeths = [ # Binary operations "add", "radd", "sub", "rsub", "mul", "rmul", "div", "rdiv", "mod", "rmod", "divmod", "rdivmod", "pow", "rpow", ...
unknown
codeparrot/codeparrot-clean
# stdlib from datetime import datetime import glob from itertools import groupby import os import re import sys import time import traceback # project from checks import LaconicFilter import modules from util import windows_friendly_colon_split from utils.tailfile import TailFile if hasattr('some string', 'partition'...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # Copyright 2015, Durachenko Aleksey V. <durachenko.aleksey@gmail.com> # # 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 Lice...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """QGIS Unit tests for various projection selection widgets. .. 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...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django import forms from django.contrib.auth import authenticate from django.contrib.auth.forms import AuthenticationForm from django.utils.translation import ugettext_lazy ERROR_MESSAGE = ugettext_lazy("Please enter the correct %(username)s and password " "for a ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################### # # PutBucketRequestPayment # Sets the request payment configuration of a bucket. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License");...
unknown
codeparrot/codeparrot-clean
import assert from 'assert'; import { startHTTPServer, stopHTTPServer, LOCAL_SERVER_URL, setTimeoutAsync, makeReadableStream, generateReadable, makeEchoStream } from '../../helpers/server.js'; import axios from '../../../index.js'; import stream from "stream"; import { AbortController } from "abortcontrol...
javascript
github
https://github.com/axios/axios
test/unit/adapters/fetch.js
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'GeneratedCertificate.graded_download_url' db.delete_column('certificates_generatedcertifica...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from app.gui.configdialog import ConfigDialog from app.gui.groupconfig_ui import Ui_GroupConfig from app.gui.deletegroup_ui import Ui_DeleteGroupDialog from PyQt4.QtGui import QLineEdit, QDialog class GroupConfigDialog(ConfigDialog): def __init__(self, configObject): optionalAttribu...
unknown
codeparrot/codeparrot-clean
"""Define Guardian-specific utilities.""" import asyncio from datetime import timedelta from typing import Awaitable, Callable from aioguardian import Client from aioguardian.errors import GuardianError from homeassistant.core import HomeAssistant from homeassistant.helpers.update_coordinator import DataUpdateCoordin...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # 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 rights to use, copy, modi...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """Tests of Beautiful Soup as a whole.""" from pdb import set_trace import logging import unittest import sys import tempfile from bs4 import ( BeautifulSoup, BeautifulStoneSoup, ) from bs4.element import ( CharsetMetaAttributeValue, ContentMetaAttributeValue, SoupStrainer,...
unknown
codeparrot/codeparrot-clean
const fs = require("node:fs"); const { execSync } = require("child_process"); const chalk = require("chalk"); const semver = require("semver"); const { ensureCleanWorkingDirectory, invariant, updatePackageConfig, } = require("./utils"); async function run() { try { let args = process.argv.slice(2); le...
javascript
github
https://github.com/remix-run/react-router
scripts/version.js
/** * Support classes for the open source cache in * <a href="https://github.com/ben-manes/caffeine/">Caffeine</a> library, * allowing to set up Caffeine caches within Spring's cache abstraction. */ @NullMarked package org.springframework.cache.caffeine; import org.jspecify.annotations.NullMarked;
java
github
https://github.com/spring-projects/spring-framework
spring-context-support/src/main/java/org/springframework/cache/caffeine/package-info.java
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package terraform import ( "log" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/states" ) // OrphanOutputTransformer finds the outputs that aren't pre...
go
github
https://github.com/hashicorp/terraform
internal/terraform/transform_orphan_output.go
{ "extends": "./tsconfig.json", "compilerOptions": { "plugins": [ { "name": "@bazel/tsetse", "disabledRules": [ "must-use-promises" ] } ], "types": ["jasmine", "node"], "paths": {} } }
json
github
https://github.com/angular/angular
devtools/tsconfig-test.json
# -*- coding: utf-8 -*- # Copyright(C) 2009-2012 Romain Bignon # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2007-2008 Twisted Matrix Laboratories # See LICENSE for details """ Test ssh/channel.py. """ from twisted.conch.ssh import channel from twisted.trial import unittest class MockTransport(object): """ A mock Transport. All we use is the getPeer() and getHost() methods. Channels implement th...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/json/test/autoconfigure/app/ExampleBasicObject.java
""" TIFF image parser. Authors: Victor Stinner and Sebastien Ponce Creation date: 30 september 2006 """ from lib.hachoir_parser import Parser from lib.hachoir_core.field import (FieldSet, SeekableFieldSet, ParserError, RootSeekableFieldSet, UInt16, UInt32, Bytes, String) from lib.hachoir_core.endian import LITTLE...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python """Utility function for installing MathJax javascript library into your IPython nbextensions directory, for offline use. Authors: * Min RK * Mark Sienkiewicz * Matthias Bussonnier To download and install MathJax: From Python: >>> from IPython.external.mathjax import install_mathjax >>...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be u...
unknown
codeparrot/codeparrot-clean
# Authors: # Trevor Perrin # Martin von Loewis - python 3 port # # See the LICENSE file for legal information regarding use of this file. """TLS Lite + asyncore.""" import asyncore from tlslite.tlsconnection import TLSConnection from .asyncstatemachine import AsyncStateMachine class TLSAsyncDispatcherMixIn(Async...
unknown
codeparrot/codeparrot-clean
# Volatility # # This file is part of Volatility. # # Volatility 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. # # Volatility is dist...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.j...
unknown
codeparrot/codeparrot-clean
# Gscreen is Copyright (c) 20013 Chris Morley # # Gscreen 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. # # Gscreen is distributed i...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # See LICENSE.txt for licensing terms from docutils.parsers import rst from docutils.parsers.rst import directives from docutils.nodes import General, Inline, Element from docutils.parsers.rst import roles if 'Directive' in rst.__dict__: class Math(rst.Directive): has_content = Tr...
unknown
codeparrot/codeparrot-clean
from nfs4_const import * from nfs4lib import get_attr_name from environment import check, checklist def _compare(t, entries, expect, attrlist=[]): names = [e.name for e in entries] names.sort() expect.sort() if names != expect: t.fail("Expected READDIR to return %s, instead got %s" % ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import itertools import unittest2 from lxml import etree as ET, html from lxml.html import builder as h from openerp.tests import common def attrs(**kwargs): return dict(('data-oe-%s' % key, str(value)) for key, value in kwargs.iteritems()) class TestViewSaving(common.TransactionCase): ...
unknown
codeparrot/codeparrot-clean
#pragma once // ${generated_comment} #include <string_view> #include <tuple> #include <vector> // Forward declarations of any types needed in the operator signatures. // We can't directly include these classes because it will cause circular include dependencies. // This file is included by TensorBody.h, which define...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/templates/Operator.h
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Profile.gravatar_id' db.add_column('pledger_profile', 'gravatar_id', se...
unknown
codeparrot/codeparrot-clean
import warnings from functools import wraps from flask import current_app, url_for, g from social.utils import module_member, setting_name from social.strategies.utils import get_strategy from social.backends.utils import get_backend DEFAULTS = { 'STORAGE': 'social.apps.flask_app.default.models.FlaskStorage', ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2011-2012 OpenStack Foundation # Copyright (c) 2012 Canonical Ltd # Copyright (c) 2012 SUSE LINUX Products GmbH # 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 o...
unknown
codeparrot/codeparrot-clean
import { useEffect } from "react"; import { useRouter } from "next/router"; import Link from "next/link"; import { gql, useQuery } from "@apollo/client"; const ViewerQuery = gql` query ViewerQuery { viewer { id email } } `; const Index = () => { const router = useRouter(); const { data, lo...
typescript
github
https://github.com/vercel/next.js
examples/api-routes-apollo-server-and-client-auth/pages/index.tsx
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the rawtransaction RPCs. Test the following RPCs: - createrawtransaction - signrawtransacti...
unknown
codeparrot/codeparrot-clean
[ { "model": "fixtures_regress.person", "fields": { "name": "J.R.R. Tolkien" } }, { "model": "fixtures_regress.naturalkeywithfkdependency", "fields": { "name": "The Lord of the Rings", "author": ["J.R.R. Tolkien"] } } ]
json
github
https://github.com/django/django
tests/fixtures_regress/fixtures/nk_with_foreign_key.json
// Generic AArch64 target for NuttX OS // // Can be used in conjunction with the `target-feature` and // `target-cpu` compiler flags to opt-in more hardware-specific // features. // // For example, `-C target-cpu=cortex-a53`. use crate::spec::{ Arch, Cc, LinkerFlavor, Lld, Os, PanicStrategy, RelocModel, SanitizerS...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/targets/aarch64_unknown_nuttx.rs
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/grappler/optimizers/data/filter_parallelization.h
--- navigation_title: "Filter" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-filter-aggregation.html --- # Filter aggregation [search-aggregations-bucket-filter-aggregation] A single bucket aggregation that narrows the set of documents to those that match...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/aggregations/search-aggregations-bucket-filter-aggregation.md
from __future__ import absolute_import from django.core.exceptions import ValidationError from django.forms import Form from django.forms.fields import IntegerField, BooleanField from django.forms.util import ErrorList from django.forms.widgets import Media, HiddenInput from django.utils.encoding import StrAndUnicode ...
unknown
codeparrot/codeparrot-clean
/* * PostgreSQL System Views * * Copyright (c) 1996-2026, PostgreSQL Global Development Group * * src/backend/catalog/system_views.sql * * Note: this file is read in single-user -j mode, which means that the * command terminator is semicolon-newline-newline; whenever the backend * sees that, it stops and execu...
sql
github
https://github.com/postgres/postgres
src/backend/catalog/system_views.sql
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- # Copyright © 2019 MIT, All rights reserved. # Released under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 """ Internationalization helper tool for MIT App Inventor. This utility provides two commands, combine and split, to wo...
unknown
codeparrot/codeparrot-clean
from sympy.utilities.pytest import raises from sympy import (symbols, Function, Integer, Matrix, Abs, Rational, Float, S, WildFunction, ImmutableMatrix, sin, true, false, ones, sqrt, root, AlgebraicNumber, Symbol, Dummy, Wild) from sympy.core.compatibility import exec_ from sympy.geometry import Point, Ellipse ...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require_relative "../helper" require "active_record/type_caster/map" require "active_model" class Arel::Nodes::HomogeneousInTest < Arel::Spec def test_in table = Arel::Table.new :users, type_caster: fake_pg_caster expr = Arel::Nodes::HomogeneousIn.new(["Bobby", "Robert"], table...
ruby
github
https://github.com/rails/rails
activerecord/test/cases/arel/nodes/homogeneous_in_test.rb
<?php namespace Illuminate\Tests\Foundation; use Illuminate\Config\Repository; use Illuminate\Contracts\Support\DeferrableProvider; use Illuminate\Foundation\Application; use Illuminate\Foundation\Bootstrap\RegisterFacades; use Illuminate\Foundation\Events\LocaleUpdated; use Illuminate\Support\ServiceProvider; use Mo...
php
github
https://github.com/laravel/framework
tests/Foundation/FoundationApplicationTest.php
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
unknown
codeparrot/codeparrot-clean
#-*- coding: ISO-8859-1 -*- # pysqlite2/test/transactions.py: tests transactions # # Copyright (C) 2005-2007 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages #...
unknown
codeparrot/codeparrot-clean
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from dataclasses import dataclass from typing import Iterable, Optional, Sequence, Tuple from pants.base.exceptions import ResolveError from pants.build_graph.address import Address as Ad...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # PYPOWER documentation build configuration file, created by # sphinx-quickstart on Thu Jul 7 17:48:32 2011. # # 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
# frozen_string_literal: true module Psych module Visitors class Visitor def accept target visit target end private # @api private def self.dispatch_cache Hash.new do |hash, klass| hash[klass] = :"visit_#{klass.name.gsub('::', '_')}" end.compare_by...
ruby
github
https://github.com/ruby/ruby
ext/psych/lib/psych/visitors/visitor.rb
__license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' ''' Code to manage ebook library''' def db(path=None, read_only=False): from calibre.db.legacy import LibraryDatabase from calibre.utils.config import prefs from calibre.utils.filenames import expanduser return Libra...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2015 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
guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java
/* Copyright 2018 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
cmd/kubeadm/app/cmd/upgrade/diff.go
# Functions for converting colors and modifying the color scheme of # an application. import math import string import sys import tkinter _PI = math.pi _TWO_PI = _PI * 2 _THIRD_PI = _PI / 3 _SIXTH_PI = _PI / 6 _MAX_RGB = float(256 * 256 - 1) # max size of rgb values returned from Tk def setscheme(root, background=No...
unknown
codeparrot/codeparrot-clean
from inbox.models.message import Message from inbox.log import get_logger log = get_logger() def reconcile_message(new_message, session): """ Check to see if the (synced) Message instance new_message was originally created/sent via the Inbox API (based on the X-Inbox-Uid header. If so, update the exist...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # # This script generates a powerpoint presentation using plots generated by runJetQA.sh. # # Note: This was designed/tested for PbPb data and Pt-hard pp MC productions -- you may need to # tweak a few things for other cases. You should in general change what is plotted to suit # your...
unknown
codeparrot/codeparrot-clean
# Copyright 2019 The PlaNet 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...
unknown
codeparrot/codeparrot-clean
/* Copyright 2018 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/kubelet/apis/podresources/server_v1alpha1.go
# -*- coding: utf-8 -*- #*************************************************************************** #* * #* Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> * #* ...
unknown
codeparrot/codeparrot-clean
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { CdkVirtualScrollViewport, CdkFixedSizeVirtualScroll, CdkVirtualForOf, } from '@angular/cdk/scrolling'...
typescript
github
https://github.com/angular/angular
devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/directive-forest.component.ts
use serde_derive::Serialize; #[derive(Serialize)] struct S { #[serde(rename(serialize = "x"))] #[serde(rename(serialize = "y"))] x: (), } fn main() {}
rust
github
https://github.com/serde-rs/serde
test_suite/tests/ui/duplicate-attribute/two-rename-ser.rs
#ifndef Py_BUILD_CORE_BUILTIN # define Py_BUILD_CORE_MODULE 1 #endif #include "Python.h" #include "pycore_pylifecycle.h" // _Py_gitidentifier() #ifndef DONT_HAVE_STDIO_H #include <stdio.h> #endif #ifndef DATE #ifdef __DATE__ #define DATE __DATE__ #else #define DATE "Jan 01 1970" #endif #endif #ifndef TIME #ifdef...
c
github
https://github.com/python/cpython
Modules/getbuildinfo.c
import os import os.path import shutil import socket import subprocess import sys import tempfile import threading import time import random try: import pytest except ImportError: print >> sys.stderr, "Integ tests require pytests!" sys.exit(1) def pytest_funcarg__servers(request): "Returns a new APIHa...
unknown
codeparrot/codeparrot-clean
import sys wires = {} computed = {} for i in range(0, 65536): def f(j): return lambda: j wires[str(i)] = f(i) for line in sys.stdin.readlines(): def cache(key, f): def g(): if key in computed: return computed[key] else: r = f() ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2020 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.scopes import org.jetbrains.kotlin.analysis.api.fir.KaSymbolByF...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/scopes/KaFirDelegatingTypeScope.kt
__all__ = ['BaseResolver', 'Resolver'] from error import * from nodes import * import re class ResolverError(YAMLError): pass class BaseResolver(object): DEFAULT_SCALAR_TAG = u'tag:yaml.org,2002:str' DEFAULT_SEQUENCE_TAG = u'tag:yaml.org,2002:seq' DEFAULT_MAPPING_TAG = u'tag:yaml.org,2002:map' ...
unknown
codeparrot/codeparrot-clean
# Symbolic constants for use with sunaudiodev module # The names are the same as in audioio.h with the leading AUDIO_ # removed. from warnings import warnpy3k warnpy3k("the SUNAUDIODEV module has been removed in Python 3.0", stacklevel=2) del warnpy3k # Not all values are supported on all releases of SunOS. # Encodin...
unknown
codeparrot/codeparrot-clean
import * as documents from "../_namespaces/documents.js"; import * as fakes from "../_namespaces/fakes.js"; import * as Harness from "../_namespaces/Harness.js"; import * as ts from "../_namespaces/ts.js"; import * as vfs from "../_namespaces/vfs.js"; import { jsonToReadableText } from "./helpers.js"; import { TestServ...
typescript
github
https://github.com/microsoft/TypeScript
src/testRunner/unittests/publicApi.ts
h = {} 10000.times do |i| h[i] = nil end 1000.times do h.flatten end
ruby
github
https://github.com/ruby/ruby
benchmark/hash_flatten.rb
/* Copyright 2022 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/core/c/c_api_opaque.h
# -*- coding: utf-8 -*- # # Baron documentation build configuration file, created by # sphinx-quickstart on Sat May 10 02:16:20 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 c...
unknown
codeparrot/codeparrot-clean
/* @Copyright Barrett Adair 2015-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_CLBL_TRTS_REMOVE_MEMBER_CV_HPP #define BOOST_CLBL_TRTS_REMOVE_MEMBER_CV_HPP #include <boost/callable_traits/detail/core.hp...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/callable_traits/remove_member_cv.hpp