code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#!/bin/sh # test_description='git web--browse basic tests This test checks that git web--browse can handle various valid URLs.' . ./test-lib.sh test_web_browse () { # browser=$1 url=$2 git web--browse --browser="$1" "$2" >actual && tr -d '\015' <actual >text && test_cmp expect text } test_expect_success \ 'UR...
unknown
github
https://github.com/git/git
t/t9901-git-web--browse.sh
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008-2013 Alistek Ltd (http://www.alistek.com) All Rights Reserved. # General contacts <info@alistek.com> # # WARNING: This program as such is intended to be used by professional #...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from __future__ import print_function import pygecko.lib.ZmqClass as zmq import pygecko.lib.Sound as Audio from pygecko.lib.TTS import TTS class SoundsServer(object): def __init__(self): self.tts = TTS() self.tts.setOptions('-v Karen') # this works on macOS and say self.audio = Audio() ...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 NTT DOCOMO, INC. # Copyright (c) 2011 University of Southern California / ISI # 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 obta...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-14 10:09 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lowfat', '0093_auto_20170310_1435'), ] operations = [ migrations.AlterField(...
unknown
codeparrot/codeparrot-clean
# Copyright 2017 Donour Sizemore # # This file is part of RacePi # # RacePi 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, version 2 # # RacePi is distributed in the hope that it will be useful, # but WITHOUT...
unknown
codeparrot/codeparrot-clean
''' Tests for fpformat module Nick Mathewson ''' from test.test_support import run_unittest, import_module import unittest fpformat = import_module('fpformat', deprecated=True) fix, sci, NotANumber = fpformat.fix, fpformat.sci, fpformat.NotANumber StringType = type('') # Test the old and obsolescent fpformat mo...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ''' Copyright (C) 2016 Turi All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' from __future__ import print_function from ..sys_util import get_config_file from ..sys_util import setup_environment_from_co...
unknown
codeparrot/codeparrot-clean
/* Listpack -- A lists of strings serialization format * https://github.com/antirez/listpack * * Copyright (c) 2017-Present, Redis Ltd. * All rights reserved. * * Licensed under your choice of (a) the Redis Source Available License 2.0 * (RSALv2); or (b) the Server Side Public License v1 (SSPLv1); or (c) the * ...
c
github
https://github.com/redis/redis
src/listpack_malloc.h
/* 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/etcd/local.go
import { render_effect, teardown } from '../../../reactivity/effects.js'; import { listen } from './shared.js'; /** * @param {'innerHTML' | 'textContent' | 'innerText'} property * @param {HTMLElement} element * @param {() => unknown} get * @param {(value: unknown) => void} set * @returns {void} */ export functio...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/internal/client/dom/elements/bindings/universal.js
#!/bin/sh # -*- mode: Python -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2....
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/errors/InvalidMetadataException.java
# 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. """Chromium presubmit script for src/net/websockets. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details on the pre...
unknown
codeparrot/codeparrot-clean
## Copyright 2009 Laurent Bovet <laurent.bovet@windmaster.ch> ## Jordi Puigsegur <jordi.puigsegur@gmail.com> ## ## This file is part of wfrog ## ## wfrog 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 Softwar...
unknown
codeparrot/codeparrot-clean
""" Tests for F() query expression syntax. """ from django.db import models class Employee(models.Model): firstname = models.CharField(max_length=50) lastname = models.CharField(max_length=50) def __unicode__(self): return u'%s %s' % (self.firstname, self.lastname) class Company(models.Model): ...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/abstractPropertyInConstructor.ts] //// //// [abstractPropertyInConstructor.ts] abstract class AbstractClass { constructor(str: string, other: AbstractClass) { this.method(parseInt(str)); let val = this.prop.toLowerCase(); if (!str) { this.prop = "Hell...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/abstractPropertyInConstructor.js
#!/usr/bin/env python import sys import subprocess OK_PERCENT_DIFFERENCE = 1.0 try: tempo_binary = sys.argv[1] args = sys.argv[2:-2] logfilename = sys.argv[-2] oldlogfilename = sys.argv[-1] except: print "Syntax: TEMPO_BINARY MF_FILENAME LOGFILENAME OLDLOGFILENAME" print " OLDLOGFILE = '' f...
unknown
codeparrot/codeparrot-clean
# coding: UTF-8 import unittest from usig_normalizador_amba.NormalizadorDireccionesAMBA import NormalizadorDireccionesAMBA from usig_normalizador_amba.Calle import Calle from usig_normalizador_amba.Errors import ErrorCalleInexistente from tests.test_commons import cargarCallejeroEstatico class NormalizadorDireccion...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from south.v2 import DataMigration from survey.models import LocationTypeDetails class Migration(DataMigration): def generate_location_type_details(self, location, the_country): if the_country: LocationTypeDetails.objects.get_or_create(country=the_country, location_type...
unknown
codeparrot/codeparrot-clean
"""Platform for Garmin Connect integration.""" import logging from typing import Any, Dict from garminconnect import ( GarminConnectAuthenticationError, GarminConnectConnectionError, GarminConnectTooManyRequestsError, ) from homeassistant.config_entries import ConfigEntry from homeassistant.const import A...
unknown
codeparrot/codeparrot-clean
from setuptools import setup, find_packages XMODULES = [ "book = xmodule.backcompat_module:TranslateCustomTagDescriptor", "chapter = xmodule.seq_module:SequenceDescriptor", "conditional = xmodule.conditional_module:ConditionalDescriptor", "course = xmodule.course_module:CourseDescriptor", "customta...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """**Postprocessors package.** """ __author__ = 'Marco Bernasocchi <marco@opengis.ch>' __revision__ = '$Format:%H$' __date__ = '22/08/2013' __license__ = "GPL" __copyright__ = 'Copyright 2012, Australia Indonesia Facility for ' __copyright__ += 'Disaster Reduction' from safe.postprocessors.ab...
unknown
codeparrot/codeparrot-clean
import argparse import hail as hl parser = argparse.ArgumentParser() parser.add_argument('-v', required=True, choices=['150', '151'], help='dbSNP build to load.') parser.add_argument('-b', required=True, choices=['GRCh37', 'GRCh38'], help='Reference genome build to load.') args = parser.parse_args() name = 'dbSNP' ve...
unknown
codeparrot/codeparrot-clean
""" The file preprocesses the data/train.txt, data/dev.txt and data/test.txt from sentiment classification task (English) It requires pre-trained word embeddings for English. It tries to download those from here: https://www.cs.york.ac.uk/nlp/extvec/ using wget. You can also use other, pre-trained embeddings, e.g.: -...
unknown
codeparrot/codeparrot-clean
from xmodule.modulestore import Location from contentstore.utils import get_modulestore from xmodule.modulestore.inheritance import own_metadata from xblock.fields import Scope from xmodule.course_module import CourseDescriptor from cms.xmodule_namespace import CmsBlockMixin class CourseMetadata(object): ''' F...
unknown
codeparrot/codeparrot-clean
/* Copyright (c) 2010, 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/sql_callback.h
"""Basic checks for HomeKitLock.""" from aiohomekit.model.characteristics import CharacteristicsTypes from aiohomekit.model.services import ServicesTypes from tests.components.homekit_controller.common import setup_test_component LOCK_CURRENT_STATE = ("lock-mechanism", "lock-mechanism.current-state") LOCK_TARGET_STAT...
unknown
codeparrot/codeparrot-clean
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import * as d3 from 'd3'; import {graphlib, render as dagreRender} from 'dagre-d3-es'; import { isClusterNode, i...
typescript
github
https://github.com/angular/angular
devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/signals-view/signals-visualizer/signals-visualizer.ts
from django.apps import AppConfig class MyAdmin(AppConfig): name = "django.contrib.admin" verbose_name = "Admin sweet admin." class MyAuth(AppConfig): name = "django.contrib.auth" label = "myauth" verbose_name = "All your password are belong to us." class BadConfig(AppConfig): """This class d...
python
github
https://github.com/django/django
tests/apps/apps.py
# # Copyright 2009 Eigenlabs Ltd. http://www.eigenlabs.com # # This file is part of EigenD. # # EigenD 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
# -*- coding: iso-8859-1 -*- # pysqlite2/dbapi2.py: the DB-API 2.0 interface # # Copyright (C) 2004-2005 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages # ari...
unknown
codeparrot/codeparrot-clean
# pylint: disable=no-method-argument,no-self-argument from zope.interface import Interface class ISpiderLoader(Interface): def from_settings(settings): """Return an instance of the class for the given settings""" def load(spider_name): """Return the Spider class for the given spider name. If ...
python
github
https://github.com/scrapy/scrapy
scrapy/interfaces.py
""" Django management command to migrate a course from the old Mongo modulestore to the new split-Mongo modulestore. """ from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from xmodule.modulestore.django import modulestore from xmodule.modulestore.split_migrato...
unknown
codeparrot/codeparrot-clean
/* * 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/main/java/org/springframework/cache/annotation/Cacheable.java
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # To use a consistent encoding from codecs import open from os import path # Always prefer setuptools over distutils from setuptools import setup, find_packages here = path.abs...
unknown
codeparrot/codeparrot-clean
/* Copyright 2015 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/prober/worker_test.go
import obelisk from twisted.internet import reactor def tx_fetched(ec, tx): print "Tx:", ec, tx.encode("hex") def spend_fetched(ec, spend): print "Spend:", ec, spend def txidx_fetched(ec, height, index): print "Tx index:", ec, height, index def txhashes_fetched(ec, hashes): print "Tx hashes:", [h.en...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # pandas-gbq documentation build configuration file, created by # sphinx-quickstart on Wed Feb 8 10:52:12 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
unknown
codeparrot/codeparrot-clean
"""Support for controlling Global Cache gc100.""" import gc100 import voluptuous as vol from homeassistant.const import CONF_HOST, CONF_PORT, EVENT_HOMEASSISTANT_STOP import homeassistant.helpers.config_validation as cv CONF_PORTS = "ports" DEFAULT_PORT = 4998 DOMAIN = "gc100" DATA_GC100 = "gc100" CONFIG_SCHEMA = ...
unknown
codeparrot/codeparrot-clean
<!-- 👋 Hey, thanks for your interest in contributing to Tailwind! **Please ask first before starting work on any significant new features.** It's never a fun experience to have your pull request declined after investing a lot of time and effort into a new feature. To avoid this from happening, we request that contr...
unknown
github
https://github.com/tailwindlabs/tailwindcss
.github/PULL_REQUEST_TEMPLATE.md
## NIFTY (Numerical Information Field Theory) has been developed at the ## Max-Planck-Institute for Astrophysics. ## ## Copyright (C) 2014 Max-Planck-Society ## ## Author: Maksim Greiner, Marco Selig ## Project homepage: <http://www.mpa-garching.mpg.de/ift/nifty/> ## ## This program is free software: you can redistribu...
unknown
codeparrot/codeparrot-clean
from xmodule.course_module import CourseDescriptor from xmodule.x_module import XModuleDescriptor import factory from factory.helpers import lazy_attribute class SplitFactory(factory.Factory): """ Abstracted superclass which defines modulestore so that there's no dependency on django if the caller passes m...
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
connect/runtime/src/main/java/org/apache/kafka/connect/converters/NumberConverter.java
# Building from Source Pre-built binaries are available for download for a variety of supported platforms through the [HashiCorp Releases website](https://releases.hashicorp.com/terraform/). However, if you'd like to build Terraform yourself, you can do so using the Go build toolchain and the options specified in thi...
unknown
github
https://github.com/hashicorp/terraform
BUILDING.md
# 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
#pragma once #include <ATen/cpu/vec/intrinsics.h> #include <ATen/cpu/vec/vec256/vsx/vsx_helpers.h> #include <ATen/cpu/vec/vec_base.h> #include <c10/util/irange.h> #include <sleef.h> namespace at { namespace vec { inline namespace CPU_CAPABILITY { template <> struct is_vec_specialized_for<double> : std::bool_consta...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/cpu/vec/vec256/vsx/vec256_double_vsx.h
#===----------------------------------------------------------------------===## # # The LLVM Compiler Infrastructure # # This file is dual licensed under the MIT and the University of Illinois Open # Source Licenses. See LICENSE.TXT for details. # #===------------------------------------------------...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jun 2 13:12:55 2017 @author: isti_ew """ import os import matplotlib.pyplot as plt import numpy as np from matplotlib.patches import Polygon from mpl_toolkits.mplot3d import Axes3D from matplotlib.collections import PatchCollection # import seaborn as...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, division, print_function import os from odo.backends.hdfstore import discover from contextlib import contextmanager from odo.utils import tmpfile from odo.chunks import chunks from odo import into, append, convert, resource, discover, odo import datashape import pandas as pd fr...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python import cherrypy import os from cherrypy.process import servers import requests import json from creds import * import urllib class Start(object): def index(self): scope="alexa_all" sd = json.dumps({ "alexa:all": { "productID": ProductID, "productInstanceAttributes...
unknown
codeparrot/codeparrot-clean
from a10sdk.common.A10BaseClass import A10BaseClass class Host(A10BaseClass): """Class Description:: Set remote syslog host DNS name or ip address. Class host supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :param ipv6addr_li...
unknown
codeparrot/codeparrot-clean
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ..helperfunctions import _xml_to_list from ...app import App class TestAssembleApp(unit...
unknown
codeparrot/codeparrot-clean
# encoding:UTF-8 # python3.4 爬虫教程,爬取网站上的图片 import urllib.request import os from html.parser import HTMLParser class MyHTMLParser(HTMLParser): def __init__(self): HTMLParser.__init__(self) self.links = [] def handle_starttag (self, tag, attrs): # print "Encountered the beginning of a %s...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # On Darwin, dynamic libraries have an install name. At link time, the # linker can work with a dylib anywhere in the filesystem, but it will # write the dylib's install name into the resulting image, and at load # time that dylib will normally be expected to be found at exactly that # path. Ho...
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
# frozen_string_literal: true require "cases/helper" require "support/schema_dumping_helper" class PostgresqlFullTextTest < ActiveRecord::PostgreSQLTestCase include SchemaDumpingHelper class Tsvector < ActiveRecord::Base; end setup do @connection = ActiveRecord::Base.lease_connection @connection.create...
ruby
github
https://github.com/rails/rails
activerecord/test/cases/adapters/postgresql/full_text_test.rb
""" This module includes some utility functions for inspecting the layout of a GDAL data source -- the functionality is analogous to the output produced by the `ogrinfo` utility. """ from django.contrib.gis.gdal import DataSource from django.contrib.gis.gdal.geometries import GEO_CLASSES def ogrinfo(data_source, num_...
unknown
codeparrot/codeparrot-clean
""" This code has been developed by Baptiste Busch: https://github.com/buschbapti This module allows you to retrieve Skeleton information from a Kinect device. It is only the client side of a zmq client/server application. The server part can be found at: https://bitbucket.org/buschbapti/kinectserver/src It used the ...
unknown
codeparrot/codeparrot-clean
--- navigation_title: "Span first" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-span-first-query.html --- # Span first query [query-dsl-span-first-query] Matches spans near the beginning of a field. Here is an example: ```console GET /_search { "query": { "span_fi...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/query-dsl/query-dsl-span-first-query.md
# frozen_string_literal: true # :markup: markdown module ActionText # # Action Text Attachable # # Include this module to make a record attachable to an ActionText::Content. # # class Person < ApplicationRecord # include ActionText::Attachable # end # # person = Person.create! name...
ruby
github
https://github.com/rails/rails
actiontext/lib/action_text/attachable.rb
/* Copyright 2023 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/common_runtime/next_pluggable_device/c/tf_rendezvous_c_api.h
@file:Suppress("ANNOTATION_ARGUMENT_MUST_BE_CONST") package test annotation class Anno(val value: String) @Anno(value = "A" <expr>foo</expr> "B") class Foo val foo: String.(String) -> String = { it }
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/testData/components/dataFlowInfoProvider/exitPointSnapshot/defaultValues/annotationInfixOperatorProperty.kt
# ELBE - Debian Based Embedded Rootfilesystem Builder # Copyright (c) 2019 Olivier Dion <dion@linutronix.de> # # SPDX-License-Identifier: GPL-3.0-or-later import junit_xml as junit class TestException(Exception): pass class TestSuite: test_dict = {} def __init__(self, node, target): super(TestS...
unknown
codeparrot/codeparrot-clean
from operator import add import time import pytest pytest.importorskip('dask.distributed') from tornado import gen from streamz.dask import scatter from streamz import Stream from distributed import Future, Client from distributed.utils import sync from distributed.utils_test import gen_cluster, inc, cluster, loop,...
unknown
codeparrot/codeparrot-clean
# Lint as: python2, python3 # 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 # ...
unknown
codeparrot/codeparrot-clean
# Comment selector: js_test: jstests/core/example.js: - tag1 - tag2 - tag3 jstests/core/all*.js: - tag3 - tag4 cpp_unit_test: build/**/auth/*: - tag1 build/*: db_test:
unknown
github
https://github.com/mongodb/mongo
buildscripts/tests/resmokelib/testing/tags.yml
package refactoring import ( "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/tfdiags" ) var _ providers.Interface = (*mockProvider)(nil) // mockProvider provides a mock imp...
go
github
https://github.com/hashicorp/terraform
internal/refactoring/mock_provider.go
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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
#!/usr/bin/python # # Copyright (c) 2019 Zim Kalinowski, (@zikalino) # # 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 os import sys from setuptools import setup, find_packages from shutil import rmtree from mezzanine import __version__ as version exclude = ["mezzanine/project_template/dev.db", "mezzanine/project_template/project_name/local_settings.py"] if sys.argv == ["setup.py", "test"]: exclude = [] exclude =...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ simplewiki.utils ~~~~~~~~~~~~~~~~ This module implements various utility functions and classes used all over the application. :copyright: (c) 2009 by the Werkzeug Team, see AUTHORS for more details. :license: BSD. """ import difflib import creoleparser from os impor...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2023 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.tests.server.jetty.http2.jakarta import io.ktor.server.jetty.jakarta.* import io.ktor.server.testing.suites.* import kotlin.test.* class JettyHttp2AsyncServletContainerCompre...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-jetty-jakarta/ktor-server-jetty-test-http2-jakarta/jvm/test/io/ktor/tests/server/jetty/http2/jakarta/JettyHttp2ServletAsyncTest.kt
// RUN: rm -rf %t // RUN: pp-trace -callbacks '*,-FileChanged,-MacroDefined' %s -- -x objective-c++ -undef -target x86_64 -std=c++11 -fmodules -fcxx-modules -fmodules-cache-path=%t -I%S -I%S/Input | FileCheck --strict-whitespace %s // CHECK: --- @import Level1A; // CHECK-NEXT: - Callback: moduleImport // CHECK-NEXT:...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/pp-trace/pp-trace-modules.cpp
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ export {constantPropagation} from './ConstantPropagation'; export {deadCodeElimination} from './DeadCodeElimination'; export {pr...
typescript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/Optimization/index.ts
package kotlinx.coroutines.flow import kotlinx.coroutines.* import kotlinx.coroutines.channels.* import kotlinx.coroutines.testing.* import kotlin.test.* @OptIn(ExperimentalCoroutinesApi::class) class ChunkedTest : TestBase() { @Test fun testChunked() = runTest { doTest(flowOf(1, 2, 3, 4, 5), 2, list...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/common/test/flow/operators/ChunkedTest.kt
# Copyright 2008-2015 Nokia Solutions and Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <algorithm> #include <cassert> #include <cmath> #include <cstddef> #include <c...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/quantized/cpu/qnnpack/test/dwconv-microkernel-tester.h
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package configschema import ( "github.com/zclconf/go-cty/cty" ) type StringKind int const ( StringPlain StringKind = iota StringMarkdown ) // Block represents a configuration block. // // "Block" here is a logical grouping construct, though i...
go
github
https://github.com/hashicorp/terraform
internal/configs/configschema/schema.go
"""Extensions to the 'distutils' for large or complex distributions""" from setuptools.extension import Extension, Library from setuptools.dist import Distribution, Feature, _get_unpatched import distutils.core, setuptools.command from setuptools.depends import Require from distutils.core import Command as _Command fro...
unknown
codeparrot/codeparrot-clean
"""Module for creating a new template for a psyplot plugin """ import funcargparse import os import os.path as osp import shutil def new_plugin(odir, py_name=None, version='0.0.1.dev0', description='New plugin'): """ Create a new plugin for the psyplot package Parameters ---------- ...
unknown
codeparrot/codeparrot-clean
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v2beta1", "metadata": { "name": "v0alpha1.Repeating-Kitchen-Sink.v42" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "query": { "kind": "DataQuery", "group": "", ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/e2e-repeats/v0alpha1.Repeating-Kitchen-Sink.v42.v2beta1.json
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
unknown
codeparrot/codeparrot-clean
import json from typing import Any import pytest from pydantic import BaseModel from langchain_core.exceptions import OutputParserException from langchain_core.messages import AIMessage, BaseMessage, HumanMessage from langchain_core.output_parsers.openai_functions import ( JsonOutputFunctionsParser, PydanticO...
python
github
https://github.com/langchain-ai/langchain
libs/core/tests/unit_tests/output_parsers/test_openai_functions.py
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package stackeval import ( "context" "sync" "github.com/hashicorp/terraform/internal/promising" "github.com/hashicorp/terraform/internal/tfdiags" ) // walkState is a helper for codepaths that intend to visit various different // interdependen...
go
github
https://github.com/hashicorp/terraform
internal/stacks/stackruntime/internal/stackeval/walk.go
#!/usr/bin/env python #-*- coding: utf-8 -*- ''' Craeted at 2011-01-14. @author: zhuh @version: 0.1.0 @change:\n - 2011-01-14.\n - finished the coor data for the five base. - 2011-01-18.\n - add the base list BASE_AG_LIST and BASE_CTU_LIST. ''' import numpy as np BASE_AG_LIST=["N9","C8","N7","...
unknown
codeparrot/codeparrot-clean
/* Copyright 2023 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/apis/kubeadm/v1beta4/register.go
# GRID_SIZE = 100 # # def lights_iteration(orig_lights): # new_light_row = [False] * GRID_SIZE # # new_lights = [] # # for _ in range(GRID_SIZE): # new_lights.append(new_light_row[:]) # # for row in range(GRID_SIZE): # for col in range(GRID_SIZE): # neighbors_on = sum((xx, yy) in lights_on for xx in range(x ...
unknown
codeparrot/codeparrot-clean
'''cgat_cwd2list.py - list directory contents ======================================== Purpose ------- create a flat file that lists the current contents of the current directory and its subfolders. Useful for when data is deleted due to space contraints. If files need to be recreated then the difference between the...
unknown
codeparrot/codeparrot-clean
############################ Copyrights and license ############################ # # # Copyright 2019 Olof-Joachim Frahm <olof@macrolet.net> # # ...
unknown
codeparrot/codeparrot-clean
/** * --------------------------------------------------------------------------------- * This file has been generated by Sanity TypeGen. * Command: `sanity typegen generate` * * Any modifications made directly to this file will be overwritten the next time * the TypeScript definitions are generated. Please make ...
typescript
github
https://github.com/vercel/next.js
examples/cms-sanity/sanity.types.ts
import logging import copy from .basic import BasicGenerator # Generator that can build (verifying) code but is not able to compile it # This is an interface for child classes that can be added to a BasicGenerator class GeneratorChild(BasicGenerator): # Initialize #noinspection PyProtectedMember,PyMissingCons...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # XTraceback documentation build configuration file, created by # sphinx-quickstart on Sat Jun 25 21:53:34 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
unknown
codeparrot/codeparrot-clean
<nav> <button type="button" (click)="toggle()">Toggle Status</button> </nav> <div [@slideStatus]="status" class="box"> {{ status == 'active' ? 'Active' : 'Inactive' }} </div>
html
github
https://github.com/angular/angular
adev/src/content/examples/animations/src/app/status-slider.html
//===--- SequenceAlgos.swift ----------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
swift
github
https://github.com/apple/swift
benchmark/single-source/SequenceAlgos.swift
# Copyright (C) 2002-2007 Python Software Foundation # Author: Ben Gertzfield # Contact: email-sig@python.org """Base64 content transfer encoding per RFCs 2045-2047. This module handles the content transfer encoding method defined in RFC 2045 to encode arbitrary 8-bit data using the three 8-bit bytes in four 7-bit ch...
unknown
codeparrot/codeparrot-clean
import { atRule, decl, rule, type AstNode, type Rule, type StyleRule } from './ast' import { type Candidate, type Variant } from './candidate' import { CompileAstFlags, type DesignSystem } from './design-system' import GLOBAL_PROPERTY_ORDER from './property-order' import { asColor, type Utility } from './utilities' imp...
typescript
github
https://github.com/tailwindlabs/tailwindcss
packages/tailwindcss/src/compile.ts
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re clas...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- import logging from peewee import Model, SqliteDatabase, InsertQuery, IntegerField,\ CharField, FloatField, BooleanField, DateTimeField from datetime import datetime from datetime import timedelta from base64 import b64encode from .utils import get_pokemon_...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='submodule --cached, --quiet etc. output' . ./test-lib.sh . "$TEST_DIRECTORY"/lib-t3100.sh setup_sub () { local d="$1" && shift && git $@ clone . "$d" && git $@ submodule add ./"$d" } normalize_status () { sed -e 's/-g[0-9a-f]*/-gHASH/' } test_expect_success 'setup' ' test_commit A...
unknown
github
https://github.com/git/git
t/t7422-submodule-output.sh