code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form; /** * @internal */ class FileUploadError exte...
php
github
https://github.com/symfony/symfony
src/Symfony/Component/Form/FileUploadError.php
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h> static void ngx_http_wait_request_handler(ngx_event_t *ev); static ngx_http_request_t *ngx_http_alloc_request(ngx_connection_t *c); static void ngx_http_process_request_line(ngx_event_t...
c
github
https://github.com/nginx/nginx
src/http/ngx_http_request.c
/* Copyright 2023 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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/util/mkl_heuristics.h
from numpy import array Q_X = array([[5.26563660e-01, 3.14160190e-01, 8.00656370e-02], [7.50205180e-01, 4.60299830e-01, 8.98696460e-01], [6.65461230e-01, 6.94011420e-01, 9.10465700e-01], [9.64047590e-01, 1.43082200e-03, 7.39874220e-01], [1.08159060e-01, 5.53028790e-0...
unknown
codeparrot/codeparrot-clean
# Ansible lookup plugin for getting the content of the file # (c) 2015,2016 David Lundgren <dlundgren@syberisle.net> # # MIT License # For each item will find the first file and return it's content DOCUMENTATION = """ author: David Lundgren lookup: file options: lookup_file_paths: type:...
unknown
codeparrot/codeparrot-clean
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ module.exports = { defaultCommandTimeout: 10000, // Increase the default command timeout to 10 seconds e2e: { ...
javascript
github
https://github.com/angular/angular
devtools/cypress/cypress.config.js
#!/usr/bin/env python # # Copyright 2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
unknown
codeparrot/codeparrot-clean
from collections.abc import Callable, Sequence from langchain_core.callbacks import Callbacks from langchain_core.documents import BaseDocumentCompressor, Document from langchain_core.embeddings import Embeddings from langchain_core.utils import pre_init from pydantic import ConfigDict, Field from typing_extensions im...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/retrievers/document_compressors/embeddings_filter.py
import os import logging import shutil import datetime import libvirt from vmtest_helper import WindowsVMTestHelper, LinuxVMTestHelper class LoggingLayer(object): @classmethod def testSetUp(cls, test_class): # clean old test directory test_dir_path = os.path.join(os.path.dirname(os.path.realp...
unknown
codeparrot/codeparrot-clean
#-*- coding: ISO-8859-1 -*- # pysqlite2/test/factory.py: tests for the various factories in pysqlite # # Copyright (C) 2005-2007 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liab...
unknown
codeparrot/codeparrot-clean
#!/home/jmcgover/Dropbox/cpe580/project/doom/bin/python3 # # The Python Imaging Library # $Id$ # # this demo script illustrates how a 1-bit BitmapImage can be used # as a dynamically updated overlay # try: from tkinter import * except ImportError: from Tkinter import * from PIL import Image, ImageTk import sy...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 """ oauthlib.oauth2.rfc6749.errors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error used both by OAuth 2 clients and providers to represent the spec defined error responses for all four core grant types. """ from __future__ import unicode_literals import json from oauthlib.common import urlencode, add_params_to_ur...
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
from django.urls import path urlpatterns = [ path(r"(?P<named_group>\d+)", lambda x: x), ]
python
github
https://github.com/django/django
tests/check_framework/urls/path_compatibility/contains_re_named_group.py
/*------------------------------------------------------------------------- * * bufmgr.c * buffer manager interface routines * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION * src/backend/s...
c
github
https://github.com/postgres/postgres
src/backend/storage/buffer/bufmgr.c
# Test: duplicate package dependencies: - jinja2>=3.0.0 - jinja2>=3.0.0
unknown
github
https://github.com/pandas-dev/pandas
scripts/tests/data/deps_expected_duplicate_package.yaml
--- navigation_title: "Avg" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-avg-aggregation.html --- # Avg aggregation [search-aggregations-metrics-avg-aggregation] A `single-value` metrics aggregation that computes the average of numeric values that are e...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/aggregations/search-aggregations-metrics-avg-aggregation.md
""" OCL Web Core Functionality """ # import requests import logging from django.core import cache from django.http import HttpResponse from django.views.generic.edit import View from django.utils.translation import ugettext as _ from braces.views import JsonRequestResponseMixin from libs.ocl import OclApi logger = l...
unknown
codeparrot/codeparrot-clean
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ // TODO(devversion): Remove this file during `rules_js` migration. /** Dummy typings for systemjs. */ declare var S...
typescript
github
https://github.com/angular/angular
packages/system.d.ts
from pathod import language from pathod.language import websockets import netlib.websockets from . import tutils def parse_request(s): return next(language.parse_pathoc(s)) class TestWebsocketFrame: def _test_messages(self, specs, message_klass): for i in specs: wf = parse_request(i) ...
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/test/java/org/apache/hadoop/fs/TestLocalFileSystemPermission.java
import sys from .antlr import EOF, CommonToken as Tok, TokenStream, TokenStreamException import struct from . import ExcelFormulaParser from re import compile as recompile, match, LOCALE, UNICODE, IGNORECASE, VERBOSE int_const_pattern = r"\d+\b" flt_const_pattern = r""" (?: (?: \d* \. \d+ ) # .1 .12 .123 e...
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.server.jetty import io.ktor.events.* import io.ktor.server.application.* import io.ktor.server.engine.* /** * An [ApplicationEngineFactory] providing a Jetty-based [Applicat...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-jetty/jvm/src/io/ktor/server/jetty/Embedded.kt
import { ApolloServer } from "@apollo/server"; import { startServerAndCreateNextHandler } from "@as-integrations/next"; import { makeExecutableSchema } from "@graphql-tools/schema"; import { gql } from "graphql-tag"; const typeDefs = gql` type Query { users: [User!]! user(username: String): User } type U...
typescript
github
https://github.com/vercel/next.js
examples/api-routes-apollo-server/pages/api/graphql.ts
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; use Symfon...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ErrorLoggerCompilerPass.php
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
c
github
https://github.com/curl/curl
src/tool_getparam.c
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( parse_duration, unified_strdate, ) class HuffPostIE(InfoExtractor): IE_DESC = 'Huffington Post' _VALID_URL = r'''(?x) https?://(embed\.)?live\.huffingtonpost\.com/ (?: ...
unknown
codeparrot/codeparrot-clean
# (c) 2018, Ansible 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 option) any later version. # # Ansible is di...
unknown
codeparrot/codeparrot-clean
""" This config file extends the test environment configuration so that we can run the lettuce acceptance tests. """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=W0401, W0614 from .test import * from .sauce import * # You ...
unknown
codeparrot/codeparrot-clean
import { arrayFrom, binarySearchKey, CharacterCodes, combinePaths, compareValues, Debug, DocumentPosition, DocumentPositionMapper, DocumentPositionMapperHost, EmitHost, emptyArray, every, getDirectoryPath, getNormalizedAbsolutePath, getPositionOfLineAndCharact...
typescript
github
https://github.com/microsoft/TypeScript
src/compiler/sourcemap.ts
/* module.h - definitions for the module * * Copyright (C) 2004-2010 Gerhard Häring <gh@ghaering.de> * * This file is part of pysqlite. * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this so...
c
github
https://github.com/python/cpython
Modules/_sqlite/module.h
from setuptools import setup setup ( name='ujs-jsonvalidate', version='0.1.0', description='JSON validation utility', long_description=open('README.rst').read(), url='http://github.com/usingjsonschema/ujs-jsonvalidate-python', author='Joe McIntyre', author_email='j_h_mcintyre@yahoo.com', ...
unknown
codeparrot/codeparrot-clean
# Copyright 2008-2015 Nokia Solutions and Networks # # 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
scrape_configs: - job_name: prometheus relabel_configs: - target_label: yolo action: labelkeep
unknown
github
https://github.com/prometheus/prometheus
config/testdata/labelkeep5.bad.yml
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- from __future__ import absolute_import import copy import re import xml.etree.ElementTree as ET from svtplay_dl.error import ServiceError from svtplay_dl.fetcher.http import HTTP from svtplay_dl.service import Service class Mtvs...
unknown
codeparrot/codeparrot-clean
#========================================================================== # # Copyright NumFOCUS # # 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/l...
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...
c
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/security/hadoop_user_info.h
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from copy import deepcopy import unittest from extensions_paths import API from file_system import FileNotFoundError from host_file_sy...
unknown
codeparrot/codeparrot-clean
""" This sample shows users how to add a map service via URL, then update that item's URL from http scheme to https. This method will work for both Portal and ArcGIS Online Python 2/3 ArcREST 3.5.x """ from __future__ import print_function import arcrest if __name__ == "__main__": username = "<use...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/requests/ApiVersionsResponse.java
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2020 PyBuilder Team # # 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/l...
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
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
unknown
codeparrot/codeparrot-clean
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: no-sessionid Help: Disable SSL session-ID reusing Protocols: TLS Added: 7.16.0 Category: tls Multi: boolean See-also: - insecure Example: - --no-sessionid $URL --- # `--no-sessionid` Disable curl's use of SSL sessio...
unknown
github
https://github.com/curl/curl
docs/cmdline-opts/no-sessionid.md
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\PhpUnit\Extension; use PHPUnit\Event\Code\TestMethod; us...
php
github
https://github.com/symfony/symfony
src/Symfony/Bridge/PhpUnit/Extension/RegisterClockMockSubscriber.php
#!/usr/bin/env python """ This module tries to retrieve as much platform-identifying data as possible. It makes this information available via function APIs. If called from the command line, it prints the platform information concatenated as single string to stdout. The output format is useable as par...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Tests for the profile API. """ from django.test import TestCase import ddt from nose.tools import raises from dateutil.parser import parse as parse_datetime from user_api.api import account as account_api from user_api.api import profile as profile_api from user_api.models import UserProfi...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
unknown
codeparrot/codeparrot-clean
// created by cgo -cdefs and then converted to Go // cgo -cdefs defs2_linux.go package runtime import "unsafe" const ( _EINTR = 0x4 _EAGAIN = 0xb _ENOMEM = 0xc _ENOSYS = 0x26 _PROT_NONE = 0x0 _PROT_READ = 0x1 _PROT_WRITE = 0x2 _PROT_EXEC = 0x4 _MAP_ANON = 0x20 _MAP_PRIVATE = 0x2 _MAP_FIXED = 0x...
go
github
https://github.com/golang/go
src/runtime/defs_linux_386.go
""" test where we are determining what we are grouping, or getting groups """ from datetime import ( date, timedelta, ) import numpy as np import pytest from pandas.errors import ( Pandas4Warning, SpecificationError, ) import pandas as pd from pandas import ( CategoricalIndex, DataFrame, ...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/groupby/test_grouping.py
--- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/plugins/current/discovery-gce-usage-long.html --- # Setting up GCE Discovery [discovery-gce-usage-long] ## Prerequisites [discovery-gce-usage-long-prerequisites] Before starting, you need: * Your project ID, e.g. `es-cloud`. Get it from [Google API...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch-plugins/discovery-gce-usage-long.md
//===--- Index.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/index/Index.cpp
require 'erb' # A runner to measure performance *inside* Ractor class BenchmarkDriver::Runner::Ractor < BenchmarkDriver::Runner::Ips # JobParser returns this, `BenchmarkDriver::Runner.runner_for` searches "*::Job" Job = Class.new(BenchmarkDriver::DefaultJob) do attr_accessor :ractor end # Dynamically fetc...
ruby
github
https://github.com/ruby/ruby
benchmark/lib/benchmark_driver/runner/ractor.rb
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
unknown
codeparrot/codeparrot-clean
from collections import Iterable from functools import partial import unittest from coalib.core.CircularDependencyError import CircularDependencyError from coalib.core.Graphs import traverse_graph def get_successive_nodes(graph, node): try: item = graph[node] except KeyError: return set() ...
unknown
codeparrot/codeparrot-clean
/* 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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/lite/testing/tf_driver.h
# Copyright 2014 NEC Corporation. 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 ...
unknown
codeparrot/codeparrot-clean
""" Testing here assumes that numpy and linalg is ALWAYS correct!!!! If running from PyCharm you can place the following line in "Additional Arguments" for the pytest run configuration -vv -m mat_ops -p no:cacheprovider """ import logging # standard libraries import sys import numpy as np import pytest # type: ign...
unknown
codeparrot/codeparrot-clean
# Copyright 2011,2012 James McCauley # # This file is part of POX. # # POX 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. # # POX is d...
unknown
codeparrot/codeparrot-clean
import {Component} from '@angular/core'; import {HousingLocation} from '../housing-location/housing-location'; @Component({ selector: 'app-home', imports: [HousingLocation], template: ` <section> <form> <input type="text" placeholder="Filter by city" /> <button class="primary" type="but...
typescript
github
https://github.com/angular/angular
adev/src/content/tutorials/first-app/steps/04-interfaces/src/app/home/home.ts
// Copyright 2024 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql import ( "context" "github.com/cockroachdb/cockroach/pkg/jobs" "github.com/cockroachdb/cockroach/pkg/jobs/jobspb" "github.com/cockroachdb/cockroach/pkg...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/alter_job_owner.go
import NIOCore /// Capable of managing CRUD operations for `Session`s. /// /// This is an async version of `SessionDriver` public protocol AsyncSessionDriver: SessionDriver { func createSession(_ data: SessionData, for request: Request) async throws -> SessionID func readSession(_ sessionID: SessionID, for req...
swift
github
https://github.com/vapor/vapor
Sources/Vapor/Concurrency/AsyncSessionDriver.swift
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ############################################################################ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The A...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # sourcekitd_path_sanitize.py - Cleans up paths from sourcekitd-test output # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://s...
unknown
codeparrot/codeparrot-clean
###################################################################### # This file should be kept compatible with Python 2.3, see PEP 291. # ###################################################################### """ Generic dylib path manipulation """ import re __all__ = ['dylib_info'] DYLIB_RE = re.compile(r"""(?x...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #*************************************************************************** # _ _ ____ _ # Project ___| | | | _ \| | # / __| | | | |_) | | # | (__| |_| | _ <|...
python
github
https://github.com/curl/curl
tests/dictserver.py
//! Intrinsics and other functions that the interpreter executes without //! looking at their MIR. Intrinsics/functions supported here are shared by CTFE //! and miri. mod simd; use rustc_abi::{FIRST_VARIANT, FieldIdx, HasDataLayout, Size, VariantIdx}; use rustc_apfloat::ieee::{Double, Half, Quad, Single}; use rustc_...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_const_eval/src/interpret/intrinsics.rs
/* Copyright 2021 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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_layout_helper.h
#!/usr/bin/env python # -*- coding: utf-8 -*- # noinspection SpellCheckingInspection """ OSTYPE Permite manejar el tipo de sistema operativo huésped, comprobando el tipo, versión, etc. Autor: PABLO PIZARRO @ github.com/ppizarror Fecha: 2016 Licencia: GPLv2 """ __author__ = "ppizarror" # Importación de librerías impor...
unknown
codeparrot/codeparrot-clean
- delegate_to: localhost block: - name: Create archive command: "tar -cf safe-symlinks.tar {{ role_path }}/files/safe-symlinks" args: chdir: "{{ remote_tmp_dir }}" - name: Install role successfully command: ansible-galaxy role install --roles-path '{{ remote_tmp_dir }}/roles' safe-symlinks.tar ...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/ansible-galaxy-role/tasks/valid-role-symlinks.yml
import copy import datetime import pickle import unittest from django.test import override_settings from django.utils import timezone try: import pytz except ImportError: pytz = None requires_pytz = unittest.skipIf(pytz is None, "this test requires pytz") if pytz is not None: CET = pytz.timezone("Europe...
unknown
codeparrot/codeparrot-clean
--- applies_to: stack: ga serverless: ga navigation_title: "Spatial functions" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-functions-operators.html#esql-spatial-functions --- # {{esql}} spatial functions [esql-spatial-functions] {{esql}} supports several spatial function...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/functions-operators/spatial-functions.md
#!/usr/bin/env python # Copyright (c) 2014, Paessler AG <support@paessler.com> # 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 not...
unknown
codeparrot/codeparrot-clean
import pure_interface from pure_interface import * import abc import unittest import six try: from unittest import mock except ImportError: import mock class IAnimal(PureInterface): @abstractproperty def height(self): return None class IAnimal3(PureInterface): # python 3 style syntax ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import logging from oauthlib.common import generate_token, urldecode from oauthlib.oauth2 import WebApplicationClient, InsecureTransportError from oauthlib.oauth2 import TokenExpiredError, is_secure_transport import requests log = logging.getLogger(__name__) class TokenUpdate...
unknown
codeparrot/codeparrot-clean
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
unknown
codeparrot/codeparrot-clean
# This file is part of pysaleae. # # pysaleae 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. # # pysaleae is distributed in the hope t...
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 use ...
unknown
codeparrot/codeparrot-clean
""" Please forgive any typos or errors in the comments, I'll be cleaning them up as frequently as I can. Pygcurse v0.1 alpha Pygcurse (pronounced "pig curse") is a curses library emulator that runs on top of the Pygame framework. It provides an easy way to create text adventures, roguelikes, and console-style applica...
unknown
codeparrot/codeparrot-clean
// Test the speed of .pipe() with JSStream wrapping for PassThrough streams 'use strict'; const common = require('../common.js'); const { PassThrough } = require('stream'); const bench = common.createBenchmark(main, { len: [64, 102400, 1024 * 64 * 16], type: ['utf', 'asc', 'buf'], dur: [5], }, { test: { len: ...
javascript
github
https://github.com/nodejs/node
benchmark/net/net-wrap-js-stream-passthrough.js
# -*- 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): # Deleting field 'OrderItem.line_cost' db.delete_column('shoppingcart_orderitem', 'line_cost') def backw...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package views import ( encJson "encoding/json" "fmt" "github.com/hashicorp/go-hclog" "github.com/hashicorp/terraform/internal/command/views/json" "github.com/hashicorp/terraform/internal/tfdiags" tfversion "github.com/hashicorp/terraform/ve...
go
github
https://github.com/hashicorp/terraform
internal/command/views/json_view.go
#![warn(rust_2018_idioms)] use std::io; use tokio::io::{AsyncReadExt, AsyncWriteExt}; use tokio::time::{Duration, Instant}; use tokio_test::io::Builder; #[tokio::test] async fn read() { let mut mock = Builder::new().read(b"hello ").read(b"world!").build(); let mut buf = [0; 256]; let n = mock.read(&mut ...
rust
github
https://github.com/tokio-rs/tokio
tokio-test/tests/io.rs
<script setup> import ExampleArcs from "../components/ExampleArcs.vue"; import {ref} from "vue"; const cornerRadius = ref(18); const padAngle = ref(0.03); const padRadius = ref(200); </script> # Arcs The arc generator produces a [circular](https://en.wikipedia.org/wiki/Circular_sector) or [annular](https://en.wiki...
unknown
github
https://github.com/d3/d3
docs/d3-shape/arc.md
import datetime from django.contrib.auth.models import User from django.db import models from tastypie.utils import now, aware_datetime class DateRecord(models.Model): date = models.DateField() username = models.CharField(max_length=20) message = models.CharField(max_length=20) class Note(models.Model): ...
unknown
codeparrot/codeparrot-clean
from maze_run.draw_maze import parse_grid from maze_run.moves import move from maze_run.moves import LEFT, RIGHT, UP, DOWN from fixtures import level import pytest CRATE_MOVES = [ (LEFT, (3, 2), (3, 1)), (RIGHT, (3, 4), (3, 5)), (UP, (2, 3), (1, 3)), (DOWN, (4, 3), (5, 3)), ] class TestCrateMoves...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright 2024 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. set -exuo pipefail dir="$(dirname $(dirname $(dirname $(dirname "${0}"))))" source "$dir/teamcity-support.sh" # For $root source "$dir/teamcity-bazel...
unknown
github
https://github.com/cockroachdb/cockroach
build/teamcity/cockroach/nightlies/roachtest_nightly_gce_perturbation.sh
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
unknown
codeparrot/codeparrot-clean
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import os import glob import numpy as np import nibabel as nib import matplotlib.pylab as plt import matplotlib.image as mpimg from braincode.math import corr2_coef, make_2d_gaussian, make_2d_dog, make_2d...
unknown
codeparrot/codeparrot-clean
# # Copyright (c) 2017 Intel Corporation # # 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...
unknown
codeparrot/codeparrot-clean
""" ====================================================== Classification of text documents using sparse features ====================================================== This is an example showing how scikit-learn can be used to classify documents by topics using a bag-of-words approach. This example uses a scipy.spars...
unknown
codeparrot/codeparrot-clean
import unittest from io import StringIO from unittest import mock from django.db import connection from django.db.backends.oracle.creation import DatabaseCreation from django.db.utils import DatabaseError from django.test import TestCase @unittest.skipUnless(connection.vendor == 'oracle', 'Oracle tests') @mock.patch....
unknown
codeparrot/codeparrot-clean
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities import peer.proposal_pb2 as peer_dot_proposal__pb2 import peer.proposal_response_pb2 as peer_dot_proposal__response__pb2...
unknown
codeparrot/codeparrot-clean
from django import forms from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.utils.translation import ugettext, ugettext_lazy as _ class FlatpageForm(forms.ModelForm): url = forms.RegexField(label=_("URL"), max_length=100, regex=r'^[-\w/\.~]+$', help_text=_("Ex...
unknown
codeparrot/codeparrot-clean
from django.core.management import call_command from django.test import TestCase from frontend.models import Practice, PracticeStatistics, ImportLog PRESCRIBING_DATE = "2040-03-01" def setUpModule(): Practice.objects.create(code="N84014", name="AINSDALE VILLAGE SURGERY") Practice.objects.create(code="P84034",...
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
package client import ( "net/http" "testing" cerrdefs "github.com/containerd/errdefs" "github.com/moby/moby/api/types/system" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) func TestInfoServerError(t *testing.T) { client, err := New(WithMockClient(errorMock(http.StatusInternalServerError, "Server ...
go
github
https://github.com/moby/moby
client/system_info_test.go
/*------------------------------------------------------------------------- * * Multibyte character printing support for frontend code * * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/fe_utils/mbprint.c * ...
c
github
https://github.com/postgres/postgres
src/fe_utils/mbprint.c
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-15 07:11 from __future__ import unicode_literals import autoslug.fields from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import django_bleach.models import model_utils.fields class Migration(migrations...
unknown
codeparrot/codeparrot-clean