code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
package kotlinx.coroutines.reactor
import kotlinx.coroutines.testing.*
import kotlinx.coroutines.*
import org.junit.Before
import org.junit.Test
import reactor.core.scheduler.Schedulers
import kotlin.test.*
class SchedulerTest : TestBase() {
@Before
fun setup() {
ignoreLostThreads("single-")
}
... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | reactive/kotlinx-coroutines-reactor/test/SchedulerTest.kt |
from __future__ import absolute_import
from copy import deepcopy
from datetime import datetime
from django.core.exceptions import MultipleObjectsReturned, FieldError
from django.test import TestCase
from django.utils import six
from django.utils.translation import ugettext_lazy
from .models import Article, Reporter
... | unknown | codeparrot/codeparrot-clean | ||
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Implementations of unittest features from the future."""
# Use unittest2 if it's available, otherwise unittest. This gives us
# back-ported features for 2.6.
t... | unknown | codeparrot/codeparrot-clean | ||
from pulpo_forms.fieldtypes import ModelField
from pulpo_forms.fieldtypes import FieldFactory
from .models import PulpoUser, Club, Country
class PulpoUserField(ModelField.ModelField):
prp_template_name = "usuario/properties.html"
model = PulpoUser
name = "PulpoUser"
def get_assets():
return ['... | unknown | codeparrot/codeparrot-clean | ||
import datetime
import posixpath
from django import forms
from django.core import checks
from django.core.files.base import File
from django.core.files.images import ImageFile
from django.core.files.storage import default_storage
from django.core.validators import validate_image_file_extension
from django.db.models im... | unknown | codeparrot/codeparrot-clean | ||
import datetime
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test.client import RequestFactory
from lizard_ui.models import ApplicationIcon
from lizard_ui.configchecker import checker
from lizard_ui.middleware import TracebackLog... | unknown | codeparrot/codeparrot-clean | ||
from logging import handlers
from uuid import uuid4
import locale
import logging
import os.path
import sys
import time
import traceback
import warnings
import re
import tarfile
import shutil
from CodernityDB.database_super_thread_safe import SuperThreadSafeDatabase
from argparse import ArgumentParser
from cache import... | unknown | codeparrot/codeparrot-clean | ||
##############################################################################
# Copyright (c) 2013-2017, 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/env python
"""
Extraction parsers for structured data embedded into HTML or XML files.
The former may include RDFa or microdata. The syntax and the extraction
procedures are based on:
* The RDFa specifications: http://www.w3.org/TR/#tr_RDFa
* The microdata specification: http://www.w3.org/TR/microdata/
* Th... | unknown | codeparrot/codeparrot-clean | ||
#pragma once
#include <ATen/cuda/CUDAContextLight.h>
// Preserved for BC, as many files depend on these includes
#include <ATen/Context.h>
#include <c10/cuda/CUDAStream.h>
#include <c10/util/Logging.h>
#include <ATen/cuda/Exceptions.h> | c | github | https://github.com/pytorch/pytorch | aten/src/ATen/cuda/CUDAContext.h |
#!/usr/bin/env python
#
# (C) 2001 by Argonne National Laboratory.
# See COPYRIGHT in top-level directory.
#
"""
This program is not to be executed from the command line. It is
exec'd by mpdroot to verify the version of python before executing
a 'regular' mpd pgm, e.g. mpdallexit.
"""
from sys import version... | unknown | codeparrot/codeparrot-clean | ||
"""
Solve the unique lowest-cost assignment problem using the
Hungarian algorithm (also known as Munkres algorithm).
"""
# Based on original code by Brain Clapper, adapted to NumPy by Gael Varoquaux.
# Heavily refactored by Lars Buitinck.
#
# TODO: a version of this algorithm has been incorporated in SciPy; use that
#... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
#
# This file is part of Shinken.
#
# Shinken 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 F... | unknown | codeparrot/codeparrot-clean | ||
name: Visual Regression Tests
on:
pull_request:
types: [labeled, synchronize, opened, reopened]
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
selenium-screenshots:
if: contains(join(github... | unknown | github | https://github.com/django/django | .github/workflows/screenshots.yml |
# -*- coding: utf-8 -*-
#
# Copyright 2009-2015 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
***************************************************************************
QGISAlgorithmProvider.py
---------------------
Date : December 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
***************... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE).
# Copyright (c) 2009-2010 Arista Networks, Inc.
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
# 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
# ... | 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... | json | github | https://github.com/apache/kafka | clients/src/main/resources/common/message/EndQuorumEpochResponse.json |
import sys
from datetime import datetime
import unittest
import os
import time
import uuid
import re
import subprocess
import sys
from subprocess import PIPE
import httplib
from urllib import urlencode
from urllib2 import urlopen, Request, HTTPRedirectHandler
import urllib2
import urllib
from cookielib import *
from ur... | unknown | codeparrot/codeparrot-clean | ||
"""Module that contains tests for runnable.astream_events API."""
import asyncio
import inspect
import sys
import uuid
from collections.abc import AsyncIterator, Callable, Iterable, Iterator, Sequence
from functools import partial
from itertools import cycle
from typing import (
Any,
cast,
)
import pytest
fro... | python | github | https://github.com/langchain-ai/langchain | libs/core/tests/unit_tests/runnables/test_runnable_events_v2.py |
from __future__ import unicode_literals
from calendar import timegm
from django.conf import settings
from django.contrib.sites.shortcuts import get_current_site
from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist
from django.http import Http404, HttpResponse
from django.template import Templat... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2015 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 required by applicable ... | unknown | codeparrot/codeparrot-clean | ||
import { flushSync } from 'svelte';
import { test } from '../../test';
export default test({
test({ assert, target, logs }) {
assert.deepEqual(logs, ['up']);
const button = target.querySelector('button');
flushSync(() => button?.click());
assert.deepEqual(logs, ['up']);
flushSync(() => button?.click());
... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/runtime-legacy/samples/attachment-in-mutated-state/_config.js |
import WebIDL
def WebIDLTest(parser, harness):
parser.parse("""
callback interface TestCallbackInterface {
attribute boolean bool;
};
""")
results = parser.finish()
iface = results[0]
harness.ok(iface.isCallback(), "Interface should be a callback")
parser = parser.... | unknown | codeparrot/codeparrot-clean | ||
# Parses Entrez Gene gene_history file format
# into staging area table
import sys, string
import MySQLdb
import Database
import gzip
import Config
with Database.db as cursor :
cursor.execute( "TRUNCATE TABLE " + Config.DB_STAGING + ".entrez_gene_history" )
insertCount = 0
with gzip.open( Config.EG_GENEHISTORY, ... | unknown | codeparrot/codeparrot-clean | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
//go:build !enterprise
package vault
import (
"context"
"fmt"
"io"
"github.com/hashicorp/go-hclog"
cserver "github.com/hashicorp/vault/command/server"
"github.com/hashicorp/vault/helper/activationflags"
"github.com/hashicorp/vault/helper/... | go | github | https://github.com/hashicorp/vault | vault/core_util.go |
#!/usr/bin/env bash
# Copyright 2021 The Cockroach Authors.
#
# Use of this software is governed by the CockroachDB Software License
# included in the /LICENSE file.
set -exuo pipefail
dir="$(dirname $(dirname $(dirname $(dirname "${0}"))))"
source "$dir/teamcity-support.sh" # For $root
source "$dir/teamcity-bazel... | unknown | github | https://github.com/cockroachdb/cockroach | build/teamcity/cockroach/nightlies/roachtest_nightly_aws.sh |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Coupon.expiration_date'
db.add_column('shoppingcart_coupon', 'expiration_date',
... | 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/common.py |
# 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 t... | unknown | codeparrot/codeparrot-clean | ||
from django.db import models
from django.utils import timezone
from misago.conf import settings
from misago.threads import threadtypes
from misago.threads.checksums import is_event_valid
class Event(models.Model):
forum = models.ForeignKey('misago_forums.Forum')
thread = models.ForeignKey('Thread')
autho... | unknown | codeparrot/codeparrot-clean | ||
An associated constant whose name does not match any of the associated constants
in the trait was used when implementing the trait.
Erroneous code example:
```compile_fail,E0438
trait Foo {}
impl Foo for i32 {
const BAR: bool = true;
}
```
Trait implementations can only implement associated constants that are
m... | unknown | github | https://github.com/rust-lang/rust | compiler/rustc_error_codes/src/error_codes/E0438.md |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('thing', '0009_auto_20170417_0255'),
]
operations = [
migrations.RenameField(
model_name='item',
old_n... | unknown | codeparrot/codeparrot-clean | ||
#! /usr/bin/env python
# Perform massive identifier substitution on C source files.
# This actually tokenizes the files (to some extent) so it can
# avoid making substitutions inside strings or comments.
# Inside strings, substitutions are never made; inside comments,
# it is a user option (off by default).
#
# The su... | unknown | codeparrot/codeparrot-clean | ||
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... | java | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/NativeXORRawErasureCoderFactory.java |
#===islucyplugin===
# -*- coding: utf-8 -*-
# Lucy's Plugin
# weather_plugin.py
# Initial Copyright © 2002-2005 Mike Mintz <mikemintz@gmail.com>
# Modifications Copyright © 2007 Als <Als@exploru.net>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General ... | 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-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java |
# 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 | ||
function useBar(props) {
let z;
if (props.a) {
if (props.b) {
z = baz();
}
}
return z;
} | javascript | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/assignment-in-nested-if.js |
from sqlalchemy import (Column, BigInteger, Integer, Text, ForeignKey, Enum,
Index, String, desc)
from sqlalchemy.orm import relationship
from nylas.logging import get_logger
log = get_logger()
from inbox.sqlalchemy_ext.util import JSON
from inbox.models.base import MailSyncBase
from inbox.mode... | unknown | codeparrot/codeparrot-clean | ||
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | unknown | codeparrot/codeparrot-clean | ||
---
navigation_title: "ASCII folding"
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-asciifolding-tokenfilter.html
---
# ASCII folding token filter [analysis-asciifolding-tokenfilter]
Converts alphabetic, numeric, and symbolic characters that are not in the Basic Latin Unic... | unknown | github | https://github.com/elastic/elasticsearch | docs/reference/text-analysis/analysis-asciifolding-tokenfilter.md |
# (c) 2015, Filipe Niero Felisbino <filipenf@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) any l... | unknown | codeparrot/codeparrot-clean | ||
""":mod:`pandas.io.html` is a module containing functionality for dealing with
HTML IO.
"""
from collections import abc
import numbers
import os
import re
from pandas.compat import raise_with_traceback
from pandas.compat._optional import import_optional_dependency
from pandas.errors import AbstractMethodError, Empty... | unknown | codeparrot/codeparrot-clean | ||
{
"favorite": {
"favoriteDags_one": "Dag รายการโปรด {{count}} รายการแรก",
"favoriteDags_other": "Dags รายการโปรด {{count}} รายการแรก",
"noDagRuns": "ยังไม่มี DagRun สำหรับ Dag นี้",
"noFavoriteDags": "ยังไม่มีรายการโปรด คลิกไอคอนรูปดาวด้านข้าง Dag ในรายการเพื่อเพิ่มเป็นรายการโปรดของคุณ"
},
"group"... | json | github | https://github.com/apache/airflow | airflow-core/src/airflow/ui/public/i18n/locales/th/dashboard.json |
"""Open an arbitrary URL.
See the following document for more info on URLs:
"Names and Addresses, URIs, URLs, URNs, URCs", at
http://www.w3.org/pub/WWW/Addressing/Overview.html
See also the HTTP spec (from which the error codes are derived):
"HTTP - Hypertext Transfer Protocol", at
http://www.w3.org/pub/WWW/Protocols... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
from __future__ import annotations
DOCUMENTATION = """
---
module: test_docs_no_metadata
short_description: Test module
description:
- Test module
author:
- Ansible Core Team
"""
EXAMPLES = """
"""
RETURN = """
"""
from ansible.module_utils.basic import AnsibleModule
def main():
modul... | python | github | https://github.com/ansible/ansible | test/integration/targets/ansible-doc/library/test_docs_no_metadata.py |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... | java | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/ResponseBuffer.java |
// Copyright Oliver Kowalke 2014.
// 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)
#ifndef BOOST_FIBERS_POOLED_FIXEDSIZE_STACK_H
#define BOOST_FIBERS_POOLED_FIXEDSIZE_STACK_H
#include <boost... | unknown | github | https://github.com/mysql/mysql-server | extra/boost/boost_1_87_0/boost/fiber/pooled_fixedsize_stack.hpp |
# -*- 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 | ||
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, i... | cpp | github | https://github.com/opencv/opencv | modules/calib3d/test/test_affine3.cpp |
use libc::c_uint;
pub(crate) use self::fixed_kinds::*;
#[derive(Copy, Clone)]
#[repr(transparent)]
pub(crate) struct MetadataKindId(c_uint);
macro_rules! declare_fixed_metadata_kinds {
(
$(
FIXED_MD_KIND($variant:ident, $value:literal)
)*
) => {
// Use a submodule to group... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_codegen_llvm/src/llvm/metadata_kind.rs |
import twitter, json, Orange
import sys
reload(sys)
sys.setdefaultencoding("utf8")
class Project:
user_count = {} # A dictionary of {"username" : # of tweets by that username}
'''
item_set = Keeps record of the itemSet generated so far, in the end, dumps it into data.bucket
queryList = List o... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
'''
EC2 external inventory script
=================================
Generates inventory that Ansible can understand by making API request to
AWS EC2 using the Boto library.
NOTE: This script assumes Ansible is being executed where the environment
variables needed for Boto have already been set:... | unknown | codeparrot/codeparrot-clean | ||
import logging
from autotest.client.shared import error
from virttest import virsh, libvirt_xml, aexpect, remote
def edit_filter_xml(filter_name, edit_cmd):
"""
Edit network filter xml
:param filter_name: filter name or uuid
:param edit_cmd: edit command list in interactive mode
"""
session = ... | unknown | codeparrot/codeparrot-clean | ||
import math
from bup import _helpers
from bup.helpers import *
BLOB_MAX = 8192*4 # 8192 is the "typical" blob size for bupsplit
BLOB_READ_SIZE = 1024*1024
MAX_PER_TREE = 256
progress_callback = None
fanout = 16
GIT_MODE_FILE = 0100644
GIT_MODE_TREE = 040000
GIT_MODE_SYMLINK = 0120000
assert(GIT_MODE_TREE != 40000) ... | 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 cli
import (
"context"
"fmt"
"net/url"
"os"
"path"
"regexp"
"sort"
"strings"
"sync"
"time"
"github.com/cockroachdb/cockroach/pkg/cli/cliflags"
"git... | go | github | https://github.com/cockroachdb/cockroach | pkg/cli/zip_per_node.go |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/arm/qcom,coresight-ctcu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: CoreSight TMC Control Unit
maintainers:
- Yuanfang Zhang <quic_yuanfang@quicinc.com>
- Mao Jinlong <quic_jinlmao@qu... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/arm/qcom,coresight-ctcu.yaml |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package sync_test
import (
"reflect"
"runtime"
. "sync"
"testing"
)
func TestCondSignal(t *testing.T) {
var m Mutex
c := NewCond(&m)
n := 2
running :=... | go | github | https://github.com/golang/go | src/sync/cond_test.go |
# -*- coding: utf-8 -*-
# -*- test-case-name: pytils.test.test_dt -*-
"""
Russian dates without locales
"""
import datetime
from pytils import numeral
from pytils.utils import check_positive
from pytils.third import six
DAY_ALTERNATIVES = {
1: (u"вчера", u"завтра"),
2: (u"позавчера", u"послезавтра")
} #... | unknown | codeparrot/codeparrot-clean | ||
{% load i18n %}
{% translate "This subdir should be ignored too." %} | html | github | https://github.com/django/django | tests/i18n/commands/templates/subdir/ignored.html |
"""Bounded-Variable Least-Squares algorithm."""
from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.linalg import norm, lstsq
from scipy.optimize import OptimizeResult
from .common import print_header_linear, print_iteration_linear
def compute_kkt_optimality(g, on_bound):
... | unknown | codeparrot/codeparrot-clean | ||
import sys
from django.conf import settings
from django.core.exceptions import MiddlewareNotUsed
from django.core.signals import got_request_exception
from django.http import HttpResponse
from django.template import engines
from django.template.response import TemplateResponse
from django.test import RequestFactory, S... | unknown | codeparrot/codeparrot-clean | ||
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.steam.toolkit import SteamToolkit
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handlin... | python | github | https://github.com/langchain-ai/langchain | libs/langchain/langchain_classic/agents/agent_toolkits/steam/toolkit.py |
# 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 sys
from metrics import Metric
from telemetry.value import histogram
from telemetry.value import histogram_util
from telemetry.value import scalar
_... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################
#
# Swing Entwicklung betrieblicher Informationssysteme GmbH
# (<http://www.swing-system.com>)
# Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
# all rights reserved
# 05-MAR-2011 (GK) created
#
# WARNING: This program as such is intende... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# Tool to index protocols that appears in the given capture files
#
# The script list_protos_in_cap.sh does the same thing.
#
# Copyright 2009, Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>
#
# $Id$
#
# Wireshark - Network traffic analyzer
# By Gerald Combs <gerald@wireshark.org>
# C... | unknown | codeparrot/codeparrot-clean | ||
import pytest
from bit.base58 import b58decode, b58decode_check, b58encode, b58encode_check
from bit.format import MAIN_PUBKEY_HASH
from .samples import BINARY_ADDRESS, BITCOIN_ADDRESS, PUBKEY_HASH
def test_b58encode():
assert b58encode(BINARY_ADDRESS) == BITCOIN_ADDRESS
assert b58encode(BINARY_ADDRESS[:1]) =... | unknown | codeparrot/codeparrot-clean | ||
# ------------------------------------------------------------------------------
# Name: test_pointbrowser.py
# Purpose: Test the PointBrowser class
#
# Author: Aleksander Vines, Anton Korosov
#
# Created: 2015-10-22
# Copyright: (c) NERSC
# Licence: This file is part of NANSAT. You can ... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2026 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.
package sql
import (
"context"
"testing"
"github.com/cockroachdb/cockroach/pkg/security/username"
"github.com/cockroachdb/cockroach/pkg/sql/catalog"
"github.com/c... | go | github | https://github.com/cockroachdb/cockroach | pkg/sql/distsql_check_test.go |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2012, Jayson Vantuyl <jayson@aggressive.ly>
#
# 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
#... | unknown | codeparrot/codeparrot-clean | ||
//// [tests/cases/compiler/augmentExportEquals3.ts] ////
//// [file1.ts]
function foo() {}
namespace foo {
export var v = 1;
}
export = foo;
//// [file2.ts]
import x = require("./file1");
x.b = 1;
// OK - './file1' is a namespace
declare module "./file1" {
interface A { a }
let b: number;
}
//// [file3.... | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/augmentExportEquals3.js |
# 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 | ||
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
############################################################################
#
# Copyright (C) 2008-2015
# Christian Kohlöffel
# Vinzenz Schulz
# Jean-Paul Schouwstra
#
# This file is part of DXF2GCODE.
#
# DXF2GCODE is free software: you can redistribute it and/or modify
# it ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# 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.
#
# Written (C) 2012-2013 Heiko Strathmann
#
from ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | unknown | codeparrot/codeparrot-clean | ||
::::{admonition} Settings supported in Serverless
{{serverless-full}} projects [restrict the available Elasticsearch settings](docs-content://deploy-manage/deploy/elastic-cloud/differences-from-other-elasticsearch-offerings.md#elasticsearch-differences-serverless-settings-availability) to a supported subset, identified... | unknown | github | https://github.com/elastic/elasticsearch | docs/reference/elasticsearch/index-settings/_snippets/serverless-availability.md |
# -*- encoding: 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 G... | unknown | codeparrot/codeparrot-clean | ||
#
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from units.compat.mock import patch
from ansible.modules.network.onyx impor... | unknown | codeparrot/codeparrot-clean | ||
#! -*- coding: utf-8 -*-
import sys
import unittest
from JapaneseTokenizer.mecab_wrapper import MecabWrapper
from JapaneseTokenizer.datamodels import TokenizedSenetence, FilteredObject, TokenizedResult
import os
__author__ = 'kensuke-mi'
class TestFilter(unittest.TestCase):
def setUp(self):
'''紗倉 まな(さくらまな、... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'ActivityLog'
db.create_table('panda_activitylog', (
('id', self.gf('django.db.mod... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright (c) 2014 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.
"""Run the webpages_playback automation script."""
import os
import subprocess
import sys
sys.path.insert(0, os.getcwd())
from c... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import annotations
def hello(name):
return 'Hello %s' % name | python | github | https://github.com/ansible/ansible | test/integration/targets/ansible-test-docker/ansible_collections/ns/col/plugins/module_utils/my_util.py |
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/i3c/silvaco,i3c-master.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Silvaco I3C master
maintainers:
- Conor Culhane <conor.culhane@silvaco.com>
properties:
compatible:
oneOf:
... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml |
#!/usr/bin/python
# (c) 2012, Mark Theunissen <mark.theunissen@gmail.com>
# Sponsored by Four Kitchens http://fourkitchens.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... | unknown | codeparrot/codeparrot-clean | ||
import os.path
import jsonpickle
import getopt
import sys
from model.Contact import Contact
from test.different_methods import random_string, random_email, random_phone
try:
opts, args = getopt.getopt(sys.argv[1:], 'n:f:', ['number of contacts', 'file'])
except getopt.GetoptError as err:
getopt.usage(0)
sy... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import print_function
import os
import json
import datetime
import argparse
from setproctitle import setproctitle
import torch
import torch.nn.functional as F
from torch.autograd import Variable
import gym
from gym.wrappers import Monitor
from model import ActorCriticLSTM
from envs import create_e... | 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 (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python -u
import socket
import time
import os
import sys
from subprocess import call
import random
FILENAME_BREAK = "/tmp/break.tmp"
FILENAME_OVERLOAD = "/tmp/load.tmp"
IP_ADDRESS = socket.gethostbyname(socket.gethostname())
MEMORY_LIMIT = "50"
FIXED_STRING = "event FIXED " +... | unknown | codeparrot/codeparrot-clean | ||
{
"format_version": "1.0",
"valid": false,
"error_count": 1,
"warning_count": 0,
"diagnostics": [
{
"severity": "error",
"summary": "Duplicate module call",
"detail": "A module call named \"multi_module\" was already defined at testdata/validate-invalid/multiple_modules/main.tf:1,1-22. M... | json | github | https://github.com/hashicorp/terraform | internal/command/testdata/validate-invalid/multiple_modules/output.json |
#!/usr/bin/env python
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Module which provides compatibility with older Python versions."""
import collections
import functools
import sys
__all__ = ["P... | unknown | codeparrot/codeparrot-clean | ||
"""
call_metrics v0.01
a class function decorator which collects metrics (number of calls and total execution time)
Copyright 2012 Brian Monkaba
This file is part of ga-bitbot.
ga-bitbot is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# __COPYRIGHT__
#
# 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, publish,
... | unknown | codeparrot/codeparrot-clean | ||
#ifndef BOOST_ATOMIC_HPP
#define BOOST_ATOMIC_HPP
// Copyright (c) 2011 Helge Bahmann
// Copyright (c) 2020 Andrey Semashev
//
// 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)
// This header includes all Boo... | unknown | github | https://github.com/mysql/mysql-server | extra/boost/boost_1_87_0/boost/atomic.hpp |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | unknown | codeparrot/codeparrot-clean | ||
from . import utils
content_types = utils.invert_dict({"text/html": ["htm", "html"],
"application/json": ["json"],
"application/xhtml+xml": ["xht", "xhtm", "xhtml"],
"application/xml": ["xml"],
... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) 2008 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/src/com/google/common/base/Stopwatch.java |
# -*- coding: utf-8 -*-
###############################################################################
#
# GetArtistTracks
# Retrieves a list of tracks by a given artist scrobbled by this user, including scrobble time.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache Lic... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.