code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
"""Utilities for marking deprecated functions.""" # Copyright 2016 Quantopian, Inc. # # 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 # # Unle...
unknown
codeparrot/codeparrot-clean
import decimal from django.core.exceptions import ValidationError from django.forms import DecimalField, NumberInput, Widget from django.test import SimpleTestCase, override_settings from django.utils import formats, translation from . import FormFieldAssertionsMixin class DecimalFieldTest(FormFieldAssertionsMixin, ...
python
github
https://github.com/django/django
tests/forms_tests/field_tests/test_decimalfield.py
import os import humanize import tempfile import hashlib from pathlib import Path from flask_restful import Resource, abort from flask import request, jsonify from werkzeug.utils import secure_filename from pbench.server.utils import filesize_bytes ALLOWED_EXTENSIONS = {"xz"} class HostInfo(Resource): def __init_...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function import tensorflow as tf import argparse from antk.core import config from antk.core import generic_model from antk.core import loader from antk.models import tree_model def return_parser(): parser = argparse.ArgumentParser(description="For testing") parser.add_argument("da...
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/components/SearchBar.test.tsx
import { useRouter } from "next/router"; import ErrorPage from "next/error"; import Container from "../../components/container"; import PostBody from "../../components/post-body"; import Header from "../../components/header"; import PostHeader from "../../components/post-header"; import Layout from "../../components/la...
typescript
github
https://github.com/vercel/next.js
examples/cms-sitefinity/pages/posts/[...slug].tsx
"""Allows to configure a switch using RPi GPIO.""" import voluptuous as vol from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity from homeassistant.const import CONF_HOST, DEVICE_DEFAULT_NAME import homeassistant.helpers.config_validation as cv from . import CONF_INVERT_LOGIC, DEFAULT_INVERT_LOGI...
unknown
codeparrot/codeparrot-clean
/* Function object implementation */ #include "Python.h" #include "pycore_code.h" // _PyCode_VerifyStateless() #include "pycore_dict.h" // _Py_INCREF_DICT() #include "pycore_function.h" // _PyFunction_Vectorcall #include "pycore_long.h" // _PyLong_GetOne() #include "pycore_modsupport.h"...
c
github
https://github.com/python/cpython
Objects/funcobject.c
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Matt Martz <matt@sivel.net> # # 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'...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function from collections import defaultdict from functools import wraps from unittest import TextTestRunner from scrapy.command import ScrapyCommand from scrapy.contracts import ContractsManager from scrapy.utils.misc import load_object from scrapy.utils.spider import iterate_spider_outpu...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Derived from http://scottlobdell.me/2015/04/gamifying-test-coverage-project/ # Before running this script, first run tests with coverage using: # tox -e py3.4 from subprocess import Popen, PIPE from collections import Counter LINE_COUNT_THRESH = 50 class ExcludeLineParser(object): @cl...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2009 The Closure Library 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 # ...
unknown
codeparrot/codeparrot-clean
"""Wichman-Hill random number generator. Wichmann, B. A. & Hill, I. D. (1982) Algorithm AS 183: An efficient and portable pseudo-random number generator Applied Statistics 31 (1982) 188-190 see also: Correction to Algorithm AS 183 Applied Statistics 33 (1984) 123 McLeod, A. I. (1985) ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # 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 res...
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-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/TestMethodConfiguration.java
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v1beta1", "metadata": { "name": "v33.panel_ds_name_to_ref.v42" }, "spec": { "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dashboards_from_v0_to_v2/v2beta1.v33.panel_ds_name_to_ref.v1beta1.json
import re from streamlink.plugin import Plugin from streamlink.plugin.api import validate from streamlink.stream import HLSStream from streamlink import NoStreamsError from streamlink.utils import parse_json class CubeTV(Plugin): _url_re = re.compile(r"https?://(www\.)?cube\.tv/(?P<channel>[^/]{2,})") _chan...
unknown
codeparrot/codeparrot-clean
# Copyright 2014, Red Hat, Inc. # # 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 ...
unknown
codeparrot/codeparrot-clean
/* * 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 agre...
java
github
https://github.com/google/guava
android/guava-tests/test/com/google/common/cache/CacheLoaderTest.java
import json from django.core import serializers from sphinx.websupport.storage import StorageBackend from .models import DocumentNode from readthedocs.comments.models import NodeSnapshot class DjangoStorage(StorageBackend): """ A Sphinx StorageBackend using Django. """ def get_metadata(self, docname,...
unknown
codeparrot/codeparrot-clean
from collections.abc import AsyncIterator, Iterable from typing import TypeVar from langchain_core.output_parsers.list import ( CommaSeparatedListOutputParser, MarkdownListOutputParser, NumberedListOutputParser, ) from langchain_core.runnables.utils import aadd, add def test_single_item() -> None: """...
python
github
https://github.com/langchain-ai/langchain
libs/core/tests/unit_tests/output_parsers/test_list_parser.py
"""Implementation of radix sort algorithm.""" def radix_sort(itr, base=10): """Sort iterable using radix sort algorithm.""" divisor = base digit = 0 try: maximum = max(itr) except ValueError: return itr while maximum > 1: buckets = [] tmp = [num for num in itr] ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (C) 2012-2019 British Crown (Met Office) & Contributors. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under t...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import os import sys import atexit import time import subprocess import traceback import sqlite3 from stat import * thisdir = os.path.dirname(os.path.abspath(__file__)) verbose = False def green(s): return '\033[1;32m%s\033[m' % s def red(s): return '\033[1;31m%s\033[m' % s def log(*m): ...
unknown
codeparrot/codeparrot-clean
############################################################################# # # MixMaster # ############################################################################# # options _app_title = 'MixMaster' _app_version = '1.0' # functionality imports from Tkinter import * import tkMessageBox import sys, os, string ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
unknown
codeparrot/codeparrot-clean
from django.conf.urls import url from . import views # Blog - URL Routes urlpatterns = [ url(r'^$', views.post_list), url(r'^post/(?P<pk>[0-9]+)/$', views.post_detail), url(r'^post/new/$', views.post_new, name='post_new'), url(r'^post/(?P<pk>[0-9]+)/edit/$', views.post_edit, name='post_edit'), url(r'^drafts/$', ...
unknown
codeparrot/codeparrot-clean
/* Copyright (c) 2010, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including...
c
github
https://github.com/mysql/mysql-server
sql/sql_partition_admin.h
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/qcom,sm8450-gpucc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm Graphics Clock & Reset Controller on SM8450 maintainers: - Konrad Dybcio <konradybcio@kernel.org> descripti...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/qcom,sm8450-gpucc.yaml
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE). # 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 option) any later # version. # # This program...
unknown
codeparrot/codeparrot-clean
## 1. Neural networks and iris flowers ## import pandas import matplotlib.pyplot as plt import numpy as np # Read in dataset iris = pandas.read_csv("iris.csv") # shuffle rows shuffled_rows = np.random.permutation(iris.index) iris = iris.loc[shuffled_rows,:] print(iris.head()) # There are 2 species print(iris.speci...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python traindat = '../data/fm_train_real.dat' testdat = '../data/fm_test_real.dat' label_traindat = '../data/label_train_twoclass.dat' parameter_list= [[traindat,testdat,label_traindat],[traindat,testdat,label_traindat]] def kernel_combined_custom_poly_modular (train_fname = traindat,test_fname = test...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Union from typing_extensions import Literal, TypeAlias from ..shared.response_format_text import ResponseFormatText from ..shared.response_format_json_object import ResponseFormatJSONObject from ..shared.response_...
python
github
https://github.com/openai/openai-python
src/openai/types/beta/assistant_response_format_option.py
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context/src/test/java/org/springframework/aop/aspectj/Counter.java
#!/usr/bin/env python ############################################################################### # # genomeCoverage.py version 1.0 # # Calculates windowed coverage across a genome and finds mate # matches and positions for each genome scaffold using a SAM file # # Calculates GC content across genome an...
unknown
codeparrot/codeparrot-clean
from copy import deepcopy import datetime from django.core.exceptions import MultipleObjectsReturned, FieldError from django.db import transaction from django.test import TestCase from django.utils import six from django.utils.translation import ugettext_lazy from .models import Article, Reporter class ManyToOneTest...
unknown
codeparrot/codeparrot-clean
#include <ATen/ATen.h> int main() { std::cout << at::ones({3,4}, at::CPU(at::kFloat)) << '\n'; }
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/test/test_install/main.cpp
#! /usr/bin/env python from __future__ import division from timeside.decoder.core import FileDecoder from unit_timeside import * import os.path #from glib import GError as GST_IOError # HINT : to use later with Gnonlin only class TestDecoding(unittest.TestCase): "Test decoding features" def setUp(self): ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2022 - 2025 R. Thomas * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
unknown
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/DWARF/types/Reference.hpp
# =============================================================================== # Copyright 2012 Jake Ross # # 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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2013. Mark E. Madsen <mark@madsenlab.org> # # This work is licensed under the terms of the Apache Software License, Version 2.0. See the file LICENSE for details. import ctpy.data as data import ctpy.utils as utils import ming import os import logging as log import tempfile # ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Base classes for writing management commands (named commands which can be executed through ``django-admin`` or ``manage.py``). """ from __future__ import unicode_literals import os import sys from argparse import ArgumentParser import django from django.core import checks from django.core....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python2.4 # Copyright 2009, 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...
unknown
codeparrot/codeparrot-clean
# Copyright 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 requ...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: GPL-2.0 %YAML 1.2 --- $id: http://devicetree.org/schemas/display/brcm,bcm2835-hdmi.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Broadcom VC4 (VideoCore4) HDMI Controller maintainers: - Eric Anholt <eric@anholt.net> properties: compatible: const: brcm,bcm2835-...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
<?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\Doctrine\Tests\Fixtures; class AssociatedEntityDto { ...
php
github
https://github.com/symfony/symfony
src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociatedEntityDto.php
# Copyright 2019 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Emit ScriptResult status transition event.""" from maasserver.models import Event from maasserver.preseed import CURTIN_INSTALL_LOG from maasserver.utils.signals import Signals...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf8 -*- from constants import PREFIX_DECLARATION_TYPE_INTEGER from constants import PREFIX_DECLARATION_TYPE_REAL from constants import PREFIX_DECLARATION_TYPE_CHARACTER from constants import PREFIX_DECLARATION_TYPE_LOGICAL from constants import PREFIX_CONTEXT_TYPE_LOCAL from constants import PREFIX_CONT...
unknown
codeparrot/codeparrot-clean
"""Support for documenting version of changes, additions, deprecations.""" from __future__ import annotations from typing import TYPE_CHECKING from sphinx.domains.changeset import ( VersionChange, versionlabel_classes, versionlabels, ) from sphinx.locale import _ as sphinx_gettext if TYPE_CHECKING: ...
python
github
https://github.com/python/cpython
Doc/tools/extensions/changes.py
from __future__ import absolute_import, unicode_literals from django import forms from django.contrib.contenttypes.generic import generic_inlineformset_factory from django.contrib.contenttypes.models import ContentType from django.test import TestCase from .models import (TaggedItem, ValuableTaggedItem, Comparison, A...
unknown
codeparrot/codeparrot-clean
# Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # trib...
unknown
codeparrot/codeparrot-clean
"""Tests suite for MaskedArray & subclassing. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu """ import numpy as np from numpy.lib.mixins import NDArrayOperatorsMixin from numpy.ma.core import ( MaskedArray, add, arange, array, asanyarray, asarray, divide, hypot, ...
python
github
https://github.com/numpy/numpy
numpy/ma/tests/test_subclassing.py
/* * 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.http.parsing.regex import io.ktor.http.parsing.* internal class RegexParser( private val expression: Regex, private val indexes: Map<String, List<Int>> ) : Parser { ...
kotlin
github
https://github.com/ktorio/ktor
ktor-http/common/src/io/ktor/http/parsing/regex/RegexParser.kt
# # Class to manage filling form values # # Author: Gregory Fleischer (gfleischer@gmail.com) # # Copyright (c) 2011 RAFT Team # # This file is part of RAFT. # # RAFT 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 Foundat...
unknown
codeparrot/codeparrot-clean
# File: zone_update_soa.py # Author: Bert JW Regeer <bertjw@regeer.org> # Created: 2013-02-15 import os import os.path import sys import re import datetime soa_regex = re.compile(r"@\s+(?P<record_ttl>[0-9]+[a-z]*)?\s+IN\s+SOA\s+(?P<ns>[\w\.]+)\s+(?P<hostmaster>[\w\.]+)\s+\(\s*(?P<serial>\d+)\D*(?P<refresh>\d+)\D*(?P<...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # :Id: $Id: latex2mathml.py 7668 2013-06-04 12:46:30Z milde $ # :Copyright: © 2010 Günter Milde. # Based on rst2mathml.py from the latex_math sandbox project # © 2005 Jens Jørgen Mortensen # :License: Released under the terms of the `2-Clause BSD li...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 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 License, or # (at your option) any later versio...
unknown
codeparrot/codeparrot-clean
# Copyright 2023 The Intel Labs Team Authors, The Microsoft Research Team Authors and 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...
python
github
https://github.com/huggingface/transformers
src/transformers/models/bridgetower/configuration_bridgetower.py
# -*- coding:utf-8 -*- from __future__ import unicode_literals from django.core import checks from django.core.validators import MaxValueValidator, MinValueValidator from django.db import connection from django.db import models from django.utils import six from django.utils.translation import ugettext_lazy as _ from...
unknown
codeparrot/codeparrot-clean
# # Copyright (c) 2015 ThoughtWorks, Inc. # # Pixelated is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Pixelated is distrib...
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 model 'Decision' db.create_table('oozie_decision', ( ('node_ptr', self.gf('django.db.models.f...
unknown
codeparrot/codeparrot-clean
/* Copyright (c) 2016, PyData Development Team All rights reserved. Distributed under the terms of the BSD Simplified License. The full license is in the LICENSE file, distributed with this software. Flexibly-sized, index-able skiplist data structure for maintaining a sorted list of values Port of Wes McKinney's Cy...
c
github
https://github.com/pandas-dev/pandas
pandas/_libs/include/pandas/skiplist.h
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class JWPlatformIE(InfoExtractor): _VALID_URL = r'(?:https?://(?:content\.jwplatform|cdn\.jwplayer)\.com/(?:(?:feed|player|thumb|preview)s|jw6|v2/media)/|jwplatform:)(?P<id>[a-zA-Z0-9]{8})' _TESTS = [{ ...
unknown
codeparrot/codeparrot-clean
// Code generated - EDITING IS FUTILE. DO NOT EDIT. package v1alpha1 // DataSourceMapping specifies a datasource to validate dashboard queries against. // Maps logical datasource references in the dashboard to actual datasource instances. // +k8s:openapi-gen=true type DashboardCompatibilityScoreDataSourceMapping stru...
go
github
https://github.com/grafana/grafana
apps/dashvalidator/pkg/apis/dashvalidator/v1alpha1/dashboardcompatibilityscore_spec_gen.go
# -*- encoding: utf-8 -*- ############################################################################## # # partner_billing # (C) 2015 Mikołaj Dziurzyński, Grzegorz Grzelak, Thorsten Vocks (big-consulting GmbH) # All Rights reserved # # This program is free software: you can redistribute it and/or modify #...
unknown
codeparrot/codeparrot-clean
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from optparse import make_option from django.apps import apps from django.core import checks from django.core.checks.registry import registry from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = "Check...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks 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 import os import json import pytest import sys if sys.version_info < (2...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2020 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/ko/main_classes/data_collator.md
import os from setuptools import setup from setuptools import find_packages version = '0.1' shortdesc = "Ogone Payment for bda.plone.shop" setup( name='bda.plone.ogonepayment', version=version, description=shortdesc, classifiers=[ 'Environment :: Web Environment', 'License :: OSI Appro...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash set -eux source virtualenv.sh pip install pexpect==4.9.0 # Test pause module when no tty and non-interactive with no seconds parameter. # This is to prevent playbooks from hanging in cron and Tower jobs. /usr/bin/env bash << EOF ansible-playbook test-pause-no-tty.yml 2>&1 | \ grep '\[WARNING...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/pause/runme.sh
# -*- coding: utf-8 -*- """ SubRip's subtitle parser """ from pysrt.srtexc import InvalidItem, InvalidIndex from pysrt.srttime import SubRipTime from pysrt.comparablemixin import ComparableMixin from pysrt.compat import str class SubRipItem(ComparableMixin): """ SubRipItem(index, start, end, text, position) ...
unknown
codeparrot/codeparrot-clean
import collections import os import sys from ansible.compat.tests import mock from ansible.compat.tests import unittest try: from ansible.modules.packaging.os.apt import ( expand_pkgspec_from_fnmatches, ) except: # Need some more module_utils work (porting urls.py) before we can test # modules...
unknown
codeparrot/codeparrot-clean
# pyOCD debugger # Copyright (c) 2016-2019 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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...
unknown
codeparrot/codeparrot-clean
#pragma once #include <ATen/detail/XPUHooksInterface.h> namespace at::xpu { // Forward-declares at::xpu::LevelZero struct LevelZero; namespace detail { extern LevelZero lazyLevelZero; } // namespace detail } // namespace at::xpu
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/xpu/detail/LazyLevelZero.h
""" See https://bittrex.com/Home/Api """ import time import hmac import hashlib try: from urllib import urlencode from urlparse import urljoin except ImportError: from urllib.parse import urlencode from urllib.parse import urljoin import requests BUY_ORDERBOOK = 'buy' SELL_ORDERBOOK = 'sell' BOTH_O...
unknown
codeparrot/codeparrot-clean
"""Base class for datasources that read data from files in a directory. """ # standard imports from typing import Union import os import glob import random # toolbox imports from dltb.base.data import Data from dltb.tool.classifier import ClassScheme from dltb.util import read_cache, write_cache from .files import D...
unknown
codeparrot/codeparrot-clean
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT use super::{ActionResult, SectionItem}; use crate::helpers::cargo_manifest::{ cargo_manifest_and_lock, crate_latest_version, crate_version, CrateVersion, }; use colored::Colori...
rust
github
https://github.com/tauri-apps/tauri
crates/tauri-cli/src/info/packages_rust.rs
from __future__ import annotations from io import ( BytesIO, StringIO, ) from lzma import LZMAError import os from tarfile import ReadError from urllib.error import HTTPError from xml.etree.ElementTree import ParseError from zipfile import BadZipFile import numpy as np import pytest from pandas.compat import...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/io/xml/test_xml.py
# 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 # distributed under t...
unknown
codeparrot/codeparrot-clean
from collatex import * from xml.dom import pulldom import re import glob from datetime import datetime, date # 2017-11-26 ebb: processing only ms to 1818 collation, hoping it outputs @type="invariant" on app elements # import pytz # from tzlocal import get_localzone # today = date.today() # utc_dt = datetime(today, tz...
unknown
codeparrot/codeparrot-clean
""" Register point clouds to each other arrays are named like name_abc abc are subscripts and indicate the what that tensor index refers to index name conventions: m: test point index n: training point index a: input coordinate g: output coordinate d: gripper coordinate """ from __future__ import...
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
#! /usr/bin/env python """A Python debugger.""" # (See pdb.doc for documentation.) import sys import linecache import cmd import bdb from repr import Repr import os import re import pprint import traceback class Restart(Exception): """Causes a debugger to be restarted for the debugged python program.""" pas...
unknown
codeparrot/codeparrot-clean
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
c
github
https://github.com/curl/curl
src/terminal.c
# -*- coding: utf-8 -*- """ requests.adapters ~~~~~~~~~~~~~~~~~ This module contains the transport adapters that Requests uses to define and maintain connections. """ import socket from .models import Response from .packages.urllib3.poolmanager import PoolManager, proxy_from_url from .packages.urllib3.response impo...
unknown
codeparrot/codeparrot-clean
<?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\Twig\Tests\Extension; use Symfony\Component\Form\Extensi...
php
github
https://github.com/symfony/symfony
src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap5HorizontalLayoutTestCase.php
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
unknown
codeparrot/codeparrot-clean
<?php declare(strict_types=1); /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Test\Re...
php
github
https://github.com/composer/composer
tests/Composer/Test/Repository/ComposerRepositoryTest.php
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sphinx_bootstrap_theme # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' project = 'glucose' copyright = '2017, Neil Vice' author = 'Neil Vice' version = '0.0.5' release = '0.0.5' extensions = [ 'sphinx.ext.mathjax...
unknown
codeparrot/codeparrot-clean
# Copyright 2019,2020,2021 Sony 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 applicable law or agreed...
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-aop/src/main/java/org/springframework/aop/config/AdviceEntry.java
/* Copyright 2017 - 2025 R. Thomas * Copyright 2017 - 2025 Quarkslab * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
unknown
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/Abstract/Parser.hpp
""" HTML Entities for reStructured Text =================================== Allows user to use HTML entities (&copy;, &#149;, etc.) in RST documents. Usage: :html_entity:`copy` :html_entity:`149` :html_entity:`#149` """ from __future__ import unicode_literals from docutils import nodes, utils from docutils.parsers.rs...
unknown
codeparrot/codeparrot-clean
""" Python tests for the Survey models """ from collections import OrderedDict from django.test.client import Client from django.contrib.auth.models import User from survey.models import SurveyForm from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.django_utils import Modul...
unknown
codeparrot/codeparrot-clean
#!/bin/bash # # 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...
unknown
github
https://github.com/elastic/elasticsearch
.buildkite/scripts/validate-index-version-backport.sh
# -*- coding: utf-8 -*- ''' test_qgsoptional.py -------------------------------------- Date : September 2016 Copyright : (C) 2016 Matthias Kuhn email : matthias@opengis.ch ***************************************...
unknown
codeparrot/codeparrot-clean
"""Tests for dense recursive polynomials' basic tools. """ from sympy.polys.densebasic import ( dup_LC, dmp_LC, dup_TC, dmp_TC, dmp_ground_LC, dmp_ground_TC, dmp_true_LT, dup_degree, dmp_degree, dmp_degree_in, dmp_degree_list, dup_strip, dmp_strip, dmp_validate, dup_reverse, dup...
unknown
codeparrot/codeparrot-clean