code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# # subunit: extensions to Python unittest to get test results from subprocesses. # Copyright (C) 2005 Robert Collins <robertc@robertcollins.net> # # Licensed under either the Apache License, Version 2.0 or the BSD 3-clause # license at the users choice. A copy of both licenses are available in the # project sour...
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/src/airflow/api_fastapi/common/db/dags.py
#!/usr/bin/env python """ 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");...
unknown
codeparrot/codeparrot-clean
import os import sys import sqlite3 as sqlite def gen(): db = sqlite.connect(":memory:") tablesfile = sys.argv[1] datafiles = sys.argv[2] with open(os.path.join("data", tablesfile)) as f: data = f.read() db.executescript(data) with open(os.path.join("data", datafiles)) as f: ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Standard Library import argparse import json import logging import os import subprocess # Third Party import requests import mixingboard from chassis.database import db_session from chassis.models import Workflow from flask import Flask, jsonify, request # Local from lib.runner import runWorkflow...
unknown
codeparrot/codeparrot-clean
import re class ARKInvalid(ValueError): '''An ARK specific exception''' pass def extract(string): '''Attempts to extract an ark from a string. Uses one regex then sends it to validate. ''' try: ark = string[string.index('ark:/'):] except ValueError: raise ARKInvalid('Not an...
unknown
codeparrot/codeparrot-clean
An invalid number of generic parameters was passed to an intrinsic function. Erroneous code example: ```compile_fail,E0094 #![feature(intrinsics)] #![allow(internal_features)] #[rustc_intrinsic] fn size_of<T, U>() -> usize; // error: intrinsic has wrong number // of type parameter...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0094.md
import {AppPage} from './app.po'; import {browser, logging} from 'protractor'; describe('workspace-project App', () => { let page: AppPage; beforeEach(() => { page = new AppPage(); }); // Add your e2e tests here afterEach(async () => { // Assert that there are no errors emitted from the browser ...
typescript
github
https://github.com/angular/angular
adev/src/content/examples/angular-compiler-options/e2e/src/app.e2e-spec.ts
# ============================================================================= # Copyright (C) 2010 Diego Duclos # # This file is part of pyfa. # # pyfa 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 ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.tests import io.ktor.client.* import io.ktor.client.engine.* import io.ktor.client.plugins.* import io.ktor.client.request.* import io.ktor.client.test.base.* import io...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-tests/common/src/io/ktor/client/tests/Http2Test.kt
#!/usr/bin/env python import os, glob, re, sys from param import * from wikiemit import WikiEmit from xmlemit import XmlEmit from htmlemit import HtmlEmit from optparse import OptionParser parser = OptionParser("param_parse.py [options]") parser.add_option("-v", "--verbose", dest='verbose', action='store_true', defa...
unknown
codeparrot/codeparrot-clean
""" Write hashtag Frobenius scores to file. """ import io from operator import itemgetter import time import numpy as np from scipy.stats.mstats import mquantiles import twitterproj from twitterproj.fisher import * from twitterproj.fisher import pipeline db = twitterproj.connect() def hashtag_scores(): N = 500...
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-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/QuickTargetSourceCreator.java
"""Code to handle a Dynalite bridge.""" from typing import Any, Callable, Dict, List, Optional from dynalite_devices_lib.dynalite_devices import DynaliteBaseDevice, DynaliteDevices from homeassistant.const import CONF_HOST from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.dispatcher i...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals import base64 import re from .common import InfoExtractor from ..utils import ( qualities, sanitized_Request, ) class DumpertIE(InfoExtractor): _VALID_URL = r'(?P<protocol>https?)://(?:www\.)?dumpert\.nl/(?:mediabase|embed)/(?P<id>[0-9]+/[0-9a-zA-Z]...
unknown
codeparrot/codeparrot-clean
{ "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json", "properties": [ { "name": "comment", "value": "SBOM for MDB server product; this file should comply with the format specified here: https://cyclonedx.org/docs/1.5/json/#components_items_publisher; This file is still in development; see ...
json
github
https://github.com/mongodb/mongo
buildscripts/tests/sbom_linter/inputs/sbom_invalid_license_expression.json
# $Id: core.py 5538 2008-03-27 15:04:56Z goodger $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Calling the ``publish_*`` convenience functions (or instantiating a `Publisher` object) with component names will result in default behavior. For custom be...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt import frappe, unittest from frappe.model.db_query import DatabaseQuery class TestReportview(unittest.TestCase): def test_basic(self): self.assertTrue({"name":"DocType"} in DatabaseQuery("DocType").execute(limit...
unknown
codeparrot/codeparrot-clean
import threading from nose.tools import eq_ from kazoo.testing import KazooTestCase class KazooBarrierTests(KazooTestCase): def test_barrier_not_exist(self): b = self.client.Barrier("/some/path") eq_(b.wait(), True) def test_barrier_exists(self): b = self.client.Barrier("/some/path")...
unknown
codeparrot/codeparrot-clean
# encoding: UTF-8 defineDict = {} typedefDict = {} #////////////////////////////////////////////////////////////////////// #@system 新一代交易所系统 #@company 上海期货信息技术有限公司 #@file ThostFtdcUserApiDataType.h #@brief 定义了客户端接口使用的业务数据类型 #@history #20060106 赵鸿昊 创建该文件 #//////////////////////////////////////////////////////////////...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # (c) 2017, Toshio Kuratomi <tkuratomi@ansible.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 # (a...
unknown
codeparrot/codeparrot-clean
// Copyright 2010 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 unix || js || wasip1 || windows package net import ( "context" "syscall" ) func sockaddrToIP(sa syscall.Sockaddr) Addr { switch sa := sa.(type)...
go
github
https://github.com/golang/go
src/net/iprawsock_posix.go
from skbuild import setup setup( name="fibby", version="0.0.1", description="a minimal example package (fortran version)", license="MIT", packages=['fibby'], python_requires=">=3.7", )
python
github
https://github.com/numpy/numpy
doc/source/f2py/code/setup_skbuild.py
#!/usr/bin/python # -*- coding: utf-8-*- import argparse from elasticsearch import Elasticsearch, helpers def create_parser(): parser = argparse.ArgumentParser(description='Index words to elasticsearch.') parser.add_argument('--es_host', default='localhost', help='Hostname of elasticsearch, default' ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ :copyright: (c) 2010-2012 Fabien Potencier :license: MIT, see LICENSE for more details. """ from sphinx import addnodes from sphinx.domains import Domain, ObjType from sphinx.locale import l_, _ from sphinx.directives import ObjectDescription from sphinx.domains.python import py_par...
unknown
codeparrot/codeparrot-clean
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return n+=1==t?"ka...
javascript
github
https://github.com/django/django
django/contrib/admin/static/admin/js/vendor/select2/i18n/eu.js
from django.apps import apps from django.contrib.contenttypes.models import ContentType from django.core.management import BaseCommand from django.db import DEFAULT_DB_ALIAS, router from django.db.models.deletion import Collector from ...management import get_contenttypes_and_models class Command(BaseCommand): d...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
unknown
codeparrot/codeparrot-clean
import datetime import os try: from urllib import quote # Python 2.X except ImportError: from urllib.parse import quote # Python 3+ from django.db import models from custom_storages import AppImageStorage from spacelaunchnow.base_models import SingletonModel def image_path(instance, filename): filename...
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 security import ( "crypto/tls" "net" "github.com/cockroachdb/cockroach/pkg/util/syncutil" "github.com/cockroachdb/errors" "github.com/cockroachdb/redact" ...
go
github
https://github.com/cockroachdb/cockroach
pkg/security/tls_ciphersuites.go
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
unknown
codeparrot/codeparrot-clean
# Security Policy ## Supported Versions See <https://www.ruby-lang.org/en/downloads/branches/>. ## Reporting a Vulnerability See <https://www.ruby-lang.org/en/security/>.
unknown
github
https://github.com/ruby/ruby
.github/SECURITY.md
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2011 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2017 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage.session; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert....
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockitousage/session/MockitoSessionTest.java
import type { SimpleExpressionNode } from './ast' import type { TransformContext } from './transform' import { ErrorCodes, createCompilerError } from './errors' // these keywords should not appear inside expressions, but operators like // 'typeof', 'instanceof', and 'in' are allowed const prohibitedKeywordRE = new Reg...
typescript
github
https://github.com/vuejs/core
packages/compiler-core/src/validateExpression.ts
import { test } from '../../test'; export default test({ html: '<div>10 x 34</div>', get props() { return { boxes: [{ width: 10, height: 34 }] }; }, async test({ component, target, assert }) { component.boxes = [{ width: 20, height: 40 }]; assert.htmlEqual( target.innerHTML, ` <div>20 x 40</div> `...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/const-tag-if/_config.js
# 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
import { useEffect, useLayoutEffect, useMemo } from 'react' import * as React from 'react' export default function App() { useEffect(() => { console.log('Hello World') }, []) useLayoutEffect(() => { function foo() {} return () => {} }, [1, 2, App]) useLayoutEffect(() => {}, [runSideEffect()]) ...
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/optimize_server_react/7/input.js
package client import ( "fmt" "io" "net/http" "reflect" "testing" cerrdefs "github.com/containerd/errdefs" "github.com/moby/moby/api/types/container" "github.com/moby/moby/api/types/registry" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) func TestImageBuildError(t *testing.T) { client, err :=...
go
github
https://github.com/moby/moby
client/image_build_test.go
function tokenize(input, callback) { while(input.length > 0) { callback(input.match(/^[\/\.\?]|[^\/\.\?]+/)[0]); input = input.replace(/^[\/\.\?]|[^\/\.\?]+/, ''); } } var graph = d3.select("#chart-2 svg"); var svg_edges = {}; var svg_nodes = {}; graph.selectAll("g.edge").each(function() { var node = d...
javascript
github
https://github.com/rails/rails
actionpack/lib/action_dispatch/journey/visualizer/fsm.js
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
unknown
codeparrot/codeparrot-clean
#ifndef SRC_ALIASED_BUFFER_H_ #define SRC_ALIASED_BUFFER_H_ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include <cinttypes> #include "memory_tracker.h" #include "v8.h" namespace node { typedef size_t AliasedBufferIndex; /** * Do not use this class directly when creating instances of it - use the * A...
c
github
https://github.com/nodejs/node
src/aliased_buffer.h
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Title: curl_url Section: 3 Source: libcurl See-also: - CURLOPT_CURLU (3) - curl_url_cleanup (3) - curl_url_dup (3) - curl_url_get (3) - curl_url_set (3) - curl_url_strerror (3) Protocol: - All Added-in: 7.62.0 ---...
unknown
github
https://github.com/curl/curl
docs/libcurl/curl_url.md
#!/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
{"files":{"Cargo.toml":"a46aa45b686f88cb3e28c8f6ea0f6d71aff4fa051d7342274bb69fecadf114d1","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"84d8f027ce3c19ae9cf91e68207b0bc737b71aa25706ba575bef...
json
github
https://github.com/nodejs/node
deps/crates/vendor/syn/.cargo-checksum.json
# -*- coding: utf-8 -*- """ database.sqlalchemy_test_issues ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Testing Issues with SQLAlchemy http://flask.pocoo.org/snippets/36/ """ import os import sys sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) from flask import request, Response ...
unknown
codeparrot/codeparrot-clean
# Support routines for hand-crafting loose objects. # Write a loose object into the odb at $1, with object type $2 and contents # from stdin. Writes the oid to stdout. Example: # # oid=$(echo foo | loose_obj .git/objects blob) # loose_obj () { cat >tmp_loose.content && size=$(wc -c <tmp_loose.content) && { # Do...
unknown
github
https://github.com/git/git
t/lib-loose.sh
# -*- coding: utf-8 -*- # Copyright 2012 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 require...
unknown
codeparrot/codeparrot-clean
/* * 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
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedMap.java
# -*- coding: utf-8 -*- from odoo import fields, models, api import odoo.addons.decimal_precision as dp import datetime class SellSummaryGoods(models.Model): _name = 'sell.summary.goods' _inherit = 'report.base' _description = u'销售汇总表(按商品)' id_lists = fields.Text(u'移动明细行id列表') goods_categ = field...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import logging import functools from django.contrib.gis.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django.contrib.gis.geos import fromstr, LineString from mapentity.models import MapEntityMixin from geotrek.authent.models imp...
unknown
codeparrot/codeparrot-clean
# -*- 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 'PaymentPart.realprice' # db.delete_column('core_paymentpart', 'realprice') pass ...
unknown
codeparrot/codeparrot-clean
/* Copyright (c) 2023, 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 but not lim...
c
github
https://github.com/mysql/mysql-server
components/libminchassis/registry_no_lock_imp.h
/* * 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
android/guava-testlib/src/com/google/common/collect/testing/testers/MapRemoveEntryTester.java
#!/usr/bin/env python3 # Copyright (c) 2016 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. # This file may not be copied, modified, or distributed except # according to those terms. import argparse import os import signal import ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2011 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 agreed ...
java
github
https://github.com/google/guava
android/guava-tests/test/com/google/common/cache/PopulatedCachesTest.java
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import sys, threading import pycurl import pygtk pygtk.require('2.0') import gtk # We should ignore SIGPIPE when using pycurl.NOSIGNAL - see # the libcurl tutorial for more info. try: import signal signal.signal(signal.SIGPIPE, signal.SIG_IGN) except...
unknown
codeparrot/codeparrot-clean
{ "PURGE": { "summary": "Asks the allocator to release memory.", "complexity": "Depends on how much memory is allocated, could be slow", "group": "server", "since": "4.0.0", "arity": 2, "container": "MEMORY", "function": "memoryCommand", "command_tips"...
json
github
https://github.com/redis/redis
src/commands/memory-purge.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-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java
#!/bin/sh test_description='test json-writer JSON generation' . ./test-lib.sh test_expect_success 'unit test of json-writer routines' ' test-tool json-writer -u ' test_expect_success 'trivial object' ' cat >expect <<-\EOF && {} EOF cat >input <<-\EOF && object end EOF test-tool json-writer <input >actual &...
unknown
github
https://github.com/git/git
t/t0019-json-writer.sh
/*------------------------------------------------------------------------- * * explain_dr.c * Explain DestReceiver to measure serialization overhead * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994-5, Regents of the University of California * * IDENTIFIC...
c
github
https://github.com/postgres/postgres
src/backend/commands/explain_dr.c
/* * diff-delta.c: generate a delta between two buffers * * This code was greatly inspired by parts of LibXDiff from Davide Libenzi * http://www.xmailserver.org/xdiff-lib.html * * Rewritten for GIT by Nicolas Pitre <nico@fluxnic.net>, (C) 2005-2007 * * This code is free software; you can redistribute it and/or ...
c
github
https://github.com/git/git
diff-delta.c
"""Test cases for DataFrame.plot""" from datetime import ( date, datetime, ) import itertools import re import string import numpy as np import pytest import pandas.util._test_decorators as td from pandas.core.dtypes.api import is_list_like import pandas as pd from pandas import ( DataFrame, Index,...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/plotting/frame/test_frame.py
## Input ```javascript import {useState, useMemo} from 'react'; function Component(props) { const [x] = useState(0); const expensiveNumber = useMemo(() => calculateExpensiveNumber(x), [x]); return <div>{expensiveNumber}</div>; } function Component2(props) { const [x] = useState(0); const expensiveNumber =...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/babel-existing-react-import.expect.md
<?php $container->loadFromExtension('security', [ 'providers' => [ 'default' => [ 'memory' => $memory = [ 'users' => ['foo' => ['password' => 'foo', 'roles' => 'ROLE_USER']], ], ], 'with-dash' => [ 'memory' => $memory, ], ], ...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/firewall_provider.php
import fs from 'node:fs/promises' import path from 'node:path' // Patterns we use to match dependencies in a file whether in CJS, ESM, or TypeScript const DEPENDENCY_PATTERNS = [ /import[\s\S]*?['"](.{3,}?)['"]/gi, /import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi, /export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi, /r...
typescript
github
https://github.com/tailwindlabs/tailwindcss
packages/@tailwindcss-node/src/get-module-dependencies.ts
## Input ```javascript import { arrayPush, identity, makeArray, Stringify, useFragment, } from 'shared-runtime'; /** * Bug repro showing why it's invalid for function references to be annotated * with a `Read` effect when that reference might lead to the function being * invoked. * * Note that currentl...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/mixedreadonly-mutating-map.expect.md
#!/usr/bin/python # Copyright 2002, 2003 Dave Abrahams # Copyright 2002, 2003, 2004, 2005 Vladimir Prus # Copyright 2012 Jurko Gospodnetic # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import BoostBuild import r...
unknown
codeparrot/codeparrot-clean
import numpy as Numeric import traceback from pysparse import spmatrix_util, spmatrix def printMatrix(M): n, m = M.shape Z = Numeric.zeros((n,m), 'd') for i in range(n): for j in range(m): Z[i,j] = M[i,j] print str(Z) + '\n' n = 10 A = spmatrix.ll_mat(n,n) As = spmatrix.ll_mat_sym(...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
unknown
codeparrot/codeparrot-clean
import os from typing import Any from github_utils import gh_post_pr_comment from gitutils import get_git_remote_name, get_git_repo_dir, GitRepo from trymerge_explainer import BOT_COMMANDS_WIKI def parse_args() -> Any: from argparse import ArgumentParser parser = ArgumentParser("Comment on a PR") parser....
python
github
https://github.com/pytorch/pytorch
.github/scripts/comment_on_pr.py
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
unknown
codeparrot/codeparrot-clean
from .. import InstanceResource, ListResource class IpAccessControlListMapping(InstanceResource): def delete(self): """ Remove this mapping (disassociate the ACL from the Domain). """ return self.parent.delete_instance(self.name) class IpAccessControlListMappings(ListResource): ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2014 ETH Zurich, Institute for Astronomy """ Test functions for `hope` module. """ from __future__ import print_function, division, absolute_import, unicode_literals import hope import numpy as np from test.utilities import check,setup_module,setup_method,teardown_module class SubCls(object): de...
unknown
codeparrot/codeparrot-clean
from aspc.menu.models import Menu from django.shortcuts import render from django.http import HttpResponseNotAllowed from datetime import datetime, date, timedelta import json # /menu def home (request): if request.method == 'GET': if datetime.today().weekday() < 5: return weekday(request, datetime.today().strft...
unknown
codeparrot/codeparrot-clean
# The isBadVersion API is already defined for you. # @param version, an integer # @return a bool # def isBadVersion(version): import math class Solution(object): def firstBadVersion(self, n): """ :type n: int :rtype: int """ left = 1 right = n bad = 0 ...
unknown
codeparrot/codeparrot-clean
# Natural Language Toolkit: CCG Categories # # Copyright (C) 2001-2012 NLTK Project # Author: Graeme Gange <ggange@csse.unimelb.edu.au> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT class AbstractCCGCategory(object): ''' Interface for categories in combinatory grammars. ''' ...
unknown
codeparrot/codeparrot-clean
/** * DO NOT EDIT THIS FILE MANUALLY. * * This file is automatically generated by the Bootstrap Astro Integration. * It contains the type definitions for the components that are auto imported in all pages. * @see site/src/libs/astro.ts */ export declare global { export const AddedIn: typeof import('@shortcodes/...
typescript
github
https://github.com/twbs/bootstrap
site/src/types/auto-import.d.ts
# -*- coding: utf-8 -*- # # papyon - a python client library for Msn # # Copyright (C) 2010 Collabora Ltd. # # 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 #...
unknown
codeparrot/codeparrot-clean
import { test } from '../../test'; export default test({ html: ` <div>static dynamic</div> <div>static dynamic</div> <div>static dynamic</div> `, async test({ component, target, assert }) { component.props = 'xxx'; assert.htmlEqual( target.innerHTML, ` <div>static xxx</div> <div>static xxx</di...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/const-tag-component-without-let/_config.js
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
unknown
codeparrot/codeparrot-clean
# Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007-2008 # # Based on the original in EJS: # Copyright (C) Andrew Tridgell <tridge@samba.org> 2005 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publis...
unknown
codeparrot/codeparrot-clean
from django.db import migrations, models class Migration(migrations.Migration): operations = [ migrations.CreateModel( "Author", [ ("id", models.AutoField(primary_key=True)), ("name", models.CharField(max_length=255)), ("slug", models....
python
github
https://github.com/django/django
tests/migrations/test_migrations_conflict/0001_initial.py
import unittest import numpy as np import sklearn.preprocessing from autosklearn.pipeline.components.feature_preprocessing.nystroem_sampler import \ Nystroem from autosklearn.pipeline.util import _test_preprocessing, get_dataset class NystroemComponentTest(unittest.TestCase): def test_default_configuration(s...
unknown
codeparrot/codeparrot-clean
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: retry-max-time Arg: <seconds> Help: Retry only within this period Added: 7.12.3 Category: curl timeout Multi: single See-also: - retry - retry-delay Example: - --retry-max-time 30 --retry 10 $URL --- # `--retry-max...
unknown
github
https://github.com/curl/curl
docs/cmdline-opts/retry-max-time.md
from twilio.rest.resources.base import ( NextGenInstanceResource, NextGenListResource, ) class Event(NextGenInstanceResource): """ A taskrouter event resource """ pass class Events(NextGenListResource): name = "Events" instance = Event def list(self, **kwargs): """ Returns...
unknown
codeparrot/codeparrot-clean
#ifndef RUBY_THREAD_NONE_H #define RUBY_THREAD_NONE_H #define RB_NATIVETHREAD_LOCK_INIT (void)(0) #define RB_NATIVETHREAD_COND_INIT (void)(0) // no-thread impl doesn't use TLS but define this to avoid using tls key // based implementation in vm.c #define RB_THREAD_LOCAL_SPECIFIER struct rb_native_thread { void *...
c
github
https://github.com/ruby/ruby
thread_none.h
// Copyright 2009 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. /* Compile, typically invoked as ``go tool compile,'' compiles a single Go package comprising the files named on the command line. It then writes a single objec...
go
github
https://github.com/golang/go
src/cmd/compile/doc.go
//! The task module. //! //! The task module contains the code that manages spawned tasks and provides a //! safe API for the rest of the runtime to use. Each task in a runtime is //! stored in an `OwnedTasks` or `LocalOwnedTasks` object. //! //! # Task reference types //! //! A task is usually referenced by multiple h...
rust
github
https://github.com/tokio-rs/tokio
tokio/src/runtime/task/mod.rs
# -*- coding: utf-8 -*- """ dependencies ~~~~~~~~~~~~ Implements Dependencies Check :author: BlBana <635373043@qq.com> :homepage: https://github.com/WhaleShark-Team/cobra :license: MIT, see LICENSE for more details. :copyright: Copyright (c) 2018 Feei. All rights reserved """ import...
unknown
codeparrot/codeparrot-clean
"""Zoom function""" from gi.repository import Gdk, Gtk def zoom(widget, event): """Zoom in/out widgets Args: widget: Gtk.FlowBox event: Gdk.Event FlowBox child needs a 'scale' attribute """ accel_mask = Gtk.accelerator_get_default_mod_mask() # Need Control + Shift + Mouse scr...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, json from frappe import _ from frappe.utils import cint, formatdate @frappe.whitelist(allow_guest=True) def send_message(subject="Websi...
unknown
codeparrot/codeparrot-clean
""" TEST CASES: # tests for mystery() test.assert_equals(mystery(6), 5, "mystery(6) ") test.assert_equals(mystery(9), 13, "mystery(9) ") test.assert_equals(mystery(19), 26, "mystery(19) ") # tests for mystery_inv() test.assert_equals(mystery_inv(5), 6, "mystery_inv(5)") test.assert_equals(mystery_inv(13), 9, "mystery...
unknown
codeparrot/codeparrot-clean
import re import pytest from langchain_classic.output_parsers.boolean import BooleanOutputParser def test_boolean_output_parser_parse() -> None: parser = BooleanOutputParser() # Test valid input result = parser.parse("YES") assert result is True # Test valid input result = parser.parse("NO"...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/tests/unit_tests/output_parsers/test_boolean_parser.py
# -*- coding: utf-8 -*- """ *************************************************************************** py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***************************************...
unknown
codeparrot/codeparrot-clean
/* Copyright 2025 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/mlir/lite/transforms/quantization/quant_utils.h
// Copyright 2022 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package server import ( "bytes" "net/http" ) // sessionWriter implements http.ResponseWriter. It is used // to extract cookies written to the header when passed in t...
go
github
https://github.com/cockroachdb/cockroach
pkg/server/session_writer.go
# Changes ## Unreleased - Minimum supported Rust version (MSRV) is now 1.88. - Support `deserialize_any` in `PathDeserializer` (enables derived `#[serde(untagged)]` enums in path segments). [#2881] - Fix stale path segment indices after path rewrites, preventing out-of-bounds access during extraction. [#3562] [#2881...
unknown
github
https://github.com/actix/actix-web
actix-router/CHANGES.md
#oXo.py # devt of tremolo and vibrato functionalities import pyb from hardware import ShakeControl from q import EnQueueable from state import State class TremVib: vVec = (State.vibratoLowerLimit, State.vibratoUpperLimit) tVec = (State.tremoloLowerLimit, State.tremoloUpperLimit) def doTrem(self): ...
unknown
codeparrot/codeparrot-clean