code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
from subprocess import call, PIPE, Popen import sys import re import numpy as np from numpy.linalg import lapack_lite from numpy.testing import TestCase, dec from numpy.compat import asbytes_nested class FindDependenciesLdd: def __init__(self): self.cmd = ['ldd'] try: st = call(self....
unknown
codeparrot/codeparrot-clean
//! Common header names not defined in [`http`]. //! //! Any headers added to this file will need to be re-exported from the list at `crate::headers`. use http::header::HeaderName; /// Response header field that indicates how caches have handled that response and its corresponding /// request. /// /// See [RFC 9211](...
rust
github
https://github.com/actix/actix-web
actix-http/src/header/common.rs
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ('catalogue', '0001_initial'), ('order', '0001_initial'), ) def forwards(self, orm): # Adding model 'Conditi...
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
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package stackmigrate import ( "fmt" "iter" "github.com/hashicorp/go-slug/sourceaddrs" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/providers" "gi...
go
github
https://github.com/hashicorp/terraform
internal/stacks/stackmigrate/migrate.go
from kol.request.GenericRequest import GenericRequest from kol.manager import PatternManager FURNITURE = { '1':{ '0':'A Nail in the Wall', '1':'Girls of Loathing Calendar', '2':'Boys of Loathing Calendar', '3':'An Infuriating Painting', '4':'An Exotic Hanging Meat Orchid' ...
unknown
codeparrot/codeparrot-clean
import gevent import re from gevent import queue from wal_e import exception from wal_e import log_help from wal_e import storage logger = log_help.WalELogger(__name__) generic_weird_key_hint_message = ('This means an unexpected key was found in ' 'a WAL-E prefix. It can be harmles...
unknown
codeparrot/codeparrot-clean
# (c) 2018 Red Hat, Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type import sys import copy from units.compat import unittest from units.compat.mock import patch, MagicMock, Mock fro...
unknown
codeparrot/codeparrot-clean
#include <gtest/gtest.h> #include <c10/cuda/impl/CUDATest.h> using namespace c10::cuda::impl; TEST(CUDATest, SmokeTest) { c10_cuda_test(); }
cpp
github
https://github.com/pytorch/pytorch
c10/cuda/test/impl/CUDATest.cpp
#!/usr/bin/python # Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, 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: # 1. Redistributions of source code must retain the above copyright n...
unknown
codeparrot/codeparrot-clean
""" Obfuscated, pure C windows/meterpreter/reverse_tcp Implements various randomized string processing functions in an attempt to obfuscate the call tree. Inspiration from https://github.com/rsmudge/metasploit-loader Module built by @harmj0y """ import random from modules.common import helpers class Payload: ...
unknown
codeparrot/codeparrot-clean
""" Read and write ZIP files. """ import struct, os, time, sys, shutil import binascii, cStringIO, stat import io import re try: import zlib # We may need its compression method crc32 = zlib.crc32 except ImportError: zlib = None crc32 = binascii.crc32 __all__ = ["BadZipfile", "error", "ZIP_STORED", "Z...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 """ Initialization module for python-pptx """ __version__ = '0.5.7' import pptx.exc as exceptions import sys sys.modules['pptx.exceptions'] = exceptions del sys from pptx.api import Presentation # noqa from pptx.opc.constants import CONTENT_TYPE as CT from pptx.opc.package import PartFactory fro...
unknown
codeparrot/codeparrot-clean
# Copyright 2019 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 .composition_parts import Identifier from .composition_parts import WithIdentifier class IRMap(object): """ Manages an identifier-IR map, where...
unknown
codeparrot/codeparrot-clean
"""Output classes. Used to represent the output of a language model call and the output of a chat. The top container for information is the `LLMResult` object. `LLMResult` is used by both chat models and LLMs. This object contains the output of the language model and any additional information that the model provider...
python
github
https://github.com/langchain-ai/langchain
libs/core/langchain_core/outputs/__init__.py
#!/usr/bin/env python # Copyright 2012 Cloudera 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 ag...
unknown
codeparrot/codeparrot-clean
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
cmd/kubeadm/app/phases/addons/proxy/proxy_test.go
# ============================================================================== # Copyright (C) 2011 Diego Duclos # Copyright (C) 2011-2018 Anton Vorobyov # # This file is part of Eos. # # Eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as publi...
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
# -*- coding: utf-8 -*- # Copyright (C) 2009-2011 CREA Lab, CNRS/Ecole Polytechnique UMR 7656 (Fr) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (a...
unknown
codeparrot/codeparrot-clean
import os import unittest from .. import git_util class TestGitUtilRemotes(unittest.TestCase): def test_get_remote_branch_list(self): # function under test result_set = set(git_util.get_remote_branch_list()) # sample file in the test script folder filename = os.path.join(os.path.sp...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Cloudbase Solutions Srl # All Rights Reserved. # Licensed under the AGPLv3, see LICENCE file for details. import functools import logging import os import psutil import random import re import subprocess import tempfile import time from dns import resolver import requests from six.moves.urllib import...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
# 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
/* * 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/security/authenticator/LoginManager.java
/* * 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/errors/WakeupException.java
#!/usr/bin/env python # Copyright (c) 2014 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 ...
unknown
codeparrot/codeparrot-clean
#pragma once #include <ATen/core/Tensor.h> namespace at::native::mps { void _fused_adamw_amsgrad_mps_impl_( TensorList params, TensorList grads, TensorList exp_avgs, TensorList exp_avg_sqs, TensorList max_exp_avg_sqs, TensorList state_steps, const double lr, const double beta1, con...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/mps/operations/FusedAdamWAmsgradKernelImpl.h
import { codeFixAll, createCodeFixAction, registerCodeFix, } from "../_namespaces/ts.codefix.js"; import { Diagnostics, getTokenAtPosition, isIdentifier, Node, SourceFile, SyntaxKind, textChanges, tryAddToSet, } from "../_namespaces/ts.js"; const fixId = "addMissingDeclarePr...
typescript
github
https://github.com/microsoft/TypeScript
src/services/codefixes/addMissingDeclareProperty.ts
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, int_or_none, ) class EaglePlatformIE(InfoExtractor): _VALID_URL = r'''(?x) (?: eagleplatform:(?P<custom_host>[^/]+):| ...
unknown
codeparrot/codeparrot-clean
import gettext import os import re from datetime import datetime, timedelta from importlib import import_module import pytz from django import forms from django.conf import settings from django.contrib import admin from django.contrib.admin import widgets from django.contrib.admin.tests import AdminSeleniumTestCase f...
unknown
codeparrot/codeparrot-clean
/* Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/controlplane/controller/apiserverleasegc/gc_controller_test.go
# coding=utf-8 """ .NET (CLR) specific functions """ __author__ = 'Ilya.Kazakevich' def get_namespace_by_name(object_name): """ Gets namespace for full object name. Sometimes last element of name is module while it may be class. For System.Console returns System, for System.Web returns System.Web. Be s...
unknown
codeparrot/codeparrot-clean
import httplib import logging import json from threading import Thread logger = logging.getLogger(__name__) class ControllerAdapter: def __init__(self,core,parm): """ ControllerAdapter init""" self.controllerIP = "localhost" self.controllerPort = "8080" self.timerInterval = 5 self.switches=[] self.links=[...
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
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2007-2008 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware imp...
unknown
codeparrot/codeparrot-clean
## Input ```javascript function Component(props) { const a = [props.a]; let x = props.b; switch (a) { case true: { x = props.c; } } return x; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: ['TodoAdd'], isComponent: 'TodoAdd', }; ``` ## Code ```javascript function Compone...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/escape-analysis-not-switch-test.expect.md
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2016, 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
import time from datetime import timedelta class Metrics(object): def __init__(self, bot): self.bot = bot self.start_time = time.time() self.dust = {'start': None, 'latest': None} self.xp = {'start': None, 'latest': None} self.distance = {'start': None, 'latest': None} ...
unknown
codeparrot/codeparrot-clean
from unittest import TestCase from jsonschema import ValidationError from redash.utils.configuration import ConfigurationContainer configuration_schema = { "type": "object", "properties": { "a": { "type": "integer" }, "e": { "type": "integer" }, ...
unknown
codeparrot/codeparrot-clean
"""Implementation of JSONDecoder """ import re import sys import struct from simplejson.scanner import make_scanner def _import_c_scanstring(): try: from simplejson._speedups import scanstring return scanstring except ImportError: return None c_scanstring = _import_c_scanstring() __all...
unknown
codeparrot/codeparrot-clean
test_kind: js_test selector: roots: - jstests/sharding/query/change_streams/*.js exclude_files: # Test is testing behavior specific to change streams v1. - jstests/sharding/query/change_streams/change_streams_establishment_finds_new_shards.js # Test removes primary shard after some documents were i...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/suites/sharding_change_streams_v2_ignore_removed_shards.yml
#ifndef SRC_NODE_BLOB_H_ #define SRC_NODE_BLOB_H_ #include "v8-function-callback.h" #include "v8-template.h" #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include "async_wrap.h" #include "base_object.h" #include "dataqueue/queue.h" #include "env.h" #include "memory_tracker.h" #include "node_internals.h" #i...
c
github
https://github.com/nodejs/node
src/node_blob.h
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/lifecycle/ServiceNotReadyExceptionTests.java
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 // Code generated by ./generator. DO NOT EDIT. package dynrpcserver import ( "context" "sync" packages "github.com/hashicorp/terraform/internal/rpcapi/terraform1/packages" ) type Packages struct { impl packages.PackagesServer mu sync.RWMut...
go
github
https://github.com/hashicorp/terraform
internal/rpcapi/dynrpcserver/packages.go
# ---------------------------------------------------------------------------- # Copyright 2015 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
unknown
codeparrot/codeparrot-clean
The quantized folder holds the implementation of the low-level quantized kernel. The kernels are registered in `torch::_ops` namespace, and operate on the quantized `at::Tensor` data type. You can learn more about the quantized tensors in the [quantized tensor API wiki](https://github.com/pytorch/pytorch/wiki/Introduci...
unknown
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/quantized/README.md
/* 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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/common_runtime/device.h
// Copyright 2016 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql import ( "context" "unsafe" "github.com/cockroachdb/cockroach/pkg/server/telemetry" "github.com/cockroachdb/cockroach/pkg/sql/appstatspb" "github.com/...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/prepared_stmt.go
/* Copyright 2018 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/grappler/graph_analyzer/subgraph.h
#include "test/jemalloc_test.h" #include "jemalloc/internal/ph.h" typedef struct node_s node_t; ph_structs(heap, node_t); struct node_s { #define NODE_MAGIC 0x9823af7e uint32_t magic; heap_link_t link; uint64_t key; }; static int node_cmp(const node_t *a, const node_t *b) { int ret; ret = (a->key > b->key) - ...
c
github
https://github.com/redis/redis
deps/jemalloc/test/unit/ph.c
/*! * @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 */ export const removeTrailingSlash = (url: string): string => { if (url.endsWith('/')) { return url.slice(0, -1)...
typescript
github
https://github.com/angular/angular
adev/shared-docs/utils/url.utils.ts
This directory should not be a package, but should share a name with an unrelated subpackage.
unknown
github
https://github.com/python/cpython
Lib/test/test_importlib/namespace_pkgs/foo/README.md
apiVersion: apps/v1 kind: Deployment metadata: name: nginx0-deployment labels: app: nginx0-deployment spec: replicas: 2 selector: matchLabels: app: nginx0 template: metadata: labels: app: nginx0 spec: containers: - name: nginx image: registry.k8s.io/ngin...
unknown
github
https://github.com/kubernetes/kubernetes
hack/testdata/recursive/deployment/nginx.yaml
# Copyright (c) 2013 OpenStack Foundation # 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 la...
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines.debug.internal import android.annotation.* import org.codehaus.mojo.animal_sniffer.* import sun.misc.* import java.lang.instrument.* import java.lang.instrument.ClassFileTransformer import java.security.* /* * This class is loaded if and only if kotlinx-coroutines-core was used as -javaage...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/jvm/src/debug/internal/AgentPremain.kt
# -*- coding: utf-8 -*- import functools import httplib as http import json import logging import time from urllib2 import unquote import bleach from flask import request from modularodm import Q from framework.auth.decorators import collect_auth from framework.auth.decorators import must_be_logged_in from framework...
unknown
codeparrot/codeparrot-clean
import { getPreviewPostBySlug } from "../../lib/api"; export default async function handler(req, res) { // Check the secret and next parameters // This secret should only be known to this API route and the CMS if ( req.query.secret !== process.env.PREPRIO_PREVIEW_SECRET || !req.query.slug ) { retu...
javascript
github
https://github.com/vercel/next.js
examples/cms-prepr/pages/api/preview.js
# 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
/* MIT License * * Copyright (c) 2023 Brad House * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, ...
c
github
https://github.com/nodejs/node
deps/cares/src/lib/dsa/ares_slist.h
//===--- DependencyChecking.cpp -------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2021 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE....
cpp
github
https://github.com/apple/swift
lib/IDETool/DependencyChecking.cpp
/* * 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
framework-docs/src/main/java/org/springframework/docs/web/webmvc/mvccontroller/mvcannexceptionhandlermedia/MediaTypeController.java
/* Copyright 2025 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/kubelet/kubelet_nodecache.go
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.chat_models.litellm import ( ChatLiteLLM, ChatLiteLLMException, ) # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raisi...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/chat_models/litellm.py
/* s390_functions.h -- s390 implementations for arch-specific functions. * For conditions of distribution and use, see copyright notice in zlib.h */ #ifndef S390_FUNCTIONS_H_ #define S390_FUNCTIONS_H_ #ifdef S390_CRC32_VX uint32_t crc32_s390_vx(uint32_t crc, const uint8_t *buf, size_t len); #endif #ifdef DISABLE_R...
c
github
https://github.com/opencv/opencv
3rdparty/zlib-ng/arch/s390/s390_functions.h
#!/usr/bin/python """ Copyright 2013 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Test imagediffdb.py """ # System-level imports import logging import shutil import tempfile import unittest # Local imports import imagediffdb IMG_URL_BASE = ('http://...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # This file is part of Responder, a network take-over set of tools # created and maintained by Laurent Gaffie. # email: laurent.gaffie@gmail.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 ...
unknown
codeparrot/codeparrot-clean
// Copyright 2022 The etcd 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 t...
go
github
https://github.com/etcd-io/etcd
client/pkg/testutil/before.go
<docs-decorative-header title="Tree"> </docs-decorative-header> <docs-pill-row> <docs-pill href="https://www.w3.org/WAI/ARIA/apg/patterns/treeview/" title="Tree ARIA pattern"/> <docs-pill href="/api/aria/tree/Tree" title="Tree API Reference"/> </docs-pill-row> ## Overview A tree displays hierarchical data where ...
unknown
github
https://github.com/angular/angular
adev/src/content/guide/aria/tree.md
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations DOCUMENTATION = """ name: lookup1 author: Ansible Core Team short_description: hello test lookup description: - Hello test lookup. options: {} """ EXAMPLES = """...
python
github
https://github.com/ansible/ansible
test/integration/targets/ansible-test-sanity-ansible-doc/ansible_collections/ns/col/plugins/lookup/lookup1.py
""" The :mod:`sklearn.decomposition` module includes matrix decomposition algorithms, including among others PCA, NMF or ICA. Most of the algorithms of this module can be regarded as dimensionality reduction techniques. """ from .nmf import NMF, non_negative_factorization from .pca import PCA, RandomizedPCA from .incr...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2015-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. from test_framework.test_framework import ComparisonTestFramework from test_framework.comptool import Tes...
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
configuration-metadata/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/ConfigurationMetadataItem.java
--- title: {@attach ...} tags: attachments --- Attachments are functions that run in an [effect]($effect) when an element is mounted to the DOM or when [state]($state) read inside the function updates. Optionally, they can return a function that is called before the attachment re-runs, or after the element is later r...
unknown
github
https://github.com/sveltejs/svelte
documentation/docs/03-template-syntax/09-@attach.md
#! /usr/bin/env python """Very simple test script for the SGI gl library extension module taken mostly from the documentation. Roger E. Masse """ import unittest from test.test_support import verbose, import_module import time gl = import_module('gl') GL = import_module('GL') glattrs = ['RGBcolor', 'RGBcursor'...
unknown
codeparrot/codeparrot-clean
import pylab import numpy from numpy import argwhere, zeros, hstack, append import matplotlib.patches from mpl_toolkits.axes_grid1 import make_axes_locatable import scipy.stats import matplotlib as mpl def fracs_inside_contours(x, y, contours): """ Calculate the fraction of points x,y inside each contour level...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 Josh Durgin # 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 a...
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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/src/pages/Asset/index.ts
import codecs import os import re import sys from setuptools import setup from setuptools import find_packages # Workaround for http://bugs.python.org/issue8876, see # http://bugs.python.org/issue8876#msg208792 # This can be removed when using Python 2.7.9 or later: # https://hg.python.org/cpython/raw-file/v2.7.9/Mis...
unknown
codeparrot/codeparrot-clean
import datetime import decimal import unicodedata from importlib import import_module from django.conf import settings from django.utils import dateformat, datetime_safe, numberformat, six from django.utils.encoding import force_str from django.utils.functional import lazy from django.utils.safestring import mark_safe...
unknown
codeparrot/codeparrot-clean
//! Functions dedicated to fact generation for the `-Zpolonius=legacy` datalog implementation. //! //! Will be removed in the future, once the in-tree `-Zpolonius=next` implementation reaches feature //! parity. use std::iter; use either::Either; use rustc_middle::mir::{Body, Local, LocalKind, Location, START_BLOCK};...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_borrowck/src/polonius/legacy/mod.rs
# -*- coding: utf-8 -*- """ Density Filter Tool Created on Thu May 11 11:03:05 2017 @author: cheny """ from arcpy import Parameter import arcpy from section_cpu import dens_filter_cpu from multiprocessing import cpu_count class DensFilterTool(object): def __init__(self): """Classify Tool""" self...
unknown
codeparrot/codeparrot-clean
- name: Ensure clean_facts is working properly hosts: facthost1 gather_facts: false tasks: - name: gather 'bad' facts action: bogus_facts - name: ensure that the 'bad' facts didn't pollute what they are not supposed to assert: that: - "'touch' not in discovered_interpreter...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/gathering_facts/test_prevent_injection.yml
"""HTML handling. Copyright 2003-2006 John J. Lee <jjl@pobox.com> This code is free software; you can redistribute it and/or modify it under the terms of the BSD or ZPL 2.1 licenses (see the file COPYING.txt included with the distribution). """ import codecs import copy import htmlentitydefs import re import _sgml...
unknown
codeparrot/codeparrot-clean
<?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 bar\lib; class AnotherService { public function deprecatedApi(bool ...
php
github
https://github.com/symfony/symfony
src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/fake_vendor/bar/lib/AnotherService.php
# 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
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Unl...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 The FATE 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/lic...
unknown
codeparrot/codeparrot-clean
module.exports = "utility2";
javascript
github
https://github.com/webpack/webpack
examples/common-chunk-and-vendor-chunk/utility2.js
/* Copyright 2019 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/host_runtime/tfrt_ops.h
/* Copyright (c) 2002, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including...
c
github
https://github.com/mysql/mysql-server
sql/sp.h
# This file is part of the Printrun suite. # # Printrun 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. # # Printrun is distributed in ...
unknown
codeparrot/codeparrot-clean
interface String { /** * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. * The padding is applied from the start (left) of the current string. * * @param maxLength The length of the resulting string once the current string has ...
typescript
github
https://github.com/microsoft/TypeScript
src/lib/es2017.string.d.ts
#!/usr/bin/env python3 # blocktools.py - utilities for manipulating blocks and transactions # Copyright (c) 2015-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. from .mininode import * from .script...
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
""" Test the scalar constructors, which also do type-coercion """ import pytest import numpy as np from numpy.testing import assert_almost_equal, assert_equal class TestFromString: def test_floating(self): # Ticket #640, floats from string fsingle = np.single('1.234') fdouble = np.double('...
python
github
https://github.com/numpy/numpy
numpy/_core/tests/test_scalar_ctors.py
# pylint: skip-file # flake8: noqa # pylint: disable=too-many-instance-attributes class OCClusterRole(OpenShiftCLI): ''' Class to manage clusterrole objects''' kind = 'clusterrole' def __init__(self, name, rules=None, kubeconfig=None, ver...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ''' parse a MAVLink protocol XML file and generate a python implementation Copyright Andrew Tridgell 2011 Released under GNU GPL version 3 or later ''' import sys, textwrap, os from . import mavparse, mavtemplate t = mavtemplate.MAVTemplate() def generate_preamble(outf, msgs, basename, args, x...
unknown
codeparrot/codeparrot-clean
import datetime import importlib import io import os import re import shutil import sys from pathlib import Path from unittest import mock from django.apps import apps from django.core.checks import Error, Tags, register from django.core.checks.registry import registry from django.core.management import CommandError, ...
python
github
https://github.com/django/django
tests/migrations/test_commands.py