code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# Child query result is required but no value is available. Required child query (`contentChild.required` or `viewChild.required`) result was accessed before query results were calculated or query has no matches. This can happen in two distinct situations: - query results were accessed before a given query could col...
unknown
github
https://github.com/angular/angular
adev/src/content/reference/errors/NG0951.md
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
""" Unittests for exporting to git via management command. """ import copy import os import shutil import StringIO import subprocess import unittest from uuid import uuid4 from django.conf import settings from django.core.management import call_command from django.core.management.base import CommandError from django....
unknown
codeparrot/codeparrot-clean
# Constant lookup is cached. assert_equal '1', %q{ CONST = 1 def const CONST end const const } # Invalidate when a constant is set. assert_equal '2', %q{ CONST = 1 def const CONST end const CONST = 2 const } # Invalidate when a constant of the same name is set. assert_equal '1', %q...
ruby
github
https://github.com/ruby/ruby
bootstraptest/test_constant_cache.rb
"""TestCases for multi-threaded access to a DB. """ import os import sys import time import errno from random import random DASH = '-' try: WindowsError except NameError: class WindowsError(Exception): pass import unittest from test_all import db, dbutils, test_support, verbose, have_threads, \ ...
unknown
codeparrot/codeparrot-clean
# (c) 2012-2014, Ansible, Inc # (c) 2017 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 DOCUMENTATION = ''' callback: tree callback_type: notification requi...
unknown
codeparrot/codeparrot-clean
// Targets the Cortex-M23 processor (Baseline ARMv8-M) use crate::spec::{Abi, Arch, FloatAbi, Os, Target, TargetMetadata, TargetOptions, base, cvs}; pub(crate) fn target() -> Target { Target { llvm_target: "thumbv8m.base-none-eabi".into(), metadata: TargetMetadata { description: None, ...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/targets/thumbv8m_base_nuttx_eabi.rs
import interleaving as il import numpy as np from collections import defaultdict from .test_methods import TestMethods class TestProbabilisticInterleave(TestMethods): n = 5000 # Number of times of probabilistic tests def test_sanity(self): assert il.Probabilistic([[0], [0]]).interleave() == [0] ...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # run the ReplaySavedTrajectory.ttt file on Vrep before running this import numpy as np import glob import errno import matplotlib.pyplot as plt import rospy from sensor_msgs.msg import JointState from std_msgs.msg import Header from std_msgs.msg import Float64 class Trajectory: trajectory_...
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\DependencyInjection\Loader\Configurator; use Symfony\...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.php
/** * Fixture showing `@babel/generator` bug with jsx attribute strings containing * escape sequences. Note that this is only a problem when generating jsx * literals. * * When using the jsx transform to correctly lower jsx into * `React.createElement` calls, the escape sequences are preserved correctly * (see e...
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/jsx-preserve-escape-character.js
# Copyright 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 law or agreed to in writing, ...
unknown
codeparrot/codeparrot-clean
# ====================================================================== # matscipy - Python materials science tools # https://github.com/libAtoms/matscipy # # Copyright (2014) James Kermode, King's College London # Lars Pastewka, Karlsruhe Institute of Technology # # This program is free software: you...
unknown
codeparrot/codeparrot-clean
/* MIT License * * Copyright (c) 2016-2022 INRIA, CMU and Microsoft Corporation * Copyright (c) 2022-2023 HACL* Contributors * * 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 r...
c
github
https://github.com/python/cpython
Modules/_hacl/Hacl_HMAC.c
<!--Copyright 2025 The HuggingFace Team. 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 agreed...
unknown
github
https://github.com/huggingface/transformers
docs/source/en/model_doc/nanochat.md
#ifndef SRC_NODE_PROCESS_H_ #define SRC_NODE_PROCESS_H_ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include "node_debug.h" #include "node_snapshotable.h" #include "v8-fast-api-calls.h" #include "v8.h" namespace node { class Environment; class IsolateData; class MemoryTracker; class ExternalReferenceReg...
c
github
https://github.com/nodejs/node
src/node_process.h
import { assert_ok, test } from '../../assert'; export default test({ html: ` <div style="background-color: rgb(255, 0, 0);"></div> `, test({ assert, target, window, component }) { const div = target.querySelector('div'); assert_ok(div); const styles = window.getComputedStyle(div); assert.equal(styles.ba...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-browser/samples/inline-style-directive-update-with-spread/_config.js
# Color Editor originally by Neil Hodgson, but restructured by mh to integrate # even tighter into Pythonwin. import win32ui import win32con import win32api import sys import pywin.scintilla.keycodes from pywin.scintilla import bindings from pywin.framework.editor import GetEditorOption, SetEditorOption, GetEditorFon...
unknown
codeparrot/codeparrot-clean
import pyuaf import unittest from pyuaf.util.unittesting import parseArgs, testVector ARGS = parseArgs() def suite(args=None): if args is not None: global ARGS ARGS = args return unittest.TestLoader().loadTestsFromTestCase(DataValueTest) class DataValueTest(unittest.TestCase): def setUp...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import re import pycurl from ..internal.SimpleHoster import SimpleHoster class WrzucTo(SimpleHoster): __name__ = "WrzucTo" __type__ = "hoster" __version__ = "0.09" __status__ = "testing" __pattern__ = r'http://(?:www\.)?wrzuc\.to/(\w+(\.wt|\.html)|(\w+/?linki/\w+))' ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- #***************************************************************************** # Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu> # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #***...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) import numpy as np #from ..util.warping_functions import * from ..core import GP from .. import likelihoods from paramz import ObsAr #from GPy.util.warping_functions import TanhFunction from ..util.warping_...
unknown
codeparrot/codeparrot-clean
import calendar import datetime import logging import pickle import sqlite3 from requests import HTTPError import sys import time import get_todays_book import pushover_notifications logging.basicConfig(level=logging.INFO, filename='packetpub_grabber.log', format='%(asctime)s -...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2016 Intel Corporation. # # 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 la...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('third_party_auth', '0009_auto_20170415_1144'), ] operations = [ migrations.AddField( model_name='ltiproviderconfi...
unknown
codeparrot/codeparrot-clean
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
unknown
codeparrot/codeparrot-clean
from __future__ import (absolute_import, division, print_function) """ Classes for each reduction step. Those are kept separately from the the interface class so that the DgsReduction class could be used independently of the interface implementation """ import xml.dom.minidom from reduction_gui.reduction.s...
unknown
codeparrot/codeparrot-clean
#include <psych.h> #if !defined(RARRAY_CONST_PTR) #define RARRAY_CONST_PTR(s) (const VALUE *)RARRAY_PTR(s) #endif #if !defined(RARRAY_AREF) #define RARRAY_AREF(a, i) RARRAY_CONST_PTR(a)[i] #endif VALUE cPsychEmitter; static ID id_io; static ID id_write; static ID id_line_width; static ID id_indentation; static ID id_...
c
github
https://github.com/ruby/ruby
ext/psych/psych_emitter.c
"""EasyEngine core variable module""" import platform import socket import configparser import os import sys import psutil import datetime class EEVariables(): """Intialization of core variables""" # EasyEngine version ee_version = "3.0.5" # EasyEngine packages versions ee_wp_cli = "0.18.0" e...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import re def execute(): # NOTE: sequence is important renamed_fields = get_all_renamed_fields() for dt, script_field, ref_dt_field i...
unknown
codeparrot/codeparrot-clean
# Quiescent-State Based Reclamation (QSBR) ## Introduction When implementing lock-free data structures, a key challenge is determining when it is safe to free memory that has been logically removed from a structure. Freeing memory too early can lead to use-after-free bugs if another thread is still accessing it. Free...
unknown
github
https://github.com/python/cpython
InternalDocs/qsbr.md
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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 option) any later...
unknown
codeparrot/codeparrot-clean
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT use once_cell::sync::OnceCell; use regex::Regex; use std::{collections::BTreeSet, path::Path, process::Command}; use x509_certificate::certificate::X509Certificate; use crate::{...
rust
github
https://github.com/tauri-apps/tauri
crates/tauri-macos-sign/src/keychain/identity.rs
name: Go vulnerability management - bugs and feature requests description: Issues or feature requests about Go vulnerability management title: "x/vuln: issue title" labels: ["vulncheck or vulndb"] body: - type: markdown attributes: value: "Please answer these questions before submitting your issue. Thanks! ...
unknown
github
https://github.com/golang/go
.github/ISSUE_TEMPLATE/04-vuln.yml
import pytest from diofant import (E, I, O, Rational, Symbol, acosh, acoth, asinh, atanh, cos, cosh, cot, coth, csch, exp, log, nan, oo, pi, sec, sech, sin, sinh, sqrt, symbols, tan, tanh, zoo) from diofant.abc import x, y from diofant.core.function import ArgumentIndexError f...
unknown
codeparrot/codeparrot-clean
############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite of PySide2. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License Usage ## Licensees holding valid commercial ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'CourseTeam.is_active' db.delete_column('teams_courseteam...
unknown
codeparrot/codeparrot-clean
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Sergey Melyukov @smelukov */ "use strict"; const path = require("path"); const browserslist = require("browserslist"); /** @typedef {import("./target").ApiTargetProperties} ApiTargetProperties */ /** @typedef {import("./target").EcmaTargetPro...
javascript
github
https://github.com/webpack/webpack
lib/config/browserslistTargetHandler.js
from django import template register = template.Library() class AdminLogNode(template.Node): def __init__(self, limit, varname, user): self.limit = limit self.varname = varname self.user = user def __repr__(self): return "<GetAdminLog Node>" def render(self, context): ...
python
github
https://github.com/django/django
django/contrib/admin/templatetags/log.py
""" The :mod:`sklearn.model_selection._validation` module includes classes and functions to validate the model. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>, # Gael Varoquaux <gael.varoquaux@normalesup.org>, # Olivier Grisel <olivier.grisel@ensta.org> # License: BSD 3 clause from __f...
unknown
codeparrot/codeparrot-clean
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v2beta1", "metadata": { "name": "v0alpha1.heatmap-x.v42" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana", ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/panel-heatmap/v0alpha1.heatmap-x.v42.v2beta1.json
# # On Unix we run a server process which keeps track of unlinked # semaphores. The server ignores SIGINT and SIGTERM and reads from a # pipe. Every other process of the program has a copy of the writable # end of the pipe, so we get EOF when all other processes have exited. # Then the server process unlinks any remai...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import unittest from ct.crypto import error from ct.crypto.asn1 import x509_time class TimeTest(unittest.TestCase): def verify_time(self, time_struct, year, month, day, hour, minute, sec): self.assertEqual(year, time_struct.tm_year) self.assertEqual(month, time_struct.tm_mon...
unknown
codeparrot/codeparrot-clean
# pylint: disable=C0302,bare-except,print-statement """pylint option block-disable""" __revision__ = None class Foo(object): """block-disable test""" def __init__(self): pass def meth1(self, arg): """this issues a message""" print self def meth2(self, arg): """and thi...
unknown
codeparrot/codeparrot-clean
"""Tests for Tradfri setup.""" from unittest.mock import patch from homeassistant.components import tradfri from homeassistant.helpers import device_registry as dr from homeassistant.setup import async_setup_component from tests.common import MockConfigEntry async def test_config_yaml_host_not_imported(hass): ""...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ Do windowed detection by classifying a number of images/crops at once, optionally using the selective search window proposal method. This implementation follows ideas in Ross Girshick, Jeff Donahue, Trevor Darrell, Jitendra Malik. Rich feature hierarchies for accurate object detection...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ''' CellCognition Explorer - deep learning command-line extension ''' import os import sys import cellh5 import h5py import numpy from numpy.lib.recfunctions import merge_arrays import pandas import logging logger = logging.getLogger(__name__) from autoencoders import Autoencoder, AdaGradTrain...
unknown
codeparrot/codeparrot-clean
# Copyright 2010-2011 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Test NascentUpload functionality.""" __metaclass__ = type from testtools import TestCase from testtools.matchers import MatchesStructure from lp.archiveuploader.changesf...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Rackspace, 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 or agreed to in writin...
unknown
codeparrot/codeparrot-clean
"""Test pipeline functionality.""" import re import pytest from langchain_core.callbacks.manager import ( AsyncCallbackManagerForChainRun, CallbackManagerForChainRun, ) from typing_extensions import override from langchain_classic.chains.base import Chain from langchain_classic.chains.sequential import Seque...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/tests/unit_tests/chains/test_sequential.py
""" Module rendering """ import hashlib import json import logging from collections import OrderedDict from functools import partial import dogstats_wrapper as dog_stats_api import newrelic.agent from capa.xqueue_interface import XQueueInterface from django.conf import settings from django.contrib.auth.models import ...
unknown
codeparrot/codeparrot-clean
# (c) 2014 Michael DeHaan, <michael@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ve...
unknown
codeparrot/codeparrot-clean
""" Bookmarks Python API. """ from eventtracking import tracker from . import DEFAULT_FIELDS, OPTIONAL_FIELDS from xmodule.modulestore.django import modulestore from django.conf import settings from xmodule.modulestore.exceptions import ItemNotFoundError from .models import Bookmark from .serializers import BookmarkSer...
unknown
codeparrot/codeparrot-clean
# vim:ts=4:et # ##### BEGIN GPL LICENSE BLOCK ##### # # 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 License, or (at your option) any later version. # # This prog...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import random from .context import tripp from tripp import hypothesis import logging logging.basicConfig(level=logging.INFO, format="%(lineno)d\t%(message)s") class TestHypothesis(unittest.TestCase): def test_normal_approximation_to_binomial(self): ...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # ---------------------------------------------------------------------- # 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...
unknown
codeparrot/codeparrot-clean
import { Html, Head, Main, NextScript } from "next/document"; export default function Document() { const meta = { title: "Next.js Blog Starter Kit", description: "Clone and deploy your own Next.js portfolio in minutes.", image: "https://assets.vercel.com/image/upload/q_auto/front/vercel/dps.png", }; ...
typescript
github
https://github.com/vercel/next.js
examples/blog/pages/_document.tsx
# -*- coding: utf-8 -*- import pytest from django.core.exceptions import ImproperlyConfigured from algolia import AlgoliaIndexer @pytest.fixture() def configs_success(): return { 'API_KEY': 'some-api-key', 'API_SECRET': 'some-api-secret', } @pytest.fixture() def configs_wrong(): return {...
unknown
codeparrot/codeparrot-clean
// Copyright 2020 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package cli import ( "context" "os" "path/filepath" "reflect" "regexp" "strings" "testing" "github.com/cockroachdb/cockroach/pkg/testutils/datapathutils" "git...
go
github
https://github.com/cockroachdb/cockroach
pkg/cli/log_flags_test.go
/* * 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
configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/immutable/ImmutablePrimitiveProperties.java
use std::fmt; use std::ops::Deref; use rustc_data_structures::intern::Interned; use rustc_macros::HashStable_Generic; use crate::{ AbiAlign, Align, BackendRepr, FieldsShape, Float, HasDataLayout, LayoutData, Niche, PointeeInfo, Primitive, Size, Variants, }; // Explicitly import `Float` to avoid ambiguity wit...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_abi/src/layout/ty.rs
<?php namespace Illuminate\Process; use Illuminate\Contracts\Process\InvokedProcess as InvokedProcessContract; use Illuminate\Process\Exceptions\ProcessTimedOutException; use Symfony\Component\Process\Exception\ProcessTimedOutException as SymfonyTimeoutException; use Symfony\Component\Process\Process; class InvokedP...
php
github
https://github.com/laravel/framework
src/Illuminate/Process/InvokedProcess.php
#include <gtest/gtest.h> #include <c10/core/DeviceGuard.h> #include <c10/util/irange.h> #include <c10/xpu/XPUException.h> #include <c10/xpu/XPUStream.h> #include <c10/xpu/test/impl/XPUTest.h> #include <optional> #include <thread> #include <unordered_set> static bool has_xpu() { return c10::xpu::device_count() > 0...
cpp
github
https://github.com/pytorch/pytorch
c10/xpu/test/impl/XPUStreamTest.cpp
# orm/util.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from .. import sql, util, event, exc as sa_exc, inspection from ..sql import expression,...
unknown
codeparrot/codeparrot-clean
/********************************************************************** struct.c - $Author$ created at: Tue Mar 22 18:44:30 JST 1995 Copyright (C) 1993-2007 Yukihiro Matsumoto **********************************************************************/ #include "id.h" #include "internal.h" #include "internal/cl...
c
github
https://github.com/ruby/ruby
struct.c
#!/usr/bin/python # This script generates a list of testsuites that should be run as part of # the Samba 4 test suite. # The output of this script is parsed by selftest.pl, which then decides # which of the tests to actually run. It will, for example, skip all tests # listed in selftest/skip or only run a subset durin...
unknown
codeparrot/codeparrot-clean
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
unknown
codeparrot/codeparrot-clean
import sys import socket, traceback import json import time import ssl import struct if len(sys.argv) < 2: print("Usage: roombaCmd.py <ip>") exit() addr = sys.argv[1] exec(open('discover.py').read(), globals()) #execfile('discover.py', addr) #packet = 'f005efcc3b2900'.decode("hex") #this is 0xf0 (mqtt reserved)...
unknown
codeparrot/codeparrot-clean
{% load custom %} {% context_stack_length %}
html
github
https://github.com/django/django
tests/template_tests/templates/test_context_stack.html
/* Copyright 2017 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/preemption/preemption_test.go
#include "Python.h" /* snprintf() and vsnprintf() wrappers. If the platform has vsnprintf, we use it, else we emulate it in a half-hearted way. Even if the platform has it, we wrap it because platforms differ in what vsnprintf does in case the buffer is too small: C99 behavior is to return the number of...
c
github
https://github.com/python/cpython
Python/mysnprintf.c
''' Created on 27 Feb 2015 @author: michaelwhelehan ''' from django import forms from django.forms.fields import FileField from django.contrib.auth.forms import AdminPasswordChangeForm from unoconsole.widgets import AdminSplitDateTime class UnoconsoleModelForm(forms.ModelForm): class Meta: exclude = ['s...
unknown
codeparrot/codeparrot-clean
import logging import os import subprocess import urlparse from lava_dispatcher.downloader import download_image from lava_dispatcher.signals import SignalHandler class ArmProbe(SignalHandler): def __init__(self, testdef_obj, post_process_script, probe_args=None): SignalHandler.__init__(self, testdef_obj...
unknown
codeparrot/codeparrot-clean
import { increment as inc, value } from "./counter"; import { resetCounter, print } from "./methods"; print(value); inc(); inc(); inc(); print(value); resetCounter(); print(value); export { inc, print };
javascript
github
https://github.com/webpack/webpack
examples/module/example.js
import numpy as np import pytest from sklearn.datasets import make_classification, make_regression from sklearn.ensemble import ( HistGradientBoostingClassifier, HistGradientBoostingRegressor, ) from sklearn.ensemble._hist_gradient_boosting.binning import _BinMapper from sklearn.ensemble._hist_gradient_boostin...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/ensemble/_hist_gradient_boosting/tests/test_compare_lightgbm.py
"""Tools for use in AppleEvent clients and servers: conversion between AE types and python types pack(x) converts a Python object to an AEDesc object unpack(desc) does the reverse coerce(x, wanted_sample) coerces a python object to another python object """ # # This code was originally written by Guido, and modified/...
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
framework-docs/src/main/java/org/springframework/docs/testing/mockmvc/assertj/mockmvctesterrequestsasync/AsyncControllerTests.java
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package redshift import ( "context" "database/sql" "fmt" "os" "reflect" "regexp" "testing" "time" "github.com/hashicorp/go-uuid" dbplugin "github.com/hashicorp/vault/sdk/database/dbplugin/v5" dbtesting "github.com/hashicorp/vault/sdk/d...
go
github
https://github.com/hashicorp/vault
plugins/database/redshift/redshift_test.go
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package consts const ( ServiceTokenPrefix = "hvs." BatchTokenPrefix = "hvb." RecoveryTokenPrefix = "hvr." LegacyServiceTokenPrefix = "s." LegacyBatchTokenPrefix = "b." LegacyRecoveryTokenPrefix = "r." )
go
github
https://github.com/hashicorp/vault
sdk/helper/consts/token_consts.go
#!/usr/bin/env python3 # Copyright (C) 2016 Theobroma Systems Design & Consulting GmbH # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. # Author: Martin Elshuber <martin.elshuber@theobroma-systems....
unknown
codeparrot/codeparrot-clean
# Copyright 2010 VPAC # # This file is part of django-placard. # # django-placard 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. # # d...
unknown
codeparrot/codeparrot-clean
import dilap.core.base as db import dilap.core.model as dmo import dilap.core.tools as dpr import dilap.core.vector as dpv import dilap.core.quaternion as dpq import dilap.primitive.cube as dcu from mpl_toolkits.mplot3d import Axes3D import pdb,numpy,random class lane(db.base): def __init__(self,*args,**kwargs)...
unknown
codeparrot/codeparrot-clean
# Regex test suite and benchmark suite v1.5a2 # Due to the use of r"aw" strings, this file will # only work with Python 1.5 or higher. # The 3 possible outcomes for each pattern [SUCCEED, FAIL, SYNTAX_ERROR] = range(3) # Benchmark suite (needs expansion) # # The benchmark suite does not test correctness, just speed. ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2017 - 2025 R. Thomas * Copyright 2017 - 2025 Quarkslab * * 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 req...
unknown
github
https://github.com/nodejs/node
deps/LIEF/src/ELF/SizingInfo.hpp
#!/usr/bin/env python # Used jpeople.py. To recrawl run: python get_users <college_name> # It will make a file named <college_name>.json with all people from that college # CONFIG # There should be no need to change this. # Where is jPeople? jpeople_server_name = "jpeople.user.jacobs-university.de" jpeople_server_p...
unknown
codeparrot/codeparrot-clean
//===--- Config.h - User configuration of clangd behavior --------*- 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
clang-tools-extra/clangd/Config.h
""" Abstract base classes define the primitives that renderers and graphics contexts must implement to serve as a matplotlib backend :class:`RendererBase` An abstract base class to handle drawing/rendering operations. :class:`FigureCanvasBase` The abstraction layer that separates the :class:`matplotlib.fi...
unknown
codeparrot/codeparrot-clean
import argparse from buildscripts.resmokelib.hang_analyzer.hang_analyzer import HangAnalyzer from buildscripts.resmokelib.plugin import PluginInterface class HangAnalyzerPlugin(PluginInterface): """Integration-point for hang-analyzer.""" def parse( self, subcommand: str, parser: argpa...
python
github
https://github.com/mongodb/mongo
buildscripts/resmokelib/hang_analyzer/plugin.py
import tweepy import web from web.contrib.template import render_mako from web import form web.config.debug=False consumer_key = 'acisTloOHSws1UA289etVw' consumer_secret = 'b9eVS9CeFxIFx3jIwKkeeQPfsO3hlrAdWNOfIItQEgU' access_token = '2308079432-cDmExMexRNNwAEvIUdrtKQFXgfIA1vQPeM4mLRC' access_token_secret = 'eUFjHJf3W...
unknown
codeparrot/codeparrot-clean
""" URLResolver Addon for Kodi Copyright (C) 2016 t0mm0, tknorris This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any late...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2014 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
unknown
codeparrot/codeparrot-clean
import unittest from cell import Cell from entity import Entity from hero import Hero from monster import Monster class testCell(unittest.TestCase): def test_coords(self): cell = Cell() self.assertEqual(cell.coords, (0, 0)) cell.coords = (12, 41) self.assertEqual(cell.coords, (12,...
unknown
codeparrot/codeparrot-clean
from unittest import SkipTest from django.core.urlresolvers import reverse from django.test import TestCase from django.contrib.auth.models import User, Group from symposion.proposals.models import ProposalBase from symposion.reviews.models import Review, ReviewAssignment class login(object): def __init__(self, ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import logging import re from flexget import plugin from flexget.event import event from flexget.plugins.internal.urlrewriting import UrlRewritingError from flexget.utils ...
unknown
codeparrot/codeparrot-clean
#include "test/jemalloc_test.h" static void test_zero(size_t sz_min, size_t sz_max) { uint8_t *s; size_t sz_prev, sz, i; #define MAGIC ((uint8_t)0x61) sz_prev = 0; s = (uint8_t *)mallocx(sz_min, 0); expect_ptr_not_null((void *)s, "Unexpected mallocx() failure"); for (sz = sallocx(s, 0); sz <= sz_max; sz_p...
c
github
https://github.com/redis/redis
deps/jemalloc/test/unit/zero.c
from conpaas.core.clouds import dummy, ec2, opennebula import pytest from ConfigParser import ConfigParser from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver from libcloud.compute.drivers.ec2 import EC2NodeDriver from libcloud.compute.drivers.opennebula import OpenNebulaNodeDr...
unknown
codeparrot/codeparrot-clean
# This file is part of Invenio. # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 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 o...
unknown
codeparrot/codeparrot-clean
import os import re import requests import yaml DOCS_PATH = os.environ.get("CALICO_DOCS_PATH") or "/docs" RELEASE_STREAM = os.environ.get("RELEASE_STREAM") PPA_VER = RELEASE_STREAM.replace("v", "calico-") with open("%s/_data/versions.yml" % DOCS_PATH) as f: versions = yaml.safe_load(f) NETWORKING_VER = versi...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # 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, software ...
unknown
codeparrot/codeparrot-clean