code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""`TranslationTemplatesBuild` tests."""
__metaclass__ = type
from storm.store import Store
from zope.component import getUtility
from zope.interface.verify import verifyObject
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
requests.models
~~~~~~~~~~~~~~~
This module contains the primary objects that power Requests.
"""
import collections
import datetime
from io import BytesIO, UnsupportedOperation
from .hooks import default_hooks
from .structures import CaseInsensitiveDict
from .auth import HTTPBasicAuth
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
import datetime
from itertools import product
import ephem
import nodes
from nodes import Node
from type.type_infinite_list import DummyList
def all_combinations():
g_contents = nodes.nodes["alphabet"].contents
i = 0
while 1:
i += 1
yield from map("".join, product(g_... | unknown | codeparrot/codeparrot-clean | ||
// https://drafts.csswg.org/cssom/#serialize-an-identifier
export function escape(value: string) {
if (arguments.length === 0) {
throw new TypeError('`CSS.escape` requires an argument.')
}
let string = String(value)
let length = string.length
let index = -1
let codeUnit: number
let result = ''
let f... | typescript | github | https://github.com/tailwindlabs/tailwindcss | packages/tailwindcss/src/utils/escape.ts |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 VMware, 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/lic... | unknown | codeparrot/codeparrot-clean | ||
class Node(object):
def __init__(self, x, nxt):
self.x = x
self.next = nxt
def is_palindrome(h):
# find the middle
m = h
n = h
while n is not None:
m = m.next
n = n.next
if n is None:
break
n = n.next
# reverse to the end
prev = N... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
"""Time estimation/continuity task."""
#########################################################
# STAP constants and stdio
import json,sys
if 'raw_input' in vars(__builtins__): input = raw_input #Fix for Python 2.x raw_input
def send(d): print(json.dumps(d)); sys.stdout.flush()
def recv(): ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
# Copyright (C) 2011 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following ... | unknown | codeparrot/codeparrot-clean | ||
/* boundary of each */
.a.svelte-xyz + .b:where(.svelte-xyz) {
color: green;
}
.c.svelte-xyz + .d:where(.svelte-xyz) {
color: green;
}
/* if array is empty */
.a.svelte-xyz + .d:where(.svelte-xyz) {
color: green;
}
/* if array has multiple items */
.c.svelte-xyz + .b:where(.svelte-xyz) {
color: green;
... | css | github | https://github.com/sveltejs/svelte | packages/svelte/tests/css/samples/siblings-combinator-each-2/expected.css |
"""Locally Linear Embedding"""
# Author: Fabian Pedregosa -- <fabian.pedregosa@inria.fr>
# Jake Vanderplas -- <vanderplas@astro.washington.edu>
# License: BSD 3 clause (C) INRIA 2011
import numpy as np
from scipy.linalg import eigh, svd, qr, solve
from scipy.sparse import eye, csr_matrix
from ..base import B... | unknown | codeparrot/codeparrot-clean | ||
"""
Exercises tests on the base_store_provider file
"""
from django.test import TestCase
from instructor.enrollment_report import AbstractEnrollmentReportProvider
from instructor.paidcourse_enrollment_report import PaidCourseEnrollmentReportProvider
class BadImplementationAbstractEnrollmentReportProvider(AbstractEnro... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Copyright 2007 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 o... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals
import os.path
from django.forms import FilePathField, ValidationError, forms
from django.test import SimpleTestCase
from django.utils import six
from django.utils._os import upath
def fix_os_paths(x):
if isinstance(x, six.string_types):
return x.replace('\\', '/')... | unknown | codeparrot/codeparrot-clean | ||
import { flushSync } from 'svelte';
import { test } from '../../test';
export default test({
html: `
<div>
<p>a</p>
</div>
`,
test({ assert, target, window }) {
const div = target.querySelector('div');
const click = new window.MouseEvent('click', { bubbles: true });
div?.dispatchEvent(click);
flush... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/runtime-legacy/samples/component-slot-let-d/_config.js |
# -*- coding: utf-8 -*-
import pytest
from os.path import join
from django_extensions.management.commands.runserver_plus import Command as RunServerCommand
from unittest import mock
location = join('some', 'strange', 'path')
different_path = join('some', 'other', 'path')
@pytest.mark.parametrize("cert_option, key_... | unknown | codeparrot/codeparrot-clean | ||
# frozen_string_literal: true
require "cases/helper"
class SqlTypesTest < ActiveRecord::AbstractMysqlTestCase
def test_binary_types
assert_equal "varbinary(64)", type_to_sql(:binary, 64)
assert_equal "varbinary(4095)", type_to_sql(:binary, 4095)
assert_equal "blob", type_to_sql(:binary, 4096)
assert... | ruby | github | https://github.com/rails/rails | activerecord/test/cases/adapters/abstract_mysql_adapter/sql_types_test.rb |
/* Copyright 2019 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/lite/quantization/common/quantization_lib/quantization_config.h |
# 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 | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/brcm,bcm59056.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom BCM590xx Power Management Units
maintainers:
- Artur Weber <aweber.kernel@gmail.com>
properties:
compatible:
... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/mfd/brcm,bcm59056.yaml |
import {
Popover,
ActionIcon,
Fieldset,
Checkbox,
Stack,
Group,
NumberInput,
} from "@mantine/core";
import { IconSettings } from "@tabler/icons-react";
import { FC } from "react";
import { useAppDispatch } from "../state/hooks";
import { updateSettings, useSettings } from "../state/settingsSlice";
import... | typescript | github | https://github.com/prometheus/prometheus | web/ui/mantine-ui/src/components/SettingsMenu.tsx |
/// IMPORTANT:
///
/// These APIs are `internal` rather than `public` on purpose - specifically due to the high risk of name collisions
/// in the extensions and the extreme awkwardness of vendor prefixing for this use case.
import struct Foundation.Data
extension BaseNEncoding {
/// Specialization of ``encode(_:... | swift | github | https://github.com/vapor/vapor | Sources/Vapor/Utilities/Base32.swift |
from django.contrib.gis.db import models
class RasterModel(models.Model):
rast = models.RasterField(
"A Verbose Raster Name", null=True, srid=4326, spatial_index=True, blank=True
)
rastprojected = models.RasterField("A Projected Raster Table", srid=3086, null=True)
geom = models.PointField(null... | python | github | https://github.com/django/django | tests/gis_tests/rasterapp/models.py |
// Formatting library for C++ - dynamic argument lists
//
// Copyright (c) 2012 - present, Victor Zverovich
// All rights reserved.
//
// For the license information refer to format.h.
#ifndef FMT_ARGS_H_
#define FMT_ARGS_H_
#ifndef FMT_MODULE
# include <functional> // std::reference_wrapper
# include <memory> ... | c | github | https://github.com/nodejs/node | deps/LIEF/third-party/spdlog/include/spdlog/fmt/bundled/args.h |
"""
Testing for the bagging ensemble module (sklearn.ensemble.bagging).
"""
# Author: Gilles Louppe
# License: BSD 3 clause
import numpy as np
from sklearn.base import BaseEstimator
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.te... | unknown | codeparrot/codeparrot-clean | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package command
import (
"fmt"
"strings"
"github.com/hashicorp/cli"
"github.com/hashicorp/vault/api"
"github.com/posener/complete"
)
var (
_ cli.Command = (*PluginReloadCommand)(nil)
_ cli.CommandAutocomplete = (*PluginReloadC... | go | github | https://github.com/hashicorp/vault | command/plugin_reload_status.go |
from importlib import machinery
from .. import abc
from .. import util
from . import util as builtin_util
import sys
import unittest
class FinderTests(abc.FinderTests):
"""Test find_module() for built-in modules."""
def test_module(self):
# Common case.
with util.uncache(builtin_util.NAME):
... | unknown | codeparrot/codeparrot-clean | ||
#!/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 distribut... | unknown | codeparrot/codeparrot-clean | ||
from test.test_support import run_unittest, check_warnings
import cgi
import os
import sys
import tempfile
import unittest
class HackedSysModule:
# The regression test will have real values in sys.argv, which
# will completely confuse the test of the cgi module
argv = []
stdin = sys.stdin
cgi.sys = Ha... | unknown | codeparrot/codeparrot-clean | ||
from oldowan.mtconvert import seq2sites, sites2seq, str2sites
from string import translate
import pandas as pd
import numpy as np
import sys
sys.path.append('../../scripts')
from utils import *
## load metadata
metadata = pd.read_csv('metadata.csv', index_col=0)
region = range2region(metadata.ix[0,'SeqRange'])
with ... | unknown | codeparrot/codeparrot-clean | ||
# frozen_string_literal: true
require_relative 'exception'
module Psych
class SyntaxError < Psych::Exception
attr_reader :file, :line, :column, :offset, :problem, :context
def initialize file, line, col, offset, problem, context
err = [problem, context].compact.join ' '
filename = file || '... | ruby | github | https://github.com/ruby/ruby | ext/psych/lib/psych/syntax_error.rb |
#!/usr/bin/env python
'''
Functions for calculating statistics on arrays (either numpy or numarray)
A statistic is only calculated once on an array. Future attempts to
calculate the statistic will return the previously calculated value.
This assumes that the values in the array are constant. If the
array values have ... | unknown | codeparrot/codeparrot-clean | ||
//===- bolt/Rewrite/RewriteInstance.cpp - ELF rewriter --------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | cpp | github | https://github.com/llvm/llvm-project | bolt/lib/Rewrite/RewriteInstance.cpp |
<html>
<!--
Copyright 2011 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<head>
<script src="gopher.js"></script>
<script src="popup.js"></script>
</head>
<body style='margin: 0.5em; font-family: sans;'>
<small><a href="#" u... | html | github | https://github.com/golang/go | misc/chrome/gophertool/popup.html |
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashb... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/input/migrated_dev_dashboards/panel-barchart/v1beta1.barchart-tooltips-legends.v42.json |
"""SCons.Node
The Node package for the SCons software construction utility.
This is, in many ways, the heart of SCons.
A Node is where we encapsulate all of the dependency information about
any thing that SCons can build, or about any thing which SCons can use
to build some other thing. The canonical "thing," of co... | unknown | codeparrot/codeparrot-clean | ||
#!/bin/false
# This file is part of Espruino, a JavaScript interpreter for Microcontrollers
#
# Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk>
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at h... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A module for the build commands."""
import cr
class BuildCommand(cr.Command):
"""The implementation of the build command.
This is a thin shell over... | unknown | codeparrot/codeparrot-clean | ||
- Feature Name: User-Defined Functions
- Status: in-progress
- Start Date: 2022-06-07
- Authors: Marcus Gartner, Chengxiong Ruan, Andrew Werner, Oliver Tan
- RFC PR: [#83904](https://github.com/cockroachdb/cockroach/pull/83904)
- Cockroach Issue: [#58356](https://github.com/cockroachdb/cockroach/issues/58356)
## Summa... | unknown | github | https://github.com/cockroachdb/cockroach | docs/RFCS/20220706_user_defined_functions.md |
#
# This file is part of pyasn1 software.
#
# Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com>
# License: http://snmplabs.com/pyasn1/license.html
#
from sys import version_info
if version_info[0] <= 2:
int2oct = chr
# noinspection PyPep8
ints2octs = lambda s: ''.join([int2oct(x) for x in s])
n... | unknown | codeparrot/codeparrot-clean | ||
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#include <opencv2/core.hpp>
#include <opencv2/calib3d.hpp>
#include <opencv2/cvconfig.h>
#include <opencv2/highgui.hpp>
#incl... | cpp | github | https://github.com/opencv/opencv | apps/interactive-calibration/main.cpp |
import sys
from os.path import abspath, dirname, join
sys.path.insert(0, '../..')
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ROOT_PATH = abspath(dirname(__file__))
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
... | unknown | codeparrot/codeparrot-clean | ||
import os
import sys
from robot.variables import GLOBAL_VARIABLES
from robot.api import logger
from keywordgroup import KeywordGroup
class _LoggingKeywords(KeywordGroup):
# Private
def _debug(self, message):
logger.debug(message)
def _get_log_dir(self):
logfile = GLOBAL_VARIABLES['${LOG ... | unknown | codeparrot/codeparrot-clean | ||
//===--- APIDigesterData.h - Declaration of api digester data ---*- 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/IDE/APIDigesterData.h |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import sys, os
version = '1.2'
setup(name='sip-proxpy',
version=version,
description="Customizable HTTP/HTTPS proxy with plugin architecture",
long_description="""\
A fork of ProxPy as used in DAVID Social ... | unknown | codeparrot/codeparrot-clean | ||
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
from cryptography import utils
from cryptography.exceptions import (
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
from datetime import timedelta
from factory import SubFactory, LazyAttribute, RelatedFa... | unknown | codeparrot/codeparrot-clean | ||
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-
# vi: set ft=python sts=4 ts=4 sw=4 noet :
# This file is part of Fail2Ban.
#
# Fail2Ban 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;... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2013, 2015 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distribut... | unknown | codeparrot/codeparrot-clean | ||
# vim:fileencoding=utf-8:noet
from __future__ import (division, absolute_import, print_function)
import argparse
def get_argparser(ArgumentParser=argparse.ArgumentParser):
parser = ArgumentParser(description='Daemon that improves powerline performance.')
parser.add_argument(
'--quiet', '-q', action='store_true',
... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2022 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.
package sql
import (
"context"
"fmt"
"time"
"github.com/cockroachdb/cockroach/pkg/multitenant/mtinfopb"
"github.com/cockroachdb/cockroach/pkg/multitenant/tenantca... | go | github | https://github.com/cockroachdb/cockroach | pkg/sql/show_tenant.go |
use std::borrow::Cow;
use serde::{
de::{self, Deserializer, Error as DeError, Visitor},
forward_to_deserialize_any,
};
use crate::{
path::{Path, PathIter},
Quoter, ResourcePath,
};
thread_local! {
static FULL_QUOTER: Quoter = Quoter::new(b"", b"");
}
macro_rules! unsupported_type {
($trait_f... | rust | github | https://github.com/actix/actix-web | actix-router/src/de.rs |
"""
Module to setup the PypeIt debugger
"""
from __future__ import (print_function, absolute_import, division, unicode_literals)
import matplotlib.pyplot as plt
import numpy as np
# These need to be outside of the def's
try:
from pypeit.ginga import show_image
except ImportError: # Ginga is not yet required
... | unknown | codeparrot/codeparrot-clean | ||
import { expect } from "@playwright/test";
import dedent from "dedent";
import {
reactRouterConfig,
viteConfig,
test,
type Files,
} from "./helpers/vite.js";
const tsx = dedent;
test.describe("Vite preview", () => {
test("serves built app with vite preview", async ({ vitePreview, page }) => {
const fil... | typescript | github | https://github.com/remix-run/react-router | integration/vite-preview-test.ts |
<!---
Copyright 2022 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 | docs/source/zh/perf_hardware.md |
##
# Copyright 2009-2021 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | unknown | codeparrot/codeparrot-clean | ||
# test_config.py -- Tests for reading and writing configuration files
# Copyright (C) 2011 Jelmer Vernooij <jelmer@samba.org>
#
# 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
#... | unknown | codeparrot/codeparrot-clean | ||
# CliHelloWorld
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.0-next.9.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `... | unknown | github | https://github.com/angular/angular | integration/cli-hello-world/README.md |
from __future__ import absolute_import, division, unicode_literals
from types import ModuleType
try:
import xml.etree.cElementTree as default_etree
except ImportError:
import xml.etree.ElementTree as default_etree
__all__ = ["default_etree", "MethodDispatcher", "isSurrogatePair",
"surrogatePairToC... | 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/test/java/org/apache/kafka/common/requests/AlterReplicaLogDirsResponseTest.java |
from django.core.files.temp import NamedTemporaryFile
from django.core.files.images import ImageFile
import urllib2
from django.core.files.storage import get_storage_class
from django.core.files.storage import default_storage
from mimetypes import guess_extension
from django.contrib.sites.models import Site
from electi... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2023 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/clap/convert_clap_original_pytorch_to_hf.py |
"""
Archive tools for wheel.
"""
import os
import time
import logging
import os.path
import zipfile
log = logging.getLogger("wheel")
def archive_wheelfile(base_name, base_dir):
'''Archive all files under `base_dir` in a whl file and name it like
`base_name`.
'''
olddir = os.path.abspath(os.curdir)
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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 followi... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) Roman Arutyunyan
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>
#include <ngx_event_quic_connection.h>
static void ngx_quic_close_accepted_connection(ngx_connection_t *c);
static ngx_connection_t *ngx_quic_lookup_connection(ngx_listening_t *ls... | c | github | https://github.com/nginx/nginx | src/event/quic/ngx_event_quic_udp.c |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/bus/brcm,gisb-arb.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom GISB bus Arbiter controller
maintainers:
- Florian Fainelli <f.fainelli@gmail.com>
properties:
compatible:
... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/bus/brcm,gisb-arb.yaml |
#! /usr/bin/env python
#
# Author: Damian Eads
# Date: April 17, 2008
#
# Copyright (C) 2008 Damian Eads
#
# 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 copy... | unknown | codeparrot/codeparrot-clean | ||
import re
import view
CENTER = 0
LEFT = 1
RIGHT = 2
TOP = 3
BOTTOM = 4
WORD_WRAP = 0
CLIP = 1
class Label(view.View):
"""Multi-line, word-wrappable, uneditable text view.
Attributes:
halign
CENTER, LEFT, or RIGHT. Horizontal alignment of
text.
valign
... | unknown | codeparrot/codeparrot-clean | ||
from setuptools import setup
description = """
Plugin for django-redis that supports Redis Sentinel
"""
setup(
name="django-redis-sentinel",
url="https://github.com/KabbageInc/django-redis-sentinel",
author="Chris Heisel",
author_email="cheisel@kabbage.com",
version="1.0",
packages=[
"... | unknown | codeparrot/codeparrot-clean | ||
// #docplaster ...
/* To learn more about this file see: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
// #docregion angular-compiler-options-app
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
// #enddocregion angular-compiler-options-app
... | json | github | https://github.com/angular/angular | adev/src/content/examples/angular-compiler-options/tsconfig.app.json |
// Copyright 2016 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | go | github | https://github.com/etcd-io/etcd | tests/e2e/ctl_v3_member_test.go |
#!/usr/bin/env
# -*- coding: utf-8 -*-
"""Migrates old-style unregistered users (dictionaries in Node#contributor_list)
to actual User records.
"""
import logging
from modularodm.exceptions import ValidationValueError
from website import app, models
from framework import auth
from framework.auth import Auth
from tests... | 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 us... | unknown | codeparrot/codeparrot-clean | ||
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class QElidedLabel(QLabel):
_width = _text = _elided = None
def __init__(self, text='', width=40, parent=None):
super(QElidedLabel, self).__init__(text, parent)
self.setMinimumWidth(width if width > 0 else 1)
def elidedText(self):
... | unknown | codeparrot/codeparrot-clean | ||
#
# (c) 2018 Extreme Networks Inc.
#
# 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.
#
# Ans... | unknown | codeparrot/codeparrot-clean | ||
# urllib3/poolmanager.py
# Copyright 2008-2014 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import logging
try: # Python 3
from urllib.parse import urljoin
except ImportError:
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# encoding: utf-8
"""
这个文件中记录了所有的全局静态配置变量。现在只有named.conf所属路径和nameddb目录存储路径。
可以使用环境变量来设置配置,环境变量定义如下:
bind启动时的chroot目录,如果没有使用chroot设置为/
XBAYDNS_CHROOT_PATH
bind的配置文件路径
XBAYDNS_BIND_CONF
bind的启动脚本
XBAYDNS_BIND_START
bind的停止脚本
XBAYDNS_BIND_STOP
bind的重启脚本
XBAYDNS_BIND_RESTART
运行bind的用户
XBAYDNS_BIND_USE... | unknown | codeparrot/codeparrot-clean | ||
declare namespace Intl {
interface DateTimeFormatPartTypesRegistry {
unknown: never;
}
} | typescript | github | https://github.com/microsoft/TypeScript | src/lib/es2019.intl.d.ts |
/*
* 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.symbols.pointers
import org.jetbrains.kotlin.analysis.api.KaImp... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/symbols/pointers/KaFirScriptParameterSymbolPointer.kt |
/*
* Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)
package ktorbuild.internal
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.plugi... | kotlin | github | https://github.com/ktorio/ktor | build-logic/src/main/kotlin/ktorbuild/internal/TrackedKotlinHierarchy.kt |
/**
* @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 {Component, DebugElement, ElementRef, viewChild} from '@angular/core';
import {TestBed} from '@angular/core/t... | typescript | github | https://github.com/angular/angular | devtools/projects/ng-devtools/src/lib/shared/split/responsive-split.directive.spec.ts |
#!/usr/bin/python
# Unix SMB/CIFS implementation.
# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007-2008
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,... | unknown | codeparrot/codeparrot-clean | ||
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// ... | c | github | https://github.com/opencv/opencv | 3rdparty/protobuf/src/google/protobuf/map_type_handler.h |
#!/usr/bin/python
#
# Copyright 2013 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 | ||
"""Microsoft Internet Explorer cookie loading on Windows.
Copyright 2002-2003 Johnny Lee <typo_pl@hotmail.com> (MSIE Perl code)
Copyright 2002-2006 John J Lee <jjl@pobox.com> (The Python port)
This code is free software; you can redistribute it and/or modify it
under the terms of the BSD or ZPL 2.1 licenses (see the ... | unknown | codeparrot/codeparrot-clean | ||
""" robotparser.py
Copyright (C) 2000 Bastian Kleineidam
You can choose between two licenses when using this package:
1) GNU GPLv2
2) PSF license for Python 2.2
The robots.txt Exclusion Protocol is implemented as specified in
http://www.robotstxt.org/norobots-rfc.txt
"""
import urllib.parse... | unknown | codeparrot/codeparrot-clean | ||
# Adverserial Variational Optimization
import math
import numpy as np
import random
import sys
import torch
import torch.nn.functional as F
from sklearn.utils import check_random_state
from torch.autograd import Variable
def main():
# Assume there exists some true parameterization.
# Beam Energy = 43 Gev, an... | unknown | codeparrot/codeparrot-clean | ||
# This code is a simple hyperquadratic Baseyain classifier. The training set in the begining is created by matlab
# for tow-dimensional multivariate normal distribution with following mean and coveriance matrix.
#
####### mu = [2 3 1 .5];
####### SIGMA = [1 1/2 1/10 1/25; 1/2 4 1/32 1/5; 1/10 1/32 6 1/8; 1/25 1/5 1/8... | 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 | ||
//// [tests/cases/compiler/bigIntWithTargetLessThanES2016.ts] ////
//// [bigIntWithTargetLessThanES2016.ts]
BigInt(1) ** BigInt(1); // should error
let foo = BigInt(2);
foo **= BigInt(2); // should error
//// [bigIntWithTargetLessThanES2016.js]
"use strict";
Math.pow(BigInt(1), BigInt(1)); // should error
let foo = ... | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/bigIntWithTargetLessThanES2016.js |
<?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\Console... | php | github | https://github.com/composer/composer | src/Composer/Console/Application.php |
#-*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
PRJ_PATH = os.path.abspath(os.path.curdir)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Alice Bloggs', 'alice@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# Copyright (C) 2013 Steven Watanabe
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import BoostBuild
import MockToolset
t = BoostBuild.Tester(arguments=['toolset=mock', '--ignore-site-config',... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package runtime
import (
"internal/abi"
"internal/goarch"
"internal/runtime/atomic"
"internal/runtime/sys"
"internal/stringslite"
"unsafe"
)
// throwTyp... | go | github | https://github.com/golang/go | src/runtime/panic.go |
import mimetypes
import os
import random
import time
from email import charset as Charset, encoders as Encoders
from email.generator import Generator
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email.header import Header
from email.utils ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# utils.py — Debexpo utility functions
#
# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/
#
# Copyright © 2008 Jonny Lamb <jonny@debian.org>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated ... | unknown | codeparrot/codeparrot-clean | ||
require 'benchmark_driver/struct'
require 'benchmark_driver/metric'
require 'benchmark_driver/default_job'
require 'benchmark_driver/default_job_parser'
require 'tempfile'
class BenchmarkDriver::Runner::Total
METRIC = BenchmarkDriver::Metric.new(name: 'Total time', unit: 's', larger_better: false)
# JobParser ret... | ruby | github | https://github.com/ruby/ruby | benchmark/lib/benchmark_driver/runner/total.rb |
"""
Try to detect suspicious constructs, resembling markup
that has leaked into the final output.
Suspicious lines are reported in a comma-separated-file,
``suspicious.csv``, located in the output directory.
The file is utf-8 encoded, and each line contains four fields:
* document name (normalized)
* line number i... | 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/EclipseM2eIntegrationTests.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.