code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# 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
#!/usr/bin/env python import argparse import difflib import pprint import re import MySQLdb import sys from lib import host_utils from lib import mysql_lib def main(): action_desc = """Action description: stdout - dump grants to stdout check - check grants on the instance and ouput errors to stdout import - impor...
unknown
codeparrot/codeparrot-clean
import unittest from io import StringIO from unittest.mock import patch, MagicMock, call, Mock from PIL import Image from hashfs import HashAddress from app import hashfs from app.enums import FileCategory from app.exceptions.base import ResourceNotFoundException from app.models.file import File from app.repository i...
unknown
codeparrot/codeparrot-clean
import pytest import math as m import numpy as np from sisl import Geometry, Atom, SuperCell from sisl.geometry import sgeom @pytest.fixture def setup(): class t(): def __init__(self): bond = 1.42 sq3h = 3.**.5 * 0.5 self.sc = SuperCell(np.array([[1.5, sq3h, 0.], ...
unknown
codeparrot/codeparrot-clean
--- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/plugins/current/discovery-gce-usage.html --- # GCE Virtual Machine discovery [discovery-gce-usage] Google Compute Engine VM discovery allows to use the google APIs to perform automatic discovery of seed hosts. Here is a simple sample configuration: ...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch-plugins/discovery-gce-usage.md
from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..utils import remove_start class BlinkxIE(InfoExtractor): _VALID_URL = r'^(?:https?://(?:www\.)blinkx\.com/#?ce/|blinkx:)(?P<id>[^?]+)' IE_NAME = 'blinkx' _TEST = { 'url': 'http://www.blinkx.com...
unknown
codeparrot/codeparrot-clean
# 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 .base import BaseFormatter class TbplFormatter(BaseFormatter): """Formatter that formats logs in the legacy fo...
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
#!/usr/bin/env python __all__ = ['pptv_download', 'pptv_download_by_id'] from ..common import * import re import time import urllib from random import random def constructKey(arg): def str2hex(s): r="" for i in s[:8]: t=hex(ord(i))[2:] if len(t)==1: t="0"...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # security.py - Copyright (C) 2012 Red Hat, Inc. # Written by Fabian Deutsch <fabiand@redhat.com> # # 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; ve...
unknown
codeparrot/codeparrot-clean
# Copyright 2010 Google Inc. # Copyright (c) 2011, Nexenta Systems Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use...
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 ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 - # # This file is part of flower. See the NOTICE for more information. from flower.core import channel, getcurrent, get_scheduler from flower.core.uv import uv_server class NoMoreListener(Exception): pass class Listener(object): def __init__(self): self.task = getcurrent() ...
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
class InvalidDefinitionError(Exception): pass class NotFoundError(Exception): pass class ProcessingError(Exception): ''' An error occurred while processing a request to the XModule. For example: if an exception occurs while checking a capa problem. ''' pass class InvalidVersionError(Excep...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # (c) 2015, Florian Apolloner <florian@apolloner.eu> # # 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 # (...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package localexec import ( "fmt" "io/ioutil" "os" "strings" "testing" "time" "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/provisioners" "github.com/zclconf/go-cty/cty" ) func TestResourceProvider_Apply(t *testing.T...
go
github
https://github.com/hashicorp/terraform
internal/builtin/provisioners/local-exec/resource_provisioner_test.go
use rustc_abi::Endian; use crate::spec::{ Arch, Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetMetadata, TargetOptions, }; pub(crate) fn target() -> Target { Target { data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(), llvm_target: "mipsel".into(), me...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/targets/mipsel_mti_none_elf.rs
import os from test.support import load_package_tests, Py_GIL_DISABLED import unittest if Py_GIL_DISABLED: raise unittest.SkipTest("GIL disabled") def load_tests(*args): return load_package_tests(os.path.dirname(__file__), *args)
python
github
https://github.com/python/cpython
Lib/test/test_interpreters/__init__.py
#pragma once #include <c10/core/impl/PyInterpreter.h> #include <c10/macros/Export.h> #include <c10/util/Registry.h> #include <memory> namespace c10::impl { // Minimal interface for PyInterpreter hooks struct C10_API PyInterpreterHooksInterface { virtual ~PyInterpreterHooksInterface() = default; // Get the PyInt...
c
github
https://github.com/pytorch/pytorch
c10/core/impl/PyInterpreterHooks.h
# Copyright (c) 2009, Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the...
unknown
codeparrot/codeparrot-clean
from optparse import make_option from django.conf import settings from django.db import connections, router, transaction, models, DEFAULT_DB_ALIAS from django.core.management import call_command from django.core.management.base import NoArgsCommand, CommandError from django.core.management.color import no_style from d...
unknown
codeparrot/codeparrot-clean
# portalocker.py - Cross-platform (posix/nt) API for flock-style file locking. # Requires python 1.5.2 or better. """Cross-platform (posix/nt) API for flock-style file locking. Synopsis: import portalocker file = open("somefile", "r+") portalocker.lock(file, portalocker.LOCK_EX) file.seek...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0+ OR MIT) %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/rockchip,rk3128-cru.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Rockchip RK3126/RK3128 Clock and Reset Unit (CRU) maintainers: - Elaine Zhang <zhangqing@rock-chips.com> - Heiko Stuebner <hei...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/rockchip,rk3128-cru.yaml
"""Record of phased-in incompatible language changes. Each line is of the form: FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease "," CompilerFlag ")" where, normally, OptionalRelease < MandatoryRelease, and both are 5-tuples of the same form as sys.version_info: (...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ BR-specific Form helpers """ from django.forms import ValidationError from django.forms.fields import Field, RegexField, CharField, Select, EMPTY_VALUES from django.utils.encoding import smart_unicode from django.utils.translation import ugettext_lazy as _ import re try: set except Nam...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. // // Code generated by generate-staticcheck; DO NOT EDIT. // //go:build bazel package sa4004 import ( util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes...
go
github
https://github.com/cockroachdb/cockroach
build/bazelutil/staticcheckanalyzers/sa4004/analyzer.go
# -*- coding: utf-8 -*- # # Ansible documentation build configuration file, created by # sphinx-quickstart on Fri Jun 3 17:34:17 2016. # # 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. # # A...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from textwrap import dedent from pants.backend.codegen.thrift.java.java_thrift_library import JavaThriftLibrary from pants.backend.graph_info.tasks.dependees import ReverseDepmap from pan...
unknown
codeparrot/codeparrot-clean
#!/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 distribut...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # """ ORCA Open Remote Control Application Copyright (C) 2013-2020 Carsten Thielepape Please contact me by : http://www.orca-remote.org/ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published b...
unknown
codeparrot/codeparrot-clean
""" Utilities for manipulating Geometry WKT. """ from django.utils import six def precision_wkt(geom, prec): """ Returns WKT text of the geometry according to the given precision (an integer or a string). If the precision is an integer, then the decimal places of coordinates WKT will be truncated to...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * setrefs.c * Post-processing of a completed plan tree: fix references to subplan * vars, compute regproc values for operators, etc * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) ...
c
github
https://github.com/postgres/postgres
src/backend/optimizer/plan/setrefs.c
from decimal import Decimal from django.contrib.auth.models import User, Group from django.test import TestCase from product.models import Product, Price from satchmo_ext.tieredpricing.models import * from threaded_multihost.threadlocals import set_current_user import keyedcache class TieredTest(TestCase): """Test...
unknown
codeparrot/codeparrot-clean
from test.base import BaseTest import unittest, socket, requests, json from time import sleep from unittest import TestCase # supress ssl warnings. requests.packages.urllib3.disable_warnings( requests .packages .urllib3 .exceptions .InsecureRequestWarning) class DlistsTestCase(TestCase, BaseTest):...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package random import ( "fmt" "reflect" "testing" "github.com/mitchellh/mapstructure" ) type testCharsetRule struct { String string `mapstructure:"string" json:"string"` Integer int `mapstructure:"int" json:"int"` // Default to pa...
go
github
https://github.com/hashicorp/vault
helper/random/registry_test.go
# (c) 2020 Matt Martz <matt@sivel.net> # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) """ This file provides ease of use shortcuts for loading and dumping YAML, preferring the YAML compiled C extensions to reduce duplicated code. """ from __future__ import a...
python
github
https://github.com/ansible/ansible
lib/ansible/module_utils/common/yaml.py
from distutils.core import setup setup(name='asterix', version='0.3', description= 'Framework for communication with smartcards based on pyscard.', author='Petr Tobiska', author_email='petr.tobiska@gmail.com', url='https://github.com/suma12/asterix', packages=['asterix'], ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2015 # Johannes K. Fichte, Vienna University of Technology, Austria # # reduct.py 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 y...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, unicode_literals try: import resource # Not available on Win32 systems except ImportError: resource = None import time from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from debug_toolbar.panels import Panel ...
unknown
codeparrot/codeparrot-clean
from setuptools import setup, find_packages exec(open('babbage/version.py', 'r').read()) with open('README.md') as f: long_description = f.read() setup( name='babbage', version=__version__, description="A light-weight analytical engine for OLAP processing", long_description=long_description, ...
unknown
codeparrot/codeparrot-clean
""" ### Example HTTP operator and sensor """ from airflow import DAG from airflow.operators import SimpleHttpOperator, HttpSensor from datetime import datetime, timedelta import json seven_days_ago = datetime.combine(datetime.today() - timedelta(7), datetime.min.time()) default_args ...
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
import numpy as np from BiNN_single import BiNNsingle from BiNN_separate_single import BiNNSeparateSingle from MultiMA import MultiMA import copy from trainingDataGenerator import datagenerator np.random.seed(2017) SCALE = 0.001 def paras_init(shape): return np.zeros(shape, dtype=np.float64) def dictionary_copy2...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (c) 2018 Zim Kalinowski, <zikalino@microsoft.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # (c) 2017, Adrian Likins <alikins@redhat.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing_extensions import Literal from ..._models import BaseModel __all__ = ["ResponseLocalEnvironment"] class ResponseLocalEnvironment(BaseModel): """Represents the use of a local environment to perform shell actions."""...
python
github
https://github.com/openai/openai-python
src/openai/types/responses/response_local_environment.py
groucho: id: 1 name: Groucho Marx member_type_id: 1 some_other_guy: id: 2 name: Englebert Humperdink member_type_id: 2 blarpy_winkup: id: 3 name: Blarpy Winkup
unknown
github
https://github.com/rails/rails
activerecord/test/fixtures/members.yml
# -*- test-case-name: twisted.test.test_rebuild -*- # Copyright (c) 2001-2009 Twisted Matrix Laboratories. # See LICENSE for details. """ *Real* reloading support for Python. """ # System Imports import sys import types import time import linecache # Sibling Imports from twisted.python import log, reflect lastRebui...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0-or-later /* * PCBC: Propagating Cipher Block Chaining mode * * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * Derived from cbc.c * - Copyright (c) 2006 Herbert Xu <herbert@gondor.apana.org.au> */ #include <crypto/al...
c
github
https://github.com/torvalds/linux
crypto/pcbc.c
export var __N_SSG = true; export default function Test() { return __jsx("div", null); }
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/ssg/getStaticProps/should-remove-combined-named-export-specifiers/output.js
// Copyright 2023 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package rpc import ( "context" "fmt" "net" "sync" "github.com/cockroachdb/cockroach/pkg/rpc/rpcbase" "github.com/cockroachdb/cockroach/pkg/settings" "github.com...
go
github
https://github.com/cockroachdb/cockroach
pkg/rpc/settings.go
#!/usr/bin/env python import sys import argparse import re import logging from BCBio import GFF from gff3 import feature_lambda, get_id, fetchParent from bigwig import bigwig_add_header, bigwig_store logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) NAME = re.compile("^# Name=(.*)\tLength=") D...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import datetime import uuid import pytz from django.test import TestCase from django.utils import timezone from freezegun import freeze_time from silk import models from silk.storage import ProfilerResultStorage from silk.config import SilkyConfig from .factories import RequestMinFactory, SQL...
unknown
codeparrot/codeparrot-clean
{ "title": "V16 Grid Layout Migration Test Dashboard", "schemaVersion": 15, "rows": [ { "collapse": false, "height": 250, "panels": [ { "id": 1, "type": "graph", "title": "CPU Usage", "span": 6 }, { "id": 2, ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/testdata/input/v16.grid_layout_upgrade.json
""" This module contains helper functions for controlling caching. It does so by managing the "Vary" header of responses. It includes functions to patch the header of response objects directly and decorators that change functions to do that header-patching themselves. For information on the Vary header, see: http...
unknown
codeparrot/codeparrot-clean
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3....
unknown
codeparrot/codeparrot-clean
use rustc_abi::Endian; use crate::spec::{Arch, Target, TargetMetadata, base}; pub(crate) fn target() -> Target { let mut base = base::linux_gnu::opts(); base.endian = Endian::Big; base.cpu = "v9".into(); base.max_atomic_width = Some(64); Target { llvm_target: "sparc64-unknown-linux-gnu".i...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/targets/sparc64_unknown_linux_gnu.rs
""" Contains writer base class. """ #----------------------------------------------------------------------------- #Copyright (c) 2013, the IPython Development Team. # #Distributed under the terms of the Modified BSD License. # #The full license is in the file COPYING.txt, distributed with this software. #-------------...
unknown
codeparrot/codeparrot-clean
Generic arguments were not provided in the same order as the corresponding generic parameters are declared. Erroneous code example: ```compile_fail,E0747 struct S<'a, T>(&'a T); type X = S<(), 'static>; // error: the type argument is provided before the // lifetime argument ``` The argument...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0747.md
########################################################## # THIS IS A GENERATED FILE -- DO NOT MODIFY. # IF YOU WISH TO MODIFY THIS SUITE, MODIFY THE CORRESPONDING MATRIX SUITE MAPPING FILE # AND REGENERATE THE MATRIX SUITES. # # matrix suite mapping file: buildscripts/resmokeconfig/matrix_suites/mappings/sharding_pqs...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/matrix_suites/generated_suites/sharding_pqs_hints.yml
# Copyright (c) 2001-2009 Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for twisted.protocols.postfix module. """ from twisted.trial import unittest from twisted.protocols import postfix from twisted.test.proto_helpers import StringTransport class PostfixTCPMapQuoteTestCase(unittest.TestCase...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ werkzeug.datastructures ~~~~~~~~~~~~~~~~~~~~~~~ This module provides mixins and classes with an immutable interface. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import codecs import ...
unknown
codeparrot/codeparrot-clean
from itertools import chain from pyprint.ConsolePrinter import ConsolePrinter import os from coalib import coala_delete_orig from coalib.output.printers.LogPrinter import LogPrinter from coalib.processes.Processing import execute_section from coalib.settings.ConfigurationGathering import gather_configuration from coal...
unknown
codeparrot/codeparrot-clean
/* MIT License * * Copyright (c) 1998 Massachusetts Institute of Technology * Copyright (c) The c-ares project and its contributors * * 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 wi...
c
github
https://github.com/nodejs/node
deps/cares/src/lib/ares_send.c
"use strict"; import assert from "assert"; import utils from "../../../lib/utils.js"; import mergeConfig from "../../../lib/core/mergeConfig.js"; describe("Prototype Pollution Protection", function () { afterEach(function () { // Clean up any pollution that might have occurred delete Object.prototype.pollut...
javascript
github
https://github.com/axios/axios
test/unit/core/prototypePollution.js
// 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 unsafe contains operations that step around the type safety of Go programs. Packages that import unsafe may be non-portable and are not protected by...
go
github
https://github.com/golang/go
src/unsafe/unsafe.go
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. // // Copyright (C) 2025, SpaceMIT Inc., all rights reserved. // Copyright (C) 2025, Institute of Software, Chinese Academy of...
unknown
github
https://github.com/opencv/opencv
hal/riscv-rvv/src/features2d/common.hpp
""" Optimizations of the expression tree representation for better CSE opportunities. """ from __future__ import print_function, division from sympy.core import Add, Basic, Mul from sympy.core.basic import preorder_traversal from sympy.core.singleton import S from sympy.utilities.iterables import default_sort_key def...
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/src/main/java/org/springframework/boot/context/properties/bind/DataObjectPropertyBinder.java
# 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
#ifndef HEADER_CURL_IMAP_H #define HEADER_CURL_IMAP_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| ...
c
github
https://github.com/curl/curl
lib/imap.h
""" Synchronization primitives: - reader-writer lock (preference to writers) (Contributed to Django by eugene@lazutkin.com) """ import contextlib try: import threading except ImportError: import dummy_threading as threading class RWLock(object): """ Classic implementation of reader-writer lock w...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function from parse import * from wireutils import * color_printing_config.name = "Generator" color_printing_config.color = ansi_colors.PEACH if __name__ == "__main__": import argparse parser = argparse.ArgumentParser() parser.add_argument("-m", "--mode", help="Choose activation mode ...
unknown
codeparrot/codeparrot-clean
# if we got here then someone tried to import pysqlite.dbapi2 # this will only be allowed if the script is greater that version 1.0 import warnings import re # Credit gnud on stackoverflow: # see http://stackoverflow.com/questions/1714027/version-number-comparison/1714190#1714190 def xbmcVerCmp(version1, version2): ...
unknown
codeparrot/codeparrot-clean
''' This file is part of evopy. Copyright 2012 - 2013, Jendrik Poloczek evopy 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. evopy is dis...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 Matt Chaput. 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 notice, # this list of conditions and the...
unknown
codeparrot/codeparrot-clean
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. 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 notice, this ...
unknown
codeparrot/codeparrot-clean
"""Constants for the sentry integration.""" import logging DOMAIN = "sentry" CONF_DSN = "dsn" CONF_ENVIRONMENT = "environment" CONF_EVENT_CUSTOM_COMPONENTS = "event_custom_components" CONF_EVENT_HANDLED = "event_handled" CONF_EVENT_THIRD_PARTY_PACKAGES = "event_third_party_packages" CONF_LOGGING_EVENT_LEVEL = "loggi...
unknown
codeparrot/codeparrot-clean
<button type="button" (click)="focusFirstHeading()" class="adev-skip">Skip to main content</button> @defer (when isBrowser) { <adev-progress-bar /> <docs-top-level-banner expiry="2025-10-20" id="state-of-js-2025" link="https://survey.devographics.com/en-US/survey/state-of-js/2025?source=angular_homepag...
html
github
https://github.com/angular/angular
adev/src/app/app.component.html
# coding: utf8 { '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '\ " update\ " \ " field1=\'newvalue\'\ " 와 같은 선택적 표현식입니다. 갱신하거나 조인의 결과를 삭제할 수 없습니다.', '# of International Staff': '# 국제 직원', '# of National Staff': '# 자국 인력을', '# of Vehicles': '# vehicl...
unknown
codeparrot/codeparrot-clean
'use strict'; const common = require('../common.js'); const assert = require('assert'); const bench = common.createBenchmark(main, { n: [2e5], type: ['string', 'object', 'number'], method: ['strictEqual', 'notStrictEqual'], }, { combinationFilter(p) { // These benchmarks purposefully do not run by default...
javascript
github
https://github.com/nodejs/node
benchmark/assert/strictequal.js
"""Test UniFi Controller.""" from unittest.mock import Mock, patch import pytest from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.components import unifi from homeassistant.components.unifi import controller, errors from tests.common import mock_coro CONTROLLER_DATA = { unifi.CONF_HOS...
unknown
codeparrot/codeparrot-clean
# this is a virtual module that is entirely implemented server side # 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 op...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Ben Ockmore # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights #...
unknown
codeparrot/codeparrot-clean
# Webhooks for external integrations. from django.http import HttpRequest, HttpResponse from zerver.decorator import authenticated_rest_api_view from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_success from zerver.lib.webhooks.common import check_send_webhook_message from ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2020 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 agre...
java
github
https://github.com/google/guava
android/guava/src/com/google/common/util/concurrent/ServiceManagerBridge.java
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import json import logging from rollbar.logger import RollbarHandler from django.conf import settings def json_from_request(request): body = request.body if body: re...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import vcf import os import sys import pysam import argparse def fetchregions(infn, outfn, invcf, window=1000): inbam = pysam.Samfile(infn, 'rb') outbam = pysam.Samfile(outfn, 'wb', template=inbam) vcfh = vcf.Reader(filename=invcf) for rec in vcfh: start = rec.POS - wi...
unknown
codeparrot/codeparrot-clean
# Copyright 2013-2014 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
unknown
codeparrot/codeparrot-clean
/* Package gin implements a HTTP web framework called gin. See https://gin-gonic.com/ for more information about gin. Example: package main import "github.com/gin-gonic/gin" func main() { r := gin.Default() r.GET("/ping", func(c *gin.Context) { c.JSON(200, gin.H{ "message": "pong", }) }) r.Run...
go
github
https://github.com/gin-gonic/gin
doc.go
import ConfigParser from django.conf import settings import logging log = logging.getLogger(__name__) # Open and parse the configuration file when the module is initialized config_file = open(settings.REPO_ROOT / "docs" / "config.ini") config = ConfigParser.ConfigParser() config.readfp(config_file) def doc_url(reque...
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
// run // Copyright 2013 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. // Test that defers do not prevent garbage collection. package main import ( "runtime" "sync" "sync/atomic" "time" ) var sink func() func main()...
go
github
https://github.com/golang/go
test/deferfin.go
# -*- coding: utf-8 -*- '''Helper utilities and decorators.''' from flask import session, flash, redirect, url_for, Response, request from flask.ext.login import current_user from functools import wraps def flash_errors(form): '''Flash all errors for a form.''' for field, errors in form.errors.items(): ...
unknown
codeparrot/codeparrot-clean
#!%PYTHON_BANGPATH% # pypad_live365.py # # Write PAD updates to Live365 stations # # (C) Copyright 2018-2019 Fred Gleason <fredg@paravelsystems.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Fr...
unknown
codeparrot/codeparrot-clean
(dynamic_shapes_advanced_control_options)= # Advanced Options to Control Dynamic Behavior PyTorch provides several advanced options to control dynamic behavior. These options requires a deep understanding of the PyTorch internals and may inlvolve setting additional tools. These options include: * Profile-Guided Optim...
unknown
github
https://github.com/pytorch/pytorch
docs/source/user_guide/torch_compiler/compile/dynamic_shapes_advanced_control_options.md