code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
// Copyright 2015 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package gossip import ( "context" "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/util/log" "github.com/cockroachdb/cockroach/...
go
github
https://github.com/cockroachdb/cockroach
pkg/gossip/node_set.go
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package api import ( "context" "errors" "fmt" "net/http" "github.com/mitchellh/mapstructure" ) func (c *Sys) AuditHash(path string, input string) (string, error) { return c.AuditHashWithContext(context.Background(), path, input) } func (c ...
go
github
https://github.com/hashicorp/vault
api/sys_audit.go
--- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-size-usage.html --- # Using the _size field [mapper-size-usage] In order to enable the `_size` field, set the mapping as follows: ```console PUT my-index-000001 { "mappings": { "_size": { "enabled": true } } ...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch-plugins/mapper-size-usage.md
#include <c10/core/impl/DeviceGuardImplInterface.h> namespace at::detail { C10_REGISTER_GUARD_IMPL(CPU, c10::impl::NoOpDeviceGuardImpl<DeviceType::CPU>) } // namespace at::detail
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/detail/CPUGuardImpl.cpp
"""Redo the `...` (representation) but with limits on most sizes.""" __all__ = ["Repr","repr"] import __builtin__ from itertools import islice class Repr: def __init__(self): self.maxlevel = 6 self.maxtuple = 6 self.maxlist = 6 self.maxarray = 5 self.maxdict = 4 s...
unknown
codeparrot/codeparrot-clean
"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017""" import os import string import binascii import ldap3 from django.conf import settings from config.settings import base def generate_random_b64(length): """ Generate a random string encoded with base 64 """ ...
unknown
codeparrot/codeparrot-clean
#include <ATen/native/vulkan/ops/Common.h> #include <ATen/native/vulkan/ops/Utils.h> #include <torch/library.h> namespace at { namespace native { namespace vulkan { namespace ops { namespace { using namespace api::utils; void set_softmax_kernel_params( const long long num_dims, const long long softmax_dim, ...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/vulkan/ops/Softmax.cpp
# # 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...
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 applica...
unknown
codeparrot/codeparrot-clean
""" Unit test for stub YouTube implementation. """ import unittest import requests from ..youtube import StubYouTubeService class StubYouTubeServiceTest(unittest.TestCase): def setUp(self): super(StubYouTubeServiceTest, self).setUp() self.server = StubYouTubeService() self.url = "http://1...
unknown
codeparrot/codeparrot-clean
""" SQLAlchemy-Qubit test suite. """ import unittest import tempfile # turn of warnings we don't care about import warnings from sqlalchemy import func, exc as sa_exc from sqlaqubit import models, keys, load_test_sql, create_engine, init_models class InformationObjectTest(unittest.TestCase): def setUp(self): ...
unknown
codeparrot/codeparrot-clean
--- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-annotated-text-usage.html --- # Using the annotated-text field [mapper-annotated-text-usage] The `annotated-text` tokenizes text content as per the more common [`text`](/reference/elasticsearch/mapping-reference/text.md) field ...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch-plugins/mapper-annotated-text-usage.md
from __future__ import absolute_import, division, unicode_literals import itertools import re import warnings from difflib import unified_diff import pytest from .support import TestData, convert, convertExpected, treeTypes from html5lib import html5parser, constants, treewalkers from html5lib.filters.lint import Fi...
unknown
codeparrot/codeparrot-clean
# TRAINFILE / TESTFILE are the names of the official train and test datasets TRAINFILE = 'data/train.csv' TESTFILE = 'data/test.csv' # GEODATA is the name of the csv file containing mined Geodata indexed by issue ID GEODATA = 'data/geodata.csv' # USE_BRYANS_DATA is a boolean, if True then use Bryan's updated dataset ...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the MIT License; you may not use this file except in compliance with the License. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CON...
unknown
github
https://github.com/huggingface/transformers
docs/source/en/model_doc/superpoint.md
import { test } from '../../assert'; const tick = () => Promise.resolve(); export default test({ async test({ assert, target }) { target.innerHTML = '<custom-element></custom-element>'; /** @type {any} */ const el = target.querySelector('custom-element'); /** @type {string} */ let html = ''; const handle...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-browser/custom-elements-samples/host-rune-access-injected-css/_config.js
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import errno import ...
unknown
codeparrot/codeparrot-clean
import random from django.db import models from django.contrib.auth.models import User from django.conf import settings from django.contrib.sites.models import Site from django.utils.hashcompat import sha_constructor INVITATION_ALLOTMENT = getattr(settings, 'INVITATION_ALLOTMENT', 5) INVITATION_STATUS_SENT = 0 INVIT...
unknown
codeparrot/codeparrot-clean
<p class="foo svelte-xyz">foo</p> <p class="bar svelte-xyz">bar <span class="svelte-xyz">baz</span></p> <span class="svelte-xyz">buzz</span>
html
github
https://github.com/sveltejs/svelte
packages/svelte/tests/css/samples/not-selector-global/expected.html
import json from unittest import TestCase from corehq.apps.es.es_query import HQESQuery class TestQueries(TestCase): def assertHasQuery(self, es_query, desired_query): generated = es_query.raw_query['query']['filtered']['query'] msg = "Expected to find query\n{}\nInstead found\n{}".format( ...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import import os import shutil import subprocess import uuid from django.conf import settings from celery import shared_task from youtubeadl.apps.downloader.models import Video, ActivityLog from youtubeadl.apps.downloader.utils import create_filename, get_video_info @shared_task def...
unknown
codeparrot/codeparrot-clean
# ========================================================================= # Copyright 2012-present Yunify, Inc. # ------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this work except in compliance with the Licens...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: mcxiaoke # @Date: 2015-08-10 21:25:48 from __future__ import print_function import sys import os from Tkinter import * class ScrolledText(Frame): def __init__(self, parent=None, text='', file=None): Frame.__init__(self, parent) # 自动扩展空间 ...
unknown
codeparrot/codeparrot-clean
## Input ```javascript // @validateNoSetStateInEffects @enableVerboseNoSetStateInEffect import {useState, useEffect} from 'react'; const externalStore = { value: 0, subscribe(callback) { return () => {}; }, getValue() { return this.value; }, }; function ExternalDataComponent() { const [, forceUpd...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/invalid-set-state-in-effect-verbose-force-update.expect.md
#!/usr/bin/env python3 # -*- Coding: UTF-8 -*- # --------------------------------------------------------------------------- # Open Asset Import Library (ASSIMP) # --------------------------------------------------------------------------- # # Copyright (c) 2006-2010, ASSIMP Development Team # # All rights reserved. #...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
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-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnWarDeployment.java
'use strict'; const util = require('util'); const common = require('../common.js'); const bench = common.createBenchmark(main, { n: [1e5], showProxy: [0, 1], isProxy: [0, 1], }); function main({ n, showProxy, isProxy }) { let proxyA = {}; let proxyB = () => {}; if (isProxy) { proxyA = new Proxy(proxy...
javascript
github
https://github.com/nodejs/node
benchmark/util/inspect-proxy.js
/*------------------------------------------------------------------------- * * visibilitymap.c * bitmap for tracking visibility of heap tuples * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION...
c
github
https://github.com/postgres/postgres
src/backend/access/heap/visibilitymap.c
# -*- test-case-name: twisted.python.test.test_win32 -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Win32 utilities. See also twisted.python.shortcut. @var O_BINARY: the 'binary' mode flag on Windows, or 0 on other platforms, so it may safely be OR'ed into a mask for os.open. """...
unknown
codeparrot/codeparrot-clean
"""Utility to compare (NumPy) version strings. The NumpyVersion class allows properly comparing numpy version strings. The LooseVersion and StrictVersion classes that distutils provides don't work; they don't recognize anything like alpha/beta/rc/dev versions. """ from __future__ import division, absolute_import, pri...
unknown
codeparrot/codeparrot-clean
const {throwInput} = require('shared-runtime'); function Component(props) { try { const y = []; y.push(props.y); throwInput(y); } catch (e) { e.push(props.e); return e; } return null; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: [{y: 'foo', e: 'bar'}], };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/try-catch-try-value-modified-in-catch.js
# -*- coding: utf-8 -*- # # 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
# Copyright 2013 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 req...
unknown
codeparrot/codeparrot-clean
use pin_project_lite::pin_project; use std::io::{IoSlice, Result}; use std::pin::Pin; use std::task::{ready, Context, Poll}; use tokio::io::{AsyncRead, AsyncWrite, ReadBuf}; pin_project! { /// An adapter that lets you inspect the data that's being read. /// /// This is useful for things like hashing data ...
rust
github
https://github.com/tokio-rs/tokio
tokio-util/src/io/inspect.rs
from __future__ import unicode_literals from django.contrib.admin import ModelAdmin, TabularInline from django.contrib.admin.helpers import InlineAdminForm from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.auth.models import Permission, User from django.contrib.contenttypes.models import...
unknown
codeparrot/codeparrot-clean
# # Copyright (C) 2011 Red Hat, Inc. # Copyright (C) 2011 Cole Robinson <crobinso@redhat.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your opt...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # simpleserver.py # # Acts as a simple server for coupling two golden cheetah peers together # usage: ./simpleserver.py listen_port # # Copyright (c) 2009 Steve Gribble (gribble [at] cs.washington.edu) and # Mark Liversedge (liversedge@gmail.com) # # This program is free softw...
unknown
codeparrot/codeparrot-clean
import os from django.conf import settings from django.contrib.staticfiles import finders, storage from django.core.exceptions import ImproperlyConfigured from django.test import SimpleTestCase, override_settings from .cases import StaticFilesTestCase from .settings import TEST_ROOT class TestFinders: """ Ba...
python
github
https://github.com/django/django
tests/staticfiles_tests/test_finders.py
<?php namespace Illuminate\Tests\Database; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\RelationNotFoundException; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\R...
php
github
https://github.com/laravel/framework
tests/Database/DatabaseEloquentInverseRelationTest.php
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2015 Dag Wieers <dag@wieers.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #ifndef _NGX_SOLARIS_H_INCLUDED_ #define _NGX_SOLARIS_H_INCLUDED_ ngx_chain_t *ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit); #endif /* _NGX_SOLARIS_H_INCLUDED_ */
c
github
https://github.com/nginx/nginx
src/os/unix/ngx_solaris.h
name: Comment on issues and PRs when labeled on: issues: types: [labeled] pull_request_target: types: [labeled] env: STALE_MESSAGE: > This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain o...
unknown
github
https://github.com/nodejs/node
.github/workflows/comment-labeled.yml
- name: add two ints set_fact: integer_sum: "{{ i_one + i_two }}" - assert: that: - 'integer_sum == 3' - integer_sum|type_debug == "int" - name: add casted string and int set_fact: integer_sum2: "{{ s_one|int + i_two }}" - assert: that: - 'integer_sum2 == 3' - name: c...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/jinja2_native_types/test_concatentation.yml
from __future__ import unicode_literals import sys import unittest from contextlib import contextmanager from django.test import LiveServerTestCase, tag from django.utils.module_loading import import_string from django.utils.six import with_metaclass from django.utils.text import capfirst class SeleniumTestCaseBase(...
unknown
codeparrot/codeparrot-clean
""" Template tags and helper functions for displaying breadcrumbs in page titles based on the current micro site. """ from django import template from django.conf import settings from microsite_configuration import microsite from django.templatetags.static import static from django.contrib.staticfiles.storage import st...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations import os from typing import Any, cast import pytest import pydantic from openai import OpenAI, AsyncOpenAI from tests.utils import assert_matches_type from openai.pagination import SyncCursorPag...
python
github
https://github.com/openai/openai-python
tests/api_resources/chat/test_completions.py
name: Commit Access Review on: workflow_dispatch: schedule: # * is a special character in YAML so you have to quote this string - cron: '0 7 1 * *' permissions: contents: read issues: write jobs: commit-access-review: if: github.repository_owner == 'llvm' environment: main-branch-only ...
unknown
github
https://github.com/llvm/llvm-project
.github/workflows/commit-access-review.yml
# (c) 2019, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' unit test template for ONTAP Ansible module ''' from __future__ import print_function import json import pytest from units.compat import unittest from units.compat.mock import patch, Mock from ans...
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.descriptors.types import org.jetbrains.kotlin.analysis.api.KaExperi...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/types/KaFe10CapturedType.kt
import sys import numpy as np import gpof from gpof.strategies import GradientDescentConfig from gpof.strategies import Runner from gpof.runset import RunSet from gpof.strategies import RV # For each given FAST9 detection, look for the pareto front for the two objectives : # computational time and percentage of error...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # Copyright 2021 The Uncertainty Baselines 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 ap...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2012 Apple. 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, this list of conditions and the follo...
unknown
codeparrot/codeparrot-clean
""" Blits: Created on 23 May 2017 Original Blivion: Created on Tue Oct 25 13:11:32 2016 @author: Maria Schilstra """ #from PyQt5.uic import loadUiType from PyQt5 import QtCore as qt from PyQt5 import QtWidgets as widgets from PyQt5 import QtGui as gui import pandas as pd, numpy as np, copy as cp from blitspak.blit...
unknown
codeparrot/codeparrot-clean
# Copyright 2010-2011 OpenStack Foundation # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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/licens...
unknown
codeparrot/codeparrot-clean
""" Tests related to the Microsites feature """ from django.conf import settings from django.core.urlresolvers import reverse from django.test.utils import override_settings from nose.plugins.attrib import attr from courseware.tests.helpers import LoginEnrollmentTestCase from course_modes.models import CourseMode from...
unknown
codeparrot/codeparrot-clean
from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from admin_tools.menu import items, Menu # to activate your custom menu add the following to your settings.py: # # ADMIN_TOOLS_MENU = 'test_proj.menu.CustomMenu' class CustomMenu(Menu): """ Custom Menu for tes...
unknown
codeparrot/codeparrot-clean
# Skip hydration flag is applied to an invalid node This error occurs when the `ngSkipHydration` attribute was added to an inappropriate DOM node. The `ngSkipHydration` attribute can only be applied to component host nodes either directly in the template or via a host binding. It cannot be applied to other DOM nodes a...
unknown
github
https://github.com/angular/angular
adev/src/content/reference/errors/NG0504.md
#!/usr/bin/python # Copyright: (c) 2018, Pluribus Networks # 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': ['p...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from lib import ok import rospy from riptide_msgs.msg import AcousticsCommand fpga = None def commandCB(command): if not fpga.IsOpen(): rospy.logerr("Housing not connected") return # Reset FIFOs fpga.SetWireInValue(0x00, 0x0004) fpga.UpdateWireIns() fpga.SetWireInValue(0x00, 0x0000) ...
unknown
codeparrot/codeparrot-clean
// Copyright 2017 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/auth/jwt.go
__all__ = [ 'LXMLTreeBuilderForXML', 'LXMLTreeBuilder', ] from StringIO import StringIO import collections from lxml import etree from bs4.element import Comment, Doctype, NamespacedAttribute from bs4.builder import ( FAST, HTML, HTMLTreeBuilder, PERMISSIVE, TreeBuilder, XML) from b...
unknown
codeparrot/codeparrot-clean
/* Copyright 2020 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/controller/endpointslicemirroring/utils_test.go
use std::fmt::Write; use hir::def_id::DefId; use hir::{HirId, ItemKind}; use rustc_ast::join_path_idents; use rustc_errors::Applicability; use rustc_hir as hir; use rustc_lint::{ARRAY_INTO_ITER, BOXED_SLICE_INTO_ITER}; use rustc_middle::span_bug; use rustc_middle::ty::{self, Ty}; use rustc_session::lint::builtin::{RUS...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_hir_typeck/src/method/prelude_edition_lints.rs
#!/usr/bin/env python # Fill in checksum/size of an option rom, and pad it to proper length. # # Copyright (C) 2009 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. import sys def alignpos(pos, alignbytes): mask = alignbytes - 1 return (pos + mask...
unknown
codeparrot/codeparrot-clean
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
unknown
codeparrot/codeparrot-clean
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 University of Dundee & Open Microscopy Environment. # All rights reserved. # # 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;...
unknown
codeparrot/codeparrot-clean
from __future__ import annotations from builtins import type as type_t # pyright: ignore[reportUnusedImport] from collections.abc import ( Callable, Hashable, Iterator, Mapping, MutableMapping, Sequence, ) from datetime import ( date, datetime, timedelta, tzinfo, ) from os impo...
python
github
https://github.com/pandas-dev/pandas
pandas/_typing.py
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\PhpUnit\Tests; use PHPUnit\Framework\TestCase; use Symfo...
php
github
https://github.com/symfony/symfony
src/Symfony/Bridge/PhpUnit/Tests/DnsMockTest.php
""" API v0 views. """ import logging from ecommerce_api_client import exceptions from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from rest_framework.authentication import SessionAuthentication from rest_framework.permissions import IsAuthenticated from rest_framework.status import HT...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # pylint: disable-msg=E1101,W0612 import pytest from datetime import datetime, timedelta from numpy import nan import numpy as np import pandas as pd import pandas._libs.index as _index from pandas.core.dtypes.common import is_integer, is_scalar from pandas import (Index, Series, DataFrame, isnull, ...
unknown
codeparrot/codeparrot-clean
# # THIS IS WORK IN PROGRESS # # The Python Imaging Library. # $Id$ # # FlashPix support for PIL # # History: # 97-01-25 fl Created (reads uncompressed RGB images only) # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1997. # # See the README file for information on usage and redistribution. # fr...
unknown
codeparrot/codeparrot-clean
''' Tests for client/shell/updates_manager_test.py ''' import unittest from biicode.client.shell.updates_manager import (UpdatesManager, UpdatesStore, UpdateInfo) from biicode.common.test.bii_test_case import BiiTestCase from mock import Mock from biicode.common.model.server_info import ServerInfo, ClientVersion im...
unknown
codeparrot/codeparrot-clean
# This package will contain the spiders of your Scrapy project # # Please refer to the documentation for information on how to create and manage # your spiders.
python
github
https://github.com/scrapy/scrapy
scrapy/templates/project/module/spiders/__init__.py
# -*- coding: utf-8 -*- """ flask.testsuite.regression ~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests regressions. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import gc import sys import flask import threading import unittest f...
unknown
codeparrot/codeparrot-clean
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Simon Montagu # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk> # # 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, eith...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # 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. """Miscellaneous node types. """ import os.path import re import sys from grit import constants from grit import exception from g...
unknown
codeparrot/codeparrot-clean
from rest_framework.views import APIView from rest_framework import status from rest_framework.response import Response from .settings import api_settings from .compat import get_request_data from .serializers import ( JSONWebTokenSerializer, RefreshJSONWebTokenSerializer, VerifyJSONWebTokenSerializer ) jwt_r...
unknown
codeparrot/codeparrot-clean
# Copyright 2023 The HuggingFace Inc. team. # # 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 ...
python
github
https://github.com/huggingface/transformers
src/transformers/models/detr/convert_detr_to_pytorch.py
This directory contains updated benchmarks as of 2022-12-16. They were captured via the benchsuite script at `benchsuite/benchsuite` from the root of this repository. The command that was run: $ ./benchsuite \ --dir /dev/shm/benchsuite \ --raw runs/2022-12-16-archlinux-duff/raw.csv \ ...
unknown
github
https://github.com/BurntSushi/ripgrep
benchsuite/runs/2022-12-16-archlinux-duff/README.md
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const makeSerializable = require("../util/makeSerializable"); const ContextDependency = require("./ContextDependency"); const ContextDependencyTemplateAsRequireCall = require("./ContextDependencyTemplateA...
javascript
github
https://github.com/webpack/webpack
lib/dependencies/CommonJsRequireContextDependency.js
from __future__ import absolute_import import six from sentry.coreapi import APIUnauthorized from sentry.mediators import Mediator, Param, external_requests from sentry.models import PlatformExternalIssue from sentry.utils.cache import memoize from sentry.utils.html import escape class IssueLinkCreator(Mediator): ...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Tests\Log; use Illuminate\Log\Logger; use Illuminate\Log\LogManager; use Monolog\Formatter\HtmlFormatter; use Monolog\Formatter\LineFormatter; use Monolog\Formatter\NormalizerFormatter; use Monolog\Handler\FingersCrossedHandler; use Monolog\Handler\LogEntriesHandler; use Monolog\Handler\New...
php
github
https://github.com/laravel/framework
tests/Log/LogManagerTest.php
// 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. // Random number generation package runtime import ( "internal/byteorder" "internal/chacha8rand" "internal/goarch" "math/bits" "unsafe" _ "unsafe" // fo...
go
github
https://github.com/golang/go
src/runtime/rand.go
from optparse import make_option import os import re import sys import socket from django.core.management.base import BaseCommand, CommandError from django.core.handlers.wsgi import WSGIHandler from django.core.servers.basehttp import AdminMediaHandler, run, WSGIServerException from django.utils import autoreload nai...
unknown
codeparrot/codeparrot-clean
"""Check specific required program versions required during the pipeline. """ from distutils.version import LooseVersion import subprocess from bcbio.pipeline import config_utils from bcbio.log import logger def samtools(config, items): """Ensure samtools has parallel processing required for piped analysis. "...
unknown
codeparrot/codeparrot-clean
/*-------------------------------------------------------------------- * Licensed to PSF under a Contributor Agreement. * See https://www.python.org/psf/license for licensing details. * * _elementtree - C accelerator for xml.etree.ElementTree * Copyright (c) 1999-2009 by Secret Labs AB. All rights reserved. * Co...
c
github
https://github.com/python/cpython
Modules/_elementtree.c
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT use crate::{ command, plugin::{Builder, TauriPlugin}, Manager, Runtime, Webview, }; use super::ResourceId; #[command(root = "crate")] fn close<R: Runtime>(webview: Webvie...
rust
github
https://github.com/tauri-apps/tauri
crates/tauri/src/resources/plugin.rs
# -*- coding: utf-8 -*- from gitdh import git, module from collections import Mapping from configparser import ConfigParser import os.path class Config(ConfigParser): @staticmethod def fromPath(path): if os.path.isfile(path): return Config.fromFilePath(path) elif os.path.isdir(path): return Config.fromGi...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013 Jesse Keating <jesse.keating@rackspace.com> # 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/LIC...
unknown
codeparrot/codeparrot-clean
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
unknown
codeparrot/codeparrot-clean
"""Event loop using a proactor and related classes. A proactor is a "notify-on-completion" multiplexer. Currently a proactor is only implemented on Windows with IOCP. """ __all__ = 'BaseProactorEventLoop', import io import os import socket import warnings import signal import threading import collections from . im...
python
github
https://github.com/python/cpython
Lib/asyncio/proactor_events.py
// Copyright 2012 Google Inc. All Rights Reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the COPYING file in the root of the source // tree. An additional intellectual property rights grant can be found // in the file PATENTS. All contributing project authors may // be...
c
github
https://github.com/opencv/opencv
3rdparty/libwebp/src/enc/histogram_enc.h
# # templatetags/kwacros.py - Support for macros in Django templates # # Based on snippet by # Author: Michal Ludvig <michal@logix.cz> # http://www.logix.cz/michal # # modified for args and kwargs by Skylar Saveland http://skyl.org # """ Usage example: 0) Save this file as <yourapp>/templatetags/kwacros.py ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, Mischa Peters <mpeters@a10networks.com> # Copyright: (c) 2016, Eric Chou <ericc@a10networks.com> # 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_functio...
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...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestArrayFile.java
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot/src/main/java/org/springframework/boot/context/ContextIdApplicationContextInitializer.java
use crate::spec::{ Arch, Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy, RelocModel, SanitizerSet, Target, TargetMetadata, TargetOptions, }; pub(crate) fn target() -> Target { Target { data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), metadata: TargetMetadata { d...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/targets/riscv64gc_unknown_none_elf.rs