code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#!/usr/bin/env python # -*- coding: utf-8 -*- from translate.lang import factory def test_punctranslate(): """Tests that we can translate punctuation.""" language = factory.getlanguage('vi') assert language.punctranslate(u"") == u"" assert language.punctranslate(u"abc efg") == u"abc efg" assert la...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals import collections import copy import datetime import decimal import itertools import uuid import warnings from base64 import b64decode, b64encode from functools import total_ordering from django import forms from django.apps import apps from django.conf...
unknown
codeparrot/codeparrot-clean
"""Extract reference documentation from the NumPy source tree. """ import inspect import textwrap import re import pydoc from StringIO import StringIO from warnings import warn 4 class Reader(object): """A line-based string reader. """ def __init__(self, data): """ Parameters ----...
unknown
codeparrot/codeparrot-clean
//===--- CachedDiagnostics.h - Cached Diagnostics ---------------*- C++ -*-===// // // 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/Frontend/CachedDiagnostics.h
--- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/search-shard-routing.html applies_to: stack: all --- # Search shard routing [search-shard-routing] To protect against hardware failure and increase search capacity, {{es}} can store copies of an index’s data across multiple shards...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch/rest-apis/search-shard-routing.md
# ***************************************************************** # Copyright (c) 2013 Massachusetts Institute of Technology # # Developed exclusively at US Government expense under US Air Force contract # FA8721-05-C-002. The rights of the United States Government to use, modify, # reproduce, release, perform, displ...
unknown
codeparrot/codeparrot-clean
# # my_py_func.py -- Python callback example. # # This is a short python snippet that is needed by the `execute.scm` # example. The code below is called, when a GroundedSchemaNode and # a GroundedPredicateNode is triggered. # from opencog.atomspace import AtomSpace, TruthValue from opencog.atomspace import types asp =...
unknown
codeparrot/codeparrot-clean
# mysql/oursql.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+oursql :name: OurSQL :dbapi: oursql :connectstri...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- import argh import sys from functools import partial from argparse import FileType from .cli import dicts_from_lines, to_int from .misc import as_bulk_queries from cr8 import aio, clients from .metrics import Stats from .log import format_stats def to_insert(table, d): ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/mlir/mlir_graph_optimization_pass.h
import fnmatch from conans.errors import ConanException class BuildMode(object): """ build_mode => ["*"] if user wrote "--build" => ["hello*", "bye*"] if user wrote "--build hello --build bye" => ["hello/0.1@foo/bar"] if user wrote "--build hello/0.1@foo/bar" ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2008 Mikeal Rogers # # 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...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 2012, 2013, 2014 CERN. # # Invenio 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 the # License, or (at your option)...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'AppSettings' db.create_table(u'config_appsettings', ( (u'id', self.gf('django.db....
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...
kotlin
github
https://github.com/spring-projects/spring-framework
framework-docs/src/main/kotlin/org/springframework/docs/testing/mockmvc/assertj/mockmvctesterintegration/HotelController.kt
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2007 Edgewall Software # Copyright (C) 2006 Matthew Good # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Author: Jon Trulson <jtrulson@ics.com> # Copyright (c) 2016 Intel Corporation. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without l...
unknown
codeparrot/codeparrot-clean
# 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
import datetime from unittest import mock from django.db import connections from django.db.models.sql.compiler import cursor_iter from django.test import TestCase from .models import Article class QuerySetIteratorTests(TestCase): itersize_index_in_mock_args = 3 @classmethod def setUpTestData(cls): ...
python
github
https://github.com/django/django
tests/queries/test_iterator.py
import os import shlex import subprocess import copy import textwrap from pathlib import Path, PurePath from .. import mesonlib from .. import coredata from .. import build from .. import mlog from ..modules import ModuleReturnValue, ModuleObject, ModuleState, ExtensionModule from ..backend.backends import TestProto...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2012 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. """Crocodile - compute coverage numbers for Chrome coverage dashboard.""" import optparse import os import platform import re impo...
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 use ...
unknown
codeparrot/codeparrot-clean
import GhostContentAPI from "@tryghost/content-api"; import { GHOST_API_URL_DEFAULT, GHOST_API_KEY_DEFAULT } from "./defaults.js"; const GHOST_API_URL = process.env.GHOST_API_URL || GHOST_API_URL_DEFAULT; const GHOST_API_KEY = process.env.GHOST_API_KEY || GHOST_API_KEY_DEFAULT; const api = new GhostContentAPI({ url...
javascript
github
https://github.com/vercel/next.js
examples/cms-ghost/lib/api.js
//! Unidirectional byte-oriented channel. use crate::util::poll_proceed; use bytes::Buf; use bytes::BytesMut; use futures_core::ready; use std::io::Error as IoError; use std::io::ErrorKind as IoErrorKind; use std::io::IoSlice; use std::pin::Pin; use std::sync::{Arc, Mutex}; use std::task::{Context, Poll, Waker}; use ...
rust
github
https://github.com/tokio-rs/tokio
tokio-util/src/io/simplex.rs
/* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear...
c
github
https://github.com/opencv/opencv
3rdparty/libtiff/tif_next.c
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python #coding: utf-8 -*- # Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # This module 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 yo...
unknown
codeparrot/codeparrot-clean
from unittest import TestCase from bricklayer.doctor.config import Configurator import uuid import os import shutil import tempfile import ConfigParser class ConfiguratorTest(TestCase): def setUp(self): self.random_dir = tempfile.gettempdir() + '/.' + uuid.uuid4().hex os.makedirs(self.random_dir)...
unknown
codeparrot/codeparrot-clean
/* Generated file to emulate the ts.refactor namespace. */ export * from "../refactorProvider.js"; export * from "../refactors/convertExport.js"; export * from "../refactors/convertImport.js"; export * from "../refactors/extractType.js"; export * from "../refactors/helpers.js"; export * from "../refactors/inlineVariab...
typescript
github
https://github.com/microsoft/TypeScript
src/services/_namespaces/ts.refactor.ts
- hosts: testhost gather_facts: false tasks: - name: test registering debug: msg='does nothing really but register this' register: 200 - name: never gets here assert: that: - 200 is not defined
unknown
github
https://github.com/ansible/ansible
test/integration/targets/register/invalid.yml
from FPDF import * class TOC(FPDF): def __init__(this, orientation='P',unit='mm',format='A4'): this._toc=[] this._numbering=0 this._numberingFooter=0 this._numPageNum=1 FPDF.__init__(this,orientation,unit,format) def AddPage(this,orientation=''): FPDF.AddPage(this,orientation) if(this._numbering): ...
unknown
codeparrot/codeparrot-clean
import mock import unittest from cloudify import exceptions as cfy_exc import test_mock_base from network_plugin import network class NetworkPluginNetworkSubroutesMockTestCase(test_mock_base.TestBase): def test__get_network_list(self): # check list with one network fake_client = self.generate_cli...
unknown
codeparrot/codeparrot-clean
"""Classes for storing and processing test results.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import datetime import re from . import types as t from .util import ( display, get_ansible_version, ) from .util_common import ( write_text_test_results, wr...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2016 The Khronos Group Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and/or associated documentation files (the # "Materials"), to deal in the Materials without restriction, including # without limitation the rights to use...
unknown
codeparrot/codeparrot-clean
package v0alpha1 import ( common "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1" ) // +k8s:openapi-gen=true type DashboardSpec = common.Unstructured // NewDashboardSpec creates a new Spec object. func NewDashboardSpec() *DashboardSpec { return &DashboardSpec{} }
go
github
https://github.com/grafana/grafana
apps/dashboard/pkg/apis/dashboard/v0alpha1/dashboard_spec.go
# 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
""" This module's main() function becomes the pulp-manage-db.py script. """ from gettext import gettext as _ from optparse import OptionParser import logging import os import sys import traceback from pulp.plugins.loader.api import load_content_types from pulp.server import logs from pulp.server.db import connection f...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
unknown
codeparrot/codeparrot-clean
from __future__ import division import sys if sys.version_info < (3, 4): raise Exception('') exit(1) import asyncio import aiohttp import functools import flickrapi import itertools import os from ctypes import c_bool def dump(api, secret, user_id, target='./data'): try: loop = asyncio.get_event_...
unknown
codeparrot/codeparrot-clean
# GCE Load-Balancer Controller (GLBC) Cluster Addon This cluster addon is composed of a 404 default backend service and deployment. On GCE, this 404 service is used in conjunction with the [Ingress-GCE](https://github.com/kubernetes/ingress-gce) controller. See the Ingress-GCE docs for more information.
unknown
github
https://github.com/kubernetes/kubernetes
cluster/addons/cluster-loadbalancing/glbc/README.md
# -*- coding: utf-8 -*- # Author: Vincent Dubourg <vincent.dubourg@gmail.com> # (mostly translation, see implementation details) # Licence: BSD 3 clause """ The built-in regression models submodule for the gaussian_process module. """ import numpy as np def constant(x): """ Zero order polynomial (co...
unknown
codeparrot/codeparrot-clean
<?php // autoload_static.php @generated by Composer namespace Composer\Autoload; class ComposerStaticInitTargetDir { public static $files = array ( 'b4b4f2eb2151c57cadbd5714a7aba8b7' => __DIR__ . '/../..' . '/foo.php', '99b24fc198db06c1d2d8118a8a5475eb' => __DIR__ . '/../..' . '/bar.php', ); ...
php
github
https://github.com/composer/composer
tests/Composer/Test/Autoload/Fixtures/autoload_static_target_dir.php
"""Support for Eufy switches.""" import logging from homeassistant.components.switch import SwitchDevice DEPENDENCIES = ['eufy'] _LOGGER = logging.getLogger(__name__) def setup_platform(hass, config, add_entities, discovery_info=None): """Set up Eufy switches.""" if discovery_info is None: return ...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
cpp
github
https://github.com/apple/swift
lib/Refactoring/AddEquatableConformance.cpp
/*! * @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 {DOCUMENT, Injectable, VERSION, computed, inject} from '@angular/core'; import {httpResource} from '@angular/...
typescript
github
https://github.com/angular/angular
adev/src/app/core/services/version-manager.service.ts
//===--- IndexPathTest.swift ----------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2020 - 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/IndexPathTest.swift
/* * 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.platform import com.intellij.openapi.project.Project import com.int...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-platform-interface/src/org/jetbrains/kotlin/analysis/api/platform/KotlinProjectMessageBusProvider.kt
# # fake_balloon.py - creates an imagine of a balloon given a vehicle position, vehicle attitude and balloon position # # Start from command line using 'python balloon_finder.py'. # The program will run for 10 seconds and will create a video file, "balloon_finder.avi", which contains the original video along with #...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2015 Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/NullGroupsMapping.java
import testify as T from pushmanager.testing.testservlet import TemplateTestCase class NewRequestTemplateTest(TemplateTestCase): authenticated = True newrequest_page = 'modules/newrequest.html' form_elements = ['title', 'tags', 'review', 'repo', 'branch', 'description', 'comments', 'watchers', 'takeover'...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2016 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 law or...
unknown
codeparrot/codeparrot-clean
from ajenti.ui import * from ajenti import apis from ajenti.com import implements, Plugin from ajenti.api import * class HealthWidget(Plugin): implements(apis.dashboard.IWidget) title = 'Health' icon = '/dl/health/icon.png' name = 'Health monitor' style = 'linear' def get_ui(self, cfg, id=None...
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
build-plugin/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/JarIntegrationTests.java
# -*-coding:utf-8 -* # Copyright (c) 2011-2015, Intel Corporation # 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, thi...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/qcom,gcc-sc7280.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm Global Clock & Reset Controller on SC7280 maintainers: - Taniya Das <quic_tdas@quicinc.com> description: | ...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/qcom,gcc-sc7280.yaml
// Copyright 2021 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
etcdutl/etcdutl/defrag_command.go
""" Utilities for instructor unit tests """ import datetime import json import random from django.utils.timezone import utc from util.date_utils import get_default_time_display class FakeInfo(object): """Parent class for faking objects used in tests""" FEATURES = [] def __init__(self): for feature...
unknown
codeparrot/codeparrot-clean
""" Test for lms courseware app, module render unit """ import itertools import json import textwrap from datetime import datetime from functools import partial import pytest import ddt import pytz from bson import ObjectId from completion.waffle import ENABLE_COMPLETION_TRACKING_SWITCH # lint-amnesty, pylint: disabl...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.network.tls import kotlin.enums.* /** * TLS version * * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.network.tls.TLSVersion) * * @property code numeric TL...
kotlin
github
https://github.com/ktorio/ktor
ktor-network/ktor-network-tls/jvm/src/io/ktor/network/tls/TLSVersion.kt
# -*- coding: utf-8 -*- """ *************************************************************************** DeleteColumn.py --------------------- Date : May 2010 Copyright : (C) 2010 by Michael Minn Email : pyqgis at michaelminn dot com ************************...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2003-2016 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/COPYING """Check source code is ascii only or has an encoding declara...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python2 # vim:fileencoding=utf-8 # License: GPLv3 Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net> from __future__ import absolute_import, division, print_function, unicode_literals from calibre import prints readonly = True version = 0 # change this if you change signature of implementation() ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import sys import subprocess from setuptools import setup, Extension from runspade import __version__ try: import bdist_mpkg except: # This is not a mac pass if sys.platform == "win32": ext = Extension("tlslite.utils.win32prng", sources=["tlslite/utils/win32p...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * ipci.c * POSTGRES inter-process communication initialization code. * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICAT...
c
github
https://github.com/postgres/postgres
src/backend/storage/ipc/ipci.c
# Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # try: from PyQt5 import Qt, QtCore, QtGui except ImportError: raise SystemExit('Please install PyQt5 to run this script (http://www.riverbankcomputing.co.uk/software/pyqt/download...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-03 09:52 from __future__ import unicode_literals import analyses.fields from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('rna_seq', '0002_auto_20160702_1000'), ...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package remote import ( "fmt" "io" "sync" ) // Cmd represents a remote command being prepared or run. type Cmd struct { // Command is the command to run remotely. This is executed as if // it were a shell command, so you are expected to do an...
go
github
https://github.com/hashicorp/terraform
internal/communicator/remote/command.go
{ "name": "symfony/debug-bundle", "type": "symfony-bundle", "description": "Provides a tight integration of the Symfony VarDumper component and the ServerLogCommand from MonologBridge into the Symfony full-stack framework", "keywords": [], "homepage": "https://symfony.com", "license": "MIT", ...
json
github
https://github.com/symfony/symfony
src/Symfony/Bundle/DebugBundle/composer.json
export var __N_SSG = true; export default class Test extends React.Component { render() { return __jsx("div", null); } }
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/ssg/getStaticProps/should-support-class-exports/output.js
/* * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.tests import io.ktor.client.call.* import io.ktor.client.engine.mock.* import io.ktor.client.request.* import io.ktor.client.statement.* import io.ktor.client.test.base...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-tests/jvm/test/io/ktor/client/tests/DefaultTransformJvmTest.kt
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Lic...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python2 # Nautilus CD burning script # # Owner: Michele Campeotto <micampe@micampe.it> # http://www.micampe.it # # Licence: GNU GPL # Copyright (C) 2002 Michele Campeotto # # Dependency: GTK+ >= 2.0 # PyGTK >= 1.99.8 # Python >= 2.2 # mkisofs and cdrecord # # 20...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
unknown
codeparrot/codeparrot-clean
// RUN: mkdir -p %t.dir/move-enum // RUN: cp %S/Inputs/enum.h %t.dir/move-enum/enum.h // RUN: echo '#include "enum.h"' > %t.dir/move-enum/enum.cpp // RUN: cd %t.dir/move-enum // // ----------------------------------------------------------------------------- // Test moving enum declarations. // -----------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-move/move-enum-decl.cpp
from optparse import make_option import sys import traceback from django.conf import settings from django.core.management.base import NoArgsCommand from django.core.management.color import no_style from django.core.management.sql import custom_sql_for_model, emit_post_sync_signal from django.db import connections, rou...
unknown
codeparrot/codeparrot-clean
#### PATTERN | EN ################################################################################## # -*- coding: utf-8 -*- # Copyright (c) 2010 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). # http://www.clips.ua.ac.be/pages/pattern ############...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2024 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 applicable law or agreed...
unknown
github
https://github.com/huggingface/transformers
docs/source/en/model_doc/mimi.md
""" 19. OR lookups To perform an OR lookup, or a lookup that combines ANDs and ORs, combine QuerySet objects using & and | operators. Alternatively, use positional arguments, and pass one or more expressions of clauses using the variable ``django.db.models.Q`` (or any object with an add_to_query method). """ # Python...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, Bojan Vitnik <bvitnik@mainstream.rs> # 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_versi...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/fsi/ibm,i2cr-fsi-master.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: IBM I2C Responder virtual FSI master maintainers: - Eddie James <eajames@linux.ibm.com> description: | The I2C Res...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/fsi/ibm,i2cr-fsi-master.yaml
imports: - { resource: ./../config/framework.yml } framework: serializer: ~ security: password_hashers: Symfony\Component\Security\Core\User\InMemoryUser: plaintext providers: in_memory: memory: users: dunglas: { password: foo, roles: [R...
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AccessToken/config_header_default.yml
//go:build windows /* Copyright 2024 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 ag...
go
github
https://github.com/kubernetes/kubernetes
pkg/kubelet/cm/internal_container_lifecycle_windows_test.go
<?php declare(strict_types=1); /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Install...
php
github
https://github.com/composer/composer
src/Composer/Installer/InstallerEvents.php
# coding=utf-8 """ The Email Activity Report API endpoint Documentation: http://developer.mailchimp.com/documentation/mailchimp/reference/reports/email-activity/ Schema: https://api.mailchimp.com/schema/3.0/Reports/EmailActivity/Instance.json """ from __future__ import unicode_literals from mailchimp3.baseapi import ...
unknown
codeparrot/codeparrot-clean
import datetime from time import time import gpsbro.sonel.rinex #import gpsbro.sonel.marks def main(): ### Get SONEL rinex URLs in a range of dates (inclusive) demonstration test_one_begin = time() start_date = datetime.date(2015, 1, 12) end_date = datetime.date(2015, 1, 13) dates = gpsbro.son...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## You may use this file under the terms of the BSD license as follows: ## ## "Redistribu...
unknown
codeparrot/codeparrot-clean
"""OpenMP wrapper using a libgomp dynamically loaded library.""" from ctypes.util import find_library from subprocess import check_output import ctypes import os import sys try: # there may be an environ modification when loading config from pythran.config import compiler except ImportError: def compiler(...
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 // //===---------------------------...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.h
# Copyright (C) 2011, 2012 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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 late...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright 2012 Google 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 b...
unknown
codeparrot/codeparrot-clean
from warnings import warn from models import MIMPMutation from imports.mutations import MutationImporter from helpers.bioinf import decode_raw_mutation from helpers.parsers import tsv_file_iterator class Importer(MutationImporter): # load("all_mimp_annotations_p085.rsav") # write.table(all_mimp_annotations, f...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from functools import partial from django import forms from django.utils.translation import ugettext_lazy as _ from booktype.utils import config EPUB_CTYPE = 'application/epub+zip' DOCX_CTYPE = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ALLOWED_TYPES = [ E...
unknown
codeparrot/codeparrot-clean
# Mercurial bookmark support code # # Copyright 2008 David Soria Parra <dsp@php.net> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from mercurial.i18n import _ from mercurial.node import hex from mercurial import encoding, error...
unknown
codeparrot/codeparrot-clean
""" Execute like this: $ python bin/generate_test_list.py tests = [ 'sympy.concrete.tests', 'sympy.core.tests', 'sympy.functions.combinatorial.tests', 'sympy.functions.elementary.tests', 'sympy.functions.special.tests', 'sympy.geometry.tests', 'sympy.integrals.tests', 'sympy.matrices.te...
unknown
codeparrot/codeparrot-clean
# this is a virtual module that is entirely implemented server side # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
unknown
codeparrot/codeparrot-clean
from coala_utils.decorators import ( enforce_signature, generate_ordering, generate_repr) @generate_repr('line', 'column') @generate_ordering('line', 'column') class TextPosition: @enforce_signature def __init__(self, line: (int, None)=None, column: (int, None)=None): """ Creates a new Tex...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.vectorstores import AzureCosmosDBVectorSearch from langchain_community.vectorstores.azure_cosmos_db import CosmosDBSimilarityType # Create a way to dynamically look up deprecate...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/vectorstores/azure_cosmos_db.py
#!/usr/bin/env python # # Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # noti...
unknown
codeparrot/codeparrot-clean
""" XML Test Runner for PyUnit """ # Written by Sebastian Rittau <srittau@jroger.in-berlin.de> and placed in # the Public Domain. With contributions by Paolo Borelli and others. from __future__ import with_statement __version__ = "0.1" import os.path import re import sys import time import traceback import unittest...
unknown
codeparrot/codeparrot-clean
# Scrapy settings for beeradvocate project # # For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/topics/settings.html # BOT_NAME = 'beeradvocate' SPIDER_MODULES = ['beeradvocate.spiders'] NEWSPIDER_MODULE = 'beer...
unknown
codeparrot/codeparrot-clean