code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
"""**Embedding models**. **Embedding models** are wrappers around embedding models from different APIs and services. Embedding models can be LLMs or not. """ import logging from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer from langchain_classic.embeddings.base import init_em...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/embeddings/__init__.py
""" Database API from web.py """ __all__ = [ "UnknownParamstyle", "UnknownDB", "TransactionError", "sqllist", "sqlors", "reparam", "sqlquote", "SQLQuery", "SQLParam", "sqlparam", "SQLLiteral", "sqlliteral", "database", 'DB', ] import time import os import urllib import itertools import pymysql pym...
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/bugprone/ThrowingStaticInitializationCheck.cpp
'use server' import ANYTHING from 'anything' export const { sampleFunction } = ANYTHING export const { sampleFunction2 } = ANYTHING() export let { 0: sampleFunction3, 1: sampleFunction4 } = [ANYTHING(), ANYTHING()]
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/server-actions/client-graph/3/input.js
import datetime import itertools import re from importlib import import_module from unittest import mock from urllib.parse import quote, urljoin from django.apps import apps from django.conf import settings from django.contrib.admin.models import LogEntry from django.contrib.auth import BACKEND_SESSION_KEY, REDIRECT_F...
python
github
https://github.com/django/django
tests/auth_tests/test_views.py
#!/usr/bin/env python """ @package mi.dataset.parser.phsen @file marine-integrations/mi/dataset/parser/phsen.py @author Emily Hahn @brief Parser for the mflm_phsen dataset driver Release notes: initial release """ __author__ = 'Emily Hahn' __license__ = 'Apache 2.0' import re import ntplib import time from datetime...
unknown
codeparrot/codeparrot-clean
"""Data Equivalence Tests""" from __future__ import print_function # Author: Teon Brooks <teon.brooks@gmail.com> # # License: BSD (3-clause) import os.path as op import inspect from nose.tools import assert_equal, assert_raises, assert_true import numpy as np from numpy.testing import (assert_array_almost_equal, ass...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "cases/helper" module ActiveRecord module ConnectionAdapters class ColumnDefinitionTest < ActiveRecord::TestCase class DummyAdapter < AbstractAdapter class << self def quote_column_name(column_name) column_name.to_s end ...
ruby
github
https://github.com/rails/rails
activerecord/test/cases/column_definition_test.rb
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of the G...
unknown
codeparrot/codeparrot-clean
import Link from "next/link"; import { useRouter } from "next/router"; import LocaleSwitcher from "../components/locale-switcher"; export default function IndexPage() { const router = useRouter(); const { locale, locales, defaultLocale } = router; return ( <div> <h1>Index page</h1> <p>Current lo...
typescript
github
https://github.com/vercel/next.js
examples/i18n-routing-pages/pages/index.tsx
// Copyright 2021 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 reflect // VisibleFields returns all the visible fields in t, which must be a // struct type. A field is defined as visible if it's accessible // direc...
go
github
https://github.com/golang/go
src/reflect/visiblefields.go
#!/usr/bin/env bash set -e SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ROOTDIR="$(cd "${SCRIPTDIR}/.." && pwd)" set -x # see also ".mailmap" for how email addresses and names are deduplicated cat > "${ROOTDIR}/AUTHORS" <<- EOF # File @generated by hack/generate-authors.sh. DO NOT EDIT. # This file l...
unknown
github
https://github.com/moby/moby
hack/generate-authors.sh
/* Generated file to emulate the ts namespace. */ export * from "../../compiler/_namespaces/ts.js"; import * as JsTyping from "./ts.JsTyping.js"; export { JsTyping }; import * as server from "./ts.server.js"; export { server };
typescript
github
https://github.com/microsoft/TypeScript
src/jsTyping/_namespaces/ts.ts
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import os im...
unknown
codeparrot/codeparrot-clean
//===--- ProtocolConformanceOptions.h - Conformance Options -----*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2020 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
include/swift/AST/ProtocolConformanceOptions.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/. """ Run a python script, adding extra directories to the python path. """ def main(args): def usage(): prin...
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.client.engine.jetty.jakarta import io.ktor.client.tests.* class JettyHttp2Test : Http2Test<JettyEngineConfig>(Jetty)
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-jetty-jakarta/jvm/test/io/ktor/client/engine/jetty/jakarta/JettyHttp2Test.kt
import sys from test.test_json import PyTest, CTest class TestScanstring: def test_scanstring(self): scanstring = self.json.decoder.scanstring self.assertEqual( scanstring('"z\\ud834\\udd20x"', 1, True), ('z\U0001d120x', 16)) self.assertEqual( scanstring...
unknown
codeparrot/codeparrot-clean
# Basically just a sanity check to make sure things don't change from underneath us. from django.test import TestCase from tastypie import http class HttpTestCase(TestCase): def test_201(self): response = http.HttpCreated(location='http://example.com/thingy/1/') self.assertEqual(response.status_co...
unknown
codeparrot/codeparrot-clean
from django.db import models from django.contrib.auth.models import AbstractUser, UserManager from django.utils import timezone from django.dispatch import receiver from django.db.models.signals import post_save from localflavor.in_ import in_states gettext_noop = lambda s: s EDUCATIONAL_ROLE= ( ('vb', gettext_no...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import argparse if __name__ == "__main__": parser = argparse.ArgumentParser(description="Rend a spatial data database/application") parser.add_argument("-t", "--tests", action="store_true") parser.add_argument("-p", "--port", type=int) parser.ad...
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/test/java/example/scannable_implicitbasepackage/ComponentScanAnnotatedConfigWithImplicitBasePackage.java
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """Integration tests for loading and saving netcdf files.""" # Import iris.tests first so that some things can be initialised ...
unknown
codeparrot/codeparrot-clean
# Copyright 2015-2016 ARM 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2021 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
unknown
github
https://github.com/huggingface/transformers
docs/source/en/model_doc/vilt.md
# -*- coding: utf-8 -*- # # satcfe/__init__.py # # Copyright 2015 Base4 Sistemas Ltda ME # # 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 # #...
unknown
codeparrot/codeparrot-clean
# 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 a...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2015 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 argparse import glob import os import subprocess import sys def run_test(test_base_name, cmd, reset_results): """Run a test c...
unknown
codeparrot/codeparrot-clean
"""Module for Entropy Coding Algorithms. .. module::entropy :platform: Unix, Windows .. modelauthor:: Juan C Galan-Hernandez <jcgalanh@gmail.com> """ from __future__ import division import itertools as it class arithmeticb(object): """Class of a binary arithmetic codec implemented assuming infinite flo...
unknown
codeparrot/codeparrot-clean
__kupfer_name__ = _("Trash") __kupfer_actions__ = ("MoveToTrash", "EmptyTrash") __kupfer_sources__ = ("TrashSource", ) __description__ = _("Access trash contents") __version__ = "2017.2" __author__ = "Ulrik Sverdrup <ulrik.sverdrup@gmail.com>" from gi.repository import Gio, GLib from kupfer.objects import Leaf, Actio...
unknown
codeparrot/codeparrot-clean
from primus.artifactcore import DoGroup, Project from primus.repartifact import DownloadArchivedFiles, DownloadFile from primus.fileartifact import RunMakefile from primus.pyartifact import SetupPythonPackage, CheckPythonEnvironment, ValidatePythonCode, RunPythonCode from primus.javaartifact import CompileJavaC...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # (C) British Crown Copyright 2012-5 Met Office. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under the terms of the GNU G...
unknown
codeparrot/codeparrot-clean
from typing import List import rich from pydantic import BaseModel from openai import OpenAI class Step(BaseModel): explanation: str output: str class MathResponse(BaseModel): steps: List[Step] final_answer: str client = OpenAI() with client.chat.completions.stream( model="gpt-4o-2024-08-06", ...
python
github
https://github.com/openai/openai-python
examples/parsing_stream.py
#!/usr/bin/env python # Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list ...
unknown
codeparrot/codeparrot-clean
# GitSuperRepository.py # # Copyright (C) 2011 Barry Wardell <barry.wardell@gmail.com> # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your opt...
unknown
codeparrot/codeparrot-clean
# # Network DBus service launcher. # # Copyright (C) 2020 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distr...
unknown
codeparrot/codeparrot-clean
#!/bin/false # -*- coding: utf8 -*- # This file is part of Espruino, a JavaScript interpreter for Microcontrollers # # Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk> # Copyright (C) 2014 Alain Sézille for NucleoF411RE specific lines of this file # # This Source Code Form is subject to the terms of the Mozilla Publi...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Steve English <steve.english@navetas.com> # # Copyright 2012 Vincent Jacques <vincent@vincent-ja...
unknown
codeparrot/codeparrot-clean
import urllib import urlparse from django.http import HttpResponseRedirect from mobiclicks import conf from mobiclicks.tasks import confirm_click class MobiClicksMiddleware(object): ''' If a request is redirected from MobiClicks, stores the acquisition code in the session so that conversions can be t...
unknown
codeparrot/codeparrot-clean
""" Support for Västtrafik public transport. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.vasttrafik/ """ from datetime import datetime from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor ...
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
# 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
# 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...
unknown
github
https://github.com/apache/airflow
airflow-core/tests/deprecations_ignore.yml
import numpy as np from six.moves import range from ...utils.jaggedarray import JaggedArray class CellGrid(object): """ Parameters ---------- vertices : array-like Vertex IDs at each grid cell vertices_per_cell : array-like Number of vertices per grid cell Returns ------- ...
unknown
codeparrot/codeparrot-clean
import operator_benchmark as op_bench import torch configs = op_bench.random_sample_configs( M=[1, 2, 3, 4, 5, 6], N=[7, 8, 9, 10, 11, 12], K=[13, 14, 15, 16, 17, 18], # probs saves the weights of each value probs=op_bench.attr_probs( M=[0.5, 0.2, 0.1, 0.05, 0.03, 0.1], N=[0.1, 0.3...
python
github
https://github.com/pytorch/pytorch
benchmarks/operator_benchmark/common/tests/random_sample_test.py
/* * 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.client.engine.cio import io.ktor.client.call.* import io.ktor.client.engine.* import io.ktor.client.plugins.websocket.WEBSOCKETS_KEY import io.ktor.client.request.* import io....
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-cio/common/src/io/ktor/client/engine/cio/utils.kt
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
c
github
https://github.com/curl/curl
docs/examples/sslbackend.c
#ifndef REFS_PACKED_BACKEND_H #define REFS_PACKED_BACKEND_H struct repository; struct ref_transaction; /* * Support for storing references in a `packed-refs` file. * * Note that this backend doesn't check for D/F conflicts, because it * doesn't care about them. But usually it should be wrapped in a * `files_ref_...
c
github
https://github.com/git/git
refs/packed-backend.h
"""Spectral Embedding""" # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # Wei LI <kuantkid@gmail.com> # License: BSD 3 clause import warnings import numpy as np from scipy import sparse from scipy.linalg import eigh from scipy.sparse.linalg import lobpcg from ..base import BaseEstimator from ..exter...
unknown
codeparrot/codeparrot-clean
import asyncio import functools import logging import bellows.types as t import bellows.uart as uart from bellows.commands import COMMANDS LOGGER = logging.getLogger(__name__) class EZSP: COMMANDS = COMMANDS ezsp_version = 4 def __init__(self): self._callbacks = {} self._seq = 0 ...
unknown
codeparrot/codeparrot-clean
// Copyright 2014 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 unix package syscall_test import ( "syscall" "testing" ) func TestMmap(t *testing.T) { b, err := syscall.Mmap(-1, 0, syscall.Getpagesize(), sys...
go
github
https://github.com/golang/go
src/syscall/mmap_unix_test.go
/* * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.tests import io.ktor.client.* import io.ktor.client.engine.mock.* import io.ktor.client.plugins.* import io.ktor.util.* import io.ktor.utils.io.core.* import kotlinx.coro...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-tests/common/test/io/ktor/client/tests/CommonHttpClientJvmTest.kt
"""Service for determining task timeouts.""" from typing import Any, Dict, NamedTuple, Optional import inject import structlog from buildscripts.resmoke_proxy.resmoke_proxy import ResmokeProxyService from buildscripts.timeouts.timeout import TimeoutEstimate from buildscripts.util.teststats import HistoricTaskData, n...
python
github
https://github.com/mongodb/mongo
buildscripts/timeouts/timeout_service.py
import datetime import isodate from pulp.server.db.connection import get_collection def migrate(*args, **kwargs): """ Add last_updated and last_override_config to the importer collection. """ updated_key = 'last_updated' config_key = 'last_override_config' collection = get_collection('repo_im...
unknown
codeparrot/codeparrot-clean
# sql/elements.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Core SQL expression elements, including :class:`.ClauseElement`, :class:`.ColumnE...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, Benno Joy <benno@ansible.com> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ...
unknown
codeparrot/codeparrot-clean
# 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. """Top-level presubmit script for isolate. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the presubmit API ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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 Lice...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 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 agree...
unknown
codeparrot/codeparrot-clean
import numpy as np import matplotlib.pyplot as plt from scipy.signal import hamming, triang, blackmanharris import sys, os, functools, time sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/')) import sineModel as SM import stft as STFT import utilFunctions as UF plt.f...
unknown
codeparrot/codeparrot-clean
"""Support for KEBA charging stations.""" import asyncio import logging from keba_kecontact.connection import KebaKeContact import voluptuous as vol from homeassistant.const import CONF_HOST from homeassistant.helpers import discovery import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogger(_...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import json import frappe.utils from frappe import _ class SignupDisabledError(frappe.PermissionError): pass no_cache = True def get_context(context): if frappe....
unknown
codeparrot/codeparrot-clean
""" Django settings for modlearn project. Generated by 'django-admin startproject' using Django 1.10.6. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import o...
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 us...
unknown
codeparrot/codeparrot-clean
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.document_loaders import ( UnstructuredAPIFileIOLoader, UnstructuredAPIFileLoader, UnstructuredFileIOLoader, UnstructuredFileLoader, ) from lan...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/document_loaders/unstructured.py
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # # This file is part of subliminal. # # subliminal 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...
unknown
codeparrot/codeparrot-clean
<?php declare(strict_types=1); /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Test\Re...
php
github
https://github.com/composer/composer
tests/Composer/Test/Repository/CompositeRepositoryTest.php
# The MIT License # # Copyright 2014, 2015 Piotr Dabkowski # # 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, modif...
unknown
codeparrot/codeparrot-clean
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/mlir/tensorflow/utils/device_util.h
# -*- coding: utf-8 -*- # # brunel_delta_nest.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 Licen...
unknown
codeparrot/codeparrot-clean
"""Support for HDMI CEC devices as switches.""" import logging from homeassistant.components.switch import DOMAIN, SwitchEntity from homeassistant.const import STATE_OFF, STATE_ON, STATE_STANDBY from . import ATTR_NEW, CecEntity _LOGGER = logging.getLogger(__name__) ENTITY_ID_FORMAT = DOMAIN + ".{}" def setup_plat...
unknown
codeparrot/codeparrot-clean
{ "applyable": true, "complete": true, "configuration": { "provider_config": { "tfcoremock": { "full_name": "registry.terraform.io/hashicorp/tfcoremock", "name": "tfcoremock", "version_constraint": "0.1.1" } }, "root_module": { "resources": [ { ...
json
github
https://github.com/hashicorp/terraform
testing/equivalence-tests/outputs/nested_objects_update/plan.json
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/FsPermission.java
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
unknown
codeparrot/codeparrot-clean
import py import sys, inspect from compiler import parse, ast, pycodegen from py._code.assertion import BuiltinAssertionError, _format_explanation passthroughex = py.builtin._sysex class Failure: def __init__(self, node): self.exc, self.value, self.tb = sys.exc_info() self.node = node class View(...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright (C) Viktor Szakats # # SPDX-License-Identifier: curl # Compare git repo files with tarball files and report a mismatch # after excluding exceptions. set -eu gitonly=".git* ^.* ^appveyor.* ^buildconf ^GIT-INFO.md ^README.md ^renovate.json ^REUSE.toml ^SECURITY.md ^LICENSES/* ^docs/exam...
unknown
github
https://github.com/curl/curl
.github/scripts/distfiles.sh
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package providers import ( "iter" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/tfdiags" ) // Interface represents the set of methods required for a co...
go
github
https://github.com/hashicorp/terraform
internal/providers/provider.go
# Copyright 2013 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
"""test script for a few new invalid token catches""" import sys from codecs import BOM_UTF8 from test.support import force_not_colorized from test.support import os_helper from test.support import script_helper from test.support import warnings_helper import unittest class EOFTestCase(unittest.TestCase): def tes...
python
github
https://github.com/python/cpython
Lib/test/test_eof.py
// Copyright The Prometheus Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
go
github
https://github.com/prometheus/prometheus
tsdb/head_dedupelabels.go
from django import template from django.contrib.admin.utils import quote from django.urls import Resolver404, get_script_prefix, resolve from django.utils.http import urlencode from django.utils.six.moves.urllib.parse import parse_qsl, urlparse, urlunparse register = template.Library() @register.filter def admin_urln...
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-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionPropertiesCodeGeneratorTests.java
# -*- test-case-name: twisted.conch.test.test_manhole -*- # Copyright (c) 2001-2007 Twisted Matrix Laboratories. # See LICENSE for details. """ Asynchronous local terminal input handling @author: Jp Calderone """ import os, tty, sys, termios from twisted.internet import reactor, stdio, protocol, defer from twisted....
unknown
codeparrot/codeparrot-clean
//===--- SimplifyRefCasts.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/SimplifyRefCasts.swift
from django.shortcuts import render, get_object_or_404 from django.template import RequestContext from django.http import HttpResponse, HttpResponseRedirect from django.core.urlresolvers import reverse from django.views.generic import TemplateView from django.core.servers.basehttp import FileWrapper from django.conf im...
unknown
codeparrot/codeparrot-clean
from common_fixtures import * # NOQA from test_docker import docker_client, TEST_IMAGE_UUID, if_docker import requests import jwt # work around flake8 issue docker_client @if_docker def test_stats_host(docker_client, context): host = docker_client.list_host()[0] sim_host = context.host assert 'stats' i...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf8 -*- # $Id: lt.py 6459 2010-10-29 22:07:34Z milde $ # Author: Dalius Dobravolskas <dalius.do...@gmail.com> # 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>. ...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
unknown
codeparrot/codeparrot-clean
# This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # wger W...
unknown
codeparrot/codeparrot-clean
{ "version": "1.0", "timeout": "10h", "builds": [ { "teamcity": { "configuration": "Kotlin_KotlinDev_SafeMergeCoordinator", "url": "https://buildserver.labs.intellij.net", "token": "${space-safe-merge-kt}", "ssl-keystore": "BuildServer client" } } ] }
json
github
https://github.com/JetBrains/kotlin
.space/safe-merge-coordinator.json
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __openerp__.p...
unknown
codeparrot/codeparrot-clean
from config.api2_0_config import * from modules.logger import Log from on_http_api2_0 import ApiApi as api20 from on_http_api2_0 import rest from proboscis.asserts import assert_equal from proboscis.asserts import assert_not_equal from proboscis.asserts import assert_true from proboscis.asserts import fail from probosc...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # pylint: disable=missing-docstring from __future__ import ( absolute_import, division, print_function, unicode_literals) import os from celery.schedules import crontab from readthedocs.core.settings import Settings try: import readthedocsext # noqa ext = True except ImportErro...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
unknown
codeparrot/codeparrot-clean
""" Serializer for video outline """ from rest_framework.reverse import reverse from xmodule.modulestore.mongo.base import BLOCK_TYPES_WITH_CHILDREN from xmodule.modulestore.django import modulestore from courseware.access import has_access from courseware.courses import get_course_by_id from courseware.model_data imp...
unknown
codeparrot/codeparrot-clean
"""Email backend that writes messages to a file.""" import datetime import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.mail.backends.console import \ EmailBackend as ConsoleEmailBackend from django.utils import six class EmailBackend(ConsoleEmailBa...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, 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 Lic...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import json import sys import re import glob import argparse import os from string import Template parser = argparse.ArgumentParser(description="""Generate C++ class for json handling from swagger definition""") parser.add_argument('--outdir', help='the output directory', default='autogen') pars...
unknown
codeparrot/codeparrot-clean