code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
// This file is part of ICU4X. For terms of use, please see the file // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). //! Options to define fallback behaviour. //! //! These options are consumed by the `LocaleFallbacker` in the `icu_lo...
rust
github
https://github.com/nodejs/node
deps/crates/vendor/icu_provider/src/fallback.rs
#!/bin/sh test_description='core.whitespace rules and git apply' . ./test-lib.sh prepare_test_file () { # A line that has character X is touched iff RULE is in effect: # X RULE # ! trailing-space # @ space-before-tab # # indent-with-non-tab (default tab width 8) # = indent-with-non-tab,tab...
unknown
github
https://github.com/git/git
t/t4124-apply-ws-rule.sh
from pyticketswitch.price_band import PriceBand from pyticketswitch.mixins import JSONMixin class TicketType(JSONMixin, object): """Describes a collection of tickets. Generally this represents a part of house in a venue, but may have other meanings in contexts outside theater and music. Attributes: ...
unknown
codeparrot/codeparrot-clean
from fparser import api def test_reproduce_issue(): source_str = '''\ subroutine bl(a, &b, &c) integer a, b, c a = b + c end subroutine bl subroutine blc(a, c here's an annoying comment line &b, &c, c another annoying comment &d, c a third annoying comm...
unknown
codeparrot/codeparrot-clean
// Copyright 2005-2009 Daniel James. // 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) #ifndef BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP #define BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP #include <boost/container_hash/hash.hp...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/container_hash/extensions.hpp
from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from django.test import TestCase from misago.users.tokens import make_password_change_token class ForgottenPasswordViewsTests(TestCase): def test_request_view_returns_200(self): """request new password view returns...
unknown
codeparrot/codeparrot-clean
/* ** $Id: loslib.c,v 1.19.1.3 2008/01/18 16:38:18 roberto Exp $ ** Standard Operating System library ** See Copyright Notice in lua.h */ #include <errno.h> #include <locale.h> #include <stdlib.h> #include <string.h> #include <time.h> #define loslib_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "...
c
github
https://github.com/redis/redis
deps/lua/src/loslib.c
# -*- coding: utf-8 -*- import os import tempfile import unittest from os import path from django.conf import settings from django.core.cache import cache from django.core.validators import ValidationError import mock from nose.tools import assert_raises, eq_, raises from mkt.site.storage_utils import (LocalFileStor...
unknown
codeparrot/codeparrot-clean
/////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2004, Industrial Light & Magic, a division of Lucas // Digital Ltd. LLC // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the fol...
c
github
https://github.com/opencv/opencv
3rdparty/openexr/IlmImf/ImfKeyCode.h
#!/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. """Runs all of the ChromeDriver tests. For ChromeDriver documentation, refer to http://code.google.com/p/chromedriver. """ import...
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
#!/usr/bin/python import argparse, requests, json from requests.adapters import HTTPAdapter DEFAULT_NUM_OF_STUDENTS = 200 DEFAULT_SERVER_URL = "http://localhost" REST_BASE_PATH = "/rest" args = {} base_url = '' headers = {} auth = () session = {} def parse_args(): global args arg_parser = argparse.ArgumentParse...
unknown
codeparrot/codeparrot-clean
import { valueType, Func } from "./ast"; export const functionSignatures: Record<string, Func> = { abs: { name: "abs", argTypes: [valueType.vector], variadic: 0, returnType: valueType.vector }, absent: { name: "absent", argTypes: [valueType.vector], variadic: 0, returnType: valueType.vector }, absent_over_time: ...
typescript
github
https://github.com/prometheus/prometheus
web/ui/mantine-ui/src/promql/functionSignatures.ts
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
# 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/tests/unit/api_fastapi/execution_api/versions/head/test_assets.py
from ._array_utils_impl import ( # noqa: F401 __all__, __doc__, byte_bounds, normalize_axis_index, normalize_axis_tuple, )
python
github
https://github.com/numpy/numpy
numpy/lib/array_utils.py
# Copyright (C) 2016 Luke San Antonio Bialecki # All rights reserved. import sys import json import base64 import struct import pdb RGB_FORMAT = 6407 RGB_ALPHA_FORMAT = 6408 SRGB_FORMAT = 0x8C40 SRGB_ALPHA_FORMAT = 0x8C42 TEXTURE_2D_TARGET = 3553 UNSIGNED_BYTE_TYPE = 5121 CLAMP_TO_EDGE = 33071 LINEAR_MIPMAP_LINE...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Http\Testing; use LogicException; class FileFactory { /** * Create a new fake file. * * @param string $name * @param string|int $kilobytes * @param string|null $mimeType * @return \Illuminate\Http\Testing\File */ public function create($name...
php
github
https://github.com/laravel/framework
src/Illuminate/Http/Testing/FileFactory.php
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package http import ( "testing" "github.com/hashicorp/vault/vault" ) var defaultCustomHeaders = map[string]string{ "Strict-Transport-Security": "max-age=1; domains", "Content-Security-Policy": "default-src 'others'", "X-Custom-Header": ...
go
github
https://github.com/hashicorp/vault
http/custom_header_test.go
# Copyright 2017 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 copy import itertools import math import random import sys import numpy as np from numba.core.compiler import compile_isolated, Flags from numba import jit, njit from numba.core import types, utils, errors import unittest from numba import testing from numba.tests.support import TestCase, MemoryLeakMixin, tag ...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='Clone repositories and keep empty commits' . ./lib-git-p4.sh test_expect_success 'start p4d' ' start_p4d ' test_expect_success 'Create a repo' ' client_view "//depot/... //client/..." && ( cd "$cli" && mkdir -p subdir && >subdir/file1.txt && p4 add subdir/file1.txt && p4 s...
unknown
github
https://github.com/git/git
t/t9826-git-p4-keep-empty-commits.sh
#if defined(JEMALLOC_UAF_DETECTION) || defined(JEMALLOC_DEBUG) # define TEST_SAN_UAF_ALIGN_ENABLE "lg_san_uaf_align:12" # define TEST_SAN_UAF_ALIGN_DISABLE "lg_san_uaf_align:-1" #else # define TEST_SAN_UAF_ALIGN_ENABLE "" # define TEST_SAN_UAF_ALIGN_DISABLE "" #endif static inline bool extent_is_guarded(tsdn_t *ts...
c
github
https://github.com/redis/redis
deps/jemalloc/test/include/test/san.h
""" ====================================== Sparse inverse covariance estimation ====================================== Using the GraphLasso estimator to learn a covariance and sparse precision from a small number of samples. To estimate a probabilistic model (e.g. a Gaussian model), estimating the precision matrix, t...
unknown
codeparrot/codeparrot-clean
import os import sys import glob import serial import time from datetime import datetime BAUDRATE=9600 DATA_FILE="/tmp/serialData.txt" def getCOM(): # Assume the first /dev/tty.usb* is our COM ports = glob.glob("/dev/tty.usb*") if len(ports) >= 1: return ports[0] return None def monitor(): wait_...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations DOCUMENTATION = """ - key: "value"wrong """ EXAMPLES = """ - key: "value"wrong """ RETURN = """ - key: "value"wrong """ from ansible.module_utils.basic import AnsibleMod...
python
github
https://github.com/ansible/ansible
test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/col/plugins/modules/invalid_yaml_syntax.py
# -*- coding: utf-8 -*- """ werkzeug.datastructures ~~~~~~~~~~~~~~~~~~~~~~~ This module provides mixins and classes with an immutable interface. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import codecs import ...
unknown
codeparrot/codeparrot-clean
# # (c) Simon Marlow 2002 # from __future__ import print_function import shutil import sys import os import errno import string import re import traceback import time import datetime import copy import glob from math import ceil, trunc import collections have_subprocess = False try: import subprocess have_su...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package transit import ( "context" "crypto/rsa" "crypto/x509" "encoding/pem" "testing" "github.com/hashicorp/vault/sdk/logical" ) const ( storagePath = "policy/import/" + WrappingKeyName ) func TestTransit_WrappingKey(t *testing.T) { //...
go
github
https://github.com/hashicorp/vault
builtin/logical/transit/path_wrapping_key_test.go
# -*- coding: utf-8 -*- # Copyright (C) 2015 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Module defining unit prefixe class and some constants. Constant dict for SI and binary prefixes are defined as PREFIXES and BIN_PREFIXES. """ from sympy import sympify class Prefix(object): """ This class represent prefixes, with their name, symbol and factor. Prefixes are u...
unknown
codeparrot/codeparrot-clean
from enigma import getPrevAsciiCode from Tools.NumericalTextInput import NumericalTextInput from Tools.Directories import resolveFilename, SCOPE_CONFIG, fileExists from Components.Harddisk import harddiskmanager from copy import copy as copy_copy from os import path as os_path from time import localtime, strftime # Co...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Jasper N. Brouwer <jasper@nerdsweide.nl> # (c) 2014, Ramon de la Fuente <ramon@delafuente.nl> # # 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...
unknown
codeparrot/codeparrot-clean
#include <ATen/core/Tensor.h> namespace at::native { std::tuple<Tensor, Tensor, Tensor> slow_conv3d_backward_cpu( const Tensor& grad_output, const Tensor& self, const Tensor& weight, IntArrayRef kernel_size, IntArrayRef stride, IntArrayRef padding, std::array<bool, 3> output_mask); } // n...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/ConvolutionMM3d.h
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
unknown
codeparrot/codeparrot-clean
from django.conf import settings from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.db import models from django.db.models import Sum, Count from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _, pge...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import print_function # Form implementation generated from reading ui file 'DOChannelTemplate.ui' # # Created: Sun Feb 22 13:29:09 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * unicode_norm.c * Normalize a Unicode string * * This implements Unicode normalization, per the documentation at * https://www.unicode.org/reports/tr15/. * * Portions Copyright (c) 2017-2026, PostgreSQL Global Development Group * * I...
c
github
https://github.com/postgres/postgres
src/common/unicode_norm.c
"""Support for ZHA covers.""" import asyncio import functools import logging from typing import List, Optional from zigpy.zcl.foundation import Status from homeassistant.components.cover import ( ATTR_CURRENT_POSITION, ATTR_POSITION, DEVICE_CLASS_DAMPER, DEVICE_CLASS_SHADE, DOMAIN, CoverEntity...
unknown
codeparrot/codeparrot-clean
#include <c10/core/impl/TorchDispatchModeTLS.h> #include <c10/core/impl/PythonDispatcherTLS.h> #include <ATen/core/PythonFallbackKernel.h> #include <ATen/record_function.h> namespace { // This TLS is used to track the state of the dispatcher to be able to restore // it when calling back into python. // It has the fol...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/core/PythonFallbackKernel.cpp
# Copyright (C) 2015-2021 by the RBniCS authors # # This file is part of RBniCS. # # SPDX-License-Identifier: LGPL-3.0-or-later import os from petsc4py import PETSc from mpi4py.MPI import Op from rbnics.utils.decorators import overload from rbnics.utils.io import Folders, PickleIO from rbnics.utils.mpi import parallel...
unknown
codeparrot/codeparrot-clean
// Copyright 2018 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
tools/etcd-dump-metrics/etcd.go
import sys import string import re import shutil from os.path import join, exists import scrapy from scrapy.command import ScrapyCommand from scrapy.utils.template import render_templatefile, string_camelcase from scrapy.utils.py26 import ignore_patterns, copytree from scrapy.exceptions import UsageError TEMPLATES_PA...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from bs4 import BeautifulSoup from django.urls import reverse from itertools import chain from tcms.management.models import Priority from tests import factories as f, BaseCaseRun class TestAdvancedSearch(BaseCaseRun): @classmethod def setUpTestData(cls): super().setUpTestData...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "cases/helper" module ActiveRecord module Coders class YAMLColumnTest < ActiveRecord::TestCase setup do @use_yaml_unsafe_load = ActiveRecord.use_yaml_unsafe_load ActiveRecord.use_yaml_unsafe_load = true end teardown do ActiveRecord...
ruby
github
https://github.com/rails/rails
activerecord/test/cases/coders/yaml_column_test.rb
from Tkinter import * class Test(Frame): def printit(self): print "hi" def createWidgets(self): self.QUIT = Button(self, text='QUIT', foreground='red', command=self.quit) self.QUIT.pack(side=BOTTOM, fill=BOTH) self.drawing = Canvas(self, width="5i", ...
unknown
codeparrot/codeparrot-clean
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2007-2012 Brian G. Matherly # Copyright (C) 2009 Gary Burton # Copyright (C) 2010 Jakim Friant # Copyright (C) 2011 Matt Keenan (matt.keenan@gmail.com) # Copyright (C) 2013-2014 Paul Fr...
unknown
codeparrot/codeparrot-clean
// Copyright 2016 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql_test import ( "bytes" "context" "strings" "sync/atomic" "testing" "github.com/cockroachdb/cockroach/pkg/base" "github.com/cockroachdb/cockroach/pkg/...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/ambiguous_commit_test.go
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT use super::{ensure_init, env, get_app, get_config, read_options, MobileTarget}; use crate::{ error::{Context, ErrorExt}, helpers::config::{get_config as get_tauri_config, rel...
rust
github
https://github.com/tauri-apps/tauri
crates/tauri-cli/src/mobile/ios/xcode_script.rs
from .helper import timestamp_to_datetime import six class ApiModel(object): @classmethod def object_from_dictionary(cls, entry): # make dict keys all strings if entry is None: return "" entry_str_dict = dict([(str(key), value) for key, value in entry.items()]) retu...
unknown
codeparrot/codeparrot-clean
// @enableCustomTypeDefinitionForReanimated import {useAnimatedProps, useSharedValue} from 'react-native-reanimated'; function Component() { const radius = useSharedValue(50); const animatedProps = useAnimatedProps(() => { // draw a circle const path = ` M 100, 100 m -${radius.value}, 0 a ${rad...
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reanimated-no-memo-arg.js
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/profiler/lib/profiler_controller.h
/** * Verify renaming to/from a collection with encrypted fields is disallowed depending on the users * privileges * * @tags: [ * requires_fcv_61, * ] */ import {EncryptedClient, isEnterpriseShell} from "jstests/fle2/libs/encrypted_client_util.js"; import {ReplSetTest} from "jstests/libs/replsettest.js"; import ...
javascript
github
https://github.com/mongodb/mongo
jstests/auth/rename_encrypted_collection.js
//go:build linux /* Copyright 2015 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 agre...
go
github
https://github.com/kubernetes/kubernetes
pkg/kubelet/cm/container_manager_linux_test.go
# net.py -- Connection, HttpProxyConnection classes # # Copyright (C) 2003 Manish Jethani (manish_jethani AT yahoo.com) # # 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 2 of the ...
unknown
codeparrot/codeparrot-clean
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v1beta1", "metadata": { "name": "v0alpha1.geomap-spatial-operations-transformer.v42" }, "spec": { "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/panel-geomap/v0alpha1.geomap-spatial-operations-transformer.v42.v1beta1.json
import scrapy from scrapy.crawler import CrawlerProcess from scrapy.utils.reactorless import is_reactorless class NoRequestsSpider(scrapy.Spider): name = "no_request" async def start(self): self.logger.info(f"is_reactorless(): {is_reactorless()}") return yield process = CrawlerProcess...
python
github
https://github.com/scrapy/scrapy
tests/CrawlerProcess/simple.py
import hashlib import io import os import re import shutil import tempfile import warnings from functools import partial from importlib import resources from pathlib import Path from pickle import dumps, loads from unittest.mock import Mock from urllib.error import HTTPError from urllib.parse import urlparse import nu...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/datasets/tests/test_base.py
#!/usr/bin/env python # Copyright 2019 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/l...
unknown
codeparrot/codeparrot-clean
/* Copyright (c) 2016, 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
include/mf_wcomp.h
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\ExpressionLanguage; /** * Lexes an expression. * *...
php
github
https://github.com/symfony/symfony
src/Symfony/Component/ExpressionLanguage/Lexer.php
/* The standard CSS for doxygen 1.12.0*/ html { /* page base colors */ --page-background-color: white; --page-foreground-color: black; --page-link-color: #3D578C; --page-visited-link-color: #4665A2; /* index */ --index-odd-item-bg-color: #F8F9FC; --index-even-item-bg-color: white; ...
css
github
https://github.com/opencv/opencv
doc/stylesheet.css
""" Basic text progress bar without fancy curses features """ __all__ = ['ProgressBar'] class ProgressBar: ''' Displays interactively the progress of a given task Inspired/adapted from code.activestate.com recipe #168639 ''' DEFAULT_WIDTH = 77 def __init__(self, minimum=0, maximum=100, widt...
unknown
codeparrot/codeparrot-clean
/** @import { BlockStatement, Expression, Statement } from 'estree' */ /** @import { AST } from '#compiler' */ /** @import { ComponentContext } from '../types.js' */ import { dev, locator } from '../../../../state.js'; import * as b from '#compiler/builders'; import { determine_namespace_for_children } from '../../util...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/compiler/phases/3-transform/server/visitors/SvelteElement.js
/* * 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/main/java/org/springframework/boot/build/architecture/ArchitecturePlugin.java
from coastlib.plotting.rose import get_rose_parameters, rose_plot import pandas as pd import pytest import matplotlib.pyplot as plt import os import numpy as np from matplotlib.testing.compare import compare_images plt.ioff() data_folder = os.sep.join([*os.path.realpath(__file__).split(os.sep)[:-2], '_common_data']) ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Lexer for PPAPI IDL The lexer uses the PLY library to build a tokenizer which understands both WebIDL and Pepper tokens. WebI...
unknown
codeparrot/codeparrot-clean
"""The tests for Efergy sensor platform.""" import unittest import requests_mock from homeassistant.setup import setup_component from tests.common import load_fixture, get_test_home_assistant token = '9p6QGJ7dpZfO3fqPTBk1fyEmjV1cGoLT' multi_sensor_token = '9r6QGF7dpZfO3fqPTBl1fyRmjV1cGoLT' ONE_SENSOR_CONFIG = { ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- class Deadlock: def __init__(self, total_system): self.RESOURCES = total_system def execute(self, needed, assigned): self.needed = needed self.assigned = assigned self.finished = [False]*len(assigned) self.requests = self.calc_requests() s...
unknown
codeparrot/codeparrot-clean
files: - cmd/kubeadm/app/features/features.go - pkg/features/kube_features.go - staging/src/k8s.io/apiserver/pkg/features/kube_features.go - staging/src/k8s.io/client-go/features/known_features.go - staging/src/k8s.io/controller-manager/pkg/features/kube_features.go - staging/src/k8s.io/apiextensions-apiser...
unknown
github
https://github.com/kubernetes/kubernetes
hack/tools/golangci-lint/sorted/config.yaml
// run // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Test composite literals. package main type T struct { i int f float64 s string next *T } type R struct { num int } func itor(a int)...
go
github
https://github.com/golang/go
test/complit.go
// 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 ...
go
github
https://github.com/prometheus/prometheus
tsdb/wlog/checkpoint.go
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck4.ts] //// //// [ES5For-ofTypeCheck4.ts] var union: string | string[]; for (const v of union) { } //// [ES5For-ofTypeCheck4.js] "use strict"; var union; for (const v of union) { }
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/ES5For-ofTypeCheck4(target=es2015).js
- Feature Name: Follower Reads - Status: completed - Start Date: 2018-06-03 - Authors: Spencer Kimball, Tobias Schottdorf - RFC PR: #21056 - Cockroach Issue: #16593 # Summary Follower reads are consistent reads at historical timestamps from follower replicas. They make the non-leader replicas in a range suitable sour...
unknown
github
https://github.com/cockroachdb/cockroach
docs/RFCS/20180603_follower_reads.md
//===--- XRefs.cpp -----------------------------------------------*- 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 // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clangd/XRefs.cpp
name: Detect changed files description: Detects whether any matching files have changed in the current PR inputs: self: description: The path to the calling workflow (e.g. .github/workflows/backend-unit-tests.yml). It is regarded as any category. required: true outputs: self: description: Whether the ca...
unknown
github
https://github.com/grafana/grafana
.github/actions/change-detection/action.yml
//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/apis/apidiscovery/v2/zz_generated.conversion.go
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Loader\Configurator; use Symfony\...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Resources/config/http_client_debug.php
from __future__ import division, print_function, absolute_import import warnings import numpy as np from numpy.testing import (TestCase, assert_array_almost_equal, assert_array_equal, assert_array_less, assert_raises, assert_equal, assert_, ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Anders Ingemann <aim@secoya.dk> # # 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 Licen...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ LMS index (home) page. """ from bok_choy.page_object import PageObject from . import BASE_URL BANNER_SELECTOR = 'section.home header div.outer-wrapper div.title .heading-group h1' INTRO_VIDEO_SELECTOR = 'div.play-intro' VIDEO_MODAL_SELECTOR = 'section#video-modal.modal.home-page-video-modal...
unknown
codeparrot/codeparrot-clean
from flask import url_for class BaseMenu(object): """ Base menu item """ def __init__(self, name, class_name=None, icon_type=None, icon_value=None): self.name = name self.class_name = class_name self.icon_type = icon_type self.icon_value = icon_value self.pa...
unknown
codeparrot/codeparrot-clean
import re from share.normalize import ctx, tools from share.normalize.parsers import Parser from share.normalize.normalizer import Normalizer THE_REGEX = re.compile(r'(^the\s|\sthe\s)') class WorkIdentifier(Parser): uri = ctx class AgentIdentifier(Parser): uri = ctx class IsAffiliatedWith(Parser): # Mo...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.j...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # File: udf/ext_has_spouse_features.py import sys, json import ddlib # For each input tuple # TODO: Sample Data and the input schema. # sample json for row in sys.stdin: # Unpack input into tuples. # obj = json.loads(row) words, lemmas = obj["words"], obj["lemma"] span1 = ddlib.Span(...
unknown
codeparrot/codeparrot-clean
"""Support for KNX/IP covers.""" from __future__ import annotations from datetime import datetime from typing import Any, Callable, Iterable from xknx.devices import Cover as XknxCover, Device as XknxDevice from homeassistant.components.cover import ( ATTR_POSITION, ATTR_TILT_POSITION, DEVICE_CLASS_BLIND...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import get_params, try_rm import io import xml.etree.ElementTree import youtub...
unknown
codeparrot/codeparrot-clean
from tests.unit.dataactcore.factories.staging import AwardFinancialFactory from tests.unit.dataactcore.factories.domain import ObjectClassFactory from tests.unit.dataactvalidator.utils import number_of_errors, query_columns _FILE = 'b11_award_financial_1' def test_column_headers(database): expected_subset = {'row...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses...
unknown
codeparrot/codeparrot-clean
""" South's fake ORM; lets you not have to write SQL inside migrations. Roughly emulates the real Django ORM, to a point. """ from __future__ import print_function import inspect from django.db import models from django.db.models.loading import cache from django.core.exceptions import ImproperlyConfigured from sout...
unknown
codeparrot/codeparrot-clean
# $Id: tableparser.py 7320 2012-01-19 22:33:02Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This module defines table parser classes,which parse plaintext-graphic tables and produce a well-formed data structure suitable for building a CALS tab...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import booki.messaging.models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Endpoint', fields=[ ...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "cases/helper" module ActiveRecord module ConnectionAdapters class PostgreSQLAdapter class QuotingTest < ActiveRecord::PostgreSQLTestCase def setup @conn = ActiveRecord::Base.lease_connection @raise_int_wider_than_64bit = ActiveRecord.raise...
ruby
github
https://github.com/rails/rails
activerecord/test/cases/adapters/postgresql/quoting_test.rb
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/mediatek,infracfg.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: MediaTek Infrastructure System Configuration Controller maintainers: - Matthias Brugger <matthias.bgg@gmail.com> descript...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/mediatek,infracfg.yaml
{ "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start" }, "dependencies": { "@formspree/react": "latest", "next": "latest", "react": "18.2.0", "react-dom": "18.2.0" } }
json
github
https://github.com/vercel/next.js
examples/with-formspree/package.json
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for removing uses of the types module. These work for only the known names in the types module. The forms above can include types. or not. ie, It is assumed the module is imported either as: import type...
unknown
codeparrot/codeparrot-clean
""" 2: Algorithms thomas moll 2015 """ import time, random def find_sequentially(arr, item): """ Sequential Search Complexity: O(n) """ for value, i in enumerate(arr): # Check each item in the list if item == value: #Runs N number of times return True ...
unknown
codeparrot/codeparrot-clean
/* gzlib.c -- zlib functions common to reading and writing gzip files * Copyright (C) 2004-2024 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ #include "zbuild.h" #include "zutil_p.h" #include "gzguts.h" #if defined(_WIN32) # define LSEEK _lseeki64 #else #if defined(_LARGEF...
c
github
https://github.com/opencv/opencv
3rdparty/zlib-ng/gzlib.c
# Copyright David Abrahams 2004. 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) ''' >>> from object_ext import * >>> type(ref_to_noncopyable()) <class 'object_ext.NotCopyable'> >>> def print1(x): ... print x >>...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012 ARM Limited # 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 implementation of the functionality ...
unknown
codeparrot/codeparrot-clean