code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
from qt import *
import xen.lowlevel.xs
class XSViewer(QMainWindow):
def __init__(self, app):
apply(QMainWindow.__init__, (self,))
self.setCaption('XenStore Viewer')
self.new_node = QAction(self, 'New Node')
self.new_node.setText('New Node...')
self.connect(self.new_node... | unknown | codeparrot/codeparrot-clean | ||
import { increment as inc } from './increment';
var a = 1;
inc(a); // 2
// async loading
import("./async-loaded").then(function(asyncLoaded) {
console.log(asyncLoaded);
}); | javascript | github | https://github.com/webpack/webpack | examples/custom-javascript-parser/example.js |
import pytest
openshiftdynamic = pytest.importorskip("openshift.dynamic")
from units.modules.utils import set_module_args
from units.utils.kubevirt_fixtures import base_fixture, RESOURCE_DEFAULT_ARGS, AnsibleExitJson
from ansible.module_utils.kubevirt import KubeVirtRawModule
from ansible.modules.cloud.kubevirt impo... | unknown | codeparrot/codeparrot-clean | ||
:host {
display: block;
}
.box {
width: 300px;
border: 5px solid black;
display: block;
line-height: 300px;
text-align: center;
font-size: 50px;
color: white;
} | css | github | https://github.com/angular/angular | adev/src/content/examples/animations/src/app/status-slider.css |
"""Sensor for displaying the number of result on Shodan.io."""
import logging
from datetime import timedelta
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import ATTR_ATTRIBUTION, CONF_API_KEY, CONF_NA... | unknown | codeparrot/codeparrot-clean | ||
f = Function(void, 'SetPort',
(GrafPtr, 'thePort', InMode),
)
functions.append(f)
f = Function(CursHandle, 'GetCursor',
(short, 'cursorID', InMode),
)
functions.append(f)
f = Function(void, 'SetCursor',
(Cursor_ptr, 'crsr', InMode),
)
functions.append(f)
f = Function(void, 'ShowCursor',
)
functions.a... | 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 | ||
#ifndef NUMPY_CORE_SRC_COMMON_NPY_ARGPARSE_H
#define NUMPY_CORE_SRC_COMMON_NPY_ARGPARSE_H
#include <Python.h>
#include "numpy/ndarraytypes.h"
/*
* This file defines macros to help with keyword argument parsing.
* This solves two issues as of now:
* 1. Pythons C-API PyArg_* keyword argument parsers are slow, due ... | c | github | https://github.com/numpy/numpy | numpy/_core/src/common/npy_argparse.h |
# -*- 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 | ||
'''
Created on March 14, 2014
@author: RobCastellow
Copyright (c) 2014 PAC Enterprises, LLC
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 ... | unknown | codeparrot/codeparrot-clean | ||
{
"START": {
"summary": "Starts hotkeys tracking.",
"complexity": "O(1)",
"group": "server",
"since": "8.6.0",
"arity": -2,
"container": "HOTKEYS",
"function": "hotkeysCommand",
"command_flags": [
"ADMIN",
"NOSCRIPT"
],
... | json | github | https://github.com/redis/redis | src/commands/hotkeys-start.json |
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c)
# 2010 NaN Projectes de Programari Lliure, S.L. (http://www.NaN-tic.com)
# 2014 Serv. Tec. Avanzados - Pedro M. Baeza (http://www.serviciosbaeza.com)
# 2014 AvanzOsc (http://www.avanzosc.e... | unknown | codeparrot/codeparrot-clean | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package main
import (
"context"
"testing"
tfe "github.com/hashicorp/go-tfe"
tfversion "github.com/hashicorp/terraform/version"
)
func Test_migrate_tfc_to_tfc_single_workspace(t *testing.T) {
t.Parallel()
skipIfMissingEnvVar(t)
skipWithoutR... | go | github | https://github.com/hashicorp/terraform | internal/cloud/e2e/migrate_state_tfc_to_tfc_test.go |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | unknown | github | https://github.com/huggingface/transformers | docs/source/ko/tasks/question_answering.md |
# 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... | unknown | codeparrot/codeparrot-clean | ||
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v1beta1",
"metadata": {
"name": "v0alpha1.templating-repeating-rows.v42"
},
"spec": {
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana -... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/feature-templating/v0alpha1.templating-repeating-rows.v42.v1beta1.json |
#!/usr/bin/python
#
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | unknown | codeparrot/codeparrot-clean | ||
from bs4 import BeautifulSoup
import urllib2
import zillabyte
def open_url(url):
try:
page = urllib2.urlopen(url).read()
except:
page = None
return page
def execute_find_links(controller, tup):
domain = tup["domain"]
if domain[0:4] == "www.":
domain = domain[5:]
url="http://"+tup["domain"]
... | unknown | codeparrot/codeparrot-clean | ||
"""Support for Spider thermostats."""
import logging
from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import (
HVAC_MODE_COOL,
HVAC_MODE_HEAT,
HVAC_MODE_OFF,
SUPPORT_FAN_MODE,
SUPPORT_TARGET_TEMPERATURE,
)
from homeassistant.const import ATTR_T... | unknown | codeparrot/codeparrot-clean | ||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | unknown | codeparrot/codeparrot-clean | ||
from functools import partial
import threading
from PyQt5.QtCore import Qt, QEventLoop, pyqtSignal
from PyQt5.QtWidgets import (QVBoxLayout, QLabel, QGridLayout, QPushButton,
QHBoxLayout, QButtonGroup, QGroupBox, QDialog,
QLineEdit, QRadioButton, QCheckBox, QWi... | unknown | codeparrot/codeparrot-clean | ||
<ng-template
#navigationList
let-navigationItems
let-preserveOtherCategoryOrder="preserveOtherCategoryOrder"
>
<ul
class="docs-navigation-list docs-faceted-list"
[class.docs-navigation-list-dropdown]="isDropdownView()"
>
@for (itemGroup of groupItems(navigationItems, preserveOtherCategoryOrder); t... | html | github | https://github.com/angular/angular | adev/shared-docs/components/navigation-list/navigation-list.component.html |
/* 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 applicable law or a... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/core/kernels/mkl/mkl_pooling_ops_common.h |
domain:
with:
dots: It works! | unknown | github | https://github.com/symfony/symfony | src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/translations/domain.with.dots.en.yml |
package hashable
import (
"net"
"net/netip"
"testing"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)
// Assert that the types are hashable.
var (
_ map[MACAddr]bool
_ map[IPMAC]bool
)
func TestMACAddrFrom6(t *testing.T) {
want := [6]byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06}
assert.DeepEqual(t, M... | go | github | https://github.com/moby/moby | daemon/libnetwork/internal/hashable/net_test.go |
---
setup:
- skip:
version: " - 7.1.99"
reason: why not
---
"Test with setup and skip but no feature":
- do:
something:
id: "something"
- match: { acknowledged: true } | unknown | github | https://github.com/elastic/elasticsearch | build-tools-internal/src/test/resources/rest/transform/feature/with_setup_no_feature.yml |
# framework/modules/read_table.py
#
# Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net>
#
# 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 Lic... | unknown | codeparrot/codeparrot-clean | ||
import paddle.fluid as fluid
import numpy as np
import sys
def conv(input,
k_h,
k_w,
c_o,
s_h,
s_w,
relu=False,
padding="VALID",
biased=False,
name=None):
act = None
tmp = input
if relu:
act = "relu"
if padding == ... | unknown | codeparrot/codeparrot-clean | ||
# types.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
"""Compatibility namespace for sqlalchemy.sql.types.
"""
__all__ = ['TypeEngine', 'TypeDe... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
'''
Custom filters for use in openshift-master
'''
import copy
import sys
from distutils.version import LooseVersion # pylint: disable=no-name-in-module,import-error
from ansible import errors
from ansible.parsing.yaml.dumper import An... | 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... | unknown | codeparrot/codeparrot-clean | ||
//===--- TBDGenVisitor.h - AST Visitor for TBD generation -----------------===//
//
// 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 | lib/IRGen/TBDGenVisitor.h |
#
# genxmlif, Release 0.9.0
# file: __init__.py
#
# genxmlif package file
#
# history:
# 2005-04-25 rl created
#
# Copyright (c) 2005-2008 by Roland Leuthe. All rights reserved.
#
# --------------------------------------------------------------------
# The generic XML interface is
#
# Copyright (c) 2005-2008 by Rola... | unknown | codeparrot/codeparrot-clean | ||
import {Component} from '@angular/core';
@Component({
selector: 'app-root',
template: `
<form>
<label>
Name
<input type="text" formControlName="name" />
</label>
<label>
Email
<input type="email" formControlName="email" />
</label>
<button type="sub... | typescript | github | https://github.com/angular/angular | adev/src/content/tutorials/learn-angular/steps/17-reactive-forms/src/app/app.ts |
"""Retriever tool."""
from __future__ import annotations
from typing import TYPE_CHECKING, Literal
from pydantic import BaseModel, Field
# Cannot move Callbacks and Document to TYPE_CHECKING as StructuredTool's
# func/coroutine parameter annotations are evaluated at runtime.
from langchain_core.callbacks import Cal... | python | github | https://github.com/langchain-ai/langchain | libs/core/langchain_core/tools/retriever.py |
__author__ = 'Fabian'
import sys
import appdirs
import os
import shutil
join = os.path.join
directories = appdirs.AppDirs("FactorioManager", "", roaming=True)
configpath = join(directories.user_config_dir, "config.cfg")
tempfolder = appdirs.user_cache_dir("FactorioManager", "", opinion=False)
log = join(tempfolder, ... | unknown | codeparrot/codeparrot-clean | ||
# -*- encoding: utf-8 -*-
##############################################################################
#
# This program 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... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import division, absolute_import, print_function
import sys
import os
import shutil
from tempfile import NamedTemporaryFile, TemporaryFile, mktemp, mkdtemp
from numpy import memmap
from numpy import arange, allclose, asarray
from numpy.testing import (
TestCase, run_module_suite, assert_, assert_e... | unknown | codeparrot/codeparrot-clean | ||
from django.core.management import call_command
from django.core.management.base import BaseCommand
from django.db import connection
class Command(BaseCommand):
help = 'Runs a development server with data from the given fixture(s).'
requires_system_checks = False
def add_arguments(self, parser):
... | unknown | codeparrot/codeparrot-clean | ||
"""
Tests run by test_atexit in a subprocess since it clears atexit callbacks.
"""
import atexit
import sys
import unittest
from test import support
class GeneralTest(unittest.TestCase):
def setUp(self):
atexit._clear()
def tearDown(self):
atexit._clear()
def assert_raises_unraisable(self... | python | github | https://github.com/python/cpython | Lib/test/_test_atexit.py |
/* Copyright 2019 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 agree... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/core/kernels/collective_nccl_gatherer.h |
package container
import (
"context"
"fmt"
"testing"
"time"
containertypes "github.com/moby/moby/api/types/container"
"github.com/moby/moby/client"
"github.com/moby/moby/client/pkg/versions"
"github.com/moby/moby/v2/integration/internal/container"
"github.com/moby/moby/v2/internal/testutil"
"github.com/moby... | go | github | https://github.com/moby/moby | integration/container/list_test.go |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2018 IBM CORPORATION
# Author(s): Tzur Eliyahu <tzure@il.ibm.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_META... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
PROVINCE_CHOICES = (
('01', _('Arava')),
('02', _('Albacete')),
('03', _('Alacant')),
('04', _('Almeria')),
('05', _('Avila')),
('06', _('Badajoz')),
('07', _('Illes Balears')),
('08', _('Barcelona')),
(... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Yannick Vaucher
# Copyright 2011 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | unknown | codeparrot/codeparrot-clean | ||
Multiple types were used as bounds for a closure or trait object.
Erroneous code example:
```compile_fail,E0225
fn main() {
let _: Box<dyn std::io::Read + std::io::Write>;
}
```
Rust does not currently support this.
Auto traits such as Send and Sync are an exception to this rule:
It's possible to have bounds of... | unknown | github | https://github.com/rust-lang/rust | compiler/rustc_error_codes/src/error_codes/E0225.md |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018, Simon Weald <ansible@simonweald.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... | unknown | codeparrot/codeparrot-clean | ||
from django import forms
from django.http import HttpResponse
from django.template import Context, Template
from django.views.generic.edit import UpdateView
from .models import Article
class ArticleForm(forms.ModelForm):
content = forms.CharField(strip=False, widget=forms.Textarea)
class Meta:
model ... | python | github | https://github.com/django/django | tests/forms_tests/views.py |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class ComposerLoaderFakeBis
{
public function getPrefixes()
{
retu... | php | github | https://github.com/symfony/symfony | src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/fake_vendor_bis/composer/autoload_real.php |
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and rel... | unknown | codeparrot/codeparrot-clean | ||
__author__ = 'zhouguangfu, chenxiayu'
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import numpy as np
from scipy.ndimage import morphology
from froi.algorithm.meshtool import binary_shrink
class ... | unknown | codeparrot/codeparrot-clean | ||
"""Stuff to parse Sun and NeXT audio files.
An audio file consists of a header followed by the data. The structure
of the header is as follows.
+---------------+
| magic word |
+---------------+
| header size |
+---------------+
| data size |
+--------... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2019 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... | python | github | https://github.com/tensorflow/tensorflow | tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/exported_python_args.py |
/*-------------------------------------------------------------------------
*
* generic_xlog.h
* Generic xlog API definition.
*
*
* Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/access/generic_xlog.... | c | github | https://github.com/postgres/postgres | src/include/access/generic_xlog.h |
#! /usr/bin/env python
#coding=utf-8
#
# File : wizard.py
# This file is part of RT-Thread RTOS
# COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
#
# 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 Soft... | unknown | codeparrot/codeparrot-clean | ||
#! /usr/bin/env python
# -*- mode: python; indent-tabs-mode: nil; -*-
# vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
#
# Copyright (C) 2010, 2011 Patrick Crews
#
# 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 Sof... | unknown | codeparrot/codeparrot-clean | ||
- hosts: testhost
gather_facts: false
tasks:
- name: test registering bad var when skipped
debug: msg='does nothing really but register this'
when: false
register: 200
- name: never gets here
assert:
that:
- 200 is not defined | unknown | github | https://github.com/ansible/ansible | test/integration/targets/register/invalid_skipped.yml |
call-seq:
getch -> character or nil
Returns the next (possibly multibyte) character,
if available:
- If the [position][2]
is at the beginning of a character:
- Returns the character.
- Increments the [character position][7] by 1.
- Increments the [byte position][2]
by the size (in bytes) of the... | unknown | github | https://github.com/ruby/ruby | doc/strscan/methods/getch.md |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# || ____ _ __
# +------+ / __ )(_) /_______________ _____ ___
# | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \
# +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
# || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
#
# Copyright (C) 20... | unknown | codeparrot/codeparrot-clean | ||
from django.conf import settings
from django.utils import translation, encoding
import pytest
import tower
from mock import Mock, patch
from nose.tools import eq_
from pyquery import PyQuery as pq
from addons.models import Addon
import amo
import sharing
import sharing.views
from amo.tests import BaseTestCase
from sh... | 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.descriptors.components
import com.intellij.psi.*
import com.intelli... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/components/KaFe10JavaInteroperabilityComponent.kt |
#!/usr/bin/env python
#
# Copyright 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your option)
# ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2012 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 in w... | unknown | codeparrot/codeparrot-clean | ||
from unittest import TestCase
from unittest import skipIf
from lintreview.review import Problems
from lintreview.review import Comment, IssueComment
from lintreview.tools.eslint import Eslint
from lintreview.utils import in_path
from lintreview.utils import npm_exists
from nose.tools import eq_, ok_
eslint_missing = ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env bash
# Copyright 2014 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | github | https://github.com/kubernetes/kubernetes | hack/gen-swagger-doc/gen-swagger-docs.sh |
<?php
namespace Illuminate\Foundation\Testing;
use Faker\Factory;
use Faker\Generator;
trait WithFaker
{
/**
* The Faker instance.
*
* @var \Faker\Generator
*/
protected $faker;
/**
* Setup up the Faker instance.
*
* @return void
*/
protected function setUpFak... | php | github | https://github.com/laravel/framework | src/Illuminate/Foundation/Testing/WithFaker.php |
/* 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... | cpp | github | https://github.com/nodejs/node | deps/LIEF/src/OAT/DexFile.cpp |
/* 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... | cpp | github | https://github.com/nodejs/node | deps/LIEF/src/PE/signature/OIDToString.cpp |
import warnings
from collections import Counter, defaultdict, deque, abc
from collections.abc import Sequence
from functools import partial, wraps
from heapq import merge, heapify, heapreplace, heappop
from itertools import (
chain,
compress,
count,
cycle,
dropwhile,
groupby,
islice,
rep... | unknown | codeparrot/codeparrot-clean | ||
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# ENVIRONMENT
The environment variables can be specified in lower case or upper case. The
lower case version has precedence. `http_proxy` is an exception as it is only
available in lower case.
Using an environment v... | unknown | github | https://github.com/curl/curl | docs/cmdline-opts/_ENVIRONMENT.md |
# (c) 2014, James Tanner <tanner.jc@gmail.com>
# (c) 2016, Adrian Likins <alikins@redhat.com>
# (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com>
#
# 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, eith... | unknown | codeparrot/codeparrot-clean | ||
# 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 | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package configschema
import (
"runtime"
"sync"
"unsafe"
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/zclconf/go-cty/cty"
)
var mapLabelNames = []string{"key"}
// specCache is a global cache of all the generated hcldec.Spec values for
//... | go | github | https://github.com/hashicorp/terraform | internal/configs/configschema/decoder_spec.go |
#ifndef RBIMPL_COMPILER_IS_GCC_H /*-*-C++-*-vi:se ft=cpp:*/
#define RBIMPL_COMPILER_IS_GCC_H
/**
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
* Permission is hereby granted, to either redistr... | c | github | https://github.com/ruby/ruby | include/ruby/internal/compiler_is/gcc.h |
#
# Copyright 2007 Google Inc. Released under the GPL v2
"""
This module defines the SSHHost class.
Implementation details:
You should import the "hosts" package instead of importing each type of host.
SSHHost: a remote machine with a ssh access
"""
import sys, re, traceback, logging
from autotest_lib.clien... | unknown | codeparrot/codeparrot-clean | ||
import sys
import unittest
from test import test_support
from test.test_support import run_unittest, have_unicode
import math
L = [
('0', 0),
('1', 1),
('9', 9),
('10', 10),
('99', 99),
('100', 100),
('314', 314),
(' 314', 314),
('314 ', 314),
... | unknown | codeparrot/codeparrot-clean | ||
# Custom SD
Custom SD is available via the file_sd adapter, which can be used to access SD mechanisms that are not
included in official Prometheus releases. The sd adapter outputs a file that can be passed via your `prometheus.yml`
as a `file_sd` file. This will allow you to pass your targets to Prometheus for scraping... | unknown | github | https://github.com/prometheus/prometheus | documentation/examples/custom-sd/README.md |
{
"productName": "tauri-app",
"version": "0.1.0",
"identifier": "com.tauri.dev",
"build": {
"beforeDevCommand": "pnpm dev",
"beforeBuildCommand": "pnpm build",
"devUrl": "http://localhost:1420",
"frontendDist": "../dist"
},
"app": {
"withGlobalTauri": false,
"security": {
"csp"... | json | github | https://github.com/tauri-apps/tauri | crates/tauri-cli/templates/plugin/__example-api/tauri-app/src-tauri/tauri.conf.json |
#!/usr/bin/python
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2013, Benno Joy <benno@ansible.com>
# Copyright (c) 2013, John Dewey <john@dewey.ws>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, div... | unknown | codeparrot/codeparrot-clean | ||
import unittest
import openmesh
import copy
class Python(unittest.TestCase):
def setUp(self):
self.mesh = openmesh.TriMesh()
self.vh1 = self.mesh.add_vertex([0, 0, 0])
self.vh2 = self.mesh.add_vertex([1, 0, 0])
self.vh3 = self.mesh.add_vertex([1, 1, 0])
self.fh = self.mesh.... | unknown | codeparrot/codeparrot-clean | ||
#! /usr/bin/env python2
"""
poller-wrapper A small tool which wraps around the poller and tries to
guide the polling process with a more modern approach with a
Queue and workers
Author: Job Snijders <job.snijders@atrato.com>
Date: Jan 2013
Usage: This progra... | unknown | codeparrot/codeparrot-clean | ||
import numpy as np
import pytest
from pandas import (
DataFrame,
IndexSlice,
Series,
)
mpl = pytest.importorskip("matplotlib")
pytest.importorskip("jinja2")
from pandas.io.formats.style import Styler
pytestmark = pytest.mark.usefixtures("mpl_cleanup")
@pytest.fixture
def df():
return DataFrame([[1,... | python | github | https://github.com/pandas-dev/pandas | pandas/tests/io/formats/style/test_matplotlib.py |
# -*- coding: utf-8 -*-
#
# This file is a part of Pluggable Output Processor
#
# Copyright (c) 2013-2017 Alex Turbov <i.zaufi@gmail.com>
#
# Pluggable Output Processor 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 Foun... | 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/testFixtures/java/org/springframework/beans/testfixture/beans/CollectingReaderEventListener.java |
from cStringIO import StringIO
class StringIOTree(object):
"""
See module docs.
"""
def __init__(self, stream=None):
self.prepended_children = []
if stream is None:
stream = StringIO()
self.stream = stream
self.write = stream.write
self.markers = []
... | unknown | codeparrot/codeparrot-clean | ||
#ifndef RBIMPL_INTERN_COMPLEX_H /*-*-C++-*-vi:se ft=cpp:*/
#define RBIMPL_INTERN_COMPLEX_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
* Permission is hereby granted, to either... | c | github | https://github.com/ruby/ruby | include/ruby/internal/intern/complex.h |
# ----------------------------------------------------------------------
# Copyright (C) 2012 Numenta Inc. All rights reserved.
#
# The information and source code contained herein is the
# exclusive property of Numenta Inc. No part of this software
# may be used, reproduced, stored or distributed in any form,
# w... | 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 | ||
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Title: CURLOPT_PREQUOTE
Section: 3
Source: libcurl
See-also:
- CURLOPT_POSTQUOTE (3)
- CURLOPT_QUOTE (3)
Protocol:
- FTP
Added-in: 7.9.5
---
# NAME
CURLOPT_PREQUOTE - commands to run before an FTP transfer
# SYNOPSIS
... | unknown | github | https://github.com/curl/curl | docs/libcurl/opts/CURLOPT_PREQUOTE.md |
"""Holder for the (test kind, list of tests) pair with additional metadata their execution."""
import itertools
import json
import logging
import threading
import time
from abc import ABC, abstractmethod
from concurrent.futures import ThreadPoolExecutor, TimeoutError
from typing import Any, Dict, List, Optional
from ... | python | github | https://github.com/mongodb/mongo | buildscripts/resmokelib/testing/suite.py |
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2alpha1",
"metadata": {
"name": "v29.query_variables_refresh_and_options.v42"
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "grafana",
"ui... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dashboards_from_v0_to_v2/v2beta1.v29.query_variables_refresh_and_options.v2alpha1.json |
---
minor_changes:
- generator - add support for extra vars (https://github.com/ansible/ansible/issues/83270). | unknown | github | https://github.com/ansible/ansible | changelogs/fragments/generator_use_extra.yml |
# (c) 2015, Jonathan Davila <jdavila(at)ansible.com>
# (c) 2017 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
DOCUMENTATION = """
lookup: hashi_vault
author: Jonat... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Copyright 2015 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
@author: Jeff Cavner
@contact: jcavner@ku.edu
@license: gpl2
@copyright: Copyright (C) 2014, University of Kansas Center for Research
Lifemapper Project, lifemapper [at] ku [dot] edu,
Biodiversity Institute,
1345 Jayhawk Boulevard, Lawrence, Kansas, 66045, USA... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from opinel.utils.aws import connect_service
from opinel.utils.cli_parser import OpinelArgumentParser
from opinel.utils.console import configPrintException, printInfo, printException
from opinel.utils.credentials import read_creds
from opinel.utils.gl... | unknown | codeparrot/codeparrot-clean | ||
//// [tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts] ////
//// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts]
namespace A {
class Point {
x: number;
y: number;
}
export var Origin: Point = { x: 0, y: 0... | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js |
# -*- coding: utf-8 -*-
#
# 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
#... | unknown | codeparrot/codeparrot-clean | ||
from copy import (
copy,
deepcopy,
)
import pytest
from pandas import MultiIndex
import pandas._testing as tm
def assert_multiindex_copied(copy, original):
# Levels should be (at least, shallow copied)
tm.assert_copy(copy.levels, original.levels)
tm.assert_almost_equal(copy.codes, original.codes)... | python | github | https://github.com/pandas-dev/pandas | pandas/tests/indexes/multi/test_copy.py |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | unknown | github | https://github.com/huggingface/transformers | docs/source/ja/main_classes/model.md |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.