code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# frozen_string_literal: true # :markup: markdown module ActionCable # Provides helper methods for testing Action Cable broadcasting module TestHelper def before_setup # :nodoc: server = ActionCable.server test_adapter = ActionCable::SubscriptionAdapter::Test.new(server) @old_pubsub_adapter...
ruby
github
https://github.com/rails/rails
actioncable/lib/action_cable/test_helper.rb
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
unknown
codeparrot/codeparrot-clean
etest: 'from -e'
unknown
github
https://github.com/ansible/ansible
test/integration/targets/var_blending/test_vars.yml
<?php // autoload_files.php @generated by Composer $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( '2962aeb5f454bcdf16ad79a35133cf35' => $vendorDir . '/evil/pkg/exec.php', );
php
github
https://github.com/composer/composer
tests/Composer/Test/Fixtures/functional/plugin-autoloading-only-loads-dependencies/vendor/composer/autoload_files.php
/********************************************************************** loadpath.c - $Author$ created at: Wed May 15 14:19:50 JST 2013 Copyright (C) 2013 Yukihiro Matsumoto **********************************************************************/ #include "verconf.h" #include "ruby/ruby.h" /* Define RUBY_RE...
c
github
https://github.com/ruby/ruby
loadpath.c
# -*- test-case-name: twisted.names.test.test_hosts -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ hosts(5) support. """ from __future__ import division, absolute_import from twisted.python.compat import nativeString from twisted.names import dns from twisted.python import failure fr...
unknown
codeparrot/codeparrot-clean
# -*- test-case-name: twisted.application.test.test_internet,twisted.test.test_application,twisted.test.test_cooperator -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Reactor-based Services Here are services to run clients, servers and periodic services using the reactor. If you want...
unknown
codeparrot/codeparrot-clean
import unittest import vimdoc from vimdoc.block import Block from vimdoc import error from vimdoc import module class TestVimModule(unittest.TestCase): def test_section(self): plugin = module.VimPlugin('myplugin') main_module = module.Module('myplugin', plugin) intro = Block(vimdoc.SECTION) intro.L...
unknown
codeparrot/codeparrot-clean
# This file is part of GridCal. # # GridCal 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. # # GridCal is distributed in the hope that...
unknown
codeparrot/codeparrot-clean
import assert from 'assert'; import http from 'http'; import axios from '../../../index.js'; describe('issues', function () { describe('4999', function () { it('should not fail with query parsing', async function () { const {data} = await axios.get('https://postman-echo.com/get?foo1=bar1&foo2=bar2'); ...
javascript
github
https://github.com/axios/axios
test/unit/regression/bugs.js
""" Note: this code is inspired from the following matlab source : http://www.stanford.edu/group/SOL/software/minres.html """ import theano import theano.tensor as TT from theano.sandbox.scan import scan import numpy from pylearn2.utils import constantX from pylearn2.expr.basic import multiple_switch, symGivens2, ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from south.db import db from django.db import models from cms.plugins.picture.models import * class Migration: def forwards(self, orm): "Write your forwards migration here" def backwards(self, orm): "Write your backwards migration here" models = { 'cms.cms...
unknown
codeparrot/codeparrot-clean
package client import ( "context" "encoding/json" "fmt" "net/url" "slices" "github.com/moby/moby/api/types/build" "github.com/moby/moby/api/types/container" "github.com/moby/moby/api/types/image" "github.com/moby/moby/api/types/system" "github.com/moby/moby/api/types/volume" "github.com/moby/moby/client/pk...
go
github
https://github.com/moby/moby
client/system_disk_usage.go
""" :mod: ReplicaManager ======================= .. module: ReplicaManager :synopsis: ReplicaManager links the functionalities of StorageElement and FileCatalog. This module consists ReplicaManager and related classes. """ # # imports from datetime import datetime, timedelta import fnmatch import os...
unknown
codeparrot/codeparrot-clean
import sys from ctypes import Structure, c_int, c_char_p, c_double, c_void_p, CFUNCTYPE, \ POINTER from .dll import _bind from .endian import SDL_BYTEORDER, SDL_LIL_ENDIAN from .stdinc import Uint8, Uint16, Uint32 from .rwops import SDL_RWops, SDL_RWFromFile __all__ = ["SDL_AudioFormat", "SDL_AUDIO_MASK_BITSIZE", ...
unknown
codeparrot/codeparrot-clean
# pylint: disable=g-bad-file-header # Copyright 2016 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/LICENS...
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 n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/config/provider/package-info.java
def main(request, response): import simplejson as json f = file('config.json') source = f.read() s = json.JSONDecoder().decode(source) url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1]) url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0]) _CSP = "media-src 'none'; scr...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Game documentation build configuration file, created by # sphinx-quickstart. # # 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 configuration values have a de...
unknown
codeparrot/codeparrot-clean
<script setup> import * as d3 from "d3"; import ColorSpan from "./components/ColorSpan.vue"; </script> # d3-color Even though your browser understands a lot about colors, it doesn’t offer much help in manipulating colors through JavaScript. The d3-color module therefore provides representations for various color sp...
unknown
github
https://github.com/d3/d3
docs/d3-color.md
from osv import osv from osv import fields class am_sale(osv.osv): """ Sale order customization for Adding Branch, Sales Executive and """ _name = 'sale.order' _description = 'sale.order' _inherit='sale.order' def check_Chasisno(self,cr,uid,ids,chase_no,context=None): res = ...
unknown
codeparrot/codeparrot-clean
"""This file contains code for use with "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division import math import numpy as np import random import scipy.stats impor...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright (C) International Business Machines Corp., 2005 # Author: Li Ge <lge@us.ibm.com) # Positive Test: create domain, attach block device, verify list from XmTestLib import * from XmTestLib.block_utils import block_attach if ENABLE_HVM_SUPPORT: SKIP("Block-list not supported for HVM dom...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010, 2014 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
unknown
codeparrot/codeparrot-clean
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Find-LocalAdminAccess', 'Author': ['@harmj0y'], 'Description': ('Finds machines on the local domain where the current user has ' '...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # # FreeType 2 glyph name builder # # Copyright 1996-2000, 2003, 2005, 2007, 2008 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, # and distributed under the terms of the FreeType project license, # LICENSE.T...
unknown
codeparrot/codeparrot-clean
from django.contrib.gis.geos import prototypes as capi from django.contrib.gis.geos.coordseq import GEOSCoordSeq from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry, LinearGeometryMixin from django.contrib.gis.geos.point import Point from django.contrib.gis....
unknown
codeparrot/codeparrot-clean
.pagination { // scss-docs-start pagination-css-vars --#{$prefix}pagination-padding-x: #{$pagination-padding-x}; --#{$prefix}pagination-padding-y: #{$pagination-padding-y}; @include rfs($pagination-font-size, --#{$prefix}pagination-font-size); --#{$prefix}pagination-color: #{$pagination-color}; --#{$prefix}...
unknown
github
https://github.com/twbs/bootstrap
scss/_pagination.scss
from django.core.management.base import BaseCommand from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--noinput', action='store_false', dest='interactive', default=True, help='Tells Django to NOT prompt the user for input of any...
unknown
codeparrot/codeparrot-clean
""" Input source for a pager. (pipe or generator.) """ from __future__ import unicode_literals from abc import ABCMeta, abstractmethod from six import with_metaclass from prompt_toolkit.formatted_text import to_formatted_text from prompt_toolkit.input.posix_utils import PosixStdinReader from prompt_toolkit.layout.utils...
unknown
codeparrot/codeparrot-clean
<?php declare(strict_types=1); /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Test\Co...
php
github
https://github.com/composer/composer
tests/Composer/Test/Command/CheckPlatformReqsCommandTest.php
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
unknown
codeparrot/codeparrot-clean
########################################################## # THIS IS A GENERATED FILE -- DO NOT MODIFY. # IF YOU WISH TO MODIFY THIS SUITE, MODIFY THE CORRESPONDING MATRIX SUITE MAPPING FILE # AND REGENERATE THE MATRIX SUITES. # # matrix suite mapping file: buildscripts/resmokeconfig/matrix_suites/mappings/bulk_write_r...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/matrix_suites/generated_suites/bulk_write_replica_sets_jscore_passthrough.yml
"""The tests for the Unifi WAP device tracker platform.""" import unittest from unittest import mock import urllib from homeassistant.components.device_tracker import unifi as unifi from homeassistant.const import CONF_HOST, CONF_USERNAME, CONF_PASSWORD from unifi import controller class TestUnifiScanner(unittest.Tes...
unknown
codeparrot/codeparrot-clean
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: http2-prior-knowledge Tags: Versions Protocols: HTTP Added: 7.49.0 Mutexed: http1.1 http1.0 http2 http3 Requires: HTTP/2 Help: Use HTTP/2 without HTTP/1.1 Upgrade Category: http Multi: boolean See-also: - http2 - http...
unknown
github
https://github.com/curl/curl
docs/cmdline-opts/http2-prior-knowledge.md
scrape_configs: - job_name: "test" relabel_configs: -
unknown
github
https://github.com/prometheus/prometheus
config/testdata/empty_target_relabel_config.bad.yml
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {HIRFunction, isPropsType} from '../HIR'; /** * Converts method calls into regular calls where the receiver is the prop...
typescript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/Optimization/OptimizePropsMethodCalls.ts
# Copyright 2014 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. # Recipe for the Skia PerCommit Housekeeper. DEPS = [ 'core', 'recipe_engine/path', 'recipe_engine/properties', 'recipe_engine/python', 'recipe_en...
unknown
codeparrot/codeparrot-clean
# $Id: writer_aux.py 7808 2015-02-27 17:03:32Z milde $ # Author: Lea Wiemann <LeWiemann@gmail.com> # Copyright: This module has been placed in the public domain. """ Auxiliary transforms mainly to be used by Writer components. This module is called "writer_aux" because otherwise there would be conflicting imports lik...
unknown
codeparrot/codeparrot-clean
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import from __future__ import unicode_literals from wiki.core import settings from wiki.core import permissions from wiki import models from haystack import views as haystack_views from django.db.models import Q from django.utils.decorators import classonlymethod from django.shortcuts i...
unknown
codeparrot/codeparrot-clean
import sys import numpy as np def forwardsHSMM(x,states,a_0,a,e,d,d_0): """ x = obs seq,duration states = list of states a_0 = initial probability a = state transition probability e = emmission probability d = duration probability d_0 = initial duration distribution """ fwd = [] prev_p = {} min_d = 1 max...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- __license__ = 'GPL 3' __copyright__ = '2010, Li Fanxi <lifanxi@freemindworld.com>' __docformat__ = 'restructuredtext en' import os from calibre.customize.conversion import InputFormatPlugin from calibre.ptempfile import TemporaryDirectory from calibre.utils.filenames import ascii_filename HT...
unknown
codeparrot/codeparrot-clean
import numpy as np import inspect # Used for storing the input from .element import Element from .equation import HeadEquation, MscreenWellEquation, HeadDiffEquation, DisvecDiffEquation __all__ = ['LineSink1D', 'HeadLineSink1D'] class LineSink1DBase(Element): def __init__(self, model, xls, sigls=1, layers=0, na...
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 n...
java
github
https://github.com/apache/kafka
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/TopicFilter.java
import { useEffect, useState } from "react"; import { useUser } from "@auth0/nextjs-auth0/client"; import Layout from "../../components/layout"; const ApiProfile = () => { const { user, isLoading } = useUser(); const [data, setData] = useState(null); useEffect(() => { (async () => { const res = await...
typescript
github
https://github.com/vercel/next.js
examples/auth0/pages/advanced/api-profile.tsx
//===----------------------------------------------------------------------===// // // 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/clang-tidy/readability/EnumInitialValueCheck.h
"""Functions relating to the moist static energy budget.""" from aospy.utils.vertcoord import int_dp_g from indiff.advec import Upwind from indiff.deriv import LatCenDeriv, LonCenDeriv from .. import LAT_STR, LON_STR, PLEVEL_STR from .advection import (horiz_advec, vert_advec, horiz_advec_upwind, ...
unknown
codeparrot/codeparrot-clean
def load_file(fn): with open(fn,"r") as corpus: c = corpus.read() return c def load_sentences(fn): with open(fn,"r") as corpus: c = corpus.read() return c.split('.') def load_stripped_sentences(fn): with open(fn,"r") as corpus: c = corpus.read() return list(map(lambda x: x.strip(), c.split('.'))) def ...
unknown
codeparrot/codeparrot-clean
"""ndg_httpsclient - module containing SSL peer verification class. """ __author__ = "P J Kershaw (STFC)" __date__ = "09/12/11" __copyright__ = "(C) 2012 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Kershaw@stfc.ac.uk" __revision__ = '$Id...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Johan Wiren <johan.wiren.se@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 th...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Ansible, a Red Hat company # # 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, o...
unknown
codeparrot/codeparrot-clean
//===--- SerializedDiagnosticConsumer.h - Serialize Diagnostics -*- 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/Frontend/SerializedDiagnosticConsumer.h
from __future__ import print_function from six.moves import cPickle as pickle import numpy as np import os from scipy.misc import imread import platform def load_pickle(f): version = platform.python_version_tuple() if version[0] == '2': return pickle.load(f) elif version[0] == '3': return...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # gevent-socketio documentation build configuration file, created by # sphinx-quickstart on Tue Mar 13 20:43:40 2012. # # 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....
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from datetime import date, datetime, timedelta from django.conf import settings from django.db import models from django.utils import timezone from django.utils.translation import ugettext as _ User = settings.AUTH_USER_MODEL DURATION = 30 # summer starts 1st June, ends 15th August SUMMER = ...
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/core_api/datamodels/dag_warning.py
"""Tests for launchers Doesn't actually start any subprocesses, but goes through the motions of constructing objects, which should test basic config. Authors: * Min RK """ #------------------------------------------------------------------------------- # Copyright (C) 2013 The IPython Development Team # # Distrib...
unknown
codeparrot/codeparrot-clean
""" Tests for API permissions classes. """ import ddt from django.test import TestCase, RequestFactory from openedx.core.lib.api.permissions import IsStaffOrOwner from student.tests.factories import UserFactory class TestObject(object): """ Fake class for object permission tests. """ user = None @ddt.ddt cl...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "cases/helper" class TestRecord < ActiveRecord::Base end class TestDisconnectedAdapter < ActiveRecord::TestCase def setup @connection = ActiveRecord::Base.lease_connection end teardown do return if in_memory_db? end unless in_memory_db? test "reconnects t...
ruby
github
https://github.com/rails/rails
activerecord/test/cases/disconnected_test.rb
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## import openerp.tests.common as common class TestMrpBomComp...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import os import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlparse, compat_urllib_request, ) class KeezMoviesIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?keezmovies\.com/video/.+?(?P<id>[0-9]+)(?:[/?&]|$)' _TEST = ...
unknown
codeparrot/codeparrot-clean
import os import argparse import logging import sys import luigi.interface import luigi.server import luigi.process import luigi.configuration from luigi.retcodes import run_with_retcodes def luigi_run(argv=sys.argv[1:]): run_with_retcodes(argv) def luigid(argv=sys.argv[1:]): parser = argparse.ArgumentParser...
unknown
codeparrot/codeparrot-clean
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
unknown
codeparrot/codeparrot-clean
z0 = -6. z1 = -3. scale = 'p00 p01 p02 p03 p04 p05 p06 p07 p08 p09 p10 p11 p12' colours = [ '"white"', 'db', 'mb', 'lb', 'mg', 'lg', '"yellow"', 'ly', '"orange"', '"#FF6347"', 'mr', 'dr', 'bb' ] N_cols = len(colours) # Range rng = [] for i in [0, N_cols-1]: pholder = 'p%02d' % i pos = sca...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2013 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version ...
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...
python
github
https://github.com/apache/airflow
airflow-core/tests/unit/utils/test_sqlalchemy.py
# Copyright (C) 2013-2020 ycmd contributors # # This file is part of ycmd. # # ycmd 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. # #...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # 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
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/test/scripts/process_with_sigterm_trap.sh
// RUN: rm -rf %t // RUN: mkdir -p %t/yaml %t/md // RUN: clang-doc --doxygen --executor=standalone %s -output=%t/yaml // RUN: FileCheck %s < %t/yaml/index.yaml --check-prefix=YAML // RUN: clang-doc --doxygen --executor=standalone %s -output=%t/md --format=md // RUN: FileCheck %s < %t/md/GlobalNamespace/index.md --ch...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-doc/builtin_types.cpp
<!--Copyright 2022 The HuggingFace Team. 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 agreed...
unknown
github
https://github.com/huggingface/transformers
docs/source/en/model_doc/cvt.md
# Copyright 2014 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. class Interface(object): def __init__(self): self.functions = [] def Func(self, name, return_type): f = Function(self, len(self.functions), name...
unknown
codeparrot/codeparrot-clean
import pytest from unittest import mock from django.core.urlresolvers import reverse from django.core import mail from taiga.base.utils import json from taiga.hooks.github import event_hooks from taiga.hooks.github.api import GitHubViewSet from taiga.hooks.exceptions import ActionSyntaxException from taiga.projects....
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
# Copyright 2014 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 telemetry.page import page as page from telemetry import story archive_data_file_path = 'data/service_worker.json' class ServiceWorkerPageSet(story.St...
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-context/src/test/java/org/springframework/context/annotation/AggressiveFactoryBeanInstantiationTests.java
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package alicloudoss import ( "bytes" "context" "fmt" "io" "net/http" "os" "sort" "strconv" "strings" "time" "github.com/aliyun/aliyun-oss-go-sdk/oss" "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" "github.com/hash...
go
github
https://github.com/hashicorp/vault
physical/alicloudoss/alicloudoss.go
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models from decimal import Decimal, ROUND_DOWN class Migration(DataMigration): def forwards(self, orm): # Select all the invoices and number of registration codes(as qty) associated wit...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # GDB debugging support # # Copyright 2012 Red Hat, Inc. and/or its affiliates # # Authors: # Avi Kivity <avi@redhat.com> # # This work is licensed under the terms of the GNU GPL, version 2. See # the COPYING file in the top-level directory. # # Contributions after 2012-01-13 are licensed under the...
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
configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/TestJmxEndpoint.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-core/tests/unit/cli/commands/test_connection_command.py
from decimal import Decimal from sys import float_info from unittest import TestCase from django.utils.numberformat import format as nformat class TestNumberFormat(TestCase): def test_format_number(self): self.assertEqual(nformat(1234, '.'), '1234') self.assertEqual(nformat(1234.2, '.'), '1234.2'...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0 #ifndef IOU_OP_DEF_H #define IOU_OP_DEF_H struct io_issue_def { /* needs req->file assigned */ unsigned needs_file : 1; /* should block plug */ unsigned plug : 1; /* supports ioprio */ unsigned ioprio : 1; /* supports iopoll */ unsigned iopoll : 1; /* op supports buffer...
c
github
https://github.com/torvalds/linux
io_uring/opdef.h
# Copyright 2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version. # # G...
unknown
codeparrot/codeparrot-clean
## Input ```javascript function VideoTab() { const ref = useRef(); let x = () => { ref.current?.x; }; return <VideoList videos={x} />; } ``` ## Code ```javascript import { c as _c } from "react/compiler-runtime"; function VideoTab() { const $ = _c(1); const ref = useRef(); let t0; if ($[0] === ...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/ref-current-optional-field-no-added-to-dep.expect.md
""" Created by Massimo Di Pierro Licese BSD """ import subprocess import os import os.path import re import sys from tempfile import mkstemp, mkdtemp, NamedTemporaryFile from markmin2latex import markmin2latex __all__ = ['markmin2pdf'] def removeall(path): ERROR_STR= """Error removing %(path)s, %(error)s """ ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any...
unknown
codeparrot/codeparrot-clean
/* Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/apis/core/install/install.go
#!/usr/bin/python import datetime import monthdelta def parse_date(date_str): return datetime.datetime.strptime(date_str, "%Y-%m-%d") def unparse_date(date_obj): return date_obj.strftime("%Y-%m-%d") class Company(object): def __init__(self, name): self.name = name self.flows = [] ...
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 {ElementPosition} from '../../../protocol'; import {arrayEquals} from '../../../shared-utils'; import {Compo...
typescript
github
https://github.com/angular/angular
devtools/projects/ng-devtools-backend/src/lib/set-console-reference.ts
from i3pystatus import IntervalModule import speedtest import requests import time import os from urllib.parse import urlparse import contextlib import sys from io import StringIO class NetSpeed(IntervalModule): """ Attempts to provide an estimation of internet speeds. Requires: speedtest-cli/modularize-2 ...
unknown
codeparrot/codeparrot-clean
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # 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 o...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 Christoph Reiter # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. from pgi.clib.gir import G...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.utilities import PowerBIDataset # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional import...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/utilities/powerbi.py
"""Mongodb implementations of type objects.""" # pylint: disable=no-init # Numerous classes don't require __init__. # pylint: disable=too-many-public-methods,too-few-public-methods # Number of methods are defined in specification # pylint: disable=protected-access # Access to protected methods allowed in p...
unknown
codeparrot/codeparrot-clean
"""Openstack manage component of PG Sandman. .. module:: manage :synopsis: Module containing the OpenstackManage class. .. moduleauthor: PG Sandman """ import logging import threading import uuid import networkx as nx import chain_api import json import random from emuvim.api.openstack.resources import Net, Port...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python """ Example usage: ./test_multiple.py test_display_no_ssl --log test.log Resulting test.log file (single test, stopped with Ctrl-C with 15 clients): 0 162212 1 154156 2 154424 3 154952 4 155352 5 155616 6 156280 7 222084 8 222612 9 230820 10 230820 11 230820 12 230820 13 296356 14 296356 """ impo...
unknown
codeparrot/codeparrot-clean
""" Create SQL statements for QuerySets. The code in here encapsulates all of the SQL construction so that QuerySets themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order to get ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Adrian Sampson and Diego Moreda. # # 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 # wit...
unknown
codeparrot/codeparrot-clean