code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
import numpy
from chainer.backends import cuda
from chainer import function_node
import chainer.functions
from chainer import utils
from chainer.utils import type_check
class Softplus(function_node.FunctionNode):
"""Softplus function."""
def __init__(self, beta=1.0):
self.beta = float(beta)
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | unknown | codeparrot/codeparrot-clean | ||
import { test } from '../../test';
import { create_deferred } from '../../../helpers.js';
/** @type {ReturnType<typeof create_deferred>} */
let deferred;
export default test({
before_test() {
deferred = create_deferred();
},
get props() {
return { thePromise: deferred.promise };
},
html: `
<br>
<br>
... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/runtime-legacy/samples/await-then-no-expression/_config.js |
# GitHub Action for Validating Documentation Links
This action ensures that internal links in `.mdx` files in the `/docs/` directory are valid. It runs on every pull request that includes changes to these files.
The action is triggered by the workflow defined in `.github/workflows/validate-docs-links.yml`.
## Usage
... | unknown | github | https://github.com/vercel/next.js | .github/actions/validate-docs-links/README.MD |
{
"problemMatcher": [
{
"owner": "core-validate-commit",
"pattern": [
{
"regexp": "^not ok \\d+ (.*)$",
"message": 1
}
]
}
]
} | json | github | https://github.com/nodejs/node | .github/workflows/commit-lint-problem-matcher.json |
<html>
<!--
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")... | html | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/package.html |
import operator_benchmark as op_bench
import torch
from torch._ops import ops
qarithmetic_binary_configs = op_bench.cross_product_configs(
N=(2, 8, 64, 512),
dtype=(torch.quint8, torch.qint8, torch.qint32),
contig=(False, True),
tags=("short",),
)
qarithmetic_binary_ops = op_bench.op_list(
attrs=... | python | github | https://github.com/pytorch/pytorch | benchmarks/operator_benchmark/pt/qarithmetic_test.py |
import logging
import os
import re
from collections import defaultdict
import click
import pandas as pd
from tabulate import tabulate
log = logging.getLogger(__name__)
def gmean(s):
return s.product() ** (1 / len(s))
def find_csv_files(path, perf_compare):
"""
Recursively search for all CSV files in dir... | python | github | https://github.com/pytorch/pytorch | benchmarks/dynamo/summarize_perf.py |
# -*- coding: utf-8 -*-
##############################################################################
# Copyright (C) 2012 SICLIC http://siclic.fr
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Fr... | unknown | codeparrot/codeparrot-clean | ||
import { test } from '../../assert';
const tick = () => Promise.resolve();
export default test({
async test({ assert, target, componentCtor }) {
target.innerHTML = '<custom-element red white></custom-element>';
const ce = target.querySelector('custom-element');
ce.prop = 1;
customElements.define('custom-elem... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/runtime-browser/custom-elements-samples/set-property-before-mounted/_config.js |
/* 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/PE/signature/ContentInfo.hpp |
#!/usr/bin/env python
"""
roms.interp
Methods to interpolate ROMS fields onto other grids
Written by Brian Powell on 11/02/13
Copyright (c)2017 University of Hawaii under the BSD-License.
"""
import numpy as np
import netCDF4
import os
import seapy
from seapy.timeout import timeout, TimeoutError
from joblib ... | unknown | codeparrot/codeparrot-clean | ||
# --------------------------------------------------------------------------- #
# RIBBONBAR Library wxPython IMPLEMENTATION
#
# Original C++ Code From Peter Cawley.
#
# Current wxRibbon Version Tracked: wxWidgets 2.9.0 SVN HEAD
#
#
# Python Code By:
#
# Andrea Gavana, @ 15 Oct 2009
# Latest Revision: 17 Aug 2011, 15.00... | unknown | codeparrot/codeparrot-clean | ||
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# T... | unknown | codeparrot/codeparrot-clean | ||
# This is equivalent to the core suite, but runs with CBR with sampling CE enabled.
test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/core_standalone/**/*.js
exclude_files:
# Transactions are not supported on MongoDB standalone nodes, so we do not run these tests in the
# 'core' ... | unknown | github | https://github.com/mongodb/mongo | buildscripts/resmokeconfig/suites/query_cbr_sampling_jscore_passthrough.yml |
# -*- 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 | ||
# Copyright (c) 2018 PaddlePaddle 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 app... | unknown | codeparrot/codeparrot-clean | ||
// This file was automatically generated from coroutines-basics.md by Knit tool. Do not edit.
package kotlinx.coroutines.guide.exampleBasic01
import kotlinx.coroutines.*
fun main() = runBlocking { // this: CoroutineScope
launch { // launch a new coroutine and continue
delay(1000L) // non-blocking delay fo... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | kotlinx-coroutines-core/jvm/test/guide/example-basic-01.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 | build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/SpringBootPluginTests.java |
#pragma once
// Please note that this file is
// used across both CPU and GPU.
#include <type_traits>
#include <complex>
#include <c10/macros/Macros.h>
#include <ATen/detail/FunctionTraits.h>
#include <ATen/NumericUtils.h>
#include <ATen/OpMathType.h>
#if defined(__CUDACC__)
#include <ATen/cuda/DeviceUtils.cuh>
#inclu... | c | github | https://github.com/pytorch/pytorch | aten/src/ATen/native/SharedReduceOps.h |
"""Test functions for 1D array set operations.
"""
from __future__ import division, absolute_import, print_function
import numpy as np
from numpy.testing import (
run_module_suite, TestCase, assert_array_equal, assert_equal
)
from numpy.lib.arraysetops import (
ediff1d, intersect1d, setxor1d, union1d, set... | unknown | codeparrot/codeparrot-clean | ||
#
# iso2022_jp_1.py: Python Unicode Codec for ISO2022_JP_1
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_iso2022, codecs
import _multibytecodec as mbc
codec = _codecs_iso2022.getcodec('iso2022_jp_1')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class Incrementa... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) Francois Malan & Christian Kehl, TU Delft.
# All rights reserved.
# See COPYRIGHT for details.
import config
from install_package import InstallPackage
import os
import shutil
import sys
import utils
from subprocess import call
BASENAME = "particle-system-mm"
#The SciUtah SVN repo contains the standa... | unknown | codeparrot/codeparrot-clean | ||
# pylint: disable=no-member
from easydict import EasyDict
from lib.items_selector import ItemsSelector
from lib.esbase_action import ESBaseAction
import logging
import sys
import elasticsearch
import json
logger = logging.getLogger(__name__)
class SearchRunner(ESBaseAction):
def __init__(self, config=None):
... | unknown | codeparrot/codeparrot-clean | ||
class GenericRcvdHandler(object):
'''Provides the generic message handling that does not conflict with
any Insteon devices. Devices with distinct messages and needs should
create their own message handler class that inherits and overrides the
necessary elements'''
def __init__(self, device):
... | unknown | codeparrot/codeparrot-clean | ||
namespace: ns
name: col
version: 1.0.0
readme: README.rst
license_file: GPL
authors:
- Ansible
manifest:
directives:
- exclude foo.txt
- recursive-exclude docs/foobar ** | unknown | github | https://github.com/ansible/ansible | test/integration/targets/ansible-galaxy-collection-cli/files/galaxy.yml |
# 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 | ||
from .._exceptions import OpenAIError
INSTRUCTIONS = """
OpenAI error:
missing `{library}`
This feature requires additional dependencies:
$ pip install openai[{extra}]
"""
def format_instructions(*, library: str, extra: str) -> str:
return INSTRUCTIONS.format(library=library, extra=extra)
class Miss... | python | github | https://github.com/openai/openai-python | src/openai/_extras/_common.py |
# 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 applicab... | unknown | codeparrot/codeparrot-clean | ||
// This file was automatically generated from flow.md by Knit tool. Do not edit.
package kotlinx.coroutines.guide.exampleFlow15
import kotlinx.coroutines.*
import kotlinx.coroutines.flow.*
fun log(msg: String) = println("[${Thread.currentThread().name}] $msg")
fun simple(): Flow<Int> = flow {
for (i in 1..3) {
... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | kotlinx-coroutines-core/jvm/test/guide/example-flow-15.kt |
// 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/StopReplicaRequest.json |
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
package v0alpha1
import (
"github.com/grafana/grafana-app-sdk/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
// +k8s:openapi-gen=true
type GetSearchTeamsResponse struct {
metav1.TypeMeta `json:",inline"`
GetSearc... | go | github | https://github.com/grafana/grafana | apps/iam/pkg/apis/iam/v0alpha1/getsearchteams_response_object_types_gen.go |
{
"application/javascript": "UTF-8",
"application/json": "UTF-8",
"application/manifest+json": "UTF-8",
"application/vnd.syncml+xml": "UTF-8",
"application/vnd.syncml.dm+wbxml": "UTF-8",
"application/vnd.syncml.dm+xml": "UTF-8",
"application/vnd.syncml.dmddf+xml": "UTF-8",
"application/vnd.wap.wbxml": "... | json | github | https://github.com/jekyll/jekyll | lib/jekyll/commands/serve/mime_types_charset.json |
from bokeh.sampledata.glucose import data
from bokeh.sampledata.iris import flowers
from bokeh.io import show, output_file
from bokeh.layouts import layout
from bokeh.models import ColumnDataSource, Paragraph, HoverTool, Div
from bokeh.plotting import figure
output_file("words_and_plots.html")
def text():
return... | unknown | codeparrot/codeparrot-clean | ||
# Django settings for epl project.
import os
PROJECT_ROOT = os.path.split(os.path.realpath(os.path.dirname(__file__)))[0]
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ROOT_PATH = os.path.dirname(__file__)
SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANA... | 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... | python | github | https://github.com/apache/airflow | airflow-core/tests/unit/timetables/test_once_timetable.py |
from a10sdk.common.A10BaseClass import A10BaseClass
class DebugMonitor(A10BaseClass):
""" :param action: {"optional": true, "enum": ["create", "import", "export", "copy", "rename", "check", "replace", "delete"], "type": "string", "description": "'create': create; 'import': import; 'export': export; 'copy': cop... | 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 | ||
from redis import Redis
from rq_scheduler import Scheduler
from datetime import datetime
import app.controller
import os,argparse
from utils.common import PageType
#documentation at
#https://github.com/ui/rq-scheduler
def main():
parser = argparse.ArgumentParser()
parser.add_argument("sub",
... | unknown | codeparrot/codeparrot-clean | ||
ADS_ATTR_CLEAR = ( 1 )
ADS_ATTR_UPDATE = ( 2 )
ADS_ATTR_APPEND = ( 3 )
ADS_ATTR_DELETE = ( 4 )
ADS_EXT_MINEXTDISPID = ( 1 )
ADS_EXT_MAXEXTDISPID = ( 16777215 )
ADS_EXT_INITCREDENTIALS = ( 1 )
ADS_EXT_INITIALIZE_COMPLETE = ( 2 )
ADS_SEARCHPREF_ASYNCHRONOUS = 0
ADS_SEARCHPREF_DEREF_ALIASES = 1
ADS_SEARCHPREF_SIZE... | unknown | codeparrot/codeparrot-clean | ||
"""
Component for controlling Pandora stations through the pianobar client.
For more details about this platform, please refer to the documentation
https://home-assistant.io/components/media_player.pandora/
"""
import logging
import re
import os
import signal
from datetime import timedelta
import shutil
from homeass... | unknown | codeparrot/codeparrot-clean | ||
import os
import time
import json
import struct
import hashlib
from flask import Flask
app = Flask(__name__)
from vtdb import keyrange
from vtdb import keyrange_constants
from vtdb import vtgatev2
from vtdb import vtgate_cursor
from zk import zkocc
# conn is the connection to vtgate.
conn = None
# When using the "u... | unknown | codeparrot/codeparrot-clean | ||
name: Sync to Maven Central
description: 'Syncs a release to Maven Central and waits for it to be available for use'
inputs:
central-token-password:
description: 'Password for authentication with central.sonatype.com'
required: true
central-token-username:
description: 'Username for authentication with ... | unknown | github | https://github.com/spring-projects/spring-framework | .github/actions/sync-to-maven-central/action.yml |
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file ex... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Fixer for callable().
This converts callable(obj) into isinstance(obj, collections.Callable), adding a
collections import if needed."""
# Local imports
from lib2to3 import fixer_base
from lib2to3.fixer_util import ... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-consumer.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Common leds consumer
maintainers:
- Aleksandrs Vinarskis <alex@vinarskis.com>
description:
Some LED defined in DT are r... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/leds/leds-consumer.yaml |
import base64
import json
import os
import posixpath
import re
from time import time
from wsgiref.handlers import format_date_time
from constants import base
from utils import log_configure, log_exception, mypool
from services.utils import settings, user_media_path, user_media_url
# Configure the log.
log_configure(... | 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
* distribute... | java | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/KerberosAuthenticator.java |
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package tfdiags
import (
"testing"
"github.com/hashicorp/hcl/v2"
)
// These tests are to ensure that the normalisation of the diagnostics' concrete
// types doesn't impact how the diagnostics are compared.
//
// Full tests of the comparison logi... | go | github | https://github.com/hashicorp/terraform | internal/tfdiags/testing_test.go |
# *****************************************************************************
# Copyright (c) 2012, 2013, 2014 Lectorius, Inc.
# Authors:
# Vijay Pandurangan (vijayp@mitro.co)
# Evan Jones (ej@mitro.co)
# Adam Hilss (ahilss@mitro.co)
#
#
# This program is free software: you can redistribute it and/or modify
# ... | 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... | python | github | https://github.com/tensorflow/tensorflow | tensorflow/compiler/tests/proximal_gradient_descent_test.py |
# ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * Copyright (c) 2020 Carlo Pavan <carlopav@gmail.com> *
# * Co... | unknown | codeparrot/codeparrot-clean | ||
import scrapy
from naver_crawler.items import Review
import re
import math
from urlparse import urlparse, parse_qs
class BlogSpider(scrapy.Spider):
name = "naver-blog"
# allowed_domains = ["cafeblog.search.naver.com", "blog.naver.com"]
# start_urls = [getPageURL(1)]
def __init__(self, results, search)... | unknown | codeparrot/codeparrot-clean | ||
//
// Copyright 2017 The Abseil 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 by applicable law or ... | c | github | https://github.com/mysql/mysql-server | extra/abseil/abseil-cpp-20230802.1/absl/numeric/int128.h |
import pilas
import random
from pilas.actores import Actor
import personaje,auto
from Coche import CocheMoviendo
from pistola import Arma
from movimiento import MoverseConElTeclado
from ladron import Choro
from actorBala import Bala
#-------------------El Juego ---------------------------------------------------
class... | unknown | codeparrot/codeparrot-clean | ||
//---------------------------------------------------------------------------//
// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
//
// 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
//
// See http://boostorg.gi... | unknown | github | https://github.com/mysql/mysql-server | extra/boost/boost_1_87_0/boost/compute/platform.hpp |
/*
* Copyright (C) 2012 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 | guava/src/com/google/common/io/CharSource.java |
""".. Ignore pydocstyle D400.
.. autoclass:: resolwe.flow.executors.local.run.FlowExecutor
"""
import asyncio
import contextlib
import logging
import os
import shlex
from asyncio import subprocess
from ..run import BaseFlowExecutor
logger = logging.getLogger(__name__)
class FlowExecutor(BaseFlowExecutor):
"""L... | unknown | codeparrot/codeparrot-clean | ||
#include <ATen/cuda/CUDAGreenContext.h>
#if defined(CUDA_VERSION) && CUDA_VERSION >= 12080 && !defined(USE_ROCM) && defined(PYTORCH_C10_DRIVER_API_SUPPORTED)
#include <c10/cuda/driver_api.h>
#include <stdexcept>
#include <vector>
#define HAS_CUDA_GREEN_CONTEXT() 1
#else
#define HAS_CUDA_GREEN_CONTEXT() 0
// Suppress u... | cpp | github | https://github.com/pytorch/pytorch | aten/src/ATen/cuda/CUDAGreenContext.cpp |
import os
import sqlite3
from conans.errors import ConanException
REMOTES_USER_TABLE = "users_remotes"
class LocalDB(object):
def __init__(self, dbfile):
if not os.path.exists(dbfile):
par = os.path.dirname(dbfile)
if not os.path.exists(par):
os.makedirs(par)
... | unknown | codeparrot/codeparrot-clean | ||
use std::fmt;
use rustc_span::LocalExpnId;
rustc_index::newtype_index! {
/// Identifies an AST node.
///
/// This identifies top-level definitions, expressions, and everything in between.
/// This is later turned into [`DefId`] and `HirId` for the HIR.
///
/// [`DefId`]: rustc_span::def_id::De... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_ast/src/node_id.rs |
# -*- coding: utf-8 -*-
'''
Specto Add-on
Copyright (C) 2015 lambda
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 l... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2011 Grid Dynamics
# Copyright 2011 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... | 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 | ||
#!/usr/bin/env python
# vim: sts=4 sw=4 et
# This is a component of EMC
# probe.py Copyright 2010 Michael Haberler
#
#
# 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 versi... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python2
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import logging
... | unknown | codeparrot/codeparrot-clean | ||
#Copyright ReportLab Europe Ltd. 2000-2008
#see license.txt for license details
__doc__=''
__version__=''' $Id: gfe.py 3269 2008-09-03 17:22:41Z rgbecker $ '''
#REPORTLAB_TEST_SCRIPT
import sys
from reportlab.platypus import *
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.rl_config import default... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2010-2024 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.test.cases.generated.cases.components.visibilityChecker;
import... | java | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/visibilityChecker/FirIdeNormalAnalysisScriptSourceModuleVisibilityCheckerTestGenerated.java |
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from sitetree.admin import TreeItemAdmin, override_item_admin
from .models import File, IconMapping
from .forms import FileForm
@admin.register(File)
class FileAdmin(admin.ModelAdmin):
list_display = ('original_path', 'snapsh... | unknown | codeparrot/codeparrot-clean | ||
@props(['queries'])
<div
{{ $attributes->merge(['class' => "flex flex-col gap-2.5 bg-neutral-50 dark:bg-white/1 border border-neutral-200 dark:border-neutral-800 rounded-xl p-2.5 shadow-xs"]) }}
x-data="{
totalQueries: {{ min(count($queries), 100) }},
currentPage: 1,
perPage: 10,
... | php | github | https://github.com/laravel/framework | src/Illuminate/Foundation/resources/exceptions/renderer/components/query.blade.php |
# -*- 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 | ||
##############################################################################
#
# Copyright (c) 2006 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
"""
setup.py for installing F2PY
Usage:
python setup.py install
Copyright 2001-2005 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@cens.ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.
NO WARRANTY IS EXPRESSED OR IMPLIE... | unknown | codeparrot/codeparrot-clean | ||
/*
* 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-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskExecutorConfigurations.java |
#!/usr/bin/env python
# Copyright (c) 2013 Shane Quigley, < shane at softwareontheside.info >
# 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 limitati... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright 2016 Alexander Melnyk / Олександр Мельник
#
# This file is part of Arch_Lab package.
#
# Arch_Lab is free software: you can redistribute it and/or modify it under
# the terms of th... | unknown | codeparrot/codeparrot-clean | ||
import DFA # 'his' DFAs
def minimal_state_count(dfa):
"""Return the minimum number of states an equivalent dfa can
have. Don't count the error state if one must be added to satisfy
the DFA module's definition of a dfa."""
dfa_with_error = maybe_add_error_state(dfa)
error_diff =... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
%YAML 1.2
---
$id: http://devicetree.org/schemas/crypto/atmel,at91sam9g46-tdes.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Atmel Triple Data Encryption Standard (TDES) ... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-tdes.yaml |
"""Copyright 20102 Phidgets Inc.
This work is licensed under the Creative Commons Attribution 2.5 Canada License.
To view a copy of this license, visit http://creativecommons.org/licenses/by/2.5/ca/
"""
__author__ = 'Adam Stelmack'
__version__ = '2.1.8'
__date__ = 'May 10 2010'
import threading
from ctypes import *
f... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Expands the filter area when the face detector fails.
import rospy
import os
from std_msgs.msg import Bool
from sensor_msgs.msg import Image, CameraInfo
from geometry_msgs.msg import PointStamped
from image_geometry import PinholeCameraModel
import numpy
import cv2
from cv_bridge import CvBri... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import annotations
import platform
import sys
from importlib.metadata import version
from warnings import warn
import lxml.etree
from scrapy.exceptions import ScrapyDeprecationWarning
from scrapy.settings.default_settings import LOG_VERSIONS
from scrapy.utils.ssl import get_openssl_version
_DEFAULT_... | python | github | https://github.com/scrapy/scrapy | scrapy/utils/versions.py |
import copy
import operator
from collections import OrderedDict
from functools import partial, reduce, update_wrapper
from django import forms
from django.conf import settings
from django.contrib import messages
from django.contrib.admin import helpers, widgets
from django.contrib.admin.checks import (
BaseModelAd... | unknown | codeparrot/codeparrot-clean | ||
/*
* This file was automatically generated.
* DO NOT MODIFY BY HAND.
* Run `yarn fix:special` to update
*/
declare const check: (options: import("../../../declarations/plugins/sharing/ConsumeSharedPlugin").ConsumeSharedPluginOptions) => boolean;
export = check; | typescript | github | https://github.com/webpack/webpack | schemas/plugins/sharing/ConsumeSharedPlugin.check.d.ts |
import random
from fifth.languages import LANGUAGES
from fifth.processor import CharacterProcessor
class AbstractBackground(object):
def name(self):
return self.NAME if hasattr(self, 'NAME') else self.__class__.__name__
def personality_trait(self):
return random.choice(self.PERSONALITY_TRAIT... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
#
# 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 | ||
import os
from .base import * # noqa
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(SITE_ROOT, 'dev.db'),
}
}
BROKER_URL = 'redis://localhost:6379/0'
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
CELERY_ALWAYS_EAGER = False
HAYSTACK_CONNECTIONS ... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.client.engine
import io.ktor.http.*
import io.ktor.util.network.*
/**
* Proxy configuration.
*
* See [ProxyBuilder] to create proxy.
*
* [Report a problem](https://ktor.... | kotlin | github | https://github.com/ktorio/ktor | ktor-client/ktor-client-core/web/src/io/ktor/client/engine/ProxyConfig.web.kt |
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2alpha1",
"metadata": {
"name": "v17.minspan_to_maxperrow.v42"
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "grafana",
"uid": "-- Grafana... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/migrated_dashboards_output/v1beta1-mig-v17.minspan_to_maxperrow.v42.v2alpha1.json |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | unknown | github | https://github.com/huggingface/transformers | docs/source/ja/model_doc/bert-generation.md |
# -*- coding: utf-8 -*-
# Copyright 2005 Joe Wreschnig, Michael Urman
# 2012 Christoph Reiter
# 2016-17 Nick Boultbee
#
# 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 ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright (c) 2014 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Make sure overwriting read-only files works as expected (via win-tool).
"""
import TestGyp
import filecmp
import os
import stat
import... | unknown | codeparrot/codeparrot-clean | ||
{% include top.html %}
<body class="wrap">
<header>
<div class="grid">
<div class="unit whole align-center">
<h1>
<a href="/">
<span class="sr-only">Jekyll</span>
<img src="/img/logo-2x.png" width="249" height="115" alt="Jekyll Logo">
</a>
</h1>
... | html | github | https://github.com/jekyll/jekyll | docs/_layouts/error.html |
#
# Copyright 2013 eNovance <licensing@enovance.com>
#
# 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 ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
import numpy as np
def gen_data(num_classes,num_samples,dim):
np.random.seed(0)
covs = np.array([[[0., -1. ], [2.5, .7]],
[[3., -1.5], [1.2, .3]],
[[ 2, 0 ], [ .0, 1.5 ]]])
X = np.r_[np.dot(np.random.randn(num_samples, dim), covs[0]) + np.array([0, 10]),
np.dot(np.random.randn... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
# Copyright 2020 The Google Research 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 applicab... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
'''More Goodness of fit tests
contains
GOF : 1 sample gof tests based on Stephens 1970, plus AD A^2
bootstrap : vectorized bootstrap p-values for gof test with fitted parameters
Created : 2011-05-21
Author : Josef Perktold
parts based on ks_2samp and kstest from scipy.stats
(license: Scipy BSD, but were completely ... | unknown | codeparrot/codeparrot-clean | ||
"""
Convenience routines for creating non-trivial Field subclasses, as well as
backwards compatibility utilities.
Add SubfieldBase as the metaclass for your Field subclass, implement
to_python() and the other necessary methods and everything will work
seamlessly.
"""
import warnings
from django.utils.deprecation imp... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
from pymongo import MongoClient
import pymongo
HOST = "172.31.28.140:27017"
c = MongoClient('mongodb://'+HOST)
dbname = "google"
task = "task_events"
ginfo = "general_info"
statscpumemory = "stats_cpumemory"
maxmincpumemory = "maxmin_cpumemory"
mediancpu = "median_cpu"
medianmemory = "median_... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.