code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
unknown
codeparrot/codeparrot-clean
name: inductor-perf-nightly-h100 on: schedule: - cron: 15 0 * * 1-6 - cron: 0 7 * * 0 workflow_dispatch: inputs: training: description: Run training (on by default)? required: false type: boolean default: true inference: description: Run inference (on...
unknown
github
https://github.com/pytorch/pytorch
.github/workflows/inductor-perf-test-nightly-h100.yml
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package pgpkeys import ( "bytes" "encoding/base64" "errors" "fmt" "os" "strings" "github.com/ProtonMail/go-crypto/openpgp" ) // PubKeyFileFlag implements flag.Value and command.Example to receive exactly // one PGP or keybase key via a fl...
go
github
https://github.com/hashicorp/vault
helper/pgpkeys/flag.go
from testbase import * import pgasync from twisted.internet.defer import waitForDeferred as waitD, deferredGenerator class TestNone(TestCase): schema = 'id int, nil varchar(1)' @deferredGenerator def testnull(self): id = getId() i = None yield waitD(self.pool.runOperation( 'insert into t_tbl VALUES(%d, %s...
unknown
codeparrot/codeparrot-clean
name: "PHPStan" on: push: paths-ignore: - 'doc/**' pull_request: paths-ignore: - 'doc/**' env: COMPOSER_FLAGS: "--ansi --no-interaction --prefer-dist" SYMFONY_PHPUNIT_VERSION: "" permissions: contents: read jobs: tests: name: "PHPStan" runs-on: ubuntu-latest continue-on-...
unknown
github
https://github.com/composer/composer
.github/workflows/phpstan.yml
/* * Copyright (C) 2007 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/collect/AbstractSetMultimap.java
from __future__ import print_function from optparse import OptionParser import sys import time import numpy as np import theano import theano.tensor as T from six.moves import xrange parser = OptionParser(usage='%prog <options>\n Compute time for' ' fast and slow elemwise operations') parser.ad...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from __future__ import print_function, division, absolute_import import json import os from bokeh.io import curdoc from bokeh.layouts import column, row from toolz import valmap from tornado import gen from distributed.core import rpc from distributed.bokeh.worker_monitor import (worker_table...
unknown
codeparrot/codeparrot-clean
package httputils import ( "encoding/json" "io" "github.com/moby/moby/api/types" ) const rs = 0x1E type EncoderFn func(any) error // NewJSONStreamEncoder builds adequate EncoderFn to write json records using selected content-type formalism func NewJSONStreamEncoder(w io.Writer, contentType string) EncoderFn { ...
go
github
https://github.com/moby/moby
daemon/server/httputils/json-seq.go
# SPDX-License-Identifier: GPL-2.0 %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/fsl,plldig.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: NXP QorIQ Layerscape LS1028A Display PIXEL Clock maintainers: - Wen He <wen.he_1@nxp.com> description: | NXP LS1028A has a clock domain PXLCLK0 ...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/fsl,plldig.yaml
# example.js ```javascript _{{example.js}}_ ``` # routes/a.js ```javascript _{{routes/a.js}}_ ``` # routes/b.js ```javascript _{{routes/b.js}}_ ``` # code.js ```javascript _{{code.js}}_ ``` # webpack.config.js ```javascript _{{webpack.config.js}}_ ``` # dist/output.js ```javascript _{{dist/output.js}}_ ``` ...
unknown
github
https://github.com/webpack/webpack
examples/virtual-modules/template.md
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from examples/modular-transformers/modular_roberta.py. # Do NOT edit this file manually as any edits will be overwritten by the generation of ...
python
github
https://github.com/huggingface/transformers
examples/modular-transformers/modeling_roberta.py
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ApplicationClassLoader.java
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-13 15:20 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dcim', '0018_device_add_asset_tag'), ] operations = [ migrations.AlterField( ...
unknown
codeparrot/codeparrot-clean
""" Unified expression helpers. """ def evaluate(pycode, locals): return eval(pycode, {}, locals) class ExpressionLocals(dict): """ An object to act as the locals dictionary for the evaluation of envi expressions. You may pass in an envi.resolver.SymbolResolver object to automagically use symbols...
unknown
codeparrot/codeparrot-clean
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Networking/Responses/EvolvePokemonResponse.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message fr...
unknown
codeparrot/codeparrot-clean
@use 'sass:math'; @use '@angular/docs/styles/media-queries' as mq; /* * Global transition. * * Scrolling via mouse scroll wheel will result in a non-continuous scrollY, * unlike a touchpad, which in turn results in "gaps" in the animation calculations. * Therefore, in order to keep things smooth, we are systemati...
unknown
github
https://github.com/angular/angular
adev/src/app/features/home/components/home-animation/home-animation.component.scss
# -*- test-case-name: twisted.web.test.test_xml -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Micro Document Object Model: a partial DOM implementation with SUX. This is an implementation of what we consider to be the useful subset of the DOM. The chief advantage of this library is ...
unknown
codeparrot/codeparrot-clean
# 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 logging import sys import re from lib.subcommand import SubCommand LOGGER = logging.getLogger('dmprof') class AddrCommand(SubCommand): def __init...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, unicode_literals from django.db import models from django.utils.html import format_html from django.utils.translation import ugettext_lazy as _ from django.utils import version from error_report.settings import ERROR_DETAIL_SETTINGS if version.get_complete_version() < (1, 10)...
unknown
codeparrot/codeparrot-clean
name: Google Internal Tests Enforcement on: pull_request_target: types: [opened, reopened, synchronize] permissions: {} jobs: trigger: permissions: pull-requests: read statuses: write runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd...
unknown
github
https://github.com/angular/angular
.github/workflows/google-internal-tests.yml
/* * Copyright (C) 2008 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/base/CharMatcherTest.java
import nose import testvibe class BasicTestSuite(testvibe.Testsuite): def test_equal(self, v1, v2): self.assert_equal(v1, v2) def test_equal_alias_1(self, v1, v2): self.assert_eq(v1, v2) # just a link to assert_equal def test_equal_alias_2(self, v1, v2): self.a_eq(v1, v2) # ju...
unknown
codeparrot/codeparrot-clean
from django.conf import settings from django.contrib.auth.models import User from django.test import TestCase from djaludir.core.models import Alumna, EXCLUDE_FIELDS from djtools.utils.logging import seperator import json class CoreAlumnaTestCase(TestCase): fixtures = ['alumna.json','user.json'] def setUp...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
unknown
codeparrot/codeparrot-clean
import os from twisted.trial import unittest from zope.interface.verify import verifyObject from scrapyd.interfaces import IEnvironment from scrapyd.config import Config from scrapyd.environ import Environment class EnvironmentTest(unittest.TestCase): def setUp(self): d = self.mktemp() os.mkdir...
unknown
codeparrot/codeparrot-clean
import re from collections import defaultdict from typing import Mapping, Iterable, Dict, TextIO, Union, NamedTuple from xml.etree import ElementTree from sqlalchemy.orm.exc import NoResultFound from models import InheritedMutation, Disease from models import ClinicalData, or_ from helpers.parsers import tsv_file_iter...
unknown
codeparrot/codeparrot-clean
/* Variables */ :root { --body-color: #fcfdfe; --checkout-color: #8f6ed5; --elements-color: #6772e5; --body-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --h1-color: #1a1f36; --h2-color: #7b818a; --h3-color: #a3acb9; --radius: 6px; --container-width-max: 1280px; ...
css
github
https://github.com/vercel/next.js
examples/with-stripe-typescript/styles.css
#!/usr/bin/env python # coding=utf-8 # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of c...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 Huawei Technologies Co.,LTD # 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 # # Unle...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp
# Copyright 2015 Hewlett-Packard Development Company, L.P. # 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...
unknown
codeparrot/codeparrot-clean
# Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. """A fast, lightweight IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and networks. """ from __future__ import unicode_literals import itertools import struct __version_...
unknown
codeparrot/codeparrot-clean
// 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 #ifndef __IPP_HAL_CORE_HPP__ #define __IPP_HAL_CORE_HPP__ #include <opencv2/core/base.hpp> #include "ipp_utils.hpp" #if (IPP...
unknown
github
https://github.com/opencv/opencv
hal/ipp/include/ipp_hal_core.hpp
""" Helper functions and classes for discussion tests. """ from uuid import uuid4 import json from ...fixtures import LMS_BASE_URL from ...fixtures.course import CourseFixture from ...fixtures.discussion import ( SingleThreadViewFixture, Thread, Response, ) from ...pages.lms.discussion import DiscussionTa...
unknown
codeparrot/codeparrot-clean
from django.conf import settings from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.db import models from django.db.models import Sum, Count from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _, pge...
unknown
codeparrot/codeparrot-clean
# coding=UTF-8 # Author: Dennis Lutter <lad1337@gmail.com> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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 ver...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012 Timur Iskhodzhanov and MIPT students. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import math import operator import unittest import re class Token(object): def to_test_string(self): return str(self) clas...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2020 PaddlePaddle 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 appli...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 // Package pluginhelpers contains testhelpers that don't depend on package // vault, and thus can be used within vault (as well as elsewhere.) package pluginhelpers import ( "crypto/sha256" "fmt" "os" "os/exec" "path" "path/filepath" "strin...
go
github
https://github.com/hashicorp/vault
helper/testhelpers/pluginhelpers/pluginhelpers.go
/* contrib/dblink/dblink--1.0--1.1.sql */ -- complain if script is sourced in psql, rather than via ALTER EXTENSION \echo Use "ALTER EXTENSION dblink UPDATE TO '1.1'" to load this file. \quit CREATE FUNCTION dblink_fdw_validator( options text[], catalog oid ) RETURNS void AS 'MODULE_PATHNAME', 'dblink_fdw_val...
sql
github
https://github.com/postgres/postgres
contrib/dblink/dblink--1.0--1.1.sql
""" Entrez Gene """ GENEINFO_URLS = { 'Homo sapiens': 'ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/GENE_INFO/Mammalia/Homo_sapiens.gene_info.gz' } UNIPROT_URLS = { 'Homo sapiens': 'ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/' + \ 'knowledgebase/idmapping/by_organism/HUMAN_9606_idmappi...
unknown
codeparrot/codeparrot-clean
// // Code generated by grafana-app-sdk. DO NOT EDIT. // package v2beta1 import ( "fmt" "github.com/grafana/grafana-app-sdk/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "time" ) // +k8s:openap...
go
github
https://github.com/grafana/grafana
apps/dashboard/pkg/apis/dashboard/v2beta1/dashboard_object_gen.go
//===--- PerformanceInlinerUtils.h - Common performance inliner utils. ---===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
c
github
https://github.com/apple/swift
include/swift/SILOptimizer/Utils/PerformanceInlinerUtils.h
#!/usr/bin/python # # Urwid Text Layout classes # Copyright (C) 2004-2011 Ian Ward # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, o...
unknown
codeparrot/codeparrot-clean
/* contrib/hstore/hstore--1.1--1.2.sql */ -- complain if script is sourced in psql, rather than via ALTER EXTENSION \echo Use "ALTER EXTENSION hstore UPDATE TO '1.2'" to load this file. \quit -- A version of 1.1 was shipped with these objects mistakenly in 9.3.0. -- Therefore we only add them if we detect that they a...
sql
github
https://github.com/postgres/postgres
contrib/hstore/hstore--1.1--1.2.sql
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ *************************************************************************** r.external.all.py --------------------- Date : July 2009 Copyright : (C) 2009 by Lorenzo Masini Email : rugginoso at develer dot c...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # @author: Thomas Anderson ######################## # mod_encode_decode.py # ######################## # Thomas Anderson # ################### # 30/01/2014 # ################### # Last updated: # # 12/02/2014 # ################### ########################## # Python QR Code Project ...
unknown
codeparrot/codeparrot-clean
from TreeSerialize.TreeSerialize import deserialize, drawtree ''' Needs Python 3+ ''' class Solution_old(object): ''' Lowest Common Ancestor (LCA) in a Binary Tree (BT) : Takes additional space, not space optimized. ''' def findPath(self, root, path, k): ''' A Helper function to make...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (c) 2012 Thomas Parslow http://almostobsolete.net/ # Copyright (c) 2012 Robie Basak <robie@justgohome.co.uk> # # 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 Softw...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright 2016, The TPIE development team # # This file is part of TPIE. # # TPIE is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your #...
unknown
codeparrot/codeparrot-clean
import re from os.path import normpath, dirname, join, realpath from cookiemonster.common.models import Cookie from cookiemonster.processor.models import Rule from hgicommon.data_source import register from hgicookiemonster.context import HgiContext from hgicookiemonster.rules.not_cram_rule import NOT_CRAM_RULE_PRIORI...
unknown
codeparrot/codeparrot-clean
from kivy.factory import Factory from kivy.lang import Builder Builder.load_string(''' <QRDialog@Popup> id: popup title: '' data: '' shaded: False show_text: False AnchorLayout: anchor_x: 'center' BoxLayout: orientation: 'vertical' size_hint: 1, 1 ...
unknown
codeparrot/codeparrot-clean
#include "parts.h" #include "util.h" #include <stdbool.h> // Test PyModule_* API /* unittest Cases that use these functions are in: * Lib/test/test_capi/test_module.py */ static PyObject * module_from_slots_empty(PyObject *self, PyObject *spec) { PyModuleDef_Slot slots[] = { {0}, }; return PyMo...
c
github
https://github.com/python/cpython
Modules/_testcapi/module.c
"""Tests for HomematicIP Cloud weather.""" from homeassistant.components.homematicip_cloud import DOMAIN as HMIPC_DOMAIN from homeassistant.components.weather import ( ATTR_WEATHER_ATTRIBUTION, ATTR_WEATHER_HUMIDITY, ATTR_WEATHER_TEMPERATURE, ATTR_WEATHER_WIND_BEARING, ATTR_WEATHER_WIND_SPEED, D...
unknown
codeparrot/codeparrot-clean
# Copyright 2011 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
/* cpu_features.h -- CPU architecture feature check * Copyright (C) 2017 Hans Kristian Rosbach * For conditions of distribution and use, see copyright notice in zlib.h */ #ifndef CPU_FEATURES_H_ #define CPU_FEATURES_H_ #ifndef DISABLE_RUNTIME_CPU_DETECTION #if defined(X86_FEATURES) # include "arch/x86/x86_featur...
c
github
https://github.com/opencv/opencv
3rdparty/zlib-ng/cpu_features.h
#!/usr/bin/python3 # # Copyright (C) 2013 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # ...
unknown
codeparrot/codeparrot-clean
package cache import ( "context" "fmt" "reflect" "strings" "github.com/containerd/log" containertypes "github.com/moby/moby/api/types/container" "github.com/moby/moby/v2/daemon/builder" "github.com/moby/moby/v2/daemon/internal/image" "github.com/moby/moby/v2/daemon/internal/layer" ocispec "github.com/openco...
go
github
https://github.com/moby/moby
daemon/internal/image/cache/cache.go
// Copyright 2010 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 image import ( "image/color" "math/bits" "strconv" ) // A Point is an X, Y coordinate pair. The axes increase right and down. type Point struct { ...
go
github
https://github.com/golang/go
src/image/geom.go
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl import re try: from io import BytesIO except ImportError: from StringIO import StringIO as BytesIO headers = {} def header_function(header_line): # HTTP standard specifies that headers are encoded in iso-8859-1. # On Python 2, d...
unknown
codeparrot/codeparrot-clean
This error occurs because a value was dropped while it was still borrowed. Erroneous code example: ```compile_fail,E0597 struct Foo<'a> { x: Option<&'a u32>, } let mut x = Foo { x: None }; { let y = 0; x.x = Some(&y); // error: `y` does not live long enough } println!("{:?}", x.x); ``` Here, `y` is drop...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0597.md
""" DataSource is a wrapper for the OGR Data Source object, which provides an interface for reading vector geometry data from many different file formats (including ESRI shapefiles). When instantiating a DataSource object, use the filename of a GDAL-supported data source. For example, a SHP file or a TIGER/Line...
unknown
codeparrot/codeparrot-clean
import { type ComponentInternalInstance, DeprecationTypes, type Directive, type LegacyConfig, compatUtils, getCurrentInstance, } from '@vue/runtime-core' import { hyphenate, isArray } from '@vue/shared' const systemModifiers = ['ctrl', 'shift', 'alt', 'meta'] as const type SystemModifiers = (typeof systemM...
typescript
github
https://github.com/vuejs/core
packages/runtime-dom/src/directives/vOn.ts
from tests.integration.components.mutually_exclusive.schema_urls import MUTUALLY_EXCLUSIVE_UNIT from tests.integration.integration_test_case import IntegrationTestCase class TestUnitSingleCheckboxOverride(IntegrationTestCase): """ Tests to ensure that the server-side validation for mutually exclusive unit ...
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...
json
github
https://github.com/apache/kafka
clients/src/main/resources/common/message/UpdateRaftVoterRequest.json
# -*- encoding: utf-8 -*- """Test class for Sync Plan CLI :Requirement: Syncplan :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: CLI :TestType: Functional :CaseImportance: High :Upstream: No """ from datetime import datetime, timedelta from fauxfactory import gen_string from robottelo import m...
unknown
codeparrot/codeparrot-clean
# -*- coding: iso-8859-1 -*- # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. ''' This module consists of test cases where IronPython was broken under standard C...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url from django.contrib.auth import views as auth_views from django.contrib.auth.decorators import login_required from django.views.decorators.cache import cache_page from django.views.generic import TemplateView from . impor...
unknown
codeparrot/codeparrot-clean
# markdown is released under the BSD license # Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later) # Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b) # Copyright 2004 Manfred Stienstra (the original version) # # All rights reserved. # # Redistribution and use in source and binary forms, with or w...
unknown
codeparrot/codeparrot-clean
# alignObjectMethodScopes ## File `src/ReactiveScopes/AlignObjectMethodScopes.ts` ## Purpose Ensures that object method values and their enclosing object expressions share the same reactive scope. This is critical for code generation because JavaScript requires object method definitions to be inlined within their con...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/docs/passes/14-alignObjectMethodScopes.md
#!/usr/bin/env python # Copyright: (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # PYTHON_ARGCOMPLETE_OK from __future__ import annotations import json # ansible.cli needs to be i...
python
github
https://github.com/ansible/ansible
lib/ansible/cli/adhoc.py
# 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 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.descriptors.symbols.pointers import org.jetbrains.kotlin.analysis.a...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/pointers/KaFe10DescFunctionSymbolPointer.kt
annotation class MyAnno(val message: String) { annotation class List(vararg val value: MyAnno) } @MyAnno.List(<expr>MyAnno(message = )</expr>) fun foo() {}
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/testData/components/compileTimeConstantProvider/evaluate/withErrors/annotationWithNoArgument.kt
#!/usr/bin/python # -*- coding: utf-8 -*- # # __init__.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
# pylint: disable-msg=E1101,W0613,W0603 from itertools import islice import os import numpy as np import pandas._libs.json as json from pandas._libs.tslibs import iNaT from pandas.compat import StringIO, long, u, to_str from pandas import compat, isna from pandas import Series, DataFrame, to_datetime, MultiIndex from ...
unknown
codeparrot/codeparrot-clean
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from __future__ import print_function import os import re import sys import six import threading __author__ = 'Maurice Green' __purpose__ = 'System Cahce Hit Ratio' class Proc(threading.Thread): def __init__(self): threading.Thread.__init__(self) uname = os.uname() i...
unknown
codeparrot/codeparrot-clean
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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
// Copyright 2015 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. //go:build unix || js || wasip1 package net import "syscall" var ( testHookCanceledDial = func() {} // for golang.org/issue/16523 hostsFilePath = "/etc/ho...
go
github
https://github.com/golang/go
src/net/hook_unix.go
data = ( 's', # 0x00 't', # 0x01 'u', # 0x02 'v', # 0x03 'w', # 0x04 'x', # 0x05 'y', # 0x06 'z', # 0x07 'A', # 0x08 'B', # 0x09 'C', # 0x0a 'D', # 0x0b 'E', # 0x0c 'F', # 0x0d 'G', # 0x0e 'H', # 0x0f 'I', # 0x10 'J', # 0x11 'K', # 0x12 'L', # 0x13 'M', # 0...
unknown
codeparrot/codeparrot-clean
"""Generate an integration.""" from pathlib import Path from .model import Info TEMPLATE_DIR = Path(__file__).parent / "templates" TEMPLATE_INTEGRATION = TEMPLATE_DIR / "integration" TEMPLATE_TESTS = TEMPLATE_DIR / "tests" def generate(template: str, info: Info) -> None: """Generate a template.""" print(f"Sc...
unknown
codeparrot/codeparrot-clean
import mock from .... import base from pulp.devel import mock_plugins from pulp.plugins.config import PluginCallConfiguration from pulp.server.db import model from pulp.server.db.model.repository import RepoDistributor import pulp.server.exceptions as exceptions import pulp.server.managers.repo.distributor as distribu...
unknown
codeparrot/codeparrot-clean
from django.contrib.gis.db import models class NamedModel(models.Model): name = models.CharField(max_length=25) class Meta: abstract = True def __str__(self): return self.name class State(NamedModel): pass class County(NamedModel): state = models.ForeignKey(State, models.CASCADE...
unknown
codeparrot/codeparrot-clean
// This file was automatically generated from select-expression.md by Knit tool. Do not edit. package kotlinx.coroutines.guide.exampleSelect01 import kotlinx.coroutines.* import kotlinx.coroutines.channels.* import kotlinx.coroutines.selects.* fun CoroutineScope.fizz() = produce<String> { while (true) { // sends ...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/jvm/test/guide/example-select-01.kt
from functools import wraps from operator import attrgetter from django.db import connections, transaction, IntegrityError from django.db.models import signals, sql from django.utils.datastructures import SortedDict from django.utils import six class ProtectedError(IntegrityError): def __init__(self, msg, protect...
unknown
codeparrot/codeparrot-clean
import type { AST } from '#compiler'; export namespace _CSS { export interface BaseNode { start: number; end: number; } export interface StyleSheetBase extends BaseNode { children: Array<Atrule | Rule>; } export interface StyleSheetFile extends StyleSheetBase { type: 'StyleSheetFile'; } export interf...
typescript
github
https://github.com/sveltejs/svelte
packages/svelte/src/compiler/types/css.d.ts
'use strict'; const common = require('../common'); const { Readable, Writable } = require('stream'); const bench = common.createBenchmark(main, { n: [5e6], }); function main({ n }) { const b = {}; const r = new Readable({ objectMode: true }); const w = new Writable({ objectMode: true }); let i = 0; r._...
javascript
github
https://github.com/nodejs/node
benchmark/streams/pipe-object-mode.js
#!/usr/bin/python import tweepy, sys, os from collections import Counter import re import argparse # requires 2.7 import time class TweepyHelper: def __init__(self,keyfile): f = open(keyfile) lines = f.readlines() f.close() consumerkey = lines[0].split("#")[0] consumersecret...
unknown
codeparrot/codeparrot-clean
# Dashboard Schema Migration Guide This guide provides comprehensive instructions for creating new dashboard schema migrations in Grafana. ## Table of Contents - [Overview](#overview) - [Current Schema Versions](#current-schema-versions) - [Creating a New Migration](#creating-a-new-migration) - [Step 1: Create the...
unknown
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/schemaversion/README.md
/*! * @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 TUTORIALS_ASSETS_WEB_PATH = '/assets/tutorials'; export const TUTORIALS_ASSETS_SOURCE_CODE_DIRECTORY = ...
typescript
github
https://github.com/angular/angular
adev/src/app/editor/constants.ts
#!/usr/bin/env python import sys import os from subprocess import * if len(sys.argv) <= 1: print('Usage: {0} training_file [testing_file]'.format(sys.argv[0])) raise SystemExit # svm, grid, and gnuplot executable files is_win32 = (sys.platform == 'win32') if not is_win32: svmscale_exe = "/usr/local/bin/svm-scale...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: brython (http://brython.info) (like python3) # """ Module with interface for picking authors from authority base in NK's Aleph. """ # # Imports ===================================================================== import json from os.path import jo...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import from digits import utils from digits.utils import subclass from flask.ext.wtf import Form import wtforms from wtforms import validators @subclass class DatasetForm(Form): """ A form used to create an image g...
unknown
codeparrot/codeparrot-clean
#pragma once #include <c10/core/SafePyObject.h> #include <c10/macros/Export.h> #include <optional> namespace c10 { // Structure used to pack all the thread local boolean // flags used by autograd struct C10_API AutogradState { static AutogradState& get_tls_state(); static void set_tls_state(AutogradState state);...
c
github
https://github.com/pytorch/pytorch
c10/core/AutogradState.h
# frozen_string_literal: true # :markup: markdown module ActionText class AttachmentGallery include ActiveModel::Model TAG_NAME = "div" private_constant :TAG_NAME class << self def fragment_by_canonicalizing_attachment_galleries(content) fragment_by_replacing_attachment_gallery_nodes...
ruby
github
https://github.com/rails/rails
actiontext/lib/action_text/attachment_gallery.rb
"""Vendored from https://github.com/pypa/packaging/blob/main/packaging/version.py """ # Copyright (c) Donald Stufft and individual contributors. # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # ...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/externals/_packaging/version.py
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/common_runtime/rendezvous_util.h
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package command import ( "path/filepath" "testing" "github.com/hashicorp/cli" svchost "github.com/hashicorp/terraform-svchost" svcauth "github.com/hashicorp/terraform-svchost/auth" "github.com/hashicorp/terraform-svchost/disco" "github.com...
go
github
https://github.com/hashicorp/terraform
internal/command/logout_test.go