code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#! /usr/bin/env python # repeated_stimulation.py # # Copyright (C) 2010 The NEST Initiative """ Simple example for how to repeat a stimulation protocol using the 'origin' property of devices. In this example, a poisson_generator generates a spike train that is recorded directly by a spike_detector, using the followi...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function import base64 import logging import os import unittest import urllib import urllib2 import urlparse import wptserve logging.basicConfig() wptserve.logger.set_logger(logging.getLogger()) here = os.path.split(__file__)[0] doc_root = os.path.join(here, "docroot") class Request(u...
unknown
codeparrot/codeparrot-clean
import sys import time from numpy import * UsingIronPython = False if sys.subversion[0] == 'IronPython': import System UsingIronPython = True #import numbers #from random import random class Complex(object): def __init__(self, r, i): self.__r = r self.__i = i def __eq__(self, other):...
unknown
codeparrot/codeparrot-clean
import { compile } from '../src' describe('ssr compile: suspense', () => { test('implicit default', () => { expect(compile(`<suspense><foo/></suspense>`).code).toMatchInlineSnapshot(` "const { resolveComponent: _resolveComponent, withCtx: _withCtx } = require("vue") const { ssrRenderComponent: _ssrRe...
typescript
github
https://github.com/vuejs/core
packages/compiler-ssr/__tests__/ssrSuspense.spec.ts
# =========================================================================== # Copyright 2013 University of Limerick # # This file is part of DREAM. # # DREAM 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 Founda...
unknown
codeparrot/codeparrot-clean
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de> ## ## 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 Li...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ Module to define matching template for checklist spreadsheet """ __author__ = "Graham Klyne (GK@ACM.ORG)" __copyright__ = "Copyright 2011-2013, University of Oxford" __license__ = "MIT (http://opensource.org/licenses/MIT)" from gridmatch import ( GridMatchReport, GridMatchErr...
unknown
codeparrot/codeparrot-clean
import time from indy import anoncreds, wallet import json import logging from indy import pool from src.utils import run_coroutine, PROTOCOL_VERSION logger = logging.getLogger(__name__) async def demo(): logger.info("Anoncreds sample -> started") issuer = { 'did': 'NcYxiDXkpYi6ov5FcYDi1e', ...
unknown
codeparrot/codeparrot-clean
""" Given a continuous time first order transfer function of the form: n1 * s + n0 ----------- s + d0 Compute the Tustin approximation and return a state space realization of this discrete time transfer function. """ from sympy import symbols, Poly, ccode, S, sqrt def discrete_realization_tustin(n0, n1...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (c) 2008 Steven Watanabe # # Distributed under 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 BoostBuild tester = BoostBuild.Tester() #########################################################...
unknown
codeparrot/codeparrot-clean
// This file is part of ICU4X. For terms of use, please see the file // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). //! Parsing, manipulating, and serializing Unicode Language and Locale Identifiers. //! //! This module is published ...
rust
github
https://github.com/nodejs/node
deps/crates/vendor/icu_locale_core/src/lib.rs
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/native/Histogram.h> #include <ATen/native/Resize.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/_histogramdd_bin_edges.h> #inclu...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/Histogram.cpp
# -*- coding: utf-8 -*- """ *************************************************************************** EditScriptAction.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **********************...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/display/solomon,ssd1307fb.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Solomon SSD1307 OLED Controller Framebuffer maintainers: - Maxime Ripard <mripard@kernel.org> - Javier Martinez C...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
# 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
# (c) 2018, Western Telematic Inc. <kenp@wti.com> # (c) 2012-18 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 's...
unknown
codeparrot/codeparrot-clean
import geo from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Geo","arguments":["test",[1.0],{"a":2.0},3.0],"variableName":"geo"}';
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/next-font-loaders/many-args/output.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
import oe.path class NotFoundError(bb.BBHandledException): def __init__(self, path): self.path = path def __str__(self): return "Error: %s not found." % self.path class CmdError(bb.BBHandledException): def __init__(self, exitstatus, output): self.status = exitstatus self.o...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage PaloAltoNetworks Firewall # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish...
unknown
codeparrot/codeparrot-clean
{ "openFiles": ["src/app/app.ts", "src/app/app.html"], "type": "editor", "title": "Add form submission" }
json
github
https://github.com/angular/angular
adev/src/content/tutorials/signal-forms/steps/5-add-submission/config.json
"""Stuff that differs in different Python versions and platform distributions.""" from __future__ import absolute_import, division import os import sys from pip._vendor.six import text_type try: from logging.config import dictConfig as logging_dictConfig except ImportError: from pip.compat.dictconfig import ...
unknown
codeparrot/codeparrot-clean
"""add target offices Revision ID: 39b878094b02 Revises: f3a7c22264fe Create Date: 2017-03-16 15:38:48.261365 """ # revision identifiers, used by Alembic. revision = '39b878094b02' down_revision = 'f3a7c22264fe' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa import sqlalchemy_...
unknown
codeparrot/codeparrot-clean
export default function Categories({ categories }) { return ( <span className="ml-1"> under {categories.edges.length > 0 ? ( categories.edges.map((category, index) => ( <span key={index} className="ml-1"> {category.node.name} </span> )) ) : ( ...
javascript
github
https://github.com/vercel/next.js
examples/cms-drupal/components/categories.js
name: "\U0001F680 Feature request" description: Submit a proposal/request for a new transformers feature labels: [ "Feature request" ] body: - type: textarea id: feature-request validations: required: true attributes: label: Feature request description: | A clear and concise desc...
unknown
github
https://github.com/huggingface/transformers
.github/ISSUE_TEMPLATE/feature-request.yml
import urllib import pytest from mitmproxy.test import taddons from mitmproxy.test import tflow import mitmproxy.test.tutils from mitmproxy.addons import serverplayback from mitmproxy import options from mitmproxy import exceptions from mitmproxy import io def tdump(path, flows): w = io.FlowWriter(open(path, "wb...
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 ScaNN # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. DEP...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/vectorstores/scann.py
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the QtWebEngine module of the Qt Toolkit. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License Usage ...
unknown
codeparrot/codeparrot-clean
# The contents of this file are subject to the Mozilla Public 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.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS"basis, #...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from nose.tools import ( assert_in, assert_is_none, assert_equals, assert_raises, assert_not_equals ) from django.test import TestCase from student.tests.factories import UserFactory from verify_student.models import SoftwareSecurePhotoVerification, VerificationException class TestPhotoVeri...
unknown
codeparrot/codeparrot-clean
// Copyright 2019 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. //go:build dragonfly || freebsd || linux || netbsd || openbsd || solaris package main import ( "cmd/internal/buildid" "cmd/internal/hash" "cmd/link/interna...
go
github
https://github.com/golang/go
src/cmd/link/elf_test.go
/* MIT License * * Copyright (c) 2023 Brad House * * 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, ...
c
github
https://github.com/nodejs/node
deps/cares/src/lib/legacy/ares_parse_ptr_reply.c
# -*- coding: utf-8 -*- import sys sys.path[0:0] = [""] import bson import os import pickle import unittest import uuid import weakref from datetime import datetime from bson import DBRef, ObjectId from tests import fixtures from tests.fixtures import (PickleEmbedded, PickleTest, PickleSignalsTest, ...
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/index/CandidateComponentsIndex.java
/* 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/core/kernels/sparse/mat_mul_op.h
""" ======================== Random Number Generation ======================== Use ``default_rng()`` to create a `Generator` and call its methods. =============== ========================================================= Generator --------------- --------------------------------------------------------- Generator ...
python
github
https://github.com/numpy/numpy
numpy/random/__init__.py
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.agent_toolkits.spark_sql.toolkit import SparkSQLToolkit # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # ...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/agents/agent_toolkits/spark_sql/toolkit.py
//===--- TypeContextInfo.h --------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2019 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE....
c
github
https://github.com/apple/swift
include/swift/IDE/TypeContextInfo.h
# -*- coding: utf-8 -*- """ Contains the crawling models. We use namedtuple for most models (easier to pickle, lower footprint, indicates that it is immutable) and we use classes for objects with mutable states and helper methods. Classes with crawling logic are declared in the crawler module. """ from __future__ impo...
unknown
codeparrot/codeparrot-clean
#------------------------------------------------------------------------------- # # Insteon IO linc 2450 # import iofun import message from device import Device from switch import Switch from querier import Querier from querier import MsgHandler from threading import Timer from linkdb import * from device import Lin...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import absolute_import from math import acos, asin, atan2, cos, degrees, pi, radians, sin, sqrt import numpy as np from auttitude.io import ( sphere_line, sphere_plane, translate_attitude, dcos_plane, dcos_line, format_attitude, ) from ...
unknown
codeparrot/codeparrot-clean
""" Social Facebook API """ # TODO # There are still some performance and scalability issues that should be # addressed for the various endpoints in this social_facebook djangoapp. # # For the Courses and Friends API: # For both endpoints, we are retrieving the same data from the Facebook server. # We are then simply ...
unknown
codeparrot/codeparrot-clean
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {render, screen, fireEvent} from '@testing-library/react'; import * as React from 'react'; import {expectLogsAndClear, lo...
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/e2e/update-expressions.e2e.js
# -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) store_version = 1 # Needed for dynamic plugin loading __license__ = 'GPL 3' __copyright__ = '2011, John Schember <john@nachtimwald.com>' __docformat__ = 'restructuredtext en' import urllib2 from contextlib im...
unknown
codeparrot/codeparrot-clean
from datetime import ( datetime, timedelta, ) import numpy as np import pytest from pandas.core.dtypes.cast import ( maybe_box_native, maybe_unbox_numpy_scalar, ) from pandas import ( Interval, Period, Timedelta, Timestamp, ) @pytest.mark.parametrize( "obj,expected_dtype", [ ...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/dtypes/cast/test_box_unbox.py
/*------------------------------------------------------------------------- * * postgres.h * Primary include file for PostgreSQL server .c files * * This should be the first file included by PostgreSQL backend modules. * Client-side code should include postgres_fe.h instead. * * * Portions Copyright (c) 1996...
c
github
https://github.com/postgres/postgres
src/include/postgres.h
from django.core.management.base import BaseCommand def module_to_dict(module, omittable=lambda k: k.startswith('_')): """Converts a module namespace to a Python dictionary.""" return dict((k, repr(v)) for k, v in module.__dict__.items() if not omittable(k)) class Command(BaseCommand): help = """Displays ...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0-or-later /* * CMAC: Cipher Block Mode for Authentication * * Copyright © 2013 Jussi Kivilinna <jussi.kivilinna@iki.fi> * * Based on work by: * Copyright © 2013 Tom St Denis <tstdenis@elliptictech.com> * Based on crypto/xcbc.c: * Copyright © 2006 USAGI/WIDE Project, * Aut...
c
github
https://github.com/torvalds/linux
crypto/cmac.c
"""Retriever that generates and executes structured queries over its own data source.""" import logging from collections.abc import Sequence from typing import Any from langchain_core.callbacks.manager import ( AsyncCallbackManagerForRetrieverRun, CallbackManagerForRetrieverRun, ) from langchain_core.document...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/retrievers/self_query/base.py
//===- bolt/Passes/ThreeWayBranch.cpp -------------------------------------===// // // 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
bolt/lib/Passes/ThreeWayBranch.cpp
//! Contains `ParseSess` which holds state living beyond what one `Parser` might. //! It also serves as an input to the parser itself. use std::str; use std::sync::Arc; use rustc_ast::attr::AttrIdGenerator; use rustc_ast::node_id::NodeId; use rustc_data_structures::fx::{FxHashMap, FxIndexMap, FxIndexSet}; use rustc_d...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_session/src/parse.rs
/* * Copyright 2014-2026 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.server.auth import io.ktor.http.HttpHeaders import io.ktor.http.HttpMethod import io.ktor.http.auth.* import io.ktor.server.application.* import io.ktor.server.request.* import ...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-plugins/ktor-server-auth/jvm/src/io/ktor/server/auth/DigestAuth.kt
import sys import types import unittest class Test_TestLoader(unittest.TestCase): ### Tests for TestLoader.loadTestsFromTestCase ################################################################ # "Return a suite of all tests cases contained in the TestCase-derived # class testCaseClass" def test...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0-or-later /* audit.c -- Auditing support * Gateway between the kernel (e.g., selinux) and the user-space audit daemon. * System-call specific features have moved to auditsc.c * * Copyright 2003-2007 Red Hat Inc., Durham, North Carolina. * All Rights Reserved. * * Written by Ric...
c
github
https://github.com/torvalds/linux
kernel/audit.c
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
unknown
codeparrot/codeparrot-clean
# Local development dependencies including docs building, website upload, ASV benchmark name: pandas-dev channels: - conda-forge dependencies: - python=3.11 - pip # build dependencies - versioneer - cython>=3.1.0,<4.0.0a0 - meson>=1.2.1,<2 - meson-python>=0.17.1,<1 # test dependencies - pytest>=8....
unknown
github
https://github.com/pandas-dev/pandas
environment.yml
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
/** * 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/util/TestDiskCheckerWithDiskIo.java
# subrepo.py - sub-repository handling for Mercurial # # Copyright 2009-2010 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import import copy import errno import os...
unknown
codeparrot/codeparrot-clean
#pragma once #include <cuda_runtime_api.h> #include <c10/core/DeviceGuard.h> #include <c10/core/Stream.h> #include <c10/cuda/CUDAFunctions.h> #include <c10/util/Exception.h> /* * Stream pool note. * * A CUDAStream is an abstraction of an actual cuStream on the GPU. CUDAStreams * are backed by cuStreams, but they...
c
github
https://github.com/pytorch/pytorch
c10/cuda/CUDAStream.h
/* * Copyright (C) 2014 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
java
github
https://github.com/google/guava
android/guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java
#include <stdio.h> #include <lsxintrin.h> int test() { const float src[] = { 0.0f, 1.0f, 2.0f, 3.0f}; v4f32 val = (v4f32)__lsx_vld((const float*)(src), 0); return __lsx_vpickve2gr_w(__lsx_vftint_w_s(val), 3); } int main() { printf("%d\n", test()); return 0; }
cpp
github
https://github.com/opencv/opencv
cmake/checks/cpu_lsx.cpp
import pip.download from pip.commands.search import (compare_versions, highest_version, transform_hits, SearchCommand) from pip.status_codes import NO_MATCHES_FOUND, SUCCESS from pip.backwardcompat import xmlrpclib, b fro...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # bhmm documentation build configuration file, created by # sphinx-quickstart on Tue Feb 17 11:49:20 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2022 - 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...
unknown
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/PDB/types/Attribute.hpp
# Benchmarks Benchmarks are tests to measure the performance of pandas. There are two different kinds of benchmarks relevant to pandas: * Internal pandas benchmarks to measure speed and memory usage over time * Community benchmarks comparing the speed or memory usage of different tools at doing the same job ## pan...
unknown
github
https://github.com/pandas-dev/pandas
web/pandas/community/benchmarks.md
# Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008 # # 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) a...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013 NTT DOCOMO, 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 requ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that when the same value is repeated for a gyp define, duplicates are stripped from the regeneration rule. """ import os impor...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # This file is part of emesene. # # emesene 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
<?php namespace Illuminate\Http\Client; use GuzzleHttp\Utils; /** * @mixin \Illuminate\Http\Client\Factory */ class Pool { /** * The factory instance. * * @var \Illuminate\Http\Client\Factory */ protected $factory; /** * The handler function for the Guzzle client. * ...
php
github
https://github.com/laravel/framework
src/Illuminate/Http/Client/Pool.php
# -*- coding: utf-8 -*- # $Id: ja.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: Hisashi Morita <hisashim@kt.rim.or.jp> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Tw...
unknown
codeparrot/codeparrot-clean
"""Test context locators.""" from __future__ import absolute_import from unittest import TestCase import threading from mock import sentinel from eventtracking import locator class TestThreadLocalContextLocator(TestCase): """Test context locators.""" def test_multithreaded_context(self): self.loca...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from nose.tools import * from nose import SkipTest import networkx as nx from base_test import BaseTestAttributeMixing,BaseTestDegreeMixing from networkx.algorithms.assortativity.correlation import attribute_ac class TestDegreeMixingCorrelation(BaseTestDegreeMixing): @classmethod def setu...
unknown
codeparrot/codeparrot-clean
import atexit import glob from inspect import isfunction, getargspec, ismethod from itertools import islice import os import sys def load_gremthon_jars(): for jar_dir in os.environ.get('GREMTHON_JAR_DIRS', '').split(':'): for jar in glob.glob(os.path.join(jar_dir, '*.jar')): if jar not in sys.p...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Boyd Adamson <boyd () boydadamson.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 th...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # Copyright 2012 Camptocamp SA (Guewen Baconnier) # Copyright (C) 2010 Sébastien Beau # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gen...
unknown
codeparrot/codeparrot-clean
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import os import re from ifmap_global import CamelCase def getLinkInfoType(ident, link_info): xlink = ident.getLink(link_info) if xlink.getXsdType(): return xlink.getCType().getName() return 'ApiPropertyBase' class JavaApiGener...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2017 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. """Generates GEN_JNI.java (or N.java) and helper for manual JNI registration. Creates a header file with two static functions: Registe...
unknown
codeparrot/codeparrot-clean
// Copyright 2013 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 bufio import ( "bytes" "errors" "io" "unicode/utf8" ) // Scanner provides a convenient interface for reading data such as // a file of newline-del...
go
github
https://github.com/golang/go
src/bufio/scan.go
import {Routes} from '@angular/router'; import {Home} from './home/home'; import {User} from './user/user'; export const routes: Routes = [ { path: '', title: 'App Home Page', component: Home, }, { path: 'user', title: 'App User Page', component: User, }, ];
typescript
github
https://github.com/angular/angular
adev/src/content/tutorials/learn-angular/steps/13-define-a-route/answer/src/app/app.routes.ts
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Citrix Systems # 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', ...
unknown
codeparrot/codeparrot-clean
# # test_codecmaps_kr.py # Codec mapping tests for ROK encodings # from test import support from test import multibytecodec_support import unittest class TestCP949Map(multibytecodec_support.TestBase_Mapping, unittest.TestCase): encoding = 'cp949' mapfileurl = 'http://www.unicode.org/Publi...
unknown
codeparrot/codeparrot-clean
# pylint: skip-file # flake8: noqa def main(): ''' ansible oadm module for manage-node ''' module = AnsibleModule( argument_spec=dict( debug=dict(default=False, type='bool'), kubeconfig=dict(default='/etc/origin/master/admin.kubeconfig', type='str'), node=di...
unknown
codeparrot/codeparrot-clean
use serde_derive::Serialize; #[derive(Serialize)] enum Enum { #[serde(serialize_with = "serialize_some_newtype_variant")] Struct { #[serde(skip_serializing_if = "always")] f1: String, f2: u8, }, } fn main() {}
rust
github
https://github.com/serde-rs/serde
test_suite/tests/ui/with-variant/skip_ser_struct_field_if.rs
/*! * @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 */ export const CODE_EDITOR_THEME_STYLES = { '&': { position: 'relative', width: '100%', height: '100%', ...
typescript
github
https://github.com/angular/angular
adev/src/app/editor/code-editor/constants/theme-styles.ts
# -*- coding: utf-8 -*- # ****************************************************************************** # # Copyright (C) 2009-2011 Olivier Tilloy <olivier@tilloy.net> # # This file is part of the pyexiv2 distribution. # # pyexiv2 is free software; you can redistribute it and/or # modify it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
--- title: Navigation Blocking --- # Navigation Blocking [MODES: framework, data] <br/> <br/> When users are in the middle of a workflow, like filling out an important form, you may want to prevent them from navigating away from the page. This example will show: - Setting up a route with a form and action called ...
unknown
github
https://github.com/remix-run/react-router
docs/how-to/navigation-blocking.md
#!/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. # Virtual Me2Me implementation. This script runs and manages the processes # required for a Virtual Me2Me desktop, which are: X se...
unknown
codeparrot/codeparrot-clean
__author__ = 'Thorsten Sick' import svgwrite class Card(): def __init__(self, offset=(0,0), size=(105,148), lines = 8, punchbox=((0,75),(100,140))): """ A Punchcard @param offset: Offset onsheet. That way I can print several cards on one sheet. Maybe later laser cut them @param size: Siz...
unknown
codeparrot/codeparrot-clean
<!-- Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agree...
unknown
github
https://github.com/huggingface/transformers
docs/source/ja/model_sharing.md
# 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 distributed in the hope that it will be useful, # bu...
unknown
codeparrot/codeparrot-clean
// Package urlutil provides helper function to check if a given build-context // location should be considered a URL or a remote Git repository. // // This package is specifically written for use with docker build contexts, and // should not be used as a general-purpose utility. package urlutil import ( "strings" "...
go
github
https://github.com/moby/moby
daemon/builder/remotecontext/urlutil/urlutil.go
# 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...
python
github
https://github.com/tensorflow/tensorflow
tensorflow/examples/speech_commands/generate_streaming_test_wav.py
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
unknown
codeparrot/codeparrot-clean
{ "kind": "CustomResourceDefinition", "apiVersion": "apiextensions.k8s.io/v1", "metadata": { "name": "dashboardcompatibilityscores.dashvalidator.ext.grafana.com" }, "spec": { "group": "dashvalidator.ext.grafana.com", "versions": [ { "name": "v1alpha1", "served": true, ...
json
github
https://github.com/grafana/grafana
apps/dashvalidator/definitions/dashboardcompatibilityscore.dashvalidator.ext.grafana.com.json
# 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
# This file implements a class which forms an interface to the .cdplayerrc # file that is maintained by SGI's cdplayer program. # # Usage is as follows: # # import readcd # r = readcd.Readcd() # c = Cdplayer(r.gettrackinfo()) # # Now you can use c.artist, c.title and c.track[trackno] (where trackno # starts at 1). Whe...
unknown
codeparrot/codeparrot-clean
# Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com> (main author) # Mathieu Blondel (partial_fit support) # # License: BSD 3 clause """Classification and regression using Stochastic Gradient Descent (SGD).""" import numpy as np import scipy.sparse as sp from abc import ABCMeta, abstractmethod import...
unknown
codeparrot/codeparrot-clean