code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-beans/src/main/java/org/springframework/beans/PropertyAccessException.java
/* * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.engine import io.ktor.utils.io.* import kotlinx.coroutines.* /** * Base configuration for [HttpClientEngine]. * * [Report a problem](https://ktor.io/feedback/?fqname=...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-core/common/src/io/ktor/client/engine/HttpClientEngineConfig.kt
"""model.py The datamodel, which represents Person that has multiple Address objects, each with PostalCode, City, Country. Person --(1..n)--> Address Address --(has a)--> PostalCode PostalCode --(has a)--> City City --(has a)--> Country """ from sqlalchemy import Column, Integer, String, ForeignKey from sqlalchemy.o...
unknown
codeparrot/codeparrot-clean
"""Base class to manage the interaction with a running kernel""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import absolute_import from jupyter_client.channels import major_protocol_version from ipython_genutils.py3compat import string_types, i...
unknown
codeparrot/codeparrot-clean
use crate::spec::base::apple::{Arch, TargetEnv, base}; use crate::spec::{Os, SanitizerSet, Target, TargetMetadata, TargetOptions}; pub(crate) fn target() -> Target { let (opts, llvm_target, arch) = base(Os::IOs, Arch::Arm64, TargetEnv::MacCatalyst); Target { llvm_target, metadata: TargetMetadat...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/targets/aarch64_apple_ios_macabi.rs
#!/usr/bin/python # (c) 2012, Stephen Fromm <sfromm@gmail.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 optio...
unknown
codeparrot/codeparrot-clean
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableRollingAverages.java
/* Copyright 2019 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/controller/replication/config/v1alpha1/doc.go
from __future__ import print_function # # 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...
unknown
codeparrot/codeparrot-clean
import copyreg import io import pickle import re import warnings from unittest.mock import Mock import joblib import numpy as np import pytest from joblib.numpy_pickle import NumpyPickler from numpy.testing import assert_allclose, assert_array_equal import sklearn.ensemble._hist_gradient_boosting.gradient_boosting as...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
# Copyright (C) 2016 A10 Networks Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
unknown
codeparrot/codeparrot-clean
import re def extract_features(node): features = [] features.append("text:" + node.text.lower()) features.append("tag:" + node.label) if node.previousLeaf: features.append("text_p:" + node.previousLeaf.text.lower()) features.append("text_cp:" + node.text.lower() + "_" + node.previousLeaf...
unknown
codeparrot/codeparrot-clean
from ImageScripter import * from elan import * ScriptSettings.Threshold = .96 #Messaging################################################# Say("Checking the messaging page") Configurator.messaging.Click() #Configurator.messagingpage.SetThreshold(.98) Configurator.messagingpage.Wait(seconds=10) Say("Checking the messagi...
unknown
codeparrot/codeparrot-clean
# This file is part of the Trezor project. # # Copyright (C) 2012-2018 SatoshiLabs and contributors # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # as published by the Free Software Foundation. # # This library is distrib...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package stackeval import ( "context" "fmt" "github.com/hashicorp/hcl/v2" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/promising" "github.com/hashicorp/terraform/internal/stacks/stackaddrs" "github.com/hashicorp/...
go
github
https://github.com/hashicorp/terraform
internal/stacks/stackruntime/internal/stackeval/main_inspect.go
# Adrian deWynter, 2016 ''' Adrian deWynter (2016) Notebook corresponding to an Apache Spark class I once took. This one pertains to analysis of texts, more specifically word count. ''' ##### # Remember, databricks has a built-in function (display) that isn't available elsewhere. # This code isn't meant to run anywher...
unknown
codeparrot/codeparrot-clean
# # This file is part of Plinth. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python2.4 # -*- encoding: utf-8 -*- # GLADE_VCP # Copyright 2010 Chris Morley # # 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 # ...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python import string import sys import re import fasta from operator import itemgetter # from heapq import nlargest # a library for parsing the cd-hit output import cdhit_parse from optparse import OptionParser # This script takes CD-HIT output and creates four output files # *.fasta_clusters is a f...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #ifndef _NGX_EVENT_TIMER_H_INCLUDED_ #define _NGX_EVENT_TIMER_H_INCLUDED_ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h> #define NGX_TIMER_INFINITE (ngx_msec_t) -1 #define NGX_TIMER_LAZY_DELAY 300 ngx_int_t ngx_event_timer_ini...
c
github
https://github.com/nginx/nginx
src/event/ngx_event_timer.h
# -*- coding: utf-8 -*- """ Created on Fri Oct 18 11:50:02 2017 @author: sebastian """ ## retrieve second set of auxiliary ECMWF forecast data, ## to augment temperature forecasts and previously downloaded auxiliary data ## based on example from ## https://software.ecmwf.int/wiki/display/WEBAPI/TIGGE+retrieval+effic...
unknown
codeparrot/codeparrot-clean
"""The WaveBlocks Project Compute the action of the position operator applied to a Hagedorn wavepacket. @author: R. Bourquin @copyright: Copyright (C) 2016 R. Bourquin @license: Modified BSD License """ from numpy import zeros, complexfloating, conjugate, squeeze from scipy import sqrt from WaveBlocksND.WavepacketP...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 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. //go:build 386 || amd64 || arm64 || loong64 || ppc64 || ppc64le || riscv64 || s390x || wasm package math const haveArchFloor = true func archFloor(x float64)...
go
github
https://github.com/golang/go
src/math/floor_asm.go
__all__ = ["runsimple"] import sys, os from SimpleHTTPServer import SimpleHTTPRequestHandler import urllib import posixpath import webapi as web import net import utils def runbasic(func, server_address=("0.0.0.0", 8080)): """ Runs a simple HTTP server hosting WSGI app `func`. The directory `static/` is ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from collections import OrderedDict import pytest from pandas.util._validators import validate_bool_kwarg, validate_kwargs _fname = "func" def test_bad_kwarg(): good_arg = "f" bad_arg = good_arg + "o" compat_args = OrderedDict() compat_args[good_arg] = "foo" compat_args[...
unknown
codeparrot/codeparrot-clean
# -*- 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
# -*- coding: utf-8 -*- """Dask workflow for generating model data for the SIP example ICAL workflow. This is code based on the test ICAL pipeline notebook from ARL. """ import logging import pickle import os import sys import json import numpy from astropy import units as u from astropy.coordinates import SkyCoord ...
unknown
codeparrot/codeparrot-clean
# Authors: Tomas Babej <tbabej@redhat.com> # # Copyright (C) 2013 Red Hat # see file 'COPYING' for use and warranty information # # 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 ...
unknown
codeparrot/codeparrot-clean
// Copyright 2012 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. //go:build linux package syscall_test import ( "bytes" "net" "os" "syscall" "testing" ) // TestSCMCredentials tests the sending and receiving of credent...
go
github
https://github.com/golang/go
src/syscall/creds_test.go
import sys import numpy as np from lxmls.parsing.dependency_reader import * from lxmls.parsing.dependency_writer import * from lxmls.parsing.dependency_features import * from lxmls.parsing.dependency_decoder import * from lxmls.util.my_math_utils import * class DependencyParser(): ''' Dependency parser class ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Authors: Denis A. Engemann <denis.engemann@gmail.com> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Juergen Dammers <j.dammers@fz-juelich.de> # # License: BSD (3-clause) from inspect import isfunction from collections import namedtuple from copy import deepcopy from...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2014-2020) # # This file is part of GWpy. # # GWpy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
unknown
codeparrot/codeparrot-clean
# Copyright 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
# -*- coding: utf-8 -*- # # 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 #...
unknown
codeparrot/codeparrot-clean
{% block content %}base{% endblock %}
html
github
https://github.com/django/django
tests/template_tests/templates/inclusion_base.html
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import request, abort, render_template, session, redirect, url_for import json import md5 from wrc import app from functions import getDeviceById, getState, requires_auth from devices import setDeviceState @app.route("/") @requires_auth def index(): """Ind...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 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
client/v3/naming/endpoints/endpoints.go
# -*- coding: utf-8 -*- # To-do list # # optimize validateCard and setIssuerImg - less cycles # automatically add spaces at the end of each 4-digit group. modify validator accordingly # # possibly in future - remove validateBtn and make resultLabel update on text update in ccText from PyQt5 import QtCore, QtGui, QtWi...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: GPL-2.0-only %YAML 1.2 --- $id: http://devicetree.org/schemas/mmc/sdhci-pxa.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Marvell PXA SDHCI v1/v2/v3 maintainers: - Ulf Hansson <ulf.hansson@linaro.org> allOf: - $ref: mmc-controller.yaml# - if: properties: ...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/mmc/sdhci-pxa.yaml
# -*- coding: utf-8 -*- # # Copyright (C) 2020 The SymbiFlow Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC class AssertStateVariable(): """ Abstract asserted state variabl...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2010 Pedro Matiello <pmatiello@gmail.com> from mockito import any, mock, verify, when from handlers.entity import entity_handler, entities_handler from models.entity import entity class entities_handler_spec(): def setup(self): self.handler = object.__new__(entities_handler) self....
unknown
codeparrot/codeparrot-clean
"""Utilities using NDG HTTPS Client, including a main module that can be used to fetch from a URL. """ __author__ = "R B Wilkinson" __date__ = "09/12/11" __copyright__ = "(C) 2011 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Kershaw@stfc....
unknown
codeparrot/codeparrot-clean
--- navigation_title: "Terms" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html --- # Terms query [query-dsl-terms-query] Returns documents that contain one or more **exact** terms in a provided field. The `terms` query is the same as the [`term` query](/ref...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/query-dsl/query-dsl-terms-query.md
// Copyright 2023 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. // Simple not-in-heap bump-pointer traceRegion allocator. package runtime import ( "internal/runtime/atomic" "internal/runtime/sys" "unsafe" ) // traceReg...
go
github
https://github.com/golang/go
src/runtime/traceregion.go
"""Various tools used by MIME-reading or MIME-writing programs.""" import os import rfc822 import tempfile __all__ = ["Message","choose_boundary","encode","decode","copyliteral", "copybinary"] class Message(rfc822.Message): """A derived class of rfc822.Message that knows about MIME headers and con...
unknown
codeparrot/codeparrot-clean
""" Django settings for test_mode project. Generated by 'django-admin startproject' using Django 1.10.1. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import ...
unknown
codeparrot/codeparrot-clean
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.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 lat...
unknown
codeparrot/codeparrot-clean
# Volatility # # Authors: # Mike Auty <mike.auty@gmail.com> # # This file is part of Volatility. # # Volatility 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 op...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (division, print_function, absolute_import, unicode_literals) import pyfits import numpy as np import matplotlib.pyplot as pl import fsps # Measurements of cluster parameters. tage = 10. ** (8.04 - 9) logmass = 4.09 dist_mod ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- """Script to generate libyal m4 files.""" from __future__ import print_function from __future__ import unicode_literals import argparse import logging import os import sys from yaldevtools import configuration from yaldevtools import output_writers from yaldevtools.source_ge...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2014 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. """Unit tests for Copyright Scanner utilities.""" import os import re import sys import unittest test_dir = os.path.dirname(os.path.a...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ pygments.lexers.r ~~~~~~~~~~~~~~~~~ Lexers for the R/S languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, include, words, do_insertions from ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context/src/test/java/org/springframework/jmx/AbstractMBeanServerTests.java
from __future__ import division import numpy as np from rl.util import * class Policy(object): """Abstract base class for all implemented policies. Each policy helps with selection of action to take on an environment. Do not use this abstract base class directly but instead use one of the concrete polic...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
unknown
codeparrot/codeparrot-clean
// Copyright 2016 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
server/proxy/grpcproxy/adapter/kv_client_adapter.go
#pyCGM import sys import multiprocessing import os from math import * import math import numpy as np from pycgmIO import * # Lowerbody Coordinate System def pelvisJointCenter(frame): """ Make the Pelvis Axis function Takes in a dictionary of x,y,z positions and marker names, as well as an index Calcul...
unknown
codeparrot/codeparrot-clean
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc. # # 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...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/nxp,lpc1850-cgu.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: NXP LPC1850 Clock Generation Unit (CGU) description: > The CGU generates multiple independent clocks for the core and t...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/nxp,lpc1850-cgu.yaml
#!/usr/bin/env python # encoding: utf-8 ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2009 Prof. William H. Green (whgreen@mit.edu) and the # RMG Team (rmg_dev@mit.edu) # # Permission is hereby granted, free of cha...
unknown
codeparrot/codeparrot-clean
# Copyright 2015, Thales Services SAS # 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 requ...
unknown
codeparrot/codeparrot-clean
pr: 140069 summary: "Aggs: Fix class cast exceptions in pipeline aggs" area: Aggregations type: bug issues: - 137624 - 136173
unknown
github
https://github.com/elastic/elasticsearch
docs/changelog/140069.yaml
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-beans/src/main/java/org/springframework/beans/factory/support/GenericTypeAwareAutowireCandidateResolver.java
import threading from urllib import quote, getproxies from urlparse import urlparse import os.path import time import traceback from couchpotato.core.event import fireEvent, addEvent from couchpotato.core.helpers.encoding import ss, toSafeString, \ toUnicode, sp from couchpotato.core.helpers.variable import md5, i...
unknown
codeparrot/codeparrot-clean
""" Form generation utilities for App Engine's new ``ndb.Model`` class. The goal of ``model_form()`` is to provide a clean, explicit and predictable way to create forms based on ``ndb.Model`` classes. No malabarism or black magic should be necessary to generate a form for models, and to add custom non-model related fi...
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-gradle-plugin/src/test/java/org/springframework/boot/gradle/docs/Examples.java
# Copyright 2014 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. import os import traceback from telemetry import page as page_module from telemetry.page import page_set from telemetry.results import base_test_results_uni...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2017, René Moser <mail@renemoser.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
unknown
codeparrot/codeparrot-clean
# Python test set -- math module # XXXX Should not do tests around zero only from test.test_support import run_unittest, verbose import unittest import math import os import sys import random eps = 1E-05 NAN = float('nan') INF = float('inf') NINF = float('-inf') # locate file with test values if __name__ == '__main_...
unknown
codeparrot/codeparrot-clean
import unittest from pizco.protocol import Protocol class TestProtocol(unittest.TestCase): def test_protocol(self): prot = Protocol() self.assertRaises(ValueError, prot.parse, []) msg = prot.format('friend', 'bla', 'here goes the content') sender, topic, content, msgid = prot.par...
unknown
codeparrot/codeparrot-clean
#ifndef REFS_H #define REFS_H #include "commit.h" #include "repository.h" #include "repo-settings.h" struct fsck_options; struct object_id; struct ref_store; struct strbuf; struct string_list; struct string_list_item; struct worktree; enum ref_storage_format ref_storage_format_by_name(const char *name); const char *...
c
github
https://github.com/git/git
refs.h
# # Module providing the `Process` class which emulates `threading.Thread` # # multiprocessing/process.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: #...
unknown
codeparrot/codeparrot-clean
<?php declare(strict_types=1); /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ require __DIR__ . '/../ven...
php
github
https://github.com/composer/composer
tests/console-application.php
'use strict'; const common = require('../common.js'); const querystring = require('querystring'); const searchParams = common.searchParams; const bench = common.createBenchmark(main, { searchParam: Object.keys(searchParams), method: ['legacy', 'whatwg'], n: [1e6], }); function useLegacy(n, input, prop) { cons...
javascript
github
https://github.com/nodejs/node
benchmark/url/legacy-vs-whatwg-url-searchparams-serialize.js
from __future__ import annotations from datetime import ( datetime, timedelta, tzinfo, ) from typing import ( TYPE_CHECKING, Self, TypeVar, cast, overload, ) import warnings import numpy as np from pandas._config import using_string_dtype from pandas._config.config import get_option ...
python
github
https://github.com/pandas-dev/pandas
pandas/core/arrays/datetimes.py
import sys #compatibility try: input = raw_input except NameError: pass class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' colors = { 'GREEN': bcolors.OKGREEN, ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
unknown
codeparrot/codeparrot-clean
# -*- test-case-name: twisted.test.test_tcp -*- # Copyright (c) 2001-2009 Twisted Matrix Laboratories. # See LICENSE for details. """ Various asynchronous TCP/IP classes. End users shouldn't use this module directly - use the reactor APIs instead. Maintainer: Itamar Shtull-Trauring """ # System Imports import os im...
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/auth/managers/simple/test_simple_auth_manager.py
// Copyright 2025 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package base_test import ( "testing" "github.com/cockroachdb/cockroach/pkg/base" "github.com/cockroachdb/cockroach/pkg/testutils" "github.com/cockroachdb/cockroach...
go
github
https://github.com/cockroachdb/cockroach
pkg/base/join_list_test.go
from nose.tools import assert_equal, assert_true, assert_false, assert_raises import networkx as nx from networkx.algorithms.connectivity import (minimum_st_edge_cut, minimum_st_node_cut) from networkx.algorithms.flow import (edmonds_karp, preflow_push, ...
unknown
codeparrot/codeparrot-clean
import maskgen from maskgen_coco import createMaskImageWithParams import sys from maskgen.image_wrap import ImageWrapper """ Selects a Mask from Coco presegmented images """ def transform(img, source, target, **kwargs): areaConstraints = (int(kwargs['area.lower.bound']) if 'area.lower.bound' in kwargs else 0, ...
unknown
codeparrot/codeparrot-clean
"""Admin module""" import os import math from datetime import datetime import copy import discord from discord.ext import commands from modules.utils import checks from modules.utils import utils def is_owner_or_moderator(ctx): """Returns true if the author is the bot's owner or a moderator on the server""" re...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, 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.0', ...
unknown
codeparrot/codeparrot-clean
""" This module implements the Residue function and related tools for working with residues. """ from __future__ import print_function, division from sympy import sympify from sympy.utilities.timeutils import timethis @timethis('residue') def residue(expr, x, x0): """ Finds the residue of ``expr`` at the poi...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import oscar.models.fields.autoslugfield import django.db.models.deletion import oscar.models.fields from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('partner'...
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
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/Parallel.h> #include <ATen/TensorMeta.h> #include <ATen/native/TriangularOpsUtils.h> #include <ATen/TensorSubclassLikeUtils.h> #include <c10/util/irange.h> #include <c10/util/Exception.h> #ifndef AT_PER_O...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/TriangularOps.cpp
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Varun Chopra (@chopraaa) <v@chopraaa.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } DOCU...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/clients/admin/ElectLeadersResult.java
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional from ..._models import BaseModel from .audio_transcription import AudioTranscription from .noise_reduction_type import NoiseReductionType from .realtime_audio_formats import RealtimeAudioFormats from .rea...
python
github
https://github.com/openai/openai-python
src/openai/types/realtime/realtime_audio_config_input.py
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2048: Alignak contrib team, see AUTHORS.txt file for contributors # # This file is part of Alignak contrib projet. # # Alignak is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free S...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2014, Red Hat, 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...
unknown
codeparrot/codeparrot-clean
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import warnings from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.views import shortcut from django.contrib.sites.shortcuts import get_current_site from django.db.utils import IntegrityError, OperationalError, ProgrammingError from djan...
unknown
codeparrot/codeparrot-clean
"""Helper methods for CORS and CSRF checks. """ import contextlib import logging import urlparse from django.conf import settings log = logging.getLogger(__name__) def is_cross_domain_request_allowed(request): """Check whether we should allow the cross-domain request. We allow a cross-domain request only if...
unknown
codeparrot/codeparrot-clean
"""Constants for the homematic component.""" DOMAIN = "homematic" DISCOVER_SWITCHES = "homematic.switch" DISCOVER_LIGHTS = "homematic.light" DISCOVER_SENSORS = "homematic.sensor" DISCOVER_BINARY_SENSORS = "homematic.binary_sensor" DISCOVER_COVER = "homematic.cover" DISCOVER_CLIMATE = "homematic.climate" DISCOVER_LOCK...
unknown
codeparrot/codeparrot-clean
// WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values. // If changing the text in this section, be sure to test `configurePrerelease` too. export const versionMajorMinor = "6.0"; // The following is baselined as a literal template type without intervention /** The version of the TypeSc...
typescript
github
https://github.com/microsoft/TypeScript
src/compiler/corePublic.ts
import datetime import decimal from time import time from django.utils.hashcompat import md5_constructor from django.utils.log import getLogger logger = getLogger('django.db.backends') class CursorDebugWrapper(object): def __init__(self, cursor, db): self.cursor = cursor self.db = db # Instance o...
unknown
codeparrot/codeparrot-clean
"""MNE software for MEG and EEG data analysis.""" # PEP0440 compatible formatted version, see: # https://www.python.org/dev/peps/pep-0440/ # # Generic release markers: # X.Y # X.Y.Z # For bugfix releases # # Admissible pre-release markers: # X.YaN # Alpha release # X.YbN # Beta release # X.YrcN # Rele...
unknown
codeparrot/codeparrot-clean