code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014 CERN.
#
# Invenio 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... | unknown | codeparrot/codeparrot-clean | ||
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {CompilerError} from '../CompilerError';
import {printReactiveScopeSummary} from '../ReactiveScopes/PrintReactiveFunction... | typescript | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts |
from __future__ import absolute_import
import errno
import socket
from billiard.exceptions import RestartFreqExceeded
from celery.datastructures import LimitedSet
from celery.worker import state as worker_state
from celery.worker.consumer import (
Consumer,
Heart,
Tasks,
Agent,
Mingle,
Gossip... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2016-present Valentin Kazakov
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0
import pytest
from unittest import mock
from asynccmd import Cmd
@pytest.mark.parametrize(("platform", "expected"), [
("linux", "<_UnixSelecto... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN.
#
# Invenio 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,... | unknown | codeparrot/codeparrot-clean | ||
otlp:
promote_all_resource_attributes: true
ignore_resource_attributes: ["k8s.cluster.name", " k8s.job.name ", "k8s.namespace.name"] | unknown | github | https://github.com/prometheus/prometheus | config/testdata/otlp_sanitize_ignore_resource_attributes.good.yml |
{
"name": "custom-link",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "custom-link",
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.15.0"
},
"devDependencies": {
"@rollup/plugin-replace": "^... | json | github | https://github.com/remix-run/react-router | examples/custom-link/package-lock.json |
# Copyright (c) 2012 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.
"""Generic utils."""
import codecs
import cStringIO
import datetime
import logging
import os
import pipes
import platform
import Queue
import re
import ... | unknown | codeparrot/codeparrot-clean | ||
from datetime import datetime
from math import ceil
from operator import attrgetter
from django.core.exceptions import FieldDoesNotExist
from django.db import (
IntegrityError,
NotSupportedError,
OperationalError,
ProgrammingError,
connection,
)
from django.db.models import FileField, Value
from dj... | python | github | https://github.com/django/django | tests/bulk_create/tests.py |
#!/usr/bin/python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/sitronix,st7567.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Sitronix ST7567 Display Controller
maintainers:
- Javier Martinez Canillas <javierm@redhat.com>
description:
Sitro... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/display/sitronix,st7567.yaml |
// RUN: mkdir -p %t.dir/move-multiple-classes
// RUN: cp %S/Inputs/multiple_class_test* %t.dir/move-multiple-classes/
// RUN: cd %t.dir/move-multiple-classes
// RUN: clang-move -names="c::EnclosingMove5::Nested" -new_cc=%t.dir/move-multiple-classes/new_multiple_class_test.cpp -new_header=%t.dir/move-multiple-classes/n... | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/test/clang-move/move-multiple-classes.cpp |
package events
import (
"sync"
"time"
eventtypes "github.com/moby/moby/api/types/events"
"github.com/moby/moby/v2/daemon/internal/metrics"
"github.com/moby/pubsub"
)
const (
eventsLimit = 256
bufferSize = 1024
)
// Events is pubsub channel for events generated by the engine.
type Events struct {
mu syn... | go | github | https://github.com/moby/moby | daemon/events/events.go |
"""
The :mod:`sklearn.model_selection._search` includes utilities to fine-tune the
parameters of an estimator.
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>,
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# Andreas Mueller <amueller@ais.uni-bonn.de>
# Olivier Grisel <olivier.... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2018, Ansible by Red Hat, 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 | ||
# Copyright 2010 Google Inc.
#
# 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, dis-
# trib... | unknown | codeparrot/codeparrot-clean | ||
# 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 | ||
# frozen_string_literal: true
require "abstract_unit"
require "timeout"
require "concurrent/atomic/count_down_latch"
require "zeitwerk"
Thread.abort_on_exception = true
module ActionController
class SSETest < ActionController::TestCase
class SSETestController < ActionController::Base
include ActionContro... | ruby | github | https://github.com/rails/rails | actionpack/test/controller/live_stream_test.rb |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, René Moser <mail@renemoser.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 Lice... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""Tests for Beautiful Soup's tree traversal methods.
The tree traversal methods are the main advantage of using Beautiful
Soup over just using a parser.
Different parsers will build different Beautiful Soup trees given the
same markup, but all Beautiful Soup trees can be traversed with the
me... | 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 | ||
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2010-2025 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.analysis.api.fir.symbols
import com.intellij.psi.PsiElement
import org.jetbrains... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/symbols/KaFirLocalVariableSymbol.kt |
/*
* Copyright 2012-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | java | github | https://github.com/spring-projects/spring-boot | core/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/core/ImageReference.java |
// Copyright 2017 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.
package jobs_test
import (
"context"
gosql "database/sql"
"fmt"
"path/filepath"
"reflect"
"runtime/pprof"
"strings"
"sync/atomic"
"testing"
"time"
apd "gith... | go | github | https://github.com/cockroachdb/cockroach | pkg/jobs/jobs_test.go |
test_kind: js_test
selector:
roots:
- jstestfuzz/out/*.js
executor:
archive:
hooks:
- CheckReplDBHash
- CheckMetadataConsistencyInBackground
- ValidateCollections
config:
shell_options:
crashOnInvalidBSONError: ""
objcheck: ""
global_vars:
TestData:
... | unknown | github | https://github.com/mongodb/mongo | buildscripts/resmokeconfig/suites/jstestfuzz_sharded_kill_terminate_stepdown.yml |
"""Application Fitlers Class."""
from fmcapi.api_objects.apiclasstemplate import APIClassTemplate
import logging
class ApplicationFilters(APIClassTemplate):
"""The ApplicationFilters Object in the FMC."""
VALID_JSON_DATA = [
"id",
"name",
"type",
"appConditions",
"appl... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
***************************************************************************
Grid.py
---------------------
Date : May 2010
Copyright : (C) 2010 by Michael Minn
Email : pyqgis at michaelminn dot com
********************************... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from datetime import datetime
try:
import requests
except ImportError:
from .packages import requests
DEFAULT_LOGPLEX_URL = 'https://east.logplex.io/logs'
DEFAULT_LOGPLEX_TOKEN = None
DETAULT_LOGPLEX_TIMEOUT = 2
class Logplex(object):
"""A Logplex client."""
def __init__(sel... | unknown | codeparrot/codeparrot-clean | ||
from _testcapi import test_structmembersType, \
CHAR_MAX, CHAR_MIN, UCHAR_MAX, \
SHRT_MAX, SHRT_MIN, USHRT_MAX, \
INT_MAX, INT_MIN, UINT_MAX, \
LONG_MAX, LONG_MIN, ULONG_MAX, \
LLONG_MAX, LLONG_MIN, ULLONG_MAX
import warnings, exceptions, unittest, sys
from test import test_support
ts=test_structm... | unknown | codeparrot/codeparrot-clean | ||
# Global modules
import unittest
# Local modules
from seleniumcrawler.handle import handle_url
class TestHandlers(unittest.TestCase):
def test_forbes(self):
r = handle_url('http://www.forbes.com/sites/abrambrown/2013/04/22/netflixs-profit-picture-clears-q1s-big-beat-surprises-wall-street/')
self.a... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as 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 'DamageScenario.ahn_version'
db.add_column(u'lizard_damage_... | unknown | codeparrot/codeparrot-clean | ||
"""Test the binascii C module."""
from test import support
import unittest
import binascii
import array
# Note: "*_hex" functions are aliases for "(un)hexlify"
b2a_functions = ['b2a_base64', 'b2a_hex', 'b2a_hqx', 'b2a_qp', 'b2a_uu',
'hexlify', 'rlecode_hqx']
a2b_functions = ['a2b_base64', 'a2b_hex', ... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/crypto/fsl-imx-sahara.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale SAHARA Cryptographic Accelerator
maintainers:
- Steffen Trumtrar <s.trumtrar@pengutronix.de>
properties:
c... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml |
from sympy.core import S
from sympy.integrals.quadrature import (gauss_legendre, gauss_laguerre,
gauss_hermite, gauss_gen_laguerre,
gauss_chebyshev_t, gauss_chebyshev_u,
gauss_jacobi)
def test_legend... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
## Copyright (c) 2015-2020, Exa Analytics Development Team
## Distributed under the terms of the Apache License 2.0
"""
Tests for :mod:`~exatomic.nwchem.output`
#############################################
"""
#import numpy as np
#import pandas as pd
from unittest import TestCase
from exatomic.... | unknown | codeparrot/codeparrot-clean | ||
from server import app
import datetime
import psycopg2
import flask
import pytz
import re
TIMEZONE = pytz.timezone("America/Vancouver")
CONN = "postgres:///lrrbot"
def convert_timezone(row):
return (row[0], row[1], TIMEZONE.normalize(row[2].astimezone(TIMEZONE)))
@app.route("/prism/")
def prism():
with psyc... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Team.owner'
db.delete_column(u'sentry_team', 'owner_id')
... | unknown | codeparrot/codeparrot-clean | ||
import os.path
import screed, screed.openscreed
def test_empty_open():
filename = os.path.join(os.path.dirname(__file__), 'empty.fa')
assert len(list(iter(screed.open(filename)))) == 0
def test_simple_open():
filename = os.path.join(os.path.dirname(__file__), 'test.fa')
n = -1
for n, record in ... | unknown | codeparrot/codeparrot-clean | ||
#ifndef INTERNAL_THREAD_H /*-*-C-*-vi:se ft=c:*/
#define INTERNAL_THREAD_H
/**
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
* Permission is hereby granted, to either redistribute ... | c | github | https://github.com/ruby/ruby | internal/thread.h |
// This file was automatically generated on Fri Oct 13 19:09:38 2023
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-21.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LI... | unknown | github | https://github.com/mysql/mysql-server | extra/boost/boost_1_87_0/boost/config/assert_cxx11.hpp |
/*
* 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.resolution
import org.jetbrains.kotlin.analysis.api.KaImplementatio... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/resolution/KaSymbolBasedReference.kt |
# Copyright 2014 Hewlett-Packard Development Company, L.P.
# 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... | unknown | codeparrot/codeparrot-clean | ||
"""2D RPG ENGINE by Christopher Cleary
----For overhead SNES style RPG game.
"""
import pygame, cPickle, random
from pygame.locals import *
class Background(pygame.sprite.Sprite):
"""
Background by Christopher Cleary
This module will create the background tiles and render them to the screen
based on ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import shutil
import zipfile
'''让 ZipProcessor 类作为组合成分而不是父类实现相同功能'''
class ZipProcessor:
def __init__(self, zipname, processor):
self.zipname = zipname
self.temp_directory = 'unzipped-{}'.format(zipname[:-4])
self.processor = processor... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui, QtCore
import numpy as np
import csv, gzip, os
from pyqtgraph import Point
class GlassDB:
"""
Database of dispersion coefficients for Schott glasses
+ Corning 7980
"""
def __init__(self, fileName='schott_glasses.csv'):
... | unknown | codeparrot/codeparrot-clean | ||
#!/bin/bash
##################################################################################
# Custom build tool for Realm Objective-C binding.
#
# (C) Copyright 2011-2022 by realm.io.
##################################################################################
# Warning: pipefail is not a POSIX compatible op... | unknown | github | https://github.com/realm/realm-swift | build.sh |
package kotlinx.coroutines.channels
import kotlinx.coroutines.*
import kotlin.coroutines.*
internal open class ChannelCoroutine<E>(
parentContext: CoroutineContext,
protected val _channel: Channel<E>,
initParentJob: Boolean,
active: Boolean
) : AbstractCoroutine<Unit>(parentContext, initParentJob, act... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | kotlinx-coroutines-core/common/src/channels/ChannelCoroutine.kt |
from __future__ import unicode_literals
import re
from .common import InfoExtractor
class IGNIE(InfoExtractor):
"""
Extractor for some of the IGN sites, like www.ign.com, es.ign.com de.ign.com.
Some videos of it.ign.com are also supported
"""
_VALID_URL = r'https?://.+?\.ign\.com/(?P<type>videos... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Copyright 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.
"""Creates a simple script to run a java "binary".
This creates a script that sets up the java command line for running a java
jar. ... | unknown | codeparrot/codeparrot-clean | ||
#define PY_SSIZE_T_CLEAN
#include <Python.h>
typedef struct {
PyListObject list;
int state;
} SubListObject;
static PyObject *
SubList_increment(PyObject *op, PyObject *Py_UNUSED(dummy))
{
SubListObject *self = (SubListObject *) op;
self->state++;
return PyLong_FromLong(self->state);
}
static PyM... | c | github | https://github.com/python/cpython | Doc/includes/newtypes/sublist.c |
#!/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 | ||
# -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Canal para peliculasdk
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import string
import os
import re
import sys
import urllib
f... | unknown | codeparrot/codeparrot-clean | ||
import importlib
import importlib.machinery
import decimal
import io
import sys
from tokenize import tokenize, untokenize, NUMBER, STRING, NAME, OP
def _call_with_frames_removed(f, *args, **kwargs):
return f(*args, **kwargs)
class FloatLiteral(float):
def __new__(cls, *args):
obj = super().__new__(cls... | unknown | codeparrot/codeparrot-clean | ||
"""
Classes representing uploaded files.
"""
import os
from io import BytesIO
from django.conf import settings
from django.core.files import temp as tempfile
from django.core.files.base import File
from django.core.files.utils import validate_file_name
__all__ = (
"UploadedFile",
"TemporaryUploadedFile",
... | python | github | https://github.com/django/django | django/core/files/uploadedfile.py |
#pragma once
#include <string>
#if !defined(FBCODE_CAFFE2) && !defined(C10_NO_DEPRECATED)
namespace c10 {
// NOLINTNEXTLINE(misc-unused-using-decls)
using std::stod;
// NOLINTNEXTLINE(misc-unused-using-decls)
using std::stoi;
// NOLINTNEXTLINE(misc-unused-using-decls)
using std::stoll;
// NOLINTNEXTLINE(misc-unused... | c | github | https://github.com/pytorch/pytorch | c10/util/string_utils.h |
//===--- HeapObject.h - ABI constants for heap objects ----------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | c | github | https://github.com/apple/swift | include/swift/ABI/HeapObject.h |
#!/usr/bin/env bash
# Copyright 2015 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | github | https://github.com/kubernetes/kubernetes | hack/jenkins/test-dockerized.sh |
/*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, instal... | unknown | github | https://github.com/opencv/opencv | modules/core/include/opencv2/core/base.hpp |
# -*- coding: utf-8 -*-
# © 2016 Elico Corp (https://www.elico-corp.com)
# Licence AGPL-3.0 or Later(http://www.gnu.org/licenses/agpl.html)
from openerp.osv import orm, fields, osv
import openerp.addons.decimal_precision as dp
import time
class sale_prepayment(orm.TransientModel):
_name = 'sale.prepayment'
_c... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
compat_urllib_parse_urlparse,
compat_urllib_request,
compat_urllib_parse,
)
class ExtremeTubeIE(InfoExtractor):
_VALID_URL = r'^(?:https?://)?(?:www\.)?(?P<url>extremetube\.com/.*?video/.+?(?P<vi... | unknown | codeparrot/codeparrot-clean | ||
# (C) Datadog, Inc. 2010-2016
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
# project
from tests.checks.common import AgentCheckTest, load_check
from utils.ntp import NTPUtil
class TestNtp(AgentCheckTest):
"""Basic Test for ntp integration."""
CHECK_NAME = 'ntp'
def test_ntp... | unknown | codeparrot/codeparrot-clean | ||
<?php
namespace Illuminate\Contracts\Cache;
use Closure;
use Psr\SimpleCache\CacheInterface;
interface Repository extends CacheInterface
{
/**
* Retrieve an item from the cache and delete it.
*
* @template TCacheValue
*
* @param array|string $key
* @param TCacheValue|(\Closure():... | php | github | https://github.com/laravel/framework | src/Illuminate/Contracts/Cache/Repository.php |
/*
* Copyright (c) 2017 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.errorprone.bugpatterns;
import static com.google.errorprone.BugPattern.LinkType.CUSTOM;
import static com.google.errorprone.BugPattern.SeverityLevel.WARNING;
import com.google.au... | java | github | https://github.com/mockito/mockito | mockito-extensions/mockito-errorprone/src/main/java/org/mockito/errorprone/bugpatterns/MockitoAnyClassWithPrimitiveType.java |
#!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
ANSIB... | unknown | codeparrot/codeparrot-clean | ||
"""
Support for Tellstick switches.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.tellstick/
"""
import voluptuous as vol
from homeassistant.components import tellstick
from homeassistant.components.tellstick import (ATTR_DISCOVER_DEVICES,
... | unknown | codeparrot/codeparrot-clean | ||
# (c) 2015 Toshio Kuratomi <tkuratomi@ansible.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 later ... | unknown | codeparrot/codeparrot-clean | ||
//===-- RenameTests.cpp -----------------------------------------*- C++ -*-===//
//
// 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
//
//===---------------------------... | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/clangd/unittests/RenameTests.cpp |
#!/usr/bin/env python
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | unknown | codeparrot/codeparrot-clean | ||
# dll.py module
"""DLL specifics
Configured for the Pygame 1.9.0 dependencies as built by msys_build_deps.py.
"""
# Some definitions:
# Library name (name): An internal identifier, a string, for a library.
# e.g. FONT
# Library file root (root): The library root used in linker -l options.
# e.g. SDL_... | unknown | codeparrot/codeparrot-clean | ||
"PYTEST_DONT_REWRITE"
import pytest, py
from _pytest.assertion import util
def exvalue():
return py.std.sys.exc_info()[1]
def f():
return 2
def test_not_being_rewritten():
assert "@py_builtins" not in globals()
def test_assert():
try:
assert f() == 3
except AssertionError:
e = e... | unknown | codeparrot/codeparrot-clean | ||
#ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED
#define BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED
//
// boost/detail/interlocked.hpp
//
// Copyright 2005 Peter Dimov
// Copyright 2018, 2019 Andrey Semashev
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy... | unknown | github | https://github.com/mysql/mysql-server | extra/boost/boost_1_87_0/boost/detail/interlocked.hpp |
#!/usr/bin/env python
import os, shutil
from buildhtml import Builder
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.join(THIS_DIR, "..")
SRC_DIR = os.path.join(ROOT_DIR, "src")
LIB_DIR = os.path.join(SRC_DIR, "Selenium2Library")
README_FILES = [
"README.rst",
"INSTALL.rst",
"BU... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | unknown | codeparrot/codeparrot-clean | ||
"""Generate markdown documentation."""
class MarkDownObject:
"""Abstract class for markdown-related objects."""
def dumps(self):
"""Dump representation."""
pass
def __str__(self):
"""Alias for dumps."""
return self.dumps()
class MarkDownString(MarkDownObject):
"""Gene... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
import os
import sys
import time
import json
import shutil
import subprocess
from oeqa.oetest import oeRuntimeTest
from oeqa.utils.decorators import tag
class BlenoTest(oeRuntimeTest):
cleanup = False
bleno_prefix_dir = '/home/root'
def setUp(self):
'''
Install bl... | unknown | codeparrot/codeparrot-clean | ||
# Copyright(c) 2007-2010 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# This file is part of Chavier.
#
# Chavier 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 Lice... | 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 | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
import os
from typing import Any, cast
import pytest
from openai import OpenAI, AsyncOpenAI
from tests.utils import assert_matches_type
from openai.pagination import SyncCursorPage, AsyncCursorPa... | python | github | https://github.com/openai/openai-python | tests/api_resources/fine_tuning/test_jobs.py |
# Dummy test data as input to RNN. This input is 3 timesteps long where the third timestep always matches the
# first. Without masking it should be able to learn it, with masking it should fail.
import numpy as np
from keras.utils.theano_utils import sharedX
from keras.models import Sequential
from keras.layers.core i... | unknown | codeparrot/codeparrot-clean | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package collections
import (
"reflect"
"github.com/hashicorp/terraform/internal/command/jsonformat/computed"
"github.com/hashicorp/terraform/internal/plans"
"github.com/hashicorp/terraform/internal/plans/objchange"
)
type TransformIndices fu... | go | github | https://github.com/hashicorp/terraform | internal/command/jsonformat/collections/slice.go |
libjpeg-turbo Licenses
======================
libjpeg-turbo is covered by two compatible BSD-style open source licenses:
- The IJG (Independent JPEG Group) License, which is listed in
[README.ijg](README.ijg)
This license applies to the libjpeg API library and associated programs,
including any code inherited ... | unknown | github | https://github.com/opencv/opencv | 3rdparty/libjpeg-turbo/LICENSE.md |
# -*- coding: utf-8 -*-
from __future__ import print_function
"""
IVCurve: Analysis module that analyzes current-voltage and firing
relationships from current clamp data.
This is part of Acq4
Paul B. Manis, Ph.D.
2011-2013.
Pep8 compliant (via pep8.py) 10/25/2013
Refactoring begun 3/21/2015
"""
from collections imp... | unknown | codeparrot/codeparrot-clean | ||
// 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 builtin provides documentation for Go's predeclared identifiers.
The items documented here are not actually in package builtin
but their descriptions... | go | github | https://github.com/golang/go | src/builtin/builtin.go |
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes import msgprint
from webnotes.utils import cint, flt, cstr, now
from stock.utils import get_valuation_method
import jso... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright 2017 - 2025 R. Thomas
* Copyright 2017 - 2025 Quarkslab
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless req... | unknown | github | https://github.com/nodejs/node | deps/LIEF/include/LIEF/DEX/CodeInfo.hpp |
#!/usr/bin/python
#
# Copyright: (c) Ansible Project
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2013-2014 Camptocamp (<http://www.camptocamp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero... | unknown | codeparrot/codeparrot-clean | ||
version: 1
metadata:
authors: "Maintained by the Vapor Core Team with hundreds of contributions from the Vapor Community."
external_links:
documentation: "https://docs.vapor.codes" | unknown | github | https://github.com/vapor/vapor | .spi.yml |
# -*- coding: utf-8 -*-
from openerp.osv import fields, osv
class hr_applicant(osv.Model):
_inherit = 'hr.applicant'
def _get_index_content(self, cr, uid, ids, fields, args, context=None):
res = dict.fromkeys(ids, '')
Attachment = self.pool.get('ir.attachment')
attachment_ids = Attach... | 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 t... | unknown | github | https://github.com/apache/hadoop | hadoop-cloud-storage-project/hadoop-tos/src/site/markdown/cloud-storage/index.md |
#ifndef Py_INTERNAL_MEMORYOBJECT_H
#define Py_INTERNAL_MEMORYOBJECT_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef Py_BUILD_CORE
# error "this header requires Py_BUILD_CORE define"
#endif
extern PyTypeObject _PyManagedBuffer_Type;
PyObject *
_PyMemoryView_FromBufferProc(PyObject *v, int flags,
... | c | github | https://github.com/python/cpython | Include/internal/pycore_memoryobject.h |
from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.forms import ModelForm, modelformset_factory
from django.forms.models import BaseModelFormSet
class BaseGenericInlineFormSet(BaseModelFormSet):
"""
A formset for generic ... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import, division, print_function
import pytest
import itertools
import numpy as np
import pandas as pd
from datetime import datetime, date
from blaze.compute.core import compute, compute_up
from blaze.expr import symbol, by, exp, summary, Broadcast, join, concat
from blaze.expr impo... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 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.
import logging
from telemetry import benchmark
from telemetry.core import exceptions
from telemetry.core import util
from telemetry.core.backends.chrome imp... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: latin-1 -*-
from __future__ import division
import sys, os, serial, time, glob
import numpy as np
from functools import partial
from PyQt4 import QtCore
# Imports Locais
import exporta_experimentos, trata_dados, automatico
import banco.bd_config as bd_config
def serial_ports():
'''
Retorna uma li... | unknown | codeparrot/codeparrot-clean | ||
interface A
abstract class B : A
abstract class C : B()
fun test(a: A) {}
fun usage(b: B) {
if (b is C) {
test(<expr>b</expr>)
}
} | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api/testData/components/dataFlowInfoProvider/smartCastInfo/smartCastWithExpectedType.kt |
#
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | unknown | codeparrot/codeparrot-clean | ||
#MenuTitle: Convert to Uppercase
# -*- coding: utf-8 -*-
from __future__ import division, print_function, unicode_literals
__doc__="""
Turns lowercase names into uppercase names, e.g., `a` → `A`, `ccaron` → `Ccaron`, `aeacute` → `AEacute`, etc.
"""
def uppercaseGlyphName( thisGlyph ):
originalGlyphName = thisGlyph.na... | unknown | codeparrot/codeparrot-clean | ||
"""Support for Luftdaten stations."""
import logging
from luftdaten import Luftdaten
from luftdaten.exceptions import LuftdatenError
import voluptuous as vol
from homeassistant.config_entries import SOURCE_IMPORT
from homeassistant.const import (
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
CONF_MONITORED_CONDIT... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.