sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
5fa0dc6ee0205f6c6712adde651ef57f2991bce91b651f4016d2d960a86bc2ba | Python | 684 | 25 | """Metaphor Search API toolkit."""
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import MetaphorSearchResults
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation ... |
76bc95fd2ba4c915e92991d362c171bff3a065bfe5f4c72a986cc06e096a88c7 | Python | 684 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.powerbi.toolkit import PowerBIToolkit
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# han... |
92bd5196e90aff7bcb24e8b8d5cda5007e1cce6431711908961576a6c2a9c443 | Python | 684 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.multion.toolkit import MultionToolkit
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# han... |
9cb82e08f02c18581cb663c707c70c234a585660fbf84b2bd4846d6d62818384 | Python | 684 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.powerbi.base import create_pbi_agent
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# hand... |
9e639259b5faa6008fe216357106eb11af7179343cf34aaccadaa6501dc5814e | Python | 684 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_transformers import DoctranQATransformer
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handli... |
ae84030713ba13c89a8b24fcaf99eff0ba8fdd9ffefa7fdb25af924266c3bce6 | Python | 684 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.clickup.toolkit import ClickupToolkit
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# han... |
b0eb384668ce443de8c1ab072b2541e01bc760a7af907584addd17f82ed5a13a | Python | 684 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.callbacks.openai_info import OpenAICallbackHandler
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handl... |
d9f9e20cce614a0dc0465367fee6d38c9e15f31b3af304836e858dcf23472d42 | Python | 684 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_transformers import Html2TextTransformer
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handli... |
0d98eef31a867897908c279fb97256d3d9ab8f76f781b47449917166bbcaf4e6 | Python | 685 | 27 | # -- coding: utf-8 --
# @Time : 2023/4/2 20:51
# @Author : Biao Zhang
# @Email : littlebiao@outlook.com
# @File : typehint.py
# @Description: This file is used to ...
r"""
Type hint definitions
"""
import numbers
from typing import Any, Mapping, Optional, TypeVar, Union
import anndata as ad
import h5py
import numpy ... |
2d18281dbb61cf6b44f045b87a48c8ae9f20a7cfde89d336abfe66fe675ca062 | Python | 686 | 27 | # Copyright (c) 2021, David Williams, Reza Sameni
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
def AdaptiveFilter(x,delay,taps,mu):
xref = np.concatenate((np.zeros(delay + taps - 1),x[... |
2f781a669d968941c7aeeb66189f2c947a89ea721124e568916da4c077c0b149 | Python | 686 | 25 | """OpenWeatherMap API toolkit."""
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import OpenWeatherMapQueryRun
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation ... |
6b51ad5108f8f921771019ef780f4604a591f02dc5f3830c769516628adcb1e3 | Python | 686 | 22 | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'analyze_electrophysiology_data.settings')
try:
from django.core.management import execute_from_comma... |
75b86fbf605c6203b643f54802d7411f31b83fac0a699e59b250c05e607bc772 | Python | 686 | 37 | """Utility functions for PyTorch training."""
from .dataset import get_loaders, get_loaders_no_pool
from .loggings import (
TensorboardLoggingAE,
log_input_ordination,
log_metrics,
log_shap,
make_data
)
from .utils import (
LogConfusionMatrix,
get_optimizer,
get_empty_dicts,
get_emp... |
c624ae241de61c6bea38c8b33665a51823e3760c445b38375384f9b57b68a9a9 | Python | 686 | 25 | """Unsupervised learning based memorization."""
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools.memorize.tool import Memorize
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raisin... |
130f0dddbebe34fd07e66949dc791a8b3ed33b018bcb51abb5d65956ba74031e | Python | 687 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.callbacks.arize_callback import ArizeCallbackHandler
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# han... |
9164c2b2947439ce633a69e879755486367b0f39f0031f4b1fd94e2226104697 | Python | 687 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_transformers import DoctranTextTranslator
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handl... |
9eb5bc63e88c48458a4b37f1c2c85fe531d79c392810829fbf9d5370e5e8fdb4 | Python | 687 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.callbacks.flyte_callback import FlyteCallbackHandler
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# han... |
a4de0075923f47ef8bb55dbbda09ea0351841984468662db86115bcec595a505 | Python | 687 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_transformers import NucliaTextTransformer
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handl... |
a9eb3b275702858fcd00005452578f13029ce2e5acc8908b8dc0894b2323bc9a | Python | 687 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.callbacks.wandb_callback import WandbCallbackHandler
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# han... |
f67a37e8355338e174cfc5db9bead460df064132cbce3db478b9f5a192e70597 | Python | 687 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_loaders.parsers.html.bs4 import BS4HTMLParser
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# h... |
002df05f88c606dfcae8ceff25d69b53cb863ae0d9f30adee1b0b1bc115312ec | Python | 688 | 20 | # coding=utf-8
import torch.nn as nn
import numpy as np
def calc_coeff(iter_num, high=1.0, low=0.0, alpha=10.0, max_iter=10000.0):
return np.float(2.0 * (high - low) / (1.0 + np.exp(-alpha*iter_num / max_iter)) - (high - low) + low)
def init_weights(m):
classname = m.__class__.__name__
if classname.find... |
3ca5b35bbe3c0ddb281739eeac759cc4050f6d7208f9c5b323d924de67ae9ad5 | Python | 688 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.sql.toolkit import SQLDatabaseToolkit
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# han... |
608e77fb8784fc476fd54d5988762043287ceeb91359b13c7218fe50b03a5d9a | Python | 688 | 18 | from pycromanager import JavaBackendAcquisition, multi_d_acquisition_events, start_headless
import napari
# Optional: Launch headless mode, which means Micro-Manager does
# not already need to be open
# mm_app_path = 'C:/Program Files/Micro-Manager-2.0gamma'
# config_file = mm_app_path + "/MMConfig_demo.cfg"
# start_h... |
74aa5e1ed34b5f9103124710d7cd02c9d677a01ccc8a6ddd66ad3c9db42df135 | Python | 688 | 31 | import time
from tqdm import tqdm
def train(model, loader, loss_fn, optimizer, ema, device):
model.train()
total_loss = 0
# for batch in tqdm(loader):
for batch in loader:
start_time = time.time()
batch = batch.to(device)
optimizer.zero_grad(set_to_none=True)
output ... |
f9af57920091545722d197afc4a8162dbefdc31a0cd7c2cd4f730288a0fc42d8 | Python | 688 | 18 | """
For most of our neural prediction models, we use a core and readout architecture.
In this module, all the cores can be found.
The core's task is to encode the input into (hidden) representations, which are shared across all neurons.
These representations will be passed on to the readout to calculate the desired out... |
7a2b5d3f6af04ab1047caf8ffebde541b9c56726c93c54b92ce2eda94f763c94 | Python | 689 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities.dalle_image_generator import DallEAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# h... |
7f5cac267d8c083c6af18bc636fba9eb9fbd8c1bfe9756b9e900effdfe70647b | Python | 689 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_loaders import TencentCOSDirectoryLoader
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handli... |
9eef27aaa037e8cec84c48e3744623af0c88aad2f6f78d99e40d0dd16cb88e6a | Python | 689 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_loaders import UnstructuredOrgModeLoader
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handli... |
b9b7bd39c7df6f6a273d353fde01e023d6e22b849a801257f16a30a4862ac12d | Python | 689 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms.cloudflare_workersai import CloudflareWorkersAI
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# han... |
d3b92bdcfc921039d8e0bc0a0bef7da6428cb12d291dd36789c583a19fb154e7 | Python | 689 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_message_histories import ZepChatMessageHistory
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# hand... |
eb04096e09d63c778ff20161da30465264bdfa6d6cb03b777a51a63dce03162e | Python | 689 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_loaders import CollegeConfidentialLoader
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handli... |
0891cb464811de49b2f233240516e8ecc8b117ff7ade8f5d580fb958712f4d36 | Python | 690 | 25 | """Golden API toolkit."""
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools.golden_query.tool import GoldenQueryRun
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecatio... |
2e4061e8b8753d550477068350b0d4a24687b5f0dba54f4dfe62a21c231ea0d7 | Python | 690 | 30 | import os
import json
from pathlib import Path
import numpy as np
import math
def load_dict(PID_file):
with open(PID_file, 'r') as fp:
model_PID = json.load(fp)
return model_PID
def check_dict_exists(PID_file):
if Path(PID_file).exists():
return load_dict(PID_file)
else:
return... |
6dbabe57f450e9fbac6dfe95534b50eefaefbefeb4896f9eb45588bc53f19a3d | Python | 690 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools.google_trends.tool import GoogleTrendsQueryRun
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# han... |
0f473c5e95928d179e6212ca08c5e053c7befa324e1c5ec61a5c4b92894ee6ca | Python | 691 | 18 | from NeuronModel.Integrate_and_Fire import *
from NeuronModel.Integrate_and_Fire_MSN import *
from NeuronModel.Stein import *
from NeuronModel.Morris_Lecar import *
from NeuronModel.Integrate import *
from NeuronModel.FitzHugh_Nagumo import *
from NeuronModel.Poisson import *
from NeuronModel.Izhikevich import *
from N... |
38e44a0a9f8bd3136b7237c7b6d1e5643fa9755abba9a78be763ab941d49e5e0 | Python | 691 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.spark_sql.toolkit import SparkSQLToolkit
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# ... |
0d4eaf7ce18150dd6d5b6e66e05953ee5b309d31c1ee5d4c70e743350d0caeaf | Python | 692 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_loaders import AzureBlobStorageFileLoader
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handl... |
1d93fff4fa82680b07f9378112c04814651736332cc7de425c3375afecc2d1d7 | Python | 692 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_loaders import UnstructuredMarkdownLoader
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handl... |
39e37df469e6f7f0ae8189071311f43306b5c818ec600707fc5a7df23399e7a6 | Python | 692 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.callbacks.infino_callback import InfinoCallbackHandler
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# h... |
7087879fdeceb64f1507dff5056355398fef74b54a48b97a42d72c49663bb704 | Python | 692 | 24 | import pandas as pd
pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', 80)
df = pd.read_csv('exac-final-cnv.gene.scores071316', sep=' ')
df.head()
df.drop(['gene', 'chr', 'start', 'end'], axis=1, inplace=True)
df.head()
agg_df = df.groupby('gene_symbol').mean()
# Make sure flags in the i... |
a9cc74347d41935850ba12c091c0a7cab347f2074dd4bb5198971209ea62a04b | Python | 692 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_message_histories import XataChatMessageHistory
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# han... |
ac099b51d9438e2b58e84ef230c56f156ace73eb6af0ecd727d81fde2c3e2d33 | Python | 692 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_message_histories import FileChatMessageHistory
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# han... |
ad68db05ba1272415c802fc8aff4fd9ee370d4048e0fbbcdb0658fae75212068 | Python | 692 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.pai_eas_endpoint import PaiEasChatEndpoint
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# h... |
b5d6aa9eb35c321c2b491d6e3b38a9e7ae83fbc93cb8738af1b555e8cd700f6d | Python | 692 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.callbacks.arthur_callback import ArthurCallbackHandler
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# h... |
22862e3906ec697cb1dcd3bd3fea47cf9b3cb98758d585ffe6e820a1f6b27eb6 | Python | 693 | 18 | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# -*- coding: utf-8 -*-
from .checkpoint import load_checkpoint
from .layer_decay_optimizer_constructor import Learning... |
76adbff92ed78e3058374985ca06a0a67ea170c2e59da4b6fe8b1710033c3ddc | Python | 693 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.callbacks.comet_ml_callback import CometCallbackHandler
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# ... |
e1a36026718c00f60b7699e9b0fc3c319591f5b541bc197fd3463e974f3c61c6 | Python | 693 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.query_constructors.dashvector import DashvectorTranslator
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
... |
e852b5a04524611a06d1414d455ecd0373bf373633e7989e2934db8036a8f8ac | Python | 693 | 16 | import numpy as np
import sys
import os
prefix='/jukebox/griffiths/bert-brains/'
name=sys.argv[1]
master_participant_list=np.genfromtxt('/jukebox/hasson/snastase/narratives/participants.tsv',delimiter='\t',dtype=str)
if not(os.path.isdir(prefix+name+"_data/")):
os.mkdir(prefix+name+"_data/")
for i in range(1,master... |
ed61ab4c62c7791227bd55072386169263dd7ccedf3694e4220ac315b86a24d1 | Python | 693 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.query_constructors.opensearch import OpenSearchTranslator
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
... |
f786abf2df658f3d323033b16a18b716bdfebd2de5576448254da87119f2026b | Python | 693 | 25 | """Google Cloud Tools."""
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import GoogleCloudTextToSpeechTool
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation war... |
ff95f09f129d0f4dfc8807affff43b1b7ea95715e620415363ccb632f8c40ea9 | Python | 693 | 18 | """LangChain **Runnable** and the **LangChain Expression Language (LCEL)**.
The LangChain Expression Language (LCEL) offers a declarative method to build
production-grade programs that harness the power of LLMs.
Programs created using LCEL and LangChain Runnables inherently support
synchronous, asynchronous, batch, a... |
59f5a130e2992f1df2aada0c78326d3b1b58d541c3cd2552ce596dc229547187 | Python | 694 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities.reddit_search import RedditSearchAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# ha... |
7b25ea52b7c2dfc97dd7271e7ea1fae9020136f47a872df4310f584f66495b60 | Python | 694 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.ainetwork.toolkit import AINetworkToolkit
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
#... |
ae35a15fa3a5f55108c52342728e02a0a180c374a6aaf093929497eb4b4b6c99 | Python | 694 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities.tavily_search import TavilySearchAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# ha... |
6bcd08428b0e39b5c8bb5142eb2411cb1100c5d125dce7522427e8a12334c8de | Python | 695 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools.google_finance.tool import GoogleFinanceQueryRun
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# h... |
9c78aa3bd4c6a40bf4c500fc8bb06d2940c7a63b06c9f18803b43db455b1f744 | Python | 695 | 25 | """Eleven Labs Services Tools."""
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import ElevenLabsText2SpeechTool
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecati... |
b9e1c50583750bbec9926a2f0fa9b843db8bc2df82506eecb1134ee00ef59029 | Python | 695 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_message_histories import RedisChatMessageHistory
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# ha... |
dcd11e95b31fbb9692fff25543e0dbb18817d13d40c30e69e83991c8d64370c2 | Python | 695 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_message_histories import Neo4jChatMessageHistory
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# ha... |
e2cebd4d7d4a7253193e5903bcb39c5b92df325742fcbf7de6e5a2d087111126 | Python | 695 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools.google_scholar.tool import GoogleScholarQueryRun
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# h... |
23c114a5902a765ad86fcc9bcf0174ccf856081717a5c4da92c430a6d6064d9d | Python | 696 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_transformers import DoctranPropertyExtractor
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# ha... |
41473739d9000876c03b2fb6ebe8e493e2e210bda39ae2e2902877d02698c0a7 | Python | 696 | 22 | from langchain_classic.output_parsers.regex import RegexParser
def load_output_parser(config: dict) -> dict:
"""Load an output parser.
Args:
config: config dict
Returns:
config dict with output parser loaded
"""
if "output_parsers" in config and config["output_parsers"] is not No... |
612914c1cc81ee139faeb42e8dc16842edcfff48aaeded7324564fee62ffb189 | Python | 696 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.openapi.base import create_openapi_agent
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# ... |
8944a9c1ddbe91665d096b8302491ebe10a8a7373db494cb0a28b26ffdcba239 | Python | 696 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_transformers import BeautifulSoupTransformer
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# ha... |
f2d6354d59731ff5a4a59ac38ceb386021039ec2972c7d73f219efe326473c5a | Python | 696 | 25 | import numpy as np
import pandas as pd
import pytest
from coffeine.covariance_transformers import Riemann
n_subjects = 10
n_channels = 4
def toy_data(data_frame):
X_cov = np.random.randn(
n_subjects, n_channels, n_channels)
for sub in range(n_subjects):
X_cov[sub] = X_cov[sub] @ X_cov[sub].T
... |
aaa51028da448440cdceaf004d19cf11c308d2efdd2b38032b06e21c2e20ff7e | Python | 697 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.callbacks.argilla_callback import ArgillaCallbackHandler
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
#... |
b03af8c823490328f1fd3a58f7b66aa473042388ab52c98c54098ef73908c8d6 | Python | 697 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.callbacks.context_callback import ContextCallbackHandler
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
#... |
b19c40fed28a0f40bdde06bb3885a8df0fc5c818ccc901623115c698906c968f | Python | 697 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.callbacks.clearml_callback import ClearMLCallbackHandler
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
#... |
fc53a7704f6ef83996a4c8dccba8292de581fc9d299a15798d668a33eb03b51d | Python | 697 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.callbacks.whylabs_callback import WhyLabsCallbackHandler
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
#... |
d25ab4bfe1288ba268f7c5a8045e5bec0deb5f0ddf6f68ab4a61c9ba77eed68c | Python | 698 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_loaders import UnstructuredPowerPointLoader
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# han... |
f17318ccf858a6e03dc03133b65b0afaa4f2e7b4a5fe4a9929ca4874c883c6b3 | Python | 698 | 24 | from voxcell import VoxelData
import flatmap_util as fmutil
import numpy as np
import sys
flatmap_nrrd = sys.argv[1]
rmask_nrrd = sys.argv[2]
output_nrrd = sys.argv[3]
interp = True
if len(sys.argv) > 4:
interp = True if sys.argv[4] in ["true", "True"] else\
(False if sys.argv[4] in ["false", "Fal... |
10fb3a39ca9b127f086688bfe45f9a121a6b3e29d3dc4895906e8bf38d9053c2 | Python | 699 | 33 | from .ANM import ANM
from .BootstrapEstimator import BootstrapEstimator
from .ChowLiu import ChowLiu
from .ExpertInLoop import ExpertInLoop
from .ExpertKnowledge import ExpertKnowledge
from .GES import GES
from .HillClimbSearch import HillClimbSearch
from .IGCI import IGCI
from .LLMPairwise import LLMPairwise
from .PC ... |
4aeff6413ae8ea1bd9c93f8f7c40a0567f23c81f3a7dcb96dd9c775b13c20f16 | Python | 699 | 27 | import numpy as np
def one_hot_to_dna_str(one_hot_seq):
bases = np.array(['A', 'C', 'G', 'T', 'N'])
max_indices = np.argmax(one_hot_seq, axis=1)
is_invalid = np.sum(one_hot_seq, axis=1) != 1
max_indices[is_invalid] = 4
dna_seq = bases[max_indices]
return ''.join(dna_seq)
def dna_str_to_o... |
f895989628735e6a53cdae287440a76248a04d3c75583ffc3923aa164030cad3 | Python | 699 | 23 | def stripHydrogens(structure):
"""Strip all hydrogen atoms from the given model.
Parameters
----------
model: BioPython MODEL object
The model to be stripped of hydrogens.
"""
if structure.get_level() == 'R':
rm = []
for atom in structure:
if atom.element... |
0371ff2d445ba922c535fa14097fcaf419c9645e5a4c8707bd37466c0c241e23 | Python | 700 | 16 | from omicscope import Omicscope
class TestOmicScope(object):
def test_user_input_stat(self):
progenesis = Omicscope(Table='tests//data//proteins//progenesis.csv',
Method='Progenesis',
ControlGroup='WT',
pvalue='pv... |
e4f62d01a0a105912063686c3de7f77d055352e28307e8ab6411ffbda049e5c8 | Python | 700 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.output_parsers.rail_parser import GuardrailsOutputParser
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
#... |
2d3ce737c90447a255cc97111c131876b5c25b77e1fa1311ea88bb3206de04f6 | Python | 701 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.query_constructors.supabase import SupabaseVectorTranslator
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings an... |
7003d746317f56080c5a3ab6d7fd130dd391e46ff03390c449acd26262a0752e | Python | 701 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_message_histories import MongoDBChatMessageHistory
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# ... |
8ea6d9f21aebc99856013dac84a47fcc5558f26dc5142d5f1bbf6e88f3d3fd3f | Python | 701 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_message_histories import AstraDBChatMessageHistory
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# ... |
b1cc616855c8ed22496d7b633e7d6cb5049248d850d778295fba8f9c73055f35 | Python | 701 | 23 | #!/usr/bin/python
import sys
import json
import hashlib
import os
import shutil
import subprocess
doc = json.loads(sys.stdin.read())
output = {}
success = False
for site, output in doc["input"].items():
if doc["state"]["iteration"] == 1:
files = os.listdir(os.path.join(doc["state"]["baseDirectory"], site)... |
dcf9a50df01dd302b20eb114ba139fd0e913e91b6f53a0981b15fc2b9f103127 | Python | 701 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_message_histories import RocksetChatMessageHistory
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# ... |
f4f3b3618380b6659cb344cedd43ca85e0187af3a339cfce4305bc343695ce17 | Python | 701 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_message_histories import MomentoChatMessageHistory
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# ... |
134aeff53ff82c6bda38be66cf1f17e29171eb3968dd6e1c02826c7afca0cdc1 | Python | 702 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_transformers import GoogleTranslateTransformer
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# ... |
6ebe814b62ce96af3d401355da0eedb182b0aa5dc4387b62a2ef6ef48c3f8382 | Python | 702 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.callbacks.trubrics_callback import TrubricsCallbackHandler
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and... |
16f1fe3caf29fb1f5e83bc1ff5f2f190d841aa21c291ddc72ae6a77b5ea33480 | Python | 703 | 25 | """Tool to generate an image."""
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import SteamshipImageGenerationTool
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising depreca... |
5790e05f0480fdbb463474f489b1b6d416a0ecc1d05883634395f335301619cc | Python | 703 | 13 | """ Current version of the t5chem application.
This project uses the Semantic Versioning scheme in conjunction with PEP 0440:
<http://semver.org/>
<https://www.python.org/dev/peps/pep-0440>
Major versions introduce significant changes to the API, and backwards
compatibility is not guaranteed. Minor versions ar... |
84074a3a23a42aeda5427f2570e60e81fdbd176b409f9cf69c19efa48f3b3cb6 | Python | 703 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_loaders.parsers.generic import MimeTypeBasedParser
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings an... |
d094c0e4a1ce182888c861a4f9f48e467d3a32b11a9a30782fec70f01f525f77 | Python | 703 | 23 | import torch
import torch.nn as nn
import backbone
class Network(nn.Module):
def __init__(self, base_net='alexnet', n_class=31):
super(Network, self).__init__()
self.n_class = n_class
self.base_network = backbone.network_dict[base_net]()
self.classifier_layer = nn.Linear(
... |
2e3b6c7ea3613287eadb61dc380aac51782069531989a1baa36c2e47ebe266ba | Python | 704 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities.dataforseo_api_search import DataForSeoAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings an... |
66cfdd307d1b4eadea71f6139abf7b7e2bd665dd06bfc17a235cf5c6241271b2 | Python | 704 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_message_histories import CosmosDBChatMessageHistory
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
#... |
6e191f8da39d269e80867355a80c3117f1eacbdab4b6d865a0e86f961e7e8be5 | Python | 704 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_message_histories import DynamoDBChatMessageHistory
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
#... |
6f0214015bce172e4803beb8585de8f64109e686ff3ba2866d1b8063a03fd284 | Python | 704 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_message_histories import PostgresChatMessageHistory
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
#... |
7883d65c5cb43433f1209607648443d8ff089c61649cefff4d86e10be7f98da6 | Python | 704 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.retrievers import GoogleDocumentAIWarehouseRetriever
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# han... |
e2f4cfb012a627fab745732f82e1fb9e1a28a278bd224ad37f2549942e71d727 | Python | 704 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.callbacks.confident_callback import DeepEvalCallbackHandler
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings an... |
0a72fa203cfc4e1a1db8eb03812107028f58df7c0c7b2f8da5dbc29ba169aadc | Python | 705 | 25 | """Google Lens API Toolkit."""
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools.google_lens.tool import GoogleLensQueryRun
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising de... |
5f42e9a1313072dd8842eefa977825c73eaa22457a7fe687d062fe6a8de3410c | Python | 705 | 25 | """Google Jobs API Toolkit."""
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools.google_jobs.tool import GoogleJobsQueryRun
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising de... |
9a6842c8414523a9ac8a547e27bcb14257988e74f9393285431058ced35e0dca | Python | 705 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.promptlayer_openai import PromptLayerChatOpenAI
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings an... |
6f445bc33f873351ebc4c1fa832d63bee3339656ba471342ae34c9d07ebe56d2 | Python | 706 | 28 | import sys
from .reaction_network import ReactionNetwork
from .vectorized_rxn_net import VectorizedRxnNet
from .vectorized_rxn_net_KinSim import VectorizedRxnNet_KinSim
from .vec_sim import VecSim
from .vec_kinsim import VecKinSim
from .optimizer import Optimizer
from .EqSolver import EquilibriumSolver
from .reaction_... |
caa1a530043e5bfb86f12a4085c112edf1086032774fde387240534504ff6c92 | Python | 706 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.spark_sql.base import create_spark_sql_agent
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings an... |
1c5821ff45e02c1b2f52bfce8768a7903b15e2ab0257543a434871a53cd787cc | Python | 707 | 26 | from __future__ import annotations
class VarSparse:
def __init__(self, max_sparse: float, min_sparse: float, step: float) -> None:
self.sparse = max_sparse
self.max_sparse = max_sparse
self.min_sparse = min_sparse
self.range = self.max_sparse - self.min_sparse
self.step = s... |
4de65a4936599a061b9c84e89ac1a5780ec1d4bda3286c16f500726a12d32e4c | Python | 707 | 25 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_message_histories import StreamlitChatMessageHistory
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.