code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
S3_SHA256_HASHES = { "https://mdb-build-public.s3.amazonaws.com/bazelisk-binaries/v1.26.0/bazelisk-darwin": "a8c966e9ae6983b1e1c0116313ff523a862076d81b20add23da825b58610c1b3", "https://mdb-build-public.s3.amazonaws.com/bazelisk-binaries/v1.26.0/bazelisk-darwin-amd64": "5c77f33f91dd3df119d192175100cb5b50302eb7ee...
python
github
https://github.com/mongodb/mongo
buildscripts/s3_binary/hashes.py
# -*- 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
<?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; use Psr\Container\ContainerInter...
php
github
https://github.com/symfony/symfony
src/Symfony/Component/DependencyInjection/ReverseContainer.php
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
unknown
codeparrot/codeparrot-clean
# Copyright 2018 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
from __future__ import division, unicode_literals from future.builtins import int from datetime import datetime, timedelta try: from urllib.parse import urlencode except ImportError: # Python 2 from urllib import urlencode try: from urllib.request import Request, urlopen except ImportError: # Python 2 ...
unknown
codeparrot/codeparrot-clean
/* 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
cmd/kubeadm/app/util/endpoint.go
from typing import Any, cast import pytest from langchain_core.language_models import BaseChatModel from langchain_core.messages import AIMessage from langchain_core.prompts import ChatPromptTemplate from langchain_core.runnables import RunnableConfig from langchain_tests.integration_tests import ChatModelIntegrationT...
python
github
https://github.com/langchain-ai/langchain
libs/langchain_v1/tests/integration_tests/chat_models/test_base.py
#!/usr/bin/python # -*- coding: utf-8 -*- # (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...
unknown
codeparrot/codeparrot-clean
from django.db.backends.mysql.base import DatabaseOperations from django.contrib.gis.db.backends.adapter import WKTAdapter from django.contrib.gis.db.backends.base import BaseSpatialOperations from django.utils import six class MySQLOperations(DatabaseOperations, BaseSpatialOperations): compiler_module = 'djang...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ''' DataFlash Logging Module June 2015 ArduPilot supports transmission of DataFlash logs over MavLink. This module pokes the UAV to start sending logs, and stores them in a local directory. The relevant code in the ArduPilot code base can be found in libraries/DataFlash/DataFlash_MAVLink.* ''' ...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Document.rendered_html' db.add_column('wiki_document', 'rendered_html', self.gf('django.db.models....
unknown
codeparrot/codeparrot-clean
import logging import re import sys import time import warnings from contextlib import contextmanager from functools import wraps from unittest import TestCase, skipIf, skipUnless from xml.dom.minidom import Node, parseString from django.apps import apps from django.apps.registry import Apps from django.conf import Us...
unknown
codeparrot/codeparrot-clean
# Copyright 2009-2016, Damian Johnson and The Tor Project # See LICENSE for licensing information """ Top panel for every page, containing basic system and tor related information. This expands the information it presents to two columns if there's room available. """ import os import time import stem import stem.con...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Contracts\Broadcasting; interface Broadcaster { /** * Authenticate the incoming request for a given channel. * * @param \Illuminate\Http\Request $request * @return mixed */ public function auth($request); /** * Return the valid authentication res...
php
github
https://github.com/laravel/framework
src/Illuminate/Contracts/Broadcasting/Broadcaster.php
#!/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
"""Prettyprinter by Jurjen Bos. (I hate spammers: mail me at pietjepuk314 at the reverse of ku.oc.oohay). All objects have a method that create a "stringPict", that can be used in the str method for pretty printing. Updates by Jason Gedge (email <my last name> at cs mun ca) - terminal_string() method - minor f...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Andrew Kofink <ajkofink@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) ...
unknown
codeparrot/codeparrot-clean
__author__ = 'sysferland' from BeautifulSoup import BeautifulSoup from difflib import SequenceMatcher as SM from ffvideo import VideoStream from ffvideo import DecoderError from ffvideo import NoMoreData import urllib2, ordereddict, os, sys, cymysql, time, re, hashlib, socket, subprocess, signal def select_season_id(s...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Pull pangrams from a variety of world languages for template testing. A pangram is a phrase that includes every letter of an alphabet. The list is drawn from the Web site of Markus Kuhn. http://www.cl.cam.ac.uk/~mgk25/ucs/examples/quickbrown.txt """ PANGRAMS = { 'en': 'The quick brown...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to PyPI's pythonhosted.org). """ from base64 import standard_b64encode from distutils import log from distutils.errors import DistutilsOptionError import os import socket import zipfile import tempfile import ...
unknown
codeparrot/codeparrot-clean
# # 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
/* Copyright 2017 - 2021 J.Rieck (based on R. Thomas's work) * 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/LI...
cpp
github
https://github.com/nodejs/node
deps/LIEF/src/MachO/RPathCommand.cpp
# frozen_string_literal: true require "mail" module ActionMailbox # The +InboundEmail+ is an Active Record that keeps a reference to the raw email stored in Active Storage # and tracks the status of processing. By default, incoming emails will go through the following lifecycle: # # * Pending: Just received b...
ruby
github
https://github.com/rails/rails
actionmailbox/app/models/action_mailbox/inbound_email.rb
#!/usr/bin/env python2.7 # # Copyright 2017 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 l...
unknown
codeparrot/codeparrot-clean
"""Test the config manager.""" import asyncio from datetime import timedelta import pytest from homeassistant import config_entries, data_entry_flow, loader from homeassistant.core import callback from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.setup import async_setup_component from homea...
unknown
codeparrot/codeparrot-clean
######################################################################## # $Header: /var/local/cvsroot/4Suite/Ft/Lib/DistExt/__init__.py,v 1.19.2.5 2006/10/30 20:39:16 jkloth Exp $ """ Extensions to distutils to support building, installing, packaging 4Suite Copyright 2005 Fourthought, Inc. (USA). Detailed license and...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) class VodlockerIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?vodlocker\.com/(?P<id>[0-9a-zA-Z]+)(?:\..*?)?' _TESTS = [{ ...
unknown
codeparrot/codeparrot-clean
set -o errexit curl --fail-with-body \ --header "Api-User: ${EVERGREEN_API_USER}" \ --header "Api-Key: ${EVERGREEN_API_KEY}" \ -L https://evergreen.mongodb.com/rest/v2/tasks/${PROMOTE_TASK_ID} \ --output ./debug_task_data.json echo ".................." echo "archive_dist_test_debug task data" echo ".....
unknown
github
https://github.com/mongodb/mongo
evergreen/get_custom_build_promotion_expansions_debug.sh
# -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2012 Carlos Vercelino - CLVsol.net # # ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env ruby module RubyVersion def self.tag(version) major_version = Integer(version.split('.', 2)[0]) if major_version >= 4 "v#{version}" else "v#{version.tr('.-', '_')}" end end # Return the previous version to be used for release diff links. # For a ".0" version, it retu...
ruby
github
https://github.com/ruby/ruby
tool/ruby-version.rb
/* 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/apis/admissionregistration/v1/register.go
from __future__ import unicode_literals from django.contrib.gis.geos import ( LinearRing, LineString, Point, Polygon, fromstr, ) from django.utils import six from django.utils.encoding import python_2_unicode_compatible from django.utils.functional import total_ordering from django.utils.html import html_safe @ht...
unknown
codeparrot/codeparrot-clean
# Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # trib...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015 Tanium Inc # # Generated from console.wsdl version 0.0.1 # # from .base import BaseType class Action(BaseType): _soap_tag = 'action' def __init__(self): BaseType.__init__( self, simple_properties={'id': int, 'name': str, ...
unknown
codeparrot/codeparrot-clean
"""Message and message content types. Includes message types for different roles (e.g., human, AI, system), as well as types for message content blocks (e.g., text, image, audio) and tool calls. """ from langchain_core.messages import ( AIMessage, AIMessageChunk, Annotation, AnyMessage, AudioConte...
python
github
https://github.com/langchain-ai/langchain
libs/langchain_v1/langchain/messages/__init__.py
""" The more times we visit a hypothesis, the more we decrease its prior TODO: Try version where penalty decreases with time! TODO: This currently only extends LOTHypotheses, since we have to handle casting inside of h0 to WrapperClass. HOWEVER, we could make WrapperClass just dis...
unknown
codeparrot/codeparrot-clean
imports: - { resource: ../config/default.yml } - { resource: services.yml } framework: mailer: dsn: 'null://null' envelope: sender: sender@example.org recipients: - redirected@example.org profiler: ~
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Mailer/config.yml
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.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 Soft...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import locale import os from os import path from flask import Flask, g from flask_assets import Bundle, Environment from flask_principal import Principal, identity_loaded from nbx.jinjafilters import (cuitfmt_filter, dateformat_filter, moneyfmt_filter, timeago_fil...
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/platform/stringprintf.h
""" Base classes supporting Libvirt Sandbox (lxc) container testing :copyright: 2013 Red Hat Inc. """ import logging import signal import aexpect class SandboxException(Exception): """ Basic exception class for problems occurring in SandboxBase or subclasses """ def __init__(self, message): ...
unknown
codeparrot/codeparrot-clean
## This file is part of Scapy ## Copyright (C) 2017 Maxence Tury ## This program is published under a GPLv2 license """ TLS 1.3 key exchange logic. """ from __future__ import print_function import math from scapy.config import conf, crypto_validator from scapy.error import warning from scapy.fields import * from sca...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # This module is also sponsored by E.T.A.I. (www.etai.fr) # # 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...
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
#include "test/jemalloc_test.h" #include "jemalloc/internal/peak.h" TEST_BEGIN(test_peak) { peak_t peak = PEAK_INITIALIZER; expect_u64_eq(0, peak_max(&peak), "Peak should be zero at initialization"); peak_update(&peak, 100, 50); expect_u64_eq(50, peak_max(&peak), "Missed update"); peak_update(&peak, 10...
c
github
https://github.com/redis/redis
deps/jemalloc/test/unit/peak.c
# 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 use ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2025 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.descriptors.symbols.descriptorBased.base import com.intellij.psi.im...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/descriptorBased/base/fe10DescUtils.kt
# -*- coding: utf-8 -*- from django.http import HttpResponseRedirect from django.db.models import get_model from socialoauth import socialsites from socialoauth.utils import import_oauth_class from socialoauth.exception import SocialAPIError from .models import SocialUser from .app_settings import ( SOCIALOAUTH_...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python2.6 # # Copyright 2011 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...
unknown
codeparrot/codeparrot-clean
# This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from .addresses import Address, SavedAddress, SavedAddressRole, SavedAddressStatus from .taxes impor...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright 2019 Red Hat Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The iosxr_l3_interfaces class It is in this file where the current configuration (as dict) is compared to the provided configuration (as dict) and the command set necess...
unknown
codeparrot/codeparrot-clean
// Copyright 2017 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql import "github.com/cockroachdb/cockroach/pkg/sql/catalog/colinfo" // ReqOrdering is the ordering that must be preserved by an operator when it is // distri...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/plan_ordering.go
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" . "$DIR/prelude.sh" set -o errexit set -o verbose cd src activate_venv command_invocation="$python buildscripts/monitor_build_status/cli.py" if [ "${is_patch}" != "true" ]; then command_invocation="$command_invocation --notify" fi echo "Verbati...
unknown
github
https://github.com/mongodb/mongo
evergreen/monitor_build_status_run.sh
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional from typing_extensions import Literal from ..._models import BaseModel __all__ = ["ResponseInputFile"] class ResponseInputFile(BaseModel): """A file input to the model.""" type: Literal["input_...
python
github
https://github.com/openai/openai-python
src/openai/types/responses/response_input_file.py
import numpy as np def lhc_unif(XB,NS,XI=None,maxits=10): ''' XS = lhc_unif(XB,NS,XI=None,maxits=10): Latin Hypercube Sampling with uniform density Iterates to maximize minimum L2 distance Accepts an array of points to respect while sampling Inputs: XB - ndim ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # ...
unknown
codeparrot/codeparrot-clean
# # torrent.py # # Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may 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 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2010 The Closure Linter 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 #...
unknown
codeparrot/codeparrot-clean
''' Copyright (C) 2015 Dato, Inc. All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' ##\internal """@package graphlab.toolkits Internal Toolkit Calling """ from ..connect import _get_metric_tracker from ..connect import main as...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2015 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license #...
unknown
codeparrot/codeparrot-clean
#-*- coding: ISO-8859-1 -*- # pysqlite2/__init__.py: the pysqlite2 package. # # Copyright (C) 2005 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages # arising f...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package rpcapi import ( "github.com/zclconf/go-cty/cty" ctyjson "github.com/zclconf/go-cty/cty/json" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terrafo...
go
github
https://github.com/hashicorp/terraform
internal/rpcapi/resource_identity.go
"""Test fixtures.""" from builtins import super import pytest from napalm_base.test import conftest as parent_conftest from napalm_base.test.double import BaseTestDouble from napalm_base.utils import py23_compat from napalm_nxos_ssh import nxos_ssh @pytest.fixture(scope='class') def set_device_parameters(request): ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright(C) 2008-2011 Romain Bignon, Christophe Benz # # This file is part of weboob. # # weboob 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 Lice...
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 a...
unknown
codeparrot/codeparrot-clean
"""Tests for --subprocesses subprocess profiling support.""" import argparse import io import os import signal import subprocess import sys import tempfile import threading import time import unittest from unittest.mock import MagicMock, patch from test.support import ( SHORT_TIMEOUT, reap_children, requi...
python
github
https://github.com/python/cpython
Lib/test/test_profiling/test_sampling_profiler/test_children.py
# Generated by the protocol buffer compiler. DO NOT EDIT! from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 from zippylog.envelope import register_message # @@protoc_insertion_point(imports) DESCRIPTOR = descri...
unknown
codeparrot/codeparrot-clean
""" net_diff.py 2015-09-15 Compares the network list in Nets.out and WLnets.out. Lists all the nets that are in Nets.out but not in WLnets.out. """ INPUT_FILE_DIR = "../input_files/" FORBIDDEN_LINES = ["-", "#", "NAME", "NET", "Steiner"] # Strings beginning unwanted lines nets = list() WLnets = list() missingNets = ...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
"""Tests for legendre module. """ from __future__ import division import numpy as np import numpy.polynomial.legendre as leg import numpy.polynomial.polynomial as poly from numpy.testing import * P0 = np.array([ 1]) P1 = np.array([ 0, 1]) P2 = np.array([-1, 0, 3])/2 P3 = np.array([ 0, -3, 0, 5])/2 P4 = np...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
import pg8000 from pg8000.tests.connection_settings import db_connect import time import warnings from contextlib import closing from decimal import Decimal whole_begin_time = time.time() tests = ( ("cast(id / 100 as int2)", 'int2'), ("cast(id as int4)", 'int4'), ("cast(id * 100 as int8)", 'in...
unknown
codeparrot/codeparrot-clean
import urlparse import pprint import MySQLdb import hashlib #exception + zone : select * from exception LEFT JOIN (peer as srcpeer, peer as dstpeer, connections, match_zone) on (connections.src_peer_id = srcpeer.peer_id and connections.dst_peer_id = dstpeer.peer_id and connections.exception_id = exception.exception_id...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Contracts\Support; interface HasOnceHash { /** * Compute the hash that should be used to represent the object when given to a function using "once". * * @return string */ public function onceHash(); }
php
github
https://github.com/laravel/framework
src/Illuminate/Contracts/Support/HasOnceHash.php
/* * 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
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/TransformationChain.java
from pyspark.sql import SQLContext import h5py from pyspark import SparkConf, SparkContext from datetime import datetime, date, timedelta import sys from pyspark.sql.types import Row, StructField, StructType, StringType, IntegerType, LongType import os from os.path import dirname, basename from tempfile import NamedTem...
unknown
codeparrot/codeparrot-clean
--- applies_to: stack: serverless: navigation_title: "Text type family" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/text-type-family.html --- # Text type family [text] The text family includes the following field types: * [`text`](/reference/elasticsearch/mapping-reference/t...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch/mapping-reference/text-type-family.md
//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.5.ts] //// //// [awaitUsingDeclarationsInForOf.5.ts] // https://github.com/microsoft/TypeScript/pull/55558#issuecomment-1817595357 declare const x: any[] for (await using of x); export async function test() {...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/awaitUsingDeclarationsInForOf.5(target=esnext).js
//// [tests/cases/compiler/breakInIterationOrSwitchStatement2.ts] //// //// [breakInIterationOrSwitchStatement2.ts] do { break; } while (true); //// [breakInIterationOrSwitchStatement2.js] "use strict"; do { break; } while (true);
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/breakInIterationOrSwitchStatement2.js
""" KBase Job Manager The main class here defines a manager for running jobs (as Job objects). This class knows how to fetch job status, kill jobs, etc. It also communicates with the front end over the KBaseJobs channel. It is intended for use as a singleton - use the get_manager() function to fetch it. """ __author_...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import unittest from compiled_file_system import CompiledFileSystem from manifest_data_source import ManifestDataSource fr...
unknown
codeparrot/codeparrot-clean
package libnetwork_test import ( "context" "encoding/json" "fmt" "net" "net/http" "net/http/httptest" "net/netip" "os" "os/exec" "path/filepath" "regexp" "strings" "sync" "testing" cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/moby/moby/v2/daemon/libnetwork" "githu...
go
github
https://github.com/moby/moby
daemon/libnetwork/libnetwork_linux_test.go
import pytest import mock from api.base.settings.defaults import API_BASE from framework.auth.core import Auth from osf_tests.factories import ( NodeFactory, ProjectFactory, RegistrationFactory, AuthUserFactory, ForkFactory ) from rest_framework import exceptions from website import mails from osf....
unknown
codeparrot/codeparrot-clean
/* 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/apis/apiserverinternal/install/install.go
import webapp2 import ferris.core.routing as routing # Sentinel for the uri methods. route_sentinel = object() class Uri(object): """ URI Utility class to help controllers and anything else that deals with URIs """ def get_route_name(self, prefix=route_sentinel, controller=route_sentinel,...
unknown
codeparrot/codeparrot-clean
import A from "./a"; import "./b"; import "./c"; import D from "./d"; import "./e"; import "./f"; import a from "./dep?a"; import b from "./dep?b"; import c from "./dep?c"; import d from "./dep?d"; import e from "./dep?e"; import f from "./dep?f"; it("should generate valid code", () => { expect(A()).toBe("x"); expe...
javascript
github
https://github.com/webpack/webpack
test/cases/inner-graph/export-default-named/index.js
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Component, Injectable} from '@angular/core'; import {ActivatedRoute} from '@angular/router'; @Component({ ...
typescript
github
https://github.com/angular/angular
devtools/src/app/demo-app/todo/routes/routes.component.ts
from itertools import product import numpy as np from numpy.linalg import norm from numpy.testing import (assert_, assert_allclose, assert_equal, suppress_warnings) from pytest import raises as assert_raises from scipy.sparse import issparse, lil_matrix from scipy.sparse.linalg import asline...
unknown
codeparrot/codeparrot-clean
import os import re import shutil import time import warnings from io import StringIO from unittest import mock, skipUnless from admin_scripts.tests import AdminScriptTestCase from django.core import management from django.core.management import execute_from_command_line from django.core.management.base import Comman...
unknown
codeparrot/codeparrot-clean
const path = require('path') const { spawn } = require('child_process') const fs = require('fs/promises') const cwd = process.cwd() async function main() { const tarballs = await fs.readdir(path.join(cwd, 'public')) const nextTarball = tarballs.find((item) => !item.includes('-swc')) await fs.rename( path.j...
javascript
github
https://github.com/vercel/next.js
scripts/inject-deploy-url.js
# # Copyright 2012 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
unknown
codeparrot/codeparrot-clean
''' This agent is based on the Bellman equation, used to create a matrix which will help the agent to find the suitable move, given a certain position. The learning function constructs the matrix from random games. This matrix has an element for each reward position, agent position and move. There is an option at the e...
unknown
codeparrot/codeparrot-clean
/* * jclossls.c * * This file was part of the Independent JPEG Group's software: * Copyright (C) 1998, Thomas G. Lane. * Lossless JPEG Modifications: * Copyright (C) 1999, Ken Murchison. * libjpeg-turbo Modifications: * Copyright (C) 2022, 2024, D. R. Commander. * For conditions of distribution and use, see th...
c
github
https://github.com/opencv/opencv
3rdparty/libjpeg-turbo/src/jclossls.c
#!/usr/bin/env python # -*- coding: utf-8 -*- """This file is part of the prometeo project. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)...
unknown
codeparrot/codeparrot-clean
from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm, AuthenticationForm, PasswordChangeForm, SetPasswordForm, UserChangeForm, PasswordResetForm from django.test import TestCase class UserCreationFormTest(TestCase): fixtures = ['authtestdata.json'] def test_user...
unknown
codeparrot/codeparrot-clean
from django.contrib.staticfiles.testing import StaticLiveServerTestCase from selenium import webdriver from django.contrib.auth.models import User class TestLogin(StaticLiveServerTestCase): def setUp(self): self.username = 'alice' self.email = 'alice@example.org' self.password = 'test' ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context/src/main/java/org/springframework/context/annotation/TypeFilterUtils.java
# coding: utf-8 from __future__ import absolute_import, unicode_literals import os import re import datetime from django.conf import settings, global_settings from django.core import mail from django.core.exceptions import ImproperlyConfigured from django.core.files import temp as tempfile from django.core.urlresolve...
unknown
codeparrot/codeparrot-clean