code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
__all__ = ["PackageInstaller"] from direct.showbase.DirectObject import DirectObject from direct.stdpy.threading import Lock, RLock from direct.showbase.MessengerGlobal import messenger from direct.task.TaskManagerGlobal import taskMgr from direct.p3d.PackageInfo import PackageInfo from panda3d.core import TPLow, PSta...
unknown
codeparrot/codeparrot-clean
<?php $container->loadFromExtension('framework', [ 'esi' => [ 'enabled' => false, ], ]);
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/esi_disabled.php
""" Modified version of build_ext that handles fortran source files. """ import os import sys from glob import glob from distutils.dep_util import newer_group from distutils.command.build_ext import build_ext as old_build_ext from distutils.errors import DistutilsFileError, DistutilsSetupError,\ DistutilsError f...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_magpie_ui ---------------------------------- Tests for :mod:`magpie.ui` module. """ import re import unittest from typing import TYPE_CHECKING from six.moves.urllib.parse import urlparse # NOTE: must be imported without 'from', otherwise the interface's test c...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import os from tempfile import mkdtemp from shutil import rmtree import numpy as np from nipype.testing import (assert_equal, assert_false, assert_true, ...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true class Tag < ActiveRecord::Base has_many :taggings has_many :taggables, through: :taggings has_one :tagging has_many :tagged_posts, through: :taggings, source: "taggable", source_type: "Post" end class OrderedTag < Tag self.table_name = "tags" has_many :ordered_taggings, ->...
ruby
github
https://github.com/rails/rails
activerecord/test/models/tag.rb
import logging from programy.clients.clients import BotClient from programy.bot import Bot from programy.brain import Brain from programy.config.client.client import ClientConfiguration class TestClient(BotClient): def __init__(self, debug=False, level=logging.DEBUG): if debug is True: loggin...
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...
unknown
codeparrot/codeparrot-clean
import datetime from django.forms import TimeField, ValidationError from django.test import SimpleTestCase from . import FormFieldAssertionsMixin class TimeFieldTest(FormFieldAssertionsMixin, SimpleTestCase): def test_timefield_1(self): f = TimeField() self.assertEqual(datetime.time(14, 25), f.c...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import smbus # =========================================================================== # Adafruit_I2C Class # =========================================================================== class Adafruit_I2C(object): @staticmethod def getPiRevision(): "Gets the version number of the Raspb...
unknown
codeparrot/codeparrot-clean
## Input ```javascript import {identity, mutate, mutateAndReturn} from 'shared-runtime'; function Component(props) { const key = {a: 'key'}; const context = { [key.a]: identity([props.value]), }; mutate(key); return context; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: [{value: 42}]...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/object-expression-computed-member.expect.md
/* Copyright 2022 - 2025 R. Thomas * * 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
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/PDB/types/Simple.hpp
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class DumpIE(InfoExtractor): _VALID_URL = r'^https?://(?:www\.)?dump\.com/(?P<id>[a-zA-Z0-9]+)/' _TEST = { 'url': 'http://www.dump.com/oneus/', 'md5': 'ad71704d1e67dfd9e81e3e8b42d69d99', ...
unknown
codeparrot/codeparrot-clean
# # Copyright 2013 Red Hat, Inc # Copyright 2013 eNovance <licensing@enovance.com> # # Authors: Eoghan Glynn <eglynn@redhat.com> # Julien Danjou <julien@danjou.info> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may ob...
unknown
codeparrot/codeparrot-clean
otlp: promote_resource_attributes: ["service.name"]
unknown
github
https://github.com/prometheus/prometheus
config/testdata/otlp_label_underscore_sanitization_defaults.good.yml
from django.utils.translation import ugettext from django.http import HttpResponse, HttpResponseServerError from django.shortcuts import render from django.shortcuts import render_to_response,get_object_or_404 from django.template import RequestContext from .forms import LocationForm from .models import Country,State,C...
unknown
codeparrot/codeparrot-clean
"Tests for account creation" import ddt from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.db.transaction import rollback from django.test import TestCase, TransactionTestCase from django.test.utils import override_settings import mock from user_api.models import User...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """Tests basic git operations: commit, log, config""" from __future__ import unicode_literals import unittest from cola import core from cola.models.main import MainModel from test import helper class ColaBasicGitTestCase(helper.GitRepositoryTestCase): def setUp(self): helper.GitR...
unknown
codeparrot/codeparrot-clean
--- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html applies_to: stack: all navigation_title: Common options --- # Elasticsearch API common options [common-options] All {{es}} REST APIs support the following options. ## Pretty Results [_pretty_results] When app...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch/rest-apis/common-options.md
#!/bin/env bash DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" . "$DIR/prelude.sh" cd src set -eo pipefail covIdir="$workdir/covIdir" if [ -d "$covIdir" ]; then echo "covIdir already exists, meaning idir extracted after download from S3" else mkdir $workdir/covIdir fi activate_venv expo...
unknown
github
https://github.com/mongodb/mongo
evergreen/coverity_build.sh
import sys import unittest import numpy from chainer.backends import cuda from chainer import testing from chainer.testing import attr from chainer.utils import type_check as T class TestConstant(unittest.TestCase): def setUp(self): self.x = T.Constant(10) def test_str(self): self.assertEqu...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import js_to_json class PatreonIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?patreon\.com/creation\?hid=(?P<id>[^&#]+)' _TESTS = [ { 'url': 'http://www.patreon.com/creation?hid=7...
unknown
codeparrot/codeparrot-clean
DOCUMENTATION: name: split version_added: 2.11 short_description: split a string into a list description: - Using Python's text object method C(split) we turn strings into lists via a 'splitting character'. notes: - This is a passthrough to Python's C(str.split). positional: _input, _split_string ...
unknown
github
https://github.com/ansible/ansible
lib/ansible/plugins/filter/split.yml
from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class ChainingTests(SimpleTestCase): """ Chaining safeness-preserving filters should not alter the safe status. """ @setup({"chaining01": '{{ a|capfirst|center:"7" }}.{{ b|capfirst|center:"7...
python
github
https://github.com/django/django
tests/template_tests/filter_tests/test_chaining.py
/* * 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-conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/precommit/LicenseHeadersPrecommitPlugin.java
from __future__ import absolute_import from django.conf import settings from zerver.lib.redis_utils import get_redis_client import redis import time import logging from itertools import izip # Implement a rate-limiting scheme inspired by the one described here, but heavily modified # http://blog.domaintools.com/201...
unknown
codeparrot/codeparrot-clean
#ifndef __loongarch_sx #error "HOST/ARCH doesn't support LSX" #endif #include <lsxintrin.h> int main(void) { __m128i a = __lsx_vadd_d(__lsx_vldi(0), __lsx_vldi(0)); return __lsx_vpickve2gr_w(a, 0); }
c
github
https://github.com/numpy/numpy
numpy/_core/src/_simd/checks/cpu_lsx.c
--- title: .svelte.js and .svelte.ts files --- Besides `.svelte` files, Svelte also operates on `.svelte.js` and `.svelte.ts` files. These behave like any other `.js` or `.ts` module, except that you can use runes. This is useful for creating reusable reactive logic, or sharing reactive state across your app (though ...
unknown
github
https://github.com/sveltejs/svelte
documentation/docs/01-introduction/04-svelte-js-files.md
#pragma once #include <ATen/core/Tensor.h> namespace at::native { inline ScalarType first_type() { return ScalarType::Undefined; } template <typename... Args> inline ScalarType first_type(const Tensor& arg, const Args&... parameters) { return arg.defined() ? arg.scalar_type() : first_type(parameters...); } tem...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/cpu/mixed_data_type.h
from elasticsearch_dsl import field def test_field_from_dict(): f = field.construct_field({'type': 'string', 'index': 'not_analyzed'}) assert isinstance(f, field.String) assert {'type': 'string', 'index': 'not_analyzed'} == f.to_dict() def test_multi_fields_are_accepted_and_parsed(): f = field.constr...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2019 PaddlePaddle 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 appli...
unknown
codeparrot/codeparrot-clean
# Adapted from test_file.py by Daniel Stutzbach from __future__ import unicode_literals import sys import os import errno import unittest from array import array from weakref import proxy from functools import wraps from test.test_support import TESTFN, check_warnings, run_unittest, make_bad_fd from test.test_suppor...
unknown
codeparrot/codeparrot-clean
import re from collections import defaultdict from functools import partial import numpy as np import pytest import scipy.sparse as sp from sklearn.datasets import ( make_biclusters, make_blobs, make_checkerboard, make_circles, make_classification, make_friedman1, make_friedman2, make_...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/datasets/tests/test_samples_generator.py
prelude: | str = "a" * 1000 re = Regexp.new(str) benchmark: dup: re.dup
unknown
github
https://github.com/ruby/ruby
benchmark/regexp_dup.yml
""" Wrapper for loading templates from "templates" directories in INSTALLED_APPS packages. """ import os import sys from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.template.base import TemplateDoesNotExist from django.template.loader import BaseLoader from django.u...
unknown
codeparrot/codeparrot-clean
import logging import os import re from packstack.installer import basedefs from packstack.installer.setup_controller import Controller from packstack.installer.exceptions import PackStackError controller = Controller() PUPPET_DIR = os.path.join(basedefs.DIR_PROJECT_DIR, "puppet") PUPPET_TEMPLATE_DIR = os.path.join(...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2010-2020 Benjamin Peterson # # 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, modify, merge, publi...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2013-Present, Redis Ltd. * All rights reserved. * * Licensed under your choice of (a) the Redis Source Available License 2.0 * (RSALv2); or (b) the Server Side Public License v1 (SSPLv1); or (c) the * GNU Affero General Public License v3 (AGPLv3). */ #include "server.h" /* This file implemen...
c
github
https://github.com/redis/redis
src/notify.c
# OpenSCAD gui init module # # Gathering all the information to start FreeCAD # This is the second one of three init scripts, the third one # runs when the gui is up #*************************************************************************** #* (c) Juergen Riegel (juergen.riegel@web.de) 2002 *...
unknown
codeparrot/codeparrot-clean
#pragma once #include <c10/core/Device.h> #include <c10/util/Exception.h> #include <c10/util/Registry.h> #include <ATen/detail/AcceleratorHooksInterface.h> C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wunused-parameter") namespace at { constexpr const char* XLA_HELP = "This error has occurred because you are try...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/detail/XLAHooksInterface.h
## Input ```javascript function foo(x) { if (x <= 0) { return 0; } return x + foo(x - 1) + (() => foo(x - 2))(); } export const FIXTURE_ENTRYPOINT = { fn: foo, params: [10], }; ``` ## Code ```javascript function foo(x) { if (x <= 0) { return 0; } return x + foo(x - 1) + foo(x - 2); } expo...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/recursive-function.expect.md
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
unknown
codeparrot/codeparrot-clean
"""Test the parser and generator are inverses. Note that this is only strictly true if we are parsing RFC valid messages and producing RFC valid messages. """ import io import unittest from email import policy, message_from_bytes from email.message import EmailMessage from email.generator import BytesGenerator from t...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 Isaku Yamahata <yamahata at valinux co jp> # # 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://...
unknown
codeparrot/codeparrot-clean
function Component() { const x = {}; { const x = []; const fn = function () { mutate(x); }; fn(); } return x; // should return {} }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/lambda-mutate-shadowed-object.js
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import bitfield.models import django.db.models.deletion import django.utils.timezone from django.conf import settings import zerver.models class Migration(migrations.Migration): dependencies = [ ('aut...
unknown
codeparrot/codeparrot-clean
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
unknown
github
https://github.com/opencv/opencv
modules/core/include/opencv2/core/cuda/warp.hpp
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # 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 you...
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
build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests.java
# This program 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 your option) any later version. # # This program is distributed in the hope that it will be usefu...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.fir.test.cases.generated.cases.components.relationProvider; import ...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/relationProvider/FirIdeDependentAnalysisScriptSourceModuleHasConflictingSignatureWithTestGenerated.java
#------------------------------------------------------------------------------- # TokenManager.py # # Token configuration and content for access to ArcGIS Online (AGOL) # # # Prerequisites/Inputs: # Account username and password # AGOL token URL # # # Outputs: # Token # # Created by: NPS ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/common_runtime/costmodel_manager.h
# -*- 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
/* 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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/framework/kernel_def_util.h
# Jython Database Specification API 2.0 # # Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com> """ To run the tests, simply invoke this script from the commandline: jython runner.py <xml config file> [vendor, ...] If no vendors are given, then all vendors will be tested. If a vendor is given, then only that vend...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from __future__ import print_function import os from scriptCommon import catchPath changedFiles = 0 def isSourceFile( path ): return path.endswith( ".cpp" ) or path.endswith( ".h" ) or path.endswith( ".hpp" ) def fixAllFilesInDir( dir ): for f in os.listdir( dir ): path = os....
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.invocation; import java.io.Serializable; import java.lang.reflect.Method; import org.mockito.NotExtensible; /** * An invocation on a mock. * * <p> * A placeholder for mock, ...
java
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/invocation/InvocationOnMock.java
from django import forms from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.utils.translation import ugettext, ugettext_lazy as _ class FlatpageForm(forms.ModelForm): url = forms.RegexField(label=_("URL"), max_length=100, regex=r'^[-\w/\.~]+$', help_text=_("Ex...
unknown
codeparrot/codeparrot-clean
import json import uuid import copy from base64 import b64decode from datetime import datetime from django.http import HttpResponse, HttpResponseNotFound from django.conf import settings from django.utils.timezone import utc from util import convert_to_dict from retrieve_statement import complex_get, get_more_stateme...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package stackstate import ( "context" "fmt" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/lang/marks" "github.com/hashicorp/terraform/internal/plans" "github.com/ha...
go
github
https://github.com/hashicorp/terraform
internal/stacks/stackstate/from_state.go
name: Test Emscripten/Pyodide build on: schedule: # Nightly build at 3:42 A.M. - cron: "42 3 */1 * *" push: branches: - main # Release branches - "[0-9]+.[0-9]+.X" pull_request: branches: - main - "[0-9]+.[0-9]+.X" # Manual run workflow_dispatch: env: FORCE_CO...
unknown
github
https://github.com/scikit-learn/scikit-learn
.github/workflows/emscripten.yml
#!/usr/bin/python # # Copyright (c) 2008--2014 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should...
unknown
codeparrot/codeparrot-clean
import array import unittest from test.support import run_unittest, import_module, get_attribute import os, struct fcntl = import_module('fcntl') termios = import_module('termios') get_attribute(termios, 'TIOCGPGRP') #Can't run tests without this feature try: tty = open("/dev/tty", "rb") except IOError: raise ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python from __future__ import annotations import json def main(): print(json.dumps(dict(changed=False, source='testns.testcol.notrealmodule'))) if __name__ == '__main__': main()
python
github
https://github.com/ansible/ansible
test/integration/targets/ansible-doc/broken-docs/collections/ansible_collections/testns/testcol/plugins/modules/notrealmodule.py
# -*- coding: utf-8 -*- """ jinja2.compiler ~~~~~~~~~~~~~~~ Compiles nodes into python code. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from itertools import chain from copy import deepcopy from keyword import iskeyword as is_python_keyword from jinja2...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 """ Created on 10 Feb 2021 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) Getting distance between two points based on latitude/longitude https://stackoverflow.com/questions/19412462/getting-distance-between-two-points-based-on-latitude-longitude """ from scs_core.position.positio...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'Y \m. E j \d.' TIME_FORMAT = 'H:...
unknown
codeparrot/codeparrot-clean
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
unknown
codeparrot/codeparrot-clean
#include "vm_core.h" #include "vm_sync.h" #include "shape.h" #include "symbol.h" #include "id_table.h" #include "internal/class.h" #include "internal/error.h" #include "internal/gc.h" #include "internal/object.h" #include "internal/symbol.h" #include "internal/variable.h" #include "variable.h" #include <stdbool.h> #if...
c
github
https://github.com/ruby/ruby
shape.c
# -*- coding: utf-8 -*- # # VOC documentation build configuration file, created by # sphinx-quickstart on Sat Jul 27 14:58:42 2013. # # 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 con...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/bus/st,stm32mp25-rifsc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: STM32 Resource isolation framework security controller maintainers: - Gatien Chevallier <gatien.chevallier@foss.st.com...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/bus/st,stm32mp25-rifsc.yaml
// SubModule2.h - Main header with same name as directory. #include "SubModule2/Header3.h" #include "SubModule2/Header4.h"
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/modularize/SubModule2.h
//go:build !linux && !freebsd && !windows package daemon import ( "errors" "github.com/moby/moby/v2/pkg/sysinfo" ) func checkSystem() error { return errors.New("the Docker daemon is not supported on this platform") } func setupResolvConf(_ *any) {} func getSysInfo(_ *Daemon) *sysinfo.SysInfo { return sysinfo....
go
github
https://github.com/moby/moby
daemon/daemon_unsupported.go
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/security/oauthbearer/OAuthBearerToken.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
configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/test/CompiledMetadataReader.java
/* Copyright 2017 - 2025 R. Thomas * Copyright 2017 - 2025 Quarkslab * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
unknown
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/COFF/AuxiliarySymbols/AuxiliarySectionDefinition.hpp
""" Copyright (c) 2014 Brian Muller Copyright (c) 2015 OpenBazaar """ import random from twisted.internet import defer from zope.interface import implements import nacl.signing from dht.node import Node from dht.routing import RoutingTable from dht.utils import digest from log import Logger from rpcudp import RPCProto...
unknown
codeparrot/codeparrot-clean
import { test } from '../../test'; export default test({ html: ` <div>7</div> `, async test({ component, target, assert }) { component.a = 5; assert.htmlEqual( target.innerHTML, ` <div>9</div> ` ); } });
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/const-tag-dependencies/_config.js
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations DOCUMENTATION = """ name: bad short_description: Bad lookup description: A bad lookup. author: - Ansible Core Team """ EXAMPLES = """ - debug: msg: "{{ lookup('ns.col.bad') }}" """ R...
python
github
https://github.com/ansible/ansible
test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/plugins/lookup/bad.py
/* origin: FreeBSD /usr/src/lib/msun/src/e_pow.c */ /* * ==================================================== * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved. * * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ====...
rust
github
https://github.com/nodejs/node
deps/crates/vendor/libm/src/math/pow.rs
#!/usr/bin/python """ Library used to provide the appropriate data dir for virt test. """ import inspect import logging import os import sys import glob import shutil import stat from avocado.core import data_dir from avocado.core.settings import settings from avocado.utils import distro from avocado.utils import path...
unknown
codeparrot/codeparrot-clean
import numpy as np class BaseStrategy(object): """ Base class of exploration strategy. """ def get_action(self, obs, policy): raise NotImplementedError def reset(self): pass class OUStrategy(BaseStrategy): """ Ornstein-Uhlenbeck process: dxt = theta * (mu - xt) * dt + s...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ werkzeug.http ~~~~~~~~~~~~~ Werkzeug comes with a bunch of utilities that help Werkzeug to deal with HTTP data. Most of the classes and functions provided by this module are used by the wrappers, but they are useful on their own, too, especially if the response and ...
unknown
codeparrot/codeparrot-clean
''' Plot CPU utilization of each virtual host. ''' from helper import * parser = argparse.ArgumentParser("Plot stacked bar chart of CPU usage") parser.add_argument('--files', '-f', help="File to read CPU usage from.", required=True, nargs="+", ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.fe10.test.cases.generated.cases.annotations; import com.intellij.te...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fe10/tests-gen/org/jetbrains/kotlin/analysis/api/fe10/test/cases/generated/cases/annotations/Fe10IdeNormalAnalysisSourceModuleAnalysisApiAnnotationsOnDeclarationsWithMetaTestGenerated.java
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 fileencoding=utf-8 import json from django.conf import settings from django.core.management import BaseCommand from django.utils import timezone from django.utils.dateparse import parse_datetime from django.utils.translation import ugettext_lazy from odk_logger.models ...
unknown
codeparrot/codeparrot-clean
""" Tests for the pylearn2.utils.serial module. Currently only tests read_bin_lush_matrix and load_train_file methods. """ from theano.compat.six.moves import xrange import pylearn2 from pylearn2.utils.serial import read_bin_lush_matrix, load_train_file import numpy as np pylearn2_path = pylearn2.__path__[0] example_b...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
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...
unknown
codeparrot/codeparrot-clean
from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.db import models class Award(models.Model): name = models.CharField(max_length=25) object_id = models.PositiveIntegerField() content_type = model...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class MorningstarIE(InfoExtractor): IE_DESC = 'morningstar.com' _VALID_URL = r'https?://(?:www\.)?morningstar\.com/[cC]over/video[cC]enter\.aspx\?id=(?P<id>[0-9]+)' _TEST = { 'url': 'http://www.mor...
unknown
codeparrot/codeparrot-clean
# Copyright 2016-2017 Alan F Rubin # # This file is part of Enrich2. # # Enrich2 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
from sympy import Symbol, Function, exp, sqrt, Rational, I, cos, tan from sympy.utilities.pytest import XFAIL def test_add_eval(): a = Symbol("a") b = Symbol("b") c = Rational(1) p = Rational(5) assert a*b + c + p == a*b + 6 assert c + a + p == a + 6 assert c + a - p == a + (-4) assert ...
unknown
codeparrot/codeparrot-clean
# # Copyright (C) 2010 Eric Day (eday@oddments.org) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list o...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python3 # Yue Chen # Feature Vector featureVectorPlace = ["bilabial","labiodental","dental","alveolar","postalveolar","retroflex","palatal","velar","uvular","pharyngeal","glottal"] featureVectorManner = ["plosive","nasal","trill","tap_flap","fricative","lateral_fricative","approximant","lateral","lateral...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 OpenStack Foundation. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
unknown
codeparrot/codeparrot-clean
// @validateNoVoidUseMemo @loggerTestOnly function Component() { const value = useMemo(() => { console.log('computing'); }, []); const value2 = React.useMemo(() => { console.log('computing'); }, []); return ( <div> {value} {value2} </div> ); }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/invalid-useMemo-no-return-value.js