code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
""" Unit tests for email feature flag in legacy instructor dashboard. Additionally tests that bulk email is always disabled for non-Mongo backed courses, regardless of email feature flag, and that the view is conditionally available when Course Auth is turned on. """ from django.test.utils import override_settings from...
unknown
codeparrot/codeparrot-clean
// Copyright 2020 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package cli import ( "context" "fmt" "strconv" "github.com/cockroachdb/cockroach/pkg/cli/clierrorplus" "github.com/cockroachdb/cockroach/pkg/kv/kvpb" "github.com...
go
github
https://github.com/cockroachdb/cockroach
pkg/cli/debug_reset_quorum.go
from .pandas_vb_common import * class Int64Indexing(object): goal_time = 0.2 def setup(self): self.s = Series(np.random.rand(1000000)) def time_getitem_scalar(self): self.s[800000] def time_getitem_slice(self): self.s[:800000] def time_getitem_list_like(self): se...
unknown
codeparrot/codeparrot-clean
from prompt_toolkit.buffer import Buffer from prompt_toolkit.filters import Condition class CLIBuffer(Buffer): def __init__(self, always_multiline, *args, **kwargs): self.always_multiline = always_multiline @Condition def is_multiline(): doc = self.document return s...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python2 # Copyright (c) 2014, Jelmer Tiete <jelmer@tiete.be>. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright ...
unknown
codeparrot/codeparrot-clean
''' Installation script for Pylogeny. ''' # Date: Oct 16 2014 # Author: Alex Safatli # E-mail: safatli@cs.dal.ca from setuptools import setup, Extension as extension import os # Metadata from pylogeny.__version__ import VERSION DESCRIP = 'A code framework for phylogenetic tree reconstruction, rearrangement, scori...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import json import os import re import hashlib import subprocess import sys from typing import Any, List, Optional, Set from importlib import import_module from io import StringIO import glob import time import shutil from django.db import connections, DEFAULT_DB_ALIAS, ProgrammingError, \ ...
unknown
codeparrot/codeparrot-clean
import esccmd import escio from escutil import AssertEQ, GetCursorPosition, GetScreenSize, knownBug from esctypes import Point class XtermSaveTests(object): @knownBug(terminal="iTerm2", reason="Not implemented") def test_XtermSave_SaveSetState(self): # Turn on auto-wrap esccmd.DECSET(esccmd.DECAWM) # ...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
unknown
codeparrot/codeparrot-clean
## Input ```javascript /** * Should produce 1 scope: * * return: inputs=props.a & props.b; outputs=return * const a = compute(props.a); * const b = compute(props.b); * foo(a, b); * return = <Foo a={a} b={b} /> */ function Component(props) { const a = compute(props.a); const b = compute(props.b); ...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/interdependent.expect.md
# frozen_string_literal: true module DdlHelper def with_example_table(connection, table_name, definition = nil) connection.execute("CREATE TABLE #{table_name}(#{definition})") yield ensure connection.drop_table(table_name) end end
ruby
github
https://github.com/rails/rails
activerecord/test/support/ddl_helper.rb
# -*- coding: utf-8 -*- """ .. module:: test_offer_delete """ from django.test import Client from django.test import TestCase from apps.volontulo.tests.views.offers.commons import TestOffersCommons class TestOfferDelete(TestOffersCommons, TestCase): """Class responsible for testing offers deletion.""" def ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2009 Facebook # # 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 ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # This file is part of the Gedit LaTeX Plugin # # Copyright (C) 2010 Michael Zeising # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public Licence as published by the Free Software # Foundation; either version 2 of the Licence, o...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
unknown
codeparrot/codeparrot-clean
/*! * 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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/src/pages/DagsList/DagsFilters/TagFilter.tsx
<!-- This file is generated by scripts/process-messages/index.js. Do not edit! --> ### animation_duplicate ``` An element can only have one 'animate' directive ``` ### animation_invalid_placement ``` An element that uses the `animate:` directive must be the only child of a keyed `{#each ...}` block ``` ### animati...
unknown
github
https://github.com/sveltejs/svelte
documentation/docs/98-reference/.generated/compile-errors.md
#!/usr/bin/python # Copyright (C) 2003. Pedro Ferreira # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import BoostBuild ############################################################################### # # test_fo...
unknown
codeparrot/codeparrot-clean
/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-...
css
github
https://github.com/laravel/framework
src/Illuminate/Foundation/resources/exceptions/renderer/dist/styles.css
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012, Nachi Ueno, NTT MCL, 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...
unknown
codeparrot/codeparrot-clean
""" This program is a member of the new python based DAQ system. It collects samples from the RADAC, call mode specific integration routines and write the output to hdf5 formatted data files. The interface to the program is based on the xmlrpc protocol. History: Initial implementation Date: 20070212 ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage.strictness; import org.mockitousage.IMethods; /** * Test utility class that simulates invocation of mock in production code. * In certain tests, the production code needs ...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockitousage/strictness/ProductionCode.java
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urlparse, ) from ..utils import ( ExtractorError, int_or_none, float_or_none, ) class UstreamIE(InfoExtractor): _VALID_URL = r'https?://www\.ustream\.tv/(?P<type>recorded|embed|embed/...
unknown
codeparrot/codeparrot-clean
/* Auto-generated by generate-wrappers.py script. Do not modify */ #if defined(__arm__) || defined(__aarch64__) #include <q8gavgpool/up8xm-neon.c> #endif /* defined(__arm__) || defined(__aarch64__) */
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/q8gavgpool/up8xm-neon.c
#!/usr/bin/env python # # JSON.py # # 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 useful, # but WITHOUT ANY WARRANTY; with...
unknown
codeparrot/codeparrot-clean
## Input ```javascript import {identity} from 'shared-runtime'; function Component(x = identity([() => {}, true, 42, 'hello'])) { return x; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: [], }; ``` ## Code ```javascript import { c as _c } from "react/compiler-runtime"; import { identity } from...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/default-param-calls-global-function.expect.md
// SPDX-License-Identifier: GPL-2.0 /* * ECDSA P1363 signature encoding * * Copyright (c) 2024 Intel Corporation */ #include <linux/err.h> #include <linux/module.h> #include <crypto/algapi.h> #include <crypto/sig.h> #include <crypto/internal/ecc.h> #include <crypto/internal/sig.h> struct ecdsa_p1363_ctx { struct...
c
github
https://github.com/torvalds/linux
crypto/ecdsa-p1363.c
# Owner(s): ["module: mkldnn"] import copy import itertools import functools import unittest import warnings from contextlib import nullcontext try: import torchvision HAS_TORCHVISION = True except ImportError: HAS_TORCHVISION = False skipIfNoTorchVision = unittest.skipIf(not HAS_TORCHVISION, "no torchvi...
python
github
https://github.com/pytorch/pytorch
test/test_mkldnn.py
/* * Copyright (c) 2020 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.stubbing.answers; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; imp...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockito/internal/stubbing/answers/AbstractThrowsExceptionTest.java
# encoding: utf-8 u'''MCL — Person''' from ._utils import getReferencedBrains from Acquisition import aq_inner from zope.component import getUtility from .interfaces import IPerson, IDegree, IInstitution from zope.intid.interfaces import IIntIds from five import grok from plone.memoize import view import plone.api fr...
unknown
codeparrot/codeparrot-clean
"""Code-coverage tools for CherryPy. To use this module, or the coverage tools in the test suite, you need to download 'coverage.py', either Gareth Rees' original implementation: http://www.garethrees.org/2001/12/04/python-coverage/ or Ned Batchelder's enhanced version: http://www.nedbatchelder.com/code/modules/cover...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.agent_toolkits.ainetwork.toolkit import AINetworkToolkit # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and #...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/agents/agent_toolkits/ainetwork/toolkit.py
import sys, time from twisted.internet.defer import Deferred def start_chain(_): print "The start of the callback chain." def blocking_poem(_): def delayed_write(s, delay): time.sleep(delay) sys.stdout.write(s) sys.stdout.flush() delayed_write('\n', 0) delayed_write('I', .6) ...
unknown
codeparrot/codeparrot-clean
"""Add principal group system Revision ID: 1d84b7d16aa9 Revises: 179651effcbd Create Date: 2015-08-07 00:05:42.996683 """ # revision identifiers, used by Alembic. revision = '1d84b7d16aa9' down_revision = '179651effcbd' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql def u...
unknown
codeparrot/codeparrot-clean
# -*- Mode: python; coding: utf-8 -*- from __future__ import division #from __future__ import with_statement LAYOUT_ALGORITHM = 'neato' # ['neato'|'dot'|'twopi'|'circo'|'fdp'|'nop'] REPRESENT_CHANNELS_AS_NODES = 1 DEFAULT_NODE_SIZE = 3.0 # default node size in meters DEFAULT_TRANSMISSIONS_MEMORY = 5 # default number o...
unknown
codeparrot/codeparrot-clean
//! Routines for manipulating the control-flow graph. use rustc_middle::mir::*; use rustc_middle::ty::TyCtxt; use tracing::debug; use crate::builder::CFG; impl<'tcx> CFG<'tcx> { pub(crate) fn block_data(&self, blk: BasicBlock) -> &BasicBlockData<'tcx> { &self.basic_blocks[blk] } pub(crate) fn bl...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_mir_build/src/builder/cfg.rs
#!/usr/bin/env python # coding=utf8 import sys import datetime from aliyunsdkcore.acs_exception.exceptions import ServerException from aliyunsdkcore.client import AcsClient from aliyunsdkcore.profile import region_provider from aliyunsdkcore.http import method_type as MT from aliyunsdkcore.http import format_type as FT...
unknown
codeparrot/codeparrot-clean
// @validateNoSetStateInRender function Component(props) { const [x, setX] = useState(0); const foo = () => { setX(1); }; const bar = () => { foo(); }; const baz = () => { bar(); }; baz(); return [x]; }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.unconditional-set-state-nested-function-expressions.js
import { describe, expect, test } from 'vitest' import { expand } from './brace-expansion' describe('expand(…)', () => { test.each([ ['a/b/c', ['a/b/c']], // Groups ['a/{x,y,z}/b', ['a/x/b', 'a/y/b', 'a/z/b']], ['{a,b}/{x,y}', ['a/x', 'a/y', 'b/x', 'b/y']], ['{{xs,sm,md,lg}:,}hidden', ['xs:hidde...
typescript
github
https://github.com/tailwindlabs/tailwindcss
packages/tailwindcss/src/utils/brace-expansion.test.ts
from langchain_core.tracers import schemas from langchain_core.tracers.schemas import __all__ as schemas_all def test_public_api() -> None: """Test for changes in the public API.""" expected_all = [ "Run", ] assert sorted(schemas_all) == expected_all # Assert that the object is actually p...
python
github
https://github.com/langchain-ai/langchain
libs/core/tests/unit_tests/tracers/test_schemas.py
## Input ```javascript import {CONST_NUMBER0, invoke} from 'shared-runtime'; function Foo() { const x = [{value: 0}, {value: 1}, {value: 2}]; const param = CONST_NUMBER0; const foo = () => { return x[param].value; }; return invoke(foo); } export const FIXTURE_ENTRYPOINT = { fn: Foo, params: [{}], ...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/lambda-array-access-member-expr-captured.expect.md
# 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...
unknown
codeparrot/codeparrot-clean
name: Reusable Docs on: workflow_call: workflow_dispatch: permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true env: FORCE_COLOR: 1 jobs: build-doc: name: 'Docs' runs-on: ubuntu-latest timeout-minutes: 60 ...
unknown
github
https://github.com/python/cpython
.github/workflows/reusable-docs.yml
## Input ```javascript // @enableInstructionReordering import {useState} from 'react'; function Component() { const [state, setState] = useState(0); const onClick = () => { setState(s => s + 1); }; return ( <> <span>Count: {state}</span> <button onClick={onClick}>Increment</button> </>...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/merge-scopes-callback.expect.md
""" Test display and Python APIs on file and class static variables. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class StaticVariableTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): # C...
unknown
codeparrot/codeparrot-clean
//! Lower-level types and re-exports. //! //! Most users will not have to interact with the types in this module, but it is useful for those //! writing extractors, middleware, libraries, or interacting with the service API directly. //! //! # Request Extractors //! - [`ConnectionInfo`]: Connection information //! - [`...
rust
github
https://github.com/actix/actix-web
actix-web/src/dev.rs
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/api_fastapi/core_api/app.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Callbacks to be used with asynchronous services. The ProcessCallbackI is also included in the omero.scripts module for backwards compatibility. Copyright 2010 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/service/launcher/package-info.java
import io import email import unittest from email.message import Message from test.test_email import TestEmailBase class TestCustomMessage(TestEmailBase): class MyMessage(Message): def __init__(self, policy): self.check_policy = policy super().__init__() MyPolicy = TestEmailBa...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE 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 ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2014 OpenStack Foundation, all rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
unknown
codeparrot/codeparrot-clean
#This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import gtk import gobject import gettext import tryton.common as common import csv from tryton.config import TRYTON_ICON, CONFIG from tryton.common import RPCExecute, RPCExceptio...
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
buildSrc/src/test/java/org/springframework/boot/build/bom/bomr/UpgradeApplicatorTests.java
import enum import types import typing import weakref class DispatchError(RuntimeError): """Exception raised when an exception is raised during the execution of a registerd function in the dispatcher. """ class Register(enum.IntFlag): """Enum to select registering mode for Dispatcher.register_...
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/misc/ThrowByValueCatchByReferenceCheck.cpp
/** * Sample file to demonstrate various clang-format messages */ #include <string> #include <vector> #include <stdio.h> // NamespaceIndentation: None namespace foo { // Contents of namespace are not indented. int foo; namespace bar { int bar; namespace { int anony; } // namespace } // namespace bar /** * A ...
cpp
github
https://github.com/mongodb/mongo
etc/format_sample.cpp
# -*- encoding:utf-8 -*- from __future__ import division, absolute_import, print_function import sys, textwrap from numpydoc.docscrape import NumpyDocString, FunctionDoc, ClassDoc from numpydoc.docscrape_sphinx import SphinxDocString, SphinxClassDoc from nose.tools import * if sys.version_info[0] >= 3: sixu = la...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2009 Facebook # # 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 ...
unknown
codeparrot/codeparrot-clean
"""Test script for the gzip module. """ import unittest from test import support import os import io import struct gzip = support.import_module('gzip') data1 = b""" int length=DEFAULTALLOC, err = Z_OK; PyObject *RetVal; int flushmode = Z_FINISH; unsigned long start_total_out; """ data2 = b"""/* zlibmodule.c ...
unknown
codeparrot/codeparrot-clean
""" Integration tests for the stem.control.BaseController class. """ import re import threading import time import unittest import stem.control import test.runner import stem.socket import stem.util.system class StateObserver(object): """ Simple container for listening to ControlSocket state changes and rembem...
unknown
codeparrot/codeparrot-clean
use std::collections::hash_map::Entry; use rustc_data_structures::fx::FxHashMap; use rustc_hir::def_id::DefId; use rustc_middle::ty::error::TypeError; use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt}; use rustc_type_ir::relate::relate_args_with_variances; use tracing::instrument; use crate::infer::region_co...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_infer/src/infer/outlives/test_type_match.rs
import copy import numpy as np from numpy.linalg import pinv from statsmodels.sandbox import utils_old as utils class ContrastResults(object): """ Results from looking at a particular contrast of coefficients in a parametric model. The class does nothing, it is a container for the results from T and F...
unknown
codeparrot/codeparrot-clean
//! A minimal adaption of the `parking_lot` synchronization primitives to the //! equivalent `std::sync` types. //! //! This can be extended to additional types/methods as required. use std::fmt; use std::marker::PhantomData; use std::ops::{Deref, DerefMut}; use std::sync::{LockResult, TryLockError}; use std::time::Du...
rust
github
https://github.com/tokio-rs/tokio
tokio/src/loom/std/parking_lot.rs
# -*- coding: utf-8 -*- # This code is part of Amoco # Copyright (C) 2018 Axel Tillequin (bdcht3@gmail.com) # published under GPLv2 license # import expressions: from amoco.cas.expressions import * # reference documentation: # The SH-4 CPU Core Architecture, 12 september 2002. # registers : # ----------- # general...
unknown
codeparrot/codeparrot-clean
{"files":{"Cargo.toml":"133164f2c7c66053988a55b15ca4364f8ae03ae52836f2094630cde3eaf9351c","LICENSE":"f367c1b8e1aa262435251e442901da4607b4650e0e63a026f5044473ecfb90f2","README.md":"c51a6704a477876d2ebe131267a2a8023d3deaa3a2f208b9895dda192a2ff880","benches/convert.rs":"e266633d7a07629f1ab716084ee17aa8a919d9729ca482246406...
json
github
https://github.com/nodejs/node
deps/crates/vendor/icu_calendar/.cargo-checksum.json
// Store the references to globals in case someone tries to monkey patch these, causing the below // to de-opt (this occurs often when using popular extensions). export var is_array = Array.isArray; export var index_of = Array.prototype.indexOf; export var includes = Array.prototype.includes; export var array_from = Ar...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/internal/shared/utils.js
import matplotlib.pyplot as plt import numpy as np import urllib import matplotlib.cm as cm Low_Temp_Color = 'k' Mid_Temp_Color = 'g' High_Temp_Color = 'r' #Temp_Color = 0.5 Cloudy_Sim_Color = 'cyan' markersize = 40 SDSS_File = '/Users/Sam/Documents/emgtemp/data/4363_gr_5_0_err_dered.csv' SDSS_Data = np.genfromtxt(SDSS...
unknown
codeparrot/codeparrot-clean
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
unknown
codeparrot/codeparrot-clean
#!/bin/bash # This determines which branches will have pipelines triggered periodically, for dra workflows. BRANCHES=( $(cat branches.json | jq -r '.branches[].branch') ) # Sort them to make ordering predictable IFS=$'\n' BRANCHES=($(sort <<<"${BRANCHES[*]}")) unset IFS
unknown
github
https://github.com/elastic/elasticsearch
.buildkite/scripts/branches.sh
name: Unit Tests on: push: pull_request: defaults: run: shell: bash concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true permissions: contents: read jobs: tests: name: Unit Tests env: extensions: amqp,apcu,brotli,igbinary,...
unknown
github
https://github.com/symfony/symfony
.github/workflows/unit-tests.yml
/*------------------------------------------------------------------------- * * oid.c * Functions for the built-in type Oid ... also oidvector. * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION...
c
github
https://github.com/postgres/postgres
src/backend/utils/adt/oid.c
import argparse import os import platform import shutil import subprocess import sys import tarfile from distutils.spawn import find_executable import localpaths from browserutils import browser, utils, virtualenv logger = None wpt_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) class Wptrunner...
unknown
codeparrot/codeparrot-clean
def floor_Max(A,B,N): x = min(B - 1,N) return (A*x) // B
unknown
mbpp
# Copyright (c) 2018-2019 Micro Focus or one of its affiliates. # Copyright (c) 2018 Uber Technologies, 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/licen...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import import socket try: from select import poll, POLLIN except ImportError: # `poll` doesn't exist on OSX and other platforms poll = False try: from select import select except ImportError: # `select` doesn't exist on AppEngine. select = False def is_...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, ...
unknown
codeparrot/codeparrot-clean
"""Script for deleting orphans""" from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from cms.djangoapps.contentstore.views.item import _delete_orphans from xmodule.modulestore import ModuleStoreEnum class Command(BaseC...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. ...
unknown
codeparrot/codeparrot-clean
// Copyright 2023 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql import ( "context" "strconv" "strings" "testing" "github.com/cockroachdb/cockroach/pkg/base" "github.com/cockroachdb/cockroach/pkg/kv" "github.com/c...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/schema_resolver_test.go
import forms from flask import current_app as app from generic.editor import GenericEditor from bson import ObjectId class ConsumeEditor(GenericEditor): def __init__(self, *args, **kwargs): super(ConsumeEditor, self).__init__(*args, **kwargs) def _create_form(self, *args, **kwargs): return fo...
unknown
codeparrot/codeparrot-clean
########################################################## # THIS IS A GENERATED FILE -- DO NOT MODIFY. # IF YOU WISH TO MODIFY THIS SUITE, MODIFY THE CORRESPONDING MATRIX SUITE MAPPING FILE # AND REGENERATE THE MATRIX SUITES. # # matrix suite mapping file: buildscripts/resmokeconfig/matrix_suites/mappings/replica_sets...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/matrix_suites/generated_suites/replica_sets_last_continuous.yml
import logging from flexget import plugin from flexget.event import event log = logging.getLogger('est_released') class EstimateRelease(object): """ Front-end for estimator plugins that estimate release times for various things (series, movies). """ def estimate(self, entry): """ ...
unknown
codeparrot/codeparrot-clean
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package os import ( "syscall" "time" ) const bitSize16 = 2 func fileInfoFromStat(d *syscall.Dir) *fileStat { fs := &fileStat{ name: d.Name, size: ...
go
github
https://github.com/golang/go
src/os/stat_plan9.go
#!/usr/bin/env python import sys from argparse import ArgumentParser from os.path import abspath, dirname, join from shutil import rmtree import django from django.conf import settings from django.test.runner import DiscoverRunner sys.path.insert(0, abspath(dirname(__file__))) media_root = join(abspath(dirname(__fil...
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines.channels import kotlinx.coroutines.* import kotlinx.coroutines.selects.* enum class TestChannelKind( val capacity: Int, private val description: String, val viaBroadcast: Boolean = false ) { RENDEZVOUS(0, "RendezvousChannel"), BUFFERED_1(1, "BufferedChannel(1)"), BUF...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/common/test/channels/TestChannelKind.kt
/* Copyright 2024 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/allocation/state/state_checkpoint_test.go
import cgi import email.utils import hashlib import getpass import mimetypes import os import platform import re import shutil import sys import tempfile import pip from pip.backwardcompat import urllib, urlparse, raw_input from pip.exceptions import InstallationError, HashMismatch from pip.util import (splitext, rmt...
unknown
codeparrot/codeparrot-clean
- name: run module in collection to test coverage for collection plugins win_collection: - name: run module in library adjacent to test coverage for test plugins test_win_collection_normal: register: library_result - name: assert run module with library adjacent module assert: that: - library_result.u...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/ansible-test-coverage-windows/ansible_collections/ns/col/tests/integration/targets/win_collection/tasks/main.yml
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright 2015 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 b...
unknown
codeparrot/codeparrot-clean
''' The :mod:`pulsar.apps.wsgi.utils` module include several utilities used by various components in the :ref:`wsgi application <apps-wsgi>` ''' import time import re import textwrap import logging from datetime import datetime, timedelta from email.utils import formatdate from urllib.parse import parse_qsl from pulsa...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env ruby require 'benchmark/ips' # For this pull request, which changes Page#dir # https://github.com/jekyll/jekyll/pull/4403 CONTENT_CONTAINING = <<-HTML.freeze <!DOCTYPE HTML> <html lang="en-US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta charset="UTF-8"> <...
ruby
github
https://github.com/jekyll/jekyll
benchmark/regexp-vs-include.rb
# Copyright (c) 2011 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. """Command for measuring how long pages take to load in a browser. Prerequisites: 1. The command_line package from tools/site_compare 2. Either the ...
unknown
codeparrot/codeparrot-clean
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2021 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
unknown
codeparrot/codeparrot-clean
""" Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright 2023 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. PLATFORM=linux-amd64 ./build/teamcity/internal/release/process/build-cockroach-release-per-platform.sh
unknown
github
https://github.com/cockroachdb/cockroach
build/teamcity/internal/release/process/build-cockroach-release-linux-amd64.sh
import { EXPORT, EXPORT2, EXPORT3, EXPORT4, EXPORT5, EXPORT6 } from "./inner"; export function f1() { // no using EXPORT } export function f2() { return EXPORT; } function f3() { return EXPORT; } const f4 = function () { return EXPORT; }; const f5 = () => { return EXPORT; }; let f6 = () => { return EXPORT; ...
javascript
github
https://github.com/webpack/webpack
test/cases/inner-graph/simple/module.js