code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# Gnome15 - Suite of tools for the Logitech G series keyboards and headsets # Copyright (C) 2011 Brett Smith <tanktarta@blueyonder.co.uk> # # 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, e...
unknown
codeparrot/codeparrot-clean
""" Tests for built in Function expressions. """ from django.db import models class Author(models.Model): name = models.CharField(max_length=50) alias = models.CharField(max_length=50, null=True, blank=True) goes_by = models.CharField(max_length=50, null=True, blank=True) age = models.PositiveSmallInte...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Tests\Auth; use Illuminate\Foundation\Auth\User; use PHPUnit\Framework\TestCase; class AuthenticatableTest extends TestCase { public function testItReturnsSameRememberTokenForString() { $user = new User; $user->setRememberToken('sample_token'); $this->assert...
php
github
https://github.com/laravel/framework
tests/Auth/AuthenticatableTest.php
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-PSRemoting', 'Author': ['@harmj0y'], 'Description': ('Executes a stager on remote hosts using PSRemoting.'), 'Background' : False, ...
unknown
codeparrot/codeparrot-clean
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- from __future__ import absolute_import from svtplay_dl.output import output, ETA, progressbar from svtplay_dl.fetcher import VideoRetriever class HTTP(VideoRetriever): def name(self): return "http" def download(s...
unknown
codeparrot/codeparrot-clean
#pragma once #include <ATen/functorch/Interpreter.h> namespace at::functorch { // These are the interpreters for our AD transforms // (grad, vjp and jvp). // See NOTE: [functorch interpreter stack] for more details. struct TORCH_API GradInterpreterPtr { explicit GradInterpreterPtr(const Interpreter* base): base_(b...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/functorch/ADInterpreters.h
import numpy as np import xray import glob import re import thermoplotting as tp import matplotlib.pyplot as plt from scipy import integrate from collections import OrderedDict headerdict=OrderedDict([("formation_energy","U"), ("Ni","N0"), ("Al","N1"), ("generalized_enthalpy","phi"...
unknown
codeparrot/codeparrot-clean
/* Copyright (c) 2000, 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
include/my_xml.h
<?php namespace Illuminate\Support\Testing\Fakes; use BadMethodCallException; use Closure; use Illuminate\Bus\UniqueLock; use Illuminate\Contracts\Cache\Repository as Cache; use Illuminate\Contracts\Queue\Queue; use Illuminate\Contracts\Queue\ShouldBeUnique; use Illuminate\Events\CallQueuedListener; use Illuminate\Qu...
php
github
https://github.com/laravel/framework
src/Illuminate/Support/Testing/Fakes/QueueFake.php
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
unknown
codeparrot/codeparrot-clean
name: job-filter # Job Filter Rules (for trunk.yml, pull.yml) # ========================================== # 1. DEFAULT PATTERN - use job's display name (from `name:` field) with space padding: # if: ${{ needs.job-filter.outputs.jobs == '' || contains(needs.job-filter.outputs.jobs, ' DISPLAY-NAME ') }} # nee...
unknown
github
https://github.com/pytorch/pytorch
.github/workflows/job-filter.yml
import shutil, os, sys import logging from gtrackcore.input.adapters.TrackGenomeElementSource import TrackViewListGenomeElementSource from gtrackcore.preprocess.PreProcessTracksJob import PreProcessTrackGESourceJob from gtrackcore.track.hierarchy.ProcTrackNameSource import ProcTrackNameSource from gtrackcore.track.hie...
unknown
codeparrot/codeparrot-clean
#pragma once // TODO: unify to C10_MOBILE. In theory this header could be used in OSS. #ifdef TEMPLATE_SELECTIVE_BUILD #include <ATen/selected_mobile_ops.h> #endif /** * This header implements functionality to build PyTorch with only a certain * set of operators (+ dependencies) included. * * - Build with -DTORCH...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/core/op_registration/op_allowlist.h
import logging import sys from modularodm import Q from framework.mongo import database from framework.transactions.context import TokuTransaction from website.addons.box.model import BoxNodeSettings from website.app import init_app from scripts import utils as script_utils logger = logging.getLogger(__name__) def...
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
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, ...
java
github
https://github.com/elastic/elasticsearch
build-tools/src/main/java/org/elasticsearch/gradle/AbstractLazyPropertyCollection.java
#!/usr/bin/env python # -*- coding:utf-8 -*- from ..units.general import Velocity, Time, Distance from ..data.constants import LIGHT_VELOCITY from ..movement import Movement from ..relativity import contraction_factor, lorentz_factor, time_dilation, \ length_contraction, RelativistMovement import pytest class Te...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from rest_framework import serializers from models import Category, Post, Announcement # initiate logger logging.getLogger(__name__) class CategorySerializer(serializers.HyperlinkedModelSerializer): """ CategorySerializer """...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2016 W3C # Released under the W3C Test Suite License: see LICENSE.txt # This tool creates .html test files for the WPT harness from corresponding .test # files that it finds in the tree for this test collection. import re import time import json import fnmatch import os import shutil import sys import...
unknown
codeparrot/codeparrot-clean
import datetime from django.db import models class Channel(models.Model): name = models.CharField(max_length=60) active = models.BooleanField(default=False) tags = models.ManyToManyField('Tag',related_name='channels',blank=True) logo = models.URLField(blank=True) preview = model...
unknown
codeparrot/codeparrot-clean
from aexpect import ShellError from autotest.client.shared import error from virttest.virt_vm import VMStartError from virttest.libvirt_xml.vm_xml import VMXML from virttest.libvirt_xml.devices.controller import Controller from virttest.libvirt_xml.xcepts import LibvirtXMLError from virttest.remote import LoginError ...
unknown
codeparrot/codeparrot-clean
import os from pick_model_runs_fun import fun_test_reference_run, get_exe_path this_fp = os.path.dirname(os.path.abspath(__file__)) # test_example_dir = os.path.abspath(os.path.join(this_fp, 'SEAWAT', '1_box', 'case1')) test_example_dir = os.path.abspath(os.path.join(this_fp, 'SEAWAT', '5_saltlake')) # test_example_d...
unknown
codeparrot/codeparrot-clean
# mysql/mysqlconnector.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+mysqlconnector :name: MySQL Connector/Python ...
unknown
codeparrot/codeparrot-clean
from cms.models import Page, Title from django.contrib import admin from django.contrib.admin.options import csrf_protect_m from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect class ExtensionAdmin(admin.ModelAdmin): pass cla...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 # Copyright (c) 2015 Spotify AB # # 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
# Author: Nic Wolfe <nic@wolfeden.ca> # Author: Gordon Turner <gordonturner@gordonturner.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2012 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
android/guava/src/com/google/common/hash/ChecksumHashFunction.java
--- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/service-tokens-command.html applies_to: deployment: self: ga --- # elasticsearch-service-tokens [service-tokens-command] Use the `elasticsearch-service-tokens` command to create, list, and delete file-based service account tok...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch/command-line-tools/service-tokens-command.md
#!/usr/bin/python ############################################################ # For Penn genomes, 06.2020 # Takes a log file from a clipkit run on amino acid sequence # and removes corresponding sites from codon alignment. ############################################################ import sys, os, core, coreseq, arg...
unknown
codeparrot/codeparrot-clean
import media import fresh_tomatoes # list of movies # instance of movie class toy = media.Movie(" Toy Story ", "A story of boy and his toys", "https://upload.wikimedia.org/wikipedia/en/1/13/Toy_Story.jpg", # noqa "https://www.youtube.com/watch?v=KYz2wyBy3kc", # n...
unknown
codeparrot/codeparrot-clean
/* 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/COFF/Relocation.hpp
#!/usr/bin/python # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2011 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.com>). # # This p...
unknown
codeparrot/codeparrot-clean
# Authors: # Trevor Perrin # Google - parsing subject field # # See the LICENSE file for legal information regarding use of this file. """Class representing an X.509 certificate.""" from .utils.asn1parser import ASN1Parser from .utils.cryptomath import * from .utils.keyfactory import _createPublicRSAKey from .uti...
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.standalone.fir.test.cases.lowLevelFir; import com.intellij.testFram...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/lowLevelFir/StandalonePsiClassResolveToFirSymbolTestGenerated.java
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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 witho...
unknown
codeparrot/codeparrot-clean
prelude: | class C def m 1 end end class CC < C def m super() end end obj = CC.new benchmark: vm_super: obj.m loop_count: 6000000
unknown
github
https://github.com/ruby/ruby
benchmark/vm_super.yml
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
from django.shortcuts import render from django.views.generic import ListView, DetailView, UpdateView from django.core.urlresolvers import reverse from django.db.models import Count, Sum, F from .models import Family, Caregiver, Member, Person TEMP_ORG_NAME = 'Conversion Group' TEMP_ORG_ID = 45 class MemberDetail(De...
unknown
codeparrot/codeparrot-clean
#Copyright (C) 2016 Paolo Galeone <nessuno@nerdz.eu> # #This Source Code Form is subject to the terms of the Mozilla Public #License, v. 2.0. If a copy of the MPL was not distributed with this #file, You can obtain one at http://mozilla.org/MPL/2.0/. #Exhibit B is not attached; this software is compatible with the #lic...
unknown
codeparrot/codeparrot-clean
import time import numpy as np import torch """Microbenchmarks for Tensor repeat operator. Supports PyTorch.""" input_shapes = ( (4, 4, 1), (16, 1, 32), (64, 64, 1, 1), (8, 256, 128), (1, 64, 128, 32), (512, 512), ) repeats = ( (1, 1, 1, 64), (1, 4, 1, 2), (1, 2, 2, 15), (1,...
python
github
https://github.com/pytorch/pytorch
benchmarks/operator_benchmark/common/repeat_benchmark.py
/* Copyright (c) 2012, 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 b...
c
github
https://github.com/mysql/mysql-server
include/pfs_file_provider.h
# 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
// Copyright 2022 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package storage import ( "bytes" "context" "fmt" "testing" "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/settings/cluster"...
go
github
https://github.com/cockroachdb/cockroach
pkg/storage/backup_compaction_iterator_test.go
"""Tests to ensure that the html5lib tree builder generates good trees.""" import warnings try: from bs4.builder import HTML5TreeBuilder HTML5LIB_PRESENT = True except ImportError, e: HTML5LIB_PRESENT = False from bs4.element import SoupStrainer from bs4.testing import ( HTML5TreeBuilderSmokeTest, ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.engine.android import io.ktor.client.* import io.ktor.client.engine.* /** * A JVM/Android client engine that uses `HttpURLConnection` under the hood. * You can use t...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-android/jvm/src/io/ktor/client/engine/android/Android.kt
import unittest import tkinter from test.support import requires from test.test_tkinter.support import setUpModule # noqa: F401 from test.test_tkinter.support import AbstractTkTest requires('gui') class TextTest(AbstractTkTest, unittest.TestCase): def setUp(self): super().setUp() self.text = tki...
python
github
https://github.com/python/cpython
Lib/test/test_tkinter/test_text.py
//===--- Relation.cpp --------------------------------------------*- C++-*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clangd/index/Relation.cpp
# # Model of E. coli # # Spatial Scale: 1 micron # Simulation Engine: Nucleus # import pymel.core as pm import maya.cmds as mc import maya.mel as mel pm_parts = pm.nParticle( p=[(0, 0, -6), (0, 0, 6)], n="parts") # protects against multiple objects called "parts" parts_nm = pm_parts[1].name() p_shape = mc.select(par...
unknown
codeparrot/codeparrot-clean
# Create DisplaySpecifiers LDIF (as a string) from the documents provided by # Microsoft under the WSPP. # # Copyright (C) Andrew Kroeger <andrew@id10ts.net> 2009 # # Based on ms_schema.py # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -* # # Test links: # http://forum.xda-developers.com/devdb/project/dl/?id=10885 import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class XdadevelopersCom(SimpleHoster): __name__ = "XdadevelopersCom" __type__ = "hoster" __version__ = "0.04" ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst import gc import locale import re import pytest from numpy.testing import assert_array_equal, assert_array_almost_equal import numpy as np from ...tests.helper import raises, catch_warnings from ...io import fits from .. import ...
unknown
codeparrot/codeparrot-clean
from unittest import mock, TestCase from pcs.cli.booth import env from pcs.common import report_codes, env_file_role_codes from pcs.lib.errors import LibraryEnvError, ReportItem from pcs.test.tools.misc import create_setup_patch_mixin SetupPatchMixin = create_setup_patch_mixin(env) class BoothConfTest(TestCase, Setu...
unknown
codeparrot/codeparrot-clean
{ "type": "editor", "title": "Next steps" }
json
github
https://github.com/angular/angular
adev/src/content/tutorials/signal-forms/steps/6-next-steps/config.json
#!/usr/bin/python # Copyright (c) 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. """Generate new bench expectations from results of trybots on a code review.""" import collections import compare_codereview import o...
unknown
codeparrot/codeparrot-clean
from urlparse import parse_qs import re import traceback from bs4 import BeautifulSoup from couchpotato.core.helpers.encoding import tryUrlencode, toUnicode from couchpotato.core.helpers.variable import tryInt from couchpotato.core.logger import CPLog from couchpotato.core.media._base.providers.torrent.base import Tor...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2006, 2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # boltons documentation build configuration file, created by # sphinx-quickstart on Sat Mar 21 00:34:18 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # import python libs import re import json import argparse import json import collections import copy from os import listdir from os.path import isfile, join from pprint import pprint as pp from operator import itemgetter # import project libs from constants import * f...
unknown
codeparrot/codeparrot-clean
''' AUDIO CLASSICAL COMPOSER IDENTIFICATION BASED ON: A SPECTRAL BANDWISE FEATURE-BASED SYSTEM ''' import essentia from essentia.standard import * import glob import numpy as np import arff from essentia.standard import * # Dataset creation with specific attributes (spectral features) and a specific class (composer's ...
unknown
codeparrot/codeparrot-clean
import solution import unittest class TestNakedTwins(unittest.TestCase): before_naked_twins_1 = {'I6': '4', 'H9': '3', 'I2': '6', 'E8': '1', 'H3': '5', 'H7': '8', 'I7': '1', 'I4': '8', 'H5': '6', 'F9': '7', 'G7': '6', 'G6': '3', 'G5': '2', 'E1': '8', 'G3': '1', 'G2': '8', ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' __docformat__ = 'restructuredtext en' ...
unknown
codeparrot/codeparrot-clean
import pytest from django.conf import settings from django.core.urlresolvers import NoReverseMatch from django.template import Context, Template, TemplateSyntaxError from django.utils.timezone import now from pretix.base.models import Event, Organizer from pretix.multidomain.models import KnownDomain @pytest.fixture ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python #-*- coding: utf-8 -*- ### 2008-2015 Charlie Barnes. ### 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 la...
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 agre...
java
github
https://github.com/google/guava
android/guava-testlib/src/com/google/common/collect/testing/testers/ListAddAtIndexTester.java
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your #...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ############################################################################### # $Id: polygonize.py 33793 2016-03-26 13:02:07Z goatbar $ # # Project: GDAL/OGR Test Suite # Purpose: Test Polygonize() algorithm. # Author: Frank Warmerdam <warmerdam@pobox.com> # #################################...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2012 Google, Inc. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer...
unknown
codeparrot/codeparrot-clean
""" Move a file in the safest way possible:: >>> from django.core.files.move import file_move_safe >>> file_move_safe("/tmp/old_file", "/tmp/new_file") """ import os from django.core.files import locks try: from shutil import copystat except ImportError: import stat def copystat(src, dst): ...
unknown
codeparrot/codeparrot-clean
/* * 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.client.tests import io.ktor.client.* import io.ktor.client.engine.mock.* import io.ktor.client.plugins.cookies.* import io.ktor.client.request.* import io.ktor.client.statemen...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-tests/jvm/test/io/ktor/client/tests/CookiesAndRedirectMockedTest.kt
# Authors: Eric Larson <larson.eric.d@gmail.com> # License: BSD import glob import os.path as op import numpy as np import pytest from mne import what, create_info from mne.datasets import testing from mne.io import RawArray from mne.preprocessing import ICA from mne.utils import run_tests_if_main, requires_sklearn ...
unknown
codeparrot/codeparrot-clean
import httplib import os import time import weakref from tornado.escape import utf8 from tornado import httputil from tornado.ioloop import IOLoop from tornado.util import import_object class HTTPClient(object): """A blocking HTTP client. Typical usage looks like this: http_client = httpclient.HTTPC...
unknown
codeparrot/codeparrot-clean
//===--- ClosureScope.h - Determines closure's defining scope ---*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
c
github
https://github.com/apple/swift
include/swift/SILOptimizer/Analysis/ClosureScope.h
#: Okay class X: pass #: Okay def foo(): pass #: Okay # -*- coding: utf-8 -*- class X: pass #: Okay # -*- coding: utf-8 -*- def foo(): pass #: Okay class X: def a(): pass # comment def b(): pass # This is a # ... multi-line comment def c(): pass # Th...
unknown
codeparrot/codeparrot-clean
- name: test ansible-config init for valid output and no dupes block: - name: Create temporary file tempfile: path: '{{output_dir}}' state: file suffix: temp.ini register: ini_tempfile - name: run config full dump shell: ansible-config init -t all > {{ini_tempfile.pa...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/ansible-config/tasks/main.yml
# # 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
from __future__ import unicode_literals from django.contrib.auth import get_user_model from django.contrib.sites.models import Site from django.contrib.syndication.views import Feed, add_domain from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404 from django.utils.feedgenerator i...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear...
c
github
https://github.com/opencv/opencv
3rdparty/libtiff/tif_extension.c
# (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
#!/usr/bin/env python3 from hierarchy import * def print_proof_tree(path, proofs, level=0): edge, *successors = path *tails, head = edge print((' '*level + '{} => {}{:>40}').format( ', '.join(tails), head, 'by ' + str(proofs[edge]))) for s in successors: print_proof_t...
unknown
codeparrot/codeparrot-clean
"""Routines to help recognizing sound files. Function whathdr() recognizes various types of sound file headers. It understands almost all headers that SOX can decode. The return tuple contains the following items, in this order: - file type (as SOX understands it) - sampling rate (0 if unknown or hard to decode) - nu...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re from glob import glob from setuptools import find_packages, setup from os.path import join, dirname execfile(join(dirname(__file__), 'openerp', 'release.py')) # Load release variables lib_name = 'openerp' def py2exe_datafiles(): data_files = {} ...
unknown
codeparrot/codeparrot-clean
# -*-coding:Utf-8 -* # Copyright (c) 2010 LE GOFF Vincent # 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 # lis...
unknown
codeparrot/codeparrot-clean
//===- bolt/Passes/Inliner.cpp - Inlining pass for low-level binary IR ----===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
bolt/lib/Passes/Inliner.cpp
"""PostgreSQL check Collects database-wide metrics and optionally per-relation metrics, custom metrics. """ # stdlib import socket # 3rd party import pg8000 as pg from pg8000 import InterfaceError, ProgrammingError # project from checks import AgentCheck, CheckException from config import _is_affirmative MAX_CUSTOM...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.util.collections; import static org.junit.Assert.*; import org.junit.Test; public class IdentitySetTest { IdentitySet set = new IdentitySet(); @Test publi...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockito/internal/util/collections/IdentitySetTest.java
# -*- coding:utf-8 -*- from __future__ import with_statement from distutils.version import StrictVersion from itertools import chain from select import select import os import socket import sys import threading import warnings from redis._compat import (b, xrange, imap, byte_to_chr, unicode, bytes, long, ...
unknown
codeparrot/codeparrot-clean
################################################################################ ### Copyright © 2012-2013 BlackDragonHunt ### ### This file is part of the Super Duper Script Editor. ### ### The Super Duper Script Editor is free software: you can redistribute it ### and/or modify it under the terms of the GNU General ...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/conformance/es2022/arbitraryModuleNamespaceIdentifiers/arbitraryModuleNamespaceIdentifiers_module.ts] //// //// [arbitraryModuleNamespaceIdentifiers_module.ts] const someValue = "someValue"; type someType = "someType"; export { someValue as "<X>" }; import { "<X>" as valueX } from "./arbitraryModule...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/arbitraryModuleNamespaceIdentifiers_module(module=amd).js
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Created on October 04, 2018 @author: jakob <jakob.steixner@modul.ac.at> ''' from __future__ import print_function from builtins import next from builtins import str from builtins import range import datetime import mock import pytest from eWRT.ws.wikidata.bundle_wikipedia...
unknown
codeparrot/codeparrot-clean
# Formatter (c) 2002, 2004, 2007 David Turner <david@freetype.org> # from sources import * from content import * from utils import * # This is the base Formatter class. Its purpose is to convert # a content processor's data into specific documents (i.e., table of # contents, global index, and individual API refer...
unknown
codeparrot/codeparrot-clean
"""Support for HLK-SW16 switches.""" from homeassistant.components.switch import ToggleEntity from . import DATA_DEVICE_REGISTER, SW16Device from .const import DOMAIN PARALLEL_UPDATES = 0 def devices_from_entities(hass, entry): """Parse configuration and add HLK-SW16 switch devices.""" device_client = hass.d...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (c) 2016, Nest Labs, 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: # 1. Redistributions of source code must retain the above copyright # notice, thi...
unknown
codeparrot/codeparrot-clean
''' Implementation of QProber mechanism for classifying database For ADB Project2 Part1 ''' import urllib2 import urllib import base64 import json import time import RulesReaderClass class QProber: def __init__(self, tSpec, tCov, host, keyPath): self.tSpec = tSpec self.tCov = tCov self.host = host self.bi...
unknown
codeparrot/codeparrot-clean
# Copyright 2011 Google Inc. All Rights Reserved. """Multi-credential file store with lock support. This module implements a JSON credential store where multiple credentials can be stored in one file. That file supports locking both in a single process and across processes. The credential themselves are keyed off o...
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/TriggerDag/types.ts
import * as os from "node:os"; import type { PlaywrightTestConfig } from "@playwright/test"; import { devices } from "@playwright/test"; // silence expected warnings in Node 22.12 about `require(esm)` // when it implicitly uses `react-router`'s `module-sync` export condition process.env.NODE_OPTIONS = (process.env....
typescript
github
https://github.com/remix-run/react-router
integration/playwright.config.ts
@com.google.errorprone.annotations.CheckReturnValue package com.google.common.collect.testing.suites;
java
github
https://github.com/google/guava
guava-testlib/src/com/google/common/collect/testing/suites/package-info.java
This example combines Code Splitting and Loaders. Make sure you have read the documentation of the examples that show the feature alone. The bundle loader is used to create a wrapper module for `file.js` that loads this module on demand. The wrapper module returns a function that can be called to asynchronously receiv...
unknown
github
https://github.com/webpack/webpack
examples/code-splitting-bundle-loader/template.md
# Import the future from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import import datetime import hashlib import logging import os import re import shutil import zipfile import yaml from Motome.config import ZIP_EXTENSION, NOTE_EXTENSION, ENCODING, STATUS...
unknown
codeparrot/codeparrot-clean