code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
/* * Copyright (C) 2012 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 agreed ...
java
github
https://github.com/google/guava
android/guava/src/com/google/common/reflect/ImmutableTypeToInstanceMap.java
# 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 o...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/python2.6 """ Module difflib -- helpers for computing deltas between objects. Function get_close_matches(word, possibilities, n=3, cutoff=0.6): Use SequenceMatcher to return list of the best "good enough" matches. Function context_diff(a, b): For two lists of strings, return a delta in context di...
unknown
codeparrot/codeparrot-clean
# Since this package contains a "django" module, this is required on Python 2. from __future__ import absolute_import import sys import jinja2 from django.conf import settings from django.template import TemplateDoesNotExist, TemplateSyntaxError from django.utils import six from django.utils.module_loading import im...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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 b...
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/MBeanExportConfiguration.java
# Copyright 2012, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
unknown
codeparrot/codeparrot-clean
# pylint: disable=g-bad-file-header # 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/LICENS...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 """ Older utilities that are not being used. WARNING: IF YOU NEED TO USE ONE OF THESE FUNCTIONS, PLEASE FIRST MOVE IT TO ANOTHER APPROPRIATE MODULE IN IPython.utils. """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development...
unknown
codeparrot/codeparrot-clean
# testCollections.py # # This code tests both the client and server side of collections # and enumerators. # # Also has the side effect of testing some of the PythonCOM error semantics. import sys import win32com.server.util import win32com.test.util import win32com.client import traceback import pythoncom import pywin...
unknown
codeparrot/codeparrot-clean
pr: 141392 summary: Periodically emit partial aggregation results area: ES|QL type: enhancement issues: []
unknown
github
https://github.com/elastic/elasticsearch
docs/changelog/141392.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...
kotlin
github
https://github.com/spring-projects/spring-framework
framework-docs/src/main/kotlin/org/springframework/docs/integration/jms/jmstxparticipation/JmsConfiguration.kt
#!/usr/bin/env python # # Copyright 2019 Google LLC. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list o...
unknown
codeparrot/codeparrot-clean
import asyncio import os import smtplib import traceback from email.mime.text import MIMEText from email.header import Header from jinja2 import Environment, FileSystemLoader from _pushbank.classes import Plugin from _pushbank.logger import logger class EmailPlugin(Plugin): def __init__(self, **kwargs): ...
unknown
codeparrot/codeparrot-clean
/* * This file defines most of the machinery in order to wrap legacy style * ufunc loops into new style arraymethods. */ #define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE #define _UMATHMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> #include "numpy/ndarraytypes.h" #include "convert_datat...
c
github
https://github.com/numpy/numpy
numpy/_core/src/umath/legacy_array_method.c
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing_extensions import TypeAlias __all__ = ["FileContent"] FileContent: TypeAlias = str
python
github
https://github.com/openai/openai-python
src/openai/types/file_content.py
# Copyright 2014 Violin Memory, 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
from couchpotato.api import addApiView from couchpotato.core.event import addEvent, fireEventAsync from couchpotato.core._base.downloader.main import DownloaderBase, ReleaseDownloadList from couchpotato.core.helpers.variable import cleanHost from couchpotato.core.logger import CPLog from couchpotato.environment import ...
unknown
codeparrot/codeparrot-clean
/* * 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.server.logging import io.ktor.server.application.* import io.ktor.server.request.* import io.ktor.server.response.* import io.ktor.util.* /** * Generates a string representi...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-core/common/src/io/ktor/server/logging/Logging.kt
# 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/execution_api/routes/variables.py
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/ata/marvell,orion-sata.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Marvell Orion SATA maintainers: - Andrew Lunn <andrew@lunn.ch> - Gregory Clement <gregory.clement@bootlin.com> allO...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/ata/marvell,orion-sata.yaml
from .utils import DslBase, BoolMixin, _make_dsl_class from .function import SF, ScoreFunction def Q(name_or_query, **params): # {"match": {"title": "python"}} if isinstance(name_or_query, dict): if params: raise ValueError('Q() cannot accept parameters when passing in a dict.') if ...
unknown
codeparrot/codeparrot-clean
from setuptools import setup version = '3.1.8.dev0' long_description = '\n\n'.join([ open('README.rst').read(), open('CREDITS.rst').read(), open('CHANGES.rst').read(), ]) install_requires = [ 'Django >= 1.4, < 1.7', 'django-extensions', 'django-nose', 'lizard-task >= 0.16', 'lizar...
unknown
codeparrot/codeparrot-clean
# Natural Language Toolkit: Expectation Maximization Clusterer # # Copyright (C) 2001-2017 NLTK Project # Author: Trevor Cohn <tacohn@cs.mu.oz.au> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from __future__ import print_function, unicode_literals try: import numpy except ImportError: pa...
unknown
codeparrot/codeparrot-clean
from os.path import dirname, join import numpy as np import pandas.io.sql as psql import sqlite3 as sql from bokeh.plotting import figure from bokeh.layouts import layout, column from bokeh.models import ColumnDataSource, Div from bokeh.models.widgets import Slider, Select, TextInput from bokeh.io import curdoc from ...
unknown
codeparrot/codeparrot-clean
import os import io import tarfile import sys import pytest import docker.errors __client = None if sys.version_info.major == 2: file_not_found_error = IOError else: file_not_found_error = FileNotFoundError def get_client(): """ Returns: docker.DockerClient """ global __client if ...
unknown
codeparrot/codeparrot-clean
""" Python 'utf-7' Codec Written by Brian Quinlan (brian@sweetapp.com). """ import codecs ### Codec APIs encode = codecs.utf_7_encode def decode(input, errors='strict'): return codecs.utf_7_decode(input, errors, True) class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False)...
python
github
https://github.com/python/cpython
Lib/encodings/utf_7.py
"""Test Module for Duplicate Encoder Kata from CodeWars.""" import pytest from random import randint from dup_encoder import duplicate_encode DUP_TABLE = [ ("din", "((("), ("recede", "()()()"), ("Success", ")())())"), ("CodeWarrior", "()(((())())"), ("Supralapsarian", ")()))()))))()("), ("iiiii...
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. package os_test import ( "errors" "fmt" "io/fs" "os" "path/filepath" "testing" ) func TestErrIsExist(t *testing.T) { t.Parallel() f, err := os.Create...
go
github
https://github.com/golang/go
src/os/error_test.go
#! /usr/bin/env python """Whimpy test script for the cl module Roger E. Masse """ import cl from test.test_support import verbose clattrs = ['ADDED_ALGORITHM_ERROR', 'ALAW', 'ALGORITHM_ID', 'ALGORITHM_VERSION', 'AUDIO', 'AWARE_ERROR', 'AWARE_MPEG_AUDIO', 'AWARE_MULTIRATE', 'AWCMP_CONST_QUAL', 'AWCMP_FIXED_RATE', 'A...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2001, Stanford University # All rights reserved. # # See the file LICENSE.txt for information on redistributing this software. import sys sys.path.append( "../glapi_parser" ) import apiutil apiutil.CopyrightC() print """ /* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED BY state_funcs.py SCRIPT */ ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, json from frappe import _ import frappe.permissions import re, csv, os, sys from frappe.utils.csvutils import UnicodeWriter from frappe.utils import cstr, formatda...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package vault import ( "context" "errors" "fmt" "net/url" "strings" "sync" "github.com/armon/go-radix" ) type wellKnownRedirect struct { c *Core mountUUID string prefix string } type wellKnownRedirectRegistry struct { lock...
go
github
https://github.com/hashicorp/vault
vault/well_known_redirect.go
### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed...
unknown
codeparrot/codeparrot-clean
use std::{path::PathBuf, sync::Arc}; use napi::bindgen_prelude::*; use napi_derive::napi; use next_custom_transforms::react_compiler; use swc_core::{ common::{GLOBALS, SourceMap}, ecma::{ ast::EsVersion, parser::{Syntax, TsSyntax, parse_file_as_program}, }, }; pub struct CheckTask { pu...
rust
github
https://github.com/vercel/next.js
crates/next-napi-bindings/src/react_compiler.rs
<table border="1" class="dataframe"> <thead> <tr style="text-align: right;"> <th>columns.name</th> <th>0</th> <th>1</th> <th>...</th> <th>3</th> <th>4</th> </tr> </thead> <tbody> <tr> <th></th> <td>1.764052</td> <td>0.400157</td> <td>...</td>...
html
github
https://github.com/pandas-dev/pandas
pandas/tests/io/formats/data/html/gh22783_named_columns_index.html
# The default ``config.py`` def set_prefs(prefs): """This function is called before opening the project""" # Specify which files and folders to ignore in the project. # Changes to ignored resources are not added to the history and # VCSs. Also they are not returned in `Project.get_files()`. # Not...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- class Reflector(object): def __init__(self, data=None): """ :param data: data to be checked :type data: str, basetring :return: """ if data: self._data = data.strip() @property def data(self): """ :return...
unknown
codeparrot/codeparrot-clean
"""WSGI Paste wrapper for mod_python. Requires Python 2.2 or greater. Example httpd.conf section for a Paste app with an ini file:: <Location /> SetHandler python-program PythonHandler paste.modpython PythonOption paste.ini /some/location/your/pasteconfig.ini </Location> Or if you wan...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Container; use Closure; use Illuminate\Contracts\Container\ContextualAttribute; use ReflectionAttribute; use ReflectionNamedType; /** * @internal */ class Util { /** * If the given value is not an array and not null, wrap it in one. * * From Arr::wrap() in Illuminate\S...
php
github
https://github.com/laravel/framework
src/Illuminate/Container/Util.php
package conversion import ( "testing" "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" dashv0 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v0alpha1" dashv1 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1" dashv2alpha1 "github.com/grafana...
go
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/v0_test.go
# # The Python Imaging Library # # load a GIMP brush file # # History: # 96-03-14 fl Created # 16-01-08 es Version 2 # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1996. # Copyright (c) Eric Soroos 2016. # # See the README file for information on usage and redistribution. # # #...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2012 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 sys if __name__ == '__main__': sys.path.append(os.path.join(os.path.dirname(__file__), '../../..')) import unit...
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/test/java/org/apache/hadoop/fs/TestContentSummary.java
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
unknown
codeparrot/codeparrot-clean
export function getStaticProps() { return { props: {} } } function El() { return <div /> } const a = 5 export { El as default, a }
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/ssg/getStaticProps/should-support-export-named-as-default-with-other-specifiers/input.js
from . import groups from . import table from . import base from . import helpers class Aggregate(base.Base): def update(self, liveData): self.clearScreen() self.writeStatusLine(liveData.measurements) metricGroups = groups.Groups(liveData.measurements) visible = metricGroups.all() ...
unknown
codeparrot/codeparrot-clean
# Copyright 2020 Google LLC # # 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
# browsershots.org - Test your web design in different browsers # Copyright (C) 2007 Johann C. Rocholl <johann@browsershots.org> # # Browsershots 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 (c) 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 ...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * archive.c * Common WAL archive routines * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION * src/common/archive...
c
github
https://github.com/postgres/postgres
src/common/archive.c
/* * Copyright (C) 2011 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/benchmark/com/google/common/math/BigIntegerMathRoundingBenchmark.java
#!/usr/bin/env python from __future__ import division """Functions supporting the QIIME denoiser""" __author__ = "Jens Reeder" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Jens Reeder", "Greg Caporaso"] __license__ = "GPL" __version__ = "1.9.1-dev" __maintainer__ = "Justin Kuczynski" __email__ ...
unknown
codeparrot/codeparrot-clean
/* * 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.http.cio.internals /** * A text range with mutable bounds * * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.http.cio.internals.MutableRange) * * @param start ...
kotlin
github
https://github.com/ktorio/ktor
ktor-http/ktor-http-cio/common/src/io/ktor/http/cio/internals/MutableRange.kt
use rustc_errors::codes::*; use rustc_errors::{ Applicability, Diag, EmissionGuarantee, LintDiagnostic, Subdiagnostic, inline_fluent, }; use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic}; use rustc_middle::mir::AssertKind; use rustc_middle::query::Key; use rustc_middle::ty::TyCtxt; use rustc_session::li...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_mir_transform/src/errors.rs
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/mlir/tensorflow/transforms/bridge.h
"""Add a new SSH key.""" # :license: MIT, see LICENSE for more details. from os import path import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions @click.command() @click.argument('label') @click.option('--in-file', '-f', type=click.Path(exists=True), ...
unknown
codeparrot/codeparrot-clean
class Timer: #long startTime ; // time in msecs that timer started #long timeSoFar ; // use to hold total time of run so far, useful in # // conjunction with pause and continueRunning #boolean running ; #int x, y, beginTime ; // location of timer output def __init__(self,...
unknown
codeparrot/codeparrot-clean
from flask import Flask from werkzeug.utils import import_string class NoBlueprintException(Exception): pass class NoRouteModuleException(Exception): pass def _get_imported_stuff_by_path(path): module_name, object_name = path.rsplit('.', 1) module = import_string(module_name) return module, obje...
unknown
codeparrot/codeparrot-clean
- hello: name: Ansibull register: hello - assert: that: - hello.message == 'Hello Ansibull' - lookup('env', 'A_VAR') == 'something' - lookup('env', 'A_PATH') == '/an/absolute/path'
unknown
github
https://github.com/ansible/ansible
test/integration/targets/ansible-test-integration/ansible_collections/ns/col/tests/integration/targets/hello/tasks/main.yml
"""Extra array functions built on top of the array API standard.""" from ._delegation import isclose, nan_to_num, one_hot, pad from ._lib._at import at from ._lib._funcs import ( apply_where, atleast_nd, broadcast_shapes, cov, create_diagonal, default_dtype, expand_dims, kron, nuniq...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/externals/array_api_extra/__init__.py
require 'mkmf' create_makefile('-test-/eval')
ruby
github
https://github.com/ruby/ruby
ext/-test-/eval/extconf.rb
from hachoir_core.field import FieldSet, UserVector, UInt8 class RGB(FieldSet): color_name = { ( 0, 0, 0): "Black", (255, 0, 0): "Red", ( 0, 255, 0): "Green", ( 0, 0, 255): "Blue", (255, 255, 255): "White", } static_size = 24 def createFields(self...
unknown
codeparrot/codeparrot-clean
from __future__ import division, print_function import numpy as np from bct.utils import BCTParamError, normalize, get_rng def ci2ls(ci): ''' Convert from a community index vector to a 2D python list of modules The list is a pure python list, not requiring numpy. Parameters ---------- ci : Nx1...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import unittest from openprocurement.auctions.dgf.tests.base import BaseAuctionWebTest, test_lots, test_bids, test_financial_auction_data, test_financial_bids from openprocurement.auctions.core.tests.cancellation import ( AuctionCancellationResourceTestMixin, AuctionLotCancellationResou...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/ti,keystone-irq.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Keystone 2 IRQ controller IP maintainers: - Grygorii Strashko <grygorii.strashko@ti.com> description: On Keystone SOCs, DS...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/interrupt-controller/ti,keystone-irq.yaml
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.com> # # 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 ANSI...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, division, unicode_literals from six import text_type from ..constants import scopingElements, tableInsertModeElements, namespaces # The scope markers are inserted when entering object elements, # marquees, table cells, and table captions, and are used to prevent formatting # fr...
unknown
codeparrot/codeparrot-clean
/** @import * as ESTree from 'estree' */ /** @import { AST, ValidatedCompileOptions, ValidatedModuleCompileOptions } from '#compiler' */ /** @import { ComponentAnalysis, Analysis } from '../../types' */ /** @import { Visitors, ComponentClientTransformState, ClientTransformState } from './types' */ import { walk } from ...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/compiler/phases/3-transform/client/transform-client.js
# 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
# Nomogram visualization widget. It is used together with OWNomogram from OWWidget import * import numpy import math import time, statc import OWQCanvasFuncts # constants SE_Z = -100 HISTOGRAM_Z = -200 aproxZero = 0.0001 def norm_factor(p): max = 10. min = -10. z = 0. eps = 0.001 while ((max-min)...
unknown
codeparrot/codeparrot-clean
import { ssrInterpolate } from '../src/helpers/ssrInterpolate' import { escapeHtml } from '@vue/shared' test('ssr: interpolate', () => { expect(ssrInterpolate(0)).toBe(`0`) expect(ssrInterpolate(`foo`)).toBe(`foo`) expect(ssrInterpolate(`<div>`)).toBe(`&lt;div&gt;`) // should escape interpolated values expec...
typescript
github
https://github.com/vuejs/core
packages/server-renderer/__tests__/ssrInterpolate.spec.ts
# Copyright 2013-2014 Emiliano Mennucci # # This file is part of FriendlyPi. # # FriendlyPi 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 you...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='test config file include directives' . ./test-lib.sh # Force setup_explicit_git_dir() to run until the end. This is needed # by some tests to make sure real_path() is called on $GIT_DIR. The # caller needs to make sure git commands are run from a subdirectory # though or real_path() will n...
unknown
github
https://github.com/git/git
t/t1305-config-include.sh
# The MIT License (MIT) # Copyright (c) 2016, 2017 by the ESA CCI Toolbox development team and contributors # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including wi...
unknown
codeparrot/codeparrot-clean
from struct import unpack, pack from . import BIFFRecords class StrCell(object): __slots__ = ["rowx", "colx", "xf_idx", "sst_idx"] def __init__(self, rowx, colx, xf_idx, sst_idx): self.rowx = rowx self.colx = colx self.xf_idx = xf_idx self.sst_idx = sst_idx def get_biff_da...
unknown
codeparrot/codeparrot-clean
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-ServiceStager', 'Author': ['@harmj0y'], 'Description': ("Modifies a target service execute an Empire stager."), 'Background' : True, ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Authors: Jose & Alberto # from glob import glob from sys import argv from re import sub,findall,match,compile,DOTALL from nltk.corpus import stopwords from nltk.stem import SnowballStemmer import codecs try: from cPickle import dump,HIGHEST_PROTOCOL except: from pickle i...
unknown
codeparrot/codeparrot-clean
#------------------------------------------------------------------------------ # Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. # # Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved. # # Portions Copyright 2001-2007, Computronix (Canada) Ltd., Edmonton, Alberta, # Canada...
unknown
codeparrot/codeparrot-clean
import os from unittest import mock from django.core.checks.async_checks import E001, check_async_unsafe from django.test import SimpleTestCase class AsyncCheckTests(SimpleTestCase): @mock.patch.dict(os.environ, {"DJANGO_ALLOW_ASYNC_UNSAFE": ""}) def test_no_allowed_async_unsafe(self): self.assertEqua...
python
github
https://github.com/django/django
tests/check_framework/test_async_checks.py
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- # # 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 program is ...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package mongodb import ( "context" "fmt" "io/ioutil" "net/url" "os" paths "path" "path/filepath" "reflect" "sort" "testing" "time" "github.com/hashicorp/vault/helper/testhelpers/certhelpers" dbplugin "github.com/hashicorp/vault/sdk/d...
go
github
https://github.com/hashicorp/vault
plugins/database/mongodb/connection_producer_test.go
#!/usr/bin/env python3 # Copyright (c) 2008-11 Qtrac Ltd. All rights reserved. # This program or module 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) an...
unknown
codeparrot/codeparrot-clean
"""View frustum modeling as series of clipping planes The Frustum object itself is only responsible for extracting the clipping planes from an OpenGL model-view matrix. The bulk of the frustum-culling algorithm is implemented in the bounding volume objects found in the OpenGLContext.scenegraph.boundingvolume module. ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # © Copyright 2011 Rockwell Collins, Inc # This file is part of Formose. # # Formose is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public L...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 import argparse import functools import os import pathlib import platform import subprocess import sys import tarfile import time import urllib.error import urllib.request import zipfile @functools.cache def trigger_automatic_root_certificate_update(url: str, timeout: int = 30) -> None: esc...
python
github
https://github.com/python/cpython
PCbuild/get_external.py
from panda3d.core import * from panda3d.physics import PhysicalNode from panda3d.physics import ParticleSystem from panda3d.physics import PointParticleFactory from panda3d.physics import ZSpinParticleFactory #from panda3d.physics import OrientedParticleFactory from panda3d.physics import BaseParticleRenderer from pan...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Capstone Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com> from __future__ import print_function from capstone import * from capstone.x86 import * from xprint import to_hex, to_x, to_x_32 X86_CODE64 = b"\x55\x48\x8b\x05\xb8\x13\x00\x00" X86_CODE16 = b"\x8d\x4c\x32\x08\x01\xd8\x81\xc6\x3...
unknown
codeparrot/codeparrot-clean
#========================================================================== # # Copyright Insight Software Consortium # # 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...
unknown
codeparrot/codeparrot-clean
import uuid import zeroconf import traceback CL_PORT = 12345 HEARTBEAT_TTL = 10 class MutexInfo(object): def __init__(self, uuid): self.uuid = uuid self.service = None self.queue = [] self.counter = 0 self.queues = {} self.watchdog = None class LockDirectory(dict):...
unknown
codeparrot/codeparrot-clean
# Copyright 2013, Mirantis 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 agre...
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
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package oss import ( "bytes" "crypto/md5" "encoding/hex" "encoding/json" "errors" "fmt" "io" "log" "time" "github.com/aliyun/aliyun-oss-go-sdk/oss" "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore" uuid "github.com/hashicorp/go-u...
go
github
https://github.com/hashicorp/terraform
internal/backend/remote-state/oss/client.go
# ========================================================================= # # Copyright NumFOCUS # # 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/licens...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import re import os import sys debug = True lines = sys.stdin.readlines() lemma = sys.argv[1] # INPUT: # - lines contain a list of "%i:goal" where "%i" is the index of the goal # - lemma contain the name of the lemma under scrutiny # OUTPUT: # - (on stdout) a list of ordered index separated by EOL ...
unknown
codeparrot/codeparrot-clean
// Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modi...
c
github
https://github.com/nodejs/node
src/async_wrap-inl.h
# Copyright (c) 2017 Charles University, Faculty of Arts, # Institute of the Czech National Corpus # Copyright (c) 2017 Tomas Machalek <tomas.machalek@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 publis...
unknown
codeparrot/codeparrot-clean
#define USE_THE_REPOSITORY_VARIABLE #include "git-compat-util.h" #include "config.h" #include "gettext.h" #include "hex.h" #include "path.h" #include "repository.h" #include "strbuf.h" #include "fsmonitor-ll.h" #include "fsmonitor-ipc.h" #include "fsmonitor-path-utils.h" static GIT_PATH_FUNC(fsmonitor_ipc__get_defaul...
c
github
https://github.com/git/git
compat/fsmonitor/fsm-ipc-darwin.c
#!/usr/bin/python3 # -*- coding: utf-8 -*- ################################################################################ # DChars-FE Copyright (C) 2012 Suizokukan # Contact: suizokukan _A.T._ orange dot fr # # This file is part of DChars-FE. # DChars-FE is free software: you can redistribute it and/or mo...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, unified_strdate, compat_str, determine_ext, ExtractorError, ) class DisneyIE(InfoExtractor): _VALID_URL = r'''(?x) https?://(?P<domain>(?:[^/]+\.)?(?:...
unknown
codeparrot/codeparrot-clean