code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
name: Cygwin
on:
push:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
merge_group:
concurr... | unknown | github | https://github.com/ruby/ruby | .github/workflows/cygwin.yml |
###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""
... | unknown | codeparrot/codeparrot-clean | ||
<%
executions_class = ""
files_class = ""
if self.attr.page_path == "executions":
executions_class = "active"
elif self.attr.page_path == "files":
files_class = "active"
%>
<%def name="older_newer_links(older_newer)">
% if older_newer != None:
<p class="older_newer_links">
... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2022 The HuggingFace Inc. 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 appl... | python | github | https://github.com/huggingface/transformers | src/transformers/models/donut/image_processing_donut.py |
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package schema
import (
"errors"
"fmt"
"log"
"strconv"
"github.com/hashicorp/terraform/internal/legacy/terraform"
"github.com/zclconf/go-cty/cty"
)
var ReservedDataSourceFields = []string{
"connection",
"count",
"depends_on",
"lifecycle... | go | github | https://github.com/hashicorp/terraform | internal/legacy/helper/schema/resource.go |
//===----------------- ModulesBuilder.h --------------------------*- C++-*-===//
//
// 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/clangd/ModulesBuilder.h |
package schemaversion
import (
"context"
"regexp"
)
// V20 migrates legacy variable syntax in data links and field options.
// This migration updates variable names from old syntax to new dotted syntax
// used in data links URLs and field option titles.
//
// Variable syntax changes:
// - __series_name → __series... | go | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/schemaversion/v20.go |
import sys
import unittest
import json
from rhizi_client import RhiziAPIClient, set_debugging
python2 = sys.version_info[0] == 2
if not python2:
unicode = str
class TestRhiziAPIClient(unittest.TestCase):
@classmethod
def setUpClass(self):
# constant
self.rz_doc_name = unicode("Test")
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'stylesheeteditor.ui'
#
# Created: Fri Jul 26 06:50:07 2013
# by: PyQt5 UI code generator 5.0.1-snapshot-2a99e59669ee
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_StyleShe... | unknown | codeparrot/codeparrot-clean | ||
////////////////////////////////////////////////////////////////////////////
//
// Copyright 2021 Realm 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/li... | c | github | https://github.com/realm/realm-swift | Realm/RLMDictionary.h |
"""
Package resource API
--------------------
A resource is a logical file contained within a package, or a logical
subdirectory thereof. The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is. Do not use os.path operations to manipul... | unknown | codeparrot/codeparrot-clean | ||
"""This script removes all custom parameters that has not been used
in dimensions as labels and also resets the value for the other
parameters to zero or null."""
#pylint: disable=import-error,invalid-name,broad-except
from pyrevit import revit, DB
from pyrevit import script
from pyrevit import forms
output = script.g... | unknown | codeparrot/codeparrot-clean | ||
# validateNoCapitalizedCalls
## File
`src/Validation/ValidateNoCapitalizedCalls.ts`
## Purpose
This validation pass ensures that capitalized functions are not called directly in a component. In React, capitalized functions are conventionally reserved for components, which should be invoked via JSX syntax rather than ... | unknown | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/docs/passes/42-validateNoCapitalizedCalls.md |
'''
eveningcals: takes evening calibration sequence:
# 1 long darks
# 1 QTH
# ThAr and UNe at both dither A and dither B
# 1 long darks
# 10/1/2011
History
02-21-2013 EM: proceed if gang connector is in podium;
02-21-2013 EM: UT time changed to TAI
02-21-2013 EM: check time when to run 22-24 h, if other time ... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/gpio-matrix-keypad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO matrix keypad
maintainers:
- Marek Vasut <marek.vasut@gmail.com>
description:
GPIO driven matrix keypad is ... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml |
# -*- coding: utf-8 -*-
#
# Copyright (©) 2014 Gustavo Noronha Silva
# Copyright (©) 2016 Marcelo Jorge Vieira
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the... | unknown | codeparrot/codeparrot-clean | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: MPL-2.0
package logical
import (
"context"
"testing"
"github.com/stretchr/testify/assert"
)
func TestContextDisableReplicationStatusEndpointsValue(t *testing.T) {
testcases := []struct {
name string
ctx context.Context
expect... | go | github | https://github.com/hashicorp/vault | sdk/logical/request_test.go |
import { ok, test } from '../../test';
export default test({
test({ assert, target }) {
const div = target.querySelector('div');
ok(div);
assert.equal(div.style.backgroundImage, 'url(https://example.com/foo.jpg)');
assert.equal(div.style.color, 'red');
}
}); | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/runtime-legacy/samples/attribute-url/_config.js |
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2018 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | go | github | https://github.com/etcd-io/etcd | server/storage/wal/file_pipeline_test.go |
name: CI (push)
on:
push:
branches:
- main
- '[0-9]+.[0-9]+.x'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
defaults:
run:
shell: bash
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
... | unknown | github | https://github.com/angular/angular | .github/workflows/ci.yml |
/*
* 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/context/support/PostProcessorRegistrationDelegate.java |
it("should handle bound function expressions", function(done) {
require.ensure(
[],
function(require) {
expect(this).toEqual({ test: true });
require("./empty?test");
expect(process.nextTick).toBeTypeOf("function"); // check if injection still works
require.ensure(
[],
function(require) {
... | javascript | github | https://github.com/webpack/webpack | test/cases/chunks/parsing/index.js |
/*
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.analysis.api.fir.test.cases.generated.cases.components.typeInfoProvider;
import ... | java | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/typeInfoProvider/FirIdeNormalAnalysisScriptSourceModuleDoubleColonReceiverTypeTestGenerated.java |
# -*- coding: utf-8 -*-
import os
import pytest
from cookiecutter import config
from cookiecutter.exceptions import (
ConfigDoesNotExistException, InvalidConfiguration
)
def test_merge_configs():
default = {
'cookiecutters_dir': '/home/example/some-path-to-templates',
'replay_dir': '/home/exam... | unknown | codeparrot/codeparrot-clean | ||
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef INT_BLK_MQ_H
#define INT_BLK_MQ_H
#include <linux/blk-mq.h>
#include "blk-stat.h"
struct blk_mq_tag_set;
struct elevator_tags;
struct blk_mq_ctxs {
struct kobject kobj;
struct blk_mq_ctx __percpu *queue_ctx;
};
/**
* struct blk_mq_ctx - State for a software queue fa... | c | github | https://github.com/torvalds/linux | block/blk-mq.h |
import re
from django import forms
from django.db.models import Q
from django.template import Context
from django.template.loader import get_template
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_lazy
from crispy_forms.helper import FormHelper
from crispy_forms impor... | unknown | codeparrot/codeparrot-clean | ||
import { test } from '../../test';
export default test({
test(assert, target) {
// This test case guards against a potential future bug where we could optimize html tags away for static content:
// Even if the {@html } block seems static, it should be preserved as such, because it could be dynamic originally
//... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/hydration/samples/raw-mismatch-static/_config.js |
from __future__ import print_function
import os
import sys
GREEN = '\033[32m'
YELLOW = '\033[33m'
RED = '\033[31m'
EXIT = '\033[0m'
INFO = 'info'
WARNING = 'warning'
ERROR = 'error'
LEVEL_COLOR_MAP = {
INFO: GREEN,
WARNING: YELLOW,
ERROR: RED
}
class Sender(object):
def __init__(self, prefix=None):... | unknown | codeparrot/codeparrot-clean | ||
from django.core import management
from django.test import TestCase
from models import Article
class SampleTestCase(TestCase):
fixtures = ['fixture1.json', 'fixture2.json']
def testClassFixtures(self):
"Test cases can load fixture objects into models defined in packages"
self.assertEqual(Arti... | unknown | codeparrot/codeparrot-clean | ||
"""Unit tests of MQConnectionManager in the DIRAC.Resources.MessageQueue.MConnectionManager
Also, test of internal functions for mq connection storage.
"""
## ignore use of __functions, _functions
#pylint: disable=no-member, protected-access
import unittest
import mock
from DIRAC import S_OK
from DIRAC.Resources.M... | unknown | codeparrot/codeparrot-clean | ||
/*
* 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-tests/test/com/google/common/collect/MapsTest.java |
"""
Tests for Platform against Mobile App Request
"""
import ddt
from django.test import TestCase
from mobile_api.mobile_platform import MobilePlatform
@ddt.ddt
class TestMobilePlatform(TestCase):
"""
Tests for platform against mobile app request
"""
@ddt.data(
("edX/org.edx.mobile (0.1.5; OS ... | 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/readability/ContainerContainsCheck.h |
/*
* Copyright 2012-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | java | github | https://github.com/spring-projects/spring-boot | buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/LifecycleVersion.java |
from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
try:
from PIL import Image
except ImportError:
Image = None
@python_2_unicode_compatible
class CaseTestModel(models.Model):
integer = models.IntegerField()
integer2 = mod... | unknown | codeparrot/codeparrot-clean | ||
// generated with @7nohe/openapi-react-query-codegen@1.6.2
import { type QueryClient } from "@tanstack/react-query";
import { AssetService, AuthLinksService, BackfillService, CalendarService, ConfigService, ConnectionService, DagRunService, DagService, DagSourceService, DagStatsService, DagVersionService, DagWarningSe... | typescript | github | https://github.com/apache/airflow | airflow-core/src/airflow/ui/openapi-gen/queries/ensureQueryData.ts |
from io import StringIO
import flask
def test_suppressed_exception_logging():
class SuppressedFlask(flask.Flask):
def log_exception(self, ctx, exc_info):
pass
out = StringIO()
app = SuppressedFlask(__name__)
@app.route("/")
def index():
raise Exception("test")
rv... | python | github | https://github.com/pallets/flask | tests/test_subclassing.py |
"""SCons.Tool.cyglink
Customization of gnulink for Cygwin (http://www.cygwin.com/)
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
import re
import os
import SCons.Action
import SCons.Util
import SCons.Tool
... | unknown | codeparrot/codeparrot-clean | ||
- hosts: localhost
gather_facts: false
vars_files:
- vaulted.yml
tasks:
- name: see if we can decrypt
assert:
that:
- control is defined
- symlink == 'this is a test' | unknown | github | https://github.com/ansible/ansible | test/integration/targets/ansible-vault/symlink.yml |
<!---
Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ... | unknown | github | https://github.com/huggingface/transformers | i18n/README_bn.md |
import type * as postcss from 'postcss'
import { atRule, comment, decl, rule, type AstNode } from '../../tailwindcss/src/ast'
import { createLineTable, type LineTable } from '../../tailwindcss/src/source-maps/line-table'
import type { Source, SourceLocation } from '../../tailwindcss/src/source-maps/source'
import { Def... | typescript | github | https://github.com/tailwindlabs/tailwindcss | packages/@tailwindcss-postcss/src/ast.ts |
# dts-test
Tests TypeScript types to ensure the types remain as expected.
- This directory is included in the root `tsconfig.json`, where package imports are aliased to `src` directories, so in IDEs and the `pnpm check` script the types are validated against source code.
- When running `tsc` with `packages-private/d... | unknown | github | https://github.com/vuejs/core | packages-private/dts-test/README.md |
# frozen_string_literal: true
# :markup: markdown
module ActionCable
module Channel
module PeriodicTimers
extend ActiveSupport::Concern
included do
class_attribute :periodic_timers, instance_reader: false, default: []
after_subscribe :start_periodic_timers
after_unsubscri... | ruby | github | https://github.com/rails/rails | actioncable/lib/action_cable/channel/periodic_timers.rb |
# XXX TO DO:
# - popup menu
# - support partial or total redisplay
# - key bindings (instead of quick-n-dirty bindings on Canvas):
# - up/down arrow keys to move focus around
# - ditto for page up/down, home/end
# - left/right arrows to expand/collapse & move out/in
# - more doc strings
# - add icons for "file", ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
pygments.lexers.dotnet
~~~~~~~~~~~~~~~~~~~~~~
Lexers for .net languages.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, DelegatingLexer, bygroups, include, ... | unknown | codeparrot/codeparrot-clean | ||
:host {
display: block;
max-height: 50vh;
overflow-y: auto;
overscroll-behavior: contain;
i {
font-size: 1.2rem;
}
.title {
margin-inline: 1rem;
margin-block-start: 1rem;
margin-block-end: 0;
font-size: 0.875rem;
font-weight: 600;
}
.history-results {
list-style-type: no... | unknown | github | https://github.com/angular/angular | adev/shared-docs/components/search-history/search-history.component.scss |
from copy import deepcopy
from django.contrib import admin
from django.http import QueryDict
from django.utils.safestring import mark_safe
from django.utils.translation import gettext_lazy as _
from adminsortable2.admin import SortableInlineAdminMixin
from ..models import Category, Comment, NavItem, Page, StaticPage... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
__author__ = 'greghines'
import numpy as np
import os
import pymongo
import sys
import urllib
import matplotlib.cbook as cbook
from PIL import Image
import matplotlib.pyplot as plt
import warnings
import random
import math
if os.path.exists("/home/ggdhines"):
sys.path.append("/home/ggdhines/P... | unknown | codeparrot/codeparrot-clean | ||
#include <c10/core/impl/HermeticPyObjectTLS.h>
namespace c10::impl {
thread_local static std::atomic<bool> hermeticPyObjectState{false};
std::atomic<bool> HermeticPyObjectTLS::haveState_{false};
void HermeticPyObjectTLS::set_state(bool state) {
hermeticPyObjectState = state;
}
bool HermeticPyObjectTLS::get_tls_s... | cpp | github | https://github.com/pytorch/pytorch | c10/core/impl/HermeticPyObjectTLS.cpp |
#!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2010-2011 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
"""
Server API
Reference for Server API (REST/Json)
OpenAPI spec version: 1.4.41
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class Address(object):
"""
NOTE: This class is auto generated... | unknown | codeparrot/codeparrot-clean | ||
test_kind: multi_stmt_txn_passthrough
selector:
roots:
- jstests/core/**/*.js
exclude_files:
# These tests already run with transactions.
- jstests/core/txns/**/*.js
##
## Limitations with the way the runner file injects transactions.
##
# These tests expects some statements to error,... | unknown | github | https://github.com/mongodb/mongo | buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_kill_stepdown_terminate_jscore_passthrough.yml |
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package transit
import (
"context"
"crypto/x509"
"encoding/pem"
"fmt"
"strconv"
"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/helper/keysutil"
"github.com/hashicorp/vault/sdk/logical"
)
const WrappingKeyName ... | go | github | https://github.com/hashicorp/vault | builtin/logical/transit/path_wrapping_key.go |
#!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='CalendarProvider',
fields=[
('id', models.AutoFi... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
Sources:
Croatian Counties: http://en.wikipedia.org/wiki/ISO_3166-2:HR
Croatia doesn't have official abbreviations for counties.
The ones provided are in common use.
"""
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
HR_COUNTY_C... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from textw... | unknown | codeparrot/codeparrot-clean | ||
'use strict'
/**
* Module dependencies.
*/
var cookieSession = require('cookie-session');
var express = require('../../');
var app = module.exports = express();
// add req.session cookie support
app.use(cookieSession({ secret: 'manny is cool' }));
// do something with the session
app.get('/', function (req, res)... | javascript | github | https://github.com/expressjs/express | examples/cookie-sessions/index.js |
# -*- coding: utf-8 -*-
#
## This file is part of Zenodo.
## Copyright (C) 2014 CERN.
##
## Zenodo 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 ... | unknown | codeparrot/codeparrot-clean | ||
from flask import Markup, url_for
from flask_appbuilder.models.mixins import AuditMixin, FileColumn
from sqlalchemy import Table, Column, Integer, String, Boolean, ForeignKey
from sqlalchemy.orm import relationship
from flask_appbuilder import Model
from flask_appbuilder.filemanager import get_file_original_name
"""
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright (C) 2006-2007 Søren Roug, European Environment Agency
#
# 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, or (at you... | unknown | codeparrot/codeparrot-clean | ||
import warnings
from functools import wraps
from django.contrib.sites.models import get_current_site
from django.core import urlresolvers
from django.core.paginator import EmptyPage, PageNotAnInteger
from django.http import Http404
from django.template.response import TemplateResponse
from django.utils import six
def... | unknown | codeparrot/codeparrot-clean | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package remote
import (
"context"
"log"
"time"
)
// IntegrationContext is a set of data that is useful when performing HCP Terraform integration operations
type IntegrationContext struct {
StopContext context.Context
CancelContext context.C... | go | github | https://github.com/hashicorp/terraform | internal/backend/remote/cloud_integration.go |
# -*- coding: ISO-8859-1 -*-
# Copyright 2010 Dirk Holtwick, holtwick.it
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | unknown | codeparrot/codeparrot-clean | ||
#ryan g coleman, ryangc@mail.med.upenn.edu
#copyright 2006-7 ryan g coleman, kim sharp crystal.med.upenn.edu
#geometric primitives like distance functions and such
import math
useNumeric = True # use numeric, if available
useNumpy = False
try: # to use numeric
import Numeric
import Matrix
import LinearAlgebra
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import warnings
from django.forms import *
from django.test import TestCase
from django.utils.translation import ugettext_lazy, override
from forms_tests.models import Cheese
class FormsRegressionsTestCase(TestCase):
def test_class(self):
#... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import, unicode_literals
import unittest
import mock
import pykka
from mopidy.core import Core
from mopidy.internal import versioning
class CoreActorTest(unittest.TestCase):
def setUp(self): # noqa: N802
self.backend1 = mock.Mock()
self.backend1.uri_schemes.get... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
#ifndef REPLAY_H
#define REPLAY_H
#include "hash.h"
struct repository;
struct rev_info;
/*
* A set of options that can be passed to `replay_revisions()`.
*/
struct replay_revisions_options {
/*
* Starting point at which to create the new commits; must be a branch
* name. The branch will be updated to point to... | c | github | https://github.com/git/git | replay.h |
# -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
from eve.uti... | unknown | codeparrot/codeparrot-clean | ||
from setuptools import setup, find_packages
from codecs import open
from os import path
def readme():
with open('README.md', encoding='utf-8') as f:
return f.read()
setup(
name='opencc-python-reimplemented',
version='0.1.6',
description='OpenCC made with Python',
long_descr... | unknown | codeparrot/codeparrot-clean | ||
/* Errno module */
// Need limited C API version 3.13 for Py_mod_gil
#include "pyconfig.h" // Py_GIL_DISABLED
#ifndef Py_GIL_DISABLED
# define Py_LIMITED_API 0x030d0000
#endif
#include "Python.h"
#include <errno.h> // EPIPE
/* Windows socket errors (WSA*) */
#ifdef MS_WINDOWS
# ifndef WIN32_LEAN_... | c | github | https://github.com/python/cpython | Modules/errnomodule.c |
#
# 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, software
# ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com>
# Chris Houseknecht, <house@redhat.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Soft... | unknown | codeparrot/codeparrot-clean | ||
"""Support for Homematic thermostats."""
import logging
from homeassistant.components.climate import ClimateDevice
from homeassistant.components.climate.const import (
STATE_AUTO, STATE_MANUAL, SUPPORT_OPERATION_MODE,
SUPPORT_TARGET_TEMPERATURE)
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS
f... | unknown | codeparrot/codeparrot-clean | ||
ok_label: OK | unknown | github | https://github.com/symfony/symfony | src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/LegacyBundle/Resources/translations/legacy.en.yaml |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/samsung,exynos-ext-clock.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Samsung SoC external/osc/XXTI/XusbXTI clock
maintainers:
- Chanwoo Choi <cw00.choi@samsung.com>
- Krzysztof ... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/clock/samsung,exynos-ext-clock.yaml |
# Copyright 2017 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 agreed to in writing, ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
pygments.lexers.nimrod
~~~~~~~~~~~~~~~~~~~~~~
Lexer for the Nim language (formerly known as Nimrod).
:copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2011 OpenStack Foundation
# Copyright 2012 Justin Santa Barbara
# 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/l... | unknown | codeparrot/codeparrot-clean | ||
package service
import (
"context"
"strconv"
"sync/atomic"
"github.com/containerd/log"
"github.com/moby/moby/api/types/events"
volumetypes "github.com/moby/moby/api/types/volume"
"github.com/moby/moby/v2/daemon/internal/directory"
"github.com/moby/moby/v2/daemon/internal/filters"
"github.com/moby/moby/v2/dae... | go | github | https://github.com/moby/moby | daemon/volume/service/service.go |
from __future__ import annotations
import json
from typing import (
TYPE_CHECKING,
Any,
)
from pandas.io.excel._base import ExcelWriter
from pandas.io.excel._util import (
combine_kwargs,
validate_freeze_panes,
)
if TYPE_CHECKING:
from pandas._typing import (
ExcelWriterIfSheetExists,
... | python | github | https://github.com/pandas-dev/pandas | pandas/io/excel/_xlsxwriter.py |
#
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license
#
from ipalib import api, errors
from ipalib import Updater
from ipapython.dn import DN
from ipapython.ipa_log_manager import root_logger
from ipaserver.install import sysupgrade
class update_passync_privilege_check(Updater):
def execute(self, ... | unknown | codeparrot/codeparrot-clean | ||
'''tzinfo timezone information for America/Manaus.'''
from pytz.tzinfo import DstTzInfo
from pytz.tzinfo import memorized_datetime as d
from pytz.tzinfo import memorized_ttinfo as i
class Manaus(DstTzInfo):
'''America/Manaus timezone definition. See datetime.tzinfo for details'''
zone = 'America/Manaus'
... | unknown | codeparrot/codeparrot-clean | ||
# 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 applica... | unknown | codeparrot/codeparrot-clean | ||
from openerp.osv import fields as old_fields
from openerp import api,models,fields,tools
try:
from openerp.addons.email_template.email_template import mako_template_env
except ImportError:
try:
from openerp.addons.mail.mail_template import mako_template_env
except ImportError:
pass
from ope... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
"""
Collects stats from bind 9.5's statistics server
#### Dependencies
* [bind 9.5](http://www.isc.org/software/bind/new-features/9.5)
configured with libxml2 and statistics-channels
"""
import diamond.collector
import sys
import urllib2
if sys.version_info >= (2, 5):
import xml.etree.cEle... | unknown | codeparrot/codeparrot-clean | ||
# 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, software
# distributed u... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
## This file is part of Invenio.
## Copyright (C) 2011, 2012, 2013 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... | unknown | codeparrot/codeparrot-clean | ||
from .main import TorrentShack
def start():
return TorrentShack()
config = [{
'name': 'torrentshack',
'groups': [
{
'tab': 'searcher',
'list': 'torrent_providers',
'name': 'TorrentShack',
'description': 'See <a href="https://www.torrentshack.net/">To... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Cumulus Networks <ce-ceng@cumulusnetworks.com>
# 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... | unknown | codeparrot/codeparrot-clean | ||
# 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, software
# distributed under the... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | unknown | codeparrot/codeparrot-clean | ||
import re
from django.test import TestCase
from django.test.client import Client
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User, AnonymousUser
from django.contrib.sites.models import Site
from tastypie.test import ResourceTestCase
from actstream import follow,action
from actst... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2000-2014 Bastian Kleineidam
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later versi... | 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-indexer/src/main/java/org/springframework/context/index/processor/PackageInfoStereotypesProvider.java |
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | 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/cmd/phases/init/addons_test.go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.