code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# Copyright 2012 Red Hat, Inc. # Copyright 2013 IBM Corp. # 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....
unknown
codeparrot/codeparrot-clean
/* Copyright 2016 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/volume/persistentvolume/volume_host.go
# # 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
#!/usr/bin/env python import pygtk pygtk.require('2.0') import gtk import gtkcons, gtkdb, gtkprof, edit, dialogs import os, sys, string # select a good VT emulator for vt in 'Eterm', 'nxterm', 'xterm-color', 'xterm', 'rxvt': for dirname in string.split(os.environ['PATH'], os.pathsep): fullname = os.path.j...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright 2008, 2012 Jurko Gospodnetic # 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) # Tests that generators get selected correctly. # # We do not use the internal C++-compiler CPP --> OBJ ge...
unknown
codeparrot/codeparrot-clean
# Volatility # Copyright (C) 2008-2013 Volatility Foundation # # Additional Authors: # Mike Auty <mike.auty@gmail.com> # # This file is part of Volatility. # # Volatility 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 Fo...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package response // ModuleProvider represents a single provider for modules. type ModuleProvider struct { Name string `json:"name"` Downloads int `json:"downloads"` ModuleCount int `json:"module_count"` } // ModuleProviderList is...
go
github
https://github.com/hashicorp/terraform
internal/registry/response/module_provider.go
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Chris Hoffman <choffman@chathamfinancial.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 ...
unknown
codeparrot/codeparrot-clean
""" Forms and validation code for user registration. Note that all of these forms assume Django's bundle default ``User`` model; since it's not possible for a form to anticipate in advance the needs of custom user models, you will need to write your own forms if you're using a custom model. """ from django.contrib.a...
unknown
codeparrot/codeparrot-clean
#pragma once #include <mutex> namespace c10 { /** * A very simple Synchronization class for error-free use of data * in a multi-threaded context. See folly/docs/Synchronized.md for * the inspiration of this class. * * Full URL: * https://github.com/facebook/folly/blob/main/folly/docs/Synchronized.md * * This...
c
github
https://github.com/pytorch/pytorch
c10/util/Synchronized.h
/* * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.utils.io import io.ktor.utils.io.core.* import kotlinx.coroutines.runBlocking import kotlinx.io.Buffer import kotlinx.io.RawSink /** * Converts the current `ByteWriteChannel...
kotlin
github
https://github.com/ktorio/ktor
ktor-io/jvmAndPosix/src/io/ktor/utils/io/ByteWriteChannelSink.kt
<?php namespace Illuminate\Console\Scheduling; use Illuminate\Console\Command; use Illuminate\Contracts\Cache\Repository as Cache; use Illuminate\Support\Facades\Date; use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'schedule:interrupt')] class ScheduleInterruptCommand extends Command { /** ...
php
github
https://github.com/laravel/framework
src/Illuminate/Console/Scheduling/ScheduleInterruptCommand.php
// SPDX-License-Identifier: GPL-2.0 /* * 32 bit compatibility code for System V IPC * * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1999 Arun Sharma <arun.sharma@intel.com> * Copyright (C) 2000 VA Linux Co * Copyr...
c
github
https://github.com/torvalds/linux
ipc/compat.c
/** * 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 * distribute...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/KerberosTestUtils.java
# MajorMajor - Collaborative Document Editing Library # Copyright (C) 2013 Ritchie Wilson # # 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 License, or # (at your option)...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ """ from fabric.api import (env, roles, execute, task) from os.path import join import pydiploy # edit config here ! env.remote_owner = 'django' # remote server user env.remote_group = 'di' # remote server group env.application_name = 'django_search_model' # name of webapp env.root...
unknown
codeparrot/codeparrot-clean
"""Datasets for models """ # Any commits made to this module between 2015-05-01 and 2017-03-01 # by Gerrit Holl are developed for the EC project “Fidelity and # Uncertainty in Climate Data Records from Earth Observations (FIDUCEO)”. # Grant agreement: 638822 # # All those contributions are dual-licensed under the MIT ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # 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...
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 applicab...
unknown
codeparrot/codeparrot-clean
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python """ Implementation of the Hungarian (Munkres) Algorithm using Python and NumPy References: http://www.ams.jhu.edu/~castello/362/Handouts/hungarian.pdf http://weber.ucsd.edu/~vcrawfor/hungar.pdf http://en.wikipedia.org/wiki/Hungarian_algorithm http://www.public.iastate.edu/~ddot...
unknown
codeparrot/codeparrot-clean
// Copyright 2020 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package cli import ( "strings" "testing" "github.com/cockroachdb/cockroach/pkg/cli/democluster" "github.com/cockroachdb/cockroach/pkg/security/securityassets" "gi...
go
github
https://github.com/cockroachdb/cockroach
pkg/cli/demo_test.go
import unittest from ..convert.converter import Converter __author__ = 'Jakob Abesser' class TestConvert(unittest.TestCase): """ Unit tests for Convert class """ def setUp(self): pass def test_pitch_to_octave(self): """ Unit test for pitch_to_octave() """ self.assertEqual(Con...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python2 from __future__ import division import scipy, sys, time, os, argparse, numpy.random from pylab import * import read, arguments import mayavi.mlab as mlab from tvtk.api import tvtk # ------------------------------------------------------------------------------ # Define functions # -----------------...
unknown
codeparrot/codeparrot-clean
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RKegggraph(RPackage): """KEGGgraph: A graph approach to KEGG PATHWAY in R and Bioconductor....
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2012 CERN. ## ## Invenio 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) a...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import pytest from openfisca_france_data.erfs_fpr.get_survey_scenario import get_survey_scenario as erfs_fpr_get_survey_scenario from openfisca_france_data.erfs.scenario import ErfsSurveyScenario from openfisca_france_data import base_survey def test_pivot_table_1d_mean(): year = 2013 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
unknown
codeparrot/codeparrot-clean
import socket from scapy.layers.inet import IP, UDP from scapy.layers.inet6 import IPv6 from scapy.layers.l2 import Ether, GRE from scapy.packet import Raw from framework import VppTestCase from util import ppp """ TestLB is a subclass of VPPTestCase classes. TestLB class defines Load Balancer test cases for: -...
unknown
codeparrot/codeparrot-clean
"""Test classes for Bookmark tests @Requirement: Bookmark @CaseAutomation: Automated @CaseLevel: Acceptance @CaseComponent: UI @TestType: Functional @CaseImportance: High @Upstream: No """ # -*- encoding: utf-8 -*- import random from fauxfactory import gen_string from nailgun import entities from robottelo.cons...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # pelisalacarta 4 # Copyright 2015 tvalacarta@gmail.com # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ # # Distributed under the terms of GNU General Public License v3 (GPLv3) # http://www.gnu.org/licenses/gpl-3.0.html # --...
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 agre...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Thomas Amland # # 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 License, or # (at your option) any later version. # # This ...
unknown
codeparrot/codeparrot-clean
import numpy as np import matplotlib.pyplot as plt import h5py import sklearn import sklearn.datasets import sklearn.linear_model import scipy.io def sigmoid(x): """ Compute the sigmoid of x Arguments: x -- A scalar or numpy array of any size. Return: s -- sigmoid(x) """ s = 1 / (1 + ...
unknown
codeparrot/codeparrot-clean
import time from AnyQt.QtWidgets import QGraphicsView from AnyQt.QtGui import QPainter, QPainterPath from ...gui.test import QAppTestCase from ..layout import AnchorLayout from ..scene import CanvasScene from ..items import NodeItem, LinkItem class TestAnchorLayout(QAppTestCase): def setUp(self): QAppTe...
unknown
codeparrot/codeparrot-clean
from django import test from jingo import env from mock import Mock from nose.tools import eq_ from pyquery import PyQuery as pq import amo from addons.models import Addon from tags.models import AddonTag, Tag from tags.helpers import tag_link xss = "<script>alert('xss')</script>" def render(s, context={}): """...
unknown
codeparrot/codeparrot-clean
r""" #================================================================= # warc.gz >>> print_cdx_index('example.warc.gz') CDX N b a m s k r M S V g com,example)/?example=1 20140103030321 http://example.com?example=1 text/html 200 B2LTWWPUOYAH7UIPQ7ZUPQ4VMBSVC36A - - 1043 333 example.warc.gz com,example)/?example=1 201...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 """A class for managing IPython extensions. Authors: * Brian Granger """ #----------------------------------------------------------------------------- # Copyright (C) 2010-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file C...
unknown
codeparrot/codeparrot-clean
""" Downloader for Reddit takes a list of reddit users and subreddits and downloads content posted to reddit either by the users or on the subreddits. Copyright (C) 2017, Kyle Hickey This file is part of the Downloader for Reddit. Downloader for Reddit is free software: you can redistribute it and/or modify it under...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-23 12:29 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations...
unknown
codeparrot/codeparrot-clean
import time from landscape.lib.monitor import CoverageMonitor from landscape.lib.sysstats import get_thermal_zones from landscape.client.accumulate import Accumulator from landscape.client.monitor.plugin import MonitorPlugin class Temperature(MonitorPlugin): """Capture thermal zone temperatures and trip point se...
unknown
codeparrot/codeparrot-clean
# splitter.py import wx import waxconfig import waxobject import styles import utils class Splitter(wx.SplitterWindow, waxobject.WaxObject): __events__ = { 'SashPosChanging': wx.EVT_SPLITTER_SASH_POS_CHANGING, 'SashPosChanged': wx.EVT_SPLITTER_SASH_POS_CHANGED, 'Unsplit': wx.EVT_SPLITTER_...
unknown
codeparrot/codeparrot-clean
# Copyright 2021 Google LLC # # 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, ...
unknown
codeparrot/codeparrot-clean
"""Various generic useful functions """ def is_seq(o): """Check if the object is a sequence. Parameters ---------- o : any object The object to check Returns ------- is_seq : bool, scalar True if *o* is a sequence, False otherwise """ return hasattr(o, "__len__") def ...
unknown
codeparrot/codeparrot-clean
from model.group import Group @pytest.mark.parametrize("group", test_data_five_group, ids=[repr(x) for x in test_data_five_group]) def test_add_group(app, group): old_groups = app.group.get_group_list() app.group.create(group) assert len(old_groups) + 1 == app.group.count() new_groups = app.group.get_g...
unknown
codeparrot/codeparrot-clean
from six.moves.urllib.parse import urlparse from unittest import TestCase from scrapy.http import Request, Response from scrapy.http.cookies import WrappedRequest, WrappedResponse class WrappedRequestTest(TestCase): def setUp(self): self.request = Request("http://www.example.com/page.html", ...
unknown
codeparrot/codeparrot-clean
import os from i18n import _ try: import zbar except ImportError: zbar = None proc = None def scan_qr(config): global proc if not zbar: raise BaseException("\n".join([_("Cannot start QR scanner."),_("The zbar package is not available."),_("On Linux, try 'sudo pip install zbar'")])) if pro...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 """Find Kconfig symbols that are referenced but not defined.""" # (c) 2014-2017 Valentin Rothberg <valentinrothberg@gmail.com> # (c) 2014 Stefan Hengelein <stefan.hengelein@fau.de> # # Licensed under the terms of the GNU GPL License version 2 import argparse import difflib import os import re ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, 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 # withou...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright 2015 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 appl...
python
github
https://github.com/kubernetes/kubernetes
hack/boilerplate/test/pass.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch from fairseq import ...
unknown
codeparrot/codeparrot-clean
from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module # Cache of actual callables. _standard_context_processors = None # We need the CSRF processor no matter what the user has in their settings, # because otherwise it is a security vulnerability, and we can't afford t...
unknown
codeparrot/codeparrot-clean
class AppConfig(): """ URI of Sequencing oAuth2 where you can request user to authorize your app. """ oauth2_authorization_uri = 'https://sequencing.com/oauth2/authorize' """ Sequencing API endpoint. """ api_uri = 'https://api.sequencing.com' """ Redirect URI of your oauth2 ap...
unknown
codeparrot/codeparrot-clean
import os import stat import sys import ecl from ecl import EclPrototype from tests import EclTest from ecl.util.test.test_area import TestAreaContext from cwrap import Prototype class _TestSpawnPrototype(Prototype): lib = EclPrototype.lib def __init__(self, prototype, bind=True): super(_TestSpawnPr...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 NeuroData (http://neurodata.io) # # 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 agr...
unknown
codeparrot/codeparrot-clean
#!/bin/bash # The purpose of this script is to: # 1. Extract the set of parameters to be used for a docker build based on the provided image name. # 2. Run docker build with the parameters found in step 1. # 3. Run the built image and print out the expected and actual versions of packages installed. set -ex image="$1...
unknown
github
https://github.com/pytorch/pytorch
.ci/docker/build.sh
"""This is a sample module that doesn't really test anything all that interesting. It simply has a few tests, some of which succeed and some of which fail. It's important that the numbers remain constant as another test is testing the running of these tests. >>> 2+2 4 """ def foo(): """ >>> 2+2 5 ...
python
github
https://github.com/python/cpython
Lib/test/test_doctest/sample_doctest.py
/*! * 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/Dag/Overview/index.ts
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT use cargo_mobile2::{ android::target::Target, opts::{FilterLevel, NoiseLevel, Profile}, target::TargetTrait, }; use clap::{ArgAction, Parser}; use std::path::PathBuf; use ...
rust
github
https://github.com/tauri-apps/tauri
crates/tauri-cli/src/mobile/android/run.rs
#ifndef RUBY_BACKWARD2_R_CAST_H /*-*-C++-*-vi:se ft=cpp:*/ #define RUBY_BACKWARD2_R_CAST_H /** * @author Ruby developers <ruby-core@ruby-lang.org> * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistri...
c
github
https://github.com/ruby/ruby
include/ruby/backward/2/r_cast.h
# -*- coding: utf-8 -*- """ jinja2.sandbox ~~~~~~~~~~~~~~ Adds a sandbox layer to Jinja as it was the default behavior in the old Jinja 1 releases. This sandbox is slightly different from Jinja 1 as the default behavior is easier to use. The behavior can be changed by subclassing the environm...
unknown
codeparrot/codeparrot-clean
from __future__ import division from __pyosshell__ import * from __proptions__ import * from __mdpassist__ import * from __molecules__ import * class System(object): def __init__(self, grofile, topfile, ndxfile, ctrlfile, histfile, cmdlineopt, verbose=True): # ================================================...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (C) 2008 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
########################################################################### # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright 2023 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. PLATFORM=linux-amd64-fips ./build/teamcity/internal/release/process/make-and-publish-build-artifacts-per-platform.sh
unknown
github
https://github.com/cockroachdb/cockroach
build/teamcity/internal/release/process/make-and-publish-build-artifacts-linux-amd64-fips.sh
# -*- 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
# -*- coding:utf8 -*- import os import re import traceback import shutil import time from logger import Logger from builder import Builder from task import Task, SyncTask, IncrementalBuildTask from utils import cexec, write_file_content, get_file_content, merge_xml, get_md5, load_json_cache, is_windows_system, \ w...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** r_li_richness_ascii.py ---------------------- Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr **************...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2005-2012 Stephen John Machin, Lingfo Pty Ltd # This module is part of the xlrd package, which is released under a # BSD-style licence. from .info import __VERSION__ import sys, zipfile, pprint from . import timemachine from .biffh import ( XLRDError, biff_text_from_num, error_text_from_cod...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 import re import logging from datetime import datetime, timedelta, date from django.db import models from django.db.models.query_utils import Q from django.utils.translation import ugettext_lazy as _, ugettext from django.utils.text import Truncator from django.contrib.contenttypes import generic from...
unknown
codeparrot/codeparrot-clean
# Copyright 2021 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 applicabl...
python
github
https://github.com/huggingface/transformers
src/transformers/pipelines/automatic_speech_recognition.py
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package mysql import ( "context" "database/sql" "fmt" "io/ioutil" "os" paths "path" "path/filepath" "reflect" "testing" "time" "github.com/hashicorp/vault/helper/testhelpers/certhelpers" "github.com/hashicorp/vault/sdk/database/helper...
go
github
https://github.com/hashicorp/vault
plugins/database/mysql/connection_producer_test.go
from django.contrib.messages import constants from django.contrib.messages.tests.base import BaseTests from django.contrib.messages.storage.base import Message from django.contrib.messages.storage.session import SessionStorage from django.utils.safestring import SafeData, mark_safe from django.test import TestCase def...
unknown
codeparrot/codeparrot-clean
name: Rebase PR on: repository_dispatch: types: [try-rebase] jobs: do_rebase: runs-on: ubuntu-24.04 environment: mergebot env: GH_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} steps: - name: Checkout repo id: checkout ...
unknown
github
https://github.com/pytorch/pytorch
.github/workflows/tryrebase.yml
// Copyright 2008 Google Inc. // All Rights Reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions a...
c
github
https://github.com/google/googletest
googletest/include/gtest/internal/gtest-type-util.h
# Copyright (c) 2015 Alex Meade. All rights reserved. # 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
# 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
# Added Fortran compiler support to config. Currently useful only for # try_compile call. try_run works but is untested for most of Fortran # compilers (they must define linker_exe first). # Pearu Peterson import os, signal import warnings import sys from distutils.command.config import config as old_config from dist...
unknown
codeparrot/codeparrot-clean
import turtle import time SIZE_X=1000 SIZE_Y=700 screen = turtle.Screen() screen.bgpic("world_map.gif") screen.setup(SIZE_X, SIZE_Y) turtle.setup(SIZE_X,SIZE_Y) turtle.penup() ethiopia = turtle.clone() ethiopia.shape("turtle") ethiopia.penup() ethiopia.goto(-50,-120) ethiopia.pendown() ethiopia.stamp() ethiopia1 = t...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import unittest import telemetry.timeline.counter as tracing_counter import telemetry.timeline.model as timeline_model from telemetry.timeline i...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python """ This is a unittest for qemu_devices library. :author: Lukas Doktor <ldoktor@redhat.com> :copyright: 2012 Red Hat, Inc. """ __author__ = """Lukas Doktor (ldoktor@redhat.com)""" import re import unittest import os import sys # simple magic for using scripts within a source tree basedir = os.path....
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
# -*- coding: utf-8 -*- # Copyright: (c) 2020-2021, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Requirement provider interfaces.""" from __future__ import annotations import collections.abc as _c import functools import typing as t if t.TYPE_CHECKIN...
python
github
https://github.com/ansible/ansible
lib/ansible/galaxy/dependency_resolution/providers.py
# Copyright 2013 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. """Implementation of CloudBucket using Google Cloud Storage as the backend.""" import os import sys import cloudstorage from common import cloud_bucket cl...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing_extensions import Literal from ...._models import BaseModel __all__ = ["ResponseAudioDoneEvent"] class ResponseAudioDoneEvent(BaseModel): content_index: int """The index of the content part in the item's conten...
python
github
https://github.com/openai/openai-python
src/openai/types/beta/realtime/response_audio_done_event.py
# 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
# -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
unknown
codeparrot/codeparrot-clean
"""empty message Revision ID: 30a0d4b22212 Revises: 55464a272758 Create Date: 2014-06-27 10:39:14.030414 """ # revision identifiers, used by Alembic. revision = '30a0d4b22212' down_revision = '55464a272758' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - p...
unknown
codeparrot/codeparrot-clean
// This file is part of ICU4X. For terms of use, please see the file // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). //! This module implements logic for Duration parsing. use crate::{ assert_syntax, parsers::{ gramma...
rust
github
https://github.com/nodejs/node
deps/crates/vendor/ixdtf-0.5.0/src/parsers/duration.rs
# This file is part of the FifoCI project. # Copyright (c) 2014 Pierre Bourdon <delroth@dolphin-emu.org> # Licensing information: see $REPO_ROOT/LICENSE from django.db import models class FifoTest(models.Model): file = models.FileField(upload_to="dff/", max_length=256) name = models.CharField(max_length=128) ...
unknown
codeparrot/codeparrot-clean
use super::*; #[test] #[cfg(not(miri))] fn vec_cache_empty() { let cache: VecCache<u32, u32, u32> = VecCache::default(); for key in 0..u32::MAX { assert!(cache.lookup(&key).is_none()); } } #[test] fn vec_cache_insert_and_check() { let cache: VecCache<u32, u32, u32> = VecCache::default(); c...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_data_structures/src/vec_cache/tests.rs
import subprocess import sys import os import shutil builds = [] coverages = set() def add_build(mark): global builds args, kwargs = list(mark.args), mark.kwargs.copy() kwargs.pop('coverage', None) cfg = args, kwargs if cfg not in builds: builds.append(cfg) def execute_builds(): commo...
unknown
codeparrot/codeparrot-clean
// Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package issue41761a /* typedef struct S41761 S41761; */ import "C" type T struct { X *C.S41761 }
go
github
https://github.com/golang/go
src/cmd/cgo/internal/test/issue41761a/a.go
import pytest from nose.tools import * # noqa: import functools from framework.auth.core import Auth from api.base.settings.defaults import API_BASE from tests.base import ApiTestCase from osf_tests.factories import ( ProjectFactory, AuthUserFactory, RegistrationFactory ) @pytest.mark.enable_quickfiles_...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 Abhijit Menon-Sen <ams@2ndQuadrant.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 ...
unknown
codeparrot/codeparrot-clean
apiVersion: v1 kind: Pod metadata: name: kube-addon-manager namespace: kube-system labels: component: kube-addon-manager spec: securityContext: seccompProfile: type: RuntimeDefault runAsUser: {{runAsUser}} runAsGroup: {{runAsGroup}} priorityClassName: system-node-critical priority: 200...
unknown
github
https://github.com/kubernetes/kubernetes
cluster/gce/manifests/kube-addon-manager.yaml
import collections from math import ceil from django.utils import six class InvalidPage(Exception): pass class PageNotAnInteger(InvalidPage): pass class EmptyPage(InvalidPage): pass class Paginator(object): def __init__(self, object_list, per_page, orphans=0, allow_empty_first_pag...
unknown
codeparrot/codeparrot-clean
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
unknown
codeparrot/codeparrot-clean
/* * 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/logging/log4j2/ElasticCommonSchemaStructuredLogFormatter.java
# -*- coding: utf-8 -*- """ flask.app ~~~~~~~~~ This module implements the central WSGI application object. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import sys from threading import Lock from datetime import timedelta from itertools import ...
unknown
codeparrot/codeparrot-clean