code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
//// [tests/cases/compiler/abstractPropertyNegative.ts] //// //// [abstractPropertyNegative.ts] interface A { prop: string; m(): string; } abstract class B implements A { abstract prop: string; public abstract readonly ro: string; abstract get readonlyProp(): string; abstract m(): string; a...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/abstractPropertyNegative(target=es2015).js
""" Testing for mean shift clustering methods """ import numpy as np import warnings from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_false from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import asser...
unknown
codeparrot/codeparrot-clean
########################################################################## # # Copyright (c) 2012, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document class DuplicationError(frappe.Validation...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- u"""Useful I/O operations :copyright: Copyright (c) 2015 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function from pykern import pkconst import contextlib import copy import errno impo...
unknown
codeparrot/codeparrot-clean
"""This module allows adding a semantic hub layout to NDEx CX networkx. This is useful when a network is centered around a single hub node. The layout generated here allocates different classes of nodes into segments around the hub and then gives them random coordinates within that segment.""" import json import math ...
unknown
codeparrot/codeparrot-clean
'use strict'; const common = require('../common.js'); const { getCiphers, getCipherInfo } = require('node:crypto'); const bench = common.createBenchmark(main, { cipher: getCiphers(), n: 50, }); function main({ n, cipher }) { bench.start(); for (let i = 0; i < n; i++) { getCipherInfo(cipher); } bench.e...
javascript
github
https://github.com/nodejs/node
benchmark/crypto/getcipherinfo.js
/* * 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/protocol/types/SchemaException.java
# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from ansible.module_utils.ec2 import AWSRetry # Non-ansible imports try: from botocore.exceptions import BotoCoreError, ClientError except ImportError: pass def get_elb(connection...
unknown
codeparrot/codeparrot-clean
license=""" ############################################################## ## ## ## Remaining HZ distribution ## ## Version v01 "indepence" ## ## (4th of July 2015...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright (c) 2005 Niels Provos <provos@citi.umich.edu> # All rights reserved. # # Generates marshaling code based on libevent. import sys import re # _NAME = "event_rpcgen.py" _VERSION = "0.1" _STRUCT_RE = '[a-z][a-z_0-9]*' # Globals line_count = 0 white = re.compile(r'^\s+') cppcomment =...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2012 Async Open Source <http://www.async.com.br> ## All rights reserved ## ## 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 Foundati...
unknown
codeparrot/codeparrot-clean
## Input ```javascript // @lowerContextAccess function App() { const { joe: {foo}, bar, } = useContext(MyContext); return <Bar foo={foo} bar={bar} />; } ``` ## Code ```javascript import { c as _c } from "react/compiler-runtime"; // @lowerContextAccess function App() { const $ = _c(3); const { joe:...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/todo.lower-context-access-nested-destructuring.expect.md
"""Use the HTMLParser library to parse HTML files that aren't too bad.""" __all__ = [ 'HTMLParserTreeBuilder', ] from html.parser import HTMLParser try: from html.parser import HTMLParseError except ImportError as e: # HTMLParseError is removed in Python 3.5. Since it can never be # thrown in 3.5...
unknown
codeparrot/codeparrot-clean
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ import os import posixpath try: from urllib.parse import unquote except ImportError: # Python 2 from urllib import unquote from django.conf import settings fr...
unknown
codeparrot/codeparrot-clean
#!/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
/* * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.fir.components import org.jetbrains.kotlin.analysis.api.components....
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KaFirTypeCreator.kt
#!/usr/bin/python # # 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.0', 'status': ['preview'], 'suppor...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package remote
go
github
https://github.com/hashicorp/terraform
internal/communicator/remote/command_test.go
import os from typing import List, Optional from pyllars.cppparser.parser.clang_translator import NodeType from .generator import Generator class CXXRecordDeclGenerator(Generator): def generate(self): self._node.normalize() if 'implicit' in self._node.qualifiers: return None, None ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 Sharoon Thomas # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. """ from .packages.urllib3.exceptions import HTTPError as BaseHTTPError class RequestException(IOError): """There was an ambiguous exception that occurred while handling your request."""...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import translate.storage.base import django.core.validators import django.db.models.deletion from django.conf import settings from django.db import migrations, models from django.utils.timezone import utc import pootle.core.mixins.treei...
unknown
codeparrot/codeparrot-clean
from test import TestCase, generate_random_vector import struct import redis.exceptions class DimensionValidation(TestCase): def getname(self): return "[regression] Dimension Validation with Projection" def estimated_runtime(self): return 0.5 def test(self): # Test scenario 1: Cre...
python
github
https://github.com/redis/redis
modules/vector-sets/tests/dimension_validation.py
import doctest import unittest import itertools from test import support from test.support import threading_helper, script_helper from itertools import * import weakref from decimal import Decimal from fractions import Fraction import operator import random import copy import pickle from functools import reduce import ...
python
github
https://github.com/python/cpython
Lib/test/test_itertools.py
# Copyright 2009-2010 Gregory P. Ward # Copyright 2009-2010 Intelerad Medical Systems Incorporated # Copyright 2010-2011 Fog Creek Software # Copyright 2010-2011 Unity Technologies # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.request import io.ktor.client.engine.* import io.ktor.utils.io.InternalAPI @InternalAPI public class UnixSocketSettings(public val path: String) @OptIn(InternalAPI::cl...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-core/common/src/io/ktor/client/request/UnixSockets.kt
"""Adapt an HTTP server.""" import time class ServerAdapter(object): """Adapter for an HTTP server. If you need to start more than one HTTP server (to serve on multiple ports, or protocols, etc.), you can manually register each one and then start them all with bus.start: s1 = ServerAdapter(b...
unknown
codeparrot/codeparrot-clean
from Cython.Compiler.Visitor import CythonTransform from Cython.Compiler.ModuleNode import ModuleNode from Cython.Compiler.Errors import CompileError from Cython.Compiler.UtilityCode import CythonUtilityCode from Cython.Compiler.Code import UtilityCode, TempitaUtilityCode from Cython.Compiler import Options from Cytho...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that it will be use...
unknown
codeparrot/codeparrot-clean
""" Tool-specific initialization for Clang static analyzer There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ __revision__ = "tools/clang-analyze.py 2013-09-06 grissiom" import os import os.path import SCons.Ac...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
unknown
codeparrot/codeparrot-clean
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import json import uuid from django.http import HttpResponse from django.test.client import RequestFactory import baske...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. from __future__ import division from .image import ImageVisual from ..color import Color from .shaders import Function grid_color = """ vec4 grid_color(vec2 pos) { vec4 ...
unknown
codeparrot/codeparrot-clean
from collections import defaultdict from django.apps import apps from django.db import models from django.utils.translation import gettext_lazy as _ class ContentTypeManager(models.Manager): use_in_migrations = True def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # Cach...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import from ..model import Model from ..core.properties import Any, Dict, Float, String, Int, Bool, Override class TileSource(Model): """ A base class for all tile source types. ``TileSource`` is not generally useful to instantiate on its own. In general, tile sources are used ...
unknown
codeparrot/codeparrot-clean
// // Code generated by grafana-app-sdk. DO NOT EDIT. // package v0alpha1 import ( "encoding/json" "io" "github.com/grafana/grafana-app-sdk/resource" ) // CoreRoleJSONCodec is an implementation of resource.Codec for kubernetes JSON encoding type CoreRoleJSONCodec struct{} // Read reads JSON-encoded bytes from `...
go
github
https://github.com/grafana/grafana
apps/iam/pkg/apis/iam/v0alpha1/corerole_codec_gen.go
from kivy.app import App from kivy.uix.widget import Widget from kivy.uix.button import Button from kivy.uix.label import Label from kivy.uix.boxlayout import BoxLayout from kivy.properties import ListProperty from kivy.clock import Clock from datamgr import variables, scan class Binding: def __init__(self, source,...
unknown
codeparrot/codeparrot-clean
import unittest import _mysql import MySQLdb from MySQLdb.constants import FIELD_TYPE from configdb import connection_factory import warnings warnings.simplefilter("ignore") class TestDBAPISet(unittest.TestCase): def test_set_equality(self): self.assertTrue(MySQLdb.STRING == MySQLdb.STRING) def test_...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql import ( "context" "testing" "github.com/cockroachdb/cockroach/pkg/settings/cluster" "github.com/cockroachdb/cockroach/pkg/sql/parser" "github.com/coc...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/exec_util_test.go
/* 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 agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/kubelet/container/sync_result_test.go
#!/usr/bin/python # (c) 2018, NetApp, Inc # 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', 'status': ['preview'], ...
unknown
codeparrot/codeparrot-clean
# loop_count is not utilized since `i` is involved in the script benchmark: vm_poly_method_ov: | class C1 def m 1 end end class C2 def m 2 end end o1 = C1.new o2 = C2.new i = 0 while i<6_000_000 o = (i % 2 == 0) ? o1 : o2 # o.m; o.m;...
unknown
github
https://github.com/ruby/ruby
benchmark/vm_poly_method_ov.yml
#ifndef FT_GLOBAL_INCLUDED #define FT_GLOBAL_INCLUDED /* Copyright (c) 2000, 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 progr...
c
github
https://github.com/mysql/mysql-server
include/ft_global.h
# Standard imports import unittest import datetime as pydt import logging import uuid # Our imports import emission.core.get_database as edb import emission.storage.pipeline_queries as epq import emission.core.wrapper.pipelinestate as ewps class TestPipelineQueries(unittest.TestCase): def setUp(self): sel...
unknown
codeparrot/codeparrot-clean
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from PyQt4 import QtGui, QtCore from PyQt4.QtCore import Qt, QVariant # these are used so frequently so a shorter name is nicer class SubmodelStructureEditorModel(QtCore.QAbstractTableModel): '''...
unknown
codeparrot/codeparrot-clean
""" Copyright (C) 2016 Quinn D Granfor <spootdev@gmail.com> 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 ...
unknown
codeparrot/codeparrot-clean
# -*- coding: UTF-8 -*- # Copyright (C) 2007 Sylvain Taverne <taverne.sylvain@gmail.com> # Copyright (C) 2007, 2009 J. David Ibáñez <jdavid.ibp@gmail.com> # Copyright (C) 2008 Romain Gauthier <romain.gauthier@itaapy.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
unknown
codeparrot/codeparrot-clean
"""Tests for letsencrypt.plugins.webroot.""" import errno import os import shutil import stat import tempfile import unittest import mock from acme import challenges from acme import jose from letsencrypt import achallenges from letsencrypt import errors from letsencrypt.tests import acme_util from letsencrypt.test...
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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/util/util.h
#include "test/jemalloc_test.h" /* * If we're e.g. in debug mode, we *never* enter the fast path, and so shouldn't * be asserting that we're on one. */ static bool originally_fast; static int data_cleanup_count; void data_cleanup(int *data) { if (data_cleanup_count == 0) { expect_x_eq(*data, MALLOC_TSD_TEST_DAT...
c
github
https://github.com/redis/redis
deps/jemalloc/test/unit/tsd.c
""" PyRSS2Gen - A Python library for generating RSS 2.0 feeds. (This is the BSD license, based on the template at http://www.opensource.org/licenses/bsd-license.php ) Copyright (c) 2003, Dalke Scientific Software, LLC All rights reserved. Redistribution and use in source and binary forms, with or without modific...
unknown
codeparrot/codeparrot-clean
#ifndef RUBY_RUBYPARSER_H #define RUBY_RUBYPARSER_H 1 /* * This is a header file for librubyparser interface */ #include <stdarg.h> /* for va_list */ #include <assert.h> #ifdef UNIVERSAL_PARSER #define rb_encoding const void #define OnigCodePoint unsigned int #include "parser_st.h" #ifndef RUBY_RUBY_H #include "pa...
c
github
https://github.com/ruby/ruby
rubyparser.h
#!/usr/bin/python3 import defusedxml.ElementTree as ET import urllib.request import urllib.parse import sys import ssl __author__ = 'Nick Levesque <nick@portcanary.com>' class NexposeException(Exception): '''Raise this exception when the Nexpose API returns errors.''' pass class Nexpose: ''' Nexpose API wrapper....
unknown
codeparrot/codeparrot-clean
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
build-plugin/spring-boot-antlib/src/main/java/org/springframework/boot/ant/ShareAntlibLoader.java
import json import struct import os extra_info = [0 for x in range(10000)] extra_data = open("./extra_data", "r") for line in extra_data: line = line.rstrip() numeroMapa = line.split('=')[0] data = line.split('=')[1] extra_info[int(numeroMapa)] = data def getExtraData (mapa): return extra_info[mapa] for fn in o...
unknown
codeparrot/codeparrot-clean
# flake8: noqa (we don't need the "<...> imported but unused" error) from pycqed.version import __version__ import sys module_name = "qcodes" if module_name in sys.modules: # This is needed so that the `qcodes_QtPlot_monkey_patching` works for any # subsequent `qcodes` import raise ImportError("`pycqed` m...
unknown
codeparrot/codeparrot-clean
import numpy as np from scipy import fftpack import matplotlib.pyplot as plt from garcia_functions import * """ A partir de una topografia y una grilla de rigidez D obtenemos la deflexion que genera dicha carga topografica a traves del metodo de Garcia (2014). """ def ploteo(x, y, z, contours=150, title=""): plt....
unknown
codeparrot/codeparrot-clean
{ "definitions": { "Provides": { "description": "Modules that should be provided as shared modules to the share scope. When provided, property name is used to match modules, otherwise this is automatically inferred from share key.", "anyOf": [ { "type": "array", "items": { ...
json
github
https://github.com/webpack/webpack
schemas/plugins/sharing/ProvideSharedPlugin.json
#!/bin/sh # Copyright (c) 2006 Eric Wong test_description='git svn metadata migrations from previous versions' . ./lib-git-svn.sh test_expect_success 'setup old-looking metadata' ' cp "$GIT_DIR"/config "$GIT_DIR"/config-old-git-svn && mkdir import && ( cd import && for i in trunk branches/a branches/b tags/0.1 ...
unknown
github
https://github.com/git/git
t/t9107-git-svn-migrate.sh
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
unknown
codeparrot/codeparrot-clean
""" ======================================================= Check congruency of aligned reads in terms of COG annotations ======================================================= :Author: Nick Ilott :Release: $Id$ :Date: |today| :Tags: Python """ # load modules from ruffus import * import CGAT.Experiment as E import...
unknown
codeparrot/codeparrot-clean
# Overrides necessary for killing the primary. ### # Hook options. ### - name: replica_sets_hooks value: executor: hooks: # We disable the primary termination so that stepdowns occur with a live system. This # will caause numerous Rollback-To-Stable scenarios which is the desired scenario. ...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/matrix_suites/overrides/stepdown_primary_change_streams.yml
""" Copyright (C) 2014, Jaguar Land Rover This program is licensed under the terms and conditions of the Mozilla Public License, version 2.0. The full text of the Mozilla Public License is at https://www.mozilla.org/MPL/2.0/ Maintainer: Rudolf Streif (rstreif@jaguarlandrover.com) """ """ Software Over The Air (SOTA...
unknown
codeparrot/codeparrot-clean
#-*- coding:utf-8 -*- from rrd.store import graph_db_conn as db_conn class EndpointCounter(object): def __init__(self, id, endpoint_id, counter, step, type_): self.id = str(id) self.endpoint_id = str(endpoint_id) self.counter = counter self.step = step self.type_ = type_ ...
unknown
codeparrot/codeparrot-clean
import logging from ..primitive.manager import PrimitiveManager logger = logging.getLogger(__name__) class Robot(object): """ This class is used to regroup all motors and sensors of your robots. Most of the time, you do not want to directly instantiate this class, but you rather want to use a factory which ...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/clients/consumer/internals/FetchConfig.java
from fractions import Fraction if __name__ == "__main__": n = input() y = map(int, raw_input().split()) used = set() for i in xrange(1, n): if i in used: continue k = Fraction(y[i] - y[0], i) in_line = set() in_line.add(0) in_line.add(i) for...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Requirements # - pyvmomi >= 6.0.0.2016.4 # TODO: # * more jq examples # * optional folder heriarchy """ $ jq '._meta.hostvars[].config' data.json | head { "alternateguestname": "", "instanceuuid": "5035a5cd-b8e8-d717-e133-2d383eb0d675", "memoryhotaddenabled": false, "guestfullna...
unknown
codeparrot/codeparrot-clean
import re from livestreamer.plugin import Plugin from livestreamer.plugin.api import http, validate from livestreamer.stream import RTMPStream INFO_URL = "http://mvn.vaughnsoft.net/video/edge/{domain}_{channel}" DOMAIN_MAP = { "breakers": "btv", "vapers": "vtv", "vaughnlive": "live", } _url_re = re.comp...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2017 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.configuration.plugins; import static java.util.Arrays.asList; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.*; import static o...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockito/internal/configuration/plugins/PluginFinderTest.java
test_kind: js_test selector: roots: - jstests/core/**/*.js - jstests/fle2/**/*.js - src/mongo/db/modules/*/jstests/fle2/**/*.js exclude_files: # These tests are run in sharded_jscore_txns. - jstests/core/txns/**/*.js # The following tests fail because a certain command or functionality is n...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough_with_config_transitions_and_add_remove_shard.yml
from django.test import TestCase class AdminBasicTest(TestCase): def index_page(self, username='staff', password='123'): self.assertTrue(self.client.login(username=username, password=password)) return self.client.get('/admin/') def test_admin_loads(self): self.assertEqual(self.index_p...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='test untracked cache' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh # On some filesystems (e.g. FreeBSD's ext2 and ufs) directory mtime # is updated lazily after contents in the directory changes, which # forces the untracked cache ...
unknown
github
https://github.com/git/git
t/t7063-status-untracked-cache.sh
# -*- coding: utf-8 -*- __license__ = 'GPL v3' __copyright__ = '2009, John Schember <john at nachtimwald.com>' __docformat__ = 'restructuredtext en' ''' Device driver for Bookeen's Cybook Gen 3 ''' from calibre.devices.usbms.driver import USBMS class README(USBMS): name = 'Binatone Readme Device In...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 PressLabs SRL # # 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,...
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...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package pki import ( "strings" "github.com/hashicorp/vault/builtin/logical/pki/issuing" ) func (sc *storageContext) isDefaultKeySet() (bool, error) { config, err := sc.getKeysConfig() if err != nil { return false, err } return strings.T...
go
github
https://github.com/hashicorp/vault
builtin/logical/pki/config_util.go
[ { "pk": 1, "model": "auth.group", "fields": { "name": "my_group", "permissions": [] } }, { "pk": 1, "model": "auth.user", "fields": { "username": "my_username", "first_name": "", "last_name"...
json
github
https://github.com/django/django
tests/auth_tests/fixtures/natural.json
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et # # Usage: python retriever-multi.py <file with URLs to fetch> [<# of # concurrent connections>] # import sys import pycurl # We should ignore SIGPIPE when using pycurl.NOSIGNAL - see # the libcurl tutorial for more info. try: import signal ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2019 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/util/debug_events_writer.h
import os, sys, re SourceFilePath = sys.argv[1] TargetFilePath = sys.argv[2] print "source = " + SourceFilePath print "target = " + TargetFilePath # open the source file SourceLines = open(SourceFilePath, 'rU').readlines() # new content ComponentTitle = [] AsciidocLines = [] IndexLines = [] #if the first characte...
unknown
codeparrot/codeparrot-clean
<?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\Form; class CallbackTransformer implements DataTransf...
php
github
https://github.com/symfony/symfony
src/Symfony/Component/Form/CallbackTransformer.php
/* Copyright 2020 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/data/service/dataset_store.h
#!/usr/bin/env python3 # # This file is part of sarracenia. # The sarracenia suite is Free and is proudly provided by the Government of Canada # Copyright (C) Her Majesty The Queen in Right of Canada, Environment Canada, 2008-2015 # # Questions or bugs report: dps-client@ec.gc.ca # sarracenia repository: git://git.code...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-04-06 17:38 from __future__ import unicode_literals import cmput404_project.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import uuid class Migration(migrations...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package http import ( "encoding/json" "net/http" "reflect" "testing" "time" "github.com/hashicorp/vault/vault" ) func TestSysLeader_get(t *testing.T) { core, _, _ := vault.TestCoreUnsealed(t) ln, addr := TestServer(t, core) defer ln.Clo...
go
github
https://github.com/hashicorp/vault
http/sys_leader_test.go
import operator from django.template import Engine, Library from django.utils import six engine = Engine(app_dirs=True) register = Library() @register.inclusion_tag('inclusion.html') def inclusion_no_params(): """Expected inclusion_no_params __doc__""" return {"result": "inclusion_no_params - Expected result...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
unknown
codeparrot/codeparrot-clean
/* An implementation of the I/O abstract base classes hierarchy as defined by PEP 3116 - "New I/O" Classes defined here: IOBase, RawIOBase. Written by Amaury Forgeot d'Arc and Antoine Pitrou */ #include "Python.h" #include "pycore_call.h" // _PyObject_CallMethod() #include "pycore_fileutils....
c
github
https://github.com/python/cpython
Modules/_io/iobase.c
from __future__ import unicode_literals import six from . import strings # from jaraco.util.dictlib class KeyTransformingDict(dict): """ A dict subclass that transforms the keys before they're used. Subclasses may override the default key_transform to customize behavior. """ @staticmethod def...
unknown
codeparrot/codeparrot-clean
"use strict"; const identifierUtil = require("../lib/util/identifier"); describe("util/identifier", () => { describe("makePathsRelative", () => { describe("given a context and a pathConstruct", () => { it("computes the correct relative results for the path construct", () => { for (const [context, pathConstr...
javascript
github
https://github.com/webpack/webpack
test/identifier.unittest.js
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com> # License: http://pyasn1.sf.net/license.html # import logging from pyasn1.compat.octets import octs2ints from pyasn1 import error from pyasn1 import __version__ __all__ = ['Debug', 'setLogger', 'hexdump'] flagNone ...
unknown
codeparrot/codeparrot-clean
import numpy as nm from sfepy.linalg import dot_sequences from sfepy.terms.terms import Term, terms class PiezoCouplingTerm(Term): r""" Piezoelectric coupling term. Can be evaluated. :Definition: .. math:: \int_{\Omega} g_{kij}\ e_{ij}(\ul{v}) \nabla_k p \mbox{ , } \int_{\Omega} g_{k...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from collections import OrderedDict import keyword import re from optparse import make_option from django.core.management.base import NoArgsCommand, CommandError from django.db import connections, DEFAULT_DB_ALIAS class Command(NoArgsCommand): help = "Introspects the datab...
unknown
codeparrot/codeparrot-clean
import locale def fmt(value: int | float, decimals: int = 1) -> str: return locale.format_string(f'%.{decimals}f', value, grouping=True)
python
github
https://github.com/python/cpython
Lib/profiling/sampling/_format_utils.py
import sys, argparse, os sys.path.append('../') import settings if __name__=='__main__': parser = argparse.ArgumentParser() parser.add_argument('--T', action='store', default=1000, help='number of rounds') parser.add_argument('--dataset', action='store', choi...
unknown
codeparrot/codeparrot-clean