code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#!/usr/bin/env python import os, re def lineify_fileobjs(ifo, ofo, strip=False): from pyutil.strutil import pop_trailing_newlines, split_on_newlines for l in ifo: for sl in split_on_newlines(pop_trailing_newlines(l)): if strip: sl = sl.strip() ofo.write(pop_trailing_newlines(sl) + '\n') def lineify_fil...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * int8.c * Internal 64-bit integer operations * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION * src/backend/utils...
c
github
https://github.com/postgres/postgres
src/backend/utils/adt/int8.c
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Abstract # (<http://abstract.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publish...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * pg_description.h * definition of the "description" system catalog (pg_description) * * Because the contents of this table are taken from the *.dat files * of other catalogs, there is no pg_description.dat file. The initial * conten...
c
github
https://github.com/postgres/postgres
src/include/catalog/pg_description.h
from contextlib import contextmanager from bok_choy.javascript import wait_for_js from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise from common.test.acceptance.pages.common.utils import hover from common.test.acceptance.pages.lms.course_page import CoursePage from common.test.accep...
unknown
codeparrot/codeparrot-clean
# ============================================================================= # PROJECT CHRONO - http:#projectchrono.org # # Copyright (c) 2014 projectchrono.org # All rights reserved. # # Use of this source code is governed by a BSD-style license that can be found # in the LICENSE file at the top level of the distri...
unknown
codeparrot/codeparrot-clean
# As a test suite for the os module, this is woefully inadequate, but this # does add tests for a few functions which have been determined to be more # more portable than they had been thought to be. import os import unittest import warnings from test import test_support warnings.filterwarnings("ignore", "tempnam", R...
unknown
codeparrot/codeparrot-clean
# Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) setup( name='pdf2image', version='1.5.1', description='A wrapper around the pdftoppm and pdftocairo...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from datetime import date from ..parsers import TagParser from .base import BaseCinemaSpider class Spider(BaseCinemaSpider): name = 'praha-bioponrepo' calendar_url = 'http://www.bio-ponrepo.cz/program.html' calendar_next = ".//*[@class='programme']/form" def iter_calendar_ne...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 The etcd 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 t...
go
github
https://github.com/etcd-io/etcd
server/storage/schema/actions.go
# -*- coding: utf-8 -*- """ pygments.formatters.other ~~~~~~~~~~~~~~~~~~~~~~~~~ Other formatters: NullFormatter, RawTokenFormatter. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments...
unknown
codeparrot/codeparrot-clean
import simplejson as json from mongrel2 import handler sender_id = "82209006-86FF-4982-B5EA-D1E29E55D481" conn = handler.Connection(sender_id, "tcp://127.0.0.1:9999", "tcp://127.0.0.1:9998") users = {} user_list = [] while True: try: req = conn.recv_json() except: pr...
unknown
codeparrot/codeparrot-clean
import doctest import pytest from insights.parsers import abrt_ccpp from insights.parsers.abrt_ccpp import AbrtCCppConf from insights.tests import context_wrap from insights.parsers import SkipException ABRT_CONF_CONTENT = """ # Configuration file for CCpp hook # CCpp hook writes its template to the "/proc/sys/kernel...
unknown
codeparrot/codeparrot-clean
# Copyright 2025 Google Inc. HuggingFace Inc. 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 requir...
python
github
https://github.com/huggingface/transformers
src/transformers/models/gemma3n/convert_gemma3n_weights.py
""" Provide the namespace doxygen comment. It checks if there is doxygen sytle comment in front of each 'namespace' keyword == Violation == namespace AA <== Violation. No comment on the namespace AA { } /* <== Violation. There is comment but not a doxygen comment. * bla...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # Avanzosc - Avanced Open Source Consulting # Copyright (C) 2011 - 2012 Avanzosc <http://www.avanzosc.com> # # This program is free software: you can redistribute it and/or modify # it under the terms ...
unknown
codeparrot/codeparrot-clean
import unittest from pulsar import async, Future, new_event_loop __benchmark__ = True DELAY = 0 def async_func(loop, value): p = Future(loop=loop) loop.call_later(DELAY, p.set_result, value) return p def sub_sub(loop, num): a = yield from async_func(loop, num) b = yield from async_func(loop, num...
unknown
codeparrot/codeparrot-clean
import { Stringify, makeObject_Primitives, mutate, mutateAndReturn, } from 'shared-runtime'; function useFoo({data}) { let obj = null; let myDiv = null; label: { if (data.cond) { obj = makeObject_Primitives(); if (data.cond1) { myDiv = <Stringify value={mutateAndReturn(obj)} />; ...
typescript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/mutation-within-jsx-and-break.tsx
/* Checks that BOLT correctly handles instrumentation of indirect calls * including case with indirect calls in signals handlers. */ #include <signal.h> #include <stdio.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> int foo(int x) { return x + 1; } int bar(int (*fn)(int), int val) { return fn(v...
c
github
https://github.com/llvm/llvm-project
bolt/test/runtime/X86/instrumentation-indirect.c
from setuptools import setup, find_packages try: desc = open('README.rst').read() except: desc = 'see README.rst' setup( name='nosexcover', version='1.0.11', description='Extends nose.plugins.cover to add Cobertura-style XML reports', long_description=desc, author='Chris Heisel', autho...
unknown
codeparrot/codeparrot-clean
"""Internals of array-api-extra."""
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/externals/array_api_extra/_lib/__init__.py
#!/usr/bin/env python # 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, software...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from south.db import db from south.v2 import SchemaMigration try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() class Migration(SchemaMigration): def forwards(self, o...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS P...
unknown
codeparrot/codeparrot-clean
#!/bin/sh # # Copyright (c) 2006 Catalin Marinas # test_description='git apply trying to add an ending line. ' . ./test-lib.sh # setup cat >test-patch <<\EOF diff --git a/file b/file --- a/file +++ b/file @@ -1,2 +1,3 @@ a b +c EOF echo 'a' >file echo 'b' >>file echo 'c' >>file test_expect_success setup \ '...
unknown
github
https://github.com/git/git
t/t4113-apply-ending.sh
- name: "test that the vaulted_utf8_value decrypts correctly" gather_facts: false hosts: testhost vars: expected: "aöffü" tasks: - name: decrypt vaulted_utf8_value and show it in debug debug: var: vaulted_utf8_value - name: assert decrypted vaulted_utf8_value matches expected a...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/ansible-vault/test_vaulted_utf8_value.yml
""" Test cases adapted from the test_bsddb.py module in Python's regression test suite. """ import os, string import unittest from test_all import db, hashopen, btopen, rnopen, verbose, \ get_new_database_path class CompatibilityTestCase(unittest.TestCase): def setUp(self): self.filename = get_ne...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Tests\Support; use Illuminate\Support\Traits\Conditionable; use PHPUnit\Framework\TestCase; class SupportConditionableTest extends TestCase { public function testWhenConditionCallback() { // With static condition $logger = (new ConditionableLogger()) ->w...
php
github
https://github.com/laravel/framework
tests/Support/SupportConditionableTest.php
/* 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/api/legacyscheme/scheme.go
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='MyUser', fields=[ (...
unknown
codeparrot/codeparrot-clean
""" This module provides a pool manager that uses Google App Engine's `URLFetch Service <https://cloud.google.com/appengine/docs/python/urlfetch>`_. Example usage:: from urllib3 import PoolManager from urllib3.contrib.appengine import AppEngineManager, is_appengine_sandbox if is_appengine_sandbox(): ...
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 = 'd. F Y' TIME_FORMAT = 'H:i:s' DAT...
unknown
codeparrot/codeparrot-clean
<!--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/tasks/sequence_classification.md
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package command import ( "fmt" "path/filepath" "strings" svchost "github.com/hashicorp/terraform-svchost" "github.com/hashicorp/terraform/internal/command/cliconfig" "github.com/hashicorp/terraform/internal/tfdiags" ) // LogoutCommand is a ...
go
github
https://github.com/hashicorp/terraform
internal/command/logout.go
import os, sys from ConfigParser import SafeConfigParser # This dequote() business is required for some older versions # of mysql_config def dequote(s): if s[0] in "\"'" and s[0] == s[-1]: s = s[1:-1] return s def compiler_flag(f): return "-%s" % f def mysql_config(what): from os import pope...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import import datetime from operator import attrgetter from django.core.exceptions import ValidationError from django.test import TestCase, skipUnlessDBFeature from django.utils import tzinfo from .models import (Worker, Article, Party, Event, Department, BrokenUnicodeMethod, NonA...
unknown
codeparrot/codeparrot-clean
/* We need this macro to access core_apply_sparse_checkout */ #define USE_THE_REPOSITORY_VARIABLE #include "builtin.h" #include "git-compat-util.h" #include "config.h" #include "parse-options.h" #include "repository.h" #include "commit.h" #include "dir.h" #include "environment.h" #include "hex.h" #include "tree.h" #in...
c
github
https://github.com/git/git
builtin/backfill.c
#! -*- coding: utf-8 -*- from __future__ import unicode_literals import base64 import errno import hashlib import json import os import shutil import tempfile as sys_tempfile import unittest from io import BytesIO from django.core.files import temp as tempfile from django.core.files.uploadedfile import SimpleUploaded...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package consul import ( "context" "fmt" "github.com/hashicorp/consul/api" "github.com/hashicorp/vault/sdk/framework" "github.com/hashicorp/vault/sdk/logical" ) const ( SecretTokenType = "token" ) func secretToken(b *backend) *framework.Se...
go
github
https://github.com/hashicorp/vault
builtin/logical/consul/secret_token.go
@import url('https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined'); :host { display: flex; justify-content: center; font-family: var(--inter-font); --border-color: color-mix(in srgb, var(--full-contrast) 20%, var(--page-background)); } [ngMenuBar] { display: flex; gap: 0.25rem; padding: 0...
css
github
https://github.com/angular/angular
adev/src/content/examples/aria/menubar/src/basic/app/app.css
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import re import sys import getopt import xml.dom.minidom import logging import requests logger = logging.getLogger(__name__) base_url = 'http://trips.ihmc.us/parser/cgi/' def send_query(text, service_endpoint='dr...
unknown
codeparrot/codeparrot-clean
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import math from cryptography import utils from cryptography.exceptions ...
unknown
codeparrot/codeparrot-clean
// Copyright 2023 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. package main import ( "internal/platform" "testing" ) // TestSupported tests that dist and the main tools agree on // which build modes are supported for a ...
go
github
https://github.com/golang/go
src/cmd/dist/supported_test.go
<?php namespace Illuminate\View; use ArrayIterator; use Closure; use Illuminate\Contracts\Support\DeferringDisplayableValue; use Illuminate\Support\Enumerable; use IteratorAggregate; use Stringable; use Traversable; class InvokableComponentVariable implements DeferringDisplayableValue, IteratorAggregate, Stringable ...
php
github
https://github.com/laravel/framework
src/Illuminate/View/InvokableComponentVariable.php
import cgi import errno import io import mimetypes import os import posixpath import re import shutil import stat import sys import tempfile from os import path import django from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.core.management.utils import hand...
unknown
codeparrot/codeparrot-clean
import re from .base import FIELD_TYPE from django.utils.datastructures import OrderedSet from django.db.backends import BaseDatabaseIntrospection, FieldInfo from django.utils.encoding import force_text foreign_key_re = re.compile(r"\sCONSTRAINT `[^`]*` FOREIGN KEY \(`([^`]*)`\) REFERENCES `([^`]*)` \(`([^`]*)`\)") c...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # # 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
import sys from django.conf import settings from django.core.signals import got_request_exception from django.http import HttpResponse from django.template.response import TemplateResponse from django.template import Template from django.test import TestCase class TestException(Exception): pass # A middleware ba...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import absolute_import from datetime import datetime, timedelta from sentry.models import GroupBookmark, GroupStatus, GroupTagValue from sentry.search.django.backend import DjangoSearchBackend from sentry.testutils import TestCase class DjangoSearchBackendTest(TestCase): ...
unknown
codeparrot/codeparrot-clean
import mock import pytest from datarobot_batch_scoring.main import ( main, UI, main_standalone, parse_args, main_deployment_aware ) def test_lower_case_for_user(monkeypatch): main_args = ['--host', 'http://localhost:53646/api', '--user', 'DataRobot@datarobot.com', ...
unknown
codeparrot/codeparrot-clean
""" System users ============ """ from fabtools.files import is_file from fabtools.user import * import fabtools.require def user(name, comment=None, home=None, group=None, extra_groups=None, create_home=False, skeleton_dir=None, password=None, system=False, shell=None, uid=None): """ Require a user a...
unknown
codeparrot/codeparrot-clean
import json import requests import math def write_status_code_error(job, exception): service = job.service if 499 >= exception.code >= 400: job.model.dbobj.result = json.dumps({'message': exception.message, 'code': exception.code}).encode() service.saveAll() return def find_disks(disk_type, no...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright 2013 Google Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
unknown
codeparrot/codeparrot-clean
# # errors.py : exception definitions # # Copyright 2007, Red Hat Inc. # # 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; version 2 of the License. # # This program is distributed in the hope th...
unknown
codeparrot/codeparrot-clean
from math import ceil from django.db import IntegrityError, connection, models from django.db.models.sql.constants import GET_ITERATOR_CHUNK_SIZE from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature from .models import ( MR, A, Avatar, Base, Child, HiddenUser, HiddenUserProfile, M, M2MFrom, ...
unknown
codeparrot/codeparrot-clean
# # Copyright (c) 1996-2000 Tyler C. Sarna <tsarna@sarna.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: # 1. Redistributions of source code must retain the above copyright # notice, thi...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ Cleanup for Singularity container Scan the images in the singularity CVMFS. If an image directory has not been "linked" to for 2 days, remove the image directory. Maintains state in a file in the root singularity directory named .missing_links.json """ import glob import os import json imp...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package gcp import ( "context" "encoding/json" "fmt" "io" "net/http" "net/url" "time" "cloud.google.com/go/compute/metadata" credentials "cloud.google.com/go/iam/credentials/apiv1" "github.com/hashicorp/vault/api" credentialspb "google....
go
github
https://github.com/hashicorp/vault
api/auth/gcp/gcp.go
// reference: https://github.com/vuejs/vue/blob/dev/test/unit/modules/vdom/patch/children.spec.js import { type TestElement, TestNodeTypes, h, nodeOps, render, serialize, serializeInner, } from '@vue/runtime-test' function toSpan(content: any) { if (typeof content === 'string') { return h('span', co...
typescript
github
https://github.com/vuejs/core
packages/runtime-core/__tests__/rendererChildren.spec.ts
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html #include "precomp.hpp" namespace cv { namespace hal { /*********************************************************************...
cpp
github
https://github.com/opencv/opencv
modules/core/src/matrix_decomp.cpp
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import tem...
unknown
codeparrot/codeparrot-clean
""" Utility functions for transcripts. ++++++++++++++++++++++++++++++++++ """ import os import copy import json import requests import logging from pysrt import SubRipTime, SubRipItem, SubRipFile from lxml import etree from HTMLParser import HTMLParser from xmodule.exceptions import NotFoundError from xmodule.contents...
unknown
codeparrot/codeparrot-clean
""" test feather-format compat """ import pytest feather = pytest.importorskip('feather') import numpy as np import pandas as pd from pandas.io.feather_format import to_feather, read_feather from feather import FeatherError from pandas.util.testing import assert_frame_equal, ensure_clean import pandas.util.testing a...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # (C) Copyright IBM Corporation 2004, 2005 # All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # ...
unknown
codeparrot/codeparrot-clean
// RUN: %check_clang_tidy %s bugprone-signal-handler %t \ // RUN: -config='{CheckOptions: \ // RUN: {bugprone-signal-handler.AsyncSafeFunctionSet: "minimal"}}' \ // RUN: -- -isystem %clang_tidy_headers #include "signal.h" #include "stdlib.h" #include "string.h" #include "unistd.h" void handler_bad1(int) { _exit(0)...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-tidy/checkers/bugprone/signal-handler-minimal.c
/* 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/framework/type_traits.h
############################################################################### # # Oak game engine # Copyright (c) 2013 Remi Papillie # # 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...
unknown
codeparrot/codeparrot-clean
from django.conf import settings from django.contrib.gis.gdal import OGRException from django.contrib.gis.geos import GEOSGeometry, GEOSException from django.forms.widgets import Textarea from django.template import loader, Context from django.utils import translation # Creating a template context that contains Django...
unknown
codeparrot/codeparrot-clean
import { test } from '../../assert'; const tick = () => Promise.resolve(); export default test({ async test({ assert, target }) { target.innerHTML = '<custom-element></custom-element>'; await tick(); const el = target.querySelector('custom-element'); assert.equal(el.shadowRoot, null); } });
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-browser/custom-elements-samples/closed-shadow-dom/_config.js
from __future__ import with_statement from setuptools import setup def get_version(): with open('itunesiap/version.txt') as f: return f.read().strip() def get_readme(): try: with open('README.rst') as f: return f.read().strip() except IOError: return '' setup( nam...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012 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. import time from appengine_wrappers import taskqueue from cron_servlet import CronServlet from instance_servlet import InstanceServlet from patch_servle...
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/lib/gtl/int_type.h
from __future__ import unicode_literals import warnings from bisect import bisect from collections import OrderedDict, defaultdict from itertools import chain from django.apps import apps from django.conf import settings from django.core.exceptions import FieldDoesNotExist from django.db.models.fields import AutoFiel...
unknown
codeparrot/codeparrot-clean
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2020 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + impo...
unknown
codeparrot/codeparrot-clean
import unittest from importlib import import_module, resources from . import util class CommonBinaryTests(util.CommonTests, unittest.TestCase): def execute(self, package, path): resources.files(package).joinpath(path).read_bytes() class CommonTextTests(util.CommonTests, unittest.TestCase): def execu...
python
github
https://github.com/python/cpython
Lib/test/test_importlib/resources/test_read.py
# Running CockroachDB across multiple Kubernetes clusters (GKE) The script and configuration files in this directory enable deploying CockroachDB across multiple Kubernetes clusters that are spread across different geographic regions and hosted on [GKE](https://cloud.google.com/kubernetes-engine). It deploys a Cockroa...
unknown
github
https://github.com/cockroachdb/cockroach
cloud/kubernetes/multiregion/README.md
name: Coverage Windows on: pull_request: types: [opened, synchronize, reopened, ready_for_review] paths: - lib/**/*.js - vcbuild.bat - src/**/*.cc - src/**/*.h - test/** - tools/gyp/** - tools/test.py - .github/workflows/coverage-windows.yml - codecov.yml...
unknown
github
https://github.com/nodejs/node
.github/workflows/coverage-windows.yml
from rest_framework import serializers from selectable.forms.widgets import AutoCompleteSelectWidget, AutoCompleteSelectMultipleWidget from costs.models import RVU, OrderSet from costs.lookups import RVULookup from myuser.models import FavoriteRVU, TestPerformed class RVUSerializer(serializers.ModelSerializer): "...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 """ Send metrics to a [graphite](http://graphite.wikidot.com/) using the high performace pickle interface. Graphite is an enterprise-scale monitoring tool that runs well on cheap hardware. It was originally designed and written by Chris Davis at Orbitz in 2006 as side project that ultimately grew to be...
unknown
codeparrot/codeparrot-clean
import wpilib from common.distance_sensors import SharpIR2Y0A02, SharpIRGP2Y0A41SK0F, CombinedSensor from networktables import NetworkTable class Sensor: def __init__(self, tote_motor, can_motor): self.sd = NetworkTable.getTable('SmartDashboard') self.toteLimitLSensor = wpilib.DigitalInput(0) ##...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2019 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Documented; import java.lang.annotat...
java
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/DoNotMock.java
# -*- coding: utf-8 -*- """ babel.lists ~~~~~~~~~~~ Locale dependent formatting of lists. The default locale for the functions in this module is determined by the following environment variables, in that order: * ``LC_ALL``, and * ``LANG`` :copyright: (c) 2015 by the Babel Team. ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/lifecycle/DockerComposeProperties.java
#!/usr/bin/python # Author: Zion Orent <zorent@ics.com> # Copyright (c) 2015 Intel Corporation. # # 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 limi...
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/grappler/graph_topology_view.h
<!--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/ja/model_doc/altclip.md
// run // Copyright 2020 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. // Issue 38515: failed to mark the method wrapper // reflect.Type.Method itself as REFLECTMETHOD. package main import "reflect" var called bool type...
go
github
https://github.com/golang/go
test/reflectmethod5.go
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import sys import ctypes from ctypes import windll, wintypes, POINTER, Structure, c_void_p, c_char_p from ctypes.wintypes import DWORD from .._ffi import FFIEngineError from .._types import str_cls from ..errors import...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 OpenStack Foundation # # 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...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Controls command line operations The only particularly relevant command now i: patella startup <path> not all commands retain functionality - this will be updated eventually (read: it might not be) """ # \/ Third-Party Packages \/ import os import os.path import click import pandas as ...
unknown
codeparrot/codeparrot-clean
#include <ATen/native/vulkan/ops/Factory.h> #include <torch/library.h> namespace at { namespace native { namespace vulkan { namespace ops { Tensor _empty_affine_quantized( const IntArrayRef sizes, const std::optional<ScalarType> dtype, const std::optional<c10::Layout> layout, const std::optional<Devic...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/vulkan/ops/Factory.cpp
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
unknown
codeparrot/codeparrot-clean
'use strict'; import {VERSION} from '../env/data.js'; import AxiosError from '../core/AxiosError.js'; const validators = {}; // eslint-disable-next-line func-names ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { validators[type] = function validator(thing) { return typeof...
javascript
github
https://github.com/axios/axios
lib/helpers/validator.js
/* * 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
benchmarks/src/main/java/org/elasticsearch/benchmark/script/ScriptScoreBenchmark.java
import random from operator import attrgetter import pytest from wrapanapi import VmState from cfme import test_requirements from cfme.cloud.provider.azure import AzureProvider from cfme.cloud.provider.ec2 import EC2Provider from cfme.cloud.provider.gce import GCEProvider from cfme.cloud.provider.openstack import Ope...
unknown
codeparrot/codeparrot-clean
#ifndef NPY_HWY #error "This is not a standalone header. Include simd.hpp instead." #define NPY_HWY 1 // Prevent editors from graying out the happy branch #endif // Using anonymous namespace instead of inline to ensure each translation unit // gets its own copy of constants based on local compilation flags namespace ...
unknown
github
https://github.com/numpy/numpy
numpy/_core/src/common/simd/simd.inc.hpp
#!/usr/bin/env python from __future__ import absolute_import, print_function, division from future.utils import with_metaclass import abc from opsimsummary import Tiling, HealpixTiles from analyzeSN import LightCurve from .universe import Universe from .paramDistribution import SimpleSALTDist import os import numpy as...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: UTF-8 -*- ####################################################### # This script wraps simple timeseries analysis tools # and access to the Gnip Search API into a simple tool # to help the analysis quickly iterate on filters # a and understand time series trend and events. # # If you ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from __future__ import print_function import os, sys, json from common_paths import * import spec_validator import argparse def expand_test_expansion_pattern(spec_test_expansion, test_expansion_schema): expansion = {} for artifact in spec_test_expansion: artifact_value = spec_te...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package ldap import ( "context" "encoding/json" "fmt" "net" "net/http" "os" "strings" "testing" "github.com/hashicorp/vault/api" ) // testHTTPServer creates a test HTTP server that handles requests until // the listener returned is close...
go
github
https://github.com/hashicorp/vault
api/auth/ldap/ldap_test.go