code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
import xml.etree.ElementTree as ET from xml.dom import minidom # # Autoconfig class for archive XML files. # class CAFile: def __init__(self, filename = None): if filename is not None: self.openFile(filename); def openFile(self, filename): """Open archiver XML file""" self._tree = ET.parse(filena...
unknown
codeparrot/codeparrot-clean
// Copyright The Prometheus 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 ...
go
github
https://github.com/prometheus/prometheus
web/api/v1/json_codec.go
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
unknown
codeparrot/codeparrot-clean
import zlib import io from socket import timeout as SocketTimeout from ._collections import HTTPHeaderDict from .exceptions import ProtocolError, DecodeError, ReadTimeoutError from .packages.six import string_types as basestring, binary_type from .connection import HTTPException, BaseSSLError from .util.response impor...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # 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 3 of the Licens...
unknown
codeparrot/codeparrot-clean
# simple python script to collect text paragraphs from various languages on the # same topic namely the Wikipedia encyclopedia itself import os try: # Python 2 compat from urllib2 import Request, build_opener except ImportError: # Python 3 from urllib.request import Request, build_opener import lxml.h...
unknown
codeparrot/codeparrot-clean
import base64 import os import shutil import string import sys import tempfile import unittest from datetime import timedelta from django.conf import settings from django.contrib.sessions.backends.cache import SessionStore as CacheSession from django.contrib.sessions.backends.cached_db import \ SessionStore as Cac...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.request import io.ktor.http.* import io.ktor.http.content.* import io.ktor.utils.io.* @Suppress("KDocMissingDocumentation", "DEPRECATION") @InternalAPI public abstract c...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-core/common/src/io/ktor/client/request/ClientUpgradeContent.kt
/* * 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-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/lifecycle/TestcontainersParallelStartupIntegrationTests.java
#define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> #include <structmember.h> #include "numpy/arrayobject.h" #include "lowlevel_strided_loops.h" #include "dtypemeta.h" #include "npy_config.h" #include "common.h" #include "number.h" #include "calculat...
c
github
https://github.com/numpy/numpy
numpy/_core/src/multiarray/calculation.c
"""Tests for 'site'. Tests assume the initial paths in sys.path once the interpreter has begun executing have not been removed. """ import unittest import test.support from test import support from test.support.script_helper import assert_python_ok from test.support import import_helper from test.support import os_he...
python
github
https://github.com/python/cpython
Lib/test/test_site.py
# frozen_string_literal: false create_makefile("-test-/bug_5832")
ruby
github
https://github.com/ruby/ruby
ext/-test-/bug-5832/extconf.rb
# -*- coding: utf-8 -*- # Copyright 2014-17 Eficent Business and IT Consulting Services S.L. # Copyright 2016 Matmoz d.o.o. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import models class Product(models.Model): _inherit = "product.product" def _get_domain_locations(self): ...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * pg_type.h * definition of the "type" system catalog (pg_type) * * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/cata...
c
github
https://github.com/postgres/postgres
src/include/catalog/pg_type.h
# # 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
alerting: alert_relabel_configs: -
unknown
github
https://github.com/prometheus/prometheus
config/testdata/empty_alert_relabel_config.bad.yml
# Copyright 2008 (C) Nicira, Inc. # # This file is part of NOX. # # NOX 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. # # NOX is dist...
unknown
codeparrot/codeparrot-clean
import urllib2 from mmap import mmap,ACCESS_READ import os from xlrd import open_workbook import csv from .models import Program_Code, Bureau_Code def program_code_import(filename): workbook = open_workbook(filename) sheet = workbook.sheet_by_index(0) for row in range(sheet.nrows): program = [] ...
unknown
codeparrot/codeparrot-clean
# Copyright: Contributors to the Ansible project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import os from ansible.module_utils.facts.virtual.base import Virtual, VirtualCollector class SunOSVirtual(Virtual): """ This is a ...
python
github
https://github.com/ansible/ansible
lib/ansible/module_utils/facts/virtual/sunos.py
#-*- coding: ISO-8859-1 -*- # pysqlite2/test/regression.py: pysqlite regression tests # # Copyright (C) 2006-2007 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any dama...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, absolute_import, print_function import sys import click import cProfile import pstats import frappe import frappe.utils import subprocess # nosec from functools import wraps f...
unknown
codeparrot/codeparrot-clean
import os import json import tempfile from celery import current_task from ftp_deploy.conf import * from ftp_deploy.models import Log, Task from .core import LockError from .repo import commits_parser, repository_parser from .ftp import ftp_connection from .email import notification_success, notification_fail from .c...
unknown
codeparrot/codeparrot-clean
""" Signal handling functions for use with external commerce service. """ import logging from crum import get_current_request from django.contrib.auth.models import AnonymousUser from django.dispatch import receiver from openedx.core.djangoapps.commerce.utils import is_commerce_service_configured from student.signal...
unknown
codeparrot/codeparrot-clean
from django.contrib.auth.models import User from django.utils.translation import ugettext as _ from rest_framework import status from rest_framework.viewsets import ModelViewSet from rest_framework.decorators import action from rest_framework.response import Response from onadata.apps.api.models.organization_profile ...
unknown
codeparrot/codeparrot-clean
"""A high-speed, production ready, thread pooled, generic HTTP server. Simplest example on how to use this module directly (without using CherryPy's application machinery):: from cherrypy import wsgiserver def my_crazy_app(environ, start_response): status = '200 OK' response_headers = [('Cont...
unknown
codeparrot/codeparrot-clean
# تحميل نماذج مدربة مسبقًا باستخدام AutoClass لم ترغب في إنشاء محول معماري لمؤشر الترابط الخاص بك، فهناك العديد من محولات المعمارية المختلفة التي يمكنك الاختيار من بينها. كجزء من الفلسفة الأساسية لـ 🤗 Transformers لجعل المكتبة سهلة وبسيطة ومرنة، فإن فئة `AutoClass` تستدل تلقائيًا وتحمّل البنية الصحيحة من نسخة نموذج (M...
unknown
github
https://github.com/huggingface/transformers
docs/source/ar/autoclass_tutorial.md
// Copyright 2016 Klemens Morgenstern // Copyright Antony Polukhin, 2019-2024 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_DLL_SMART_LIBRARY_HPP_ #define BOOST_DLL_SMART_LIBRARY_HPP_ /// \...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/dll/smart_library.hpp
/* Copyright 2023 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/controlplane/apiserver/options/options.go
/* * Copyright (C) 2011 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
java
github
https://github.com/google/guava
guava/src/com/google/common/collect/RangeSet.java
import argparse import ast import os import sys from collections import OrderedDict from distutils.spawn import find_executable import config import wpttest import formatters def abs_path(path): return os.path.abspath(os.path.expanduser(path)) def url_or_path(path): import urlparse parsed = urlparse.url...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): # Flag to indicate if this migration is too risky # to run online and needs to be coordinated for offline i...
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.platform.statistics import com.intellij.openapi.components.serviceO...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-platform-interface/src/org/jetbrains/kotlin/analysis/api/platform/statistics/KaStatisticsService.kt
# -*- coding: utf-8 -*- """ pygments.lexers.diff ~~~~~~~~~~~~~~~~~~~~ Lexers for diff/patch formats. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, bygroups from pygments.tok...
unknown
codeparrot/codeparrot-clean
#!/bin/python import sqlite3 import sys class Table(object): ''' Base class for tables within a DB ''' def __init__(self, db_name, table_name): '''Assign attributes from kwargs''' if db_name is not None: setattr(self, db, db_name) else: raise ValueError...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python3 import argparse import glob import os import time import random COLOURS = (b'\xFF\x00\x00', b'\x00\xFF\x00', b'\x00\x00\xFF', b'\xFF\xFF\x00', b'\xFF\x00\xFF', b'\x00\xFF\xFF') def write_binary(driver_path, device_file, payload): with open(os.path.join(driver_path, device_file), 'wb') as open_f...
unknown
codeparrot/codeparrot-clean
from lxml import etree from html5lib.treebuilders.etree import tag_regexp from gettext import gettext _ = gettext import _base from html5lib.constants import voidElements from html5lib import ihatexml class Root(object): def __init__(self, et): self.elementtree = et self.children = [] if...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (C) 2008 Google # # 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
import json from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from logging import getLogger logger = getLogger(__name__) class MockCommentServiceRequestHandler(BaseHTTPRequestHandler): ''' A handler for Comment Service POST requests. ''' protocol = "HTTP/1.0" def do_POST(self): ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2008 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
java
github
https://github.com/google/guava
guava/src/com/google/common/base/Joiner.java
# -*- 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
# Copyright (C) 2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be u...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context-support/src/main/java/org/springframework/mail/javamail/InternetAddressEditor.java
""" Numba 1D sum kernels that can be shared by * Dataframe / Series * groupby * rolling / expanding Mirrors pandas/_libs/window/aggregation.pyx """ from __future__ import annotations from typing import ( TYPE_CHECKING, Any, ) import numba from numba.extending import register_jitable import numpy as np if T...
python
github
https://github.com/pandas-dev/pandas
pandas/core/_numba/kernels/sum_.py
# import modules import csv # write a function to do some more exploring with strings def doing_more_with_strings(file_name): # open the csv csv_file = open(file_name, 'rb') # create the object that represents the data in the csv file csv_data = csv.reader(csv_file) # create a variable to repres...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, fields, _ class AccountMove(models.Model): _inherit = 'account.move' edi_show_abandon_cancel_button = fields.Boolean( compute='_compute_edi_show_abandon_cancel_button') ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from nose.tools import * # noqa from tests.base import OsfTestCase from tests.factories import RegistrationFactory from tests.factories import UserFactory from scripts.approve_registrations import main class TestApproveRegistrations(OsfTestCase): ...
unknown
codeparrot/codeparrot-clean
""" FI-specific Form helpers """ import re from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.utils.translation import ugettext_lazy as _ class FIZipCodeField(RegexField): default_error_messages = { ...
unknown
codeparrot/codeparrot-clean
@extends('errors::minimal') @section('title', __('Forbidden')) @section('code', '403') @section('message', __($exception->getMessage() ?: 'Forbidden'))
php
github
https://github.com/laravel/framework
src/Illuminate/Foundation/Exceptions/views/403.blade.php
#!/usr/bin/env python import os, sys, shutil from fabric.api import run, cd, local, get, settings, lcd from fabric_ssh_config import getSSHInfoForHost verifydir = "/tmp/" + os.getenv('USER') + "/verifytemp" version = "5.6" ################################################ # SETUP A DIST & TOOLS IN A TEMP DIR ########...
unknown
codeparrot/codeparrot-clean
"""Map new event context values to old top-level field values. Ensures events can be parsed by legacy parsers.""" CONTEXT_FIELDS_TO_INCLUDE = [ 'username', 'session', 'ip', 'agent', 'host' ] class LegacyFieldMappingProcessor(object): """Ensures all required fields are included in emitted event...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_str, compat_urlparse, ) from ..utils import ( ExtractorError, float_or_none, parse_duration, str_to_int, urlencode_postdata, ) class PandoraTVIE(InfoExtractor): IE_NA...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python3 ## Printing troubleshooter ## Copyright (C) 2008, 2009 Red Hat, Inc. ## Copyright (C) 2008, 2009 Tim Waugh <twaugh@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 Founda...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2017 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 appli...
unknown
codeparrot/codeparrot-clean
use std::fmt; use std::ops::{Div, Mul}; use rustc_error_messages::{DiagArgValue, IntoDiagArg}; use rustc_macros::{Decodable, Encodable, HashStable_Generic}; /// New-type wrapper around `usize` for representing limits. Ensures that comparisons against /// limits are consistent throughout the compiler. #[derive(Clone, ...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_hir/src/limit.rs
/** * 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/test/MetricsAsserts.java
from api.models import * import hashlib, json from time import gmtime, strftime from django.http import HttpResponse from django.core.mail import send_mail from django import forms from api.config import config def contact(request): '''Handles contacts. Sends email to administrator. Accepts post parameters [first], [...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Pow...
c
github
https://github.com/opencv/opencv
3rdparty/libjasper/jpc_mqcod.c
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-aop/src/test/java/org/springframework/aop/support/JdkRegexpMethodPointcutTests.java
#!/usr/bin/python # # Open SoundControl for Python # Copyright (C) 2002 Daniel Holth, Clinton McChesney # # 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 Licen...
unknown
codeparrot/codeparrot-clean
from django.conf import settings from django.db.models.sql import aggregates as sqlaggregates from django.db.models.sql.compiler import SQLCompiler from django.db.models.sql.constants import LOOKUP_SEP, MULTI, SINGLE from django.db.models.sql.where import AND, OR, Constraint from django.db.utils import DatabaseError, I...
unknown
codeparrot/codeparrot-clean
import { type CompilerError, DOMErrorCodes, type SourceLocation, createCompilerError, } from '@vue/compiler-dom' export interface SSRCompilerError extends CompilerError { code: SSRErrorCodes } export function createSSRCompilerError( code: SSRErrorCodes, loc?: SourceLocation, ) { return createCompilerE...
typescript
github
https://github.com/vuejs/core
packages/compiler-ssr/src/errors.ts
base_suite: replica_sets_jscore_passthrough_base overrides: - "multiversion.replica_sets_temporarily_disable_due_to_fcv_upgrade" - "multiversion.replica_fixture_last_continuous_old_new_new"
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/matrix_suites/mappings/replica_sets_jscore_passthrough_last_continuous_old_new_new.yml
""" XML handler for region condition """ # Standard library modules. # Third party modules. # Local modules. from pyhmsa.spec.condition.region import RegionOfInterest from pyhmsa.fileformat.xmlhandler.condition.condition import _ConditionXMLHandler # Globals and constants variables. class RegionOfInterestXMLHandle...
unknown
codeparrot/codeparrot-clean
import sys from distutils.core import setup from distutils.extension import Extension try: from Cython.Distutils import build_ext except ImportError: sys.stderr.write(""" ================================================== Please install Cython (http://cython.org/), which is required to build tree...
unknown
codeparrot/codeparrot-clean
import { isFunction } from '@vue/shared' import { currentInstance, getCurrentInstance } from './component' import { currentApp } from './apiCreateApp' import { warn } from './warning' interface InjectionConstraint<T> {} export type InjectionKey<T> = symbol & InjectionConstraint<T> export function provide<T, K = Inje...
typescript
github
https://github.com/vuejs/core
packages/runtime-core/src/apiInject.ts
# (c) 2016 Dag Wieers <dag@wieers.com> # (c) 2017 Ansible Project # 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 DOCUMENTATION = """ lookup: filetree author: Dag Wieers (@dagwieers) <da...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 NEC Corporation. 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 ...
unknown
codeparrot/codeparrot-clean
""" Validate JSON format. Licensed under MIT Copyright (c) 2012-2015 Isaac Muse <isaacmuse@gmail.com> """ import re import codecs import json RE_LINE_PRESERVE = re.compile(r"\r?\n", re.MULTILINE) RE_COMMENT = re.compile( r'''(?x) (?P<comments> /\*[^*]*\*+(?:[^/*][^*]*\*+)*/ # multi-line comme...
unknown
codeparrot/codeparrot-clean
import dynamic1 from 'next/dynamic'; import dynamic2 from 'next/dynamic'; const DynamicComponent1 = dynamic1(()=>import('../components/hello1') , { loadableGenerated: { webpack: ()=>[ require.resolveWeak("../components/hello1") ] } }); const DynamicComponent2 = dynamic2(()=>i...
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/next-dynamic/duplicated-imports/output-prod.js
""" Users and permissions models """ import sqlalchemy from flask_security import UserMixin, RoleMixin from flask_security.datastore import SQLAlchemyUserDatastore from dockci.server import DB ROLES_USERS = DB.Table( 'roles_users', DB.Column('user_id', DB.Integer(), DB.ForeignKey('user.id'), index=True), ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import pytest import httpretty import tests.test_helpers as test_helpers import datapackage import datapackage.resource import datapacka...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2011 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...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing_extensions import Literal, Required, TypedDict __all__ = ["InputAudioBufferAppendEventParam"] class InputAudioBufferAppendEventParam(TypedDict, total=False): """Send this event to...
python
github
https://github.com/openai/openai-python
src/openai/types/realtime/input_audio_buffer_append_event_param.py
#!/usr/bin/env bash # Copyright 2022 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 applica...
unknown
github
https://github.com/kubernetes/kubernetes
hack/update-kustomize.sh
# # 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
# -*- coding: utf-8 -*- ############################################################################### # # DeleteListRow # Deletes a specified worksheet row from a Google spreadsheet. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); ...
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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/src/pages/Asset/AssetPanelButtons.tsx
// ${generated_comment} #include <ATen/FunctionalInverses.h> #include <ATen/ViewMetaClasses.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Operators.h> #include <ATen/NativeFunctions.h> #else ${op_headers} #endif namespace at { namespace functionalization { ${view_meta_implementations} } // namespace functional...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/templates/ViewMetaClasses.cpp
//! Time error types. use std::error; use std::fmt; /// Errors encountered by the timer implementation. /// /// Currently, there are two different errors that can occur: /// /// * `shutdown` occurs when a timer operation is attempted, but the timer /// instance has been dropped. In this case, the operation will nev...
rust
github
https://github.com/tokio-rs/tokio
tokio/src/time/error.rs
import * as ts from "../_namespaces/ts.js"; describe("unittests:: BigInt literal base conversions", () => { describe("parsePseudoBigInt", () => { const testNumbers: number[] = []; for (let i = 0; i < 1e3; i++) testNumbers.push(i); for (let bits = 0; bits <= 52; bits++) { testNum...
typescript
github
https://github.com/microsoft/TypeScript
src/testRunner/unittests/parsePseudoBigInt.ts
# Test case for property # more tests are in test_descr import sys import unittest from test.test_support import run_unittest class PropertyBase(Exception): pass class PropertyGet(PropertyBase): pass class PropertySet(PropertyBase): pass class PropertyDel(PropertyBase): pass class BaseClass(object...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Test for the integer encoding/decoding functionality in the HPACK library. """ import pytest from hypothesis import given from hypothesis.strategies import integers, binary, one_of from hpack.hpack import encode_integer, decode_integer from hpack.exceptions import HPACKDecodingError class...
unknown
codeparrot/codeparrot-clean
This configuration will enable the minimal output for the stats report. You see that everything is working nicely together. # example.js ```javascript _{{example.js}}_ ``` # webpack.config.js ```javascript _{{webpack.config.js}}_ ``` # dist/output.js ```javascript _{{dist/output.js}}_ ``` # Info ## Production ...
unknown
github
https://github.com/webpack/webpack
examples/stats-minimal/template.md
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
unknown
codeparrot/codeparrot-clean
--- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/plugins/current/_other_command_line_parameters.html applies_to: deployment: self: ga --- # Other command line parameters [_other_command_line_parameters] The `plugin` scripts supports a number of other command line parameters: ## Silent/verbos...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch-plugins/_other_command_line_parameters.md
#ifndef TRANSPORT_INTERNAL_H #define TRANSPORT_INTERNAL_H struct ref; struct transport; struct strvec; struct transport_ls_refs_options; struct transport_vtable { /** * Returns 0 if successful, positive if the option is not * recognized or is inapplicable, and negative if the option * is applicable but the val...
c
github
https://github.com/git/git
transport-internal.h
#pragma once // DO NOT DEFINE STATIC DATA IN THIS HEADER! // See Note [Do not compile initializers with AVX] #include <ATen/cpu/vec/vec.h> #include <c10/util/irange.h> namespace at { namespace detail { // We prefer to convert through float for reduced-precision floating // point types if we have a Vectorized special...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/cpu/vec/functional_base.h
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
unknown
codeparrot/codeparrot-clean
import pytest from mlagents.torch_utils import torch from mlagents.trainers.torch.decoders import ValueHeads def test_valueheads(): stream_names = [f"reward_signal_{num}" for num in range(5)] input_size = 5 batch_size = 4 # Test default 1 value per head value_heads = ValueHeads(stream_names, inpu...
unknown
codeparrot/codeparrot-clean
{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations \u0026 Alerts", "type": "dashb...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/testdata/output/single_version/v27.repeated_panels_and_constant_variable.v27.json
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals """ oauthlib.oauth2.rfc6749 ~~~~~~~~~~~~~~~~~~~~~~~ This module is an implementation of various logic needed for consuming OAuth 2.0 RFC6749. """ import time from oauthlib.oauth2.rfc6749 import tokens from oauthlib.oauth2.rfc6749.parame...
unknown
codeparrot/codeparrot-clean
# Copyright 2025 The 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 required by appl...
python
github
https://github.com/huggingface/transformers
src/transformers/integrations/finegrained_fp8.py
#!/usr/bin/env python # # Copyright 2005 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...
python
github
https://github.com/google/googletest
googletest/test/googletest-filter-unittest.py
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2012 Async Open Source <http://www.async.com.br> ## 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 Foundati...
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...
unknown
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/site/markdown/release/3.0.3/CHANGELOG.3.0.3.md
// Copyright 2016 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql import ( "context" "github.com/cockroachdb/cockroach/pkg/sql/catalog/colinfo" "github.com/cockroachdb/cockroach/pkg/sql/sem/tree" "github.com/cockroach...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/join.go
from __future__ import absolute_import from django.core.management.base import BaseCommand from zerver.models import UserPresence, UserActivity from zerver.lib.utils import statsd, statsd_key from datetime import datetime, timedelta from collections import defaultdict class Command(BaseCommand): help = """Sends...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python2 # Copyright (c) 2009-2015, The Linux Foundation. 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 # ...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Project.commit_browsing_url' db.add_column('codespeed_project', 'commit_browsing_url', self.gf('dj...
unknown
codeparrot/codeparrot-clean
from coalib.bearlib.abstractions.Linter import linter from coalib.settings.Setting import typed_list from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY from dependency_management.requirements.PipRequirement import PipRequirement @linter(executable='httpolice', output_format='regex', output_reg...
unknown
codeparrot/codeparrot-clean