code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#!/usr/bin/env python2 import curses import fcntl import json import os import requests import sys import termios import traceback settings = { 'ip' : '127.0.0.1', 'port' : '80', 'user' : '', 'pssw' : '', } keymap = { 'i' : 'ip', 'p' : 'port', 'u' : 'user', 'w' : 'pssw', } try: with open('/home/osmc/...
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/net/package-info.java
// MODULE: context // FILE: context.kt fun test() { <caret_context>call("foo") } fun call(text: String) {} // MODULE: main // MODULE_KIND: CodeFragment // CONTEXT_MODULE: context // FILE: fragment.kt // CODE_FRAGMENT_KIND: EXPRESSION // CODE_FRAGMENT_FOREIGN_VALUE: foo_DebugLabel(Ljava/lang/String;) <caret>foo_...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/testData/components/compilerFacility/compilation/codeFragments/capturing/foreignValue.kt
""" This is our testing framework. Goals: * it should be compatible with py.test and operate very similarly (or identically) * doesn't require any external dependencies * preferably all the functionality should be in this file only * no magic, just import the test file and execute the test functions, that's it * port...
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...
unknown
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/site/markdown/release/0.19.0/CHANGELOG.0.19.0.md
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage.bugs.varargs; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.*; import org.junit.Test; import org.mockitoutil.TestBase; public class Varargs...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockitousage/bugs/varargs/VarargsErrorWhenCallingRealMethodTest.java
#!venv/bin/python import pycurl, json, requests BASEURL = 'http://localhost:80' print '\nStarting Tests @ {}...\n'.format(BASEURL) c = pycurl.Curl() c.setopt(c.COOKIEFILE, '') # Without this, login will work but won't be saved for next request c.setopt(c.HTTPHEADER, ['Content-type: application/json']) # To pass J...
unknown
codeparrot/codeparrot-clean
import random import gym import numpy as np from collections import deque from keras.models import Sequential from keras.layers import Dense from keras.optimizers import Adam # Deep Q-learning Agent class DQNAgent: def __init__(self, state_size, action_size,config): self.cum_reward = 0 self.iter = ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.network.sockets import io.ktor.network.selector.* import io.ktor.network.util.* import io.ktor.utils.io.* import io.ktor.utils.io.ByteChannel import kotlinx.coroutines.* impor...
kotlin
github
https://github.com/ktorio/ktor
ktor-network/jvm/src/io/ktor/network/sockets/CIOWriter.kt
"""Test the condition helper.""" from unittest.mock import patch from homeassistant.helpers import condition from homeassistant.util import dt from tests.common import get_test_home_assistant class TestConditionHelper: """Test condition helpers.""" def setup_method(self, method): """Setup things to ...
unknown
codeparrot/codeparrot-clean
package snapshotter import "github.com/containerd/containerd/v2/core/mount" func isMounted(string) bool { return false } func unmount(target string) error { return mount.Unmount(target, 0) }
go
github
https://github.com/moby/moby
daemon/snapshotter/mount_windows.go
{ "name": "illuminate/conditionable", "description": "The Illuminate Conditionable package.", "license": "MIT", "homepage": "https://laravel.com", "support": { "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, "author...
json
github
https://github.com/laravel/framework
src/Illuminate/Conditionable/composer.json
// Copyright 2024 The etcd Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
go
github
https://github.com/etcd-io/etcd
tools/etcd-dump-db/meta.go
from LogAnalyzer import Test,TestResult import DataflashLog class TestDupeLogData(Test): '''test for duplicated data in log, which has been happening on PX4/Pixhawk''' def __init__(self): Test.__init__(self) self.name = "Dupe Log Data" def __matchSample(self, sample, sampleStartIndex, logdata): '''return th...
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
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2017 OSGeo # # 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 ...
unknown
codeparrot/codeparrot-clean
# Authors: Manoj Kumar mks542@nyu.edu # License: BSD 3 clause import numpy as np from scipy import optimize, sparse from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_a...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/src/components/ui/Toaster/createToaster.ts
(dp0 S'total_runs' p1 L9688L sS'Chrome 4' p2 (dp3 S'summary_display' p4 S'' p5 sS'total_runs' p6 L1072L sS'summary_score' p7 I100 sS'results' p8 (dp9 S'score' p10 (dp11 g10 I100 sS'raw_score' p12 I100 sS'display' p13 S'100/100' p14 ssssS'iPhone 3.1' p15 (dp16 S'summary_display' p17 g5 sS'total_runs' p18 L90L sS'summary...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Union from typing_extensions import Annotated, TypeAlias from ..._utils import PropertyInfo from .session_update_event import SessionUpdateEvent from .response_cancel_event import ResponseCancelEvent from .respons...
python
github
https://github.com/openai/openai-python
src/openai/types/realtime/realtime_client_event.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License,...
unknown
codeparrot/codeparrot-clean
# Developing Realm ## Building Realm There are three ways to build Realm 1. \[Recommended] Using Xcode, open Package.swift. With this approach you can build either against a released Core version or a custom branch. 1. Using Xcode, open Realm.xcodeproj. This will download the version of Core specified in `dependencie...
unknown
github
https://github.com/realm/realm-swift
contrib/Development.md
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
unknown
codeparrot/codeparrot-clean
""" Distance and Area objects to allow for sensible and convienient calculation and conversions. Here are some tests. """ from django.contrib.gis.measure import Distance, Area, D, A from django.utils import unittest class DistanceTest(unittest.TestCase): "Testing the Distance object" def testInit(self): ...
unknown
codeparrot/codeparrot-clean
# -*-coding:Utf-8 -* # Copyright (c) 2014 LE GOFF Vincent # 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 # lis...
unknown
codeparrot/codeparrot-clean
import os from optparse import make_option from django.contrib.gis import gdal from django.core.management.base import LabelCommand, CommandError def layer_option(option, opt, value, parser): """ Callback for `make_option` for the `ogrinspect` `layer_key` keyword option which may be an integer or a string....
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Robert Layton <robertlayton@gmail.com> # Andreas Mueller <amueller@ais.uni-bonn.de> # Philippe Gervais <philippe.gervais@inria.fr> # Lars Buitinck ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2007 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
java
github
https://github.com/google/guava
android/guava-tests/test/com/google/common/collect/IterablesTest.java
#ifndef SQL_EXCEPTION_HANDLER_H_INCLUDED #define SQL_EXCEPTION_HANDLER_H_INCLUDED /* Copyright (c) 2017, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software...
c
github
https://github.com/mysql/mysql-server
sql/sql_exception_handler.h
package image import ( "context" "fmt" "os" "path/filepath" "sync" "github.com/containerd/log" "github.com/moby/sys/atomicwriter" "github.com/opencontainers/go-digest" "github.com/pkg/errors" ) // DigestWalkFunc is function called by StoreBackend.Walk type DigestWalkFunc func(id digest.Digest) error // Sto...
go
github
https://github.com/moby/moby
daemon/internal/image/fs.go
#!/usr/bin/env python3 """ Created on 6 Nov 2018 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) """ from scs_core.csv.csv_writer import CSVWriter # -------------------------------------------------------------------------------------------------------------------- # reference row... jstr1 = '{"rec": "2...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
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
connect/api/src/main/java/org/apache/kafka/connect/data/Time.java
#!/usr/bin/env python # -*- coding: utf-8 -*- # Serie.py # # Copyright (c) 2008 Magnun Leno da Silva # # Author: Magnun Leno da Silva <magnun.leno@gmail.com> # # 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...
unknown
codeparrot/codeparrot-clean
/* Generated file to emulate the ts.refactor.addOrRemoveBracesToArrowFunction namespace. */ export * from "../refactors/convertOverloadListToSingleSignature.js"; export * from "../refactors/addOrRemoveBracesToArrowFunction.js";
typescript
github
https://github.com/microsoft/TypeScript
src/services/_namespaces/ts.refactor.addOrRemoveBracesToArrowFunction.ts
''' Created on Oct 15, 2013 @author: petrychenko HTTP Application that process HTTP requests to certain URLs. See URLs in function @route decorators ''' import bottle from bottle import route, request import json from controllers import AppController class ObjectEncoder(json.JSONEncoder): """A custom JSONEncod...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import absolute_import import unittest from readthedocs.projects.version_handling import version_windows class TestVersionWindows(unittest.TestCase): def setUp(self): self.versions = [ '0.1.0', '0.2.0', '0.2.1', '0.3....
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRAN...
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 applicable law or a...
java
github
https://github.com/tensorflow/tensorflow
tensorflow/java/src/main/java/org/tensorflow/op/annotation/Operator.java
#!/usr/bin/env python """ highlightedtextplugin.py A display text custom widget plugin for Qt Designer. Copyright (C) 2006 David Boddie <david@boddie.org.uk> Copyright (C) 2005-2006 Trolltech ASA. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
import numpy as np import pytest from pandas._libs.parsers import ( _maybe_upcast, na_values, ) import pandas as pd from pandas import NA import pandas._testing as tm from pandas.core.arrays import ( ArrowStringArray, BooleanArray, FloatingArray, IntegerArray, ) def test_maybe_upcast(any_real...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/io/parser/test_upcast.py
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.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 = { ...
unknown
codeparrot/codeparrot-clean
# Support for the iTunes format # Copyright 2010-2020 Kurt McKee <contactme@kurtmckee.org> # Copyright 2002-2008 Mark Pilgrim # All rights reserved. # # This file is a part of feedparser. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following con...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps from django.conf import settings from django.core.exceptions import ObjectDoesNotExist...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (C) 2011 Chris Dekter # # 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 later version. # # This pr...
unknown
codeparrot/codeparrot-clean
'use cache' // Exported TypeScript nodes should be ignored when validating that all module // exports are async functions. export type T = {} export interface I {} export enum E {} export default interface D {} export async function Page() {}
typescript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/server-actions/server-graph/60/input.ts
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. **Examples** ```esql ROW a=10 | EVAL j = TO_STRING(a) ``` | a:integer | j:keyword | | --- | --- | | 10 | "10" | It also works fine on multivalued fields: ```esql ROW a=[10, 9, 8] | EVAL j = TO_STRING(...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/functions/examples/to_string.md
// Copyright The Prometheus Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
go
github
https://github.com/prometheus/prometheus
prompb/io/prometheus/write/v2/symbols_test.go
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2013 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import xml.etree.ElementTree as ET class brocade_terminal(object): """Auto generated class. """ def __init__(self, **kwargs): self._callback = kwargs.pop('callback') def terminal_cfg_line_sessionid(self, **kwargs): """Auto Generated Code """ config...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2007 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 o...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
from functools import wraps from django.utils.decorators import method_decorator from django.views.decorators.cache import cache_control from django.views.decorators.http import last_modified as cache_last_modified from django.utils.translation import gettext_lazy as _ from django.core.exceptions import PermissionDeni...
unknown
codeparrot/codeparrot-clean
# Django settings for scholarec_web import os import sys from django import VERSION import mongoengine sys.path.insert(0, '../..') CUSTOM_USER_MODEL = bool(int(os.environ.get('CUSTOM_USER_MODEL', '1'))) MODE = os.environ.get('MODE', 'standalone') BASE_ROOT = os.path.abspath( os.path.join(os.path.split(__file__)[0...
unknown
codeparrot/codeparrot-clean
from corpustools.gui.views import * from corpustools.gui.models import CorpusModel def test_discourse_view(qtbot): widget = DiscourseView() qtbot.addWidget(widget) def test_lexicon_view(qtbot, unspecified_test_corpus, settings): widget = LexiconView() model = CorpusModel(unspecified_test_corpus, setti...
unknown
codeparrot/codeparrot-clean
import { isCssUrlWithoutSideEffects } from "../vite/styles"; describe("isCssUrlWithoutSideEffects", () => { it("returns true for query parameters that result in an exported value with no side effects", () => { let urls = [ "my/file.css?inline", "my/file.css?inline-css", "my/file.css?inline&raw"...
typescript
github
https://github.com/remix-run/react-router
packages/react-router-dev/__tests__/styles-test.ts
""" Matrix Solver Parses a calibration table and solves the equations for the alpha constants used in the Hardy's Multi-Quadric method of calibration. """ import os, sys, string from math import sqrt from xml.dom import * from xml.dom.minidom import * import Numeric, LinearAlgebra # Define useful functions def length(...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 //go:build !minimal package builtinplugins import ( "maps" credAliCloud "github.com/hashicorp/vault-plugin-auth-alicloud" credAzure "github.com/hashicorp/vault-plugin-auth-azure" credCF "github.com/hashicorp/vault-plugin-auth-cf" credGcp "g...
go
github
https://github.com/hashicorp/vault
helper/builtinplugins/registry_full.go
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\DataCollector; use Symfony\Bundle\Framew...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/DataCollector/RouterDataCollector.php
# $Id: data.py,v 1.1 2013/07/10 02:25:44 paus Exp $ import FWCore.ParameterSet.Config as cms process = cms.Process('FILEFI') # import of standard configurations process.load('Configuration/StandardSequences/Services_cff') process.load('FWCore/MessageService/MessageLogger_cfi') process.load('Configuration.StandardSeq...
unknown
codeparrot/codeparrot-clean
import pytest from pandas import ( DataFrame, Series, ) import pandas._testing as tm class TestPipe: def test_pipe(self, frame_or_series): obj = DataFrame({"A": [1, 2, 3]}) expected = DataFrame({"A": [1, 4, 9]}) if frame_or_series is Series: obj = obj["A"] e...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/frame/methods/test_pipe.py
{ "apiVersion": "v1", "groupVersion": "coordination.k8s.io/v1alpha2", "kind": "APIResourceList", "resources": [ { "kind": "LeaseCandidate", "name": "leasecandidates", "namespaced": true, "singularName": "leasecandidate", "storageVersionHash": "lvME0iHWE20=", "verbs": [ ...
json
github
https://github.com/kubernetes/kubernetes
api/discovery/apis__coordination.k8s.io__v1alpha2.json
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/bugprone/UnhandledExceptionAtNewCheck.cpp
# (c) 2015, Ansible Inc, # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is di...
python
github
https://github.com/ansible/ansible
lib/ansible/plugins/action/service.py
#!/usr/bin/env python # Copyright (c) 2011 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. """Does scraping for Firefox 2.0.""" import pywintypes import time import types from drivers import keyboard from drivers import ...
unknown
codeparrot/codeparrot-clean
rule_files: - 'my_rule' # fine - 'my/*/rule' # bad
unknown
github
https://github.com/prometheus/prometheus
config/testdata/rules.bad.yml
<!--- 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 distributed under t...
unknown
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/site/markdown/filesystem/fsdatainputstreambuilder.md
from __future__ import division, print_function, absolute_import from ._ufuncs import _lambertw def lambertw(z, k=0, tol=1e-8): r""" lambertw(z, k=0, tol=1e-8) Lambert W function. The Lambert W function `W(z)` is defined as the inverse function of ``w * exp(w)``. In other words, the value of ``W...
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/util/functional/CloseableTaskPoolSubmitter.java
name: Distribute on: workflow_dispatch: inputs: build-number: description: 'Number of the build to use to create the bundle' required: true type: string create-bundle: description: 'Whether to create the bundle. If unchecked, only the bundle distribution is executed' ...
unknown
github
https://github.com/spring-projects/spring-boot
.github/workflows/distribute.yml
# Copyright (C) 2009, 2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND...
unknown
codeparrot/codeparrot-clean
/* css for clang-doc mustache backend */ @import "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"; *,*::before *::after { box-sizing:border-box } * { margin:0; padding:0 } ol, ul { list-style:none } img, picture, svg, video { display:b...
css
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-doc/assets/clang-doc-mustache.css
'''Wrapper for pulse Generated with: tools/genwrappers.py pulseaudio Do not modify this file. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import ctypes from ctypes import * import pyglet.lib _lib = pyglet.lib.load_library('pulse') _int_types = (c_int16, c_int32) if hasattr(ctypes, 'c_int64'): ...
unknown
codeparrot/codeparrot-clean
# mysql/pymysql.py # Copyright (C) 2005-2016 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 """ .. dialect:: mysql+pymysql :name: PyMySQL :dbapi: pymysql :connect...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # encoding: utf-8 -*- # (c) 2013, Matthias Vogelgesang <matthias.vogelgesang@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 ve...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 Leon Sixt # # 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 # # distributed under the License is distributed on an "AS IS" BAS...
unknown
codeparrot/codeparrot-clean
# 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 # @@protoc_insertion_point(imports) DESCRIPTOR = descriptor.FileDescriptor( name='IpcConnectionConte...
unknown
codeparrot/codeparrot-clean
from binary_tree_prototype import BinaryTreeNode import collections # @include def is_balanced_binary_tree(tree): BalancedStatusWithHeight = collections.namedtuple( 'BalancedStatusWithHeight', ('balanced', 'height')) # First value of the return value indicates if tree is balanced, and if # balance...
unknown
codeparrot/codeparrot-clean
/* * jcapistd.c * * Copyright (C) 1994-1996, Thomas G. Lane. * Modified 2013 by Guido Vollbeding. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * * This file contains application interface code for the compression half ...
c
github
https://github.com/opencv/opencv
3rdparty/libjpeg/jcapistd.c
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-TODAY OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
unknown
codeparrot/codeparrot-clean
import pytest from pybind11_tests import opaque_types as m from pybind11_tests import ConstructorStats, UserType def test_string_list(): lst = m.StringList() lst.push_back("Element 1") lst.push_back("Element 2") assert m.print_opaque_list(lst) == "Opaque list: [Element 1, Element 2]" assert lst.bac...
unknown
codeparrot/codeparrot-clean
/* Copyright (c) 2021, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including but not lim...
c
github
https://github.com/mysql/mysql-server
include/keyring_operations_helper.h
from Screens.Screen import Screen from Components.Sources.List import List from Components.ActionMap import NumberActionMap from Components.Sources.StaticText import StaticText from Components.config import configfile from Components.PluginComponent import plugins from Components.config import config from Components.Sy...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from hashlib import sha1 import os from django.conf import settings from django.contrib.auth.models import User, Group from django.core.urlresolvers import reverse from django.core.validators import MaxLengthValidator from django.db import models from django.db.models import aggregates from django.db....
unknown
codeparrot/codeparrot-clean
--- - name: A second playbook run with fact caching enabled hosts: localhost tasks: - name: show ansible_foobar fact debug: var: ansible_foobar - name: assert ansible_foobar is correct value when read from cache assert: that: - ansible_foobar == 'foobar_from_set_fact_c...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/set_fact/set_fact_cached_2.yml
# -*- coding: utf-8 -*- """ pygments.formatters.rtf ~~~~~~~~~~~~~~~~~~~~~~~ A formatter that generates RTF files. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter __all__ = ['RtfFormatter'] cl...
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
from collections import namedtuple from nose.tools import assert_equals, assert_true from numpy import arange, array_equal, expand_dims, isclose from test_utils import LocalTestCase from thunder.rdds.imgblocks.strategy import PaddedBlockingStrategy, SimpleBlockingStrategy MockImage = namedtuple("MockImage", "dims nr...
unknown
codeparrot/codeparrot-clean
{ "bundles": [], "resources": { "includes": [ { "condition": { "typeReachable": "org.jline.terminal.TerminalBuilder" }, "pattern": "\\QMETA-INF/services/org.jline.terminal.spi.JansiSupport\\E" }, { "condition": { "typeReachable": "org.jline.t...
json
github
https://github.com/spring-projects/spring-boot
build-plugin/spring-boot-gradle-plugin/src/test/resources/reachability-metadata-repository/org.jline/jline/3.21.0/resource-config.json
import unittest from test import support import time resource = support.import_module('resource') # This test is checking a few specific problem spots with the resource module. class ResourceTest(unittest.TestCase): def test_args(self): self.assertRaises(TypeError, resource.getrlimit) self.asser...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Nova Release Notes documentation build configuration file, created by # sphinx-quickstart on Thu Nov 5 11:50:32 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from future.builtins import range from mezzanine.conf import settings from mezzanine.core.managers import DisplayableManager from mezzanine.utils.urls import home_slug class PageManager(DisplayableManager): def published(self, for_user=None, include_login_required=False): ...
unknown
codeparrot/codeparrot-clean
<!--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/deepseek_v2.md
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class Descending < Ordering def reverse Ascending.new(expr) end def direction :desc end def ascending? false end def descending? true end end end end
ruby
github
https://github.com/rails/rails
activerecord/lib/arel/nodes/descending.rb
import { test } from '../../test'; // binding member expression shouldn't invalidate the property name export default test({ test({ assert, component, target }) { const div = target.querySelector('div'); assert.equal(div, component.container.a); assert.deepEqual(component.logs.length, 1); } });
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/binding-this-member-expression-update/_config.js
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_parsing.py
# coding: utf-8 from __future__ import unicode_literals import base64 import json import os from .common import InfoExtractor from ..aes import aes_cbc_decrypt from ..compat import compat_ord from ..utils import ( bytes_to_intlist, ExtractorError, float_or_none, intlist_to_bytes, srt_subtitles_tim...
unknown
codeparrot/codeparrot-clean
{ "properties": [ { "name": "comment", "value": "SBOM for MDB server product; this file should comply with the format specified here: https://cyclonedx.org/docs/1.5/json/#components_items_publisher; This file is still in development; see https://jira.mongodb.org/browse/DEVPROD-2623 for details." }...
json
github
https://github.com/mongodb/mongo
buildscripts/tests/sbom_linter/inputs/sbom_pedigree_version_match.json
from datetime import timedelta, datetime class Switch(object): """ resends emails if WAKEUP_PERIOD is passed since last time an email was sent or since last email was sent AMOUNT_TRIGGER of messages are received for the same group. Does not send email for loggers in SKIP_LOGGERS """ AMOUNT_...
unknown
codeparrot/codeparrot-clean