code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-01 01:36 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('base', '0084_auto_20170228_1804'), ] operations = [ migrations.AlterField( ...
unknown
codeparrot/codeparrot-clean
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. **Description** Returns the logarithm of a value to base 10. The input can be any numeric value, the return value is always a double. Logs of 0 and negative numbers return `null` as well as a warning.
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/functions/description/log10.md
/* * 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.standalone.fir.test.cases.generated.cases.session; import com.intel...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/generated/cases/session/FirStandaloneNormalAnalysisLibraryBinaryModuleUseSiteLibraryModuleAnalysisRejectionTestGenerated.java
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # encoding: utf-8 """A ${VISUAL} placeholder that will use the text that was last visually selected and insert it here. If there was no text visually selected, this will be the empty string. """ import re import textwrap from UltiSnips import _vim from UltiSnips.indent_util import IndentUtil ...
unknown
codeparrot/codeparrot-clean
use crate::io::interest::Interest; use crate::io::ready::Ready; use crate::loom::sync::atomic::AtomicUsize; use crate::loom::sync::Mutex; use crate::runtime::io::{Direction, ReadyEvent, Tick}; use crate::util::bit; use crate::util::linked_list::{self, LinkedList}; use crate::util::WakeList; use std::cell::UnsafeCell; ...
rust
github
https://github.com/tokio-rs/tokio
tokio/src/runtime/io/scheduled_io.rs
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from SiQt._version import __version__ with open('README.rst', 'r') as fh: long_description = fh.read() setup(name='SiQt', version=__version__, description='Convenience tools for building PyQt/PySide ' 'based GUI app...
unknown
codeparrot/codeparrot-clean
import os import sys from twisted.trial.unittest import TestCase, SkipTest from scrapy.downloadermiddlewares.httpproxy import HttpProxyMiddleware from scrapy.exceptions import NotConfigured from scrapy.http import Response, Request from scrapy.spiders import Spider spider = Spider('foo') class TestDefaultHeadersMidd...
unknown
codeparrot/codeparrot-clean
#### ## ## ######## ####### ######## ######## ###### ## ### ### ## ## ## ## ## ## ## ## ## ## #### #### ## ## ## ## ## ## ## ## ## ## ### ## ######## ## ## ######## ## ###### ## ## ## ## ## ## ## ## ## ## ## ## #...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package physical import ( "context" ) // PhysicalAccess is a wrapper around physical.Backend that allows Core to // expose its physical storage operations through PhysicalAccess() while // restricting the ability to modify Core.physical itself. t...
go
github
https://github.com/hashicorp/vault
sdk/physical/physical_access.go
import sys import traceback import sets import keyword import time from code import InteractiveConsole, softspace from StringIO import StringIO from objc import YES, NO, selector, IBAction, IBOutlet from Foundation import * from AppKit import * from PyObjCTools import AppHelper try: sys.ps1 except AttributeError: ...
unknown
codeparrot/codeparrot-clean
/* MIT License * * Copyright (c) 2023 Brad House * * 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, ...
c
github
https://github.com/nodejs/node
deps/cares/src/lib/util/ares_iface_ips.c
#!/bin/sh test_description='Test reffiles backend' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME GIT_TEST_DEFAULT_REF_FORMAT=files export GIT_TEST_DEFAULT_REF_FORMAT . ./test-lib.sh test_expect_success 'setup' ' git commit --allow-empty -m Initial && C=$(git rev-parse HEAD)...
unknown
github
https://github.com/git/git
t/t0600-reffiles-backend.sh
#!/usr/bin/python3 ''' Calculate PRCCs and make tornado plots. ''' import os.path import sys from matplotlib import pyplot from matplotlib import ticker import numpy from scipy import interpolate import seaborn sys.path.append(os.path.dirname(__file__)) # cwd for Sphinx. import common import sensitivity import stat...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2013 Matt Coddington <coddington@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 Software Foundation, either version 3 ...
unknown
codeparrot/codeparrot-clean
package client import ( "math" "net/http" "testing" cerrdefs "github.com/containerd/errdefs" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) func TestContainerResizeError(t *testing.T) { client, err := New(WithMockClient(errorMock(http.StatusInternalServerError, "Server error"))) assert.NilError(t...
go
github
https://github.com/moby/moby
client/container_resize_test.go
#!/usr/bin/env python2 # -*- coding: utf-8-*- import unittest from client import test_mic, diagnose, jasperpath from client.modules import Life, Joke, Time, Gmail, HN, News, Weather DEFAULT_PROFILE = { 'prefers_email': False, 'location': 'Cape Town', 'timezone': 'US/Eastern', 'phone_number': '012344321...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ sphinx.make_mode ~~~~~~~~~~~~~~~~ sphinx-build -M command-line handling. This replaces the old, platform-dependent and once-generated content of Makefile / make.bat. This is in its own module so that importing it is fast. It should not import the main Sphinx m...
unknown
codeparrot/codeparrot-clean
import unittest from unittest import mock import asyncio from tanner.emulators import cmd_exec class TestCmdExecEmulator(unittest.TestCase): def setUp(self): self.loop = asyncio.new_event_loop() asyncio.set_event_loop(self.loop) self.handler = cmd_exec.CmdExecEmulator() self.handler...
unknown
codeparrot/codeparrot-clean
# coding: UTF-8 """ Tests for support views. """ import itertools import json import re from datetime import datetime, timedelta import ddt import pytest from django.contrib.auth.models import User from django.urls import reverse from django.db.models import signals from nose.plugins.attrib import attr from pytz impo...
unknown
codeparrot/codeparrot-clean
# (c) 2014, Maciej Delmanowski <drybjed@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 Software Foundation, either version 3 of the License, or # (at your option) any later ...
unknown
codeparrot/codeparrot-clean
import io from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS, connections, migrations from django.db.migrations.loader import AmbiguityError, MigrationLoader from django.db.migrations.migration import SwappableTuple from django.db.m...
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 from frappe.utils import getdate, nowdate from frappe import _ from frappe.model.document import Document from erpnext.hr.utils import se...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 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. """Registers new hosts in chromoting directory. It asks for username/password and then writes these settings to config file. """ ...
unknown
codeparrot/codeparrot-clean
/* 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 applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/apis/rbac/v1alpha1/doc.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/test/java/org/apache/hadoop/io/TestMapFile.java
from sqlobject import * from datetime import datetime class Version(SQLObject): def restore(self): values = self.sqlmeta.asDict() del values['id'] del values['masterID'] del values['dateArchived'] for col in self.extraCols: del values[col] self.masterClas...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # Author: Dani�l Heimans # URL: http://code.google.com/p/sickbeard # # This file is part of Sick Beard. # # Sick Beard 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 Lic...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Foundation\Console; use Illuminate\Console\Concerns\CreatesMatchingTest; use Illuminate\Console\GeneratorCommand; use Illuminate\Foundation\Inspiring; use Illuminate\Support\Collection; use Illuminate\Support\Str; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Cons...
php
github
https://github.com/laravel/framework
src/Illuminate/Foundation/Console/MailMakeCommand.php
# Copyright (c) 2012 NetApp, Inc. # Copyright (c) 2014 Red Hat, 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...
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. #include "precomp.hpp" #include <sstream> namespace cv { namespace { static const char* noneValue = "<none>"; static String...
cpp
github
https://github.com/opencv/opencv
modules/core/src/command_line_parser.cpp
# Copyright (c) 2003-2006 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # $Id: ImpactDecoder.py,v 1.6 2006/05/23 22:25:34 gera Exp $ # # Description: # Convenience packet unp...
unknown
codeparrot/codeparrot-clean
/* * The copyright in this software is being made available under the 2-clauses * BSD License, included below. This software may be subject to other third * party and contributor rights, including patent rights, and no such rights * are granted under this license. * * Copyright (c) 2002-2014, Universite catholiqu...
c
github
https://github.com/opencv/opencv
3rdparty/openjpeg/openjp2/opj_codec.h
# -*- Mode: Python -*- # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # This library 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 2 of the License, or (at ...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package pki import ( "context" "crypto/x509" "fmt" "github.com/hashicorp/vault/builtin/logical/pki/issuing" "github.com/hashicorp/vault/builtin/logical/pki/observe" "github.com/hashicorp/vault/builtin/logical/pki/parsing" "github.com/hashi...
go
github
https://github.com/hashicorp/vault
builtin/logical/pki/secret_certs.go
//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.ts] //// //// [ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.ts] //// [ClassAndModuleThatMergeWithStringIndexerAndExp...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.js
#include "test/jemalloc_test.h" #include "test/sleep.h" static void sleep_for_background_thread_interval() { /* * The sleep interval set in our .sh file is 50ms. So it likely will * run if we sleep for four times that. */ sleep_ns(200 * 1000 * 1000); } static unsigned create_arena() { unsigned arena_ind; s...
c
github
https://github.com/redis/redis
deps/jemalloc/test/unit/hpa_background_thread.c
#!/usr/bin/python # coding: utf-8 -*- # Copyright (c) 2015, Jesse Keating <jlk@derpops.bike> # # 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 Free Software Foundation, either version 3 of the License, or # (at your opti...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 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/LICE...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description="config file in multi worktree" . ./test-lib.sh test_expect_success 'setup' ' test_commit start ' test_expect_success 'config --worktree in single worktree' ' git config --worktree foo.bar true && test_cmp_config true foo.bar ' test_expect_success 'add worktrees' ' git worktree add w...
unknown
github
https://github.com/git/git
t/t2404-worktree-config.sh
# -*- coding: UTF-8 -*- __revision__ = '$Id$' # Copyright © 2009 Piotr Ożarowski # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published byp # the Free Software Foundation; either version 2 of the License, or # (at your option) any l...
unknown
codeparrot/codeparrot-clean
import { Fira_Code } from '@next/font/google' const fira = Fira_Code()
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/next-font-loaders/no-args/input.js
apiVersion: v1 kind: Secret metadata: name: test
unknown
github
https://github.com/kubernetes/kubernetes
hack/testdata/diff/secret.yaml
#!/usr/bin/env python # Copyright (c) 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. import logging import os import shutil import pyauto_functional # Must be imported before pyauto import pyauto import test_utils ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Demo of an efficient visual mask, by modulating its opacity. When you want to reveal an image gradually from behind a mask, the tempting thing to do is to alter a stimulus mask using .setMask() That will actually be very slow because of the overhead in sending textur...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, division, print_function, with_statement from tornado.concurrent import Future from tornado import gen from tornado.escape import json_decode, utf8, to_unicode, recursive_unicode, native_str, to_basestring from tornado.httputil import format_timestamp from tornado.ioloop import I...
unknown
codeparrot/codeparrot-clean
from haystack import indexes from django.utils.html import strip_tags, strip_entities from tendenci.apps.files.models import File from tendenci.apps.perms.indexes import TendenciBaseSearchIndex from tendenci.apps.categories.models import Category class FileIndex(TendenciBaseSearchIndex, indexes.Indexable): text ...
unknown
codeparrot/codeparrot-clean
import sys import decimal from unittest import TestCase import json import json.decoder class TestScanString(TestCase): def test_py_scanstring(self): self._test_scanstring(json.decoder.py_scanstring) def test_c_scanstring(self): self._test_scanstring(json.decoder.c_scanstring) def _test_...
unknown
codeparrot/codeparrot-clean
""" Arango connection pooler. Use multiple connections to access a database (usually database cluster) in round robin fashion. """ import logging from .database import Database # pylint: disable=E0402 log = logging.getLogger(__name__) class ConnectionPool(object): """Connection Pooler.""" def __init__(sel...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 """Convert counts to fasta format. Extracts the sequences of a counts file. If more than one base is present at a single site, one base is sampled out of all present ones according to its abundance. The consensus sequence can be extracted (e.g., no sampling but the bases with highest counts f...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "cases/helper" require "models/post" require "models/topic" require "models/comment" require "models/reply" require "models/author" require "models/developer" require "models/computer" class NamedScopingTest < ActiveRecord::TestCase fixtures :posts, :authors, :topics, :comments...
ruby
github
https://github.com/rails/rails
activerecord/test/cases/scoping/named_scoping_test.rb
# -*- coding: utf-8 -*- """Sphinx Readable Theme documentation build configuration file. This file is execfile()d with the current directory set to its containing dir. """ import os import sys import pkg_resources # Adding this directory to the sys path, to build autodoc of example module. sys.path.insert(0, os.pat...
unknown
codeparrot/codeparrot-clean
from decimal import Decimal as D from django.test import TestCase from django_dynamic_fixture import G from oscar.apps.offer import models from oscar.apps.basket.models import Basket from oscar.test.factories import create_product class TestAMultibuyDiscountAppliedWithCountCondition(TestCase): def setUp(self): ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2009, Aleksey Lim, Simon Schampijer # # This library 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 2 of the License, or (at your option) any later version. # # This li...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 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. """ This utility takes a JSON input that describes a CRLSet and produces a CRLSet from it. The input is taken on stdin and is a di...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** pct2rgb.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *******************************...
unknown
codeparrot/codeparrot-clean
'''tzinfo timezone information for ROC.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class ROC(DstTzInfo): '''ROC timezone definition. See datetime.tzinfo for details''' zone = 'ROC' _utc_transition_times = [ d(1,1,1,0,...
unknown
codeparrot/codeparrot-clean
import functools from datetime import datetime, time from typing import Union from django.db import reset_queries, connection from django.utils import timezone from django.utils.timezone import pytz from laboratory.settings import TIME_ZONE def localtime(d: datetime): if not d: return None return tim...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt import frappe, os import unittest, email test_records = frappe.get_test_records('Email Account') from frappe.core.doctype.communication.email import make from frappe.desk.form.load import get_attachments from frappe.utils.file_man...
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines.reactive import kotlinx.coroutines.testing.* import kotlinx.coroutines.* import kotlinx.coroutines.flow.* import org.junit.* class CancelledParentAttachTest : TestBase() {; @Test fun testFlow() = runTest { val f = flowOf(1, 2, 3).cancellable() val j = Job().also { i...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
reactive/kotlinx-coroutines-reactive/test/CancelledParentAttachTest.kt
# base class for tk common dialogues # # this module provides a base class for accessing the common # dialogues available in Tk 4.2 and newer. use tkFileDialog, # tkColorChooser, and tkMessageBox to access the individual # dialogs. # # written by Fredrik Lundh, May 1997 # from Tkinter import * class Dialog: com...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2007 Doug Hellmann. # # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software and # its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in all # copies and tha...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, 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
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src set -o verbose set -o errexit # Set the suite name to be the task name by default; unless overridden with the `suite`/`suite_config` expansion. suite_name=${task_name} if [[ -n ${suite_config} ]]; then suite_name=${...
unknown
github
https://github.com/mongodb/mongo
evergreen/functions/task_timeout_determine.sh
# converted to java and then to python by p.j.leonard # based on C++ code found at # http://www.codeproject.com/KB/recipes/BP.aspx?msg=2809798#xx2809798xx import math import random import copy import pickle """ multilayer neural network """ def sigmoid(x): if x < -100.0: # avoid math.exp(x) blowing up ...
unknown
codeparrot/codeparrot-clean
//===--- GenericTypeParamKind.h ---------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2024 - 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/AST/GenericTypeParamKind.h
// Copyright 2023 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
tests/robustness/options/server_config_options.go
from .attributes import Attribute from .constants import Utf8 # From: http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html ########################################################################## # 4.6. Methods ########################################################################## # Each method, inclu...
unknown
codeparrot/codeparrot-clean
// 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. // Package expvar provides a standardized interface to public variables, such // as operation counters in servers. It exposes these variables via HTTP at // /de...
go
github
https://github.com/golang/go
src/expvar/expvar.go
import os import errno import importlib.machinery import py_compile import shutil import unittest import tempfile from test import support import modulefinder TEST_DIR = tempfile.mkdtemp() TEST_PATH = [TEST_DIR, os.path.dirname(tempfile.__file__)] # Each test description is a list of 5 items: # # 1. a module name t...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright (C) 2015 GNS3 Technologies Inc. # # 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
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/task/OrderedTaskDecorator.java
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module containing utils to get and check lab status.""" import json import logging import re import time import urllib from chromite.buildbot imp...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ pygments.formatters.latex ~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for LaTeX fancyvrb output. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments.token import T...
unknown
codeparrot/codeparrot-clean
use rustc_ast as ast; use rustc_data_structures::fx::FxIndexMap; use rustc_data_structures::unord::UnordMap; use rustc_session::{declare_lint, declare_lint_pass}; use rustc_span::Symbol; use unicode_security::general_security_profile::IdentifierType; use crate::lints::{ ConfusableIdentifierPair, IdentifierNonAscii...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_lint/src/non_ascii_idents.rs
import { flushSync } from 'svelte'; import { test } from '../../assert'; const tick = () => Promise.resolve(); export default test({ async test({ assert, target }) { target.innerHTML = '<custom-element camelcase2="Hello" camel-case="world" an-array="[1,2]"></custom-element>'; await tick(); /** @type {any} */...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-browser/custom-elements-samples/camel-case-attribute/_config.js
from django.core.urlresolvers import reverse from tastypie import authorization from tastypie.authentication import MultiAuthentication from crits.emails.email import Email from crits.emails.handlers import handle_pasted_eml, handle_yaml, handle_eml from crits.emails.handlers import handle_email_fields, handle_msg fro...
unknown
codeparrot/codeparrot-clean
# ================================================================================================== # Copyright 2012 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // 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 // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/modernize/UseEqualsDeleteCheck.cpp
#!/usr/bin/python import logging logging.getLogger("scapy.runtime").setLevel(logging.ERROR) from scapy.all import * import time import os import re import sys import datetime sys.path.append('/usr/share/subterfuge') #Ignore Deprication Warnings import warnings warnings.filterwarnings("ignore", category=DeprecationW...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 from oldmailer import passwd_change, shadow_change, mails_delete from unittest import TestCase, TestLoader, TextTestRunner import os import subprocess class PasswdChange_Test(TestCase): def setUp(self): """ Preconditions """ subprocess.call(['mkdir', 'test']...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/test/java/org/apache/kafka/common/security/authenticator/SaslAuthenticatorFailureDelayTest.java
# # (c) 2018 Red Hat 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 # (at your option) any later version. # # Ansible is d...
unknown
codeparrot/codeparrot-clean
import os import sys import unittest import ConfigParser sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../.."))) import base_test from selenium.common import exceptions from wptserve import server from wptserve.router import any_method from wptserve.handlers import basic_auth_handler class WebDriverAuthT...
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 "L...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. // // Code generated by generate-staticcheck; DO NOT EDIT. // //go:build bazel package sa5000 import ( util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes...
go
github
https://github.com/cockroachdb/cockroach
build/bazelutil/staticcheckanalyzers/sa5000/analyzer.go
//// [tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts] //// //// [asyncOrYieldAsBindingIdentifier1.ts] function f_let () { let await = 1 } function f1_var () { var await = 1 } function f1_const () { const await = 1 } async function f2_let () { let await = 1...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.js
import gzip import os from Download import * def url_join(*args): return "/".join([x.strip("/") for x in args]) def packages_url(repo, arch, fmt): return url_join(repo["url"], arch, "Packages%s" % fmt) def filename_from_url(url, directory=''): return os.path.join(directory, url.split("//")[1].replace("/"...
unknown
codeparrot/codeparrot-clean
# Copyright 2018 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models, api class HrEmployee(models.Model): _inherit = 'hr.employee' document_ids = fields.One2many( 'ir.attachment', compute='_compute_document...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for build_artifact module. These unit tests take tarball from google storage locations to fully test the artifact d...
unknown
codeparrot/codeparrot-clean
# download from: # https://raw.githubusercontent.com/pytorch/vision/master/torchvision/models/resnet.py # import os import math import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', ...
unknown
codeparrot/codeparrot-clean
#========================================================================== # # Copyright Insight Software Consortium # # 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...
unknown
codeparrot/codeparrot-clean
kind: NEW FEATURES body: "validate: The validate command now checks the `backend` block. This ensures the backend type exists, that all required attributes are present, and that the backend's own validation logic passes." time: 2026-02-12T10:42:40.333849Z custom: Issue: "38021"
unknown
github
https://github.com/hashicorp/terraform
.changes/v1.15/NEW FEATURES-20260212-104240.yaml
## Input ```javascript function Component(props) { // a does not need to be memoized ever, even though it's a // dependency of c, which exists in a scope that has a memoized // output. it doesn't need to be memoized bc the value is a primitive type. const a = props.a + props.b; // b and c are interleaved an...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/escape-analysis-non-escaping-interleaved-primitive-dependency.expect.md
import openerp from openerp.tools.safe_eval import safe_eval as eval class DiagramView(openerp.http.Controller): @openerp.http.route('/web_diagram/diagram/get_diagram_info', type='json', auth='user') def get_diagram_info(self, req, id, model, node, connector, src_node, des_node, label...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012 NTT DOCOMO, 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 requ...
unknown
codeparrot/codeparrot-clean
//===--- Requirement.h - Swift Requirement ASTs -----------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 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/AST/Requirement.h
from . import utils from .path import * from .pathFinder import * import copy class ConnectivityMatrix: def __init__(self, graph): self._graph = graph self._paths = [] self._nodes = [] self._initialMatrix = [] self._matrix = [] self._rowLabels = [] self._c...
unknown
codeparrot/codeparrot-clean