code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
module.exports = "c"; | javascript | github | https://github.com/webpack/webpack | examples/extra-async-chunk-advanced/c.js |
#
# Copyright 2019-2021 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (FW... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use base64::Engine;
use minisign::{
sign, KeyPair as KP, PublicKey, PublicKeyBox, SecretKey, SecretKeyBox, SignatureBox,
};
use std::{
fs::{self, File, OpenOptions},
io::{B... | rust | github | https://github.com/tauri-apps/tauri | crates/tauri-cli/src/helpers/updater_signature.rs |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''Basic Authorization tests for the OSF.'''
from __future__ import absolute_import
import unittest
import mock
from nose.tools import * # noqa PEP8 asserts
from website.addons.twofactor.tests import _valid_code
from tests.base import OsfTestCase
from tests.factories i... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Copyright (c) 2001-2010 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use,... | unknown | codeparrot/codeparrot-clean | ||
from django.core.urlresolvers import reverse
from django.http import QueryDict
from django.test import TestCase
from django.contrib.auth.models import User
from django.contrib.formtools.wizard.views import (NamedUrlSessionWizardView,
NamedUrlCookieWizardView)
from dj... | unknown | codeparrot/codeparrot-clean | ||
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
Unit tests for the `corpora.Dictionary` class.
"""
from collections import Mapping
import logging
import tempfile
import unittest
import os
import os.path
import scipy
import gensim
from gen... | unknown | codeparrot/codeparrot-clean | ||
/*
* This is a curses module for Python.
*
* Based on prior work by Lance Ellinghaus and Oliver Andrich
* Version 1.2 of this module: Copyright 1994 by Lance Ellinghouse,
* Cathedral City, California Republic, United States of America.
*
* Version 1.5b1, heavily extended for ncurses by Oliver Andrich:... | c | github | https://github.com/python/cpython | Modules/_cursesmodule.c |
from __future__ import absolute_import
import abc
class MinHashIndexBackendTestMixin(object):
__meta__ = abc.ABCMeta
@abc.abstractproperty
def index(self):
pass
def test_basic(self):
self.index.record("example", "1", [("index", "hello world")])
self.index.record("example", "2... | unknown | codeparrot/codeparrot-clean | ||
# Author: Trevor Perrin
# See the LICENSE file for legal information regarding use of this file.
"""Pure-Python RC4 implementation."""
from .rc4 import RC4
from .cryptomath import *
def new(key):
return Python_RC4(key)
class Python_RC4(RC4):
def __init__(self, keyBytes):
RC4.__init__(self, keyBytes,... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright (C) 2013-2014 Jean-Francois Romang (jromang@posteo.de)
# Shivkumar Shivaji ()
#
# 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 ... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
###########################################################
#
# Simple executor script for Batch class methods.
#
# The script is concatenated on the fly with the required
# batch system class definition
#
# ... | unknown | codeparrot/codeparrot-clean | ||
import json
import html5lib
def parse(path="html5ents.xml"):
return html5lib.parse(open(path), treebuilder="lxml")
def entity_table(tree):
return dict((entity_name("".join(tr[0].xpath(".//text()"))),
entity_characters(tr[1].text))
for tr in tree.xpath("//h:tbody/h:tr",
... | unknown | codeparrot/codeparrot-clean | ||
package kotlinx.coroutines.flow
import kotlinx.coroutines.testing.*
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.*
import kotlin.test.*
import kotlin.time.Duration.Companion.milliseconds
class DebounceTest : TestBase() {
@Test
fun testBasic() = withVirtualTime {
expect(1)
val... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | kotlinx-coroutines-core/common/test/flow/operators/DebounceTest.kt |
#! /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
# "Lic... | unknown | codeparrot/codeparrot-clean | ||
import unittest
import numpy as np
import snappy
#JAI = snappy.jpy.get_type('javax.media.jai.JAI')
#JAI.getDefaultInstance().getTileCache().setMemoryCapacity(128 * 1000 * 1000)
test_product_file = './MER_RR__1P.N1'
class TestBeamIO(unittest.TestCase):
def setUp(self):
self.product = snappy.ProductIO.r... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'looper.ui'
#
# Created: Sun Aug 31 11:04:09 2014
# by: PyQt5 UI code generator 5.3.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self... | unknown | codeparrot/codeparrot-clean | ||
# Author: Alexander Fabisch <afabisch@informatik.uni-bremen.de>
#
# License: BSD 3 clause
import sys
from sklearn.externals.six.moves import cStringIO as StringIO
import numpy as np
import warnings
from sklearn.base import BaseEstimator
from sklearn.learning_curve import learning_curve, validation_curve
from sklearn.u... | 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... | python | github | https://github.com/apache/airflow | airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dag_parsing.py |
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package command
import (
"strings"
"testing"
"github.com/hashicorp/cli"
)
func testSSHCommand(tb testing.TB) (*cli.MockUi, *SSHCommand) {
tb.Helper()
ui := cli.NewMockUi()
return ui, &SSHCommand{
BaseCommand: &BaseCommand{
UI: ui,
... | go | github | https://github.com/hashicorp/vault | command/ssh_test.go |
from test import test_support as support
# If we end up with a significant number of tests that don't require
# threading, this test module should be split. Right now we skip
# them all if we don't have threading.
threading = support.import_module('threading')
from contextlib import contextmanager
import imaplib
impo... | unknown | codeparrot/codeparrot-clean | ||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack Foundation
#
# 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/LICEN... | unknown | codeparrot/codeparrot-clean | ||
from django.conf.urls import include, patterns, url
urlpatterns = patterns('misago.users.views.auth',
url(r'^login/$', 'login', name='login'),
url(r'^logout/$', 'logout', name='logout'),
)
urlpatterns += patterns('misago.users.views.activation',
url(r'^activation/$', 'activation_noscript', name="request_a... | unknown | codeparrot/codeparrot-clean | ||
"""Simple expression that should pass with mypy."""
import operator
from collections.abc import Iterable
import numpy as np
import numpy.typing as npt
# Basic checks
array = np.array([1, 2])
def ndarray_func(x: npt.NDArray[np.float64]) -> npt.NDArray[np.float64]:
return x
ndarray_func(np.array([1, 2], dtype=np.... | python | github | https://github.com/numpy/numpy | numpy/typing/tests/data/pass/simple.py |
// 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 ).
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use icu_locale::LocaleCanonicalizer;
use icu_... | rust | github | https://github.com/nodejs/node | deps/crates/vendor/icu_locale/benches/locale_canonicalizer.rs |
''' Text annotation module '''
from lxml import etree
from pkg_resources import resource_string
from xmodule.x_module import XModule
from xmodule.raw_module import RawDescriptor
from xblock.core import Scope, String
from xmodule.annotator_mixin import get_instructions
from xmodule.annotator_token import retrieve_toke... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import unittest
import frappe
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt \
import set_perpetual_inventory, get_gl_entries, test_... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# Copyright (C) 2008 Yu-Jie Lin
#
# 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 o... | unknown | codeparrot/codeparrot-clean | ||
async function loader() {
await new Promise((r) => setTimeout(r, 500));
return {
message: `Child route loader ran at ${new Date().toISOString()}`,
};
}
export async function Component() {
let loaderData = await loader();
return (
<div style={{ border: "1px solid black", padding: "10px" }}>
<h3>... | typescript | github | https://github.com/remix-run/react-router | playground/rsc-vite/src/routes/child/child.tsx |
import re
from clusto_query.exceptions import (StringParseError,
ExpectedTokenError,
UnexpectedTokenError)
from clusto_query.query.objects import Attribute
from clusto_query.query.operator import (UNARY_BOOLEAN_OPERATORS,
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the SPORCO package. Details of the copyright
# and user license can be found in the 'LICENSE.txt' file distributed
# with the package.
"""
Greyscale ℓ1-TV Denoising
=========================
This example demonstrates the use of class :class:`.tvl1.T... | unknown | codeparrot/codeparrot-clean | ||
"""Tracers that call listeners."""
from collections.abc import Awaitable, Callable
from typing import TYPE_CHECKING
from langchain_core.runnables.config import (
RunnableConfig,
acall_func_with_variable_args,
call_func_with_variable_args,
)
from langchain_core.tracers.base import AsyncBaseTracer, BaseTrac... | python | github | https://github.com/langchain-ai/langchain | libs/core/langchain_core/tracers/root_listeners.py |
from django.db import models
from django_extensions.db.fields import UUIDField
from developer.models import Developer
from reporter.models import Reporter
import datetime
# Create your models here.
class Bug(models.Model):
guid = UUIDField(db_index=True)
title = models.CharField(max_length=100, null=False, blank=Fal... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# Copyright 2016 Red Hat | Ansible
# 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': ['previ... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/samsung,exynos5410-clock.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Samsung Exynos5410 SoC clock controller
maintainers:
- Chanwoo Choi <cw00.choi@samsung.com>
- Krzysztof Kozl... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/clock/samsung,exynos5410-clock.yaml |
#!/usr/bin/env python
# sp800_22_frequency_within_block_test.pylon
#
# Copyright (C) 2017 David Johnston
# This program is distributed under the terms of the GNU General Public License.
#
# This file is part of sp800_22_tests.
#
# sp800_22_tests is free software: you can redistribute it and/or modify
# it under the te... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
from __future__ import absolute_import, print_function, unicode_literals
import os
import stat
from optparse import OptionParser
from django.core.management import ManagementUtility
class bcolors:
"""
ANSI escape sequences for terminal colors
"""
HEADER = "\033[95m"
OKBLUE ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright 2014, 2015 OpenMarket Ltd
#
# 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 | ||
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/reference/current/es-dls-overview.html
---
# How DLS works [es-dls-overview]
:::{important}
This page pertains to a specific implementation of DLS for Elastic content connectors.
Refer to [Controlling access at the document and field level](docs-cont... | unknown | github | https://github.com/elastic/elasticsearch | docs/reference/search-connectors/es-dls-overview.md |
# -*- coding: utf-8 -*-
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import pytest
pytest_plugins = [
"jupyter_server.pytest_plugin",
"jupyterlab_server.pytest_plugin",
"jupyterlab.pytest_plugin"
]
def pytest_addoption(parser):
"""
Adds fla... | unknown | codeparrot/codeparrot-clean | ||
use crate::spec::{
Arch, Cc, LinkerFlavor, Lld, Os, PanicStrategy, RelocModel, Target, TargetMetadata,
TargetOptions, cvs,
};
pub(crate) fn target() -> Target {
Target {
data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(),
llvm_target: "riscv32".into(),
metadata: TargetMetadata {
... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_target/src/spec/targets/riscv32imafc_unknown_nuttx_elf.rs |
#
# ovirt-host-deploy -- ovirt host deployer
# Copyright (C) 2017 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) ... | unknown | codeparrot/codeparrot-clean | ||
/** @import { ExportNamedDeclaration, Identifier } from 'estree' */
/** @import { Context } from '../types' */
import * as e from '../../../errors.js';
import { extract_identifiers } from '../../../utils/ast.js';
/**
* @param {ExportNamedDeclaration} node
* @param {Context} context
*/
export function ExportNamedDec... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/src/compiler/phases/2-analyze/visitors/ExportNamedDeclaration.js |
# ply: ygen.py
#
# This is a support program that auto-generates different versions of the YACC parsing
# function with different features removed for the purposes of performance.
#
# Users should edit the method LParser.parsedebug() in yacc.py. The source code
# for that method is then used to create the other metho... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
import warnings as _warnings
_warnings.resetwarnings()
_warnings.filterwarnings('error')
# BEGIN INCLUDE
from tdi import html
from tdi.tools import htmlform
template = html.from_string("""
<html>
<body>
<p>Type your name:</p>
<form tdi="form">
<div tdi="-name">
<p tdi=... | unknown | codeparrot/codeparrot-clean | ||
# Patchwork - automated patch tracking system
# Copyright (C) 2008 Jeremy Kerr <jk@ozlabs.org>
#
# This file is part of the Patchwork package.
#
# Patchwork 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; eith... | unknown | codeparrot/codeparrot-clean | ||
# -*- 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 | ||
'''
Parser dispatcher mix-in class.
Copyright (c) 2010, Patrick Maupin. All rights reserved.
See http://code.google.com/p/rson/source/browse/trunk/license.txt
'''
def _alter_attributes(cls, attrs):
''' Return a new class with altered attributes.
But throw an exception unless altered attributes
a... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2002-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | java | github | https://github.com/spring-projects/spring-framework | spring-beans/src/main/java/org/springframework/beans/factory/config/ProviderCreatingFactoryBean.java |
#!/bin/bash
if [ -z "${BUILD_ENVIRONMENT}" ] || [[ "${BUILD_ENVIRONMENT}" == *-build* ]]; then
# shellcheck source=./macos-build.sh
source "$(dirname "${BASH_SOURCE[0]}")/macos-build.sh"
fi
if [ -z "${BUILD_ENVIRONMENT}" ] || [[ "${BUILD_ENVIRONMENT}" == *-test* ]]; then
# shellcheck source=./macos-test.sh
sour... | unknown | github | https://github.com/pytorch/pytorch | .ci/pytorch/macos-build-test.sh |
def average_Even(n) :
if (n% 2!= 0) :
return ("Invalid Input")
return -1
sm = 0
count = 0
while (n>= 2) :
count = count+1
sm = sm+n
n = n-2
return sm // count | unknown | mbpp | ||
---
title: "Getting Started"
lesson: 1
approx_time: 10 mins
---
The first thing you need is a working installation of Ruby. Install from [the official website](https://www.ruby-lang.org/en/documentation/installation/). | unknown | github | https://github.com/jekyll/jekyll | test/source/_tutorials/getting-started.md |
import os
import unittest
from conans.test.utils.tools import TestClient
from conans.paths import CONANFILE
conanfile = """
from conans import ConanFile, tools
class AConan(ConanFile):
name = "Hello0"
version = "0.1"
def build(self):
self.output.warn("build() IN LOCAL CACHE=> %s" % str(self.in_lo... | 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-conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/precommit/PrecommitTaskPlugin.java |
{
"name": "react-forgive",
"displayName": "React Analyzer",
"description": "React LSP",
"license": "MIT",
"version": "0.0.0",
"repository": {
"type": "git",
"url": "git+https://github.com/facebook/react.git",
"directory": "compiler/packages/react-forgive"
},
"categories": [
"Programming ... | json | github | https://github.com/facebook/react | compiler/packages/react-forgive/package.json |
IBM861_TO_UCS_TBL = [
["FF",0xA0],
["AD",0xA1],
["9C",0xA3],
["AE",0xAB],
["AA",0xAC],
["F8",0xB0],
["F1",0xB1],
["FD",0xB2],
["E6",0xB5],
["FA",0xB7],
["AF",0xBB],
["AC",0xBC],
["AB",0xBD],
["A8",0xBF],
["A4",0xC1],
["8E",0xC4],
["8F",0xC5],
["92",0xC6],
["80",0xC7],
["90",0xC9]... | ruby | github | https://github.com/ruby/ruby | enc/trans/ibm861-tbl.rb |
import json
import logging
from lxml import etree
from xmodule.capa_module import ComplexEncoder
from xmodule.progress import Progress
from xmodule.stringify import stringify_children
import openendedchild
from .combined_open_ended_rubric import CombinedOpenEndedRubric
log = logging.getLogger("edx.courseware")
clas... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from . import github
import json
import os
import requests
import six.moves.configparser
import urllib.request, urllib.error, urllib.parse
class IssueHandler(object):
'''
This plugin facilitates sendin... | 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.impl.base.test.cases.components.typeInfoProvider
import org.jetbrai... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-impl-base/testFixtures/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/typeInfoProvider/AbstractFunctionClassKindTest.kt |
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package getproviders
import "testing"
func TestParsePlatform(t *testing.T) {
tests := []struct {
Input string
Want Platform
Err bool
}{
{
"",
Platform{},
true,
},
{
"too_many_notes",
Platform{},
true,
},
{
... | go | github | https://github.com/hashicorp/terraform | internal/getproviders/types_test.go |
/******************************************************************************
* Copyright (c) 2024, Tri Dao.
******************************************************************************/
#pragma once
#include <ATen/TensorIndexing.h>
#include <ATen/core/Tensor.h>
#include <ATen/hip/HIPContext.h>
#include <ATen/h... | unknown | github | https://github.com/pytorch/pytorch | aten/src/ATen/native/transformers/hip/flash_attn/flash_common_hip.hpp |
{
"format_version": "1.0",
"values": {
"root_module": {
"resources": [
{
"address": "tfcoremock_list.list",
"mode": "managed",
"name": "list",
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
"schema_version": 0,
"sensitive_... | json | github | https://github.com/hashicorp/terraform | testing/equivalence-tests/outputs/replace_within_list/state.json |
"""Tests for ExtensionDtype Table Schema integration."""
from collections import OrderedDict
import datetime as dt
import decimal
from io import StringIO
import json
import pytest
from pandas import (
NA,
DataFrame,
Index,
array,
read_json,
)
import pandas._testing as tm
from pandas.core.arrays.i... | python | github | https://github.com/pandas-dev/pandas | pandas/tests/io/json/test_json_table_schema_ext_dtype.py |
# frozen_string_literal: true
require "securerandom"
require "concurrent/scheduled_task"
require "concurrent/executor/thread_pool_executor"
require "concurrent/utility/processor_counter"
module ActiveJob
module QueueAdapters
# = Active Job Async adapter
#
# The Async adapter runs jobs with an in-process... | ruby | github | https://github.com/rails/rails | activejob/lib/active_job/queue_adapters/async_adapter.rb |
from __future__ import annotations
from datetime import datetime
import re
import numpy as np
import pytest
import pandas.util._test_decorators as td
import pandas as pd
from pandas import (
DataFrame,
Index,
Series,
Timestamp,
date_range,
)
import pandas._testing as tm
@pytest.fixture
def mix_... | python | github | https://github.com/pandas-dev/pandas | pandas/tests/frame/methods/test_replace.py |
/*
* 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 | buildSrc/src/test/java/org/springframework/boot/build/artifacts/ArtifactReleaseTests.java |
from collections import Iterable, Mapping
from uuid import uuid4
import six
from apscheduler.triggers.base import BaseTrigger
from apscheduler.util import ref_to_obj, obj_to_ref, datetime_repr, repr_escape, get_callable_name, check_callable_args, \
convert_to_datetime
class Job(object):
"""
Contains the ... | unknown | codeparrot/codeparrot-clean | ||
"""Plugin for NOS: Nederlandse Omroep Stichting
Supports:
MP$: http://nos.nl/uitzending/nieuwsuur.html
Live: http://www.nos.nl/livestream/*
Tour: http://nos.nl/tour/live
"""
import re
import json
from livestreamer.plugin import Plugin
from livestreamer.plugin.api import http
from livestreamer.plugin.api.uti... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
***************************************************************************
NumberInputPanel.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
**********************... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2014-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.tests.server.jetty
import io.ktor.server.jetty.*
import io.ktor.server.testing.suites.*
class JettyClientCertTest : ClientCertTestSuite<JettyApplicationEngine, JettyApplicati... | kotlin | github | https://github.com/ktorio/ktor | ktor-server/ktor-server-jetty/jvm/test/io/ktor/tests/server/jetty/JettyClientCertTest.kt |
# Copyright (c) 2012 Rackspace Hosting
# 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 req... | unknown | codeparrot/codeparrot-clean | ||
# -*- 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 | ||
from __future__ import absolute_import
import re
import pytz
import time
from datetime import datetime
from django.utils import timezone
from werkzeug.utils import secure_filename as werkzeug_secure_filename
def iso8601format(dt):
"""Given a datetime object, return an associated ISO-8601 string"""
return dt.st... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
sphinx.util.docstrings
~~~~~~~~~~~~~~~~~~~~~~
Utilities for docstring processing.
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
def prepare_docstring(s, ignore=1):
"""Convert a docstring int... | unknown | codeparrot/codeparrot-clean | ||
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
export interface IntervalTrigger {
interval: PromDuration;
}
export const defaultIntervalTrigger = (): IntervalTrigger => ({
interval: defaultPromDuration(),
});
export type PromDuration = string;
export const defaultPromDuration = (): PromDuration => ("");
exp... | typescript | github | https://github.com/grafana/grafana | apps/alerting/rules/plugin/src/generated/recordingrule/v0alpha1/types.spec.gen.ts |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, Linus Unnebäck <linus@folkdatorn.se>
#
# This file is part of Ansible
#
# This module 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... | unknown | codeparrot/codeparrot-clean | ||
import unittest
import sys
from test import test_support
class G:
'Sequence using __getitem__'
def __init__(self, seqn):
self.seqn = seqn
def __getitem__(self, i):
return self.seqn[i]
class I:
'Sequence using iterator protocol'
def __init__(self, seqn):
self.seqn = seqn
... | unknown | codeparrot/codeparrot-clean | ||
"""Implement the auth feature from Hass.io for Add-ons."""
from ipaddress import ip_address
import logging
import os
from aiohttp import web
from aiohttp.web_exceptions import HTTPNotFound, HTTPUnauthorized
import voluptuous as vol
from homeassistant.auth.models import User
from homeassistant.auth.providers import ho... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from openfisca_core.tests import dummy_country
from openfisca_core.variables import Variable
from openfisca_core.columns import IntCol
from openfisca_core.tests.dummy_country import Individus
class input(Variable):
column = IntCol
entity_class = Individus
label = u"Input variable"
... | unknown | codeparrot/codeparrot-clean | ||
#!/bin/env python3
#
# Copyright (c) 2013 Mobilinkd LLC. All Rights Reserved.
# Released under the Apache License 2.0.
from IntelHexRecord import IntelHexRecord
from Avr109 import Avr109
import time
import sys
import os
import traceback
import binascii
class FirmwareSegment(object):
def __init__(self, memory_ty... | 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 n... | java | github | https://github.com/apache/kafka | connect/api/src/test/java/org/apache/kafka/connect/data/ValuesTest.java |
from django.conf.urls import patterns, url
from radpress.views import (
ArticleArchiveView, ArticleDetailView, ArticleListView, PreviewView,
PageDetailView, SearchView, ZenModeView, ZenModeUpdateView)
from radpress.feeds import ArticleFeed
urlpatterns = patterns(
'',
url(r'^$',
view=ArticleLis... | unknown | codeparrot/codeparrot-clean | ||
import pytest
from tempfile import NamedTemporaryFile
from django.core.urlresolvers import reverse
from .. import factories as f
from taiga.base.utils import json
from taiga.users import models
from taiga.auth.tokens import get_token_for_user
from taiga.permissions.permissions import MEMBERS_PERMISSIONS, ANON_PERMIS... | unknown | codeparrot/codeparrot-clean | ||
"""
Standard resistor values.
Commonly used for verifying electronic components in circuit classes are
standard values, or conversely, for generating realistic component
values in parameterized problems. For details, see:
http://en.wikipedia.org/wiki/Electronic_color_code
"""
# pylint: disable=invalid-name
# r is st... | unknown | codeparrot/codeparrot-clean | ||
# (C) Wegener Center for Climate and Global Change, University of Graz, 2015
#
# This file is part of pyCAT.
#
# pyCAT is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 3 as published by the
# Free Software Foundation.
#
# pyCAT is distributed in the ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright 2013 Kitware 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 cop... | unknown | codeparrot/codeparrot-clean | ||
from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfile, printLocation
setOutDir(__name__)
import os,unittest
from reportlab.platypus import Spacer, SimpleDocTemplate, Table, TableStyle, LongTable
from reportlab.platypus.doctemplate import PageAccumulator
from reportlab.platypus.paragraph import P... | 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 | ||
//// [tests/cases/compiler/APISample_WatchWithOwnWatchHost.ts] ////
//// [package.json]
{
"name": "typescript",
"types": "/.ts/typescript.d.ts"
}
//// [APISample_WatchWithOwnWatchHost.ts]
/*
* Note: This test is a public API sample. This sample verifies creating abstract builder to watch list of root files
... | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/APISample_WatchWithOwnWatchHost.js |
# Copyright 2015 The Bazel 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 la... | unknown | codeparrot/codeparrot-clean | ||
import os
import pkg_resources
from digicampipe.io.event_stream import event_stream
from digicampipe.io.zfits import count_number_events
from digicampipe.io.zfits import zfits_event_source
example_file_path = pkg_resources.resource_filename(
'digicampipe',
os.path.join(
'tests',
'resources',
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
***************************************************************************
test_qgssinglesymbolrenderer.py
---------------------
Date : December 2015
Copyright : (C) 2015 by Matthias Kuhn
Email : matthias at opengis dot ch
*****... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2014 OpenStack Foundation
#
# 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 ... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/i3c/i3c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: I3C bus
maintainers:
- Alexandre Belloni <alexandre.belloni@bootlin.com>
- Miquel Raynal <miquel.raynal@bootlin.com>
description: ... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/i3c/i3c.yaml |
# 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 | ||
# Copyright 2011 OpenStack Foundation
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
#! /usr/bin/env python
import sys
import os
import glob
from fontTools.ttLib import identifierToTag
fontToolsDir = os.path.dirname(os.path.dirname(os.path.join(os.getcwd(), sys.argv[0])))
fontToolsDir= os.path.normpath(fontToolsDir)
tablesDir = os.path.join(fontToolsDir,
"Lib", "fontTools", "ttLib", "tables")
docFi... | unknown | codeparrot/codeparrot-clean | ||
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import atexit
import sys
from .ansitowin32 import AnsiToWin32
orig_stdout = sys.stdout
orig_stderr = sys.stderr
wrapped_stdout = sys.stdout
wrapped_stderr = sys.stderr
atexit_done = False
def reset_all():
AnsiToWin32(orig_stdout).reset_... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.