code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# MultiScanner documentation build configuration file, created by
# sphinx-quickstart on Fri Dec 22 13:35:06 2017.
#
# 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 | ||
/*
* Copyright 2002-2025 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 by a... | kotlin | github | https://github.com/spring-projects/spring-framework | framework-docs/src/main/kotlin/org/springframework/docs/web/webmvc/mvcservlet/AppConfig.kt |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010 Citrix Systems, 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/LICE... | unknown | codeparrot/codeparrot-clean | ||
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v1beta1",
"metadata": {
"name": "v0alpha1.Repeating-Kitchen-Sink.v42"
},
"spec": {
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"uid": "-- Grafana --"
},
"enable"... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/e2e-repeats/v0alpha1.Repeating-Kitchen-Sink.v42.v1beta1.json |
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015, 2016 CERN.
#
# Invenio is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any... | unknown | codeparrot/codeparrot-clean | ||
'''
Created on 15/03/2011
@author: gerson
'''
from django.contrib.auth.models import User, AnonymousUser
from tardis.tardis_portal.models import UserProfile, UserAuthentication
def get_or_create_user_with_username(request, username, auth_key):
isDjangoAccount = True
try:
# check if the given usernam... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | unknown | codeparrot/codeparrot-clean | ||
""" Encoding Aliases Support
This module is used by the encodings package search function to
map encodings names to module names.
Note that the search function normalizes the encoding names before
doing the lookup, so the mapping will have to map normalized
encoding names to module names.
Con... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/kivy
'''
Touch Tracer Line Drawing Demonstration
=======================================
This demonstrates tracking each touch registered to a device. You should
see a basic background image. When you press and hold the mouse, you
should see cross-hairs with the coordinates written next to them. As
you drag... | unknown | codeparrot/codeparrot-clean | ||
"""
Django settings for locallibrary project.
Generated by 'django-admin startproject' using Django 1.10.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
impo... | unknown | codeparrot/codeparrot-clean | ||
# urllib3/request.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
try:
from urllib.parse import urlencode
except ImportError:
from urllib import urlencod... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#Copyright (C) 2011 RaNaN
#
#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.
... | unknown | codeparrot/codeparrot-clean | ||
import random
class RandomWalk(object):
ACTIONS = [0]
def __init__(self):
self.num_states = 7
self.current_state = 3
def take_action(self, action):
if action > 0:
raise ValueError('Only action "0" supported in this domain')
if self.current_state == 0 or self.cu... | unknown | codeparrot/codeparrot-clean | ||
try:
from builtins import object
except ImportError:
pass
from transitions.extensions import MachineFactory
from transitions.extensions import NestedState as State
from .test_core import TestTransitions as TestsCore
from .utils import Stuff
try:
from unittest.mock import MagicMock
except ImportError:
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import copy
import datetime
from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase
from django.core.files.uploadedfile import SimpleUploadedFile
from django.core.urlresolvers import reverse
from django.forms import *
from django.forms.widg... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
from grab import DataNotFound, GrabMisuseError
import six
from test.util import build_grab
from test.util import BaseGrabTestCase
HTML = u"""
<head>
<title>фыва</title>
<meta http-equiv="Content-Type" content="text/html; charset=cp1251" />
</head>
<body>
<div id="bee">
<div class="... | unknown | codeparrot/codeparrot-clean | ||
"""Thread-local objects.
(Note that this module provides a Python version of the threading.local
class. Depending on the version of Python you're using, there may be a
faster one available. You should always import the `local` class from
`threading`.)
"""
from weakref import ref
from contextlib import contextman... | python | github | https://github.com/python/cpython | Lib/_threading_local.py |
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: MPL-2.0
package plugin
import (
"context"
"reflect"
"testing"
"time"
"github.com/hashicorp/go-plugin"
"github.com/hashicorp/vault/sdk/helper/consts"
"github.com/hashicorp/vault/sdk/logical"
"github.com/hashicorp/vault/sdk/plugin/pb"
"google.golan... | go | github | https://github.com/hashicorp/vault | sdk/plugin/grpc_system_test.go |
/* Copyright 2023 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/quantization/stablehlo/cc/saved_model_export.h |
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import print_function, unicode_literals
import frappe
from frappe.email import sendmail_to_system_managers
from frappe.utils import get_link_to_form
def execute():
wrong_r... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2015-2018 Cisco Systems, 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... | unknown | codeparrot/codeparrot-clean | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package hooks
import (
"github.com/hashicorp/terraform/internal/addrs"
"github.com/hashicorp/terraform/internal/plans"
"github.com/hashicorp/terraform/internal/providers"
"github.com/hashicorp/terraform/internal/rpcapi/terraform1/stacks"
"gith... | go | github | https://github.com/hashicorp/terraform | internal/stacks/stackruntime/hooks/resource_instance.go |
/*
* 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 | configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/record/NestedRecord.java |
from django.core.exceptions import FieldError
from django.db.models.fields import FieldDoesNotExist
from django.db.models.sql.constants import LOOKUP_SEP
class SQLEvaluator(object):
def __init__(self, expression, query, allow_joins=True):
self.expression = expression
self.opts = query.get_meta()
... | unknown | codeparrot/codeparrot-clean | ||
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2beta1",
"metadata": {
"name": "v33.panel_ds_name_to_ref.v42"
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "grafana",
... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/input/migrated_dashboards_from_v0_to_v2/v2beta1.v33.panel_ds_name_to_ref.json |
"""Tests for Interval-Interval operations, such as overlaps, contains, etc."""
import pytest
from pandas import Interval, Timedelta, Timestamp
@pytest.fixture(
params=[
(Timedelta("0 days"), Timedelta("1 day")),
(Timestamp("2018-01-01"), Timedelta("1 day")),
(0, 1),
],
ids=lambda x... | unknown | codeparrot/codeparrot-clean | ||
"""Tests for util.db module."""
import threading
import time
import unittest
from io import StringIO
import ddt
from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user
from django.core.management import call_command
from django.db import IntegrityError, connection
from django.d... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
from numpy import *
from matplotlib.pylab import *
def mag_calibration(mag,gyros=None,LH=200,LV=500):
""" Calibrates the magnetometer data by fitting it to a sphere,
ideally when constantly turning to spread the data around that
sphere somewhat evenly (or at least in a horizo... | 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 | ||
import time
from decimal import Decimal
from winnow.values import value_factory
import unittest
from decimal import Decimal
from winnow.values import value_factory
from winnow.values.numeric_values import NumericNumberWinnowValue, \
NumericSetWinnowValue, \
NumericRangeWinnowValue, \
NumericStepWinnowVal... | unknown | codeparrot/codeparrot-clean | ||
import re
from django import template
from django.conf import settings
from django.template import TemplateSyntaxError
from django.utils import six
from django.utils.encoding import smart_str
from django_hosts.reverse import reverse_full
register = template.Library()
kwarg_re = re.compile(r"(?:(\w+)=)?(.+)")
class ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2012-6 Met Office.
#
# This file is part of Rose, a framework for meteorological suites.
#
# Rose is free software: you can redistribute it and/or modify
# it under the terms of the GNU ... | unknown | codeparrot/codeparrot-clean | ||
//===--- PostingList.h - Symbol identifiers storage interface --*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | c | github | https://github.com/llvm/llvm-project | clang-tools-extra/clangd/index/dex/PostingList.h |
import math
from flask import jsonify, request, Response
from up.headliner import Application
from up.headliner.http import webapp
ERR_NO_QUERY = '{"err":"no query object provided"}'
ERR_INVALID_QUERY = '{"err":"invalid query"}'
MAX_RESPONSE_SIZE = 100
@webapp.route("/nytimes/mostpopular.json", methods=["GET"])
def... | unknown | codeparrot/codeparrot-clean | ||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012-2013 NEC Corporation. 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.apach... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# 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 requir... | unknown | codeparrot/codeparrot-clean | ||
# `@tailwindcss/oxide-win32-arm64-msvc`
This is the **arm64-pc-windows-msvc** binary for `@tailwindcss/oxide` | unknown | github | https://github.com/tailwindlabs/tailwindcss | crates/node/npm/win32-arm64-msvc/README.md |
use napi::{CallContext, JsObject, JsUnknown};
use napi_derive::{js_function, module_exports};
#[allow(clippy::not_unsafe_ptr_arg_deref)]
#[js_function(1)]
fn transform(ctx: CallContext) -> napi::Result<JsUnknown> {
lightningcss_napi::transform(ctx)
}
#[allow(clippy::not_unsafe_ptr_arg_deref)]
#[js_function(1)]
fn... | rust | github | https://github.com/vercel/next.js | crates/next-napi-bindings/src/css/mod.rs |
/*
* 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 | configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/name/LombokNameAnnotationProperties.java |
// Copyright 2015 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.
// The working directory in Plan 9 is effectively per P, so different
// goroutines and even the same goroutine as it's rescheduled on
// different Ps can see d... | go | github | https://github.com/golang/go | src/syscall/pwd_plan9.go |
"""
Views and functions for serving static files. These are only to be used during
development, and SHOULD NOT be used in a production setting.
"""
import mimetypes
import os
import posixpath
import re
import stat
import urllib
from email.Utils import parsedate_tz, mktime_tz
from django.conf import settings
from djan... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# coding: utf-8
import os
import sys
import struct
import time
import select
import socket
sys.path.append('.')
import marionette_tg.conf
SERVER_IFACE = marionette_tg.conf.get("server.listen_iface")
SERVER_TIMEOUT = 0.001
class Channel(object):
def __init__(self, conn):
self.conn... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.server.netty
import io.ktor.server.application.*
import io.ktor.server.engine.*
import io.ktor.util.*
import io.netty.buffer.*
import io.netty.channel.*
import io.netty.util.*... | kotlin | github | https://github.com/ktorio/ktor | ktor-server/ktor-server-netty/jvm/src/io/ktor/server/netty/NettyApplicationCall.kt |
//go:build !windows
/*
Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | go | github | https://github.com/kubernetes/kubernetes | pkg/kubelet/userns/userns_manager.go |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'TrackedUser', fields ['project', 'ident']
db.delete_unique('sentry_trackedus... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | unknown | codeparrot/codeparrot-clean | ||
<?php
namespace Illuminate\Queue;
use Illuminate\Contracts\Queue\ClearableQueue;
use Illuminate\Contracts\Queue\Queue as QueueContract;
use Illuminate\Contracts\Redis\Factory as Redis;
use Illuminate\Queue\Jobs\RedisJob;
use Illuminate\Redis\Connections\PhpRedisClusterConnection;
use Illuminate\Redis\Connections\Pred... | php | github | https://github.com/laravel/framework | src/Illuminate/Queue/RedisQueue.php |
# -*- coding: utf-8 -*-
import numpy as np
from pygsp.graphs import NNGraph # prevent circular import in Python < 3.5
class Cube(NNGraph):
r"""Hyper-cube (NN-graph).
Parameters
----------
radius : float
Edge lenght (default = 1)
nb_pts : int
Number of vertices (default = 300)
... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2014 OpenStack Foundation
#
# 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 w... | unknown | codeparrot/codeparrot-clean | ||
"""A module to test whether doctest recognizes some 2.2 features,
like static and class methods.
>>> print('yup') # 1
yup
We include some (random) encoded (utf-8) text in the text surrounding
the example. It should be ignored:
ЉЊЈЁЂ
"""
import sys
import unittest
from test import support
if sys.flags.optimize >=... | unknown | codeparrot/codeparrot-clean | ||
'''
Copyright 2017 Akira Kashihara
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, distribute, su... | unknown | codeparrot/codeparrot-clean | ||
"""Class of Augeas Configurators."""
import logging
import augeas
from letsencrypt import errors
from letsencrypt import reverter
from letsencrypt.plugins import common
from letsencrypt_apache import constants
logger = logging.getLogger(__name__)
class AugeasConfigurator(common.Plugin):
"""Base Augeas Configur... | unknown | codeparrot/codeparrot-clean | ||
from django.core.exceptions import FieldError
from django.test import SimpleTestCase, TestCase
from .models import (
AdvancedUserStat, Child1, Child2, Child3, Child4, Image, LinkedList,
Parent1, Parent2, Product, StatDetails, User, UserProfile, UserStat,
UserStatResult,
)
class ReverseSelectRelatedTestCas... | unknown | codeparrot/codeparrot-clean | ||
name: CodeQL
on:
schedule:
# every day at midnight
- cron: "0 0 * * *"
concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
permissions:
contents: read
jobs:
analyze:
runs-on: ubuntu-24.04
permissions:
action... | unknown | github | https://github.com/pandas-dev/pandas | .github/workflows/codeql.yml |
"""
Plot selected years of monthly ERSSTv5 global data
Website : https://www1.ncdc.noaa.gov/pub/data/cmb/ersst/v5/netcdf/
Author : Zachary M. Labe
Date : 22 July 2017
"""
from netCDF4 import Dataset
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap, addcyclic, shiftgrid
import numpy a... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
"""
Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import os
import re
from lib.controller.action import action
from lib.controller.checks import checkSqlInjection
from lib.controller.checks import checkDynParam
from lib.cont... | unknown | codeparrot/codeparrot-clean | ||
# machine account (computer) management
#
# Copyright Bjoern Baumbch <bb@sernet.de> 2018
#
# based on user management
# Copyright Jelmer Vernooij 2010 <jelmer@samba.org>
# Copyright Theresa Halloran 2011 <theresahalloran@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the ... | unknown | codeparrot/codeparrot-clean | ||
# Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | unknown | codeparrot/codeparrot-clean | ||
"""
This module provides a pool manager that uses Google App Engine's
`URLFetch Service <https://cloud.google.com/appengine/docs/python/urlfetch>`_.
Example usage::
from urllib3 import PoolManager
from urllib3.contrib.appengine import AppEngineManager, is_appengine_sandbox
if is_appengine_sandbox():
... | unknown | codeparrot/codeparrot-clean | ||
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html
// This file is based on files from packages softfloat and fdlibm
// issued with the following licenses:
/*==================... | cpp | github | https://github.com/opencv/opencv | modules/core/src/softfloat.cpp |
from django.db import connection, migrations, models
from ...models import models as gis_models
ops = [
migrations.CreateModel(
name='Neighborhood',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.C... | unknown | codeparrot/codeparrot-clean | ||
/* 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/kernels/relu_op_functor.h |
import os
import sys
import shutil
import pstats
import tempfile
from subprocess import Popen, PIPE
import unittest
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
from scrapy.utils.test import get_testenv
class CmdlineTest(unittest.TestCase):
def setUp(self):
self... | unknown | codeparrot/codeparrot-clean | ||
CHANGELOG
=========
7.4
---
* The component is not marked as `@experimental` anymore
7.3
---
* Add the component as experimental | unknown | github | https://github.com/symfony/symfony | src/Symfony/Component/JsonPath/CHANGELOG.md |
{
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"neo4j-driver": "^4.3.1",
"next": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"swr": "^2.0.0"
}
} | json | github | https://github.com/vercel/next.js | examples/with-neo4j/package.json |
#!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | unknown | codeparrot/codeparrot-clean | ||
from nose import tools as nt
from tests.base import AdminTestCase
from osf_tests.factories import AuthUserFactory
from tests.test_conferences import ConferenceFactory
from admin.meetings.forms import MeetingForm, MultiEmailField
data = dict(
edit='False',
endpoint='short',
name='Much longer',
info_ur... | 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/net/NetworkTopologyWithNodeGroup.java |
/*
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.containingDeclarationProvider
impor... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-impl-base/testFixtures/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/containingDeclarationProvider/AbstractContainingDeclarationProviderByReferenceTest.kt |
# -*- coding: utf-8 -*-
"""
pygments.styles.tango
~~~~~~~~~~~~~~~~~~~~~
The Crunchy default Style inspired from the color palette from
the Tango Icon Theme Guidelines.
http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines
Butter: #fce94f #edd400 #c4a000
Orange: #fcaf3e ... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import division, absolute_import, print_function
import platform
import numpy as np
from numpy.testing import assert_, run_module_suite, dec
class TestErrstate(object):
@dec.skipif(platform.machine() == "armv5tel", "See gh-413.")
def test_invalid(self):
with np.errstate(all='raise', u... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) 2012 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 agreed ... | java | github | https://github.com/google/guava | android/guava/src/com/google/common/collect/ImmutableRangeMap.java |
DOCUMENTATION:
name: extract
version_added: "2.1"
short_description: extract a value based on an index or key
description:
- Extract a value from a list or dictionary based on an index/key.
- User must ensure that index or key used matches the type of container.
- Equivalent of using C(list[index]) ... | unknown | github | https://github.com/ansible/ansible | lib/ansible/plugins/filter/extract.yml |
'''
Created on Apr 16, 2015
@author: christian
'''
from optparse import OptionParser
import numpy
import os
from os import listdir
from os.path import isfile, join
import cPickle
import glob
def unpickle(file):
fo = open(file, 'rb')
dictionary = cPickle.load(fo)
fo.close()
return dictionary
if __na... | unknown | codeparrot/codeparrot-clean | ||
# Authors: Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de>
#
# License: BSD (3-clause)
import os.path as op
import numpy as np
from numpy.testing import assert_array_almost_equal
from nose.tools import assert_true, assert_raises
from mne.io import read_raw_fif
from mne.io.pick import pick_types
from mne.event im... | unknown | codeparrot/codeparrot-clean | ||
from collections import OrderedDict
import glob
import os
try:
# Python 3
from urllib.parse import urlparse, parse_qs
except ImportError:
# Python 2
from urlparse import urlparse, parse_qs
import IPython.display
import cartopy.crs as ccrs
import ipywidgets
import iris
import iris.plot as iplt
import ma... | unknown | codeparrot/codeparrot-clean | ||
import os
from threading import local
from django.template import Context, Template, TemplateSyntaxError
from django.test import SimpleTestCase, override_settings
from django.utils import translation
from django.utils.safestring import mark_safe
from django.utils.translation import trans_real
from ...utils import set... | 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 | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Ansible module to configure .deb packages.
(c) 2014, Brian Coca <briancoca+ansible@gmail.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 Softwa... | unknown | codeparrot/codeparrot-clean | ||
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"target": {
... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/input/migrated_dev_dashboards/panel-heatmap/v1beta1.heatmap-x.v42.json |
#!/usr/bin/python
# Copyright (c) 2018 Red Hat, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) 2016 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/src/com/google/common/graph/DirectedNetworkConnections.java |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | unknown | codeparrot/codeparrot-clean | ||
'tests for multilang'
import json
from unittest import TestCase
from emit.router.core import Router
from emit.multilang import ShellNode
class SampleNode(ShellNode):
command = 'python test.py'
cwd = 'examples/multilang'
class SampleRubyNode(ShellNode):
command = 'bundle exec ruby test.rb'
cwd = 'exam... | unknown | codeparrot/codeparrot-clean | ||
/* Auto-generated by generate-wrappers.py script. Do not modify */
#include <requantization/fp32-psimd.c> | c | github | https://github.com/pytorch/pytorch | aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/requantization/fp32-psimd.c |
---
applies_to:
stack: ga
serverless: ga
navigation_title: "Operators"
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-functions-operators.html#esql-operators
---
# {{esql}} operators [esql-operators]
Operators for performing operations on, or comparing against, one or multi... | unknown | github | https://github.com/elastic/elasticsearch | docs/reference/query-languages/esql/functions-operators/operators.md |
"""Script to import fixtures to initialize the database."""
import transaction
from argparse import ArgumentParser
from argparse import RawDescriptionHelpFormatter
import logging
import sys
from pyramid.paster import bootstrap
from adhocracy_core.interfaces import IFixtureAsset
from .ad_import_users import users_epil... | unknown | codeparrot/codeparrot-clean | ||
## Input
```javascript
// Forget should call the original x (x = foo()) to compute result
function Component() {
let x = foo();
let result = x((x = bar()), 5);
return [result, x];
}
```
## Code
```javascript
import { c as _c } from "react/compiler-runtime"; // Forget should call the original x (x = foo()) to ... | unknown | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/ssa-reassign-in-rval.expect.md |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function
import os
import numpy as np
from numpy.testing import assert_allclose
from astropy.tests.helper import pytest
from astropy.coordinates import SkyCoord
from astropy.table import Table
from fe... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import json
import o... | unknown | codeparrot/codeparrot-clean | ||
// run
// Copyright 2009 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.
// Simple test of the garbage collector.
package main
import "runtime"
func mk2() {
b := new([10000]byte)
_ = b
// println(b, "stored at", &b)
}
... | go | github | https://github.com/golang/go | test/gc.go |
# coding: utf-8
from pip._vendor.msgpack._version import version
from pip._vendor.msgpack.exceptions import *
from collections import namedtuple
class ExtType(namedtuple('ExtType', 'code data')):
"""ExtType represents ext type in msgpack."""
def __new__(cls, code, data):
if not isinstance(code, int):
... | unknown | codeparrot/codeparrot-clean | ||
##
# Copyright (c) 2005-2017 Apple 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 l... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals
import datetime
from django.db import models
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Author(models.Model):
name = models.CharField(max_length=100)
class Meta:
ordering = ('na... | unknown | codeparrot/codeparrot-clean | ||
/* origin: FreeBSD /usr/src/lib/msun/src/e_acosf.c */
/*
* Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
*/
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. bus... | rust | github | https://github.com/nodejs/node | deps/crates/vendor/libm/src/math/acosf.rs |
package dockerfile
import (
"context"
"encoding/json"
"io"
"runtime"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/v2/daemon/builder"
containerpkg "github.com/moby/moby/v2/daemon/container"
"github.com/moby/moby/v2/daemon/internal/image"
"github.com/moby/moby/v2/daemon/internal/layer"
"gi... | go | github | https://github.com/moby/moby | daemon/builder/dockerfile/mockbackend_test.go |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright (C) 2005-2008 Francisco José Rodríguez Bogado, #
# (pacoqueen@users.sourceforge.net #
# ... | unknown | codeparrot/codeparrot-clean | ||
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}
<ol class="breadcrumbs">
<li><a href="{% url 'admin:index' %}">{% translate 'Home' %}</a></li>
<li><a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a></li>
<li><a href="{% url 'django-admindocs-views-index' %}">... | html | github | https://github.com/django/django | django/contrib/admindocs/templates/admin_doc/view_detail.html |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2016, René Moser <mail@renemoser.net>
#
# 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 | ||
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
from twitter.common.contextutil import temporary_dir
from pex.crawler import Crawler, PageParser
from pex.link import Link
def lpp(page):
links = PageParser.links(page)
re... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.