code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
from distutils.errors import DistutilsOptionError from unittest import TestLoader import sys from setuptools.extern import six from setuptools.extern.six.moves import map from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, ...
unknown
codeparrot/codeparrot-clean
from common import * from solution import * import copy import sys import datetime num_test = 110 true, false = True, False in_0 = [] in_org_0 = [] out = [] def test_ret(arr, answer_len): if len(arr) != answer_len: return False sum = 0 for i in range(len(arr)): sum += arr[i] return sum == 0 d...
unknown
codeparrot/codeparrot-clean
{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations \u0026 Alerts", "target": { ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/input/migrated_dev_dashboards/panel-canvas/v1beta1.canvas-connection-examples.v42.json
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/migrations/versions/0067_3_0_0_rename_is_active_to_is_stale_column_in_.py
# A simple program that resembles the falling of stars or snow on a screen # Coded in Python 2.7.10 with PyGame # by Brett Burley-Inners :: 11/7/2015 import pygame, time, random, sys pygame.init() # Default dimensions of the game window (px) test display_width = 320 display_height = 240 # Create a canvas to display...
unknown
codeparrot/codeparrot-clean
from __future__ import with_statement from docopt import (docopt, DocoptExit, DocoptLanguageError, Option, Argument, Command, OptionsShortcut, Required, Optional, Either, OneOrMore, parse_argv, parse_pattern, parse_section, parse_defaults, ...
unknown
codeparrot/codeparrot-clean
set -o errexit set -o verbose source "$(dirname $(realpath ${BASH_SOURCE[0]}))"/prelude.sh activate_venv [[ "${has_packages}" != "true" ]] && exit 0 if [[ -z "${packager_script+x}" ]]; then echo "Error: packager run when packager_script is not set, please remove the package task from this variant (or variant tas...
unknown
github
https://github.com/mongodb/mongo
evergreen/packager_crypt_py_run.sh
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Davide Corio # Copyright 2015 Agile Business Group <http://www.agilebg.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU A...
unknown
codeparrot/codeparrot-clean
import unittest import operator import sys import pickle from test import support class G: 'Sequence using __getitem__' def __init__(self, seqn): self.seqn = seqn def __getitem__(self, i): return self.seqn[i] class I: 'Sequence using iterator protocol' def __init__(self, seqn): ...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package terraform import ( "github.com/hashicorp/terraform/internal/dag" ) const rootNodeName = "root" // RootTransformer is a GraphTransformer that adds a root to the graph. type RootTransformer struct{} func (t *RootTransformer) Transform(g *...
go
github
https://github.com/hashicorp/terraform
internal/terraform/transform_root.go
# import the necessary packages import numpy as np import cv2 class CropPreprocessor: def __init__(self, width, height, horiz=True, inter=cv2.INTER_AREA): # store the target image width, height, whether or not # horizontal flips should be included, along with the # interpolation method used when resizing self...
unknown
codeparrot/codeparrot-clean
/* * This file was automatically generated. * DO NOT MODIFY BY HAND. * Run `yarn fix:special` to update */ "use strict";function r(e,{instancePath:t="",parentData:o,parentDataProperty:a,rootData:n=e}={}){if(!e||"object"!=typeof e||Array.isArray(e))return r.errors=[{params:{type:"object"}}],!1;{const t=0;for(const t...
javascript
github
https://github.com/webpack/webpack
schemas/plugins/css/CssGeneratorOptions.check.js
"""Fixer that addes parentheses where they are required This converts ``[x for x in 1, 2]`` to ``[x for x in (1, 2)]``.""" # By Taek Joo Kim and Benjamin Peterson # Local imports from .. import fixer_base from ..fixer_util import LParen, RParen # XXX This doesn't support nested for loops like [x for x in 1, 2 for x...
unknown
codeparrot/codeparrot-clean
# Create your views here. from jsonrpc import * from djangowanted.wanted.models import Item, Flag, FlagType, Page from django.template import loader from django.shortcuts import render_to_response from django.template import RequestContext, Template from django.http import HttpResponseRedirect, HttpResponse import url...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2013 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-tests/test/com/google/common/hash/HashFunctionEnum.java
/* Timer API example -- Register and handle timer events * * ----------------------------------------------------------------------------- * * Copyright (c) 2018-Present, Redis Ltd. * All rights reserved. * * Licensed under your choice of (a) the Redis Source Available License 2.0 * (RSALv2); or (b) the Server ...
c
github
https://github.com/redis/redis
src/modules/hellotimer.c
"""Provides OAuth authorization. Main components are: * OAuthClient - provides logic for 3-legged OAuth protocol, * OAuthDanceHandler - wrapper for OAuthClient for handling OAuth requests, * OAuthHandler - from this handler should inherit all other handlers that want to be authenticated and have access to Blog...
unknown
codeparrot/codeparrot-clean
// Copyright The Prometheus 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 w...
go
github
https://github.com/prometheus/prometheus
model/timestamp/timestamp.go
""" Component to interface with binary sensors. For more details about this component, please refer to the documentation at https://home-assistant.io/components/binary_sensor/ """ from datetime import timedelta import logging import voluptuous as vol from homeassistant.helpers.entity_component import EntityComponen...
unknown
codeparrot/codeparrot-clean
import re from collections import OrderedDict from lxml import etree import os from os.path import splitext from tsg.config import RAW_DIR import operator import logging def parse_link(doc_link): ''' Define a function which take a link and obtain the doc_filename string and the type of document: journal, c...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2003 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
""" neural network stuff, intended to be used with Lasagne """ import numpy as np import theano as th import theano.tensor as T import lasagne from lasagne.layers import dnn from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams # T.nnet.relu has some stability issues, this is better def relu(x): r...
unknown
codeparrot/codeparrot-clean
mod lang_tests_common; fn main() { lang_tests_common::main_inner(lang_tests_common::Profile::Debug); }
rust
github
https://github.com/rust-lang/rust
compiler/rustc_codegen_gcc/tests/lang_tests_debug.rs
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2011 Smartmode LTD (<http://www.smartmode.co.uk>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed i...
unknown
codeparrot/codeparrot-clean
"""Helper class for TLSConnection.""" from __future__ import generators from utils.compat import * from utils.cryptomath import * from utils.cipherfactory import createAES, createRC4, createTripleDES from utils.codec import * from errors import * from messages import * from mathtls import * from constants import * fro...
unknown
codeparrot/codeparrot-clean
#![warn(rust_2018_idioms)] #![cfg(all(feature = "full", not(target_os = "wasi"), not(miri)))] // Wasi doesn't support bind // No socket on `miri`. use std::io::Read; use std::io::Result; use tokio::io::{AsyncReadExt, AsyncWriteExt}; use tokio::net::Tcp...
rust
github
https://github.com/tokio-rs/tokio
tokio/tests/tcp_into_std.rs
{ "values": { "id": { "string": "F40F2AB4-100C-4AE8-BFD0-BF332A158415" }, "map": { "map": { "key_one": { "object": { "id": { "string": "3BFC1A84-023F-44FA-A8EE-EFD88E18B8F7" } } }, "key_three": { "objec...
json
github
https://github.com/hashicorp/terraform
testing/equivalence-tests/tests/replace_within_map/terraform.resource/F40F2AB4-100C-4AE8-BFD0-BF332A158415.json
class BaseDatabaseValidation: """Encapsulate backend-specific validation.""" def __init__(self, connection): self.connection = connection def __del__(self): del self.connection def check(self, **kwargs): return [] def check_field(self, field, **kwargs): errors = [...
python
github
https://github.com/django/django
django/db/backends/base/validation.py
from pyotp.otp import OTP import datetime import time import urllib class TOTP(OTP): def __init__(self, *args, **kwargs): """ @option options [Integer] interval (30) the time interval in seconds for OTP This defaults to 30 which is standard. """ self.interval = kwargs.po...
unknown
codeparrot/codeparrot-clean
DROP EXTENSION pg_stat_statements;
sql
github
https://github.com/postgres/postgres
contrib/pg_stat_statements/sql/cleanup.sql
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2019 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
unknown
codeparrot/codeparrot-clean
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2012-2013 Uwe Hermann <uwe@hermann-uwe.de> ## ## 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 2 of t...
unknown
codeparrot/codeparrot-clean
"""Utility for testing certificate display. This command will create a fake certificate for a user in a course. The certificate will display on the student's dashboard, but no PDF will be generated. Example usage: $ ./manage.py lms create_fake_cert test_user edX/DemoX/Demo_Course --mode honor --grade 0.89 """ ...
unknown
codeparrot/codeparrot-clean
import {arrayPush, mutate} from 'shared-runtime'; function useFoo({value}) { let items = null; try { // Mutable range of `items` begins here, but its reactive scope block // should be aligned to above the try-block items = []; arrayPush(items, value); } catch { // ignore } mutate(items); ...
typescript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/align-scopes-reactive-scope-overlaps-try.ts
# -*- coding: utf-8 -*- """ *************************************************************************** customwidgets.py --------------------- Date : May 2014 Copyright : (C) 2014 by Denis Rouzaud Email : denis.rouzaud@gmail.com ****************************...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Newspaper uses a lot of python-goose's extraction code. View their license here: https://github.com/codelucas/newspaper/blob/master/GOOSE-LICENSE.txt Keep all html page extraction code within this file. PLEASE abstract any lxml or soup parsing mechanisms in the parsers.py file! """ __title_...
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-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokSimpleValueProperties.java
// RUN: json_to_flatbuffer %p/test_schema.fbs %s | flatbuffer_translate --tflite-flatbuffer-to-mlir -o - | FileCheck %s // This test is to test that if the flatbuffer omits the last optional input `bias` of tfl.conv_2d op, the flatbuffer_importer will automatically adds `none` value to tfl.conv_2d. // CHECK: %[[CST:....
json
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/mlir/lite/tests/flatbuffer2mlir/optional_input.json
# Copyright 2010 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
/* Copyright 2017 - 2025 R. Thomas * Copyright 2017 - 2025 Quarkslab * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
unknown
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/PE/LoadConfigurations/DynamicRelocation/FunctionOverrideInfo.hpp
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context/src/test/java/org/springframework/jndi/JndiObjectFactoryBeanTests.java
from django.test import TestCase from models import GlobalRegion, Country, StateProvince, RegionDistrict, Locality from exceptions import IllegalMove, SameLevelMove, WrongLevelMove class MoveTest(TestCase): fixtures = ['testlocations.json'] def setUp(self): self.asia = GlobalRegion.objects.get(name='...
unknown
codeparrot/codeparrot-clean
import pytest import lcs.agents.acs as acs import lcs.agents.acs2 as acs2 from lcs.strategies.action_selection import EpsilonGreedy class TestEpsilonGreedy: @pytest.fixture def acs_cfg(self): return acs.Configuration( classifier_length=4, number_of_possible_actions=4, ...
unknown
codeparrot/codeparrot-clean
# Dependency Review Action # # This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked fr...
unknown
github
https://github.com/numpy/numpy
.github/workflows/dependency-review.yml
import traceback import model.downloadVotes # Completes the member-vote merge. def prepVotes(voteQuery, person): if not "errorMessage" in voteQuery and "rollcalls" in voteQuery: votes = voteQuery["rollcalls"] idSet = [v["id"] for v in votes] print idSet rollcallsFinal = model.downloadVotes.downloadAPI(idSet,"...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2016-2019 Uber Technologies, 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 a...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.delete_column('auth_user', 'last_name') def backwards(self, orm): ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-04-03 15:42 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='User', ...
unknown
codeparrot/codeparrot-clean
"""Client for ldap SYNOPSIS: ldap DESCRIPTION: > ldap connect <host> <login> <password> Connect to service > ldap list <dn> List node > ldap search <dn> <filter> Find node based on filter > ldap set List env var > ldap set <key> <val> Set env var EXAMPLE...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Dell Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/lice...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright 2020 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...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # This copy of shlex.py is distributed with argcomplete. # It incorporates changes proposed in http://bugs.python.org/issue1521950 and changes to allow it to match Unicode # word characters. """A lexical analyzer class for simple shell-like syntaxes.""" # Module and documentation by Eric S. R...
unknown
codeparrot/codeparrot-clean
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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 your option) an...
unknown
codeparrot/codeparrot-clean
import numbers import math import ply.lex as lex variables = {} usr_funcs = {} usr_basecases = {} debug = False argcounts = { "+": 2, "/": 2, "-": 2, "*": 2, "**": 2, ">>": 2, "<<": 2, "=": 2, "==": 2, ">=": 2, "<=": 2, ">": 2, "<": 2, "!=": 2, "if": 2, ...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package cache import ( "context" "fmt" gohttp "net/http" "sync" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-retryablehttp" "github.com/hashicorp/vault/api" "github.com/hashicorp/vault/helper/namespace" "github.com/hashicorp/...
go
github
https://github.com/hashicorp/vault
command/agentproxyshared/cache/api_proxy.go
# -*- Mode: Python; fill-column: 80 -*- # vi:si:et:sw=4:sts=4:ts=4 # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. # Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. # # This file may be distributed and/or modified under the terms of # the GNU L...
unknown
codeparrot/codeparrot-clean
/* 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/c/experimental/ops/gen/cpp/views/op_view.h
""" ========================================= Image denoising using dictionary learning ========================================= An example comparing the effect of reconstructing noisy fragments of a raccoon face image using firstly online :ref:`DictionaryLearning` and various transform methods. The dictionary is fi...
unknown
codeparrot/codeparrot-clean
# Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
python
github
https://github.com/huggingface/transformers
src/transformers/models/deprecated/__init__.py
from __future__ import unicode_literals import copy import inspect import warnings from itertools import chain from django.apps import apps from django.conf import settings from django.core import checks from django.core.exceptions import ( NON_FIELD_ERRORS, FieldDoesNotExist, FieldError, MultipleObjectsReturned,...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 Nicira, Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** # ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python __doc__ = '''art.py -- Approximate Randomization Test This script carries out a significance test on the output of an instance-based machine learner based on the theory of approximate randomization tests: Eric W. Noreen, Computer-intensive Methods for Testing Hypotheses: An Introduction, John Wi...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
unknown
codeparrot/codeparrot-clean
import asyncio import secrets import aiohttp import discord from lxml import html from .mech.utils import scramble ongoing_list = [] async def animechargame(cmd, message, args): if message.channel.id not in ongoing_list: try: ongoing_list.append(message.channel.id) mal_icon = 'ht...
unknown
codeparrot/codeparrot-clean
# Opus/UrbanSim urban simulation software. # Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington # See opus_core/LICENSE import os import re import xml.etree.cElementTree as ET from numpy import array, dtype, empty from opus_core.opus_error import OpusError from opus_core.s...
unknown
codeparrot/codeparrot-clean
# For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. # # ******** NOTE ******** # We have attempted to detect the languages in your ...
unknown
github
https://github.com/expressjs/express
.github/workflows/codeql.yml
#!/usr/bin/env python # # (c) 2017 Apstra Inc, <community@apstra.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 your...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.fir.test.cases.generated.cases.components.expressionTypeProvider; i...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/expressionTypeProvider/FirIdeDependentAnalysisScriptSourceModuleHLExpressionTypeTestGenerated.java
# frozen_string_literal: true require "action_view/rendering" require "active_support/core_ext/module/redefine_method" module ActionView # = Action View \Layouts # # Layouts reverse the common pattern of including shared headers and footers in many templates to isolate changes in # repeated setups. The inclus...
ruby
github
https://github.com/rails/rails
actionview/lib/action_view/layouts.rb
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/qcom,spmi-clkdiv.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm SPMI PMIC clock divider maintainers: - Bjorn Andersson <andersson@kernel.org> - Stephen Boyd <sboyd@kernel....
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/qcom,spmi-clkdiv.yaml
from concurrent.futures import Future from unittest import mock from taiga_ncurses.ui import signals, views from taiga_ncurses import controllers from taiga_ncurses.config import settings from taiga_ncurses.executor import Executor from taiga_ncurses.core import StateMachine from tests import factories def test_back...
unknown
codeparrot/codeparrot-clean
"""Create a plot of SMOS data for either 0 or 12z""" import sys import datetime import numpy as np from pandas.io.sql import read_sql from pyiem.plot import get_cmap from pyiem.plot.geoplot import MapPlot from pyiem.util import get_dbconn, logger, utc LOG = logger() def makeplot(ts, routes="ac"): """ Generat...
unknown
codeparrot/codeparrot-clean
--- - hosts: testhost gather_facts: False vars: data: - one - two tasks: - debug: msg: '{{ lookup("list", data) }}' - debug: msg: '{{ item }}' with_list: '{{ data }}'
unknown
github
https://github.com/ansible/ansible
test/integration/targets/plugin_filtering/lookup.yml
#!/usr/bin/python # coding=utf-8 from __future__ import print_function from subprocess import check_output, call import urllib2 import json import sys if __name__ == '__main__': """Run a bunch of boilerplate commands to sync your local clone to its parent github repo. """ print("Starting sync...",...
unknown
codeparrot/codeparrot-clean
#ifndef NPY_SIMD #error "Not a standalone header" #endif #ifndef _NPY_SIMD_SSE_OPERATORS_H #define _NPY_SIMD_SSE_OPERATORS_H /*************************** * Shifting ***************************/ // left #define npyv_shl_u16(A, C) _mm_sll_epi16(A, _mm_cvtsi32_si128(C)) #define npyv_shl_s16(A, C) _mm_sll_epi16(A,...
c
github
https://github.com/numpy/numpy
numpy/_core/src/common/simd/sse/operators.h
#!/usr/bin/env python # # Copyright (C) 2015 GNS3 Technologies Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
unknown
codeparrot/codeparrot-clean
import mock import unittest from django.db import models from django.test import TestCase from django_filters.exceptions import FieldLookupError from django_filters.filters import ( BaseInFilter, BaseRangeFilter, BooleanFilter, CharFilter, ChoiceFilter, DateRangeFilter, Filter, FilterM...
unknown
codeparrot/codeparrot-clean
"""Tests for distutils.command.config.""" import unittest import os import sys from test.test_support import run_unittest from distutils.command.config import dump_file, config from distutils.tests import support from distutils import log class ConfigTestCase(support.LoggingSilencer, support.Temp...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package api import ( "context" "net/http" ) // TokenAuth is used to perform token backend operations on Vault type TokenAuth struct { c *Client } // Token is used to return the client for token-backend API calls func (a *Auth) Token() *TokenAu...
go
github
https://github.com/hashicorp/vault
api/auth_token.go
// Copyright 2016 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
server/etcdserver/api/v3compactor/doc.go
/* * Copyright (C) 2009 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-tests/test/com/google/common/collect/TableCollectorsTest.java
#!/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. import base64 import os import sys import re from optparse import OptionParser """Extracts the list of resident symbols of a librar...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2005 Martin v. Löwis # Licensed to PSF under a Contributor Agreement. from _msi import * import os, string, re, sys AMD64 = "AMD64" in sys.version Itanium = "Itanium" in sys.version Win64 = AMD64 or Itanium # Partially taken from Wine datasizemask= 0x00ff type_valid= 0x0100 type_localizabl...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package plans import ( "fmt" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/genconfig" "github.com/hashicorp/terraform/internal/lang/marks" "github.com/hashicorp/terr...
go
github
https://github.com/hashicorp/terraform
internal/plans/changes.go
# Copyright (C) 2009-2010 Aren Olson # # 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 2, or (at your option) # any later version. # # This program is distributed in the hope that...
unknown
codeparrot/codeparrot-clean
"""Access Ansible Core CI remote services.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import tempfile import time from .util import ( SubprocessError, ApplicationError, cmd_quote, display, ANSIBLE_TEST_DATA_ROOT, ) from .util_common import...
unknown
codeparrot/codeparrot-clean
/** @import { BlockStatement, ExpressionStatement } from 'estree' */ /** @import { AST } from '#compiler' */ /** @import { ComponentContext } from '../types' */ /** * @param {AST.SvelteFragment} node * @param {ComponentContext} context */ export function SvelteFragment(node, context) { for (const attribute of node...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/compiler/phases/3-transform/client/visitors/SvelteFragment.js
{ "resource": { "test_object": { "a": { "count": 1, "test_string": "new" }, "b": { "count": 1, "lifecycle": { "replace_triggered_by": [ {"test_object.a[count.index].test_string":"nope"} ] } } } } }
json
github
https://github.com/hashicorp/terraform
internal/configs/testdata/invalid-files/resource-rtb.tf.json
#!/usr/bin/env python # -*- coding: utf-8 -*- """ tests/trigger_acceptance_test.py - Acceptance test suite that verifies trigger functionality in very brief """ from trigger.netdevices import NetDevices netdevices = NetDevices(with_acls=False) nd=NetDevices(with_acls=False) print nd.values() __author__ = 'Murat Ezbid...
unknown
codeparrot/codeparrot-clean
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: doh-insecure Help: Allow insecure DoH server connections Added: 7.76.0 Category: dns tls Protocols: DNS Multi: boolean See-also: - doh-url - insecure - proxy-insecure Example: - --doh-insecure --doh-url https://do...
unknown
github
https://github.com/curl/curl
docs/cmdline-opts/doh-insecure.md
""" Tests stringify functions used in xmodule html """ from nose.tools import assert_equals # pylint: disable=no-name-in-module from lxml import etree from xmodule.stringify import stringify_children def test_stringify(): text = 'Hi <div x="foo">there <span>Bruce</span><b>!</b></div>' html = '''<html a="b" fo...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright 2020 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...
unknown
codeparrot/codeparrot-clean
############################################################################### ## ## Copyright (C) 2014, Tavendo GmbH and/or collaborators. All rights reserved. ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are met: ## ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ Copyright 2015 Reverb Technologies, 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 require...
unknown
codeparrot/codeparrot-clean
#include "test/jemalloc_test.h" #include "jemalloc/internal/sec.h" typedef struct pai_test_allocator_s pai_test_allocator_t; struct pai_test_allocator_s { pai_t pai; bool alloc_fail; size_t alloc_count; size_t alloc_batch_count; size_t dalloc_count; size_t dalloc_batch_count; /* * We use a simple bump alloca...
c
github
https://github.com/redis/redis
deps/jemalloc/test/unit/sec.c
/* * Copyright (C) 2010 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-tests/test/com/google/common/util/concurrent/AtomicsTest.java
- name: Install all collections in a repo, one of which has a recursive dependency command: 'ansible-galaxy collection install git+file://{{ scm_path }}/namespace_1/.git' register: command - assert: that: - command.stdout_lines | length == 12 - >- 'Starting galaxy collection install process...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/ansible-galaxy-collection-scm/tasks/scm_dependency_deduplication.yml