text stringlengths 3 1.68M | id stringlengths 13 169 | metadata dict | __index_level_0__ int64 0 2.21k |
|---|---|---|---|
// // Licensed to the LF AI & Data foundation 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"); ... | milvus/internal/proxy/task_upsert.go/0 | {
"file_path": "milvus/internal/proxy/task_upsert.go",
"repo_id": "milvus",
"token_count": 6892
} | 1,889 |
from __future__ import annotations
from typing import List, Optional
from langchain.chains.llm import LLMChain
from langchain.memory import ChatMessageHistory
from langchain.schema import (
BaseChatMessageHistory,
Document,
)
from langchain.tools.base import BaseTool
from langchain_community.tools.human.tool ... | langchain/libs/experimental/langchain_experimental/autonomous_agents/autogpt/agent.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/autonomous_agents/autogpt/agent.py",
"repo_id": "langchain",
"token_count": 2490
} | 413 |
// Licensed to the LF AI & Data foundation 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 use th... | milvus/tests/integration/jsonexpr/json_expr_test.go/0 | {
"file_path": "milvus/tests/integration/jsonexpr/json_expr_test.go",
"repo_id": "milvus",
"token_count": 16853
} | 2,100 |
import pytest
import os
import time
import threading
from pathlib import Path
from time import sleep
from minio import Minio
from pymilvus import connections
from chaos.checker import (BulkInsertChecker, Op)
from common.milvus_sys import MilvusSys
from utils.util_log import test_log as log
from utils.util_k8s import ge... | milvus/tests/python_client/bulk_insert/test_bulk_insert_perf.py/0 | {
"file_path": "milvus/tests/python_client/bulk_insert/test_bulk_insert_perf.py",
"repo_id": "milvus",
"token_count": 3146
} | 2,161 |
// Licensed to the LF AI & Data foundation 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 use th... | milvus/internal/datanode/flow_graph_dd_node_test.go/0 | {
"file_path": "milvus/internal/datanode/flow_graph_dd_node_test.go",
"repo_id": "milvus",
"token_count": 6722
} | 1,774 |
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. 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 r... | transformers/src/transformers/models/instructblip/configuration_instructblip.py/0 | {
"file_path": "transformers/src/transformers/models/instructblip/configuration_instructblip.py",
"repo_id": "transformers",
"token_count": 6357
} | 617 |
import { logVersion010MigrationWarning } from "../../util/entrypoint_deprecation.js";
/* #__PURE__ */ logVersion010MigrationWarning({
oldEntrypointName: "llms/googlevertexai",
});
export * from "@langchain/community/llms/googlevertexai";
| langchainjs/langchain/src/llms/googlevertexai/index.ts/0 | {
"file_path": "langchainjs/langchain/src/llms/googlevertexai/index.ts",
"repo_id": "langchainjs",
"token_count": 77
} | 994 |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. 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 r... | transformers/tests/models/roformer/test_modeling_roformer.py/0 | {
"file_path": "transformers/tests/models/roformer/test_modeling_roformer.py",
"repo_id": "transformers",
"token_count": 11379
} | 734 |
// Licensed to the LF AI & Data foundation 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 use th... | milvus/pkg/util/ratelimitutil/limiter_test.go/0 | {
"file_path": "milvus/pkg/util/ratelimitutil/limiter_test.go",
"repo_id": "milvus",
"token_count": 4200
} | 1,914 |
import { test, expect } from "@jest/globals";
import { GoogleVertexAIEmbeddings } from "../googlevertexai.js";
import { HNSWLib } from "../../vectorstores/hnswlib.js";
test("Test GoogleVertexAIEmbeddings.embedQuery", async () => {
const embeddings = new GoogleVertexAIEmbeddings();
const res = await embeddings.embe... | langchainjs/libs/langchain-community/src/embeddings/tests/googlevertexai.int.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-community/src/embeddings/tests/googlevertexai.int.test.ts",
"repo_id": "langchainjs",
"token_count": 607
} | 1,056 |
<jupyter_start><jupyter_text>Airbyte JSON >[Airbyte](https://github.com/airbytehq/airbyte) is a data integration platform for ELT pipelines from APIs, databases & files to warehouses & lakes. It has the largest catalog of ELT connectors to data warehouses and databases. This covers how to load any source from Airbyte i... | langchain/docs/docs/integrations/document_loaders/airbyte_json.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/document_loaders/airbyte_json.ipynb",
"repo_id": "langchain",
"token_count": 607
} | 103 |
#[cfg(feature = "mkl")]
extern crate intel_mkl_src;
#[cfg(feature = "accelerate")]
extern crate accelerate_src;
use anyhow::{Error as E, Result};
use clap::{Parser, ValueEnum};
use candle_transformers::models::quantized_stable_lm::Model as QStableLM;
use candle_transformers::models::stable_lm::{Config, Model as Stab... | candle/candle-examples/examples/stable-lm/main.rs/0 | {
"file_path": "candle/candle-examples/examples/stable-lm/main.rs",
"repo_id": "candle",
"token_count": 5150
} | 47 |
from llama_index.core.program.llm_program import LLMTextCompletionProgram
from llama_index.core.program.multi_modal_llm_program import (
MultiModalLLMCompletionProgram,
)
from llama_index.core.types import BasePydanticProgram
__all__ = [
"BasePydanticProgram",
"LLMTextCompletionProgram",
"MultiModalLLM... | llama_index/llama-index-core/llama_index/core/program/__init__.py/0 | {
"file_path": "llama_index/llama-index-core/llama_index/core/program/__init__.py",
"repo_id": "llama_index",
"token_count": 121
} | 1,139 |
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<title>Candle Bert</title>
</head>
<body></body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
@import u... | candle/candle-wasm-examples/bert/lib-example.html/0 | {
"file_path": "candle/candle-wasm-examples/bert/lib-example.html",
"repo_id": "candle",
"token_count": 6066
} | 81 |
# Copyright 2022 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 applicabl... | accelerate/src/accelerate/utils/imports.py/0 | {
"file_path": "accelerate/src/accelerate/utils/imports.py",
"repo_id": "accelerate",
"token_count": 4534
} | 15 |
"""Test agent trajectory evaluation chain."""
from typing import Any, Dict, List, Optional, Tuple
import pytest
from langchain_core.agents import AgentAction, BaseMessage
from langchain_core.exceptions import OutputParserException
from langchain_core.pydantic_v1 import Field
from langchain_core.tools import tool
fro... | langchain/libs/langchain/tests/unit_tests/evaluation/agents/test_eval_chain.py/0 | {
"file_path": "langchain/libs/langchain/tests/unit_tests/evaluation/agents/test_eval_chain.py",
"repo_id": "langchain",
"token_count": 2419
} | 595 |
import {ApiApi as DefaultApi} from "./generated";
export interface ClientAuthProvider {
/**
* Abstract method for authenticating a client.
*/
authenticate(): ClientAuthResponse;
}
export interface ClientAuthConfigurationProvider<T> {
/**
* Abstract method for getting the configuration for t... | chroma/clients/js/src/auth.ts/0 | {
"file_path": "chroma/clients/js/src/auth.ts",
"repo_id": "chroma",
"token_count": 4437
} | 28 |
# Mid-way Quiz [[mid-way-quiz]]
The best way to learn and [to avoid the illusion of competence](https://www.coursera.org/lecture/learning-how-to-learn/illusions-of-competence-BuFzf) **is to test yourself.** This will help you to find **where you need to reinforce your knowledge**.
### Q1: What are the two main appro... | deep-rl-class/units/en/unit2/mid-way-quiz.mdx/0 | {
"file_path": "deep-rl-class/units/en/unit2/mid-way-quiz.mdx",
"repo_id": "deep-rl-class",
"token_count": 1100
} | 152 |
from __future__ import annotations
from typing import Any, Tuple, cast
from deprecated import deprecated
from llama_index.legacy.bridge.pydantic import PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.callbacks.schema import CBEventType, EventPayload
from llama_index.legac... | llama_index/llama-index-legacy/llama_index/legacy/llm_predictor/vellum/predictor.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/llm_predictor/vellum/predictor.py",
"repo_id": "llama_index",
"token_count": 3357
} | 1,526 |
import inspect
import types
import warnings
from collections.abc import Iterable
from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, Union
import numpy as np
from ..data import SquadExample, SquadFeatures, squad_convert_examples_to_features
from ..modelcard import ModelCard
from ..tokenization_utils import... | transformers/src/transformers/pipelines/question_answering.py/0 | {
"file_path": "transformers/src/transformers/pipelines/question_answering.py",
"repo_id": "transformers",
"token_count": 13330
} | 778 |
python_sources()
| llama_index/llama-index-legacy/llama_index/legacy/bridge/BUILD/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/bridge/BUILD",
"repo_id": "llama_index",
"token_count": 6
} | 1,552 |
from typing import Optional
import pytest
from langchain_community.document_loaders.gitbook import GitbookLoader
class TestGitbookLoader:
@pytest.mark.parametrize(
"web_page, load_all_paths, base_url, expected_web_path",
[
("https://example.com/page1", False, None, "https://example.c... | langchain/libs/community/tests/integration_tests/document_loaders/test_gitbook.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/document_loaders/test_gitbook.py",
"repo_id": "langchain",
"token_count": 879
} | 324 |
# Copyright 2022 The OpenAI team and The HuggingFace Team. All rights reserved.
# Most of the code is copy pasted from the original whisper repository
#
# 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 Lic... | transformers/src/transformers/models/whisper/english_normalizer.py/0 | {
"file_path": "transformers/src/transformers/models/whisper/english_normalizer.py",
"repo_id": "transformers",
"token_count": 12164
} | 676 |
---
sidebar_class_name: node-only
---
# Gradient AI
LangChain.js supports integration with Gradient AI. Check out [Gradient AI](https://docs.gradient.ai/docs) for a list of available models.
## Setup
You'll need to install the official Gradient Node SDK as a peer dependency:
```bash npm2yarn
npm i @gradientai/node... | langchainjs/docs/core_docs/docs/integrations/llms/gradient_ai.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/llms/gradient_ai.mdx",
"repo_id": "langchainjs",
"token_count": 445
} | 737 |
#!/usr/bin/env python
# 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
#
# Unles... | accelerate/src/accelerate/commands/config/config_args.py/0 | {
"file_path": "accelerate/src/accelerate/commands/config/config_args.py",
"repo_id": "accelerate",
"token_count": 4058
} | 10 |
# CSP-DarkNet
**CSPDarknet53** is a convolutional neural network and backbone for object detection that uses [DarkNet-53](https://paperswithcode.com/method/darknet-53). It employs a CSPNet strategy to partition the feature map of the base layer into two parts and then merges them through a cross-stage hierarchy. The u... | pytorch-image-models/docs/models/.templates/models/csp-darknet.md/0 | {
"file_path": "pytorch-image-models/docs/models/.templates/models/csp-darknet.md",
"repo_id": "pytorch-image-models",
"token_count": 947
} | 355 |
import * as url from "node:url";
import * as path from "node:path";
import { test, expect } from "@jest/globals";
import { DirectoryLoader, UnknownHandling } from "../fs/directory.js";
import { CSVLoader } from "../fs/csv.js";
import { PDFLoader } from "../fs/pdf.js";
import { TextLoader } from "../fs/text.js";
import ... | langchainjs/langchain/src/document_loaders/tests/directory.test.ts/0 | {
"file_path": "langchainjs/langchain/src/document_loaders/tests/directory.test.ts",
"repo_id": "langchainjs",
"token_count": 807
} | 904 |
- sections:
- local: pipeline_tutorial
title: पाइपलाइनों के साथ अनुमान चलाएँ | transformers/docs/source/hi/_toctree.yml/0 | {
"file_path": "transformers/docs/source/hi/_toctree.yml",
"repo_id": "transformers",
"token_count": 65
} | 471 |
"""Test TensorflowHub embeddings."""
from langchain_community.embeddings import TensorflowHubEmbeddings
def test_tensorflowhub_embedding_documents() -> None:
"""Test tensorflowhub embeddings."""
documents = ["foo bar"]
embedding = TensorflowHubEmbeddings()
output = embedding.embed_documents(documents)... | langchain/libs/community/tests/integration_tests/embeddings/test_tensorflow_hub.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/embeddings/test_tensorflow_hub.py",
"repo_id": "langchain",
"token_count": 214
} | 332 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team.
#
# 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... | transformers/src/transformers/models/swin2sr/convert_swin2sr_original_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/swin2sr/convert_swin2sr_original_to_pytorch.py",
"repo_id": "transformers",
"token_count": 5318
} | 698 |
import { ChatOpenAI, OpenAIEmbeddings } from "@langchain/openai";
import { LLMChain } from "langchain/chains";
import { HNSWLib } from "@langchain/community/vectorstores/hnswlib";
import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
import { BufferMemory } from "langchain/memory";
import * as fs fr... | langchainjs/examples/src/chains/conversational_qa_built_in_memory.ts/0 | {
"file_path": "langchainjs/examples/src/chains/conversational_qa_built_in_memory.ts",
"repo_id": "langchainjs",
"token_count": 1610
} | 845 |
# Remote Page/File Loader
This loader makes it easy to extract the text from any remote page or file using just its url. If there's a file at the url, this loader will download it temporarily and parse it using `SimpleDirectoryReader`. It is an all-in-one tool for (almost) any url.
As a result, any page or type of fi... | llama_index/llama-index-integrations/readers/llama-index-readers-remote/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-remote/README.md",
"repo_id": "llama_index",
"token_count": 396
} | 1,451 |
# Copyright 2024 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 applicabl... | diffusers/src/diffusers/loaders/textual_inversion.py/0 | {
"file_path": "diffusers/src/diffusers/loaders/textual_inversion.py",
"repo_id": "diffusers",
"token_count": 11256
} | 232 |
import importlib
import shutil
import threading
import warnings
from typing import List
import fsspec
import fsspec.asyn
from fsspec.implementations.local import LocalFileSystem
from ..utils.deprecation_utils import deprecated
from . import compression
_has_s3fs = importlib.util.find_spec("s3fs") is not None
if _h... | datasets/src/datasets/filesystems/__init__.py/0 | {
"file_path": "datasets/src/datasets/filesystems/__init__.py",
"repo_id": "datasets",
"token_count": 1096
} | 130 |
import urllib.request
import xml.etree.ElementTree as ET
from typing import List
from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document
from llama_index.readers.web import AsyncWebPageReader
XML_SITEMAP_SCHEMA = "http://www.sitemaps.org/schemas/sitemap/0.9"
STRIPE_SITEMAP_UR... | llama_index/llama-index-integrations/readers/llama-index-readers-stripe-docs/llama_index/readers/stripe_docs/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-stripe-docs/llama_index/readers/stripe_docs/base.py",
"repo_id": "llama_index",
"token_count": 1033
} | 1,384 |
// Licensed to the LF AI & Data foundation 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 use th... | milvus/internal/core/src/index/ScalarIndexSort.cpp/0 | {
"file_path": "milvus/internal/core/src/index/ScalarIndexSort.cpp",
"repo_id": "milvus",
"token_count": 7531
} | 1,872 |
import type { Model } from "$lib/types/Model";
export const findCurrentModel = (models: Model[], id?: string): Model =>
models.find((m) => m.id === id) ?? models[0];
| chat-ui/src/lib/utils/models.ts/0 | {
"file_path": "chat-ui/src/lib/utils/models.ts",
"repo_id": "chat-ui",
"token_count": 54
} | 98 |
"""Module defines common test data."""
from pathlib import Path
_THIS_DIR = Path(__file__).parent
_EXAMPLES_DIR = _THIS_DIR / "integration_tests" / "examples"
# Paths to test PDF files
HELLO_PDF = _EXAMPLES_DIR / "hello.pdf"
LAYOUT_PARSER_PAPER_PDF = _EXAMPLES_DIR / "layout-parser-paper.pdf"
DUPLICATE_CHARS = _EXAMP... | langchain/libs/langchain/tests/data.py/0 | {
"file_path": "langchain/libs/langchain/tests/data.py",
"repo_id": "langchain",
"token_count": 142
} | 609 |
from __future__ import annotations
import json
import logging
from typing import Any, Dict, List, Optional
import requests
from langchain_core.callbacks import CallbackManagerForLLMRun
from langchain_core.language_models.llms import LLM
from langchain_core.pydantic_v1 import Field, SecretStr, root_validator
from lang... | langchain/libs/community/langchain_community/llms/baichuan.py/0 | {
"file_path": "langchain/libs/community/langchain_community/llms/baichuan.py",
"repo_id": "langchain",
"token_count": 1399
} | 260 |
<!--Copyright 2024 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... | diffusers/docs/source/en/using-diffusers/conditional_image_generation.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/conditional_image_generation.md",
"repo_id": "diffusers",
"token_count": 5136
} | 186 |
# Model Summaries
The model architectures included come from a wide variety of sources. Sources, including papers, original impl ("reference code") that I rewrote / adapted, and PyTorch impl that I leveraged directly ("code") are listed below.
Most included models have pretrained weights. The weights are either:
1. ... | pytorch-image-models/hfdocs/source/models.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models.mdx",
"repo_id": "pytorch-image-models",
"token_count": 4494
} | 372 |
{
"license": "Apache-2.0",
"creators": [
{
"affiliation": "Hugging Face",
"name": "Quentin Lhoest"
},
{
"orcid": "0000-0003-1727-1045",
"affiliation": "Hugging Face",
"name": "Albert Villanova del Moral"
},
{
... | datasets/.zenodo.json/0 | {
"file_path": "datasets/.zenodo.json",
"repo_id": "datasets",
"token_count": 1953
} | 116 |
// Copyright (C) 2019-2023 Zilliz. 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 l... | milvus/internal/core/src/simd/avx512.cpp/0 | {
"file_path": "milvus/internal/core/src/simd/avx512.cpp",
"repo_id": "milvus",
"token_count": 15349
} | 1,670 |
<!--Copyright 2022 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... | transformers/docs/source/pt/accelerate.md/0 | {
"file_path": "transformers/docs/source/pt/accelerate.md",
"repo_id": "transformers",
"token_count": 1904
} | 502 |
[](https://travis-ci.org/joboccara/NamedType)

A **strong type** is a type used in place of another type to carry specific **meaning** through its **name**.
This project experime... | milvus/internal/core/thirdparty/NamedType/README.md/0 | {
"file_path": "milvus/internal/core/thirdparty/NamedType/README.md",
"repo_id": "milvus",
"token_count": 1149
} | 1,748 |
<jupyter_start><jupyter_text>Split by characterThis is the simplest method. This splits based on characters (by default "\n\n") and measure chunk length by number of characters.1. How the text is split: by single character.2. How the chunk size is measured: by number of characters.<jupyter_code># This is a long documen... | langchain/docs/docs/modules/data_connection/document_transformers/character_text_splitter.ipynb/0 | {
"file_path": "langchain/docs/docs/modules/data_connection/document_transformers/character_text_splitter.ipynb",
"repo_id": "langchain",
"token_count": 615
} | 185 |
Currently the following model proposals are available:
- <s>[BigBird (Google)](./ADD_BIG_BIRD.md)</s>
| transformers/templates/adding_a_new_model/open_model_proposals/README.md/0 | {
"file_path": "transformers/templates/adding_a_new_model/open_model_proposals/README.md",
"repo_id": "transformers",
"token_count": 34
} | 776 |
package indexparamcheck
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
)
func Test_binaryVectorBaseChecker_CheckValidDataType(t *testing.T) {
cases := []struct {
dType schemapb.DataType
errIsNil bool
}{
{
dType: schemapb.DataType_Bo... | milvus/pkg/util/indexparamcheck/binary_vector_base_checker_test.go/0 | {
"file_path": "milvus/pkg/util/indexparamcheck/binary_vector_base_checker_test.go",
"repo_id": "milvus",
"token_count": 715
} | 1,911 |
# spaCy
>[spaCy](https://spacy.io/) is an open-source software library for advanced natural language processing, written in the programming languages Python and Cython.
## Installation and Setup
```bash
pip install spacy
```
## Text Splitter
See a [usage example](/docs/modules/data_connection/document_transfor... | langchain/docs/docs/integrations/providers/spacy.mdx/0 | {
"file_path": "langchain/docs/docs/integrations/providers/spacy.mdx",
"repo_id": "langchain",
"token_count": 187
} | 160 |
from llama_index.program.lmformatenforcer.base import LMFormatEnforcerPydanticProgram
__all__ = ["LMFormatEnforcerPydanticProgram"]
| llama_index/llama-index-integrations/program/llama-index-program-lmformatenforcer/llama_index/program/lmformatenforcer/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/program/llama-index-program-lmformatenforcer/llama_index/program/lmformatenforcer/__init__.py",
"repo_id": "llama_index",
"token_count": 41
} | 1,322 |
import { Serializable } from "@langchain/core/load/serializable";
/**
* Base class for all file stores. All file stores should extend this
* class.
*/
export abstract class BaseFileStore extends Serializable {
abstract readFile(path: string): Promise<string>;
abstract writeFile(path: string, contents: string):... | langchainjs/langchain/src/stores/file/base.ts/0 | {
"file_path": "langchainjs/langchain/src/stores/file/base.ts",
"repo_id": "langchainjs",
"token_count": 89
} | 990 |
from langchain.chains import LLMChain
from langchain.prompts import PromptTemplate
from langchain_core.language_models import BaseLanguageModel
class TaskPrioritizationChain(LLMChain):
"""Chain to prioritize tasks."""
@classmethod
def from_llm(cls, llm: BaseLanguageModel, verbose: bool = True) -> LLMChai... | langchain/libs/experimental/langchain_experimental/autonomous_agents/baby_agi/task_prioritization.py/0 | {
"file_path": "langchain/libs/experimental/langchain_experimental/autonomous_agents/baby_agi/task_prioritization.py",
"repo_id": "langchain",
"token_count": 421
} | 456 |
//! Layers defined by closures.
use candle::{Result, Tensor};
use std::sync::Arc;
/// A layer defined by a simple closure.
#[derive(Clone)]
pub struct Func<'a> {
#[allow(clippy::type_complexity)]
f: Arc<dyn 'a + Fn(&Tensor) -> Result<Tensor> + Send + Sync>,
}
impl<'a> std::fmt::Debug for Func<'a> {
fn fmt... | candle/candle-nn/src/func.rs/0 | {
"file_path": "candle/candle-nn/src/func.rs",
"repo_id": "candle",
"token_count": 804
} | 61 |
from langchain_community.vectorstores.azure_cosmos_db import (
AzureCosmosDBVectorSearch,
CosmosDBDocumentType,
CosmosDBSimilarityType,
)
__all__ = [
"CosmosDBSimilarityType",
"CosmosDBDocumentType",
"AzureCosmosDBVectorSearch",
]
| langchain/libs/langchain/langchain/vectorstores/azure_cosmos_db.py/0 | {
"file_path": "langchain/libs/langchain/langchain/vectorstores/azure_cosmos_db.py",
"repo_id": "langchain",
"token_count": 98
} | 570 |
# coding=utf-8
# Copyright 2018 Salesforce and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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
#
# htt... | transformers/src/transformers/models/ctrl/configuration_ctrl.py/0 | {
"file_path": "transformers/src/transformers/models/ctrl/configuration_ctrl.py",
"repo_id": "transformers",
"token_count": 1767
} | 639 |
# LlamaIndex Llms Integration: Azure Openai
| llama_index/llama-index-integrations/llms/llama-index-llms-azure-openai/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-azure-openai/README.md",
"repo_id": "llama_index",
"token_count": 12
} | 1,389 |
# LlamaIndex Docstore Integration: Firestore Docstore
| llama_index/llama-index-integrations/storage/docstore/llama-index-storage-docstore-firestore/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/storage/docstore/llama-index-storage-docstore-firestore/README.md",
"repo_id": "llama_index",
"token_count": 13
} | 1,412 |
"""Google docs reader."""
import logging
import os
from typing import Any, List
import googleapiclient.discovery as discovery
from google_auth_oauthlib.flow import InstalledAppFlow
from llama_index.core.readers.base import BasePydanticReader
from llama_index.core.schema import Document
from google.auth.transport.req... | llama_index/llama-index-integrations/readers/llama-index-readers-google/llama_index/readers/google/docs/base.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-google/llama_index/readers/google/docs/base.py",
"repo_id": "llama_index",
"token_count": 2262
} | 1,359 |
Installation
====================================================================================================
.. only:: python
.. include:: python.inc
.. only:: rust
.. include:: rust.inc
.. only:: node
.. include:: node.inc
| tokenizers/docs/source/installation/main.rst/0 | {
"file_path": "tokenizers/docs/source/installation/main.rst",
"repo_id": "tokenizers",
"token_count": 54
} | 447 |
# Copyright 2020 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 applicabl... | transformers/src/transformers/commands/download.py/0 | {
"file_path": "transformers/src/transformers/commands/download.py",
"repo_id": "transformers",
"token_count": 828
} | 549 |
<!--Copyright 2024 The GLIGEN Authors and 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 a... | diffusers/docs/source/en/api/pipelines/stable_diffusion/gligen.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/stable_diffusion/gligen.md",
"repo_id": "diffusers",
"token_count": 1049
} | 180 |
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]
[tool.codespell]
check-filenames = true
check-hidden = true
skip = "*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb"
[tool.llamahub]
classes = ["LocalTensorRTLLM"]
contains_example = false
import_path = "llama_index.llms.nvidia_tensor... | llama_index/llama-index-integrations/llms/llama-index-llms-nvidia-tensorrt/pyproject.toml/0 | {
"file_path": "llama_index/llama-index-integrations/llms/llama-index-llms-nvidia-tensorrt/pyproject.toml",
"repo_id": "llama_index",
"token_count": 671
} | 1,319 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.notion import NotionPageReader
def test_class():
names_of_base_classes = [b.__name__ for b in NotionPageReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-notion/tests/test_readers_notion.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-notion/tests/test_readers_notion.py",
"repo_id": "llama_index",
"token_count": 90
} | 1,347 |
[
{
"server": "idc-sh004",
"suite_params": [
{
"suite": "2_insert_cluster.yaml",
"image_type": "cpu"
}
]
}
]
| milvus/tests/benchmark/milvus_benchmark/scheduler/cluster.json/0 | {
"file_path": "milvus/tests/benchmark/milvus_benchmark/scheduler/cluster.json",
"repo_id": "milvus",
"token_count": 137
} | 1,995 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-singlestore/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-singlestore/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,439 |
from typing import Dict
from unittest.mock import MagicMock, patch
import pytest
from langchain_core.documents import Document
from langchain_community.document_loaders.quip import QuipLoader
try:
from quip_api.quip import QuipClient # noqa: F401
quip_installed = True
except ImportError:
quip_installed... | langchain/libs/community/tests/integration_tests/document_loaders/test_quip.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/document_loaders/test_quip.py",
"repo_id": "langchain",
"token_count": 3300
} | 351 |
# Weaviate Self Query Retriever
This example shows how to use a self query retriever with a [Weaviate](https://weaviate.io/) vector store.
If you haven't already set up Weaviate, please [follow the instructions here](/docs/integrations/vectorstores/weaviate).
## Usage
This example shows how to intialize a `SelfQuer... | langchainjs/docs/core_docs/docs/modules/data_connection/retrievers/self_query/weaviate-self-query.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/modules/data_connection/retrievers/self_query/weaviate-self-query.mdx",
"repo_id": "langchainjs",
"token_count": 543
} | 765 |
import { BaseMessage } from "../messages/index.js";
import { OutputParserException } from "./base.js";
import { BaseTransformOutputParser } from "./transform.js";
/**
* Class to parse the output of an LLM call to a list.
* @augments BaseOutputParser
*/
export abstract class ListOutputParser extends BaseTransformOut... | langchainjs/langchain-core/src/output_parsers/list.ts/0 | {
"file_path": "langchainjs/langchain-core/src/output_parsers/list.ts",
"repo_id": "langchainjs",
"token_count": 2210
} | 898 |
// Licensed to the LF AI & Data foundation 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 use th... | milvus/internal/util/importutilv2/parquet/reader_test.go/0 | {
"file_path": "milvus/internal/util/importutilv2/parquet/reader_test.go",
"repo_id": "milvus",
"token_count": 5810
} | 1,799 |
// Licensed to the LF AI & Data foundation 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 use th... | milvus/internal/datanode/flow_graph_dmstream_input_node.go/0 | {
"file_path": "milvus/internal/datanode/flow_graph_dmstream_input_node.go",
"repo_id": "milvus",
"token_count": 1081
} | 1,700 |
import torch
IS_ROCM_SYSTEM = torch.version.hip is not None
IS_CUDA_SYSTEM = torch.version.cuda is not None
| text-generation-inference/server/text_generation_server/utils/import_utils.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/utils/import_utils.py",
"repo_id": "text-generation-inference",
"token_count": 40
} | 450 |
/* eslint-disable @typescript-eslint/no-explicit-any */
import { jest, test, expect, describe } from "@jest/globals";
import { FakeEmbeddings } from "@langchain/core/utils/testing";
import { RedisVectorStore } from "../vectorstores.js";
const createRedisClientMockup = () => {
const hSetMock = jest.fn();
return {... | langchainjs/libs/langchain-redis/src/tests/vectorstores.test.ts/0 | {
"file_path": "langchainjs/libs/langchain-redis/src/tests/vectorstores.test.ts",
"repo_id": "langchainjs",
"token_count": 2381
} | 997 |
"""Elasticsearch (or Opensearch) reader over REST api.
This only uses the basic search api, so it will work with Elasticsearch and Opensearch.
"""
from typing import Any, List, Optional
from llama_index.legacy.bridge.pydantic import PrivateAttr
from llama_index.legacy.readers.base import BasePydanticReader
from lla... | llama_index/llama-index-legacy/llama_index/legacy/readers/elasticsearch.py/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/readers/elasticsearch.py",
"repo_id": "llama_index",
"token_count": 1185
} | 1,593 |
from typing import Optional, Tuple, Union
import torch
from einops import rearrange, reduce
from diffusers import DDIMScheduler, DDPMScheduler, DiffusionPipeline, ImagePipelineOutput, UNet2DConditionModel
from diffusers.schedulers.scheduling_ddim import DDIMSchedulerOutput
from diffusers.schedulers.scheduling_ddpm im... | diffusers/examples/community/bit_diffusion.py/0 | {
"file_path": "diffusers/examples/community/bit_diffusion.py",
"repo_id": "diffusers",
"token_count": 4362
} | 203 |
from langchain_community.document_loaders.mhtml import MHTMLLoader
__all__ = ["MHTMLLoader"]
| langchain/libs/langchain/langchain/document_loaders/mhtml.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/mhtml.py",
"repo_id": "langchain",
"token_count": 35
} | 531 |
# Joplin (Markdown) Loader
> [Joplin](https://joplinapp.org/) is an open source note-taking app. Capture your thoughts and securely access them from any device.
This readme covers how to load documents from a `Joplin` database.
`Joplin` has a [REST API](https://joplinapp.org/api/references/rest_api/) for accessing i... | llama_index/llama-index-integrations/readers/llama-index-readers-joplin/README.md/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-joplin/README.md",
"repo_id": "llama_index",
"token_count": 375
} | 1,416 |
from llama_index.core.readers.base import BaseReader
from llama_index.readers.pathway import PathwayReader
def test_class():
names_of_base_classes = [b.__name__ for b in PathwayReader.__mro__]
assert BaseReader.__name__ in names_of_base_classes
| llama_index/llama-index-integrations/readers/llama-index-readers-pathway/tests/test_readers_pathway.py/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-pathway/tests/test_readers_pathway.py",
"repo_id": "llama_index",
"token_count": 88
} | 1,444 |
# init
from llama_index.tools.wolfram_alpha.base import (
QUERY_URL_TMPL,
WolframAlphaToolSpec,
)
__all__ = ["QUERY_URL_TMPL", "WolframAlphaToolSpec"]
| llama_index/llama-index-integrations/tools/llama-index-tools-wolfram-alpha/llama_index/tools/wolfram_alpha/__init__.py/0 | {
"file_path": "llama_index/llama-index-integrations/tools/llama-index-tools-wolfram-alpha/llama_index/tools/wolfram_alpha/__init__.py",
"repo_id": "llama_index",
"token_count": 66
} | 1,639 |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. 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 r... | transformers/src/transformers/models/roformer/modeling_roformer.py/0 | {
"file_path": "transformers/src/transformers/models/roformer/modeling_roformer.py",
"repo_id": "transformers",
"token_count": 29911
} | 675 |
import builtins
import unittest
from typing import Any
from unittest import mock
from unittest.mock import MagicMock
from langchain_community.callbacks.streamlit import StreamlitCallbackHandler
class TestImport(unittest.TestCase):
"""Test the StreamlitCallbackHandler 'auto-updating' API"""
def setUp(self) -... | langchain/libs/community/tests/unit_tests/callbacks/test_streamlit_callback.py/0 | {
"file_path": "langchain/libs/community/tests/unit_tests/callbacks/test_streamlit_callback.py",
"repo_id": "langchain",
"token_count": 1301
} | 382 |
cff-version: 1.2.0
title: 'Diffusers: State-of-the-art diffusion models'
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Patrick
family-names: von Platen
- given-names: Suraj
family-names: Patil
- given-names: Anton
fam... | diffusers/CITATION.cff/0 | {
"file_path": "diffusers/CITATION.cff",
"repo_id": "diffusers",
"token_count": 369
} | 167 |
"""Test parameter tuner."""
from typing import Dict
from llama_index.experimental.param_tuner.base import ParamTuner, RunResult
def _mock_obj_function(param_dict: Dict) -> RunResult:
"""Mock obj function."""
return RunResult(
score=int(param_dict["a"]) + int(param_dict["b"]) + int(param_dict["c"]),
... | llama_index/llama-index-experimental/tests/param_tuner/test_base.py/0 | {
"file_path": "llama_index/llama-index-experimental/tests/param_tuner/test_base.py",
"repo_id": "llama_index",
"token_count": 635
} | 1,250 |
<jupyter_start><jupyter_text>GPT4All[GPT4All](https://gpt4all.io/index.html) is a free-to-use, locally running, privacy-aware chatbot. There is no GPU or internet required. It features popular models and its own models such as GPT4All Falcon, Wizard, etc.This notebook explains how to use [GPT4All embeddings](https://do... | langchain/docs/docs/integrations/text_embedding/gpt4all.ipynb/0 | {
"file_path": "langchain/docs/docs/integrations/text_embedding/gpt4all.ipynb",
"repo_id": "langchain",
"token_count": 418
} | 161 |
---
hide_table_of_contents: true
---
# JSONLines files
This example goes over how to load data from JSONLines or JSONL files. The second argument is a JSONPointer to the property to extract from each JSON object in the file. One document will be created for each JSON object in the file.
Example JSONLines file:
```j... | langchainjs/docs/core_docs/docs/integrations/document_loaders/file_loaders/jsonlines.mdx/0 | {
"file_path": "langchainjs/docs/core_docs/docs/integrations/document_loaders/file_loaders/jsonlines.mdx",
"repo_id": "langchainjs",
"token_count": 359
} | 732 |
from langchain_community.llms.amazon_api_gateway import (
AmazonAPIGateway,
)
__all__ = ["AmazonAPIGateway"]
| langchain/libs/langchain/langchain/llms/amazon_api_gateway.py/0 | {
"file_path": "langchain/libs/langchain/langchain/llms/amazon_api_gateway.py",
"repo_id": "langchain",
"token_count": 43
} | 543 |
from pathlib import Path
from langchain_community.document_loaders import (
OutlookMessageLoader,
UnstructuredEmailLoader,
)
def test_outlook_message_loader() -> None:
"""Test OutlookMessageLoader."""
file_path = Path(__file__).parent.parent / "examples/hello.msg"
loader = OutlookMessageLoader(st... | langchain/libs/community/tests/integration_tests/document_loaders/test_email.py/0 | {
"file_path": "langchain/libs/community/tests/integration_tests/document_loaders/test_email.py",
"repo_id": "langchain",
"token_count": 504
} | 327 |
0.9.48
| llama_index/llama-index-legacy/llama_index/legacy/VERSION/0 | {
"file_path": "llama_index/llama-index-legacy/llama_index/legacy/VERSION",
"repo_id": "llama_index",
"token_count": 6
} | 1,685 |
<jupyter_start><jupyter_code>! pip install "openai>=1" "langchain>=0.0.331rc2" matplotlib pillow<jupyter_output><empty_output><jupyter_text>Load ImagesWe encode to base64, as noted in the [OpenAI GPT-4V doc](https://platform.openai.com/docs/guides/vision).<jupyter_code>import base64
import io
import os
import numpy as... | langchain/cookbook/multi_modal_QA.ipynb/0 | {
"file_path": "langchain/cookbook/multi_modal_QA.ipynb",
"repo_id": "langchain",
"token_count": 1913
} | 78 |
import { RemoteRunnable } from "@langchain/core/runnables/remote";
const remoteChain = new RemoteRunnable({
url: "https://your_hostname.com/path",
});
const result = await remoteChain.invoke({
param1: "param1",
param2: "param2",
});
console.log(result);
const stream = await remoteChain.stream({
param1: "par... | langchainjs/examples/src/ecosystem/langsmith.ts/0 | {
"file_path": "langchainjs/examples/src/ecosystem/langsmith.ts",
"repo_id": "langchainjs",
"token_count": 143
} | 787 |
import { Writer } from "@langchain/community/llms/writer";
const model = new Writer({
maxTokens: 20,
apiKey: "YOUR-API-KEY", // In Node.js defaults to process.env.WRITER_API_KEY
orgId: "YOUR-ORGANIZATION-ID", // In Node.js defaults to process.env.WRITER_ORG_ID
});
const res = await model.invoke(
"What would be... | langchainjs/examples/src/models/llm/writer.ts/0 | {
"file_path": "langchainjs/examples/src/models/llm/writer.ts",
"repo_id": "langchainjs",
"token_count": 135
} | 841 |
from langchain_community.document_loaders.parsers.language.javascript import (
JavaScriptSegmenter,
)
__all__ = ["JavaScriptSegmenter"]
| langchain/libs/langchain/langchain/document_loaders/parsers/language/javascript.py/0 | {
"file_path": "langchain/libs/langchain/langchain/document_loaders/parsers/language/javascript.py",
"repo_id": "langchain",
"token_count": 45
} | 512 |
python_tests()
| llama_index/llama-index-integrations/readers/llama-index-readers-mondaydotcom/tests/BUILD/0 | {
"file_path": "llama_index/llama-index-integrations/readers/llama-index-readers-mondaydotcom/tests/BUILD",
"repo_id": "llama_index",
"token_count": 5
} | 1,343 |
"""Test file reader."""
from tempfile import TemporaryDirectory
from llama_index.core.readers.json import JSONReader
def test_basic() -> None:
"""Test JSON reader in basic mode."""
with TemporaryDirectory() as tmp_dir:
file_name = f"{tmp_dir}/test1.json"
with open(file_name, "w") as f:
... | llama_index/llama-index-core/tests/readers/test_json.py/0 | {
"file_path": "llama_index/llama-index-core/tests/readers/test_json.py",
"repo_id": "llama_index",
"token_count": 1126
} | 1,325 |
import type { SerializedLLM } from "@langchain/core/language_models/llms";
import { SerializedBasePromptTemplate } from "@langchain/core/prompts";
/**
* Represents the serialized form of an LLMChain. It includes properties
* such as `_type`, `llm`, and `prompt`.
*
* @deprecated Use newer {@link https://api.js.lang... | langchainjs/langchain/src/chains/serde.ts/0 | {
"file_path": "langchainjs/langchain/src/chains/serde.ts",
"repo_id": "langchainjs",
"token_count": 1800
} | 895 |
# 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 applicabl... | transformers/tests/pipelines/test_pipelines_image_segmentation.py/0 | {
"file_path": "transformers/tests/pipelines/test_pipelines_image_segmentation.py",
"repo_id": "transformers",
"token_count": 15529
} | 749 |
<!--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 agreed... | transformers/docs/source/ja/glossary.md/0 | {
"file_path": "transformers/docs/source/ja/glossary.md",
"repo_id": "transformers",
"token_count": 12780
} | 536 |
<!---
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 ... | transformers/examples/research_projects/jax-projects/dataset-streaming/README.md/0 | {
"file_path": "transformers/examples/research_projects/jax-projects/dataset-streaming/README.md",
"repo_id": "transformers",
"token_count": 1463
} | 577 |
# coding=utf-8
# Copyright 2024 HuggingFace 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 ag... | diffusers/tests/others/test_ema.py/0 | {
"file_path": "diffusers/tests/others/test_ema.py",
"repo_id": "diffusers",
"token_count": 2815
} | 259 |
import json
import os
import tempfile
import datasets
from datasets.arrow_writer import ArrowWriter
from datasets.features import Array2D
from utils import generate_examples, get_duration
SHAPE_TEST_1 = (30, 487)
SHAPE_TEST_2 = (36, 1024)
SPEED_TEST_SHAPE = (100, 100)
SPEED_TEST_N_EXAMPLES = 100
DEFAULT_FEATURES = ... | datasets/benchmarks/benchmark_array_xd.py/0 | {
"file_path": "datasets/benchmarks/benchmark_array_xd.py",
"repo_id": "datasets",
"token_count": 2176
} | 117 |
from langchain_community.retrievers.arcee import ArceeRetriever
__all__ = ["ArceeRetriever"]
| langchain/libs/langchain/langchain/retrievers/arcee.py/0 | {
"file_path": "langchain/libs/langchain/langchain/retrievers/arcee.py",
"repo_id": "langchain",
"token_count": 35
} | 564 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.