code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# functions for handling ABI checking of libraries import Options, Utils, os, Logs, samba_utils, sys, Task, fnmatch, re, Build from TaskGen import feature, before, after # these type maps cope with platform specific names for common types # please add new type mappings into the list below abi_type_maps = { '_Bool...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/display/arm,malidp.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Arm Mali Display Processor (Mali-DP) maintainers: - Liviu Dudau <Liviu.Dudau@arm.com> - Andre Przywara <andre.przywara@a...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/display/arm,malidp.yaml
# Copyright 2010-2017, The University of Melbourne # Copyright 2010-2017, Brian May # # This file is part of Karaage. # # Karaage 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...
unknown
codeparrot/codeparrot-clean
--- navigation_title: "Normalize for Stream" applies_to: stack: preview 9.1 mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/normalize-for-stream-processor.html --- # Normalize-for-Stream processor [normalize-for-stream-processor] Detects whether a document is OpenTelemetry-complian...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/enrich-processor/normalize-for-stream.md
from django.db import connection from django.db.models import CharField from django.db.models.functions import MD5 from django.test import TestCase from django.test.utils import register_lookup from ..models import Author class MD5Tests(TestCase): @classmethod def setUpTestData(cls): Author.objects.bu...
python
github
https://github.com/django/django
tests/db_functions/text/test_md5.py
@import "mixins/banner"; @include bsBanner(Grid); $include-column-box-sizing: true !default; @import "functions"; @import "variables"; @import "variables-dark"; @import "maps"; @import "mixins/breakpoints"; @import "mixins/container"; @import "mixins/grid"; @import "mixins/utilities"; @import "vendor/rfs"; @import...
unknown
github
https://github.com/twbs/bootstrap
scss/bootstrap-grid.scss
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigTreeConfigDataLocationResolver.java
use std::path::PathBuf; use super::split_extern_opt; use crate::EarlyDiagCtxt; use crate::config::UnstableOptions; /// Verifies split_extern_opt handles the supported cases. #[test] fn test_split_extern_opt() { let early_dcx = EarlyDiagCtxt::new(<_>::default()); let unstable_opts = &UnstableOptions::default()...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_session/src/config/externs/tests.rs
from kivy.adapters.dictadapter import DictAdapter from kivy.adapters.models import SelectableDataItem from kivy.uix.selectableview import SelectableView from kivy.uix.listview import ListView, ListItemButton from kivy.uix.gridlayout import GridLayout from kivy.uix.boxlayout import BoxLayout from kivy.lang import Builde...
unknown
codeparrot/codeparrot-clean
# # Copyright (c) 2015 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> #include <nginx.h> static void ngx_show_version_info(void); static ngx_int_t ngx_add_inherited_sockets(ngx_cycle_t *cycle); static void ngx_cleanup_environment(void *data); static void ngx_cleanup_environmen...
c
github
https://github.com/nginx/nginx
src/core/nginx.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 ...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/BufferedIOStatisticsOutputStream.java
from tempfile import NamedTemporaryFile import pytest import numpy as np from numpy._core._multiarray_umath import ( _discover_array_parameters as discover_array_params, _get_sfloat_dtype, ) from numpy.testing import assert_array_equal SF = _get_sfloat_dtype() class TestSFloat: def _get_array(self, scal...
python
github
https://github.com/numpy/numpy
numpy/_core/tests/test_custom_dtypes.py
from __future__ import print_function import os import numpy as np try: import vtk from vtk.util.numpy_support import vtk_to_numpy except BaseException: pass def calculate_vtk_max_pointwise_difference(file1, file2, tol=1e-6): arrays = [0] * 2 reader = vtk.vtkStructuredPointsReader() for i, fna...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "abstract_unit" class HTMLTest < ActiveSupport::TestCase test "formats returns symbol for recognized MIME type" do assert_equal :html, ActionView::Template::HTML.new("", :html).format end test "formats returns string for recognized MIME type when MIME does not have sym...
ruby
github
https://github.com/rails/rails
actionview/test/template/html_test.rb
//===----------------------------------------------------------------------===// // // 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/misc/MisleadingIdentifierCheck.cpp
import azure.cosmos.documents as documents import azure.cosmos.cosmos_client as cosmos_client import azure.cosmos.errors as errors import samples.Shared.config as cfg # ---------------------------------------------------------------------------------------------------------- # Prerequistes - # # 1. An Azure Cosmos ac...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 OpenStack LLC. # 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 b...
unknown
codeparrot/codeparrot-clean
import unittest from doctest import DocTestSuite from test import support import threading import weakref import gc class Weak(object): pass def target(local, weaklist): weak = Weak() local.weak = weak weaklist.append(weakref.ref(weak)) class ThreadingLocalTest(unittest.TestCase): def test_local...
unknown
codeparrot/codeparrot-clean
""" Tests the usecols functionality during parsing for all of the parsers defined in parsers.py """ from io import StringIO import pytest from pandas import DataFrame import pandas._testing as tm pytestmark = pytest.mark.filterwarnings( "ignore:Passing a BlockManager to DataFrame:DeprecationWarning" ) def test...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/io/parser/usecols/test_strings.py
""" Copyright 2008, 2009, 2011 Free Software Foundation, Inc. This file is part of GNU Radio SPDX-License-Identifier: GPL-2.0-or-later """ import os import logging from gi.repository import Gtk, Gdk, GObject from . import Bars, Actions, Utils from .BlockTreeWindow import BlockTreeWindow from .Console import Consol...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es6.ts] //// //// [asyncUnParenthesizedArrowFunction_es6.ts] declare function someOtherFunction(i: any): Promise<void>; const x = async i => await someOtherFunction(i) const x1 = async (i) => await someOtherFunction(i); //// ...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.js
from amqpstorm.compatibility import json from amqpstorm.compatibility import quote from amqpstorm.management.base import ManagementHandler API_QUEUE = 'queues/%s/%s' API_QUEUE_PURGE = 'queues/%s/%s/contents' API_QUEUES = 'queues' API_QUEUES_VIRTUAL_HOST = 'queues/%s' API_QUEUE_BINDINGS = 'queues/%s/%s/bindings' API_QU...
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.test.cases.generated.cases.components.expressionInfoProvider; i...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/expressionInfoProvider/FirIdeNormalAnalysisSourceModuleReturnTargetSymbolTestGenerated.java
{ "favorite": { "favoriteDags_many": "Primeros {{count}} Dags Favoritos", "favoriteDags_one": "Primer {{count}} Dag Favorito", "favoriteDags_other": "Primeros {{count}} Dags Favoritos", "noDagRuns": "Aún no hay Ejecuciones de Dag para este Dag.", "noFavoriteDags": "Aún no hay favoritos. Haz clic e...
json
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/public/i18n/locales/es/dashboard.json
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'network'} DOCUMENTATION = """ --- module: nxos_interfac...
unknown
codeparrot/codeparrot-clean
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from sqlalchemy.ext.declarative import declared_attr from indico...
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/PropertyDescriptorUtilsPropertyResolutionTests.java
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
unknown
codeparrot/codeparrot-clean
from ryu.base.app_manager import RyuApp from ryu.controller.ofp_event import EventOFPSwitchFeatures from ryu.controller.ofp_event import EventOFPMeterStatsReply from ryu.controller.handler import set_ev_cls from ryu.controller.handler import CONFIG_DISPATCHER from ryu.controller.handler import MAIN_DISPATCHER from ryu....
unknown
codeparrot/codeparrot-clean
"""Item Loader See documentation in docs/topics/loaders.rst """ from collections import defaultdict import six from scrapy.item import Item from scrapy.selector import Selector from scrapy.utils.decorators import deprecated from scrapy.utils.deprecate import create_deprecated_class from scrapy.utils.misc import arg_...
unknown
codeparrot/codeparrot-clean
import numpy as np import pytest from pandas import ( TimedeltaIndex, Timestamp, ) import pandas._testing as tm class TestSearchSorted: def test_searchsorted_different_argument_classes(self, listlike_box): idx = TimedeltaIndex(["1 day", "2 days", "3 days"]) result = idx.searchsorted(listli...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/indexes/timedeltas/test_searchsorted.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
#!/usr/bin/env python """Status and configuration for SPIcam. History: 2007-05-22 ROwen 2008-02-11 ROwen Modified to use new TUI.Inst.StatusConfigWdg. 2008-02-12 ROwen Bug fix: was using instName=Expose for the expose window. 2008-03-13 ROwen Simplified the test code (copying that for NICFPS). 2011-08-11 ROwe...
unknown
codeparrot/codeparrot-clean
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE import os import gc #<-- added 21 may 2009 by mm from glob import glob import numpy from opus_core.logger import logger from opus_core.store.storage import Storage from opus_core.misc import is_file_i...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package addrs import ( "fmt" "testing" ) func TestInstanceKeyString(t *testing.T) { tests := []struct { Key InstanceKey Want string }{ { IntKey(0), `[0]`, }, { IntKey(5), `[5]`, }, { StringKey(""), `[""]`, },...
go
github
https://github.com/hashicorp/terraform
internal/addrs/instance_key_test.go
#![warn(rust_2018_idioms)] #![cfg(all(feature = "full", not(target_os = "wasi")))] // Wasi does not support bind() use tokio::net::TcpListener; use tokio_test::assert_ok; use std::io::prelude::*; use std::net::TcpStream; use std::thread; #[tokio::test] #[cfg_attr(miri, ignore)] // No `socket` on miri. async fn echo_...
rust
github
https://github.com/tokio-rs/tokio
tokio/tests/buffered.rs
# --- import -------------------------------------------------------------------------------------- import os import numpy as np import WrightTools as wt from . import _pulse from ._scan import Scan # --- define -------------------------------------------------------------------------------------- here = os.path....
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.server.config.yaml import com.charleskorn.kaml.Yaml import com.charleskorn.kaml.YamlMap import kotlinx.serialization.decodeFromString import java.io.File /** * Loads a confi...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-config-yaml/jvm/src/io/ktor/server/config/yaml/YamlConfigJvm.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 distribut...
unknown
codeparrot/codeparrot-clean
import pytest from diofant import (Derivative, E, I, O, PoleError, Rational, Symbol, acosh, acoth, asin, asinh, atanh, besselk, cbrt, ceiling, cos, cosh, cot, coth, exp, floor, limit, ln, log, pi, sign, sin, sinh, sqrt, tan, tanh) from diofant.abc import a...
unknown
codeparrot/codeparrot-clean
try: # installed by bootstrap.py import sqla_plugin_base as plugin_base except ImportError: # assume we're a package, use traditional import from . import plugin_base import pytest import argparse import inspect import collections import os try: import xdist # noqa has_xdist = True except Imp...
unknown
codeparrot/codeparrot-clean
import {useRef} from 'react'; import {addOne} from 'shared-runtime'; function useKeyCommand() { const currentPosition = useRef(0); const handleKey = direction => () => { const position = currentPosition.current; const nextPosition = direction === 'left' ? addOne(position) : position; currentPosition.cu...
typescript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.capture-ref-for-mutation.tsx
from freezegun import freeze_time from rest_framework import test from waldur_mastermind.marketplace import models as marketplace_models from .. import tasks from . import fixtures @freeze_time('2020-02-01') class TaskTest(test.APITransactionTestCase): def setUp(self): self.fixture = fixtures.BookingFixt...
unknown
codeparrot/codeparrot-clean
"""distutils.core The only module that needs to be imported to use the Distutils; provides the 'setup' function (which is to be called from the setup script). Also indirectly provides the Distribution and Command classes, although they are really defined in distutils.dist and distutils.cmd. """ # This module should ...
unknown
codeparrot/codeparrot-clean
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { getEntryRuntime, mergeRuntimeOwned } = require("./util/runtime"); /** @typedef {import("./Compiler")} Compiler */ /** @typedef {import("./Module").FactoryMeta} FactoryMeta */ /** @typedef {import...
javascript
github
https://github.com/webpack/webpack
lib/FlagAllModulesAsUsedPlugin.js
// run // Copyright 2011 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. // Test closures in if conditions. package main func main() { if func() bool { return true }() {} // gc used to say this was a syntax error if (fun...
go
github
https://github.com/golang/go
test/func6.go
# 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
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Luis Alberto Perez Lazaro <luisperlazaro@gmail.com> # (c) 2015, Jakub Jirutka <jakub@jirutka.cz> # # 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...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Foundation\Console; use Illuminate\Console\GeneratorCommand; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use function Laravel\Pr...
php
github
https://github.com/laravel/framework
src/Illuminate/Foundation/Console/EnumMakeCommand.php
import ast from sys import version_info from pyflakes import messages as m, checker from pyflakes.test.harness import TestCase, skipIf, skip class Test(TestCase): def test_undefined(self): self.flakes('bar', m.UndefinedName) def test_definedInListComp(self): self.flakes('[a for a in range(10)...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage.junitrunner; import static org.junit.Assert.*; import static org.mockito.Mockito.verify; import static org.mockitousage.junitrunner.Filters.methodNameContains; import java.u...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockitousage/junitrunner/JUnit45RunnerTest.java
# -*- coding: utf-8 -*- # Copyright © 2014–2015, Chris Warrick. # 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...
unknown
codeparrot/codeparrot-clean
/* * slru_io.c * * Routines for reading and writing SLRU files during upgrade. * * Copyright (c) 2025-2026, PostgreSQL Global Development Group * src/bin/pg_upgrade/slru_io.c */ #include "postgres_fe.h" #include <fcntl.h> #include "common/fe_memutils.h" #include "common/file_perm.h" #include "common/file_util...
c
github
https://github.com/postgres/postgres
src/bin/pg_upgrade/slru_io.c
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional from typing_extensions import Literal from ..._models import BaseModel __all__ = ["ConversationItemRetrieveEvent"] class ConversationItemRetrieveEvent(BaseModel): """ Send this event when you wa...
python
github
https://github.com/openai/openai-python
src/openai/types/realtime/conversation_item_retrieve_event.py
/* Copyright 2022 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/dtensor/cc/dstatus.h
# (c) 2016, James Tanner # (c) 2016, Toshio Kuratomi <tkuratomi@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 # (...
python
github
https://github.com/ansible/ansible
lib/ansible/utils/ssh_functions.py
from test import support from test.support import bigmemtest, _4G import array import unittest import io from io import BytesIO, DEFAULT_BUFFER_SIZE import os import pickle import glob import tempfile import random import shutil import subprocess import threading from test.support import import_helper from test.suppor...
python
github
https://github.com/python/cpython
Lib/test/test_bz2.py
# Copyright 2012 Red Hat, Inc. # Copyright 2012-2013 Hewlett-Packard Development Company, L.P. # # 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/licen...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################ # # 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 cop...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # User Role/Group Per Company # Copyright 2014 wangbuke <wangbuke@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public...
unknown
codeparrot/codeparrot-clean
"""Contains the implementation for the DirectoryWatcher class.""" import os from tensorflow.python.platform import gfile from tensorflow.python.platform import logging class DirectoryWatcher(object): """A DirectoryWatcher wraps a loader to load from a directory. A loader reads a file on disk and produces some ki...
unknown
codeparrot/codeparrot-clean
"""Criteria or rubric based evaluators. These evaluators are useful for evaluating the output of a language model or chain against specified criteria or rubric. Classes ------- CriteriaEvalChain : Evaluates the output of a language model or chain against specified criteria. Examples: -------- Using a predefined crit...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/evaluation/criteria/__init__.py
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package transit import ( "context" "testing" "github.com/hashicorp/vault/sdk/logical" ) func BenchmarkTransit_BatchEncryption1(b *testing.B) { BTransit_BatchEncryption(b, 1) } func BenchmarkTransit_BatchEncryption10(b *testing.B) { BTransi...
go
github
https://github.com/hashicorp/vault
builtin/logical/transit/path_encrypt_bench_test.go
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.vectorstores import DocArrayInMemorySearch # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling opti...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/vectorstores/docarray/in_memory.py
import {ChangeDetectorRef, Component, inject} from '@angular/core'; import {HousingLocation} from '../housing-location/housing-location'; import {HousingLocationInfo} from '../housinglocation'; import {HousingService} from '../housing.service'; @Component({ selector: 'app-home', imports: [HousingLocation], templ...
typescript
github
https://github.com/angular/angular
adev/src/content/tutorials/first-app/steps/14-http/src/app/home/home.ts
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Nghia Tran """ Generate csv for predicting steering angles. Usage: usage: submission.py [-h] [--limit LIMIT] [--save SAVE] logdir test_folder Create submission for Udacity. positional arguments: logdir Path to logdir. test_folder ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2018 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/util/proto/descriptors.h
# -*- coding: utf-8 -*- # @Author: ZwEin # @Date: 2016-06-20 10:55:39 # @Last Modified by: ZwEin # @Last Modified time: 2016-06-29 18:38:53 """ spark-submit \ --conf "spark.yarn.executor.memoryOverhead=8192" \ --conf "spark.rdd.compress=true" \ --conf "spark.shuffle.compress=true" \ --driver-memory 6g \ --executo...
unknown
codeparrot/codeparrot-clean
""" Copyright 2015 - Gurjant Kalsi <me@gurjantkalsi.com> 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 us...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/mmc/fsl-imx-mmc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Freescale Secure Digital Host Controller for i.MX2/3 series maintainers: - Markus Pargmann <mpa@pengutronix.de> allOf: - $...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/mmc/fsl-imx-mmc.yaml
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2014 The Plaso Project Authors. # Please see the AUTHORS file for details on individual 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 L...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'client_fva/ui/ui_elements/contactAddDialog.ui' # # Created by: PyQt5 UI code generator 5.10.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_AddContactDialog(object): def se...
unknown
codeparrot/codeparrot-clean
#pragma once #include <c10/core/SymBool.h> #include <c10/core/SymNodeImpl.h> #include <c10/macros/Export.h> #include <c10/macros/Macros.h> #include <c10/util/Exception.h> #include <c10/util/intrusive_ptr.h> #include <cstdint> #include <limits> #include <ostream> #include <utility> namespace c10 { // NB: this is act...
c
github
https://github.com/pytorch/pytorch
c10/core/SymFloat.h
// 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
util/teststorage/appender.go
#!/usr/bin/env python import unittest """ compare.py - versatile benchmark output compare tool """ import argparse from argparse import ArgumentParser import sys import gbench from gbench import util, report from gbench.util import * def check_inputs(in1, in2, flags): """ Perform checking on the user provide...
unknown
codeparrot/codeparrot-clean
""" This module is a thin wrapper around librbd. It currently provides all the synchronous methods of librbd that do not use callbacks. Error codes from librbd are turned into exceptions that subclass :class:`Error`. Almost all methods may raise :class:`Error` (the base class of all rbd exceptions), :class:`Permissio...
unknown
codeparrot/codeparrot-clean
""" User facing error messages during course import and export """ from django.utils.translation import ugettext as _ COURSE_ALREADY_EXIST = _('Aborting import because a course with this id: {} already exists.') COURSE_PERMISSION_DENIED = _('Permission denied. You do not have write access to this course.') FILE_MISSIN...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, David Stygstra <david.stygstra@gmail.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_v...
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
//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor9.ts] //// //// [autoAccessor9.ts] // Auto-accessors do not use Set semantics themselves, so do not need to be transformed if there are no other // initializers that need to be transformed: class C1 { accessor x = 1; } // If there are ot...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/autoAccessor9.js
import falcon from graceful.serializers import BaseSerializer from graceful.fields import IntField, StringField from graceful.parameters import StringParam from graceful.errors import ValidationError from graceful.resources.generic import ( RetrieveUpdateDeleteAPI, PaginatedListCreateAPI, ) from jinja2 import...
unknown
codeparrot/codeparrot-clean
//===--- SimplifyStructExtract.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/SimplifyStructExtract.swift
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'Page._keywords' db.delete_column('pages_page', '_keywords') # Adding field 'Page.keywor...
unknown
codeparrot/codeparrot-clean
/* Copyright 2016 The Kubernetes 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 writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/apis/autoscaling/v1/register.go
/* posixshmem - A Python extension that provides shm_open() and shm_unlink() */ // Need limited C API version 3.13 for Py_mod_gil #include "pyconfig.h" // Py_GIL_DISABLED #ifndef Py_GIL_DISABLED # define Py_LIMITED_API 0x030d0000 #endif #include <Python.h> #include <string.h> // strlen() #include <e...
c
github
https://github.com/python/cpython
Modules/_multiprocessing/posixshmem.c
class Node: """Represents a node in a linked list""" def __init__(self, value): self.value = value self.next = None def append(self, node): self.next = node class Stack: """ Represents a stack. This implementation of the stack is based on a linked list. Unit tests ...
unknown
codeparrot/codeparrot-clean
from numpy.distutils.fcompiler import FCompiler compilers = ['HPUXFCompiler'] class HPUXFCompiler(FCompiler): compiler_type = 'hpux' description = 'HP Fortran 90 Compiler' version_pattern = r'HP F90 (?P<version>[^\s*,]*)' executables = { 'version_cmd' : ["<F90>", "+version"], 'comp...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from __future__ import print_function from logging import handlers from os.path import dirname import logging import os import select import signal import socket import subprocess import sys import traceback # Root path base_path = dirname(os.path.abspath(__file__)) # Insert local directories in...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 gRPC 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 writing...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """Helper to get a list of all projects that are nested within another project.""" from website.project.model import Node from modularodm import Q from tests.base import OsfTestCase from tests.factories import ProjectFactory def find_nested_projects(): return Node.fi...
unknown
codeparrot/codeparrot-clean
""" Copyright (c) 2016, Jose Dolz .All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the fo...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python """ Data Models for books.service All classes can be instantiated from an xml string using their FromString class method. Notes: * Book.title displays the first dc:title because the returned XML repeats that datum as atom:title. There is an undocumented gbs:ope...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/qcom,qdu1000-gcc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm Global Clock & Reset Controller for QDU1000 and QRU1000 maintainers: - Taniya Das <quic_tdas@quicinc.com> -...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/qcom,qdu1000-gcc.yaml
from typing import Any, cast from langchain_core._api import deprecated from langchain_core.language_models import BaseLanguageModel from langchain_core.messages import HumanMessage, SystemMessage from langchain_core.output_parsers import BaseLLMOutputParser from langchain_core.output_parsers.openai_functions import (...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/chains/openai_functions/qa_with_structure.py
import numpy as np import scipy.integrate as scin import scipy.optimize as scop import warnings def self_affine_psd(q, pref, hurst, onedim=False): """Ideal self-affine power spectrum, dependent only on prefactor and Hurst exponent.""" exp = -2 * (hurst + 1) if onedim: exp = -1 - 2 * hurst retur...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 University of Southern California # # 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/...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2016, Palo Alto Networks # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" A...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean