code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # 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
# vim: ts=4:sw=4:expandtab # -*- coding: UTF-8 -*- # BleachBit # Copyright (C) 2008-2015 Andrew Ziem # http://bleachbit.sourceforge.net # # 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
import time import pcduino.gpio import pcduino.pwm from SmartHome import pinList # import threading doorpwmlevel = {'lock': 3, 'unlock': 5} doorpwmfreq = 50 lockstate = 'lock' # lock锁 unlock没锁 def doorSwitch(): global lockstate if lockstate == 'lock': door_open(pinList['door']) return 'on'...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.server.routing import io.ktor.client.request.* import io.ktor.http.* import io.ktor.server.request.* import io.ktor.server.response.* import io.ktor.server.routing.RoutingRoot...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-core/common/test/io/ktor/server/routing/RouteTest.kt
{ "a": {"type":"bool","value":"true"}, "b": {"type":"bool","value":"false"} }
json
github
https://github.com/python/cpython
Lib/test/test_tomllib/data/valid/boolean.json
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at you...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package pki import ( "errors" "sort" "strings" "sync/atomic" "github.com/armon/go-metrics" "github.com/hashicorp/vault/builtin/logical/pki/issuing" ) type CertificateCounter struct { certCountEnabled *atomic.Bool publi...
go
github
https://github.com/hashicorp/vault
builtin/logical/pki/metrics.go
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing_extensions import Literal, Required, TypedDict __all__ = ["ResponseFunctionToolCallParam"] class ResponseFunctionToolCallParam(TypedDict, total=False): """A tool call to run a fun...
python
github
https://github.com/openai/openai-python
src/openai/types/responses/response_function_tool_call_param.py
""" Utility function to facilitate testing. """ import os import sys import re import operator import types import warnings from nosetester import import_nose __all__ = ['assert_equal', 'assert_almost_equal','assert_approx_equal', 'assert_array_equal', 'assert_array_less', 'assert_string_equal', ...
unknown
codeparrot/codeparrot-clean
{ "title": "DllPluginOptions", "type": "object", "additionalProperties": false, "properties": { "context": { "description": "Context of requests in the manifest file (defaults to the webpack context).", "type": "string", "minLength": 1 }, "entryOnly": { "description": "If tru...
json
github
https://github.com/webpack/webpack
schemas/plugins/DllPlugin.json
"""Support for IKEA Tradfri.""" from datetime import timedelta import logging from pytradfri import Gateway, RequestError from pytradfri.api.aiocoap_api import APIFactory import voluptuous as vol from homeassistant import config_entries from homeassistant.config_entries import ConfigEntry from homeassistant.const imp...
unknown
codeparrot/codeparrot-clean
from django.db.backends.sqlite3.client import DatabaseClient class SpatiaLiteClient(DatabaseClient): executable_name = "spatialite"
python
github
https://github.com/django/django
django/contrib/gis/db/backends/spatialite/client.py
--- title: I'm a Jekyll environment exchequer --- {{ jekyll.environment }}
html
github
https://github.com/jekyll/jekyll
test/source/environment.html
# Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause import numpy as np from sklearn.utils._array_api import get_namespace def _attach_unique(y): """Attach unique values of y to y and return the result. The result is a view of y, and the metadata (unique) is not attached to y. ...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/utils/_unique.py
# flake8: noqa import asyncio import functools from graphql.core.error import format_error from graphql.core.execution import Executor from graphql.core.execution.middlewares.asyncio import AsyncioExecutionMiddleware from graphql.core.type import ( GraphQLSchema, GraphQLObjectType, GraphQLField, GraphQ...
unknown
codeparrot/codeparrot-clean
```{eval-rst} .. currentmodule:: torch ``` (named_tensors-doc)= # Named Tensors Named Tensors allow users to give explicit names to tensor dimensions. In most cases, operations that take dimension parameters will accept dimension names, avoiding the need to track dimensions by position. In addition, named tensors us...
unknown
github
https://github.com/pytorch/pytorch
docs/source/named_tensor.md
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing_extensions import Literal from ..._models import BaseModel __all__ = ["SummaryTextContent"] class SummaryTextContent(BaseModel): """A summary text from the model.""" text: str """A summary of the reasoning...
python
github
https://github.com/openai/openai-python
src/openai/types/conversations/summary_text_content.py
/*------------------------------------------------------------------------- * * ruleutils.c * Functions to convert stored expressions/querytrees back to * source text * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of Californ...
c
github
https://github.com/postgres/postgres
src/backend/utils/adt/ruleutils.c
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # and chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com> # and jail.py (c) 2013, Michael Scherer <misc@zarb.org> # (c) 2015, Dagobert Michelsen <dam@baltic-online.de> # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # Copyright (c...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2017, 2018, 2019 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for details. from...
unknown
codeparrot/codeparrot-clean
/* * * Copyright (C) 2005 Junio C Hamano */ #define USE_THE_REPOSITORY_VARIABLE #include "git-compat-util.h" #include "diff.h" #include "diffcore.h" #include "object-file.h" #include "hashmap.h" #include "mem-pool.h" #include "oid-array.h" #include "progress.h" #include "promisor-remote.h" #include "string-list.h"...
c
github
https://github.com/git/git
diffcore-rename.c
""" Palette is a tool to generate colors for various Graphs plots and legends The DIRAC Graphs package is derived from the GraphTool plotting package of the CMS/Phedex Project by ... <to be added> """ from __future__ import absolute_import from __future__ import division from __future__ import print_function ...
unknown
codeparrot/codeparrot-clean
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT //! The tauri plugin to create and manipulate windows from JS. use crate::{ plugin::{Builder, TauriPlugin}, Runtime, }; #[cfg(desktop)] mod desktop_commands { use serde:...
rust
github
https://github.com/tauri-apps/tauri
crates/tauri/src/webview/plugin.rs
import unittest from test import support import time resource = support.import_module('resource') # This test is checking a few specific problem spots with the resource module. class ResourceTest(unittest.TestCase): def test_args(self): self.assertRaises(TypeError, resource.getrlimit) self.asser...
unknown
codeparrot/codeparrot-clean
<?php declare(strict_types=1); /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Util; ...
php
github
https://github.com/composer/composer
src/Composer/Util/Bitbucket.php
# -*- 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 'Forum.pruned_archive' db.add_column(u'misago_forum', 'pruned_archive', ...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing import Union from typing_extensions import Literal, TypeAlias, TypedDict __all__ = ["RealtimeTracingConfigParam", "TracingConfiguration"] class TracingConfiguration(TypedDict, total=F...
python
github
https://github.com/openai/openai-python
src/openai/types/realtime/realtime_tracing_config_param.py
#!/usr/bin/env python2.7 # William Lam # wwww.virtuallyghetto.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 app...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from abc import abst...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.core.validators class Migration(migrations.Migration): dependencies = [ ('assessment_management', '0007_studentbatch_tutorbatch'), ] operations = [ migrations.CreateMode...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import import six from sentry.exceptions import InvalidConfiguration from sentry.utils import warnings class Version(tuple): def __str__(self): return '.'.join(map(six.binary_type, self)) def summarize(sequence, max=3): items = sequence[:max] remainder = len(seque...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.stubbing.answers; import java.lang.reflect.Array; import org.mockito.creation.instance.Instantiator; import org.mockito.internal.configuration.plugins.Plugins; import or...
java
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/internal/stubbing/answers/ClonesArguments.java
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions describe...
unknown
codeparrot/codeparrot-clean
#include "Python.h" #include "rotatingtree.h" #define KEY_LOWER_THAN(key1, key2) ((char*)(key1) < (char*)(key2)) /* The randombits() function below is a fast-and-dirty generator that * is probably irregular enough for our purposes. Note that it's biased: * I think that ones are slightly more probable than zeroes....
c
github
https://github.com/python/cpython
Modules/rotatingtree.c
# pylint: disable=C0111 # pylint: disable=W0621 from lettuce import world, step from common import course_id, course_location from problems_setup import PROBLEM_DICT from nose.tools import assert_in from opaque_keys.edx.locations import SlashSeparatedCourseKey @step(u'I am viewing a course with multiple sections') de...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # pylint: disable=C0111,too-many-arguments,too-many-instance-attributes,too-many-locals,redefined-outer-name,fixme # pylint: disable=superfluous-parens, no-member, invalid-name import sys sys.path.insert(0, "../../python") from __future__ import print_function import numpy as np import mxnet as mx from...
unknown
codeparrot/codeparrot-clean
# Copyright 2020 Red Hat, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
unknown
codeparrot/codeparrot-clean
# # zulip-contributor-docs documentation build configuration file, created by # sphinx-quickstart on Mon Aug 17 16:24:04 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All config...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.statement import io.ktor.client.call.* import io.ktor.client.request.* import io.ktor.http.* import io.ktor.util.date.* import io.ktor.utils.io.* import kotlin.coroutines...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-core/common/src/io/ktor/client/statement/DefaultHttpResponse.kt
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, 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, or # (at your ...
unknown
codeparrot/codeparrot-clean
# This file is part of project Sverchok. It's copyrighted by the contributors # recorded in the version control history of the file, available from # its original location https://github.com/nortikin/sverchok/commit/master # # SPDX-License-Identifier: GPL3 # License-Filename: LICENSE from collections import namedtuple...
unknown
codeparrot/codeparrot-clean
#!/bin/bash # Common prelude for macos-build.sh and macos-test.sh # shellcheck source=./common.sh source "$(dirname "${BASH_SOURCE[0]}")/common.sh" sysctl -a | grep machdep.cpu # These are required for both the build job and the test job. # In the latter to test cpp extensions. export MACOSX_DEPLOYMENT_TARGET=11.1 ...
unknown
github
https://github.com/pytorch/pytorch
.ci/pytorch/macos-common.sh
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import unicode_literals, division, print_function import os import tempfile import shutil from pymatgen.util.testing import PymatgenTest from monty.functools import lazy_property from pymatgen....
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 //go:build !race package command import ( "encoding/base64" "io" "os" "regexp" "strings" "testing" "github.com/hashicorp/cli" "github.com/hashicorp/vault/sdk/helper/xor" "github.com/hashicorp/vault/vault" ) func testOperatorGenerateRoo...
go
github
https://github.com/hashicorp/vault
command/operator_generate_root_test.go
import { STATE_SYMBOL } from '#client/constants'; import { effect, render_effect } from '../../../reactivity/effects.js'; import { untrack } from '../../../runtime.js'; import { queue_micro_task } from '../../task.js'; /** * @param {any} bound_value * @param {Element} element_or_component * @returns {boolean} */ f...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/internal/client/dom/elements/bindings/this.js
// // Copyright 2019 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/random/internal/mock_helpers.h
--- title: useRouteLoaderData --- # useRouteLoaderData <!-- ⚠️ ⚠️ IMPORTANT ⚠️ ⚠️ Thank you for helping improve our documentation! This file is auto-generated from the JSDoc comments in the source code, so please edit the JSDoc comments in the file below and this file will be re-generated once those changes are mer...
unknown
github
https://github.com/remix-run/react-router
docs/api/hooks/useRouteLoaderData.md
import numpy as np import pandas._config.config as cf from pandas import ( DataFrame, MultiIndex, ) class TestTableSchemaRepr: def test_publishes(self, ip): ipython = ip.instance(config=ip.config) df = DataFrame({"A": [1, 2]}) objects = [df["A"], df] # dataframe / series ...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/io/formats/test_ipython_compat.py
########################################################################### # # This program is part of Zenoss Core, an open source monitoring platform. # Copyright (C) 2007, Zenoss Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License versi...
unknown
codeparrot/codeparrot-clean
// MODULE: lib // MODULE_KIND: LibraryBinary // COMPILER_ARGUMENTS: -jvm-default=disable // FILE: p3/a.kt package p3 interface KtInterfaceA { fun defaultFun() { println("default") } fun withoutBody() } // MODULE: lib2 // MODULE_KIND: LibraryBinary // COMPILER_ARGUMENTS: -jvm-default=no-compatibil...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/testData/components/compilerFacility/compilation/defaultImpls.kt
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
c
github
https://github.com/curl/curl
docs/examples/evhiperfifo.c
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
unknown
codeparrot/codeparrot-clean
#include <ATen/core/class_type.h> #include <ATen/core/Dict.h> #include <ATen/core/function_schema.h> #include <ATen/core/ivalue.h> #include <c10/macros/Macros.h> #include <c10/util/irange.h> #include <ATen/core/function.h> namespace c10 { void ClassType::addMethod(torch::jit::Function* method) { TORCH_CHECK( ...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/core/class_type.cpp
UPGRADE FROM 8.0 to 8.1 ======================= Symfony 8.1 is a minor release. According to the Symfony release process, there should be no significant backward compatibility breaks. Minor backward compatibility breaks are prefixed in this document with `[BC BREAK]`, make sure your code is compatible with these entri...
unknown
github
https://github.com/symfony/symfony
UPGRADE-8.1.md
# coding: utf-8 from __future__ import unicode_literals import json import random import re from .common import InfoExtractor from ..compat import ( compat_str, ) class EightTracksIE(InfoExtractor): IE_NAME = '8tracks' _VALID_URL = r'https?://8tracks\.com/(?P<user>[^/]+)/(?P<id>[^/#]+)(?:#.*)?$' _TES...
unknown
codeparrot/codeparrot-clean
# prog2 # Make this file long, since that seems to affect how uploaded files are # handled in webob or cgi.FieldStorage. moby_dick_ten_chapters = """ CHAPTER 1. Loomings. Call me Ishmael. Some years ago--never mind how long precisely--having little or no money in my purse, and nothing particular to interest me on sh...
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/metrics2/impl/MetricsBuffer.java
# -*- coding: utf-8 -*- import pytz import re import time import openerp import openerp.service.report import uuid from werkzeug.exceptions import BadRequest from datetime import datetime, timedelta from dateutil import parser from dateutil import rrule from dateutil.relativedelta import relativedelta from openerp imp...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.plugins.logging import kotlin.test.* class AndroidLoggerTest { private val messages = ArrayList<String>() private val destinationLogger = object : Logger { ...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-plugins/ktor-client-logging/jvm/test/io/ktor/client/plugins/logging/AndroidLoggerTest.kt
#pragma once // Light-weight version of CUDAContext.h with fewer transitive includes #include <cstdint> #include <map> #include <shared_mutex> #include <cuda_runtime_api.h> #include <cusparse.h> #include <cublas_v2.h> // cublasLT was introduced in CUDA 10.1 but we enable only for 11.1 that also // added bf16 support...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/cuda/CUDAContextLight.h
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2011 Riverbank Computing Limited. ## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENSE...
unknown
codeparrot/codeparrot-clean
""" Manual test suite for CockroachDB integration ./runtime/runtime.rkt run --net=host --insecure-options=all --interactive enjoliver.local/cockroach:latest \ --exec /usr/bin/cockroach -- start --port 26257 --http-port 8081 --insecure ./runtime/runtime.rkt run --net=host --insecure-options=all --interactive enjol...
unknown
codeparrot/codeparrot-clean
// Copyright 2009 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 fmt_test import ( "bufio" "bytes" "errors" . "fmt" "io" "math" "reflect" "regexp" "strings" "testing" "testing/iotest" "unicode/utf8" ) ty...
go
github
https://github.com/golang/go
src/fmt/scan_test.go
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadataResolver.java
"""Tests for SSRF protection utilities.""" from typing import Any import pytest from pydantic import BaseModel, ValidationError from langchain_core._security._ssrf_protection import ( SSRFProtectedUrl, SSRFProtectedUrlRelaxed, is_cloud_metadata, is_localhost, is_private_ip, is_safe_url, v...
python
github
https://github.com/langchain-ai/langchain
libs/core/tests/unit_tests/test_ssrf_protection.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/io/erasurecode/rawcoder/NativeXORRawEncoder.java
#!/usr/bin/python # axis3d.py, original mplot3d version by John Porter # Created: 23 Sep 2005 # Parts rewritten by Reinier Heeres <reinier@heeres.eu> from __future__ import (absolute_import, division, print_function, unicode_literals) import six import math import copy from matplotlib import...
unknown
codeparrot/codeparrot-clean
""" Tests for DBSCAN clustering algorithm """ import pickle import numpy as np from scipy.spatial import distance from scipy import sparse from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_raises from sklearn.utils.testing im...
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
#!/usr/bin/env python # coding: utf-8 # # Copyright 2016, Marcos Salomão. # # 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 require...
unknown
codeparrot/codeparrot-clean
import taco.globals import taco.constants import taco.settings import msgpack import logging import time import uuid import Queue def Create_Request(command=taco.constants.NET_GARBAGE,data=""): with taco.globals.settings_lock: localuuid = taco.globals.settings["Local UUID"] response = {taco.constants.NET_IDENT...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # transformations.py # Copyright (c) 2006, Christoph Gohlke # Copyright (c) 2006-2009, The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import string from AOR.BasicStatement import BasicNamedStatement, BasicStatement from AOR.DoubleList import DoubleList class Select(BasicNamedStatement): # Stores a select statement # # sLabel -- Label of the select statement (this is NOT the label # used in t...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the abandontransaction RPC. The abandontransaction RPC marks a transaction and all its in-wallet...
unknown
codeparrot/codeparrot-clean
import { type BlockCodegenNode, type CacheExpression, type CallExpression, type DirectiveNode, type ElementNode, ElementTypes, type ExpressionNode, type IfBranchNode, type InterpolationNode, type JSChildNode, type MemoExpression, NodeTypes, type ObjectExpression, type Position, type Proper...
typescript
github
https://github.com/vuejs/core
packages/compiler-core/src/utils.ts
# -*- coding: utf-8 -*- """ *************************************************************************** edit.py --------------------- Date : May 2018 Copyright : (C) 2018 by Denis Rouzaud Email : denis@opengis.ch ********************************************...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright: 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
import argparse import json import matplotlib.pyplot as plt import skimage.io as io import cv2 import numpy as np import glob import PIL.Image import os,sys from lxml import etree, objectify def cityscapeMask2Pascal(databaseName, extractedFolderAnn, outputFolderAnn, imagesFolder): print("extractedFolderAnn", extr...
unknown
codeparrot/codeparrot-clean
""" Validates whether the system is reasonably well configured for serving up content. This is the code behind 'cobbler check'. Copyright 2007-2008, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> This software may be freely redistributed under the terms of the GNU general public license. You should have received ...
unknown
codeparrot/codeparrot-clean
{ "favorite": { "favoriteDags_one": "Első {{count}} kedvenc Dag", "favoriteDags_other": "Első {{count}} kedvenc Dag-ek", "noDagRuns": "Ehhez a Dag-hez még nincs futtatás.", "noFavoriteDags": "Még nincs kedvenc. Kattintson a csillag ikonra a listában egy Dag mellett, hogy hozzáadja a kedvenceihez." }...
json
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/public/i18n/locales/hu/dashboard.json
import decimal import sys from playhouse.tests.base import binary_construct from playhouse.tests.base import binary_types from playhouse.tests.base import database_class from playhouse.tests.base import ModelTestCase from playhouse.tests.base import PeeweeTestCase from playhouse.tests.base import test_db from playhous...
unknown
codeparrot/codeparrot-clean
// Code generated by "enumer -type=RenewBehavior -trimprefix=RenewBehavior"; DO NOT EDIT. package api import ( "fmt" ) const _RenewBehaviorName = "IgnoreErrorsRenewDisabledErrorOnErrors" var _RenewBehaviorIndex = [...]uint8{0, 12, 25, 38} func (i RenewBehavior) String() string { if i >= RenewBehavior(len(_RenewB...
go
github
https://github.com/hashicorp/vault
api/renewbehavior_enumer.go
# $HeadURL$ __RCSID__ = "$Id$" import datetime, time import types import threading import random from DIRAC.Core.Base.DB import DB from DIRAC import S_OK, S_ERROR, gMonitor, gConfig from DIRAC.Core.Utilities import List, ThreadSafe, Time, DEncode from DIRAC.AccountingSystem.private.TypeLoader import TypeLoader from DI...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from lxml import html from lxml import etree import copy import json import os import requests im...
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 u...
unknown
codeparrot/codeparrot-clean
import os from django.core.management import call_command, CommandError from django.test import TestCase from django.test.utils import override_settings from django.utils import translation, six from django.utils._os import upath from django.utils.six import StringIO test_dir = os.path.abspath(os.path.dirname(upath(_...
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 # -*- Mode: Python; indent-tabs-mode: nil -*- # pull a copy of the blockchain from a (hopefully) local node. # $ lpython chain_puller.py -b /Volumes/drive3/caesure/ 127.0.0.1:8333 # reading block headers...starting at pos 0...done. scanned 0 blocks in 0.00 secs # 2: Wed Nov 26 15:25:50 2014 Back...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ''' Run this script inside of src/ and it will look for all the files that were changed this year that still have the last year in the copyright headers, and it will fix the headers on that file using a perl regex one liner. For example: if it finds something like this and we're in 2014 //ticoin...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package main import ( "github.com/hashicorp/terraform/internal/grpcwrap" "github.com/hashicorp/terraform/internal/plugin" simple "github.com/hashicorp/terraform/internal/provider-simple" "github.com/hashicorp/terraform/internal/tfplugin5" ) fu...
go
github
https://github.com/hashicorp/terraform
internal/provider-simple/main/main.go
// This module is not accepted nor declined. // Any change will make the update fail. // If running in webpack-dev-server, it will do a complete reload on abort or fail. window.onload = function() { if(module.hot) { var checkButton = document.createElement("button"); checkButton.innerText = "Update!"; checkBu...
javascript
github
https://github.com/webpack/webpack
test/hotPlayground/index.js
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
unknown
codeparrot/codeparrot-clean
import numpy as np import pandas as pd from shapely import geometry import geopandas as gpd def rect_grid(bbox, hdim, vdim=None, out='polygon', pointref='centroid', how='fixed_step', anchor_point='ll', endpoint=True): if isinstance(bbox, (gpd.geoseries.GeoSeries, gpd.geodata...
unknown
codeparrot/codeparrot-clean
def min_difference(test_list): temp = [abs(b - a) for a, b in test_list] res = min(temp) return (res)
unknown
mbpp
/*------------------------------------------------------------------------- * * parse_coerce.c * handle type coercions/conversions for parser * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION *...
c
github
https://github.com/postgres/postgres
src/backend/parser/parse_coerce.c
def setup(app): app.add_crossref_type( directivename = "admin", rolename = "admin", indextemplate = "pair: %s; admin", ) app.add_crossref_type( directivename = "command", rolename = "command", indextemplate = "pair: %s; command", ) app.add_cr...
unknown
codeparrot/codeparrot-clean
# Copyright 2017 The dm_control Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
unknown
codeparrot/codeparrot-clean
import * as React from "react"; import * as ReactDOM from "react-dom/client"; import { BrowserRouter } from "react-router-dom"; import InboxApp from "./App"; ReactDOM.createRoot(document.getElementById("root")).render( <React.StrictMode> {/* "Mount" this app under the /inbox URL pathname. All routes and links ...
javascript
github
https://github.com/remix-run/react-router
examples/multi-app/inbox/main.jsx
from __future__ import division, absolute_import, print_function import sys import numpy as np from numpy.core.multiarray import _vec_string from numpy.compat import asbytes, asbytes_nested, sixu from numpy.testing import ( TestCase, run_module_suite, assert_, assert_equal, assert_array_equal ) kw_unicode_true =...
unknown
codeparrot/codeparrot-clean