code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
base_suite: concurrency_replication
overrides:
- "multiversion.replica_fixture_last_continuous_old_new_new" | unknown | github | https://github.com/mongodb/mongo | buildscripts/resmokeconfig/matrix_suites/mappings/concurrency_replication_last_continuous_old_new_new.yml |
area: ES|QL
issues:
- 138008
pr: 140905
summary: Fix ES:QL Driver logging for 4xx errors and cancellations
type: bug | unknown | github | https://github.com/elastic/elasticsearch | docs/changelog/140905.yaml |
"""Color util methods."""
import logging
import math
# pylint: disable=unused-import
_LOGGER = logging.getLogger(__name__)
HASS_COLOR_MAX = 500 # mireds (inverted)
HASS_COLOR_MIN = 154
COLORS = {
'white': (255, 255, 255), 'beige': (245, 245, 220),
'tan': (210, 180, 140), 'gray': (128, 128, 128),
'navy bl... | unknown | codeparrot/codeparrot-clean | ||
'''
List View
===========
.. versionadded:: 1.5
.. warning::
This code is still experimental, and its API is subject to change in a
future version.
The :class:`~kivy.uix.listview.ListView` widget provides a scrollable/pannable
viewport that is clipped to the scrollview's bounding box which contains
list ite... | unknown | codeparrot/codeparrot-clean | ||
//! cfg and check-cfg configuration
//!
//! This module contains the definition of [`Cfg`] and [`CheckCfg`]
//! as well as the logic for creating the default configuration for a
//! given [`Session`].
//!
//! It also contains the filling of the well known configs, which should
//! ALWAYS be in sync with the default_con... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_session/src/config/cfg.rs |
# 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 applicab... | unknown | codeparrot/codeparrot-clean | ||
# frozen_string_literal: true
require "helper"
class TestFrontMatterDefaults < JekyllUnitTest
context "A site with full front matter defaults" do
setup do
@site = fixture_site(
"defaults" => [{
"scope" => {
"path" => "contacts",
"type" => "page",
},
... | ruby | github | https://github.com/jekyll/jekyll | test/test_front_matter_defaults.rb |
"""Detect changes in Ansible code."""
from __future__ import absolute_import, print_function
import re
import os
from lib.util import (
ApplicationError,
SubprocessError,
MissingEnvironmentVariable,
CommonConfig,
display,
)
from lib.http import (
HttpClient,
urlencode,
)
from lib.git im... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#-*-coding:utf-8-*-
# Copyright (C) 2012:
# Romain Forlot, rforlot@yahoo.com
#
# This file is part of Shinken.
#
# Shinken 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... | unknown | codeparrot/codeparrot-clean | ||
// This file is part of ICU4X. For terms of use, please see the file
// called LICENSE at the top level of the ICU4X source tree
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
mod macros; | rust | github | https://github.com/nodejs/node | deps/crates/vendor/icu_locale_core/benches/helpers/mod.rs |
/* Copyright 2024 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/transforms/tf_legalizations/analyze_variables_pass.h |
#ifndef TRACE2_H
#define TRACE2_H
/**
* The Trace2 API can be used to print debug, performance, and telemetry
* information to stderr or a file. The Trace2 feature is inactive unless
* explicitly enabled by enabling one or more Trace2 Targets.
*
* The Trace2 API is intended to replace the existing (Trace1)
* pr... | c | github | https://github.com/git/git | trace2.h |
# Copyright 2012 Cloudscaling, Inc.
# All Rights Reserved.
# Copyright 2013 Red Hat, 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/L... | 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 applicab... | unknown | codeparrot/codeparrot-clean | ||
#!/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.... | 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 | ||
# frozen_string_literal: true
module ActiveRecord
module Validations
class LengthValidator < ActiveModel::Validations::LengthValidator # :nodoc:
def validate_each(record, attribute, association_or_value)
if association_or_value.respond_to?(:loaded?) && association_or_value.loaded?
associa... | ruby | github | https://github.com/rails/rails | activerecord/lib/active_record/validations/length.rb |
# frozen_string_literal: true
module Arel # :nodoc: all
module Nodes
class With < Arel::Nodes::Unary
alias children expr
end
class WithRecursive < With; end
end
end | ruby | github | https://github.com/rails/rails | activerecord/lib/arel/nodes/with.rb |
'''
This program visualizes ECG waveforms on the PC
Copyright (C) 2014 Sagar G V (sagar.writeme@gmail.com)
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 License, or... | unknown | codeparrot/codeparrot-clean | ||
import signal
import threading
import socket
import sys
import os
import errno
from tornado.util import errno_from_exception
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../'))
from tool.util import len_pack
class EchoClient:
port = 8888
def __init__(self, host, size):
self.size = siz... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
import time
import uuid
import io
from PIL import Image
from selenium.webdriver.common.action_chains import ActionChains
class BaseGeetestCrack(object):
"""验证码破解基础类"""
def __init__(self, driver):
self.driver = driver
self.driver.set_window_position(0, 0)
self... | 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 | core/spring-boot-properties-migrator/src/main/java/org/springframework/boot/context/properties/migrator/PropertiesMigrationReporter.java |
# coding: utf-8
from django.db import models
class Author(models.Model):
name = models.CharField(max_length=100)
age = models.IntegerField()
friends = models.ManyToManyField('self', blank=True)
def __unicode__(self):
return self.name
class Publisher(models.Model):
name = models.CharField(... | unknown | codeparrot/codeparrot-clean | ||
import asyncio
import unittest
import aiohttp
from slack.web.classes.attachments import Attachment, AttachmentField
from slack.web.classes.blocks import SectionBlock, ImageBlock
from slack.webhook import AsyncWebhookClient, WebhookResponse
from tests.helpers import async_test
from tests.webhook.mock_web_api_server im... | unknown | codeparrot/codeparrot-clean | ||
//! Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.
//!
//! # Examples
//! ```no_run
//! use actix_web::{get, web, App, HttpServer, Responder};
//!
//! #[get("/hello/{name}")]
//! async fn greet(name: web::Path<String>) -> impl Responder {
//! format!("Hello {}!", name)
//! }
//!
//! ... | rust | github | https://github.com/actix/actix-web | actix-web/src/lib.rs |
- name: Test pause module echo output
hosts: localhost
become: no
gather_facts: no
tasks:
- pause:
echo: yes
prompt: Enter some text
register: results
- name: Ensure that input was captured
assert:
that:
- results.user_input == 'hello there'
- pause:
... | unknown | github | https://github.com/ansible/ansible | test/integration/targets/pause/pause-5.yml |
val x = 5 + 5
fun foo() {
<expr>x</expr>
} | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api/testData/components/compileTimeConstantProvider/evaluate/nonConstPropertyAccess.kt |
#!/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 | ||
#!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the zapwallettxes functionality.
- start two bitcoind nodes
- create two transactions on node 0 -... | unknown | codeparrot/codeparrot-clean | ||
//! Functions dealing with attributes and meta items.
pub mod data_structures;
pub mod version;
use std::fmt::Debug;
use std::sync::atomic::{AtomicU32, Ordering};
use rustc_index::bit_set::GrowableBitSet;
use rustc_span::{Ident, Span, Symbol, sym};
use smallvec::{SmallVec, smallvec};
use thin_vec::{ThinVec, thin_vec... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_ast/src/attr/mod.rs |
use crate::io::AsyncSeek;
use pin_project_lite::pin_project;
use std::future::Future;
use std::io::{self, SeekFrom};
use std::marker::PhantomPinned;
use std::pin::Pin;
use std::task::{ready, Context, Poll};
pin_project! {
/// Future for the [`seek`](crate::io::AsyncSeekExt::seek) method.
#[derive(Debug)]
... | rust | github | https://github.com/tokio-rs/tokio | tokio/src/io/seek.rs |
# -*- coding: utf-8 -*-
#
# petlx documentation build configuration file, created by
# sphinx-quickstart on Thu Feb 16 12:54:43 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All c... | unknown | codeparrot/codeparrot-clean | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package addrs
import (
"fmt"
)
// LocalValue is the address of a local value.
type LocalValue struct {
referenceable
Name string
}
func (v LocalValue) String() string {
return "local." + v.Name
}
func (v LocalValue) UniqueKey() UniqueKey {
... | go | github | https://github.com/hashicorp/terraform | internal/addrs/local_value.go |
from functools import wraps
import time
import inspect
from . import helpers
def memoize(ttl_spec, whitelist=None, blacklist=None,
key_fn=helpers._json_keyify, backend=lambda fn: dict(),
get_now=time.time):
""" memoize/cache the decorated function for ttl amount of time """
ttl = helpers._tim... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import print_function
import time
import timeit
class TreeNode(object):
def __init__(self, name):
self._name = name
self._children = []
self._time = 0
def __str__(self):
return "%s: %s" % (self._name, self._time)
__repr__ = __str__
def add_child(self,... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding:utf-8 -*-
import os
import sys
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
try:
with open(os.path.join(here, 'README.rst')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
except IOErro... | unknown | codeparrot/codeparrot-clean | ||
# pvec.py - probabilistic vector clocks for Mercurial
#
# Copyright 2012 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
'''
A "pvec" is a changeset property based on the theory of vector clocks
that... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2014 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... | unknown | codeparrot/codeparrot-clean | ||
# LLVM OpenMP Library Maintainers
This file is a list of the
[maintainers](https://llvm.org/docs/DeveloperPolicy.html#maintainers) for
the LLVM OpenMP library.
# Lead Maintainer
Michael Klemm \
michael.klemm@amd.com (email), [mjklemm](https://github.com/mjklemm) (GitHub)
# Current Maintainers
Terry Wilmarth \
terr... | unknown | github | https://github.com/llvm/llvm-project | openmp/Maintainers.md |
#!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Exercise API with -disablewallet.
#
from test_framework.test_framework import BitcoinTestFramework
f... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import division
import os
from cStringIO import StringIO
from pyfasta import Fasta
import pandas as pd
def __SeqRc(str_seq):
lst_rcseq = [c for c in str_seq[::-1]]
for i in xrange(len(lst_rcseq)):
if lst_rcseq[i] == 'A':
lst_rcseq[i] = 'T'
elif lst_rcseq[i] == 'T':
... | 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 | ||
# -*- coding: utf-8 -*-
# http://www.statoids.com/upy.html
DEPARTMENT_CHOICES = (
('AG', u'Alto Paraguay'),
('AA', u'Alto Paraná'),
('AM', u'Amambay'),
('AS', u'Asunción'),
('BQ', u'Boquerón'),
('CG', u'Caaguazú'),
('CZ', u'Caazapá'),
('CY', u'Canindeyú'),
('CE', u'Central'),
(... | unknown | codeparrot/codeparrot-clean | ||
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may n... | java | github | https://github.com/apache/kafka | clients/src/main/java/org/apache/kafka/common/errors/InvalidCommitOffsetSizeException.java |
from yowsup.structs import ProtocolEntity, ProtocolTreeNode
from .message_media_downloadable import DownloadableMediaMessageProtocolEntity
class AudioDownloadableMediaMessageProtocolEntity(DownloadableMediaMessageProtocolEntity):
'''
<message t="{{TIME_STAMP}}" from="{{CONTACT_JID}}"
offline="{{OFFLINE}... | unknown | codeparrot/codeparrot-clean | ||
// This is for testing the "information byte" of Server Action / Cache IDs.
// Should be 1 110000 0, which is "e0" in hex.
async function f1(a, b) {
'use cache'
return [a, b]
}
// Should be 0 110000 0, which is "60" in hex.
async function f2(a, b) {
'use server'
return [a, b]
}
// Should be 1 111111 1, which... | javascript | github | https://github.com/vercel/next.js | crates/next-custom-transforms/tests/fixture/server-actions/server-graph/46/input.js |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import os
class Libid3tag(AutotoolsPackage):
"""library for id3 tagging"""
homepage = "https... | unknown | codeparrot/codeparrot-clean | ||
# (C) British Crown Copyright 2014 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | unknown | codeparrot/codeparrot-clean | ||
import os
import sys
import ctypes
import logging
import msvc_details
from ctypes import *
from ctypes.wintypes import ULONG
from ctypes.wintypes import DWORD
from ctypes.wintypes import BOOL
from ctypes.wintypes import BYTE
from ctypes.wintypes import WORD
from ctypes.wintypes import UINT
sys.path.append( r'../..' )
... | unknown | codeparrot/codeparrot-clean | ||
from sklearn.datasets import load_iris
iris = load_iris()
from scipy.spatial import distance
def euc(a,b):
return distance.euclidean(a,b)
class MyKNN():
def fit(self,X_train, y_train):
self.X_train = X_train
self.y_train = y_train
def predict(self,X_test):
predictions = []
... | unknown | codeparrot/codeparrot-clean | ||
###########################################################
#
# Copyright (c) 2005, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permi... | unknown | codeparrot/codeparrot-clean | ||
#
# THIS IS WORK IN PROGRESS
#
# The Python Imaging Library.
# $Id$
#
# FlashPix support for PIL
#
# History:
# 97-01-25 fl Created (reads uncompressed RGB images only)
#
# Copyright (c) Secret Labs AB 1997.
# Copyright (c) Fredrik Lundh 1997.
#
# See the README file for information on usage and redistribution.
#
__... | unknown | codeparrot/codeparrot-clean | ||
"""
MIT License
Copyright (c) 2016 William Tumeo
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 limitation the rights
to use, copy, modify, merge, publish,... | 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 u... | unknown | codeparrot/codeparrot-clean | ||
import mdp
import numpy as np
def check_signal_dimensions(input_signal, target_signal):
if input_signal.shape != target_signal.shape:
raise RuntimeError("Input shape (%s) and target_signal shape (%s) should be the same."% (input_signal.shape, target_signal.shape))
class timeslice():
"""
timeslice(... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2015, 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, s... | unknown | codeparrot/codeparrot-clean | ||
# sql/operators.py
# Copyright (C) 2005-2014 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
# This module is part of SQLAlchemy and is released under
# the MIT License: http://w... | unknown | codeparrot/codeparrot-clean | ||
#! /usr/bin/env python
#
# 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 ... | unknown | codeparrot/codeparrot-clean | ||
"""Compiler tools with improved interactive support.
Provides compilation machinery similar to codeop, but with caching support so
we can provide interactive tracebacks.
Authors
-------
* Robert Kern
* Fernando Perez
* Thomas Kluyver
"""
# Note: though it might be more natural to name this module 'compiler', that
# ... | unknown | codeparrot/codeparrot-clean | ||
# frozen_string_literal: true
module Arel # :nodoc: all
module Nodes
class Distinct < Arel::Nodes::NodeExpression
def hash
self.class.hash
end
def eql?(other)
self.class == other.class
end
alias :== :eql?
end
end
end | ruby | github | https://github.com/rails/rails | activerecord/lib/arel/nodes/terminal.rb |
// Package local provides the default implementation for volumes. It
// is used to mount data volume containers and directories local to
// the host server.
package local
import (
"os"
"syscall"
"time"
"github.com/moby/moby/v2/errdefs"
"github.com/pkg/errors"
)
type optsConfig struct{}
func (r *Root) validateO... | go | github | https://github.com/moby/moby | daemon/volume/local/local_windows.go |
import Head from "next/head";
import { EXAMPLE_TOOL_NAME } from "../lib/constants";
export default function Meta() {
return (
<Head>
<link
rel="apple-touch-icon"
sizes="180x180"
href="/favicon/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
... | typescript | github | https://github.com/vercel/next.js | examples/cms-enterspeed/components/meta.tsx |
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.matchers;
import java.io.Serializable;
import java.util.Objects;
import org.mockito.ArgumentMatcher;
public class Null<T> implements ArgumentMatcher<T>, Serializable {
... | java | github | https://github.com/mockito/mockito | mockito-core/src/main/java/org/mockito/internal/matchers/Null.java |
# Copyright 2014 Cloudbase Solutions Srl
# 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 r... | unknown | codeparrot/codeparrot-clean | ||
import logging
class Observation(object):
"""Describes certificate observation."""
def __init__(self, description, reason=None, details=None):
self.description = description
self.reason = reason
self.details = details
def __repr__(self):
return "%s(%s, %s, %s)" % (self.__cl... | unknown | codeparrot/codeparrot-clean | ||
package kotlinx.coroutines.channels
import kotlinx.coroutines.testing.*
import kotlinx.coroutines.*
import kotlin.coroutines.*
import kotlin.test.*
class ProduceConsumeTest : TestBase() {
@Test
fun testRendezvous() = runTest {
testProducer(1)
}
@Test
fun testSmallBuffer() = runTest {
... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | kotlinx-coroutines-core/common/test/channels/ProduceConsumeTest.kt |
#include "git-compat-util.h"
#include "gettext.h"
#include "hash.h"
#include "hex.h"
#include "lockfile.h"
#include "merge-ort.h"
#include "merge-ort-wrappers.h"
#include "read-cache-ll.h"
#include "repository.h"
#include "tag.h"
#include "tree.h"
#include "commit.h"
static int unclean(struct merge_options *opt, stru... | c | github | https://github.com/git/git | merge-ort-wrappers.c |
import os
from setuptools import setup, find_packages
from wagtailmodeladmin import __version__
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import
from typing import Text
from django.utils.translation import ugettext as _
from zerver.lib.actions import do_change_full_name
from zerver.lib.request import JsonableError
from zerver.models import UserProfile
def check_full_name(full_name_raw):
# type: (Text) -> Text
fu... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/samsung,exynos5260-clock.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Samsung Exynos5260 SoC clock controller
maintainers:
- Chanwoo Choi <cw00.choi@samsung.com>
- Krzysztof Kozl... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/clock/samsung,exynos5260-clock.yaml |
# -*- coding: utf-8 -*-
"""
pygments.lexers.templates
~~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for various template engines' markup.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexers.web import \
PhpLexer, H... | unknown | codeparrot/codeparrot-clean | ||
import hyperion, time, colorsys, random, math
# get args
sleepTime = float(hyperion.args.get('speed', 1.0))/1000.0
saturation = float(hyperion.args.get('saturation', 1.0))
ledData = bytearray()
ledDataBuf = bytearray()
color_step = []
minStepTime= float(hyperion.latchTime)/1000.0
fadeSteps = min(256.0, math.floor... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2015 Huawei Technologies Co., Ltd.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | unknown | codeparrot/codeparrot-clean | ||
import {
AccessorDeclaration,
ArrayLiteralExpression,
BigIntLiteral,
BinaryExpression,
Block,
CaseBlock,
ClassLikeDeclaration,
ConditionalExpression,
ConditionalTypeNode,
Debug,
EntityName,
Expression,
findAncestor,
FunctionLikeDeclaration,
getAllAccessorDecla... | typescript | github | https://github.com/microsoft/TypeScript | src/compiler/transformers/typeSerializer.ts |
''' Utilities to allow inserting docstring fragments for common
parameters into function and method docstrings'''
from __future__ import division, print_function, absolute_import
import sys
__all__ = ['docformat', 'inherit_docstring_from', 'indentcount_lines',
'filldoc', 'unindent_dict', 'unindent_string'... | unknown | codeparrot/codeparrot-clean | ||
// Boost integer_fwd.hpp header file ---------------------------------------//
// (C) Copyright Dave Abrahams and Daryle Walker 2001. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
// See https://www.boost... | unknown | github | https://github.com/mysql/mysql-server | extra/boost/boost_1_87_0/boost/integer_fwd.hpp |
"""
Microvellum
Cabinets
Stores the logic for the different types of cabinets available in the Face Frame and
Frameless library. Only controls how the different inserts are combined to assemble a cabinet.
No construction or machining information is stored here.
TODO: Create Face Frame Transition, Create Face Frame Outs... | unknown | codeparrot/codeparrot-clean | ||
#
# File : vs2012.py
# This file is part of RT-Thread RTOS
# COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team
#
# 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 t... | unknown | codeparrot/codeparrot-clean | ||
"""
botogram.bot
The actual bot application base
Copyright (c) 2015 Pietro Albini <pietro@pietroalbini.io>
Released under the MIT license
"""
import re
import logbook
import uuid
import requests.exceptions
from . import api
from . import objects
from . import runner
from . import defaults
from . imp... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
""" PN-CLI vrouter-bgp-add/vrouter-bgp-remove/vrouter-bgp-modify """
#
# 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 Lice... | unknown | codeparrot/codeparrot-clean | ||
"""
Web application
(from web.py)
"""
import webapi as web
import webapi, wsgi, utils
import debugerror
import httpserver
from utils import lstrips, safeunicode
import sys
import urllib
import traceback
import itertools
import os
import types
from exceptions import SystemExit
try:
import wsgiref.handlers
except ... | unknown | codeparrot/codeparrot-clean | ||
//// [tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithOneOperandIsAny.ts] ////
//// [comparisonOperatorWithOneOperandIsAny.ts]
var x: any;
enum E { a, b, c }
function foo<T>(t: T) {
var foo_r1 = t < x;
var foo_r2 = t > x;
var foo_r3 = t <= x;
var foo_r4 = ... | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/comparisonOperatorWithOneOperandIsAny.js |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage PaloAltoNetworks Firewall
# (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import, division
import time
import os
import sys
import errno
from . import (LockBase, LockFailed, NotLocked, NotMyLock, LockTimeout,
AlreadyLocked)
class MkdirLockFile(LockBase):
"""Lock file by creating a directory."""
def __init__(self, path, threaded=True, ... | unknown | codeparrot/codeparrot-clean | ||
# mysql/__init__.py
# Copyright (C) 2005-2016 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
from . import base, mysqldb, oursql, \
pyodbc, zxjdbc, mysqlconnector, pymysql... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, ... | java | github | https://github.com/elastic/elasticsearch | build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/docker/DockerSupportService.java |
import threading
class Constants:
lock = threading.Lock()
meciuri_db = None
results_db = None
class StatementTypes:
CREATE_STATEMENT = 0
INSERT_STATEMENT = 1
UPDATE_STATEMENT = 2
DELETE_STATEMENT = 2
class DatabasesInfo:
meciuri_db = {'db_file_name': 'meciu... | unknown | codeparrot/codeparrot-clean | ||
## Input
```javascript
function Component() {
return <div>><span &</div>;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{}],
};
```
## Code
```javascript
import { c as _c } from "react/compiler-runtime";
function Component() {
const $ = _c(1);
let t0;
if ($[0] === Symbol.for("... | unknown | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/jsx-html-entity.expect.md |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
use... | php | github | https://github.com/symfony/symfony | src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/X509Factory.php |
"""
Classes for constraining the norms of weight matrices.
"""
from pylearn2.utils import wraps
from theano import tensor as T
from pylearn2.model_extensions.model_extension import ModelExtension
class MaxL2FilterNorm(ModelExtension):
"""
Constrains the maximum L2 norm (not squared L2) norm of a
weight ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import datetime
import faulthandler
import logging
import os
import signal
import sys
import threading
import traceback
from contextlib import contextmanager
from typing import Callable, D... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
'''Base class for image tests.
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id: $'
import unittest
from os.path import dirname, join
from pyglet.gl import *
from pyglet import image
from pyglet.image import codecs
from pyglet.window import *
from pyglet.window.event import *
from te... | unknown | codeparrot/codeparrot-clean | ||
# 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 http://mozilla.org/MPL/2.0/.
from datetime import timedelta
from configman import Namespace, RequiredConfig, class_converter
from socorrolib.lib.co... | 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 | core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/OnBeanConditionTypeDeductionFailureTests.java |
# -*- coding: utf-8 -*-
'''
Specto Add-on
Copyright (C) 2015 lambda
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, or
(at your option) any l... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
***************************************************************************
lasnoise.py
---------------------
Date : September 2013 and May 2016
Copyright : (C) 2013 by Martin Isenburg
Email : martin near rapidlasso point com
***... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
"""
Program that calculates several hashes for a given CD image.
:copyright: Red Hat 2008-2009
"""
import os
import sys
import logging
import optparse
from avocado.utils import crypto
from logging_config import LoggingConfig
if __name__ == "__main__":
log_cfg = LoggingConfig(set_fmt=False)
... | unknown | codeparrot/codeparrot-clean | ||
// RUN: %check_clang_tidy %s bugprone-infinite-loop %t \
// RUN: -- -- -fexceptions -fblocks -fno-delayed-template-parsing
void simple_infinite_loop1() {
int i = 0;
int j = 0;
while (i < 10) {
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: this loop is infinite; none of its condition variables (... | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/test/clang-tidy/checkers/bugprone/infinite-loop.cpp |
# Copyright 2013 Big Switch Networks, 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 ... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals
from django.apps import apps
from django.db import models
def sql_flush(style, connection, only_django=False, reset_sequences=True, allow_cascade=False):
"""
Returns a list of the SQL statements used to flush the database.
If only_django is True, then only table na... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.