code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
/*
* 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-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/TestAutoConfigureOrder.java |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const Template = require("../Template");
const HelperRuntimeModule = require("./HelperRuntimeModule");
/** @typedef {import("../Compilation")} Compilation */
class DefinePropertyG... | javascript | github | https://github.com/webpack/webpack | lib/runtime/DefinePropertyGettersRuntimeModule.js |
from contextlib import suppress
from docutils import nodes
from docutils.parsers.rst import Directive
from sklearn.utils import all_estimators
from sklearn.utils._test_common.instance_generator import _construct_instances
from sklearn.utils._testing import SkipTest
class AllowNanEstimators(Directive):
@staticmet... | python | github | https://github.com/scikit-learn/scikit-learn | doc/sphinxext/allow_nan_estimators.py |
# -*- coding: utf-8 -*-
from __future__ import division, print_function
from __future__ import absolute_import, unicode_literals
from ..compat import socketserver
from ..compat import SimpleHTTPServer
from ..base import cv2
import time
import socket
import re
import threading
__all__ = [
'JpegStreamHandler', 'Jp... | unknown | codeparrot/codeparrot-clean | ||
# 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/licenses/LICENSE-2.0
#
# Unless required by a... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2018, David Passante <@dpassante>
# (c) 2017, René Moser <mail@renemoser.net>
# 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_M... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Unit tests for the multiprocessing package
#
import unittest
import Queue
import time
import sys
import os
import gc
import signal
import array
import socket
import random
import logging
import errno
from test import test_support
from StringIO import StringIO
_multiprocessing = test_support.... | unknown | codeparrot/codeparrot-clean | ||
# Triage issues
Triage helps ensure that GitHub issues resolve quickly by:
- Ensuring the issue's intent and purpose is conveyed precisely. This is necessary because it can be difficult for an issue to explain how an end user experiences a problem and what actions they took.
- Giving a contributor the information the... | unknown | github | https://github.com/grafana/grafana | contribute/triage-issues.md |
A borrowed variable was used by a closure.
Erroneous code example:
```compile_fail,E0500
fn you_know_nothing(jon_snow: &mut i32) {
let nights_watch = &jon_snow;
let starks = || {
*jon_snow = 3; // error: closure requires unique access to `jon_snow`
// but it is already bo... | unknown | github | https://github.com/rust-lang/rust | compiler/rustc_error_codes/src/error_codes/E0500.md |
"""
Module that holds all archiving functions
"""
import os
import shutil
import logging
import sys
import numpy as np
import subprocess
import factor._logging
import factor.parset
import factor.directions
from factor.lib.direction import Direction
from lofarpipe.support.data_map import DataMap
from factor.scripts impo... | unknown | codeparrot/codeparrot-clean | ||
"""
Given a graph which consists of several edges connecting the nodes in it.
It is required to find a subgraph of the given graph with the following properties:
The subgraph contains all the nodes present in the original graph.
The subgraph is of minimum overall weight (sum of all edges) among all such subgraphs.
I... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | unknown | codeparrot/codeparrot-clean | ||
<?php
namespace Illuminate\Support;
use ArgumentCountError;
use ArrayAccess;
use Closure;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Support\Traits\Macroable;
use InvalidArgumentException;
use JsonSerializable;
use Random\Randomizer;
use Traversable;
use Weak... | php | github | https://github.com/laravel/framework | src/Illuminate/Collections/Arr.php |
from django.db import transaction
from django.test import TransactionTestCase, override_settings
from wagtail.core.models import Collection
from wagtail.images import get_image_model, signal_handlers
from wagtail.images.tests.utils import get_test_image_file
class TestFilesDeletedForDefaultModels(TransactionTestCase)... | unknown | codeparrot/codeparrot-clean | ||
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# ... | unknown | codeparrot/codeparrot-clean | ||
import numpy as np
import pytest
import scipy.sparse as sp
from numpy.random import RandomState
from numpy.testing import assert_array_almost_equal, assert_array_equal
from scipy import linalg
from sklearn.datasets import make_classification
from sklearn.utils._testing import assert_allclose
from sklearn.utils.fixes i... | python | github | https://github.com/scikit-learn/scikit-learn | sklearn/utils/tests/test_sparsefuncs.py |
import { flushSync } from 'svelte';
import { test } from '../../test';
/** @type {Array<{ name: string }>} */
let values = [];
/** @type {Array<Array<{ name: string }>>} */
let selected_array = [];
export default test({
before_test() {
values = [{ name: 'Alpha' }, { name: 'Beta' }, { name: 'Gamma' }];
selected_... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/runtime-legacy/samples/binding-input-group-each-3/_config.js |
"""
Check that all changes to Wagtail models have had migrations created. If there
are outstanding model changes that need migrations, fail the tests.
"""
from django.utils.six import iteritems
from django.test import TransactionTestCase
from django.apps import apps
from django.db.migrations.loader import MigrationLoa... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
network ping sensor.
'''
from ping import do_one as ping
from whmonit.client.sensors import TaskSensorBase
from whmonit.common.units import unit_reg
class Sensor(TaskSensorBase):
'''Generic 'ping' sensor.'''
# W0232: Class has no __init__ method
# R0201: ... | unknown | codeparrot/codeparrot-clean | ||
name: Ubuntu on WSL
on:
push:
paths-ignore:
- 'doc/**'
- '**/man/*'
- '**.md'
- '**.rdoc'
- '**/.document'
- '.*.yml'
pull_request:
# Do not use paths-ignore for required status checks
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collab... | unknown | github | https://github.com/ruby/ruby | .github/workflows/wsl.yml |
import copy
import sys
import subprocess
from subprocess import PIPE
import requests
# Requests is built ontop of urllib3,
# here we prevent general request logging
import logging
logging.getLogger('urllib3').setLevel(logging.CRITICAL)
from pprint import pprint
class FrameworkTestType:
'''
Interface between... | unknown | codeparrot/codeparrot-clean | ||
////////////////////////////////////////////////////////////////////////////
//
// Copyright 2014 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/RLMProperty_Private.h |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2014 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import absolute_import
import os
import re
import sys
if sys.version_info[0] < 3:
from StringIO import StringIO
... | unknown | codeparrot/codeparrot-clean | ||
package kotlinx.coroutines.flow
import kotlinx.atomicfu.*
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.*
import kotlinx.coroutines.flow.internal.*
import kotlinx.coroutines.internal.*
import kotlin.coroutines.*
/**
* A [SharedFlow] that represents a read-only state with a single updatable data [val... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | kotlinx-coroutines-core/common/src/flow/StateFlow.kt |
//---------------------------------------------------------------------------//
// Copyright (c) 2013-2015 Kyle Lutz <kyle.r.lutz@gmail.com>
//
// 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
//
// See http://boosto... | unknown | github | https://github.com/mysql/mysql-server | extra/boost/boost_1_87_0/boost/compute/image.hpp |
"""
Unit tests for stub XQueue implementation.
"""
import mock
import unittest
import json
import requests
from ..xqueue import StubXQueueService
class FakeTimer(object):
"""
Fake timer implementation that executes immediately.
"""
def __init__(self, delay, func):
self.func = func
def sta... | unknown | codeparrot/codeparrot-clean | ||
//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction3_es2017.ts] ////
//// [asyncArrowFunction3_es2017.ts]
function f(await = await) {
}
//// [asyncArrowFunction3_es2017.js]
"use strict";
function f(await = await) {
} | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/asyncArrowFunction3_es2017.js |
#!/usr/bin/env python
#
# b43 firmware file squasher
# Removes unnecessary firmware files
#
# Copyright (c) 2009 Michael Buesch <mb@bu3sch.de>
#
# Licensed under the GNU/GPL version 2 or (at your option) any later version.
#
import sys
import os
def usage():
print("Usage: %s PHYTYPES COREREVS /path/to/extracted/firm... | 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 | ||
# -*- coding: utf-8 -*-
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2011 thomasv@gitorious with changes by pycryptools developers
#
# 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 Softwa... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2012 Nebula, 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... | unknown | codeparrot/codeparrot-clean | ||
import numpy as np
from ..antechamber.atomtype import atomtype
import math
def pdb(molecule, ff='amber', fn='cnt.pdb', save_dir='.'):
"""Creates a .pdb (protein data bank) type list for use with molecular dynamics packages.
pdb_lines returns list holding every line of .pdb file."""
amber_2_opls = {"CA": "C... | unknown | codeparrot/codeparrot-clean | ||
#ifndef CURLINC_WEBSOCKETS_H
#define CURLINC_WEBSOCKETS_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (... | c | github | https://github.com/ktorio/ktor | ktor-client/ktor-client-curl/desktop/interop/include/curl/websockets.h |
use rustc_middle::mir::*;
use rustc_middle::ty::TyCtxt;
use rustc_mir_dataflow::debuginfo::debuginfo_locals;
use rustc_session::config::MirStripDebugInfo;
/// Conditionally remove some of the VarDebugInfo in MIR.
///
/// In particular, stripping non-parameter debug info for tiny, primitive-like
/// methods in core sav... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_mir_transform/src/strip_debuginfo.rs |
# Copyright 2016 gRPC 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... | unknown | codeparrot/codeparrot-clean | ||
#! /usr/bin/env python3
# linktree
#
# Make a copy of a directory tree with symbolic links to all files in the
# original tree.
# All symbolic links go to a special symbolic link at the top, so you
# can easily fix things if the original source tree moves.
# See also "mkreal".
#
# usage: mklinks oldtree newtree
impor... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2016, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditio... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
***************************************************************************
gdalinfo.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
******************************... | unknown | codeparrot/codeparrot-clean | ||
# 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, s... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env bash
# Copyright IBM Corp. 2016, 2025
# SPDX-License-Identifier: BUSL-1.1
fail() {
echo "$1" 1>&2
exit 1
}
verify_radar_scan_output_file() {
# Given a file with a radar scan output, filter out tagged false positives and verify that no
# other secrets remain.
if ! jq -eMcn '[inputs] | [.[] | s... | unknown | github | https://github.com/hashicorp/vault | enos/modules/verify_log_secrets/scripts/scan_logs_for_secrets.sh |
"""Classify responses from layer1 and strict type values."""
from datetime import datetime
from boto.compat import six
class BaseObject(object):
def __repr__(self):
result = self.__class__.__name__ + '{ '
counter = 0
for key, value in six.iteritems(self.__dict__):
# first itera... | unknown | codeparrot/codeparrot-clean | ||
import datetime
import time
from collections import namedtuple
from operator import itemgetter
from typing import Any, Dict, List, Set, Tuple, Union
from unittest import mock
import ujson
from django.conf import settings
from django.db import IntegrityError
from django.db.models import Q
from django.http import HttpRe... | unknown | codeparrot/codeparrot-clean | ||
import logging
from flask import current_app
from drift.core.extensions.jwt import query_current_user
log = logging.getLogger(__name__)
def _update_analytics():
client_id = None
current_user = query_current_user()
if current_user:
user_id = current_user["user_id"]
client_id = current_use... | 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/KafkaFutureTest.java |
# -*- coding: utf-8 -*-
"""
***************************************************************************
Grass7Algorithm.py
---------------------
Date : February 2015
Copyright : (C) 2014-2015 by Victor Olaya
Email : volayaf at gmail dot com
****************... | unknown | codeparrot/codeparrot-clean | ||
Article detail template. | html | github | https://github.com/django/django | tests/templates/views/article_detail.html |
import csv
import matplotlib.pyplot as plt
from numpy import *
import scipy.interpolate
import math
from pylab import *
from matplotlib.ticker import MultipleLocator, FormatStrFormatter
import matplotlib.patches as patches
from matplotlib.path import Path
import os
# ---------------------------------------------------... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2011, Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the... | 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/clients/consumer/OffsetCommitCallback.java |
"""Models for API management."""
import logging
from smtplib import SMTPException
from config_models.models import ConfigurationModel
from django.conf import settings
from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user
from django.contrib.sites.models import Site
from djang... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2002-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | java | github | https://github.com/spring-projects/spring-framework | spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassWithConditionTests.java |
// Copyright 2017 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.
package base
import (
"context"
"sync/atomic"
"github.com/cockroachdb/cockroach/pkg/util/uuid"
"github.com/cockroachdb/errors"
)
// ClusterIDContainer is used to ... | go | github | https://github.com/cockroachdb/cockroach | pkg/base/cluster_id.go |
# 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
INCLUDES = """
#include <openssl/dh.h>
"""
TYPES = """
typedef struct dh... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: iso-8859-15 -*-
# =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
#
# Copyright (c) 2015 Tom Kralidis
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files... | unknown | codeparrot/codeparrot-clean | ||
from django import forms
from django.contrib.auth import authenticate
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy, ugettext as _
ERROR_MESSAGE = ugettext_lazy("Please enter a correct username and password. "
... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import re
import os
import locale
import sys
try:
# reduce moved to functools in python3.
reduce
except NameError:
from functools import reduce
def XmlToSt... | unknown | codeparrot/codeparrot-clean | ||
from datetime import datetime, timedelta
from django.contrib.auth.models import User
from rest_framework.test import APITestCase, APIClient
from rest_framework.reverse import reverse
from rest_framework import status
from students.models import Class, Subject, Student, Teacher
from .serializers import HomeworkSeria... | unknown | codeparrot/codeparrot-clean | ||
- block:
- name: check baseline
command: ansible-inventory -i '{{ role_path }}/files/valid_sample.yml' --list
register: limited
- name: ensure non empty host list
assert:
that:
- "'something' in inv['_meta']['hostvars']"
- name: check that limit removes host
command: ansible-invent... | unknown | github | https://github.com/ansible/ansible | test/integration/targets/ansible-inventory/tasks/json_output.yml |
# Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.
#
# Authors:
# Brian Paul
"""The TileDialog class is a dialog used to edit a list of tiles for
a server/network node. If the server node is an N-instance node the
dialog wil... | unknown | codeparrot/codeparrot-clean | ||
import {
createCodeFixAction,
createCombinedCodeActions,
eachDiagnostic,
registerCodeFix,
} from "../_namespaces/ts.codefix.js";
import {
AnyImportOrRequire,
AnyImportOrRequireStatement,
AnyImportSyntax,
arrayFrom,
BindingElement,
CancellationToken,
cast,
changeAnyExtensi... | typescript | github | https://github.com/microsoft/TypeScript | src/services/codefixes/importFixes.ts |
from ..message_server import Message, ClosingMessage
from ..interaction import instantiate
from ..network_error import NetworkError
class HelloMessage(Message):
"""
Let's name ourselves!
"""
def __init__(self, name=""):
Message.__init__(self)
self.name = name
def __setstate__(self,... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2010-2011 OpenStack Foundation
# 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 | ||
import type { NextApiRequest, NextApiResponse } from "next";
const regenerate = async (req: NextApiRequest, res: NextApiResponse) => {
if (req.query.secret !== process.env.NEXT_PRIVATE_REGENERATION_SECRET) {
console.error("Error regenerating: Invalid Token.");
return res
.status(401)
.json({ mess... | typescript | github | https://github.com/vercel/next.js | examples/cms-payload/pages/api/regenerate.ts |
# -*- coding: utf-8 -*-
from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import redirect, render_to_response
from django.views.decorators.http import require_http_methods
from collector.forms import CollectorForm
from collector.models import Blob
from collector.utils.email i... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
"""
Synopsis:
Generate Django model and form definitions.
Write to forms.py and models.py.
Usage:
python gen_model.py [options]
Options:
-f, --force
Overwrite models.py and forms.py without asking.
-h, --help
Show this help message.
"""
import sys
impor... | unknown | codeparrot/codeparrot-clean | ||
# sshrepo.py - ssh repository proxy class for mercurial
#
# Copyright 2005, 2006 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.
from node import bin, hex
from i18n import _
import repo, util, error,... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright 2017 - 2025 R. Thomas
* Copyright 2017 - 2025 Quarkslab
*
* 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 req... | cpp | github | https://github.com/nodejs/node | deps/LIEF/src/PE/signature/ContentInfo.cpp |
// 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 ).
//! Transform Extensions provide information on content transformations in a given locale.
//!
//! The main struct fo... | rust | github | https://github.com/nodejs/node | deps/crates/vendor/icu_locale_core/src/extensions/transform/mod.rs |
/*
* 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 ... | java | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/DefaultMetricsFactory.java |
/**
* 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... | java | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestSymlinkLocalFSFileContext.java |
An attempted implementation of a trait method has the wrong number of function
parameters.
Erroneous code example:
```compile_fail,E0050
trait Foo {
fn foo(&self, x: u8) -> bool;
}
struct Bar;
// error: method `foo` has 1 parameter but the declaration in trait `Foo::foo`
// has 2
impl Foo for Bar {
fn foo(&... | unknown | github | https://github.com/rust-lang/rust | compiler/rustc_error_codes/src/error_codes/E0050.md |
/*
* min.c -- a minimal Lua interpreter
* loads stdin only with minimal error handling.
* no interaction, and no standard library, only a "print" function.
*/
#include <stdio.h>
#include "lua.h"
#include "lauxlib.h"
static int print(lua_State *L)
{
int n=lua_gettop(L);
int i;
for (i=1; i<=n; i++)
{
if (i>1) pr... | c | github | https://github.com/redis/redis | deps/lua/etc/min.c |
/* 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 applicable law or a... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/core/common_runtime/graph_view.h |
# Eventually the mechanism used by this suite will be moved into read_concern_majority_passthrough,
# and the other similar existing suites that use CWRWC compatible RC.
test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/fle2/**/*.js
- src/mongo/db/modules/*/jstests/fle2/**/*.js
excl... | unknown | github | https://github.com/mongodb/mongo | buildscripts/resmokeconfig/suites/cwrwc_rc_majority_passthrough.yml |
use std::collections::BTreeSet;
use anyhow::Result;
use bincode::{Decode, Encode};
use turbo_rcstr::{RcStr, rcstr};
use turbo_tasks::{ResolvedVc, TaskInput, Vc, trace::TraceRawVcs};
use turbo_tasks_fs::FileSystemPath;
use turbopack::module_options::{
CssOptionsContext, EcmascriptOptionsContext, JsxTransformOptions... | rust | github | https://github.com/vercel/next.js | crates/next-core/src/next_client/context.rs |
#
# Copyright 2013, 2015 Red Hat, Inc.
# Copyright(c) FUJITSU Limited 2007.
#
# Cloning a virtual machine module.
#
# This work is licensed under the GNU GPLv2 or later.
# See the COPYING file in the top-level directory.
import re
import os
import libvirt
from . import generatename
from . import progress
from . impo... | unknown | codeparrot/codeparrot-clean | ||
/*
* jfdctint.c
*
* Copyright (C) 1991-1996, Thomas G. Lane.
* Modification developed 2003-2018 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
* This file contains a slow-but-accurate integer implem... | c | github | https://github.com/opencv/opencv | 3rdparty/libjpeg/jfdctint.c |
# coding=utf-8
import os
import unittest
from collections import namedtuple, Counter
import six
from requests.exceptions import HTTPError
from conans.client.rest.file_uploader import FileUploader
from conans.errors import AuthenticationException, ForbiddenException
from conans.test.utils.test_files import temp_folde... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# encoding: utf-8
from __future__ import unicode_literals
from django.db import models
from django_extensions.db.fields import AutoSlugField
from django.utils.translation import ugettext_lazy as _
class News(models.Model):
"""
Django Model to hold News that will display on the homepage.
... | unknown | codeparrot/codeparrot-clean | ||
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: login-options
Arg: <options>
Protocols: IMAP LDAP POP3 SMTP
Help: Server login options
Added: 7.34.0
Category: imap pop3 smtp auth ldap
Multi: single
See-also:
- user
Example:
- --login-options 'AUTH=*' imap://example... | unknown | github | https://github.com/curl/curl | docs/cmdline-opts/login-options.md |
#
# Copyright (C) 2008 The Android Open Source Project
#
# 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 la... | 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 | ||
# coding=utf-8
##Copyright (C) [2005] [Jürgen Hamel, D-32584 Löhne]
##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 later version.
##Thi... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
import errno
import os
import sys
from datetime import datetime
from functools import partial
import time
_socket = __import__("socket")
# workaround on osx, disable kqueue
if sys.platform =... | unknown | codeparrot/codeparrot-clean | ||
import re, os, logging, commands
from autotest.client.shared import error
from virttest import remote, libvirt_vm, virsh, libvirt_xml
from xml.dom.minidom import parse
def run_virsh_setvcpus(test, params, env):
"""
Test command: virsh setvcpus.
The conmand can change the number of virtual CPUs in the gues... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
***************************************************************************
ReliefColorsWidget.py
---------------------
Date : December 2016
Copyright : (C) 2016 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
*****... | unknown | codeparrot/codeparrot-clean | ||
// SPDX-License-Identifier: GPL-2.0-or-later
extern void *jent_kvzalloc(unsigned int len);
extern void jent_kvzfree(void *ptr, unsigned int len);
extern void *jent_zalloc(unsigned int len);
extern void jent_zfree(void *ptr);
extern void jent_get_nstime(__u64 *out);
extern int jent_hash_time(void *hash_state, __u64 tim... | c | github | https://github.com/torvalds/linux | crypto/jitterentropy.h |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: io/prometheus/client/metrics.proto
package io_prometheus_client
import (
encoding_binary "encoding/binary"
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
types "git... | go | github | https://github.com/prometheus/prometheus | prompb/io/prometheus/client/metrics.pb.go |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# $Id$
#
# Copyright 2009 Glencoe Software, Inc. All rights reserved.
# Use is subject to license terms supplied in LICENSE.txt
#
# Version comparison functionality
import re
import logging
# Regex copied from ome.api.IConfig.VERSION_REGEX
REGEX = re.compile("^.*?[-]?(\... | unknown | codeparrot/codeparrot-clean | ||
from unittest import TestCase
from DownloaderForReddit.utils.importers import text_importer
class TestTextImporter(TestCase):
def test_remove_forbidden_chars(self):
text = ' this \n is a\nname-for-import '
clean = text_importer.remove_forbidden_chars(text)
self.assertEqual('thisisaname-f... | unknown | codeparrot/codeparrot-clean | ||
---
- hosts: testhost
gather_facts: False
tasks:
- pause:
seconds: 1 | unknown | github | https://github.com/ansible/ansible | test/integration/targets/plugin_filtering/pause.yml |
from sqlalchemy.testing import eq_, assert_raises, \
assert_raises_message, ne_, expect_warnings
import sys
from sqlalchemy import event
from sqlalchemy.testing.engines import testing_engine
from sqlalchemy import create_engine, MetaData, INT, VARCHAR, Sequence, \
select, Integer, String, func, text, exc
from s... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###########################################################
# WARNING: Generated code! #
# ************************** #
# Manual changes may get lost if file is generated again. #
# Only code inside the [MANUAL] ta... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
# Author: Daniel Heimans
# URL: http://code.google.com/p/sickbeard
#
# This file is part of SickRage.
#
# SickRage 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 | ||
/**
* 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... | java | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/MetricsFilter.java |
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package funcs
import (
"fmt"
"math/big"
"github.com/apparentlymart/go-cidr/cidr"
"github.com/hashicorp/terraform/internal/ipaddr"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/function"
"github.com/zclconf/go-cty/cty/gocty"... | go | github | https://github.com/hashicorp/terraform | internal/lang/funcs/cidr.go |
# 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 | ||
/*
* 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/compress/Lz4BlockInputStream.java |
---
title: svelte
---
> MODULE: svelte | unknown | github | https://github.com/sveltejs/svelte | documentation/docs/98-reference/20-svelte.md |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Cumulus Networks <ce-ceng@cumulusnetworks.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 Software Foundation, either version 3... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.