code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.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
ANSIBLE_METADATA = {'metadata_... | unknown | codeparrot/codeparrot-clean | ||
import unittest
import mock
from xcrawler.http.urls.url_formatter import UrlFormatter
from xcrawler.http.urls.url_validator import UrlValidator
class TestUrlFormatter(unittest.TestCase):
def setUp(self):
url_validator = mock.create_autospec(UrlValidator).return_value
self.url_formatter = UrlForma... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from django.shortcuts import render, redirect, render_to_response
from mng_lic import models as lic_models
from largefile import models as l_models
from django.http import HttpResponseBadRequest
from django.http import StreamingHttpResponse
from django.http import HttpResponseRedirect
import mat... | unknown | codeparrot/codeparrot-clean | ||
name: Claude Issue Triage Run
on:
workflow_run:
workflows: ["Claude Issue Triage"]
types: [completed]
jobs:
triage:
if: |
github.repository == 'pytorch/pytorch' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow.path == '.github/workflows/claude-issue-triag... | unknown | github | https://github.com/pytorch/pytorch | .github/workflows/claude-issue-triage-run.yml |
"""
Image transformation nodes based on the Python Image Library (PIL).
"""
from __future__ import absolute_import
import os
from nodetree import node, exceptions
import numpy
from PIL import Image
from . import base
from .. import stages
class RGBFileIn(base.ImageGeneratorNode, base.BinaryPngWriterMixin):
"""R... | unknown | codeparrot/codeparrot-clean | ||
# This file is generated by /tmp/pip-build-LbyYwr/scipy/-c
# It contains system_info results at the time of building this package.
__all__ = ["get_info","show"]
blas_info={'libraries': ['blas'], 'library_dirs': ['/usr/lib64']}
atlas_3_10_blas_info={}
lapack_info={'libraries': ['lapack'], 'library_dirs': ['/usr/lib64']... | 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.fir.symbols.pointers
import org.jetbrains.kotlin.analysis.api.KaSes... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/symbols/pointers/KaFirDynamicPropertySymbolPointer.kt |
#!/usr/bin/env python
import pygame
import gummy_panzer
import pkg_resources
import os
import sys
#new imports for this tutorial intro
from gummy_panzer import util, settings
from pygame.locals import *
settings.SCREEN_WIDTH = 800
settings.SCREEN_HEIGHT = 600
INTROWIDTH = 1600
NUMINTROS = 4
INTRO = 0
MAINMENU = 1
PLA... | unknown | codeparrot/codeparrot-clean | ||
import sys
sys.path.append('../')
import Graffity
import numpy
import PlotTools
import glob
import astropy.io.fits as pyfits
from scipy import optimize
import os
from os import walk
from os.path import join
import xlrd
def fitGaussian(x, y):
errfunc = lambda p, x, y: numpy.abs(p[0]*numpy.exp(-(x**2.0)/(2*p[1]**2.0... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright 2017 - 2025 R. Thomas
*
* 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... | cpp | github | https://github.com/nodejs/node | deps/LIEF/src/MachO/SubClient.cpp |
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googlegroups"
from pylearn2.testing.skip import skip_if_no_gpu
skip_if_no_gpu()
import numpy as np
from theano.... | unknown | codeparrot/codeparrot-clean | ||
# Copyright Bruno da Silva de Oliveira 2003. Use, modification and
# distribution is subject to the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import os.path
import copy
import exporters
from ClassExporter import ClassExporter
from F... | unknown | codeparrot/codeparrot-clean | ||
#ifndef _OPENCV_BOOST_H_
#define _OPENCV_BOOST_H_
#include "traincascade_features.h"
#include "old_ml.hpp"
struct CvCascadeBoostParams : CvBoostParams
{
float minHitRate;
float maxFalseAlarm;
CvCascadeBoostParams();
CvCascadeBoostParams( int _boostType, float _minHitRate, float _maxFalseAlarm,
... | c | github | https://github.com/opencv/opencv | apps/traincascade/boost.h |
---
navigation_title: "Dot expander"
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/reference/current/dot-expand-processor.html
---
# Dot expander processor [dot-expand-processor]
Expands a field with dots into an object field. This processor allows fields with dots in the name to be accessible by ot... | unknown | github | https://github.com/elastic/elasticsearch | docs/reference/enrich-processor/dot-expand-processor.md |
// Copyright 2006 Nemanja Trifunovic
/*
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivat... | c | github | https://github.com/nodejs/node | deps/LIEF/third-party/utfcpp/source/utf8.h |
import { ComponentType, useEffect, useState } from 'react';
import InfiniteScroll from 'react-infinite-scroll-component';
const initialNumberOfItemsDisplayed = 50;
export interface InfiniteScrollItemsProps<T> {
items: T[];
}
interface CustomInfiniteScrollProps<T> {
allItems: T[];
child: ComponentType<InfiniteS... | typescript | github | https://github.com/prometheus/prometheus | web/ui/react-app/src/components/CustomInfiniteScroll.tsx |
# 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/datamodels/ui/calendar.py |
# (c) 2013-2014, Benno Joy <benno@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later vers... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# (c) 2019, Ansible by Red Hat, inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from units.compat.mock import patch
from ansi... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: latin-1; py-indent-offset:4 -*-
################################################################################
#
# This file is part of HttxLib
#
# HttxLib is an HTTP(s) Python library suited multithreaded/multidomain
# applications
# Copyright (C) 2010 Daniel Rodriguez (aka Danie... | 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 | ||
<?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\Bridge\Doctrine\Form\EventListener;
use Doctrine\Common\Collect... | php | github | https://github.com/symfony/symfony | src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php |
from builtins import object
# Tastypie specific
from tastypie import fields
from tastypie.resources import ModelResource
from tastypie.constants import ALL, ALL_WITH_RELATIONS
from iati.models import *
class LanguageResource(ModelResource):
class Meta:
queryset = Language.objects.all()
include_reso... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2017, Eike Frost <ei@kefro.st>
#
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and ... | unknown | codeparrot/codeparrot-clean | ||
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | python | github | https://github.com/apache/airflow | airflow-core/tests/system/conftest.py |
//===----------------------------------------------------------------------===//
//
// 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/readability/InconsistentIfElseBracesCheck.cpp |
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define _MULTIARRAYMODULE
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <structmember.h>
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"
#include "arrayobject.h"
#include "arrayfunction_override.h"
#include "npy_argparse.h"
#include "npy_config.h"
... | c | github | https://github.com/numpy/numpy | numpy/_core/src/multiarray/methods.c |
#! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import re,string,traceback
from waflib import Logs,Utils,Errors
from waflib.Logs import debug,error
class PreprocError(Errors.WafError):
pass
POPFILE='-'
recursion_limit=150
... | unknown | codeparrot/codeparrot-clean | ||
#from cPickle import dump,load
from marshal import dump,load,dumps,loads
from multiprocessing import Lock
import os
from time import time
class no_lock:
def __enter__(self): pass
def __exit__(self,*a,**kw): pass
class KO:
"KV database where keys are in memory and values are stored in separate file"
def __init__(... | unknown | codeparrot/codeparrot-clean | ||
//===----------------------------------------------------------------------===//
//
// 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/utils/BracesAroundStatement.cpp |
# Copyright (C) 2014,2015 VA Linux Systems Japan K.K.
# Copyright (C) 2014,2015 YAMAMOTO Takashi <yamamoto at valinux co jp>
# 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 t... | unknown | codeparrot/codeparrot-clean | ||
package distribution
import (
"context"
"errors"
"fmt"
"io"
"net/http"
"runtime"
"sort"
"strconv"
"strings"
"github.com/Microsoft/hcsshim/osversion"
"github.com/containerd/log"
"github.com/docker/distribution"
"github.com/docker/distribution/manifest/manifestlist"
"github.com/docker/distribution/manifes... | go | github | https://github.com/moby/moby | daemon/internal/distribution/pull_v2_windows.go |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Check for stylistic and formal issues in .rst and .py
# files included in the documentation.
#
# 01/2009, Georg Brandl
# TODO: - wrong versions in versionadded/changed
# - wrong markup after versionchanged directive
import os
import re
import sys
import getopt
f... | unknown | codeparrot/codeparrot-clean | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package command
import (
"fmt"
"strings"
"github.com/hashicorp/cli"
"github.com/hashicorp/vault/api"
"github.com/posener/complete"
)
var (
_ cli.Command = (*LeaseRevokeCommand)(nil)
_ cli.CommandAutocomplete = (*LeaseRevokeCom... | go | github | https://github.com/hashicorp/vault | command/lease_revoke.go |
#!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# *************************************... | unknown | codeparrot/codeparrot-clean | ||
##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | unknown | codeparrot/codeparrot-clean | ||
//===----------------------------------------------------------------------===//
//
// 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/google/AvoidUnderscoreInGoogletestNameCheck.cpp |
name: SPIR-V Tests
permissions:
contents: read
on:
pull_request:
paths:
- 'llvm/lib/Target/SPIRV/**'
- 'llvm/test/CodeGen/SPIRV/**'
- '.github/workflows/spirv-tests.yml'
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
... | unknown | github | https://github.com/llvm/llvm-project | .github/workflows/spirv-tests.yml |
/* inflate.h -- internal inflate state definition
* Copyright (C) 1995-2019 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. A... | c | github | https://github.com/opencv/opencv | 3rdparty/zlib-ng/inflate.h |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import mock
from datetime import timedelta
from nose.tools import eq_
from configman.dotdict import DotDict
from soco... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | unknown | codeparrot/codeparrot-clean | ||
/*
* 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/rest/ConnectRestExtensionContext.java |
# 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 | codeparrot/codeparrot-clean | ||
""" Tests for the trait change event tracer. """
from traits.api import Float, HasTraits, on_trait_change
from traits.testing.unittest_tools import unittest
from traits import trait_notifiers
class FuzException(Exception):
pass
class Foo(HasTraits):
""" Test traits class with static and dynamic listeners.
... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.server.cio.backend
import io.ktor.http.*
import io.ktor.http.cio.*
import io.ktor.http.cio.internals.*
import io.ktor.server.cio.*
import io.ktor.util.cio.*
import io.ktor.uti... | kotlin | github | https://github.com/ktorio/ktor | ktor-server/ktor-server-cio/common/src/io/ktor/server/cio/backend/ServerPipeline.kt |
#!/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 distributed... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2013-2015 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This progr... | unknown | codeparrot/codeparrot-clean | ||
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import BearlyInterpreterTool
from langchain_community.tools.bearly.tool import (
BearlyInterpreterToolArguments,
FileInfo,
)
# Create a way to dynamica... | python | github | https://github.com/langchain-ai/langchain | libs/langchain/langchain_classic/tools/bearly/tool.py |
# 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 | ||
use serde_derive::Serialize;
mod remote {
pub enum E {
A { a: u8 },
}
}
#[derive(Serialize)]
#[serde(remote = "remote::E")]
pub enum E {
A {
#[serde(getter = "get_a")]
a: u8,
},
}
fn main() {} | rust | github | https://github.com/serde-rs/serde | test_suite/tests/ui/remote/enum_getter.rs |
package schemaversion_test
import (
"testing"
"github.com/grafana/grafana/apps/dashboard/pkg/migration/schemaversion"
)
func TestV6Migration(t *testing.T) {
testCases := []migrationTestCase{
{
name: "pulldowns to annotations conversion with existing annotations",
input: map[string]interface{}{
"schema... | go | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/schemaversion/v6_test.go |
//===--- SimplifyBuiltin.swift --------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | swift | github | https://github.com/apple/swift | SwiftCompilerSources/Sources/Optimizer/InstructionSimplification/SimplifyBuiltin.swift |
import unittest as ut
from io import BytesIO
from tfga.layers import (
GeometricProductDense, GeometricSandwichProductDense,
GeometricProductElementwise, GeometricSandwichProductElementwise,
GeometricProductConv1D,
GeometricAlgebraExp,
GeometricToTensor, GeometricToTensorWithKind,
TensorToGeomet... | unknown | codeparrot/codeparrot-clean | ||
- 0xEddie
- 3fuyang
- 43081j
- aarbi
- abdallah-nour
- abeadam
- abhi-kr-2100
- abhijeetpandit7
- AchThomas
- acusti
- adamdotjs
- adil62
- adriananin
- adrienharnay
- afzalsayed96
- AhmadMayo
- Ajayff4
- akamfoad
- alany411
- alberto
- AlemTuzlak
- Aleuck
- alexandernanberg
- alexanderson1993
- alexlbr
- AlexWebLab
- ... | unknown | github | https://github.com/remix-run/react-router | contributors.yml |
/*!
* 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/pages/Dag/Code/Code.tsx |
import { test, expect } from "@playwright/test";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
import type { Fixture, AppFixture } from "./helpers/create-fixture.js";
import { getElement, PlaywrightFixture } from "./helpers/playwright-fixture.js";
test.describe("Forms", () ... | typescript | github | https://github.com/remix-run/react-router | integration/form-test.ts |
"""Analyze git diffs to determine which directories need to be tested.
Intelligently determines which LangChain packages and directories need to be tested,
linted, or built based on the changes. Handles dependency relationships between
packages, maps file changes to appropriate CI job configurations, and outputs JSON
... | python | github | https://github.com/langchain-ai/langchain | .github/scripts/check_diff.py |
# benchmark -- automated system for testing distcc correctness
# and performance on various source trees.
# Copyright (C) 2002, 2003 by Martin Pool
# Copyright 2008 Google Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# (c) 2016, NetApp, Inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | unknown | codeparrot/codeparrot-clean | ||
import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
TestSession,
} from "../helpers/tsserver.js";
import {
File,
TestServerHost,
} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: applyChangesToOpenFiles::", () => {
function fileContentWith... | typescript | github | https://github.com/microsoft/TypeScript | src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts |
# $Id: doctree.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: Martin Blais <blais@furius.ca>
# Copyright: This module has been placed in the public domain.
"""Reader for existing document trees."""
from docutils import readers, utils, transforms
class Reader(readers.ReReader):
"""
Adapt the Reader API for... | unknown | codeparrot/codeparrot-clean | ||
#ifndef Py_INTERNAL_RANGE_H
#define Py_INTERNAL_RANGE_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef Py_BUILD_CORE
# error "this header requires Py_BUILD_CORE define"
#endif
typedef struct {
PyObject_HEAD
long start;
long step;
long len;
} _PyRangeIterObject;
#ifdef __cplusplus
}
#endif
#endif /... | c | github | https://github.com/python/cpython | Include/internal/pycore_range.h |
from flask import Flask, render_template
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.security import Security, SQLAlchemyUserDatastore, \
UserMixin, RoleMixin, login_required
# At top of file
#from flask_mail import Mail
# Create app
app = Flask(__name__)
app.config['DEBUG'] = True
app.config['SECR... | unknown | codeparrot/codeparrot-clean | ||
# buildReactiveFunction
## File
`src/ReactiveScopes/BuildReactiveFunction.ts`
## Purpose
The `buildReactiveFunction` pass converts the compiler's HIR (High-level Intermediate Representation) from a **Control Flow Graph (CFG)** representation to a **tree-based ReactiveFunction** representation that is closer to an AST... | unknown | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/docs/passes/21-buildReactiveFunction.md |
class MyType {};
// CHECK: class MyType0 {}; | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/test/clang-apply-replacements/Inputs/identical/identical.cpp |
#!/usr/bin/env bash
# Copyright 2017 The Cockroach Authors.
#
# Use of this software is governed by the CockroachDB Software License
# included in the /LICENSE file.
#
# On a Debian/Ubuntu system, installs the Azure CLI.
set -euxo pipefail
# Instructions from https://docs.microsoft.com/en-us/cli/azure/install-azure... | unknown | github | https://github.com/cockroachdb/cockroach | build/bootstrap/install-azure-cli.sh |
from openerp.osv import fields, osv
import openerp.addons.decimal_precision as dp
from openerp.tools.translate import _
class CashBox(osv.osv_memory):
_register = False
_columns = {
'name' : fields.char('Reason', required=True),
# Attention, we don't set a domain, because there is a journal_typ... | unknown | codeparrot/codeparrot-clean | ||
/*-------------------------------------------------------------------------
*
* reconstruct.h
* Reconstruct full file from incremental file and backup chain.
*
* Copyright (c) 2017-2026, PostgreSQL Global Development Group
*
* IDENTIFICATION
* src/bin/pg_combinebackup/reconstruct.h
*
*---------------------... | c | github | https://github.com/postgres/postgres | src/bin/pg_combinebackup/reconstruct.h |
# Angular without ZoneJS (Zoneless)
## Why use Zoneless?
The main advantages to removing ZoneJS as a dependency are:
- **Improved performance**: ZoneJS uses DOM events and async tasks as indicators of when application state _might_ have updated and subsequently triggers application synchronization to run change dete... | unknown | github | https://github.com/angular/angular | adev/src/content/guide/zoneless.md |
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | unknown | codeparrot/codeparrot-clean | ||
#
# (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 d... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import
import collections
import functools
import logging
try: # Python 3
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
from ._collections import RecentlyUsedContainer
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool
from ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2007-2008 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware imp... | 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 | ||
<?php
namespace Illuminate\Foundation\Providers;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Database\MigrationServiceProvider;
use Illuminate\Support\AggregateServiceProvider;
class ConsoleSupportServiceProvider extends AggregateServiceProvider implements DeferrableProvider
{
/**
* ... | php | github | https://github.com/laravel/framework | src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php |
//===--- GenExistential.h - IR generation for existentials ------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | c | github | https://github.com/apple/swift | lib/IRGen/GenExistential.h |
use crate::io::blocking::Blocking;
use crate::io::{AsyncRead, ReadBuf};
use std::io;
use std::pin::Pin;
use std::task::Context;
use std::task::Poll;
cfg_io_std! {
/// A handle to the standard input stream of a process.
///
/// The handle implements the [`AsyncRead`] trait, but beware that concurrent
/... | rust | github | https://github.com/tokio-rs/tokio | tokio/src/io/stdin.rs |
/*
* 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/testFixtures/java/org/springframework/beans/testfixture/beans/ITestBean.java |
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package rpcapi_test
import (
"context"
"testing"
"github.com/davecgh/go-spew/spew"
"github.com/hashicorp/terraform/internal/rpcapi"
"github.com/hashicorp/terraform/internal/rpcapi/terraform1/setup"
)
func TestInternalClientOpenClose(t *test... | go | github | https://github.com/hashicorp/terraform | internal/rpcapi/internal_client_test.go |
# 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 hashlib
import os
import sys
# when pylint runs the third_party module is the one from depot_tools
# pylint: disable=E0611
from third_party import... | unknown | codeparrot/codeparrot-clean | ||
""" Optimizations of the expression tree representation for better CSE
opportunities.
"""
from sympy.core.basic import Basic
from sympy.core.operations import AssocOp
from sympy.utilities.iterables import preorder_traversal
from sympy import Add, Mul
def assumed(e, name):
""" Return True if the given assumption ... | unknown | codeparrot/codeparrot-clean | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package states
import (
"fmt"
"github.com/hashicorp/terraform/internal/addrs"
)
// Resource represents the state of a resource.
type Resource struct {
// Addr is the absolute address for the resource this state object
// belongs to.
Addr add... | go | github | https://github.com/hashicorp/terraform | internal/states/resource.go |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015 GNS3 Technologies Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
... | unknown | codeparrot/codeparrot-clean | ||
import logging
import os
import sys
PROD_ROOT = os.environ.get('PROD_ROOT', os.getcwd())
sys.path.append(os.path.join(PROD_ROOT, 'src', 'python'))
from core.utils import remove_xdc
from processors.file_analyzer import FileAnalyzer
if __name__ == '__main__':
logging.basicConfig(filename='/var/log/torrent_gw.log',... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
42. Serialization
``django.core.serializers`` provides interfaces to converting Django
``QuerySet`` objects to and from "flat" data (i.e. strings).
"""
from __future__ import unicode_literals
from decimal import Decimal
from django.db import models
from django.utils import six
from django... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python2
""" SETUP tasks
# workaround for RHEL7
# curl https://copr.fedoraproject.org/coprs/lmr/Autotest/repo/epel-7/lmr-Autotest-epel-7.repo > /etc/yum.repos.d/lmr-Autotest-epel-7.repo
# yum --nogpgcheck -y install python-pip
# pip install selenium
yum --nogpgcheck -y install avocado python-selenium
adduse... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | unknown | codeparrot/codeparrot-clean | ||
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wuninitialized"
#endif
#include <c10/test/util/complex_test_common.h> | cpp | github | https://github.com/pytorch/pytorch | c10/test/util/complex_test.cpp |
<?php
namespace Illuminate\Cache;
class MemcachedLock extends Lock
{
/**
* The Memcached instance.
*
* @var \Memcached
*/
protected $memcached;
/**
* Create a new lock instance.
*
* @param \Memcached $memcached
* @param string $name
* @param int $seconds... | php | github | https://github.com/laravel/framework | src/Illuminate/Cache/MemcachedLock.php |
"""
Code for plotting curves with tangent lines.
"""
__author__ = "Ian Goodfellow"
try:
from matplotlib import pyplot
except Exception:
pyplot = None
def tangent_plot(x, y, s):
"""
Plots a curve with tangent lines.
Parameters
----------
x : list
List of x coordinates.
Ass... | unknown | codeparrot/codeparrot-clean | ||
import unittest
from streamlink.plugins.bfmtv import BFMTV
class TestPluginBFMTV(unittest.TestCase):
def test_can_handle_url(self):
# should match
self.assertTrue(BFMTV.can_handle_url("https://www.bfmtv.com/mediaplayer/live-video/"))
self.assertTrue(BFMTV.can_handle_url("https://bfmbusines... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#-*-coding:utf-8 --
from aliyunsdkcore import client
from aliyunsdkalidns.request.v20150109 import DescribeDomainInfoRequest
from aliyunsdkalidns.request.v20150109 import DescribeDomainRecordsRequest
from aliyunsdkalidns.request.v20150109 import UpdateDomainRecordRequest
import json
import urlparse
im... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
'''Collection of the shared exceptions used in testing'''
class TestingFrameworkException(Exception):
'''Generic exception for this testing framework, mostly a base class for others'''
_message = 'A generic testing framework error occured'
detail = None
debugInfo = None
def... | unknown | codeparrot/codeparrot-clean | ||
#Examen 2
#Abril 25 - 2018
#procesamiento digital de senales
#universidad santiago de cali
#Nombre:
#ID:
from scipy import signal
import matplotlib.pyplot as plt
import numpy as np
import sys
sys.path.append('tools/')
from fourierFunc import fourierAn
##########################################
#BLOQUE 1
#definir la fr... | 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
*/
import {ChangeDetectionStrategy, Component, computed, input} from '@angular/core';
import {ApiItemType} from '../int... | typescript | github | https://github.com/angular/angular | adev/src/app/features/references/api-item-label/api-item-label.component.ts |
# (C) British Crown Copyright 2010 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris 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 l... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
from os import getenv
from pathlib import Path
from sys import argv
import hashlib
import json
if len(argv) != 2:
print("ERROR: JSON info script requires output arg")
exit(1)
json_path = Path(argv[1])
bin_dir = Path(getenv("BIN_DIR"))
image_file = bin_dir / getenv("IMAGE_NAME")
if not... | unknown | codeparrot/codeparrot-clean | ||
from fabric.api import env, run, sudo, cd, local
from ydcommon.fab import *
env.hosts = ['amazon-dev', ]
env.use_ssh_config = True
dev_on_sh = True
def get_vars(keys):
branch = local("git branch --no-color 2> /dev/null | sed -e '/^[^*]/d'", capture=True).replace("* ", "").strip()
user = 'ubuntu'
prefix = ... | unknown | codeparrot/codeparrot-clean | ||
"""The tests for the Alexa component."""
# pylint: disable=protected-access
import asyncio
import datetime
import pytest
from homeassistant.core import callback
from homeassistant.setup import async_setup_component
from homeassistant.components import alexa
from homeassistant.components.alexa import const
SESSION_ID... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.