code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: MPL-2.0
package api
// NOTE: this file was copied from
// https://github.com/hashicorp/vault/blob/main/sdk/helper/consts/plugin_runtime_types.go
// Any changes made should be made to both files at the same time.
import "fmt"
var PluginRuntimeTypes = _Plu... | go | github | https://github.com/hashicorp/vault | api/plugin_runtime_types.go |
//// [tests/cases/compiler/arrowFunctionInExpressionStatement2.ts] ////
//// [arrowFunctionInExpressionStatement2.ts]
namespace M {
() => 0;
}
//// [arrowFunctionInExpressionStatement2.js]
"use strict";
var M;
(function (M) {
() => 0;
})(M || (M = {})); | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/arrowFunctionInExpressionStatement2.js |
#!/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 | ||
{% if debug == True %}
Have debug
First query list: {{ sql_queries|length }}
{% for obj in debug_objects.all %}{{ obj }}{% endfor %}
Second query list: {{ sql_queries|length }}
{% for obj in debug_objects.all %}{{ obj }}{% endfor %}
Third query list: {{ sql_queries|length }}
{% for obj in other_debug_objects.all... | html | github | https://github.com/django/django | tests/context_processors/templates/context_processors/debug.html |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe, unittest, json
# commented due to commits -- only run when comments are modified
# class TestComment(unittest.TestCase):
# def setUp(self):
# self.cleanup()
# ... | unknown | codeparrot/codeparrot-clean | ||
from unittest import TestCase
import tempfile
import os
from nose.plugins.attrib import attr
from biicode.common.test.conf import BII_TEST_FOLDER
from biicode.client.workspace.bii_ignore import BiiIgnore
from biicode.client.shell.biistream import BiiOutputStream
from biicode.common.utils.file_utils import save
from bii... | unknown | codeparrot/codeparrot-clean | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package moduleaddrs
// NormalizePackageAddress turns a user-supplied source address into a
// normalized address which always includes a prefix naming a protocol to fetch
// with and may also include a transformed/normalized version of the
// proto... | go | github | https://github.com/hashicorp/terraform | internal/getmodules/moduleaddrs/package.go |
# The script MUST contain a function named azureml_main
# which is the entry point for this module.
#
# The entry point function can contain up to two input arguments:
# Param<dataframe1>: a pandas.DataFrame
# Param<dataframe2>: a pandas.DataFrame
# This module develop the counting features of log events.
# The out... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
)
from ..utils import (
unified_strdate,
)
class UrortIE(InfoExtractor):
IE_DESC = 'NRK P3 Urørt'
_VALID_URL = r'https?://(?:www\.)?urort\.p3\.no/#!/Band/(?P<id>[^/]+)$... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
#
# ===-----------------------------------------------------------------------===#
#
# 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
#
# ===-------... | python | github | https://github.com/llvm/llvm-project | clang-tools-extra/clang-tidy/add_new_check.py |
# Copyright 2010 Google Inc.
#
# 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, dis-
# trib... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2002-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | kotlin | github | https://github.com/spring-projects/spring-framework | framework-docs/src/main/kotlin/org/springframework/docs/web/websocket/websocketserverruntimeconfiguration/WebSocketConfiguration.kt |
import {
type ComponentInternalInstance,
type ComponentOptions,
type ConcreteComponent,
type SetupContext,
currentInstance,
getComponentName,
getCurrentInstance,
} from '../component'
import {
Comment,
type VNode,
type VNodeProps,
cloneVNode,
invokeVNodeHook,
isSameVNodeType,
isVNode,
} from... | typescript | github | https://github.com/vuejs/core | packages/runtime-core/src/components/KeepAlive.ts |
/*
* Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.client.engine.cio
import io.ktor.client.*
import io.ktor.client.plugins.sse.*
import io.ktor.client.plugins.websocket.*
import io.ktor.client.request.*
import io.ktor.client.s... | kotlin | github | https://github.com/ktorio/ktor | ktor-client/ktor-client-cio/common/test/CIOEngineTest.kt |
# Patching Batch Norm
## What's happening?
Batch Norm requires in-place updates to running_mean and running_var of the same size as the input.
Functorch does not support inplace update to a regular tensor that takes in a batched tensor (i.e.
`regular.add_(batched)` is not allowed). So when vmapping over a batch of inp... | unknown | github | https://github.com/pytorch/pytorch | docs/source/func.batch_norm.md |
//! Store the provenance for each byte in the range, with a more efficient
//! representation for the common case where PTR_SIZE consecutive bytes have the same provenance.
use std::cmp;
use std::ops::{Range, RangeBounds};
use rustc_abi::{HasDataLayout, Size};
use rustc_data_structures::sorted_map::SortedMap;
use rus... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_middle/src/mir/interpret/allocation/provenance_map.rs |
import {
Combobox,
ComboboxInput,
ComboboxPopup,
ComboboxPopupContainer,
} from '@angular/aria/combobox';
import {Listbox, Option} from '@angular/aria/listbox';
import {
afterRenderEffect,
ChangeDetectionStrategy,
Component,
computed,
signal,
viewChild,
viewChildren,
} from '@angular/core';
import... | typescript | github | https://github.com/angular/angular | adev/src/content/examples/aria/multiselect/src/icons/app/app.ts |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# smoke_zephyr/utilities.py
#
# 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 l... | unknown | codeparrot/codeparrot-clean | ||
use serde_derive::Serialize;
#[derive(Serialize)]
struct S {
#[serde(rename(serialize = "x", serialize = "y"))]
x: (),
}
fn main() {} | rust | github | https://github.com/serde-rs/serde | test_suite/tests/ui/duplicate-attribute/rename-ser-ser.rs |
""" recording warnings during test function execution. """
import inspect
import _pytest._code
import py
import sys
import warnings
import pytest
@pytest.yield_fixture
def recwarn(request):
"""Return a WarningsRecorder instance that provides these methods:
* ``pop(category=None)``: return last warning match... | unknown | codeparrot/codeparrot-clean | ||
# Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
Hold command line arguments for use in other modules
"""
from __future__ import annotations
from abc import ABCMeta
from collections.abc import Container, Mapping, Sequence, Set
fro... | python | github | https://github.com/ansible/ansible | lib/ansible/utils/context_objects.py |
use std::{future::Future, marker::PhantomData, rc::Rc};
use actix_service::boxed::{self, BoxFuture, RcService};
use actix_utils::future::{ready, Ready};
use futures_core::future::LocalBoxFuture;
use crate::{
body::MessageBody,
dev::{forward_ready, Service, ServiceRequest, ServiceResponse, Transform},
Erro... | rust | github | https://github.com/actix/actix-web | actix-web/src/middleware/from_fn.rs |
# Unix SMB/CIFS implementation.
# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007-2010
#
# 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 opti... | unknown | codeparrot/codeparrot-clean | ||
// RUN: cp %s %t.cpp
// RUN: clang-include-cleaner -edit %t.cpp -- -I%S/Inputs/modules -fimplicit-module-maps -fmodules-strict-decluse -fmodule-name=XA
// RUN: FileCheck --match-full-lines --check-prefix=EDIT %s < %t.cpp
// Verify the tool still works on compilable-but-layering-violation code.
#include "a.h"
// EDIT-N... | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/include-cleaner/test/module.cpp |
#
# This file is part of Healpy.
#
# Healpy 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.
#
# Healpy is distributed in the hope... | unknown | codeparrot/codeparrot-clean | ||
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
import logging
import unittest
from datetime import datetime, timedelta
import pytz
from django.conf import settings
from django.test im... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
import cStringIO
import contextlib
import datetime
import hashlib
import inspect
import logging
import math
import mimetypes
import unicodedata
import os
import re
import time
import urlparse
from PIL import Image
from sys import maxint
import werkzeug
# optional python-slugify import (https:/... | unknown | codeparrot/codeparrot-clean | ||
---
title: Revalidation Optimization
hidden: true
---
[copy pasted]
During client-side transitions, React Router will optimize reloading of routes that are already rendering, like not reloading layout routes that aren't changing. In other cases, like form submissions or search param changes, React Router doesn't know... | unknown | github | https://github.com/remix-run/react-router | docs/how-to/optimize-revalidation.md |
package container
import (
"encoding/json"
"runtime"
"strings"
"testing"
"github.com/containerd/platforms"
"github.com/moby/moby/client"
"github.com/moby/moby/v2/integration/internal/container"
"github.com/moby/moby/v2/internal/testutil/request"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
"got... | go | github | https://github.com/moby/moby | integration/container/inspect_test.go |
from LogAnalyzer import Test,TestResult
import DataflashLog
import numpy
class TestVibration(Test):
'''test for accelerometer vibration (accX/accY/accZ) within recommendations'''
def __init__(self):
Test.__init__(self)
self.name = "Vibration"
def run(self, logdata, verbose):
self... | 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 | ||
# 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 | ||
from __future__ import absolute_import
from .apiresource import ListObject
from .user import User
from .dataset import Dataset
from .datasetfield import DatasetField
from .datasetimport import DatasetImport
from .datasetexport import DatasetExport
from .datasetcommit import DatasetCommit
from .datasetmigration import ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Interface for package-specific builds."""
__metaclass__ = type
__all__ = [
'IPackageBuild',
]
from lazr.restful.declarations import exported
from lazr.restful.fields im... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# mochi-kernel documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# 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
... | unknown | codeparrot/codeparrot-clean | ||
"""
Imports layout and data for HAZMAT data. Creates a refence table
for Reports, as there are multiple incidents per report.
Ideally we would create a different table for the places to help things like
geocoding but that is not implemented at the moment.
"""
import os
import csv
import dateutil.parser
from sqlalchem... | unknown | codeparrot/codeparrot-clean | ||
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | unknown | github | https://github.com/huggingface/transformers | docs/source/es/tasks_explained.md |
import click
from parsec.cli import pass_context, json_loads
from parsec.decorators import custom_exception, dict_output
@click.command('show_repository')
@click.argument("toolShed_id", type=str)
@pass_context
@custom_exception
@dict_output
def cli(ctx, toolShed_id):
"""Display information of a repository from Too... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2012 James McCauley
#
# 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 writi... | unknown | codeparrot/codeparrot-clean | ||
"""Test script for ftplib module."""
# Modified by Giampaolo Rodola' to test FTP class and IPv6 environment
import ftplib
import threading
import asyncore
import asynchat
import socket
import StringIO
from unittest import TestCase
from test import test_support
from test.test_support import HOST
# the dummy data ret... | unknown | codeparrot/codeparrot-clean | ||
import requests
from allauth.socialaccount.providers.oauth2.views import (
OAuth2Adapter,
OAuth2CallbackView,
OAuth2LoginView,
)
from .provider import SalesforceProvider
class SalesforceOAuth2Adapter(OAuth2Adapter):
provider_id = SalesforceProvider.id
@property
def base_url(self):
re... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (c) 2022 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito;
import org.junit.Test;
import org.junit.experimental.runners.Enclosed;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import static org.hamcrest.Matche... | java | github | https://github.com/mockito/mockito | mockito-core/src/test/java/org/mockito/MockTest.java |
import argparse
from char_rnn import CharRNN
from non_personalized_rnn import NonPerRNN
from personalize_rnn import PerRNN
from lib import one_hot, one_hot_to_string, floatX, random_weights
from lf import LF,PFP,BPR
import numpy as np
import theano
import theano.tensor as T
import sys
import random
####################... | unknown | codeparrot/codeparrot-clean | ||
from support.tools import puts, set_trace, model, assert_true, assert_less
import pprint
if False:
def given(str):
return
@given(u'/I install the following languages?/')
def impl(ctx):
ctx.data['lang'] = cfglang = set()
for (lang,) in ctx.table:
if model('res.lang').search([('code', '=', la... | unknown | codeparrot/codeparrot-clean | ||
"""
Test cases for the editor module.
"""
from functools import wraps
from nose.tools import eq_
from diffscuss.support import editor
class patch(object):
"""
Quick and dirty patching. Use it as a decorator or as a context manager.
"""
PATCH_REMOVE = object()
def __init__(self, obj, attr, new):
... | unknown | codeparrot/codeparrot-clean | ||
/* 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/tensorflow/utils/dump_mlir_util.h |
<?php
namespace Illuminate\Contracts\Auth;
interface StatefulGuard extends Guard
{
/**
* Attempt to authenticate a user using the given credentials.
*
* @param array $credentials
* @param bool $remember
* @return bool
*/
public function attempt(array $credentials = [], $remem... | php | github | https://github.com/laravel/framework | src/Illuminate/Contracts/Auth/StatefulGuard.php |
#!/usr/bin/python
# -*- encoding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) Vauxoo (<http://vauxoo.com>).
# All Rights Reserved
###############Credits#########################################... | unknown | codeparrot/codeparrot-clean | ||
#-*- coding: utf-8 -*-
""" VickiPlayer module """
import re
import time
import threading
from functools import cmp_to_key
# works after installing `future` package
from queue import Queue # pylint:disable=import-error
from voiceplay.logger import logger
from voiceplay.utils.loader import PluginLoader
from voiceplay... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 ... | unknown | codeparrot/codeparrot-clean | ||
// boost/chrono/process_cpu_clocks.hpp -----------------------------------------------------------//
// Copyright 2009-2011 Vicente J. Botet Escriba
// Copyright (c) Microsoft Corporation 2014
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http... | unknown | github | https://github.com/mysql/mysql-server | extra/boost/boost_1_87_0/boost/chrono/process_cpu_clocks.hpp |
from textwrap import dedent
import numpy as np
import pytest
from pandas.compat import is_platform_windows
from pandas.errors import Pandas4Warning
import pandas as pd
from pandas import (
DataFrame,
Index,
Series,
TimedeltaIndex,
Timestamp,
)
import pandas._testing as tm
from pandas.core.indexes... | python | github | https://github.com/pandas-dev/pandas | pandas/tests/resample/test_resampler_grouper.py |
/*
* 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 | cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/options/OptionHandler.java |
/*
* Copyright (C) 2007 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | java | github | https://github.com/google/guava | android/guava-tests/test/com/google/common/collect/MultimapsTest.java |
# -*- coding: utf-8 -*-
"""
requests.auth
~~~~~~~~~~~~~
This module contains the authentication handlers for Requests.
"""
import os
import re
import time
import hashlib
import threading
import warnings
from base64 import b64encode
from .compat import urlparse, str, basestring
from .cookies import extract_cookies_... | unknown | codeparrot/codeparrot-clean | ||
import { redirectDocument } from "react-router";
export function loader() {
throw redirectDocument("/about?redirected");
} | typescript | github | https://github.com/remix-run/react-router | playground/rsc-vite/src/routes/redirect.ts |
"""
Instagram Image Tag
-------------------
By `Tom Spalding <https://github.com/digitalvapor>`_
You can see a working example at `antivapor.net/instagram-tag.html <http://antivapor.net/instagram-tag.html>`_.
Based on `Liquid Image Tag <https://github.com/getpelican/pelican-plugins/blob/master/liquid_tags/img.py>`_ ... | unknown | codeparrot/codeparrot-clean | ||
"""
Tests for grid-based shape features.
"""
import unittest
from rdkit import Chem
from vs_utils.features.shape_grid import ShapeGrid
from vs_utils.utils.rdkit_utils import conformers
class TestShapeGrid(unittest.TestCase):
"""
Tests for ShapeGrid featurizer.
"""
def setUp(self):
"""
... | unknown | codeparrot/codeparrot-clean | ||
from django.utils import timezone
import mock
import pytest
from addons.wiki.tests.factories import WikiFactory
from api.base.settings.defaults import API_BASE
from api_tests import utils as test_utils
from osf.models import Guid
from osf_tests.factories import (
ProjectFactory,
AuthUserFactory,
CommentFac... | unknown | codeparrot/codeparrot-clean | ||
"""
Extracts the version of the PostgreSQL server.
"""
import re
# This reg-exp is intentionally fairly flexible here.
# Needs to be able to handle stuff like:
# PostgreSQL 8.3.6
# EnterpriseDB 8.3
# PostgreSQL 8.3 beta4
# PostgreSQL 8.4beta1
VERSION_RE = re.compile(r'\S+ (\d+)\.(\d+)\.?(\d+)?')
def _parse_v... | unknown | codeparrot/codeparrot-clean | ||
<?php
namespace Illuminate\Foundation\Console;
use Illuminate\Console\Command;
use Illuminate\Contracts\Console\Kernel as ConsoleKernelContract;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Routing\RouteCollection;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'route:cache')]
class Rou... | php | github | https://github.com/laravel/framework | src/Illuminate/Foundation/Console/RouteCacheCommand.php |
#!/usr/bin/python3
import sys, os
def lookForId( line ):
idName = line.replace('<SimpleData name="id">','')
idName = idName.replace('</SimpleData>','')
idName = idName.strip()
return idName
def lookForNumStep( line ):
numStep = line.replace('<SimpleData name="num step">','')
numStep = numStep.replace('</Simpl... | unknown | codeparrot/codeparrot-clean | ||
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
addonmanager.kubernetes.io/mode: Reconcile
name: bgppeers.crd.projectcalico.org
spec:
group: crd.projectcalico.org
names:
kind: BGPPeer
listKind: BGPPeerList
plural: bgppeers
singular: bgppeer
scope: Clust... | unknown | github | https://github.com/kubernetes/kubernetes | cluster/addons/calico-policy-controller/bgppeers-crd.yaml |
import sys
import time
import threading
from twisted.internet import reactor
sys.path.append('.')
import marionette_tg.channel as channel
class ServerThread(threading.Thread):
def run(self):
print 'Starting server...'
self.channel_ = None
while True:
ch = channel.accept_new_c... | unknown | codeparrot/codeparrot-clean | ||
"""A dumb and slow but simple dbm clone.
For database spam, spam.dir contains the index (a text file),
spam.bak *may* contain a backup of the index (also a text file),
while spam.dat contains the data (a binary file).
XXX TO DO:
- seems to contain a bug when updating...
- reclaim free space (currently, space once o... | python | github | https://github.com/python/cpython | Lib/dbm/dumb.py |
package daemon
import (
"bytes"
"io"
"runtime"
"testing"
"github.com/moby/moby/client"
"github.com/moby/moby/v2/integration/internal/container"
"github.com/moby/moby/v2/internal/testutil"
"github.com/moby/moby/v2/internal/testutil/daemon"
"github.com/moby/moby/v2/internal/testutil/fixtures/load"
"gotest.too... | go | github | https://github.com/moby/moby | integration/daemon/migration_test.go |
#!/usr/bin/env python
# Copyright 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Makes sure that files include headers from allowed directories.
Checks DEPS files in the source tree for rules, and applies those r... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright 2022 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/distributed_runtime/coordination/coordination_service_error_util.h |
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
# T... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
#
# Copyright 2017 The Oppia 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 requi... | unknown | codeparrot/codeparrot-clean | ||
"""orc compat"""
from __future__ import annotations
import io
from typing import (
TYPE_CHECKING,
Any,
Literal,
)
from pandas._libs import lib
from pandas.compat._optional import import_optional_dependency
from pandas.util._decorators import set_module
from pandas.util._validators import check_dtype_back... | python | github | https://github.com/pandas-dev/pandas | pandas/io/orc.py |
"""
Copyright (c) 2015 Michael Bright and Bamboo HR LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright (c) 2012 Thomas Parslow http://almostobsolete.net/
#
# 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 th... | unknown | codeparrot/codeparrot-clean | ||
// runoutput
// 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.
// Test source file beginning with a byte order mark.
package main
import (
"fmt"
"strings"
)
func main() {
prog = strings.Replace(prog, "BO... | go | github | https://github.com/golang/go | test/bom.go |
/* Copyright 2021 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/tfrt/utils/tensor_util.h |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | unknown | github | https://github.com/huggingface/transformers | docs/source/en/model_doc/zamba.md |
from distutils.core import setup, Command
import os
import sys
import nose
class TestRunner(Command):
description = 'Run the metOcean unit tests'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
lib_dir = os.path.join(s... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# 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
#... | unknown | codeparrot/codeparrot-clean | ||
import re
from couchpotato.core.helpers.rss import RSS
from couchpotato.core.helpers.variable import tryInt, splitString
from couchpotato.core.logger import CPLog
from couchpotato.core.media.movie.providers.automation.base import Automation
log = CPLog(__name__)
autoload = 'CrowdAI'
class CrowdAI(Automation, RSS):
... | unknown | codeparrot/codeparrot-clean | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package terraform
import (
"fmt"
"log"
"github.com/hashicorp/terraform/internal/addrs"
"github.com/hashicorp/terraform/internal/plans"
"github.com/hashicorp/terraform/internal/providers"
"github.com/hashicorp/terraform/internal/tfdiags"
"gi... | go | github | https://github.com/hashicorp/terraform | internal/terraform/node_resource_plan_instance_query.go |
from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks
from autobahn.wamp.types import PublishOptions, SubscribeOptions
from autobahn.twisted.wamp import ApplicationSession
from autobahn.twisted.wamp import ApplicationRunner
from autobahn.twisted.util import sleep
class MyComponent(Ap... | unknown | codeparrot/codeparrot-clean | ||
/** @import { Blocker, ComponentContext, ComponentContextLegacy, Derived, Effect, TemplateNode, TransitionManager } from '#client' */
import {
is_dirty,
active_effect,
active_reaction,
update_effect,
get,
is_destroying_effect,
remove_reactions,
set_active_reaction,
set_is_destroying_effect,
untrack,
untracki... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/src/internal/client/reactivity/effects.js |
"""GraphLasso: sparse inverse covariance estimation with an l1-penalized
estimator.
"""
# Author: Gael Varoquaux <gael.varoquaux@normalesup.org>
# License: BSD 3 clause
# Copyright: INRIA
import collections
import operator
import sys
import time
import warnings
import numpy as np
from scipy import linalg
from .empir... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#coding: utf-8 -*-
# (c) 2013, David Stygstra <david.stygstra@gmail.com>
#
# Portions copyright @ 2015 VMware, Inc.
#
# This file is part of Ansible
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2020 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 by applicable law or a... | unknown | codeparrot/codeparrot-clean | ||
# 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 *
class Xterm(AutotoolsPackage):
"""The xterm program is a terminal emulator for the X Window Syste... | unknown | codeparrot/codeparrot-clean | ||
"""
==========================
GMM Initialization Methods
==========================
Examples of the different methods of initialization in Gaussian Mixture Models
See :ref:`gmm` for more information on the estimator.
Here we generate some sample data with four easy to identify clusters. The
purpose of this example ... | python | github | https://github.com/scikit-learn/scikit-learn | examples/mixture/plot_gmm_init.py |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright (c) 2020 Ansible Project
# 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
import pytest
from ansible.module_utils.common.parameters import get_unsuppor... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from django.db import DatabaseError
from explorer import app_settings
def query_viewmodel(request, query, title=None, form=None, message=None,
run_query=True, error=None,
rows=app_settings.EXPLORER_DEFAULT_ROWS):
"""
:return: Returns the context... | unknown | codeparrot/codeparrot-clean | ||
from setuptools import setup
dic = dict(__file__=None)
exec(open('src/decorator.py').read(), dic) # extract the __version__
VERSION = dic['__version__']
if __name__ == '__main__':
setup(name='decorator',
version=VERSION,
description='Decorators for Humans',
long_description=open('RE... | unknown | codeparrot/codeparrot-clean | ||
use core::ops::ControlFlow;
use either::Either;
use hir::{ExprKind, Param};
use rustc_abi::FieldIdx;
use rustc_errors::{Applicability, Diag};
use rustc_hir::intravisit::Visitor;
use rustc_hir::{self as hir, BindingMode, ByRef, Node};
use rustc_middle::bug;
use rustc_middle::hir::place::PlaceBase;
use rustc_middle::mir... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs |
# 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 | ||
// Copyright 2022 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 main
import (
"cmd/go/internal/base"
"os"
"strings"
"testing"
)
func TestChdir(t *testing.T) {
// We want -C to apply to every go subcommand.
//... | go | github | https://github.com/golang/go | src/cmd/go/chdir_test.go |
import numpy as np
import bpy
from bpy.props import FloatProperty, EnumProperty, BoolProperty, IntProperty
from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import (updateNode, zip_long_repeat, ensure_nesting_level,
repeat_last_for_length, throttle_a... | unknown | codeparrot/codeparrot-clean | ||
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2009 Brian G. Matherly
# Copyright (C) 2010 Douglas S. Blank
# Copyright (C) 2011-2019 Jerome Rapinat
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publi... | unknown | codeparrot/codeparrot-clean | ||
from django.conf import settings
from django.contrib.staticfiles.handlers import StaticFilesHandler
from django.core.management.commands.runserver import \
Command as RunserverCommand
class Command(RunserverCommand):
help = "Starts a lightweight Web server for development and also serves static files."
de... | unknown | codeparrot/codeparrot-clean | ||
(()=>{var __webpack_modules__={7995:function(e,A,t){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,A,t,s){if(s===undefined)s=t;var r=Object.getOwnPropertyDescriptor(A,t);if(!r||("get"in r?!A.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return A[t]}}}Object.definePr... | javascript | github | https://github.com/vercel/next.js | .github/actions/next-repo-actions/dist/prs/index.js |
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import os
import os, sys, re
from setuptools import setup, find_packages, Command
class RunTestsCommand(Command):
description = "Test command to run testr in virtualenv"
user_options = [
('coverage', 'c',
"Generate code cov... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import random
from frappe.utils import random_string
from frappe.desk import query_report
from erpnext.accounts.doctype.journal_entry.jou... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.