code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
# -*- coding:utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Savoir-faire Linux. All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as publish... | unknown | codeparrot/codeparrot-clean | ||
"""Support for getting collected information from PVOutput."""
from collections import namedtuple
from datetime import timedelta
import logging
import voluptuous as vol
from homeassistant.components.rest.sensor import RestData
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import... | unknown | codeparrot/codeparrot-clean | ||
import pytest
from framework.auth.core import Auth
from osf_tests.factories import ConferenceFactory, ProjectFactory, AuthUserFactory
from api_tests import utils as api_utils
@pytest.mark.django_db
class TestMeetingDetail:
@pytest.fixture()
def meeting(self):
return ConferenceFactory(
nam... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
import sys
import re
def entry_is_device(entry):
first_arg_type = entry[1][1:].split(' ')[0]
device_types = ['VkDevice', 'VkCommandBuffer', 'VkQueue']
return (first_arg_type in device_types) and (entry[0] != 'vkGetDeviceProcAddr')
def main():
pure_entrypoints = []
entrypoin... | 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 us... | unknown | codeparrot/codeparrot-clean | ||
---
title: $bindable
---
Ordinarily, props go one way, from parent to child. This makes it easy to understand how data flows around your app.
In Svelte, component props can be _bound_, which means that data can also flow _up_ from child to parent. This isn't something you should do often — overuse can make your data ... | unknown | github | https://github.com/sveltejs/svelte | documentation/docs/02-runes/06-$bindable.md |
from __future__ import unicode_literals
from datetime import datetime, timedelta
from urllib import quote
from django.conf import settings
from django.contrib.auth.models import User
from django.db import transaction
from django.utils import timezone
import requests
import waffle
from remo.base.templatetags.helpers... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python -u
# Copyright (c) 2010-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 ap... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.client.webrtc.rs
import io.ktor.client.webrtc.*
import io.ktor.client.webrtc.rs.utils.*
import io.ktor.utils.io.ExperimentalKtorApi
import kotlinx.coroutines.CoroutineScope
im... | kotlin | github | https://github.com/ktorio/ktor | ktor-client/ktor-client-webrtc/ktor-client-webrtc-rs/common/test/io/ktor/client/webrtc/rs/WebRtcDataChannelTest.kt |
# Copyright 2024 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 applicabl... | python | github | https://github.com/huggingface/transformers | src/transformers/models/fastspeech2_conformer/__init__.py |
// Copyright 2018 The etcd 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 t... | go | github | https://github.com/etcd-io/etcd | client/v3/mock/mockserver/doc.go |
use super::prelude::*;
pub(crate) struct MustUseParser;
impl<S: Stage> SingleAttributeParser<S> for MustUseParser {
const PATH: &[Symbol] = &[sym::must_use];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
con... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_attr_parsing/src/attributes/must_use.rs |
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
"""ObjectOwner permissions changes.
Revision ID: 169eef85896d
Revises: 33a9ca4c... | unknown | codeparrot/codeparrot-clean | ||
/**
* The default argument placeholder value for methods.
*
* @type {Object}
*/
module.exports = {}; | javascript | github | https://github.com/lodash/lodash | fp/placeholder.js |
# -*- coding:utf-8 -*-
"""
tests.backend
~~~~~~~~~~~~~
:copyright: (c) 2015 by Jason Lai.
:license: BSD, see LICENSE for more details.
"""
from faker import Factory
from functools import partial
fake = Factory.create()
def test_redis_backend_basic(rb, fake_manager, fake_coll):
fake_manager.coll... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf8 -*-
from __future__ import print_function
import os
import json
import logging
import time
import slacker
from websocket import (
create_connection, WebSocketException, WebSocketConnectionClosedException
)
from slackbot.utils import to_utf8
logger = logging.getLogger(__name__)
class SlackCli... | 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");... | unknown | codeparrot/codeparrot-clean | ||
# Copyright David Abrahams 2004. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
r'''>>> import pickle4_ext
>>> import pickle
>>> def world_getinitargs(self):
... return (self.get_country(),)
>>> pic... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com>
# This file is released under the GNU GPL, version 3 or a later revision.
# For further details see the COPYING file
from datetime import timedelta
from datetime import datetime
from collections import deque
import subprocess
im... | unknown | codeparrot/codeparrot-clean | ||
from .state import EOF
from .tokens import TokenEof
from .tokens_base import TOKEN_COMMAND_WRITE_AND_QUIT_COMMAND
from .tokens_base import TokenOfCommand
from Vintageous import ex
plus_plus_translations = {
'ff': 'fileformat',
'bin': 'binary',
'enc': 'fileencoding',
'nobin': 'nobinary',
}
@ex.command(... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
/*
Copyright 2025 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 | hack/tools/golangci-lint/sorted/plugin/plugin.go |
# Copyright 2019 Google 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 agreed to in writing, ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2017 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 | ||
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2012, Jan-Piet Mens <jpmens () gmail.com>
# Copyright: (c) 2015, Ales Nosek <anosek.nosek () gmail.com>
# Copyright: (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 ... | unknown | codeparrot/codeparrot-clean | ||
# BSD 3-Clause License
#
# Copyright (c) 2019, Elasticsearch BV
# 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, t... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
***************************************************************************
RasterOptionsWidget.py
---------------------
Date : December 2016
Copyright : (C) 2016 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
****... | unknown | codeparrot/codeparrot-clean | ||
package local
import (
"io"
"sync"
"github.com/Microsoft/hcsshim"
"github.com/moby/moby/v2/pkg/ioutils"
)
type autoClosingReader struct {
io.ReadCloser
sync.Once
}
func (r *autoClosingReader) Read(b []byte) (int, error) {
n, err := r.ReadCloser.Read(b)
if err != nil {
r.Once.Do(func() { r.ReadCloser.Close... | go | github | https://github.com/moby/moby | daemon/internal/libcontainerd/local/process_windows.go |
# -*- coding: utf-8 -*-
# Copyright (c) 2015, ESS and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import getdate, cstr, get_link_to_form
class LabTest(Document):
... | unknown | codeparrot/codeparrot-clean | ||
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
from urllib.request import urlopen
from urllib.parse import urlencode, quote
from json import dumps
from codecs import encode
from os import getenv
from subprocess import check_output
def post_n_pin(token, oid, message, link):
## Fallback method
post_json = dumps({
"owner_id": oid,
"from_group": 1,
"me... | unknown | codeparrot/codeparrot-clean | ||
#
# This file is part of pyasn1-modules software.
#
# Created by Russ Housley
# Copyright (c) 2019, Vigil Security, LLC
# License: http://snmplabs.com/pyasn1/license.html
#
import sys
import unittest
from pyasn1.codec.der.decoder import decode as der_decoder
from pyasn1.codec.der.encoder import encode as der_encoder
... | unknown | codeparrot/codeparrot-clean | ||
import base64
class Base64Converter:
regex = r"[a-zA-Z0-9+/]*={0,2}"
def to_python(self, value):
return base64.b64decode(value)
def to_url(self, value):
return base64.b64encode(value).decode("ascii")
class DynamicConverter:
_dynamic_to_python = None
_dynamic_to_url = None
@p... | python | github | https://github.com/django/django | tests/urlpatterns/converters.py |
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2015, Continuum Analytics, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#----------------------------------------... | unknown | codeparrot/codeparrot-clean | ||
"""
A HTML 4.0 target.
"""
from targets import _
import targets
from config import HTML_LOWER
NAME = _('HTML page')
TYPE = 'html'
HEADER = """\
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META NAME="generator" CONTENT="http://txt2tags.org">
<META HTTP-EQUIV="Content-Type" CONTENT="... | unknown | codeparrot/codeparrot-clean | ||
# Test: random
name: pandas-dev
channels:
- conda-forge
dependencies:
- python=3.8
# build dependencies
- versioneer[toml]
- cython>=0.29.32
# test dependencies
- pytest>=7.3.2
- pytest-cov
- pytest-xdist>=3.4.0
- psutil
- boto3
# required dependencies
- python-dateutil
- numpy
- pytz
... | unknown | github | https://github.com/pandas-dev/pandas | scripts/tests/data/deps_unmodified_random.yaml |
/*
Copyright 2020 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/controller/cronjob/cronjob_controllerv2_test.go |
# 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
# d... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Copyright 2004-2006 Zuza Software Foundation
#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import locale
import textwrap
import collections
from subprocess import Popen, PIPE
from kids.txt import indent
ShellOutput = collections.namedtuple('ShellOutput', ["out", "err", "errlvl"])
try:
basestring # attempt to evaluate basestrin... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
import logging
import flask
from google.appengine.api import mail
from google.appengine.ext import deferred
import config
import util
###############################################################################
# Helpers
############################################################################... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env bash
set -o nounset -o errexit -o xtrace
ansible-playbook -i inventory "play.yml" -v "$@" | unknown | github | https://github.com/ansible/ansible | test/integration/targets/error_from_connection/runme.sh |
# frozen_string_literal: true
module Bundler
module SafeMarshal
ALLOWED_CLASSES = [
Array,
FalseClass,
Gem::Specification,
Gem::Version,
Hash,
String,
Symbol,
Time,
TrueClass,
].freeze
ERROR = "Unexpected class %s present in marshaled data. Only %s a... | ruby | github | https://github.com/ruby/ruby | lib/bundler/safe_marshal.rb |
/*
* 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.fir.components
import org.jetbrains.kotlin.analysis.api.components.... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KaFirCompletionCandidateChecker.kt |
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v1beta1",
"metadata": {
"name": "v0alpha1.timeseries-formats.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/panel-timeseries/v0alpha1.timeseries-formats.v42.v1beta1.json |
from django.core.management.base import BaseCommand, CommandError
import socket
import imaplib
import sys
import email
from django.conf import settings
from main.models import Email, EmailOversizeNotified, Leg
import pprint
from django.core.mail import send_mail
# This file is part of https://github.com/cpina/science-... | unknown | codeparrot/codeparrot-clean | ||
<?php
namespace Illuminate\Tests\Routing;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Routing\Redirector;
use Illuminate\Routing\UrlGenerator;
use Illuminate\Session\Store;
use Mockery as m;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\HeaderBag;
class Ro... | php | github | https://github.com/laravel/framework | tests/Routing/RoutingRedirectorTest.php |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/nxp,imx8-isi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: i.MX8 Image Sensing Interface
maintainers:
- Laurent Pinchart <laurent.pinchart@ideasonboard.com>
description: |
The Im... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml |
# 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 | ||
#!/usr/bin/env python
# Author: Abhishek Malik <abhishek.malik@intel.com>
# Copyright (c) 2017 Intel Corporation.
#
# 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, includ... | unknown | codeparrot/codeparrot-clean | ||
//// [tests/cases/compiler/addMoreCallSignaturesToBaseSignature.ts] ////
//// [addMoreCallSignaturesToBaseSignature.ts]
interface Foo {
(): string;
}
interface Bar extends Foo {
(key: string): string;
}
var a: Bar;
var kitty = a();
//// [addMoreCallSignaturesToBaseSignature.js]
"use strict";
var a;
var kitt... | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/addMoreCallSignaturesToBaseSignature.js |
/*
Copyright 2019 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 | cmd/kubeadm/app/cmd/phases/join/data_test.go |
import glob
import logging
import optparse
import os
import sys
import textwrap
import pyfits.diff
from pyfits.util import fill
log = logging.getLogger('fitsdiff')
USAGE = """
Compare two FITS image files and report the differences in header keywords and
data.
fitsdiff [options] filename1 filename2
where filen... | unknown | codeparrot/codeparrot-clean | ||
"""Lightlink channels module for Zigbee Home Automation."""
import asyncio
import zigpy.exceptions
import zigpy.zcl.clusters.lightlink as lightlink
from .. import registries
from .base import ChannelStatus, ZigbeeChannel
@registries.CHANNEL_ONLY_CLUSTERS.register(lightlink.LightLink.cluster_id)
@registries.ZIGBEE_CH... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Standard library imports
import sys
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
# Third party imports
# Local application / specific library imports
# python_2_unicode_compatible
try:
from django.utils.encoding import python_2_unicode_compatible
except ImportError:
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# Copyright 2014 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Functions for parsing the gypd output from gyp.
"""
import os
def parse_dictionary(var_dict, d, current_target_name, dest_dir):
"""Helper function to get the me... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env 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
# "L... | unknown | codeparrot/codeparrot-clean | ||
// This is the implementation of Python atomic operations using C++11 or C11
// atomics. Note that the pyatomic_gcc.h implementation is preferred for GCC
// compatible compilers, even if they support C++11 atomics.
#ifndef Py_ATOMIC_STD_H
# error "this header file must not be included directly"
#endif
#ifdef __cplus... | c | github | https://github.com/python/cpython | Include/cpython/pyatomic_std.h |
class Neuron:
'Represents a neuron'
currentVal = 0
threshold = 1
connections = []
identity = 0
def displayVal(self):
print(self.identity,":",self.currentVal)
for c in self.connections:
print(self.identity," connected to ",c.end.identity)
def addSynapse(self,desti... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | unknown | codeparrot/codeparrot-clean | ||
/*
* 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 | clients/src/main/java/org/apache/kafka/common/internals/PartitionStates.java |
"""
Provides a function for importing a git repository into the lms
instance when using a mongo modulestore
"""
import os
import re
import StringIO
import subprocess
import logging
from django.conf import settings
from django.core import management
from django.core.management.base import CommandError
from django.util... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2001-2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "... | unknown | codeparrot/codeparrot-clean | ||
use crate::config::native_libs::{NativeLibParts, split_native_lib_value};
#[test]
fn split() {
// This is a unit test for some implementation details, so consider deleting
// it if it gets in the way.
use NativeLibParts as P;
let examples = &[
("", P { kind: None, modifiers: None, name: "", ne... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_session/src/config/native_libs/tests.rs |
//
// Helper library for querying WMI using its COM-based query API.
//
// Copyright (c) Microsoft Corporation
// Licensed to PSF under a contributor agreement
//
// Version history
// 2022-08: Initial contribution (Steve Dower)
// clinic/_wmimodule.cpp.h uses internal pycore_modsupport.h API
#ifndef Py_BUILD_CORE_B... | cpp | github | https://github.com/python/cpython | PC/_wmimodule.cpp |
#!/usr/bin/env python
# coding: utf-8
from __future__ import unicode_literals
# Allow direct execution
import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# Various small unit tests
import io
import json
import xml.etree.ElementTree
from youtube_dl.ut... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
#
# Copyright (C) 2013 Google Inc.
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opti... | unknown | codeparrot/codeparrot-clean | ||
from sympy import (Add, factor_list, igcd, Matrix, Mul, S, simplify,
Symbol, symbols, Eq, pi, factorint, oo, powsimp)
from sympy.core.function import _mexpand
from sympy.core.compatibility import range
from sympy.functions.elementary.trigonometric import sin
from sympy.solvers.diophantine import (descent, diop_bf_D... | unknown | codeparrot/codeparrot-clean | ||
# (c) 2016, Matt Martz <matt@sivel.net>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
... | 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 us... | unknown | codeparrot/codeparrot-clean | ||
import functools
import json
import logging
import random
import re
import string # pylint: disable=deprecated-module
import fnmatch
import unicodedata
import urllib
from textwrap import dedent
from external_auth.models import ExternalAuthMap
from external_auth.djangostore import DjangoOpenIDStore
from django.c... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2021 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.
package sql
import (
"github.com/cockroachdb/cockroach/pkg/jobs/jobspb"
"github.com/cockroachdb/cockroach/pkg/sql/schemachanger/scpb"
"github.com/cockroachdb/cockroa... | go | github | https://github.com/cockroachdb/cockroach | pkg/sql/schema_changer_state.go |
/*
* 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/target/CommonsPool2TargetSource.java |
<!---
# 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... | unknown | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-common/src/site/markdown/release/0.6.1/CHANGELOG.0.6.1.md |
# Copyright 2017 Battelle Energy Alliance, 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 agreed t... | unknown | codeparrot/codeparrot-clean | ||
"""Default tags used by the template system, available to all templates."""
from __future__ import unicode_literals
import re
import sys
import warnings
from datetime import datetime
from itertools import cycle as itertools_cycle, groupby
from django.conf import settings
from django.utils import six, timezone
from dj... | unknown | codeparrot/codeparrot-clean | ||
import logging
from pip.basecommand import Command
from pip.operations.check import check_requirements
from pip.utils import get_installed_distributions
logger = logging.getLogger(__name__)
class CheckCommand(Command):
"""Verify installed packages have compatible dependencies."""
name = 'check'
usage = "... | unknown | codeparrot/codeparrot-clean | ||
"""Tests for aiohttp/protocol.py"""
import unittest
import unittest.mock
import asyncio
import zlib
from aiohttp import hdrs, protocol
class TestHttpMessage(unittest.TestCase):
def setUp(self):
self.transport = unittest.mock.Mock()
asyncio.set_event_loop(None)
def test_start_request(self):
... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
# example.js
```javascript
_{{example.js}}_
```
# dist/output.js
```javascript
_{{dist/output.js}}_
```
# dist/my own chunk.output.js
```javascript
_{{dist/my own chunk.output.js}}_
```
# dist/node_modules_b_js-node_modules_d_js.output.js
```javascript
_{{dist/node_modules_b_js-node_modules_d_js.output.js}}_
```... | unknown | github | https://github.com/webpack/webpack | examples/named-chunks/template.md |
package kotlinx.coroutines.rx2
import kotlinx.coroutines.testing.*
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.*
import kotlinx.coroutines.selects.*
import org.junit.Test
import kotlin.onSuccess
import kotlin.test.*
class ObservableSubscriptionSelectTest : TestBase() {
@Test
fun testSelect(... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | reactive/kotlinx-coroutines-rx2/test/ObservableSubscriptionSelectTest.kt |
#!/usr/bin/python
#
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com>
# Chris Houseknecht, <house@redhat.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Soft... | unknown | codeparrot/codeparrot-clean | ||
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | c | github | https://github.com/llvm/llvm-project | clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.h |
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | unknown | codeparrot/codeparrot-clean | ||
'''
Created on Jan 9, 2013
Copyright © 2013
The Board of Trustees of The Leland Stanford Junior University.
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.apac... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from django.conf.urls import url, patterns
from tcms.testcases.views import SimpleTestCaseView
from tcms.testcases.views import TestCaseCaseRunDetailPanelView
from tcms.testcases.views import TestCaseCaseRunListPaneView
from tcms.testcases.views import TestCaseReviewPaneView
from tcms.testcase... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) 2011 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | java | github | https://github.com/google/guava | android/guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java |
import re
import pytest
from langchain_classic.evaluation import RegexMatchStringEvaluator
@pytest.fixture
def regex_match_string_evaluator() -> RegexMatchStringEvaluator:
"""Create a RegexMatchStringEvaluator with default configuration."""
return RegexMatchStringEvaluator()
@pytest.fixture
def regex_match_... | python | github | https://github.com/langchain-ai/langchain | libs/langchain/tests/unit_tests/evaluation/regex_match/test_base.py |
# -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsXmlUtils.
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
"""
__aut... | 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... | unknown | codeparrot/codeparrot-clean | ||
import time
from proboscis.asserts import assert_equal
from proboscis.asserts import assert_not_equal
from proboscis.asserts import assert_false
from proboscis import SkipTest
from proboscis import test
from proboscis import before_class
from proboscis import after_class
from json import loads
from modules.logger imp... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# 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 | ||
# validateNoDerivedComputationsInEffects
## File
`src/Validation/ValidateNoDerivedComputationsInEffects.ts`
## Purpose
Validates that `useEffect` is not used for derived computations that could and should be performed during render. This catches a common anti-pattern where developers use effects to synchronize derive... | unknown | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/docs/passes/45-validateNoDerivedComputationsInEffects.md |
# -*- coding: utf-8 -*-
"""
tipfyext.jinja2
~~~~~~~~~~~~~~~
Jinja2 template support for Tipfy.
Learn more about Jinja2 at http://jinja.pocoo.org/2/
:copyright: 2011 by tipfy.org.
:license: BSD, see LICENSE.txt for more details.
"""
import blinker
from jinja2 import Environment, FileSystemLoa... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# Copyright (C) 2014 IBM Corporation and Others. All Rights Reserved.
#
# @author Steven R. Loomis <srl@icu-project.org>
#
# This tool slims down an ICU data (.dat) file according to a config file.
#
# See: http://bugs.icu-project.org/trac/ticket/10922
#
# Usage:
# Use "-h" to get help options.
im... | unknown | codeparrot/codeparrot-clean | ||
#!/bin/bash
set -euo pipefail
curl_with_retry() {
local output_path="$1"
local url="$2"
echo "Downloading $(basename "${output_path}")"
curl --fail --location --show-error --silent \
--retry 5 --retry-all-errors --retry-delay 2 --retry-max-time 120 \
-o "${output_path}" "${url}"
}
# Fetch beats arti... | unknown | github | https://github.com/elastic/elasticsearch | .buildkite/scripts/release-tests.sh |
from __future__ import unicode_literals
from django.contrib.auth.views import redirect_to_login
from django.core.exceptions import MiddlewareNotUsed
from django.http import HttpResponse, Http404
from mezzanine.conf import settings
from mezzanine.pages import context_processors, page_processors
from mezzanine.pages.mo... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.