code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import print_function
import filecmp
import gyp.common
import gyp.xcodeproj_file
import gyp.xcode_ninja
import errno
import os
import sys
import p... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | unknown | codeparrot/codeparrot-clean | ||
from bokeh.io import vplot
from bokeh.models import ColumnDataSource, DataRange1d, Plot, LinearAxis, Grid, Circle, HoverTool, BoxSelectTool
from bokeh.models.widgets import DataTable, TableColumn, StringFormatter, NumberFormatter, StringEditor, IntEditor, NumberEditor, SelectEditor
from bokeh.embed import file_html
fro... | unknown | codeparrot/codeparrot-clean | ||
# ===========================================================================
# eXe
# Copyright 2004-2006, University of Auckland
# Copyright 2006-2008 eXe Project, http://eXeLearning.org/
#
# 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 for Annotation Xmodule functional logic."
import unittest
from mock import Mock
from lxml import etree
from xblock.field_data import DictFieldData
from xblock.fields import ScopeIds
from xmodule.videoannotation_module import VideoAnnotationModule
from . import get_test_system
class Vi... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# 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 | ||
pr: 139685
summary: Reduce priority of clear-cache tasks
area: Machine Learning
type: bug
issues: [] | unknown | github | https://github.com/elastic/elasticsearch | docs/changelog/139685.yaml |
{
"private": true,
"scripts": {
"dev": "next --turbo",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@svgr/webpack": "6.5.1",
"@types/node": "^18.11.9",
"@types/react... | json | github | https://github.com/vercel/next.js | examples/with-turbopack-loaders/package.json |
# testing/util.py
# Copyright (C) 2005-2017 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
from ..util import jython, pypy, defaultdict, decorator, py2k
import decimal
import ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env bash
set -eux
function cleanup {
ansible-playbook -i "${INVENTORY_PATH}" cleanup.yml -e "output_dir=${OUTPUT_DIR}" -b "$@"
unset ANSIBLE_CACHE_PLUGIN
unset ANSIBLE_CACHE_PLUGIN_CONNECTION
}
trap 'cleanup "$@"' EXIT
# setup required roles
ln -s ../../setup_remote_tmp_dir roles/setup_remote... | unknown | github | https://github.com/ansible/ansible | test/integration/targets/fetch/runme.sh |
# coding: utf-8
#
# Copyright (C) 2015-2016 YouCompleteMe contributors
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe 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,... | unknown | codeparrot/codeparrot-clean | ||
use bytes::BufMut;
use std::future::poll_fn;
use std::io;
use std::pin::Pin;
use tokio::io::AsyncRead;
/// Read data from an `AsyncRead` into an implementer of the [`BufMut`] trait.
///
/// [`BufMut`]: bytes::BufMut
///
/// # Example
///
/// ```
/// use bytes::{Bytes, BytesMut};
/// use tokio_stream as stream;
/// use... | rust | github | https://github.com/tokio-rs/tokio | tokio-util/src/io/read_buf.rs |
# -*- coding: utf-8 -
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
from functools import partial
import errno
import sys
try:
import eventlet
except ImportError:
raise RuntimeError("You need eventlet installed to use this worker.")
# validate the ev... | unknown | codeparrot/codeparrot-clean | ||
/*!
An implementation of `grep-matcher`'s `Matcher` trait for Rust's regex engine.
*/
#![deny(missing_docs)]
pub use crate::{
error::{Error, ErrorKind},
matcher::{RegexCaptures, RegexMatcher, RegexMatcherBuilder},
};
mod ast;
mod ban;
mod config;
mod error;
mod literal;
mod matcher;
mod non_matching;
mod stri... | rust | github | https://github.com/BurntSushi/ripgrep | crates/regex/src/lib.rs |
WIP ML Build Docker container for ML repositories (Tensorflow, JAX and XLA).
This container branches off from
/tensorflow/tools/tf_sig_build_dockerfiles/. However, since
hermetic CUDA and hermetic Python is now available for Tensorflow, a lot of the
requirements installed on the original container can be removed to re... | unknown | github | https://github.com/tensorflow/tensorflow | ci/official/containers/ml_build/README.md |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Jiangge Zhang <tonyseek@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 Li... | unknown | codeparrot/codeparrot-clean | ||
#include <c10/util/LeftRight.h> | cpp | github | https://github.com/pytorch/pytorch | c10/util/LeftRight.cpp |
# Copyright (c) 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | unknown | codeparrot/codeparrot-clean | ||
//===--- DominatorTree.swift - the dominator tree -------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | swift | github | https://github.com/apple/swift | SwiftCompilerSources/Sources/Optimizer/Analysis/DominatorTree.swift |
# encoding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
clean_html,
xpath_text,
int_or_none,
)
class NTVRuIE(InfoExtractor):
IE_NAME = 'ntv.ru'
_VALID_URL = r'http://(?:www\.)?ntv\.ru/(?P<id>.+)'
_TESTS = [
{
'url':... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utilities for dealing with the python unittest module."""
import fnmatch
import sys
import unittest
class _TextTestResult(unittest._TextTestResult):... | unknown | codeparrot/codeparrot-clean | ||
use displaydoc::Display;
#[derive(Display)]
enum EmptyInside {}
static_assertions::assert_impl_all!(EmptyInside: core::fmt::Display); | rust | github | https://github.com/nodejs/node | deps/crates/vendor/displaydoc/tests/variantless.rs |
#!/usr/bin/env python3
# ===--- convertToJSON.py ------------------------------------------------===//
#
# 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... | python | github | https://github.com/apple/swift | benchmark/utils/convertToJSON.py |
# -*- coding: utf-8 -*-
# Copyright (c) 2014, 2015 Mitch Garnaat
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2008-2009 Citrix Systems Inc.
#
# 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; version 2 only.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ... | unknown | codeparrot/codeparrot-clean | ||
#!/bin/sh
test_description='CRLF conversion'
. ./test-lib.sh
has_cr() {
tr '\015' Q <"$1" | grep Q >/dev/null
}
test_expect_success setup '
git config core.autocrlf false &&
echo "one text" > .gitattributes &&
test_write_lines Hello world how are you >one &&
test_write_lines I am very very fine thank you >t... | unknown | github | https://github.com/git/git | t/t0026-eol-config.sh |
# -*- coding: utf-8 -*-
import re
from module.plugins.Crypter import Crypter
from module.plugins.hoster.MediafireCom import checkHTMLHeader
from module.common.json_layer import json_loads
class MediafireComFolder(Crypter):
__name__ = "MediafireComFolder"
__type__ = "crypter"
__pattern__ = r"http://(\w*\.)... | unknown | codeparrot/codeparrot-clean | ||
"""Simple reference counter implementations."""
import abc
class BaseReferenceCounter(object):
"""Abstract base class for reference counters."""
__metaclass__ = abc.ABCMeta
__slots__ = []
def inc(self, key):
"""Abstract increment interface.
Args:
key: Key whose reference ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: UTF-8 -*-
#######################################################################
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# @tantrumdev wrote this file. As long as you retain this notice you
# can do whatever you want wit... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c), meiliu@fusionlayer.com, 2017
#
# 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 Li... | unknown | codeparrot/codeparrot-clean | ||
#ifndef CURLINC_CURLVER_H
#define CURLINC_CURLVER_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_... | c | github | https://github.com/ktorio/ktor | ktor-client/ktor-client-curl/desktop/interop/include/curl/curlver.h |
ON = '-'
OFF = '.'
ON_BIT = '1'
OFF_BIT = '0'
SEPARATOR = ':'
def dec_to_bin(num):
bits = []
while True:
bits.append(str(num % 2))
num //= 2
if num == 0:
break
bits.reverse()
return "".join(bits)
def checkio(timestring):
hh, mm, ss = timestring... | unknown | codeparrot/codeparrot-clean | ||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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://... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env bash
# Copyright 2018 The Cockroach Authors.
#
# Use of this software is governed by the CockroachDB Software License
# included in the /LICENSE file.
# Detect whether the installed version of Go can build this version of
# CockroachDB.
#
# To bump the required version of Go, edit the appropriate varia... | unknown | github | https://github.com/cockroachdb/cockroach | build/go-version-check.sh |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Ivan Kopeykin @vankop
*/
"use strict";
const makeSerializable = require("../util/makeSerializable");
const ContextDependency = require("./ContextDependency");
const ModuleDependencyTemplateAsRequireId = require("./ModuleDependencyTemplateAsReq... | javascript | github | https://github.com/webpack/webpack | lib/dependencies/ImportMetaContextDependency.js |
# (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 | ||
/*
* Builtin "git commit-commit"
*
* Copyright (c) 2014 Michael J Gruber <git@drmicha.warpmail.net>
*
* Based on git-verify-tag
*/
#include "builtin.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "object-name.h"
#include "commit.h"
#include "parse-options.h"
#include "gpg-interface.... | c | github | https://github.com/git/git | builtin/verify-commit.c |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pogoprotos/settings/level_settings.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf ... | unknown | codeparrot/codeparrot-clean | ||
/* origin: FreeBSD /usr/src/lib/msun/src/e_j0.c */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunSoft, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely ... | rust | github | https://github.com/nodejs/node | deps/crates/vendor/libm/src/math/j0.rs |
/*
* Copyright (C) 2007 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 | guava/src/com/google/common/collect/LinkedListMultimap.java |
#!/usr/bin/python
#
# 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
# "Lice... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2011 Marco Conti
# 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, sof... | unknown | codeparrot/codeparrot-clean | ||
// #docregion
import {Directive, forwardRef} from '@angular/core';
import {
AbstractControl,
NG_VALIDATORS,
ValidationErrors,
Validator,
ValidatorFn,
} from '@angular/forms';
// #docregion cross-validation-validator
/** An actor's name can't match the actor's role */
export const unambiguousRoleValidator: Va... | typescript | github | https://github.com/angular/angular | adev/src/content/examples/form-validation/src/app/shared/unambiguous-role.ts |
#!/usr/bin/python
# (c) 2013, Paul Durivage <paul.durivage@rackspace.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import division, absolute_import, print_function
import sys
import warnings
import numpy as np
from numpy import array, arange, nditer, all
from numpy.compat import asbytes, sixu
from numpy.core.multiarray_tests import test_nditer_too_large
from numpy.testing import (
run_module_suite, assert_, as... | unknown | codeparrot/codeparrot-clean | ||
import numpy as np
from tf import transformations
bbetData = np.loadtxt('bb23.txt', delimiter=',')
bbhtData = np.loadtxt('bb21.txt', delimiter=',')
hcetData = np.loadtxt('hc23.txt', delimiter=',')
bbetIds = bbetData[:, 0]
bbhtIds = bbhtData[:, 0]
hcetIds = hcetData[:, 0]
validIds = np.intersect1d(bbetIds, np.interse... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2009 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 math
// Modf returns integer and fractional floating-point numbers
// that sum to f. Both values have the same sign as f.
//
// Special cases are:
//
/... | go | github | https://github.com/golang/go | src/math/modf.go |
#
# Copyright (c) 2014 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 | ||
# -*- coding: utf-8 -*-
"""
***************************************************************************
SextanteToolsTest.py
---------------------
Date : April 2013
Copyright : (C) 2013 by Victor Olaya
Email : volayaf at gmail dot com
**********************... | unknown | codeparrot/codeparrot-clean | ||
// RUN: pp-trace -callbacks '*,-FileChanged,-MacroDefined' %s -- -target x86_64-unknown-windows-msvc -fms-extensions -w | FileCheck --strict-whitespace %s
#pragma comment(compiler, "compiler comment")
#pragma comment(exestr, "exestr comment")
#pragma comment(lib, "lib comment")
#pragma comment(linker, "linker comment"... | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/test/pp-trace/pp-trace-pragma-ms.cpp |
# -*- coding: utf-8 -*-
#
# packages.py — packages table model
#
# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/
#
# Copyright © 2008 Jonny Lamb <jonny@debian.org>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated do... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) 2009 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/base/SplitterTest.java |
from __future__ import print_function, division
import decimal
import fractions
import math
import re as regex
from collections import defaultdict
from .containers import Tuple
from .sympify import converter, sympify, _sympify, SympifyError
from .singleton import S, Singleton
from .expr import Expr, AtomicExpr
from .... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
import mock
from mock import PropertyMock
from mock import MagicMock
from annotran import admin
from annotran.admin import *
from pyramid import httpexceptions as exc
_SENTINEL = object()
def _mock_request(feature=None, settings=None, params=None,
authenticated_userid=_SENTI... | unknown | codeparrot/codeparrot-clean | ||
"""SCons.Platform.win32
Platform-specific initialization for Win32 systems.
There normally shouldn't be any need to import this module directly. It
will usually be imported through the generic SCons.Platform.Platform()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The ... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.exceptions.base;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import org.junit.Test;
import org.mockitoutil.TestBase;
public class MockitoEx... | java | github | https://github.com/mockito/mockito | mockito-core/src/test/java/org/mockito/exceptions/base/MockitoExceptionTest.java |
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of ... | unknown | codeparrot/codeparrot-clean | ||
// RUN: mkdir -p %t.dir/clang-tidy/list-checks/
// RUN: echo '{Checks: "-*,google-*"}' > %t.dir/clang-tidy/.clang-tidy
// RUN: cd %t.dir/clang-tidy/list-checks
// RUN: clang-tidy -list-checks | grep "^ *google-" | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/test/clang-tidy/infrastructure/list-checks.cpp |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models, _
from odoo.exceptions import UserError
class ReportStockRule(models.AbstractModel):
_name = 'report.stock.report_stock_rule'
_description = 'Stock rule report'
@api.model
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# encoding: utf-8
# filename: apresentacaoDeTrabalho.py
#
# scriptLattes V8
# Copyright 2005-2013: Jesús P. Mena-Chalco e Roberto M. Cesar-Jr.
# http://scriptlattes.sourceforge.net/
#
#
# Este programa é um software livre; você pode redistribui-lo e/ou
# modifica-lo dentro dos termos da Licença P... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""Tests for website.addons.box.utils."""
import mock
from nose.tools import * # noqa (PEP8 asserts)
from framework.auth import Auth
from website.project.model import NodeLog
from tests.factories import ProjectFactory
from website.addons.box.tests.factories import BoxFileFactory
from websit... | unknown | codeparrot/codeparrot-clean | ||
# frozen_string_literal: true
class DrinkDesigner < ActiveRecord::Base
has_one :chef, as: :employable
accepts_nested_attributes_for :chef
end
class DrinkDesignerWithPolymorphicDependentNullifyChef < ActiveRecord::Base
self.table_name = "drink_designers"
has_one :chef, as: :employable, dependent: :nullify
end... | ruby | github | https://github.com/rails/rails | activerecord/test/models/drink_designer.rb |
# Copyright 2017 the V8 project 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 itertools
from ..testproc.base import (
DROP_RESULT, DROP_OUTPUT, DROP_PASS_OUTPUT, DROP_PASS_STDOUT)
from ..local import statusfile
from ..tes... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import division
import random
import tempfile
from twisted.internet import defer, reactor
from twisted.trial import unittest
from twisted.web import client, resource, server
from p2pool import data, node, work
from p2pool.bitcoin import data as bitcoin_data, networks, worker_interface
from p2pool.uti... | unknown | codeparrot/codeparrot-clean | ||
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | unknown | codeparrot/codeparrot-clean | ||
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2006, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the fol... | cpp | github | https://github.com/opencv/opencv | 3rdparty/openexr/IlmImf/ImfRationalAttribute.cpp |
# frozen_string_literal: true
require "helper"
class TestTagInclude < TagUnitTest
context "include tag with parameters" do
context "with symlink'd include" do
should "not allow symlink includes" do
FileUtils.mkdir_p("tmp")
File.write("tmp/pages-test", "SYMLINK TEST")
assert_raises ... | ruby | github | https://github.com/jekyll/jekyll | test/test_tag_include.rb |
# 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 | ||
#!/usr/bin/env python3
# Copyright (c) 2016-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import re
import fnmatch
import sys
import subprocess
import datetime
import os
########################... | unknown | codeparrot/codeparrot-clean | ||
package kotlinx.coroutines
import kotlinx.coroutines.testing.*
import org.junit.*
class AwaitJvmTest : TestBase() {
@Test
public fun testSecondLeak() = runTest {
// This test is to make sure that handlers installed on the second deferred do not leak
val d1 = CompletableDeferred<Int>()
... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | kotlinx-coroutines-core/jvm/test/AwaitJvmTest.kt |
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/allwinner,sun8i-a83t-de2-mixer.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Allwinner Display Engine 2.0 Mixer
maintainers:
- Chen-Yu Tsai <wens@csie.org>
- Maxime Ripard <mripard@kernel.org>
proper... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/display/allwinner,sun8i-a83t-de2-mixer.yaml |
import urllib2, urllib, sys, os, re, random, copy, time
import htmlcleaner
from BeautifulSoup import BeautifulSoup, Tag, NavigableString
import xbmc,xbmcplugin,xbmcgui,xbmcaddon
from t0mm0.common.net import Net
from t0mm0.common.addon import Addon
from scrapers import CommonScraper
net = Net()
class AllucServiceSracpe... | unknown | codeparrot/codeparrot-clean | ||
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | java | github | https://github.com/apache/hadoop | hadoop-cloud-storage-project/hadoop-tos/src/main/java/org/apache/hadoop/fs/tosfs/object/exceptions/ChecksumMismatchException.java |
"""A CallTip window class for Tkinter/IDLE.
After ToolTip.py, which uses ideas gleaned from PySol
Used by the CallTips IDLE extension.
"""
from tkinter import Toplevel, Label, LEFT, SOLID, TclError
HIDE_VIRTUAL_EVENT_NAME = "<<calltipwindow-hide>>"
HIDE_SEQUENCES = ("<Key-Escape>", "<FocusOut>")
CHECKHIDE_VIRTUAL_EVE... | 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 applicable law or a... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/core/platform/types.h |
import time
from mitmproxy import exceptions
BLOCKSIZE = 1024
# It's not clear what the upper limit for time.sleep is. It's lower than the
# maximum int or float. 1 year should do.
FOREVER = 60 * 60 * 24 * 365
def send_chunk(fp, val, blocksize, start, end):
"""
(start, end): Inclusive lower bound, exclusi... | unknown | codeparrot/codeparrot-clean | ||
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
import os
from tempfile import mkdtemp
from shutil import rmtree
import numpy as np
import nibabel as nb
from nipype.testing import (assert_equal, assert_not_equal,
assert_rai... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env 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 ... | unknown | codeparrot/codeparrot-clean | ||
export const x00 = "x00";
export const x01 = "x01";
export const x02 = "x02";
export const x03 = "x03";
export const x04 = "x04";
export const x05 = "x05";
export const x06 = "x06";
export const x07 = "x07";
export const x08 = "x08";
export const x09 = "x09";
export const x10 = "x10";
export const x11 = "x11";
export c... | javascript | github | https://github.com/webpack/webpack | test/cases/optimize/many-exports-100/module.js |
# Run tests for functions in Python/fileutils.c.
import os
import os.path
import unittest
from test.support import import_helper
# Skip this test if the _testcapi module isn't available.
_testcapi = import_helper.import_module('_testinternalcapi')
class PathTests(unittest.TestCase):
def test_capi_normalize_path... | python | github | https://github.com/python/cpython | Lib/test/test_fileutils.py |
# This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | unknown | codeparrot/codeparrot-clean | ||
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"reso... | json | github | https://github.com/vercel/next.js | examples/blog-with-comment/tsconfig.json |
# Copyright 2017 The UAI-SDK 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 applicable... | unknown | codeparrot/codeparrot-clean | ||
"""
Settings that modify processing of user text input
"""
from askbot.conf.settings_wrapper import settings
from askbot.conf.super_groups import DATA_AND_FORMATTING
from askbot.deps.livesettings import ConfigurationGroup
from askbot.deps.livesettings import BooleanValue, StringValue, LongStringValue
from askbot impor... | unknown | codeparrot/codeparrot-clean | ||
"Test statusbar, coverage 100%."
from idlelib import statusbar
import unittest
from test.support import requires
from tkinter import Tk
class Test(unittest.TestCase):
@classmethod
def setUpClass(cls):
requires('gui')
cls.root = Tk()
cls.root.withdraw()
@classmethod
def tearDo... | python | github | https://github.com/python/cpython | Lib/idlelib/idle_test/test_statusbar.py |
#! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import os,sys
from waflib.TaskGen import feature,after_method
from waflib import Utils,Task,Logs,Options
testlock=Utils.threading.Lock()
@feature('test')
@after_method('apply_... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... | unknown | codeparrot/codeparrot-clean | ||
"Test pyshell, coverage 12%."
# Plus coverage of test_warning. Was 20% with test_openshell.
from idlelib import pyshell
import unittest
from test.support import requires
from tkinter import Tk
class FunctionTest(unittest.TestCase):
# Test stand-alone module level non-gui functions.
def test_restart_line_wid... | unknown | codeparrot/codeparrot-clean | ||
import os
import shutil
import sys
from django.core.exceptions import ImproperlyConfigured
from django.db.backends.base.creation import BaseDatabaseCreation
from django.utils.six.moves import input
class DatabaseCreation(BaseDatabaseCreation):
def _get_test_db_name(self):
test_database_name = self.connec... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
determine_ext,
parse_duration,
unified_strdate,
)
class HuffPostIE(InfoExtractor):
IE_DESC = 'Huffington Post'
_VALID_URL = r'''(?x)
https?://(embed\.)?live\.huffingtonpost\.com/
... | unknown | codeparrot/codeparrot-clean | ||
from django.db import models
# Create your models here.
class Transaction(models.Model):
# Transaction id sent by merchant.
transaction_id = models.CharField(max_length=100)
# Payment gateway type used in transaction
payment_gateway_type = models.CharField(max_length=20, null=True, blank=True) # Map... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2010-2025 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.renderer.types.renderers
import org.jetbrains.kotlin.analysis.api.K... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/renderer/types/renderers/KaTypeParameterTypeRenderer.kt |
# -*- coding: utf-8 -*-
# ####################################################################
# Copyright (C) 2005-2013 by the FIFE team
# http://www.fifengine.net
# This file is part of FIFE.
#
# FIFE is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#... | unknown | codeparrot/codeparrot-clean | ||
#!/bin/sh
#
# Copyright (c) 2013 Ramkumar Ramachandra
#
test_description='git rebase --autostash tests'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
test_expect_success setup '
echo hello-world >file0 &&
git add . &&
test_tick &&
git commit -m "initial com... | unknown | github | https://github.com/git/git | t/t3420-rebase-autostash.sh |
import fnmatch
import os
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
def matches_patterns(path, patterns=None):
"""
Return True or False depending on whether the ``path`` should be
ignored (if it matches any pattern in ``ignore_patterns``).
"""
if patte... | unknown | codeparrot/codeparrot-clean | ||
/*
* Implementation of safe memory reclamation scheme using
* quiescent states. See InternalDocs/qsbr.md.
*
* This is derived from the "GUS" safe memory reclamation technique
* in FreeBSD written by Jeffrey Roberson. It is heavily modified. Any bugs
* in this code are likely due to the modifications.
*
* The o... | c | github | https://github.com/python/cpython | Python/qsbr.c |
# Copyright 2008 VIFF Development Team.
#
# This file is part of VIFF, the Virtual Ideal Functionality Framework.
#
# VIFF is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License (LGPL) as
# published by the Free Software Foundation, either version 3 of the
... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals
import boto
import sure # noqa
from moto import mock_ec2
@mock_ec2
def test_virtual_private_gateways():
conn = boto.connect_vpc('the_key', 'the_secret')
vpn_gateway = conn.create_vpn_gateway('ipsec.1', 'us-east-1a')
vpn_gateway.should_not.be.none
vpn_gateway.i... | unknown | codeparrot/codeparrot-clean | ||
/*-------------------------------------------------------------------------
*
* pgoutput.c
* Logical Replication output plugin
*
* Copyright (c) 2012-2026, PostgreSQL Global Development Group
*
* IDENTIFICATION
* src/backend/replication/pgoutput/pgoutput.c
*
*----------------------------------------------... | c | github | https://github.com/postgres/postgres | src/backend/replication/pgoutput/pgoutput.c |
# Deliberately use "from dataclasses import *". Every name in __all__
# is tested, so they all must be present. This is a way to catch
# missing ones.
from dataclasses import *
import abc
import annotationlib
import io
import pickle
import inspect
import builtins
import types
import weakref
import traceback
import ... | python | github | https://github.com/python/cpython | Lib/test/test_dataclasses/__init__.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.