code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
#!/usr/bin/env python
#
# Copyright (C) 2013 Strahinja Val Markovic <val@markovic.io>
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe 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 ... | unknown | codeparrot/codeparrot-clean | ||
"""Pygame unit test suite package
Exports function run()
A quick way to run the test suite package from the command line
is by importing the go submodule:
python -m "import pygame.tests" [<test options>]
Command line option --help displays a usage message. Available options
correspond to the pygame.tests.run argume... | unknown | codeparrot/codeparrot-clean | ||
"""
Views related to EdxNotes.
"""
from __future__ import absolute_import
import json
import logging
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import Http404, HttpResponse
from django.urls import reverse
from django.views.decorators.http import require... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright 2013 The Closure Linter 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
#
#... | unknown | codeparrot/codeparrot-clean | ||
/*
Copyright 2017 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 agreed to in writing, ... | go | github | https://github.com/kubernetes/kubernetes | pkg/kubelet/kuberuntime/legacy_test.go |
base_suite: replica_sets_jscore_passthrough_base
overrides:
- "replica_sets.jscore_passthrough_with_system_buckets_hook" | unknown | github | https://github.com/mongodb/mongo | buildscripts/resmokeconfig/matrix_suites/mappings/replica_sets_jscore_passthrough.yml |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | unknown | codeparrot/codeparrot-clean | ||
import django
from django import forms
from django.db import models
from crispy_forms.helper import FormHelper
class TestForm(forms.Form):
is_company = forms.CharField(label="company", required=False, widget=forms.CheckboxInput())
email = forms.EmailField(label="email", max_length=30, required=True, widget=fo... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
Exodus Add-on
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.
This progra... | unknown | codeparrot/codeparrot-clean | ||
//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames27_ES5.ts] ////
//// [computedPropertyNames27_ES5.ts]
class Base {
}
class C extends Base {
[(super(), "prop")]() { }
}
//// [computedPropertyNames27_ES5.js]
"use strict";
class Base {
}
class C extends Base {
[(super(), "prop")]() { }
... | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/computedPropertyNames27_ES5(target=es2015).js |
#This module will call on other functions for the character creation process
#imported libraries
import RandomDiceNumbers as rdn
import CharacterCreation as cc
import MenuSelection as ms
import os.path
import CharacterNameTest as cnt
import FirstMenu as fm
import CharacterClasses as ccs
import CharacterStats as cs
imp... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2015 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.
package acceptance
import (
"context"
"crypto/rand"
"fmt"
"io/fs"
"math/big"
"os"
"path/filepath"
"strconv"
"strings"
"testing"
"github.com/cockroachdb/cock... | go | github | https://github.com/cockroachdb/cockroach | pkg/acceptance/util_docker.go |
#
# MicroHH
# Copyright (c) 2011-2020 Chiel van Heerwaarden
# Copyright (c) 2011-2020 Thijs Heus
# Copyright (c) 2014-2020 Bart van Stratum
#
# This file is part of MicroHH
#
# MicroHH is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#... | unknown | codeparrot/codeparrot-clean | ||
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2beta1",
"metadata": {
"name": "v0alpha1.candlestick.v42"
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "datasource",
... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/panel-candlestick/v0alpha1.candlestick.v42.v2beta1.json |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
#
# Copyright (C) 2017 Lenovo, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Licens... | unknown | codeparrot/codeparrot-clean | ||
"""Tornado handlers for the sessions web service.
Authors:
* Zach Sailer
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2013 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed... | unknown | codeparrot/codeparrot-clean | ||
# 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 to in writing, softw... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.core import gpu_info
class SystemInfo(object):
"""Provides low-level system information."""
def __init__(self, model_name, gpu_dict):
... | unknown | codeparrot/codeparrot-clean | ||
def power(snumber, x, y):
return ((((((x + 10) * y) + snumber)*(x+10))//100) % 10)-5
# A B
# C D
def build_grid_sum(grid):
grid_sums = [[0]*300 for _ in range(300)]
for y, vy in enumerate(grid):
for x, vx in enumerate(vy):
B = grid_sums[y-1][x] if y > 0 else 0
C = grid_sums[... | 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.network.tls.platform
internal class PlatformVersion(val major: String, val minor: Int) {
companion object {
operator fun invoke(rawVersion: String): PlatformVersi... | kotlin | github | https://github.com/ktorio/ktor | ktor-network/ktor-network-tls/jvm/src/io/ktor/network/tls/platform/PlatformVersion.kt |
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"include": [
"src/**/*.spec.ts",
"src/**/*.d.ts"
]
} | json | github | https://github.com/angular/angular | integration/cli-hello-world-ivy-i18n/tsconfig.spec.json |
from __future__ import absolute_import
import contextlib
import locale
import logging
import re
import os
import posixpath
import shutil
import stat
import subprocess
import sys
import tarfile
import zipfile
from pip.exceptions import InstallationError, BadCommand
from pip.compat import console_to_str, stdlib_pkgs
fr... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2012-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | java | github | https://github.com/spring-projects/spring-boot | build-plugin/spring-boot-maven-plugin/src/intTest/projects/run/src/main/java/org/test/SampleApplication.java |
# Solution to Good Fences Make Sad and Disgusted Neighbors
# Using Algorithm X with multi cover (generalized exact cover)
# 2018 MIT Mystery Hunt
# Runs in 2-3 minutes.
import grf
from collections import Counter
layouts = """
3222310000320343141036633541146451103533135534530423523533101
34315366324034303420001244330... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import print_function
import sys
import os
import optparse
import textwrap
from .modulegraph import ModuleGraph
def main():
# Parse command line
usage = textwrap.dedent('''\
Usage:
modulegraph [options] scriptfile ...
Valid options:
* -d: Increase debug leve... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2012 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... | unknown | codeparrot/codeparrot-clean | ||
"""
This config file runs the simplest dev environment using sqlite, and db-based
sessions. Assumes structure:
/envroot/
/db # This is where it'll write the database file
/edx-platform # The location of this repo
/log # Where we're going to write log files
"""
# We intentionally define lot... | unknown | codeparrot/codeparrot-clean | ||
//go:build linux
package bridge
import (
"context"
"os"
"path/filepath"
"testing"
"github.com/moby/moby/v2/internal/testutil/netnsutils"
"github.com/vishvananda/netlink"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)
func TestMirroredWSL2Workaround(t *testing.T) {
for _, tc := range []struct {
... | go | github | https://github.com/moby/moby | daemon/libnetwork/drivers/bridge/wsl2_linux_test.go |
# 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 | ||
"""M2Crypto wrapper for OpenSSL X509 API.
Copyright (c) 1999-2004 Ng Pheng Siong. All rights reserved.
Portions created by Open Source Applications Foundation (OSAF) are
Copyright (C) 2004-2007 OSAF. All Rights Reserved.
Author: Heikki Toivonen
"""
# M2Crypto
from M2Crypto import ASN1, BIO, Err, EVP, util
import m2
... | unknown | codeparrot/codeparrot-clean | ||
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/Dispatch.h>
#include <ATen/native/UpSample.h>
#ifndef AT_PER_OPERATOR_HEADERS
#include <ATen/Functions.h>
#include <ATen/NativeFunctions.h>
#else
#include <ATen/ops/_empty_affine_quantized.h>
#include <ATen/ops/_upsample_nearest_ex... | cpp | github | https://github.com/pytorch/pytorch | aten/src/ATen/native/quantized/cpu/UpSampleNearest3d.cpp |
// Copyright 2022 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | go | github | https://github.com/etcd-io/etcd | server/etcdserver/version/monitor_test.go |
# -*- Mode: Python; -*-
#
# Copyright 2010 University of Washington
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation;
#
# This program is distributed in the hope that it will be usefu... | unknown | codeparrot/codeparrot-clean | ||
/* Module that wraps all OpenSSL hash algorithms */
/*
* Copyright (C) 2005-2010 Gregory P. Smith (greg@krypto.org)
* Licensed to PSF under a Contributor Agreement.
*
* Derived from a skeleton of shamodule.c containing work performed by:
*
* Andrew Kuchling (amk@amk.ca)
* Greg Stein (gstein@lyra.org)
*
*/
... | c | github | https://github.com/python/cpython | Modules/_hashopenssl.c |
# -*- coding: utf-8 -*-
# Copyright (c) 2012 - 2015 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing the IRC window.
"""
from __future__ import unicode_literals
try:
str = unicode
except NameError:
pass
import re
import logging
from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QByteAr... | unknown | codeparrot/codeparrot-clean | ||
# flake8: noqa
import operator
__author__ = 'ladynerd'
from ava.import_google.models import GoogleDirectoryUser
class GoogleStatistics():
GOOGLE_CONFIG = None
def get_all_stats(self):
all_users = GoogleDirectoryUser.objects.filter()
results = {
'admin_accounts': self.get_admin_ac... | unknown | codeparrot/codeparrot-clean | ||
# python3 putada
# -*- coding: utf-8 -*-
import speech_recognition as sr
from time import sleep as delay
from subprocess import call
import subprocess
import RPi.GPIO as GPIO
LED=21
GPIO.setmode(GPIO.BCM)
GPIO.setup(LED,GPIO.OUT)
GPIO.output(LED,False)
r = sr.Recognizer()
temps=4
delay(3)
call('clear')
delay(2)
GPIO.o... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2009 NHN 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 follow... | unknown | codeparrot/codeparrot-clean | ||
module.exports = "module"; | javascript | github | https://github.com/webpack/webpack | examples/node_modules/module.js |
//===----------------------------------------------------------------------===//
//
// 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/clang-tidy/utils/NamespaceAliaser.h |
#!/usr/bin/env python
# This example demonstrates the use of streamlines generated from seeds,
# combined with a tube filter to create several streamtubes.
import vtk
from vtk.util.misc import vtkGetDataRoot
from vtk.util.colors import *
VTK_DATA_ROOT = vtkGetDataRoot()
# We read a data file the is a CFD analysis of... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | unknown | codeparrot/codeparrot-clean | ||
"""Run managers."""
from __future__ import annotations
import asyncio
import atexit
import functools
import logging
from abc import ABC, abstractmethod
from collections.abc import Callable
from concurrent.futures import ThreadPoolExecutor
from contextlib import asynccontextmanager, contextmanager
from contextvars imp... | python | github | https://github.com/langchain-ai/langchain | libs/core/langchain_core/callbacks/manager.py |
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from future import Future
from object_store import ObjectStore
class CacheChainObjectStore(ObjectStore):
'''Maintains an in-memory cache along with a chai... | unknown | codeparrot/codeparrot-clean | ||
package client
import (
"fmt"
"net/http"
"testing"
cerrdefs "github.com/containerd/errdefs"
"github.com/moby/moby/api/types/swarm"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)
func TestConfigListError(t *testing.T) {
client, err := New(
WithMockClient(errorMock(http.StatusInternalServerError,... | go | github | https://github.com/moby/moby | client/config_list_test.go |
#!/usr/bin/env python
# Copyright 2016 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 applic... | unknown | codeparrot/codeparrot-clean | ||
"""
A ModuleStore that knows about a special version DRAFT. Modules
marked as DRAFT are read in preference to modules without the DRAFT
version by this ModuleStore (so, access to i4x://org/course/cat/name
returns the i4x://org/course/cat/name@draft object if that exists,
and otherwise returns i4x://org/course/cat/name)... | unknown | codeparrot/codeparrot-clean | ||
// RUN: mkdir -p %t.dir/move-function
// RUN: cat %S/Inputs/function_test.h > %t.dir/move-function/function_test.h
// RUN: cat %S/Inputs/function_test.cpp > %t.dir/move-function/function_test.cpp
// RUN: cd %t.dir/move-function
// RUN: clang-move -names="g" -new_header=%t.dir/move-function/new_function_test.h -old_head... | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/test/clang-move/move-function.cpp |
/*-------------------------------------------------------------------------
*
* lwlock.c
* Lightweight lock manager
*
* Lightweight locks are intended primarily to provide mutual exclusion of
* access to shared-memory data structures. Therefore, they offer both
* exclusive and shared lock modes (to support re... | c | github | https://github.com/postgres/postgres | src/backend/storage/lmgr/lwlock.c |
# Copyright 2014 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.
import logging
import time
import unittest
from telemetry.core import platform as platform_module
class PlatformBackendTest(unittest.TestCase):
def testP... | unknown | codeparrot/codeparrot-clean | ||
package dep
type Interface interface {
N([]byte)
} | go | github | https://github.com/golang/go | src/cmd/api/testdata/src/issue21181/dep/p.go |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests to ensure all attributes of L{twisted.internet.gtkreactor} are
deprecated.
"""
import sys
from twisted.trial.unittest import TestCase
class GtkReactorDeprecation(TestCase):
"""
Tests to ensure all attributes of L{twisted.inter... | 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 applicable law or a... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/core/kernels/loss.h |
# (C) British Crown Copyright 2013 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | unknown | codeparrot/codeparrot-clean | ||
//===--- SILContext.h -------------------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | c | github | https://github.com/apple/swift | include/swift/SIL/SILContext.h |
# This suite should not be run in evergreen, it is combined into
# sharding_max_mirroring_opportunistic_secondary_targeting_ese
base_suite: sharding
overrides:
- "encryption.testdata_ese"
excludes:
- "encryption.excluded_files" | unknown | github | https://github.com/mongodb/mongo | buildscripts/resmokeconfig/matrix_suites/mappings/sharding_ese.yml |
"""
SMA Solar Webconnect interface.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.sma/
"""
import asyncio
import logging
from datetime import timedelta
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from ho... | unknown | codeparrot/codeparrot-clean | ||
#
# subunit: extensions to Python unittest to get test results from subprocesses.
# Copyright (C) 2009 Robert Collins <robertc@robertcollins.net>
#
# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
# license at the users choice. A copy of both licenses are available in the
# project sour... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
import argparse
import re
def read_file(filename):
with open(filename) as f:
lines = f.readlines()
text = ''.join(map(lambda l: re.sub('//.*', '', l), lines))
return process(text)
def process(text):
text = remove_whitespaces(text)
text = re.sub('/\*.*\*/', '', text)... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
import logging
import itertools
import calendar
import sys
import gc
import time
import math
from peewee import (InsertQuery, Check, CompositeKey, ForeignKeyField,
SmallIntegerField, IntegerField, CharField, DoubleField,
BooleanField, D... | unknown | codeparrot/codeparrot-clean | ||
import re
import uuid
import six
from django.test import TestCase
from django_extensions.db.fields import PostgreSQLUUIDField
from .testapp.models import (
UUIDTestAgregateModel, UUIDTestManyToManyModel, UUIDTestModel_field,
UUIDTestModel_pk,
)
class UUIDFieldTest(TestCase):
def test_UUID_field_create(s... | unknown | codeparrot/codeparrot-clean | ||
from yosai.core.realm.realm import AccountStoreRealm
from yosai.core.authz.authz import DefaultPermission
from yosai.core.subject.identifier import SimpleIdentifierCollection
from yosai.core.exceptions import IncorrectCredentialsException
from anchore_engine.db import AccountTypes
from anchore_engine.plugins.authoriza... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2014 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 ag... | unknown | codeparrot/codeparrot-clean | ||
#
# 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, software
# distributed under ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | unknown | codeparrot/codeparrot-clean | ||
#ifndef Py_OPCODE_H
#define Py_OPCODE_H
#ifdef __cplusplus
extern "C" {
#endif
#include "opcode_ids.h"
#define NB_ADD 0
#define NB_AND 1
#define NB_FLOOR_DIVIDE 2
#define NB_LSHIFT 3
#define NB_... | c | github | https://github.com/python/cpython | Include/opcode.h |
from __future__ import print_function
import os
import sys
import re
import datetime
import string
includesParser = re.compile( r'\s*#include\s*"(.*)"' )
commentParser1 = re.compile( r'^\s*/\*')
commentParser2 = re.compile( r'^ \*')
blankParser = re.compile( r'^\s*$')
seenHeaders = set([])
path = os.path.dirname(o... | unknown | codeparrot/codeparrot-clean | ||
# -*- encoding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
import re, time, random
from openerp import api
from openerp.osv import fields, osv
from openerp.tools.translate import _
import logging
from open... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.utils import flt
from webnotes.model.doc import addchild
from webnotes.model.bean import getlist
from webnotes import ... | unknown | codeparrot/codeparrot-clean | ||
A macro listed for import was not found.
Erroneous code example:
```compile_fail,E0469
#[macro_use(drink, be_merry)] // error: imported macro not found
extern crate alloc;
fn main() {
// ...
}
```
Either the listed macro is not contained in the imported crate, or it is not
exported from the given crate.
This c... | unknown | github | https://github.com/rust-lang/rust | compiler/rustc_error_codes/src/error_codes/E0469.md |
/*
* 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 | framework-docs/src/main/java/org/springframework/docs/web/websocket/stomp/websocketstompinterceptors/WebSocketConfiguration.java |
from django.contrib.gis.gdal import SpatialReference
from django.db import DEFAULT_DB_ALIAS, connections
def add_srs_entry(srs, auth_name='EPSG', auth_srid=None, ref_sys_name=None,
database=None):
"""
This function takes a GDAL SpatialReference system and adds its information
to the `spat... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from .jsregexp import Exec
import re
DIGS = set('0123456789')
WHITE = u"\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF"
def replacement_template(rep, source, span, npar):
"""Takes t... | unknown | codeparrot/codeparrot-clean | ||
"""
CMS Video
"""
import time
import os
import requests
from bok_choy.promise import EmptyPromise, Promise
from bok_choy.javascript import wait_for_js, js_defined
from ....tests.helpers import YouTubeStubConfig
from ...lms.video.video import VideoPage
from selenium.webdriver.common.keys import Keys
from ..utils import ... | unknown | codeparrot/codeparrot-clean | ||
/***************************************************************************************************
* Copyright (c) 2017 - 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are p... | c | github | https://github.com/pytorch/pytorch | aten/src/ATen/native/cuda/cutlass_extensions/gemm/warp/default_mma_tensor_op.h |
# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... | unknown | codeparrot/codeparrot-clean | ||
@import url('https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined');
:host {
display: flex;
justify-content: center;
font-family: var(--inter-font);
--primary: var(--hot-pink);
--on-primary: var(--page-background);
}
.docs-light-mode {
--on-primary: #fff;
}
.select {
display: flex;
posi... | css | github | https://github.com/angular/angular | adev/src/content/examples/aria/select/src/basic/material/app/app.css |
# 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 | ||
# Copyright (c) 2010 Google Inc. All rights reserved.
# Copyright (c) 2009 Apple 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... | unknown | codeparrot/codeparrot-clean | ||
<?php
namespace Illuminate\Database\Events;
use Illuminate\Contracts\Database\Events\MigrationEvent;
class NoPendingMigrations implements MigrationEvent
{
/**
* Create a new event instance.
*
* @param string $method The migration method that was called.
*/
public function __construct(
... | php | github | https://github.com/laravel/framework | src/Illuminate/Database/Events/NoPendingMigrations.php |
# -*- coding: utf-8 -*-
"""
Inline Gettext
~~~~~~~~~~~~~~
An example extension for Jinja2 that supports inline gettext calls.
Requires the i18n extension to be loaded.
:copyright: (c) 2009 by the Jinja Team.
:license: BSD.
"""
import re
from jinja2.ext import Extension
from jinja2.lexer import... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation (FSF), e... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013-2014, Epic Games, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright (c) 2013 GitHub, Inc.
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A tool to generate symbols for a binary suitable for breakpad.
Currently, the tool only suppo... | unknown | codeparrot/codeparrot-clean | ||
"""SCons.Tool.packaging.msi
The msi packager.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
# Externalize PNG images from markdown files converted by nbconvert.
import argparse
import os
from base64 import b64decode
parser = argparse.ArgumentParser()
parser.add_argument('input')
parser.add_argument('output')
args = parser.parse_args()
figure_dir = os.path.splitext(args.input)[0] + '_... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import os
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
name = 'djangorestframework-oauth'
package = 'rest_framework_oauth'
description = 'OAuth support for Django REST Framework'
url = 'https://github.com/jpadill... | 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/internals/metrics/OffsetCommitMetricsManager.java |
# Copyright (C) 1998-2015 by the Free Software Foundation, Inc.
#
# This file is part of GNU Mailman.
#
# GNU Mailman 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 you... | unknown | codeparrot/codeparrot-clean | ||
/* contrib/ltree/ltree.h */
#ifndef __LTREE_H__
#define __LTREE_H__
#include "fmgr.h"
#include "tsearch/ts_locale.h"
#include "utils/memutils.h"
/* ltree */
/*
* We want the maximum length of a label to be encoding-independent, so
* set it somewhat arbitrarily at 1000 characters (not bytes), while using
* uint16... | c | github | https://github.com/postgres/postgres | contrib/ltree/ltree.h |
package client
import (
"context"
"net/url"
"github.com/moby/moby/api/types/swarm"
)
// NodeUpdateOptions holds parameters to update nodes with.
type NodeUpdateOptions struct {
Version swarm.Version
Spec swarm.NodeSpec
}
type NodeUpdateResult struct{}
// NodeUpdate updates a Node.
func (cli *Client) NodeUp... | go | github | https://github.com/moby/moby | client/node_update.go |
/**
* 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/fs/viewfs/ViewFileSystem.java |
#!/bin/bash
# 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 require... | unknown | github | https://github.com/tensorflow/tensorflow | ci/official/wheel.sh |
from rhizome.tests.base_test_case import RhizomeApiTestCase
from rhizome.models.user_models import UserGroup
from rhizome.tests.setup_helpers import TestSetupHelpers
from django.contrib.auth.models import User, Group
class UserGroupResourceTest(RhizomeApiTestCase):
def setUp(self):
super(UserGroupResource... | unknown | codeparrot/codeparrot-clean | ||
# this makes ctypes friendlier (for me, anyways)
from ctypes import *
## page permissions
PAGE_EXECUTE = 0x10
PAGE_EXECUTE_READ = 0x20
PAGE_EXECUTE_READWRITE = 0x40
PAGE_EXECUTE_WRITECOPY = 0x80
PAGE_NOACCESS = 0x01
PAGE_READONLY = 0x02
PAGE_READWRITE = 0x04
PAGE_WRITECOPY = 0x08
PAGE_GUARD = 0x100
PAGE_NOCACHE = 0x20... | unknown | codeparrot/codeparrot-clean | ||
import pytest
from pandas import Categorical
import pandas._testing as tm
@pytest.mark.parametrize("c", [None, [1, 2, 3, 4, 5]])
def test_categorical_equal(c):
c = Categorical([1, 2, 3, 4], categories=c)
tm.assert_categorical_equal(c, c)
@pytest.mark.parametrize("check_category_order", [True, False])
def tes... | python | github | https://github.com/pandas-dev/pandas | pandas/tests/util/test_assert_categorical_equal.py |
import os
import re
from socket import *
from Components.Console import Console
from Components.PluginComponent import plugins
from Plugins.Plugin import PluginDescriptor
from boxbranding import getBoxType
class Network:
def __init__(self):
self.ifaces = {}
self.configuredNetworkAdapters = []
self.NetworkState ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014 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 later... | unknown | codeparrot/codeparrot-clean | ||
import { teardown } from '../../../reactivity/effects.js';
import { get_descriptor } from '../../../../shared/utils.js';
/**
* Makes an `export`ed (non-prop) variable available on the `$$props` object
* so that consumers can do `bind:x` on the component.
* @template V
* @param {Record<string, unknown>} props
* @p... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/src/internal/client/dom/elements/bindings/props.js |
/* Copyright 2013 Google Inc. All Rights Reserved.
Distributed under MIT license.
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
/* Utilities for building Huffman decoding tables. */
#include "huffman.h"
#include "../common/constants.h"
#include "../common/platform.h"
#if defin... | c | github | https://github.com/nodejs/node | deps/brotli/c/dec/huffman.c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.