code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. **Example** ```esql ROW date_string = "2022-05-06" | EVAL date = DATE_PARSE("yyyy-MM-dd", date_string) ``` | date_string:keyword | date:date | | --- | --- | | 2022-05-06 | 2022-05-06T00:00:00.000Z |
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/functions/examples/date_parse.md
# -*- coding: utf-8 -*- """Display help for a command in $STASH_ROOT/bin/ or a topic, or list all commands if no name is given. """ from __future__ import print_function import argparse import ast import os import sys from stash.system.shcommon import _STASH_EXTENSION_BIN_PATH, _STASH_EXTENSION_MAN_PATH try: ra...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, techbizdev <techbizdev@paloaltonetworks.com> # 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 DOCUMENTATION = ''' --- module: panos_na...
unknown
codeparrot/codeparrot-clean
// Copyright The Prometheus 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 w...
go
github
https://github.com/prometheus/prometheus
web/api/testhelpers/api.go
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v2alpha1", "metadata": { "name": "v0alpha1.timeline-demo.v42" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "datasource": { "type": "datasource", "uid": "grafana" ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/panel-timeline/v0alpha1.timeline-demo.v42.v2alpha1.json
# -*- coding: utf-8 -*- import sys import os reload(sys) sys.setdefaultencoding("utf-8") from sqlalchemy import Table from yaml import load,dump try: from yaml import CSafeLoader as SafeLoader print "Using CSafeLoader" except ImportError: from yaml import SafeLoader print "Using Python SafeLoader" distribution={'...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2013 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 by applicable law or agree...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.tests.server.netty import io.ktor.http.* import io.ktor.server.engine.* import io.ktor.server.netty.* import io.ktor.server.response.* import io.ktor.server.test.base.* import...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-netty/jvm/test/io/ktor/tests/server/netty/NettyCustomChannelPipelineConfigurationTest.kt
/* * 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/io/compress/bzip2/CRC.java
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015, 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in...
unknown
codeparrot/codeparrot-clean
export async function foo() { return 'data'; }
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/errors/server-actions/server-graph/16/output.js
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
unknown
codeparrot/codeparrot-clean
"""Track selection page""" from bok_choy.page_object import PageObject from common.test.acceptance.pages.lms import BASE_URL from common.test.acceptance.pages.lms.course_home import CourseHomePage from common.test.acceptance.pages.lms.pay_and_verify import PaymentAndVerificationFlow class TrackSelectionPage(PageObjec...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re clas...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """Tests for the Category class.""" # # (C) Pywikibot team, 2014-2015 # # Distributed under the terms of the MIT license. # from __future__ import unicode_literals __version__ = '$Id$' import pywikibot import pywikibot.page from tests.aspects import unittest, TestCase class TestCategoryObje...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
import {identity} from 'shared-runtime'; function Component(props) { let x; [x] = props.value; const foo = () => { x = identity(props.value[0]); }; foo(); return {x}; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: [{value: [42]}], };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/destructure-array-assignment-to-context-var.js
"""Tests for distutils.filelist.""" from os.path import join import unittest from test.test_support import captured_stdout, run_unittest from distutils.filelist import glob_to_re, FileList from distutils import debug MANIFEST_IN = """\ include ok include xo exclude xo include foo.tmp global-include *.x global-include...
unknown
codeparrot/codeparrot-clean
""" masked_reductions.py is for reduction algorithms using a mask-based approach for missing values. """ from __future__ import annotations from typing import TYPE_CHECKING import warnings import numpy as np from pandas._libs import missing as libmissing from pandas.core.nanops import check_below_min_count if TYP...
python
github
https://github.com/pandas-dev/pandas
pandas/core/array_algos/masked_reductions.py
from __future__ import print_function, division import matplotlib import logging from sys import stdout matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from neuralnilm import (Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer, Bidirectiona...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- """Implements Host Collection UI.""" from robottelo.ui.base import Base, UIError from robottelo.ui.locators import common_locators, locators, tab_locators from robottelo.ui.navigator import Navigator class HostCollection(Base): """Provides the CRUD functionality for Host Collection.""" ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys imp...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models from askbot.migrations import TERM_YELLOW, TERM_RESET from askbot.utils.console import ProgressBar class Migration(DataMigration): def forwards(self, orm): message = "Adding accepted ...
unknown
codeparrot/codeparrot-clean
//===- bolt/Passes/CacheMetrics.h - Instruction cache metrics ---*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
c
github
https://github.com/llvm/llvm-project
bolt/include/bolt/Passes/CacheMetrics.h
//! Sets up a WebSocket server over TCP and TLS. //! Sends a heartbeat message every 4 seconds but does not respond to any incoming frames. extern crate tls_rustls_023 as rustls; use std::{ io, pin::Pin, task::{Context, Poll}, time::Duration, }; use actix_http::{body::BodyStream, error::Error, ws, Ht...
rust
github
https://github.com/actix/actix-web
actix-http/examples/ws.rs
import unittest import os import shutil import numpy as np from esp import specUtils class testSpecUtils(unittest.TestCase): @classmethod def setUpClass(cls): sample_wavelen = np.arange(50) sample_flux = np.random.uniform(size=50) cls.sample_spec = np.array([sample_wavelen, sample_fl...
unknown
codeparrot/codeparrot-clean
{ "openapi": "3.0.1", "info": { "title": "Calculator Plugin", "description": "A plugin that allows the user to perform basic arithmetic operations like addition, subtraction, multiplication, division, power, and square root using ChatGPT.", "version": "v1" }, "servers": [ { ...
json
github
https://github.com/langchain-ai/langchain
libs/langchain/tests/unit_tests/examples/test_specs/calculator/apispec.json
// Originally from narwhal.js (http://narwhaljs.org) // Copyright (c) 2009 Thomas Robinson <280north.com> // // 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 ...
javascript
github
https://github.com/nodejs/node
lib/assert.js
lazy from __future__ import annotations
python
github
https://github.com/python/cpython
Lib/test/test_import/data/lazy_imports/lazy_future_import.py
#!/usr/bin/env python # coding: utf-8 from __future__ import print_function import os import sys import shutil from subprocess import check_call from glob import glob v = sys.version_info if v[:2] < (3,3): error = "ERROR: Jupyter Hub requires Python version 3.3 or above." print(error, file=sys.stderr) sy...
unknown
codeparrot/codeparrot-clean
//go:build windows package libnetwork import "fmt" // DriverInfo returns a collection of driver operational data related to this endpoint retrieved from the driver. func (ep *Endpoint) DriverInfo() (map[string]any, error) { ep, err := ep.retrieveFromStore() if err != nil { return nil, err } var gwDriverInfo m...
go
github
https://github.com/moby/moby
daemon/libnetwork/endpoint_info_windows.go
# -*- coding: utf-8 -*- # Needed to allow import # # 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 Lice...
unknown
codeparrot/codeparrot-clean
"""Test script for unittest. By Collin Winter <collinw at gmail.com> Still need testing: TestCase.{assert,fail}* methods (some are tested implicitly) """ from StringIO import StringIO import __builtin__ import os import re import sys import unittest from unittest import TestCase, TestProgram import types from co...
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/admin/ListTransactionsResult.java
# Copyright 2013 IBM Corp. # # 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 agree...
unknown
codeparrot/codeparrot-clean
#!/bin/bash # 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 ...
unknown
github
https://github.com/apache/kafka
bin/kafka-jmx.sh
{ "gnirps":[ "boot", "framework" ] }
json
github
https://github.com/spring-projects/spring-boot
core/spring-boot-test/src/test/resources/org/springframework/boot/test/json/different.json
#!/usr/bin/env python # # Tests for dakota_utils.models.hydrotrend. # # Call with: # $ nosetests -sv # # Mark Piper (mark.piper@colorado.edu) from nose.tools import * import os import tempfile import shutil from dakota_utils.models.hydrotrend import HydroTrend def setup_module(): print('HydroTrend tests:') ...
unknown
codeparrot/codeparrot-clean
#!/bin/sh # # Copyright (c) 2007 Eric Wong # test_description='git svn useSvnsyncProps test' . ./lib-git-svn.sh test_expect_success 'load svnsync repo' ' svnadmin load -q "$rawsvnrepo" < "$TEST_DIRECTORY"/t9111/svnsync.dump && git svn init --minimize-url -R arr -i bar "$svnrepo"/bar && git svn init --minimize-url...
unknown
github
https://github.com/git/git
t/t9111-git-svn-use-svnsync-props.sh
#! /usr/bin/env python3 #---------------------------------------------------------------------------- # Name: CreateTideData.py # Purpose: Wrapper for XTide to generate fbm boundary data # Author: J Park #---------------------------------------------------------------------------- # import os import argparse ...
unknown
codeparrot/codeparrot-clean
{ "format_version": "1.0", "provider_schemas": { "registry.terraform.io/hashicorp/test": { "provider": { "version": 0, "block": { "attributes": { "region": { "description_kind": "plain", ...
json
github
https://github.com/hashicorp/terraform
internal/command/testdata/providers-schema/basic/output.json
from __future__ import division import errno import json import os import sys import time import traceback from twisted.internet import defer, reactor from twisted.python import log from twisted.web import resource, static import p2pool from bitcoin import data as bitcoin_data from . import data as p2pool_data, p2p ...
unknown
codeparrot/codeparrot-clean
#pylint: disable=C0111 #pylint: disable=W0621 from courseware.mock_youtube_server.mock_youtube_server import MockYoutubeServer from lettuce import before, after, world from django.conf import settings import threading from logging import getLogger logger = getLogger(__name__) @before.all def setup_mock_youtube_serve...
unknown
codeparrot/codeparrot-clean
""" example_b.py by Ted Morin contains example code for model b from 10.1161/STROKEAHA.113.004506 2014 Intracranial Hemorrhage Among Patients With Atrial Fibrillation Anticoagulated With Warfarin or Rivaroxaban """ from model_b import model # inputs: ['Age', 'Diastolic Blood Pressure', 'Platelets','Albumin','History...
unknown
codeparrot/codeparrot-clean
""" ESSArch is an open source archiving and digital preservation system ESSArch Copyright (C) 2005-2019 ES Solutions AB 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...
unknown
codeparrot/codeparrot-clean
"""CPStats, a package for collecting and reporting on program statistics. Overview ======== Statistics about program operation are an invaluable monitoring and debugging tool. Unfortunately, the gathering and reporting of these critical values is usually ad-hoc. This package aims to add a centralized place for gather...
unknown
codeparrot/codeparrot-clean
package libnetwork import ( "context" "fmt" "strconv" "github.com/moby/moby/v2/daemon/internal/otelutil" "github.com/moby/moby/v2/daemon/libnetwork/drivers/bridge" "go.opentelemetry.io/otel/baggage" ) const libnGWNetwork = "docker_gwbridge" func getPlatformOption() EndpointOption { return nil } func (c *Con...
go
github
https://github.com/moby/moby
daemon/libnetwork/default_gateway_linux.go
import { prettyDOM, render, screen } from "@testing-library/react"; import user from "@testing-library/user-event"; import * as React from "react"; import { Meta, Outlet, createRoutesStub } from "../../../index"; const getDocumentHtmlForElement = (c: HTMLElement) => prettyDOM(c.ownerDocument, undefined, { highlight...
typescript
github
https://github.com/remix-run/react-router
packages/react-router/__tests__/dom/ssr/meta-test.tsx
#!/usr/bin/env python3 import leveldb import msgpack import csv from util.misc import Benchmark, open_file REQUIRED_KEYS = {'title', 'paper_id', 'date'} if __name__ == "__main__": import argparse parser = argparse.ArgumentParser(description="Creates a LevelDB of TSV metadata in infile") parser.add_argumen...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2010, 2011 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 optio...
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/common/metrics/stats/Value.java
#!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """An example functional test The module-level docstring should include a high-level description of what ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
unknown
codeparrot/codeparrot-clean
from django.conf import settings from guardian.shortcuts import get_objects_for_user import json from time import strptime from datetime import datetime from pytz import UTC, timezone from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required from django.contrib import mes...
unknown
codeparrot/codeparrot-clean
#ifndef Py_INTERNAL_PYMATH_H #define Py_INTERNAL_PYMATH_H #ifdef __cplusplus extern "C" { #endif #ifndef Py_BUILD_CORE # error "this header requires Py_BUILD_CORE define" #endif /* _Py_ADJUST_ERANGE1(x) * _Py_ADJUST_ERANGE2(x, y) * Set errno to 0 before calling a libm function, and invoke one of these * macros af...
c
github
https://github.com/python/cpython
Include/internal/pycore_pymath.h
import sys import numpy as np import os from os import path class DependencyWriter: """ Dependency writer class """ def __init__(self): pass def save(self, language, heads_pred): """Saves predicted dependency trees.""" base_deppars_dir = path.join(path.dirname(__file__), "...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2011 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
java
github
https://github.com/google/guava
android/guava/src/com/google/common/math/MathPreconditions.java
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. # ...
unknown
codeparrot/codeparrot-clean
framework: secret: s3cr3t default_locale: fr enabled_locales: ['fr', 'en'] csrf_protection: true form: csrf_protection: field_name: _csrf trust_x_sendfile_type_header: true esi: enabled: true ssi: enabled: true profiler: only_exceptions: tr...
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v2alpha1", "metadata": { "name": "v0alpha1.timeline-modes.v42" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "datasource": { "type": "datasource", "uid": "grafana"...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/panel-timeline/v0alpha1.timeline-modes.v42.v2alpha1.json
''' Optimal result for pebble solitaire state Status: Accepted ''' PRECOMPUTED = {} for _i in range(23): PRECOMPUTED['-' * _i + 'o' + '-' * (22 - _i)] = 1 ############################################################################### def dfs(state): """Depth First Search for best possible score""" glo...
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/common/requests/DeleteShareGroupStateRequest.java
# $Id: __init__.py 6433 2010-09-28 08:21:25Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. # Internationalization details are documented in # <http://docutils.sf.net/docs/howto/i18n.html>. """ This package contains modules for language-dependent fe...
unknown
codeparrot/codeparrot-clean
/* * Some parts of this file are derived from Mantine UI (https://github.com/mantinedev/mantine) * which is distributed under the MIT license: * * MIT License * * Copyright (c) 2021 Vitaly Rtishchev * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associat...
typescript
github
https://github.com/prometheus/prometheus
web/ui/mantine-ui/src/components/Accordion/AccordionChevron.tsx
# -*- coding: utf-8 -*- #from django.shortcuts import render #from django.views.generic import ListView from django.utils import timezone from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required #from django.utils.translation import ugettext_lazy as _ from feincms.content.a...
unknown
codeparrot/codeparrot-clean
{ "createdBy": "4FFFg0MNRJT0z0nW4uUizDHfHJV2", "createdDate": 1613031378505, "data": { "author": { "@type": "@builder.io/core:Reference", "id": "7b0b333bd44b4e91a6f4bf93158cb62b", "model": "author" }, "customFonts": [ { "family": "Allura", "isUserFont": true ...
json
github
https://github.com/vercel/next.js
examples/cms-builder-io/builder/post/second.json
# -*- coding: utf-8 -*- """ werkzeug.testsuite.datastructures ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the functionality of the provided Werkzeug datastructures. TODO: - FileMultiDict - Immutable types undertested - Split up dict tests :copyright: (c) 2013 by Armin Ronacher....
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2016 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """PEP 376 implementation.""" from __future__ import unicode_literals import base64 import codecs import contextlib import hashlib import logging import os import posixpath import sys import z...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2015, Brian Coca <bcoca@ansible.com> # 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': '...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright 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...
go
github
https://github.com/kubernetes/kubernetes
pkg/controller/certificates/signer/config/v1alpha1/zz_generated.conversion.go
from django.conf import settings from django.urls import include, path from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views from django.contrib.sitemaps.views import sitemap from . import views from ...
unknown
codeparrot/codeparrot-clean
use { regex_automata::meta::Regex, regex_syntax::hir::{ self, Hir, literal::{Literal, Seq}, }, }; use crate::{config::ConfiguredHIR, error::Error}; /// A type that encapsulates "inner" literal extractiong from a regex. /// /// It uses a huge pile of heuristics to try to pluck out literals ...
rust
github
https://github.com/BurntSushi/ripgrep
crates/regex/src/literal.rs
# Copyright 2013 Quanta Research Cambridge, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
unknown
codeparrot/codeparrot-clean
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLIST,...
unknown
codeparrot/codeparrot-clean
#include <ATen/native/vulkan/impl/Arithmetic.h> #include <ATen/native/vulkan/impl/Common.h> namespace at { namespace native { namespace vulkan { namespace arithmetic { api::ShaderInfo get_shader(const OpType type) { switch (type) { case OpType::ADD: return VK_KERNEL(add); case OpType::SUB: retur...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/vulkan/impl/Arithmetic.cpp
"""Some generic task implementations.""" from axopy.task import Task from axopy import util from axopy.gui.graph import SignalWidget class Oscilloscope(Task): """A visualizer for data acquisition devices. This task connects to the experiment input DAQ and displays each of its channels on a separate plot....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python3 import os from redmine import Redmine import datetime as dt import requests import json # Set variables os.chdir(os.path.expanduser("~") + "/.incmgmt/") prefs = [] for line in open('mw-prefs.txt'): prefs.append(line) redmine_project = prefs[0].rstrip() redmine_server = prefs[1].rstrip() redmine...
unknown
codeparrot/codeparrot-clean
"""Miscellaneous goodies for psycopg2 This module is a generic place used to hold little helper functions and classes until a better place in the distribution is found. """ # psycopg/extras.py - miscellaneous extra goodies for psycopg # # Copyright (C) 2003-2010 Federico Di Gregorio <fog@debian.org> # # psycopg2 is f...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import CParser import json import os import shutil from collections import OrderedDict files = ["../src/gui/widgets/widgets.h", "../src/gui/widgets/layouts/layouts.h", "../src/common.h", "../src/fc/fc.h", "../src/fc/conf.h"] layout_file = "../src/gui/widgets/layo...
unknown
codeparrot/codeparrot-clean
"""contain MultipleQueryLauncher Class""" import unittest import os.path from pyramid.paster import get_appsettings from pyramid import testing from askomics.libaskomics.rdfdb.MultipleQueryLauncher import MultipleQueryLauncher from askomics.libaskomics.EndpointManager import EndpointManager class MultipleQueryLaunch...
unknown
codeparrot/codeparrot-clean
import rsc from "@vitejs/plugin-rsc"; import react from "@vitejs/plugin-react"; import { defineConfig } from "vite"; export default defineConfig({ plugins: [ react(), rsc({ entries: { client: "src/entry.browser.tsx", rsc: "src/entry.rsc.tsx", ssr: "src/entry.ssr.tsx", }, ...
typescript
github
https://github.com/remix-run/react-router
integration/helpers/rsc-vite/vite.config.ts
import pygame from Networking import Client, Messages import Util class Sprite(object): def __init__(self, uri, x=0, y=0): self._uri = uri self._x = x self._y = y self._img = pygame.image.load(uri) self._width = self._img.get_width() self._height = self._img.get_heig...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (c) 2002 - 2015 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a class used to display the Sources part of the project. """ from __future__ import unicode_literals import os from PyQt5.QtCore import pyqtSignal from PyQt5.QtWidgets import QDialog, QInputDia...
unknown
codeparrot/codeparrot-clean
# Layering Remix on top of React Router 6.4 Date: 2022-08-16 Status: accepted ## Context Now that we're almost done [Remixing React Router][remixing-react-router] and will be shipping `react-router@6.4.0` shortly, it's time for us to start thinking about how we can layer Remix on top of the latest React Router. Thi...
unknown
github
https://github.com/remix-run/react-router
decisions/0007-remix-on-react-router-6-4-0.md
# -*- coding: utf-8 -*- """ oauthlib.oauth1.rfc5849.endpoints.resource ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module is an implementation of the resource protection provider logic of OAuth 1.0 RFC 5849. """ from __future__ import absolute_import, unicode_literals import logging from .base import BaseEndpoin...
unknown
codeparrot/codeparrot-clean
/* Copyright (c) 2014, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including...
c
github
https://github.com/mysql/mysql-server
sql/rpl_msr.h
# GNU Solfege - free ear training software # Copyright (C) 2010, 2011 Tom Cato Amundsen # # 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) ...
unknown
codeparrot/codeparrot-clean
# 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. from code import Code from model import PropertyType import cpp_util from json_parse import OrderedDict import schema_util class _TypeDependency(object)...
unknown
codeparrot/codeparrot-clean
# Copyright 2008-2015 Nokia Solutions and Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='miscellaneous basic tests for cherry-pick and revert' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh test_expect_success setup ' for l in a b c d e f g h i j k l m n o do echo $l$l$l$l$l$l$l$l$l || return 1 done >oops && test...
unknown
github
https://github.com/git/git
t/t3501-revert-cherry-pick.sh
/* CC0 (Public domain) - see ccan/licenses/CC0 file for details */ #ifndef CCAN_CHECK_TYPE_H #define CCAN_CHECK_TYPE_H /** * ccan_check_type - issue a warning or build failure if type is not correct. * @expr: the expression whose type we should check (not evaluated). * @type: the exact type we expect the expression...
c
github
https://github.com/ruby/ruby
ccan/check_type/check_type.h
--- navigation_title: "Cardinality" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-cardinality-aggregation.html --- # Cardinality aggregation [search-aggregations-metrics-cardinality-aggregation] A `single-value` metrics aggregation that calculates an app...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/aggregations/search-aggregations-metrics-cardinality-aggregation.md
//===--- MapReduce.swift --------------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
swift
github
https://github.com/apple/swift
benchmark/single-source/MapReduce.swift
{ "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start" }, "dependencies": { "next": "latest", "react": "^18.3.1", "react-dom": "^18.3.1" }, "devDependencies": { "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18"...
json
github
https://github.com/vercel/next.js
examples/image-secure-compute/package.json
""" ===================================== Structured Arrays (aka Record Arrays) ===================================== Introduction ============ Numpy provides powerful capabilities to create arrays of structs or records. These arrays permit one to manipulate the data by the structs or by fields of the struct. A simpl...
unknown
codeparrot/codeparrot-clean
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". """ import StringIO import json from django.test import TestCase from django.core.files.uploadedfile import SimpleUploadedFile from django.contrib.auth import get_user_model from django.contrib.contentty...
unknown
codeparrot/codeparrot-clean