code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
# Copyright 2014-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later versio... | unknown | codeparrot/codeparrot-clean | ||
###################################################################
# Contains classes and functions helpful in handling latency tests
###################################################################
import json
import sys
import os
import pscheduler
import math
'''
print float
'''
def format_float(label, value, u... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import
from ..packages.six.moves import http_client as httplib
from ..exceptions import HeaderParsingError
def is_fp_closed(obj):
"""
Checks whether a given file-like object is closed.
:param obj:
The file-like object to check.
"""
try:
# Check via... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
'''
DigitalOcean external inventory script
======================================
Generates Ansible inventory of DigitalOcean Droplets.
In addition to the --list and --host options used by Ansible, there are options
for generating JSON of other DigitalOcean data. This is useful when creating
d... | unknown | codeparrot/codeparrot-clean | ||
- Feature Name: Time Series Culling
- Status: in progress
- Start Date: 2016-08-29
- Authors: Matt Tracy
- RFC PR: #9343
- Cockroach Issue: #5910
# Summary
Currently, Time Series data recorded by CockroachDB for its own internal
metrics is retained indefinitely. High-resolution metrics data quickly loses
utility as it... | unknown | github | https://github.com/cockroachdb/cockroach | docs/RFCS/20160901_time_series_culling.md |
# Copyright (c) 2005 Divmod, Inc.
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
# Don't change the docstring, it's part of the tests
"""
I'm a test drop-in. The plugin system's unit tests use me. No one
else should.
"""
from zope.interface import classProvides
from twisted.plugin import I... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | unknown | codeparrot/codeparrot-clean | ||
## Input
```javascript
// @enableJsxOutlining
function Component({arr}) {
const x = useX();
return arr.map(i => {
<>
{arr.map((i, id) => {
let child = (
<Bar x={x}>
<Baz i={i}></Baz>
</Bar>
);
let jsx = <div>{child}</div>;
return jsx;
... | unknown | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/jsx-outlining-child-stored-in-id.expect.md |
name: Post-install/importing issue
description: Report an issue if you have trouble importing or using NumPy after installation.
title: "<Please write a comprehensive title here>"
labels: [32 - Installation]
body:
- type: textarea
attributes:
label: "Steps to reproduce:"
description: >
Please describe ... | unknown | github | https://github.com/numpy/numpy | .github/ISSUE_TEMPLATE/post-install.yml |
from __future__ import division, absolute_import, print_function
'''
>>> p = np.poly1d([1.,2,3])
>>> p
poly1d([ 1., 2., 3.])
>>> print(p)
2
1 x + 2 x + 3
>>> q = np.poly1d([3.,2,1])
>>> q
poly1d([ 3., 2., 1.])
>>> print(q)
2
3 x + 2 x + 1
>>> print(np.poly1d([1.89999+2j, -3j, -5.12345678, 2+1j]))
... | 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-aop/src/main/java/org/springframework/aop/scope/ScopedProxyBeanRegistrationAotProcessor.java |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 New Dream Network, LLC (DreamHost)
#
# 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/li... | unknown | codeparrot/codeparrot-clean | ||
This directory contains a Windows manifest for various Windows-specific
settings.
The main thing we enable here is [`longPathAware`], which permits paths of the
form `C:\` to be longer than 260 characters.
The approach taken here was modeled off of a [similar change for `rustc`][rustc pr].
In particular, this manifes... | unknown | github | https://github.com/BurntSushi/ripgrep | pkg/windows/README.md |
from matplotlib import use as mplt_use
mplt_use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import scipy.cluster.hierarchy as sch
from matplotlib import rcParams
import matplotlib.colors as colors
def plot_correlation(corr_matrix, labels, plotFileName, vmax=None,
vmin=None, colormap=... | unknown | codeparrot/codeparrot-clean | ||
import os
import signal
from string import Template
import subprocess
import time
from TdcPlugin import TdcPlugin
from tdc_config import *
class SubPlugin(TdcPlugin):
def __init__(self):
self.sub_class = 'ns/SubPlugin'
super().__init__()
def pre_suite(self, testcount, testidlist):
'''... | unknown | codeparrot/codeparrot-clean | ||
"""
Code for serializing a modulestore XBlock to OLX suitable for import into
Blockstore.
"""
import logging
import os
from collections import namedtuple
from lxml import etree
from . import adapters
log = logging.getLogger(__name__)
# A static file required by an XBlock
StaticFile = namedtuple('StaticFile', ['name... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
"""Downloads all items from all links from a URL.
Usually, you want to use --regex to filter out what you need. Using --dry-out
to tune your regex before the actual downloading of course.
Example:
Let say there is a webpage with url http://content.com that has a lot of
links to http://g... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 28 16:52:18 2016 by emin
"""
import os
import sys
import theano
import theano.tensor as T
import numpy as np
from lasagne.layers import InputLayer, ReshapeLayer, DenseLayer
from generators import StimulusDemixingTaskFFWD
import lasagne.layers
import lasagne.nonlinearities
... | unknown | codeparrot/codeparrot-clean | ||
//===--- UUID.cpp - UUID 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... | cpp | github | https://github.com/apple/swift | lib/Basic/UUID.cpp |
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from typing import Any, Mapping
from typing_extensions import Protocol
class RelPathOracle(Protocol):
def rel_path(self) -> str:
...
class ParseContext:
"""The build fil... | unknown | codeparrot/codeparrot-clean | ||
package kotlinx.coroutines.debug.junit4
import kotlinx.coroutines.debug.*
import org.junit.rules.*
import org.junit.runner.*
import org.junit.runners.model.*
import java.io.*
import kotlin.test.*
internal fun TestFailureValidation(
timeoutMs: Long,
cancelOnTimeout: Boolean,
creationStackTraces: Boolean,
... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | kotlinx-coroutines-debug/test/junit4/TestFailureValidation.kt |
/* 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/compiler/tf2xla/xla_compiled_cpu_function.h |
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package remote
import (
"bufio"
"context"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"path/filepath"
"strings"
"syscall"
"time"
tfe "github.com/hashicorp/go-tfe"
version "github.com/hashicorp/go-version"
"github.com/hashicorp/terra... | go | github | https://github.com/hashicorp/terraform | internal/backend/remote/backend_plan.go |
class Arco():
def __init__(self,origem,destino,valor):
self.valor=valor
self.vertices=(origem,destino)
def __hash__(self):
return hash(self.vertices+(self.valor,))
def __eq__(self,arco):
return (self.valor,)+self.vertices==(arco.valor,)+arco.vertices
def __repr__(self)... | unknown | codeparrot/codeparrot-clean | ||
from coala_utils.Comparable import Comparable
def _assert_comparable_equal(observed_result, expected_result):
"""
Compares individual fields of the result objects using
`__compare_fields__` of `coala_utils.Comparable` class
and yields messages in case of an attribute mismatch.
"""
if not len(o... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright 2015 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.
"""The test controller for the chromoting localhost browser_tests.
This test uses the legion framework to setup this controller which ... | unknown | codeparrot/codeparrot-clean | ||
#ifndef VULKAN_CORE_H_
#define VULKAN_CORE_H_ 1
/*
** Copyright 2015-2023 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
#define VK_VERSION_1_0 1
#include "vk_platform.h"
#defi... | c | github | https://github.com/opencv/opencv | 3rdparty/include/vulkan/vulkan_core.h |
"""
Client and process monitor for the java socket server.
"""
from __future__ import division
import subprocess, tempfile, time, os, logging, re, struct, socket, atexit, \
glob, itertools, codecs
from copy import copy,deepcopy
from pprint import pprint
try:
import ujson as json
except ImportError:
import ... | unknown | codeparrot/codeparrot-clean | ||
"""Functions for accessing docker via the docker cli."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
import os
import time
from .io import (
open_binary_file,
read_text_file,
)
from .util import (
ApplicationError,
common_environment,
displa... | unknown | codeparrot/codeparrot-clean | ||
"""Test HomematicIP Cloud accesspoint."""
from unittest.mock import Mock, patch
from homeassistant.components.homematicip_cloud import hap as hmipc
from homeassistant.components.homematicip_cloud import const, errors
from tests.common import mock_coro
async def test_auth_setup(hass):
"""Test auth setup for client... | unknown | codeparrot/codeparrot-clean | ||
/*
Copyright 2021 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | go | github | https://github.com/kubernetes/kubernetes | pkg/apis/policy/v1beta1/conversion_test.go |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/crypto/st,stm32-cryp.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: STMicroelectronics STM32 CRYP
description: The STM32 CRYP block is built on the CRYP block found in
the STn8820 SoC intr... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/crypto/st,stm32-cryp.yaml |
from __future__ import division, print_function, absolute_import
from io import StringIO
import tempfile
import numpy as np
from numpy.testing import assert_equal, \
assert_array_almost_equal_nulp
from scipy.sparse import coo_matrix, csc_matrix, rand
from scipy.io import hb_read, hb_write
SIMPLE = """\
No Tit... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | unknown | codeparrot/codeparrot-clean | ||
import functools
from flask_login import current_user
from flask_restful import abort
from funcy import flatten
view_only = True
not_view_only = False
ACCESS_TYPE_VIEW = 'view'
ACCESS_TYPE_MODIFY = 'modify'
ACCESS_TYPE_DELETE = 'delete'
ACCESS_TYPES = (ACCESS_TYPE_VIEW, ACCESS_TYPE_MODIFY, ACCESS_TYPE_DELETE)
def ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# coding: utf-8
#
# Copyright © 2012-2014 Ejwa Software. All rights reserved.
#
# This file is part of gitinspector.
#
# gitinspector 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, eithe... | unknown | codeparrot/codeparrot-clean | ||
"""Tests for the smartapp module."""
from uuid import uuid4
from pysmartthings import AppEntity, Capability
from homeassistant.components.smartthings import smartapp
from homeassistant.components.smartthings.const import (
CONF_REFRESH_TOKEN,
DATA_MANAGER,
DOMAIN,
)
from tests.async_mock import AsyncMock... | unknown | codeparrot/codeparrot-clean | ||
import type { NextRequest, NextFetchEvent } from "next/server";
import middleware from "lib/middleware";
// eslint-disable-next-line
export default async function (req: NextRequest, ev: NextFetchEvent) {
return middleware(req, ev);
}
export const config = {
/*
* Match all paths except for:
* 1. /api routes
... | typescript | github | https://github.com/vercel/next.js | examples/cms-sitecore-xmcloud/src/middleware.ts |
"""Word completion for GNU readline 2.0.
This requires the latest extension to the readline module. The completer
completes keywords, built-ins and globals in a selectable namespace (which
defaults to __main__); when completing NAME.NAME..., it evaluates (!) the
expression up to the last dot and completes its attribut... | unknown | codeparrot/codeparrot-clean | ||
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... | typescript | github | https://github.com/apache/airflow | airflow-core/src/airflow/ui/tests/e2e/specs/home-dashboard.spec.ts |
from paddle.trainer_config_helpers import *
settings(batch_size=1000, learning_rate=1e-4)
din = data_layer(name='data', size=200)
hidden = fc_layer(input=din, size=200, act=SigmoidActivation())
rnn = recurrent_layer(input=hidden, act=SigmoidActivation())
rnn2 = recurrent_layer(input=hidden, act=SigmoidActivation()... | unknown | codeparrot/codeparrot-clean | ||
{% block content %}
{% block error_here %}{% endblock %}
{% endblock %} | html | github | https://github.com/django/django | tests/template_tests/templates/included_base.html |
"""This test case provides support for checking forking and wait behavior.
To test different wait behavior, overrise the wait_impl method.
We want fork1() semantics -- only the forking thread survives in the
child after a fork().
On some systems (e.g. Solaris without posix threads) we find that all
active threads su... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import
import six
class EventError(object):
INVALID_DATA = 'invalid_data'
INVALID_ATTRIBUTE = 'invalid_attribute'
VALUE_TOO_LONG = 'value_too_long'
UNKNOWN_ERROR = 'unknown_error'
SECURITY_VIOLATION = 'security_violation'
RESTRICTED_IP = 'restricted_ip'
JS_... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2019 Fortinet, 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, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin env python
from tests.compat import mock, unittest
from httpretty import HTTPretty
import json
import requests
from boto.cloudsearch.search import SearchConnection, SearchServiceException
from boto.compat import six, map
HOSTNAME = "search-demo-userdomain.us-east-1.cloudsearch.amazonaws.com"
FULL_URL = '... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
# pylint: disable=no-member
#
# @Author: oesteban
# @Date: 2016-01-05 11:33:39
# @Email: code@oscaresteban.es
# @Last modified by: oesteban
""" Encapsulate... | unknown | codeparrot/codeparrot-clean | ||
<?php
namespace Illuminate\Tests\Queue;
use Aws\DynamoDb\DynamoDbClient;
use Carbon\CarbonImmutable;
use DateTimeInterface;
use Exception;
use Illuminate\Queue\Failed\DynamoDbFailedJobProvider;
use Illuminate\Support\Carbon;
use Illuminate\Support\Str;
use Mockery as m;
use PHPUnit\Framework\TestCase;
class DynamoDb... | php | github | https://github.com/laravel/framework | tests/Queue/DynamoDbFailedJobProviderTest.php |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Test `astroquery.utils.timer`.
.. note::
The tests only compare rough estimates as
performance is machine-dependent.
"""
# STDLIB
import time
# THIRD-PARTY
import pytest
import numpy as np
from astropy.utils.exceptions import AstropyUserWar... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python2
# coding: utf-8
import argparse
import copy
import sys
import logging
import os
from pykit import dictutil
logger = logging.getLogger(__name__)
def command(**kwargs):
root, parser = add_command_help(kwargs)
inputs = sys.argv[1:]
try:
cmds = []
while len(inputs) ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2013 Nicira, Inc.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2013 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 requ... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright (c) 2019, 2025, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is designed to work with certain software (including... | c | github | https://github.com/mysql/mysql-server | include/my_compress.h |
"""
Simple Digest-MD5 implementation (client side)
Implementation based on RFC 2831 (http://www.ietf.org/rfc/rfc2831.txt)
"""
import base64
import hashlib
import binascii
import re
import random
class DigestMD5(object):
def __init__(self, challenge, digesturi):
self.__digesturi = digesturi
self._... | unknown | codeparrot/codeparrot-clean | ||
"""
Module for visitor class mapping.
"""
import sqlalchemy as sa
from migrate.changeset import ansisql
from migrate.changeset.databases import (sqlite,
postgres,
mysql,
oracle,
... | unknown | codeparrot/codeparrot-clean | ||
name: "Check libc++ generated files"
on:
pull_request:
paths:
- 'libcxx/**'
permissions:
contents: read
jobs:
check_generated_files:
runs-on: ubuntu-24.04
if: github.repository == 'llvm/llvm-project'
steps:
- name: Fetch LLVM sources
uses: actions/checkout@8e8c483db84b4bee98b... | unknown | github | https://github.com/llvm/llvm-project | .github/workflows/libcxx-check-generated-files.yml |
/* 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 applicable law or ag... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/core/profiler/internal/tfprof_constants.h |
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import tarfile
from StringIO import StringIO
from file_system import FileNotFoundError
from future import Future
from patcher import Patcher
_C... | unknown | codeparrot/codeparrot-clean | ||
"""
Django settings for django_fishface project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR,... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.
import sys
import apiutil
def GenerateEntrypoints():
#apiutil.CopyrightC()
# Get sorted list of dispatched functions.
# The order is very important - it must ma... | unknown | codeparrot/codeparrot-clean | ||
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_loaders.telegram import TelegramChatLoader
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling... | python | github | https://github.com/langchain-ai/langchain | libs/langchain/langchain_classic/chat_loaders/telegram.py |
# coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | unknown | codeparrot/codeparrot-clean | ||
/*
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 applicable law or agreed to in writing, ... | go | github | https://github.com/kubernetes/kubernetes | pkg/kubelet/lifecycle/handlers.go |
# Treemap {#Treemap}
[<img alt="Treemap" src="https://raw.githubusercontent.com/d3/d3-hierarchy/main/img/treemap.png">](https://observablehq.com/@d3/treemap/2)
[Examples](https://observablehq.com/@d3/treemap/2) · Introduced by [Ben Shneiderman](http://www.cs.umd.edu/hcil/treemap-history/) in 1991, a **treemap** recur... | unknown | github | https://github.com/d3/d3 | docs/d3-hierarchy/treemap.md |
##########################################################
# THIS IS A GENERATED FILE -- DO NOT MODIFY.
# IF YOU WISH TO MODIFY THIS SUITE, MODIFY THE CORRESPONDING MATRIX SUITE MAPPING FILE
# AND REGENERATE THE MATRIX SUITES.
#
# matrix suite mapping file: buildscripts/resmokeconfig/matrix_suites/mappings/sharded_coll... | unknown | github | https://github.com/mongodb/mongo | buildscripts/resmokeconfig/matrix_suites/generated_suites/sharded_collections_jscore_passthrough_last_continuous_new_old_old_new.yml |
use serde_derive::Serialize;
#[derive(Serialize)]
#[serde(transparent)]
enum E {}
fn main() {} | rust | github | https://github.com/serde-rs/serde | test_suite/tests/ui/transparent/enum.rs |
from __future__ import print_function
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright 2002 Ben Escoto <ben@emerose.org>
# Copyright 2007 Kenneth Loafman <kenneth@loafman.com>
#
# This file is part of duplicity.
#
# Duplicity is free software; you can redistribute it and/or modify it
# under the t... | unknown | codeparrot/codeparrot-clean | ||
scrape_configs:
- job_name: prometheus
relabel_configs:
- source_labels: [abcdef]
action: keepequal | unknown | github | https://github.com/prometheus/prometheus | config/testdata/keepequal.bad.yml |
/*-------------------------------------------------------------------------
*
* postgres_fe.h
* Primary include file for PostgreSQL client-side .c files
*
* This should be the first file included by PostgreSQL client libraries and
* application programs --- but not by backend modules, which should include
* po... | c | github | https://github.com/postgres/postgres | src/include/postgres_fe.h |
// RUN: %check_clang_tidy -check-suffix=DEFAULT %s \
// RUN: bugprone-narrowing-conversions %t --
// RUN: %check_clang_tidy -check-suffix=WARN %s \
// RUN: bugprone-narrowing-conversions %t -- \
// RUN: -config='{CheckOptions: { \
// RUN: bugprone-narrowing-conversions.WarnWithinTemplateInstantiation: 1 \
// RUN: }}... | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/test/clang-tidy/checkers/bugprone/narrowing-conversions-intemplates-option.cpp |
'''
Problem 32 from Project Euler
We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once; for example, the 5-digit number, 15234, is 1 through 5 pandigital.
The product 7254 is unusual, as the identity, 39 * 186 = 7254, containing multiplicand, multiplier, and product i... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import datetime, timedelta
from odoo import fields
from odoo.addons.website_event.tests.common import TestWebsiteEventCommon
from odoo.tests.common import users
class TestEventWebsite(TestWebsiteEventComm... | unknown | codeparrot/codeparrot-clean | ||
from flask import Flask,jsonify,render_template,request
app = Flask(__name__)
class aa(object):
def js(self,data='hellow'):
return data
@app.route('/login')
def login():
return render_template('login.html')
@app.route('/index')
def index():
return render_template('index.html')
@app.route('/',me... | unknown | codeparrot/codeparrot-clean | ||
import Image from "next/image";
import ViewSource from "../../components/view-source";
import mountains from "../../public/mountains.jpg";
const Responsive = () => (
<div>
<ViewSource pathname="app/responsive/page.tsx" />
<h1>Image Component With Layout Responsive</h1>
<Image
alt="Mountains"
... | typescript | github | https://github.com/vercel/next.js | examples/image-component/app/responsive/page.tsx |
#!/usr/bin/env python3
"""
# OpenWrt download directory cleanup utility.
# Delete all but the very last version of the program tarballs.
#
# Copyright (C) 2010-2015 Michael Buesch <m@bues.ch>
# Copyright (C) 2013-2015 OpenWrt.org
"""
from __future__ import print_function
import sys
import os
import re
import getopt
... | unknown | codeparrot/codeparrot-clean | ||
//! Implement methods to pretty print rustc_public's IR body.
use std::fmt::Debug;
use std::io::Write;
use std::{fmt, io, iter};
use fmt::{Display, Formatter};
use super::{AggregateKind, AssertMessage, BinOp, BorrowKind, FakeBorrowKind, TerminatorKind};
use crate::mir::{
Operand, Place, RawPtrKind, Rvalue, Statem... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_public/src/mir/pretty.rs |
# encoding:utf-8
"""
:synopsis: views diplaying and processing main content post forms
This module contains views that allow adding, editing, and deleting main textual content.
"""
import datetime
import logging
import os
import os.path
import random
import sys
import tempfile
import time
from django.shortcuts import ... | unknown | codeparrot/codeparrot-clean | ||
# Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | 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 use t... | unknown | github | https://github.com/apache/kafka | config/connect-log4j2.yaml |
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
**Example**
```esql
ROW a = "hello"
| EVAL has_ll = CONTAINS(a, "ll")
```
| a:keyword | has_ll:boolean |
| --- | --- |
| hello | true | | unknown | github | https://github.com/elastic/elasticsearch | docs/reference/query-languages/esql/_snippets/functions/examples/contains.md |
import unittest
from totalopenstation.formats import Point
from totalopenstation.formats.polar import BasePoint, PolarPoint
class TestPolar(unittest.TestCase):
def setUp(self):
self.bp0 = BasePoint(x='0', y='0', z='0', ih='1.0', b_zero_st='0.0')
self.bp1 = BasePoint(x='0', y='0', z='0', ih='1.324... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
"""
Collects /sys/kernel/debug/kvm/*
#### Dependencies
* /sys/kernel/debug/kvm
"""
import diamond.collector
import os
class KVMCollector(diamond.collector.Collector):
PROC = '/sys/kernel/debug/kvm'
def get_default_config_help(self):
config_help = super(KVMCollector, self).get_def... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/qcom,msm8939-camss.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm MSM8939 Camera Subsystem (CAMSS)
maintainers:
- Vincent Knecht <vincent.knecht@mailoo.org>
description:
The C... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/media/qcom,msm8939-camss.yaml |
# frozen_string_literal: false
# $RoughId: extconf.rb,v 1.6 2001/07/13 15:38:27 knu Exp $
# $Id$
require "mkmf"
$INSTALLFILES = {
"digest.h" => "$(HDRDIR)"
} if $extmk
create_makefile("digest") | ruby | github | https://github.com/ruby/ruby | ext/digest/extconf.rb |
/*
* Copyright (C) 2016 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/collect/ComparatorsTest.java |
"""
The MIT License
Copyright (c) 2007 Leah Culver
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, copy, modify, merge, publis... | unknown | codeparrot/codeparrot-clean | ||
<?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.
*/
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\UserProvider;... | php | github | https://github.com/symfony/symfony | src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php |
"""
Views for the maintenance app.
"""
import logging
from django.db import transaction
from django.core.validators import ValidationError
from django.utils.decorators import method_decorator
from django.utils.translation import ugettext as _
from django.views.generic import View
from edxmako.shortcuts import render_t... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def create_homepage(apps, schema_editor):
# Get models
ContentType = apps.get_model('contenttypes.ContentType')
Page = apps.get_model('wagtailcore.Page')
Site = apps.get_model('wagtailcore.Site')
HomeP... | unknown | codeparrot/codeparrot-clean | ||
#
# C naming conventions
#
#
# Prefixes for generating C names.
# Collected here to facilitate ensuring uniqueness.
#
pyrex_prefix = "__pyx_"
codewriter_temp_prefix = pyrex_prefix + "t_"
temp_prefix = u"__cyt_"
builtin_prefix = pyrex_prefix + "builtin_"
arg_prefix = pyrex_prefix + "arg_"
fu... | unknown | codeparrot/codeparrot-clean | ||
# pylint: skip-file
# flake8: noqa
def main():
'''
ansible oc module for managing OpenShift Secrets
'''
module = AnsibleModule(
argument_spec=dict(
kubeconfig=dict(default='/etc/origin/master/admin.kubeconfig', type='str'),
state=dict(default='present', type='str',
... | unknown | codeparrot/codeparrot-clean | ||
import datetime
import mock
from django.utils import timezone
from nose.tools import * # noqa
from tests.base import fake, OsfTestCase
from osf_tests.factories import (
EmbargoFactory, NodeFactory, ProjectFactory,
RegistrationFactory, UserFactory, UnconfirmedUserFactory
)
from framework.exceptions import Per... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (c) 2022 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockitousage;
import java.util.function.Predicate;
public class ProductionCode {
@SuppressWarnings("ReturnValueIgnored")
public static void simpleMethod(Predicate<String> mock, ... | java | github | https://github.com/mockito/mockito | mockito-extensions/mockito-junit-jupiter/src/test/java/org/mockitousage/ProductionCode.java |
# Copyright 2013 OpenStack Foundation
# Copyright 2013 IBM Corp
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICE... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
from Tkinter import *
class Test(Frame):
def printit(self):
print "hi"
def createWidgets(self):
self.QUIT = Button(self, text='QUIT',
background='red',
foreground='white',
height=3,
command=self.quit)
self.QUIT.pack(side=BOTTOM, fill=BOTH)
self.canvasObject = Canvas(self, width="5... | unknown | codeparrot/codeparrot-clean | ||
# 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 3 of the License, or (at your option) any later version.
# This library is distributed in the hope that it will be useful... | unknown | codeparrot/codeparrot-clean | ||
import unittest
from test import support
import base64
import binascii
import os
from array import array
from test.support import script_helper
class LegacyBase64TestCase(unittest.TestCase):
# Legacy API is not as permissive as the modern API
def check_type_errors(self, f):
self.assertRaises(TypeError... | unknown | codeparrot/codeparrot-clean | ||
from django.core.signing import b64_decode
from django.test import TestCase, override_settings
from django.urls import reverse
from .models import SomeObject
from .urls import ContactFormViewWithMsg, DeleteFormViewWithMsg
@override_settings(ROOT_URLCONF="messages_tests.urls")
class SuccessMessageMixinTests(TestCase):... | python | github | https://github.com/django/django | tests/messages_tests/test_mixins.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.