code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
import dynamic from 'next/dynamic'; const DynamicComponentWithCustomLoading = dynamic(()=>import('../components/hello') , { loadableGenerated: { webpack: ()=>[ require.resolveWeak("../components/hello") ] }, loading: ()=><p >...</p> }); const DynamicClientOnlyComponent = ...
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/next-dynamic/with-options/output-prod.js
Design ====== This document describes how libnetwork has been designed in order to achieve this. Requirements for individual releases can be found on the [Project Page](https://github.com/docker/libnetwork/wiki). Many of the design decisions are inspired by the learnings from the Docker networking design as of Docker...
unknown
github
https://github.com/moby/moby
daemon/libnetwork/docs/design.md
"""Machinery for interspersing lines of text with linked and colored regions The typical entrypoints are es_lines() and html_line(). Within this file, "tag" means a tuple of (file-wide offset, is_start, payload). """ import cgi from itertools import chain try: from itertools import compress except ImportError: ...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # @author - Fekete Mihai <feketemihai@gmail.com> # Copyright (C) 2011 TOTAL PC SYSTEMS (http://www.www.erpsystems.ro). # Copyright (C) 2009 (<http://www.filsystem.ro>) # # This program is free softwar...
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...
c
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/erasurecode/erasure_code.h
pr: 140637 summary: CPS handles datastreams area: Search type: enhancement issues: []
unknown
github
https://github.com/elastic/elasticsearch
docs/changelog/140637.yaml
# encoding: utf-8 """A fancy version of Python's builtin :func:`dir` function. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import inspect from .py3compat import string_types def safe_hasattr(obj, attr): """In recent versions of Python, hasattr() only c...
unknown
codeparrot/codeparrot-clean
__author__ = 'tylin' __version__ = '1.0.1' # Interface for accessing the Microsoft COCO dataset. # Microsoft COCO is a large image dataset designed for object detection, # segmentation, and caption generation. pycocotools is a Python API that # assists in loading, parsing and visualizing the annotations in COCO. # Ple...
unknown
codeparrot/codeparrot-clean
""" ============================================= Integration and ODEs (:mod:`scipy.integrate`) ============================================= .. currentmodule:: scipy.integrate Integrating functions, given function object ============================================ .. autosummary:: :toctree: generated/ quad ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from calaccess_raw import fields from django.utils.encoding import python_2_unicode_compatible from .base import CalAccessBaseModel @python_2_unicode_compatible class CvrSoCd(CalAccessBaseModel): """ Cover page for a statement of organization creation or termination ...
unknown
codeparrot/codeparrot-clean
- Feature Name: DateStyle/IntervalStyle Enabled by Default - Status: in-progress - Start Date: 2021-11-12 - Authors: Ebony Brown - RFC PR: [#75084](https://github.com/cockroachdb/cockroach/pull/75084) - Cockroach Issue: [#69352](https://github.com/cockroachdb/cockroach/issues/69352) # Summary This document describes ...
unknown
github
https://github.com/cockroachdb/cockroach
docs/RFCS/20211220_DateStyle_IntervalStyle_Default.md
################################################ ### Battleships coded by TeCoEd ################ ################################################ '''Text to Speach from http://www.fromtexttospeech.com/''' import random import time import pygame from pygame.locals import * from sense_hat import SenseHat pygame.init(...
unknown
codeparrot/codeparrot-clean
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
c
github
https://github.com/curl/curl
docs/examples/imap-create.c
# -*- coding: utf-8 -*- import copy from django.test.client import RequestFactory from elasticsearch_dsl import Search from mock import Mock, patch from rest_framework import serializers from olympia import amo from olympia.amo.tests import TestCase, create_switch from olympia.constants.categories import CATEGORIES ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'FormFieldOption.label' db.alter_column(u'customforms_fo...
unknown
codeparrot/codeparrot-clean
# Ansible module to manage CheckPoint Firewall (c) 2019 # # 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 dist...
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\HttpFoundation; // Help opcache.preload discover alwa...
php
github
https://github.com/symfony/symfony
src/Symfony/Component/HttpFoundation/Response.php
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package terraform import ( "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/int...
go
github
https://github.com/hashicorp/terraform
internal/terraform/hook.go
## Input ```javascript function Component() { const onClick = () => { // Cannot assign to globals someUnknownGlobal = true; moduleLocal = true; }; // It's possible that this could be an event handler / effect function, // but we don't know that and optimistically assume it will only be // called ...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-reassignment-to-global-function-jsx-prop.expect.md
# start compatibility with IPython Jupyter 4.0+ try: from jupyter_client import BlockingKernelClient except ImportError: from IPython.kernel import BlockingKernelClient # python3/python2 nonsense try: from Queue import Empty except: from queue import Empty import atexit import subprocess import uuid i...
unknown
codeparrot/codeparrot-clean
# # Copyright (c) 2013 Docker, 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 requir...
unknown
codeparrot/codeparrot-clean
import {browser, element, by} from 'protractor'; describe('Reactive forms', () => { const nameEditor = element(by.css('app-name-editor')); const profileEditor = element(by.css('app-profile-editor')); const nameEditorButton = element(by.cssContainingText('app-root > nav > button', 'Name Editor')); const profile...
typescript
github
https://github.com/angular/angular
adev/src/content/examples/reactive-forms/e2e/src/app.e2e-spec.ts
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Numérigraphe SARL. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Genera...
unknown
codeparrot/codeparrot-clean
#ifndef SRC_NODE_WEBSTORAGE_H_ #define SRC_NODE_WEBSTORAGE_H_ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include "base_object.h" #include "node_mem.h" #include "sqlite3.h" #include "util.h" namespace node { namespace webstorage { struct conn_deleter { void operator()(sqlite3* conn) const noexcept { ...
c
github
https://github.com/nodejs/node
src/node_webstorage.h
import os import sys from fnmatch import fnmatch import logging import time from datetime import datetime import requests.sessions from requests.adapters import HTTPAdapter from requests.exceptions import HTTPError from requests import Response from clint.textui import progress import six import six.moves.urllib as ur...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # -*- python-indent-offset: 2 -*- # Copyright (c) 2014, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in # the LICENSE file in the root directory of this source tree. An # additional grant of patent rights can be found in the PATENTS file...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleBuildFieldSetter.java
# # Python Imaging Library # $Id: GimpPaletteFile.py 2134 2004-10-06 08:55:20Z fredrik $ # # stuff to read GIMP palette files # # History: # 1997-08-23 fl Created # 2004-09-07 fl Support GIMP 2.0 palette files. # # Copyright (c) Secret Labs AB 1997-2004. All rights reserved. # Copyright (c) Fredrik Lundh 1997-...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataResourceNotFoundException.java
# coding=utf-8 from django.core.management.base import BaseCommand import os, re, sys class Command(BaseCommand): help = 'This is for rebooting the web part of the RapidSMS system (which is linked to Cherokee).' def handle(self, **args): moi = os.getenv('USER', os.getlogin()) permis = 'root' ...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # Copyright 2018 The Microsoft Research Asia LayoutLM Team 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 # # Unles...
unknown
codeparrot/codeparrot-clean
/** * @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 */ /* * Public API Surface of shared-utils */ export * from './lib/shared-utils'; export * from './lib/angular-check...
typescript
github
https://github.com/angular/angular
devtools/projects/shared-utils/src/public-api.ts
use std::{ future::Future, pin::Pin, task::{Context, Poll}, }; use actix_http::{error::PayloadError, Payload}; use bytes::{Bytes, BytesMut}; use futures_core::{ready, Stream}; use pin_project_lite::pin_project; pin_project! { pub(crate) struct ReadBody<S> { #[pin] pub(crate) stream: Pa...
rust
github
https://github.com/actix/actix-web
awc/src/responses/read_body.rs
# This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either...
unknown
codeparrot/codeparrot-clean
#import <ATen/native/metal/MetalConvParams.h> #import <ATen/native/metal/MetalPrepackOpContext.h> #include <c10/util/ArrayRef.h> namespace at::native::metal { Tensor conv2d( const Tensor& input, const Tensor& weight, const std::optional<at::Tensor>& bias, IntArrayRef stride, IntArrayRef padding, ...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/metal/ops/MetalConvolution.h
# Copyright 2021 DeepMind Technologies Limited. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
unknown
codeparrot/codeparrot-clean
# # This file is part of pysnmp software. # # Copyright (c) 2005-2016, Ilya Etingof <ilya@glas.net> # License: http://pysnmp.sf.net/license.html # from pysnmp.smi.rfc1902 import * from pysnmp.entity.rfc3413 import ntforg from pysnmp.hlapi.auth import * from pysnmp.hlapi.context import * from pysnmp.hlapi.lcd import * f...
unknown
codeparrot/codeparrot-clean
# Copyright 2012, Jeroen Hoekx <jeroen@hoekx.be> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ve...
unknown
codeparrot/codeparrot-clean
/////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2012, Weta Digital Ltd // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // * Redistri...
c
github
https://github.com/opencv/opencv
3rdparty/openexr/IlmImf/ImfCompositeDeepScanLine.h
import unittest from test import test_support def funcattrs(**kwds): def decorate(func): func.__dict__.update(kwds) return func return decorate class MiscDecorators (object): @staticmethod def author(name): def decorate(func): func.__dict__['author'] = name ...
unknown
codeparrot/codeparrot-clean
// Copyright 2009 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. // Annotate Ref in Prog with C types by parsing gcc debug output. // Conversion of debug output to Go types. package main import ( "bytes" "debug/dwarf" "d...
go
github
https://github.com/golang/go
src/cmd/cgo/gcc.go
import gym import numpy y = .97 #Discount Rate learnRate = .2 totalEps = 1000 def updateQMat(q, reward, state, action, newState): futureReward = max(q[newState][:]) q[state][action] = q[state][action] + learnRate * (reward + y * futureReward - q[state][action]) return success = False lastFailEp = -1 firstSuccEp ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2017 - 2025 R. Thomas * Copyright 2017 - 2025 Quarkslab * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
unknown
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/MachO/ThreadCommand.hpp
# Copyright 2014 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 ...
unknown
codeparrot/codeparrot-clean
# This is a helper module for test_threaded_import. The test imports this # module, and this module tries to run various Python library functions in # their own thread, as a side effect of being imported. If the spawned # thread doesn't complete in TIMEOUT seconds, an "appeared to hang" message # is appended to the m...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import datetime import unittest from django.apps.registry import Apps from django.core.exceptions import ValidationError from django.db import models from django.test import TestCase from .models import ( CustomPKModel, FlexibleDatePost, ModelToValidate, Post, UniqueErrors...
unknown
codeparrot/codeparrot-clean
function Component() { const x = 4; const get4 = () => { while (bar()) { if (baz) { bar(); } } return () => x; }; return get4; }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/rewrite-phis-in-lambda-capture-context.js
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v2beta1", "metadata": { "name": "v40.refresh_empty_string.v42" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana", ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/input/migrated_dashboards_from_v0_to_v2/v2beta1.v40.refresh_empty_string.json
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn scalbnf(x: f32, n: i32) -> f32 { super::generic::scalbn(x, n) }
rust
github
https://github.com/nodejs/node
deps/crates/vendor/libm/src/math/scalbnf.rs
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Florent Cailhol @ooflorent */ "use strict"; const WebpackError = require("./WebpackError"); /** @typedef {import("./Compiler")} Compiler */ const PLUGIN_NAME = "WarnDeprecatedOptionPlugin"; class WarnDeprecatedOptionPlugin { /** * Create...
javascript
github
https://github.com/webpack/webpack
lib/WarnDeprecatedOptionPlugin.js
data = ( 'Lang ', # 0x00 'Kan ', # 0x01 'Lao ', # 0x02 'Lai ', # 0x03 'Xian ', # 0x04 'Que ', # 0x05 'Kong ', # 0x06 'Chong ', # 0x07 'Chong ', # 0x08 'Ta ', # 0x09 'Lin ', # 0x0a 'Hua ', # 0x0b 'Ju ', # 0x0c 'Lai ', # 0x0d 'Qi ', # 0x0e 'Min ', # 0x0f 'Kun ', # 0x10 '...
unknown
codeparrot/codeparrot-clean
{ "assetSchedule": "{{count}} de {{total}} ativos atualizados", "dagActions": { "delete": { "button": "Excluir Dag", "warning": "Isso removerá todas as metadados relacionados ao Dag, incluindo Execuções e Tarefas." } }, "favoriteDag": "Dag Favorito", "filters": { "allRunTypes": "Todos ...
json
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/public/i18n/locales/pt/dags.json
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-beans/src/test/java/org/springframework/beans/factory/aot/InstanceSupplierCodeGeneratorTests.java
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 //go:build !enterprise package pki import ( "github.com/hashicorp/vault/builtin/logical/pki/issuing" ) //go:generate go run github.com/hashicorp/vault/tools/stubmaker func (b *backend) adjustInputBundle(input *inputBundle) {} func entValidateR...
go
github
https://github.com/hashicorp/vault
builtin/logical/pki/common_criteria_stubs_oss.go
#!/usr/bin/env python # vim: sts=4 sw=4 et # This is a component of EMC # gladevcp Copyright 2010 Chris Morley # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2...
unknown
codeparrot/codeparrot-clean
import itertools import functools import numpy as np try: import bottleneck as bn _USE_BOTTLENECK = True except ImportError: # pragma: no cover _USE_BOTTLENECK = False import pandas.hashtable as _hash from pandas import compat, lib, algos, tslib from pandas.compat import builtins from pandas.core.common ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # coding=utf-8 import ast import requests import socket import socket import sys import threading from datetime import datetime class PortScanner(object): threads = [] def __init__(self, config, logfile): socket_codes = self.getSocketCodes() start_time = datetime.now() ...
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 # d...
unknown
codeparrot/codeparrot-clean
import unittest as real_unittest from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models import get_app, get_apps from django.test import _doctest as doctest from django.test.utils import setup_test_environment, teardown_test_environment from django.test.testcases...
unknown
codeparrot/codeparrot-clean
from ctypes import c_void_p from django.contrib.gis.geos.error import GEOSException # Trying to import GDAL libraries, if available. Have to place in # try/except since this package may be used outside GeoDjango. try: from django.contrib.gis import gdal except ImportError: # A 'dummy' gdal module. class ...
unknown
codeparrot/codeparrot-clean
""" This module defines the SArray class which provides the ability to create, access and manipulate a remote scalable array object. SArray acts similarly to pandas.Series but without indexing. The data is immutable, homogeneous, and is stored on the GraphLab Server side. """ ''' Copyright (C) 2015 Dato, Inc. All rig...
unknown
codeparrot/codeparrot-clean
// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: snap.proto package snappb import ( fmt "fmt" io "io" math "math" math_bits "math/bits" proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ ...
go
github
https://github.com/etcd-io/etcd
server/etcdserver/api/snap/snappb/snap.pb.go
# 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): db.execute("create unique index email on auth_user (email)") pass def backwards(self, orm): db.execute...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.vectorstores import Milvus # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. DE...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/vectorstores/milvus.py
# -*- coding: utf-8 -*- """ *************************************************************************** r_sum.py --------------------- Date : December 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *******************************...
unknown
codeparrot/codeparrot-clean
use std::cell::RefCell; use std::collections::{BTreeSet, HashMap}; use std::fmt; use std::str::FromStr; use proc_macro::Span; use proc_macro2::{Ident, TokenStream}; use quote::{ToTokens, format_ident, quote}; use syn::parse::ParseStream; use syn::punctuated::Punctuated; use syn::spanned::Spanned; use syn::{Attribute, ...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_macros/src/diagnostics/utils.rs
# -*- coding: utf-8 -*- # import sys, os import codecs import json import random from argparse import ArgumentParser sys.path.insert(1, os.path.join(sys.path[0], os.path.pardir)) from json_utils import load_json_file, load_json_stream def main(): parser = ArgumentParser() parser.add_argument("-s", "--seed", d...
unknown
codeparrot/codeparrot-clean
import re from django.conf import settings from django.contrib.auth.models import User from django.contrib.comments import signals from django.contrib.comments.models import Comment from regressiontests.comment_tests.models import Article, Book from regressiontests.comment_tests.tests import CommentTestCase post_redir...
unknown
codeparrot/codeparrot-clean
from ..util import jython, pypy, defaultdict, decorator from ..util.compat import decimal import gc import time import random import sys import types if jython: def jython_gc_collect(*args): """aggressive gc.collect for tests.""" gc.collect() time.sleep(0.1) gc.collect() gc...
unknown
codeparrot/codeparrot-clean
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) for collections, according to PEP 3119. DON'T USE THIS MODULE DIRECTLY! The classes here should be imported via collections; they are defined here only to alleviate certain bootstrappin...
unknown
codeparrot/codeparrot-clean
"""The tests for the Yandex SpeechKit speech platform.""" import asyncio import os import shutil import homeassistant.components.tts as tts from homeassistant.setup import setup_component from homeassistant.components.media_player import ( SERVICE_PLAY_MEDIA, DOMAIN as DOMAIN_MP) from tests.common import ( get...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # flake8: noqa import warnings import operator from itertools import product from distutils.version import LooseVersion import nose from nose.tools import assert_raises from numpy.random import randn, rand, randint import numpy as np from numpy.testing import assert_allclose from numpy.testing...
unknown
codeparrot/codeparrot-clean
#*************************************************************************** #* * #* Copyright (c) 2011, 2016 * #* Jose Luis Cercos Pita <jlcercos@gmail.com> * #* ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2008, 2009 Adriano Monteiro Marques # # Author: Francesco Piccinno <stack.box@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 Found...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals import io import logging import re import zipfile import babelfish import bs4 import requests from . import Provider from .. import __version__ from ..cache import region, SHOW_EXPIRATION_TIME, EPISODE_EXPIRATION_TIME from ..exceptions import ProviderError...
unknown
codeparrot/codeparrot-clean
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT window.__TAURI_ISOLATION_HOOK__ = (payload, options) => { return payload }
javascript
github
https://github.com/tauri-apps/tauri
examples/api/isolation-dist/index.js
# (c) 2016 Red Hat 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 dis...
unknown
codeparrot/codeparrot-clean
import sys from django.apps import apps from django.db import models def sql_flush(style, connection, reset_sequences=True, allow_cascade=False): """ Return a list of the SQL statements used to flush the database. """ tables = connection.introspection.django_table_names( only_existing=True, in...
python
github
https://github.com/django/django
django/core/management/sql.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # NoCmodel basic example # # Author: Oscar Diaz # Version: 0.1 # Date: 03-03-2011 # # This code 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; eith...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** QtNetwork.py --------------------- Date : March 2016 Copyright : (C) 2016 by Juergen E. Fischer Email : jef at norbit dot de ****************************...
unknown
codeparrot/codeparrot-clean
# This file is part of DEAP. # # DEAP 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) any later version. # # DEAP is distributed ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python ''' Use this in the same way as Python's SimpleHTTPServer: ./ssi_server.py [port] The only difference is that, for files ending in '.html', ssi_server will inline SSI (Server Side Includes) of the form: <!-- #include virtual="fragment.html" --> Run ./ssi_server.py in this directory and visit l...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2005 Junio C Hamano */ #define USE_THE_REPOSITORY_VARIABLE #define DISABLE_SIGN_COMPARE_WARNINGS #include "git-compat-util.h" #include "abspath.h" #include "base85.h" #include "config.h" #include "convert.h" #include "environment.h" #include "gettext.h" #include "tempfile.h" #include "revision.h"...
c
github
https://github.com/git/git
diff.c
""" Module with location helpers. detect_location_info and elevation are mocked by default during tests. """ import collections import math from typing import Any, Optional, Tuple, Dict import requests ELEVATION_URL = 'http://maps.googleapis.com/maps/api/elevation/json' FREEGEO_API = 'https://freegeoip.io/json/' IP_...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015 Blizzard Entertainment # # 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, publi...
unknown
codeparrot/codeparrot-clean
from direct.directnotify import DirectNotifyGlobal from direct.fsm import StateData import CogHQLoader, MintInterior from toontown.toonbase import ToontownGlobals from direct.gui import DirectGui from toontown.toonbase import TTLocalizer from toontown.toon import Toon from direct.fsm import State import CashbotHQExteri...
unknown
codeparrot/codeparrot-clean
""" The Netio switch component. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.netio/ """ import logging from collections import namedtuple from datetime import timedelta import voluptuous as vol from homeassistant.core import callback from home...
unknown
codeparrot/codeparrot-clean
from django.views.generic import TemplateView from django.http import HttpResponseRedirect from models import SocialFriendList from utils import setting REDIRECT_IF_NO_ACCOUNT = setting('SF_REDIRECT_IF_NO_SOCIAL_ACCOUNT_FOUND', False) REDIRECT_URL = setting('SF_REDIRECT_URL', "/") class FriendListView(TemplateView): ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2024 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.standalone.fir.test.cases.generated.cases.components.klibSourceFileP...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/generated/cases/components/klibSourceFileProvider/FirStandaloneNormalAnalysisSourceModuleGetKlibSourceFileNameTestGenerated.java
# # tohtml.py # # A sub-class container of the `Formatter' class to produce HTML. # # Copyright 2002-2015 by # David Turner. # # This file is part of the FreeType project, and may only be used, # modified, and distributed under the terms of the FreeType project # license, LICENSE.TXT. By continuing to use, mo...
unknown
codeparrot/codeparrot-clean
""" Move a file in the safest way possible:: >>> from django.core.files.move import file_move_safe >>> file_move_safe("/tmp/old_file", "/tmp/new_file") """ import os from django.core.files import locks try: from shutil import copystat except ImportError: import stat def copystat(src, dst): ...
unknown
codeparrot/codeparrot-clean
r"""UUID objects (universally unique identifiers) according to RFC 4122. This module provides immutable UUID objects (class UUID) and the functions uuid1(), uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5 UUIDs as specified in RFC 4122. If all you want is a unique ID, you should probably call uuid1() ...
unknown
codeparrot/codeparrot-clean
# # organize_photos.py: (C) 2011-2014 Sameer Sundresh. No warranty. # # exif_cache.py is a helper for organize_photos.py # # It maintains a cache file exif_cache.json in the source directory that # keeps track of which files have already been copied out of that source # directory, including where they were copied and t...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import frappe def execute(): if frappe.db.exists("DocType", "Student"): student_table_cols = frappe.db.get_table_columns("Student") if "father_name" in student_table_cols: frappe.reload_doc("schools", "doctype", "student") frappe.reload_doc("schools", "doctype", "guar...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # 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 distribut...
unknown
codeparrot/codeparrot-clean
""" ========================================================= SVM Margins Example ========================================================= The plots below illustrate the effect the parameter `C` has on the separation line. A large value of `C` basically tells our model that we do not have that much faith in our data's...
python
github
https://github.com/scikit-learn/scikit-learn
examples/svm/plot_svm_margin.py
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/net/altr,tse.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Altera Triple Speed Ethernet MAC driver (TSE) maintainers: - Maxime Chevallier <maxime.chevallier@bootlin.com> properties: co...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/net/altr,tse.yaml
# -*- coding: utf-8 -*- ''' tests.test_atom ''' import multiprocessing import threading import pytest import atomos.atom import atomos.multiprocessing.atom atoms = [(atomos.atom.Atom({}), threading.Thread), (atomos.multiprocessing.atom.Atom({}), multiprocessing.Process)] @pytest.fixture(params=atoms) def ...
unknown
codeparrot/codeparrot-clean
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. **Example** ```esql FROM airports | WHERE country == "India" | STATS extent = ST_EXTENT_AGG(location) ``` | extent:geo_shape | | --- | | BBOX (70.77995480038226, 91.5882289968431, 33.9830909203738, 8.47...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/functions/examples/st_extent_agg.md
# Copyright 2012 the V8 project authors. 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 conditi...
unknown
codeparrot/codeparrot-clean