sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
05c4a058b563717d42e473f9dfd87470d842545899aae868b877f8f1c780d7f2 | Python | 614 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import AwaDB
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEP... |
087b5105006599a4428bd2fdef826abefd8399df00fb7a5845c36e67c83812ba | Python | 614 | 25 | from pycromanager import MagellanAcquisition, multi_d_acquisition_events
import numpy as np
def hook_fn(event):
# if np.random.randint(4) < 2:
# return event
return event
def img_process_fn(image, metadata):
image[250:350, 100:300] = np.random.randint(0, 3000, size=(100, 200))
return image, m... |
13f477110d9cecf59d9b888429a8934f38aaa95bc3a179c53e11afb9160fe515 | Python | 614 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.graphs import HugeGraph
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRE... |
3f2617af226472812f64183d475781dc073797ba12204ae8aade700a9d2e7938 | Python | 614 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import ScaNN
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEP... |
4022132d31fdd96a0a3dd60297439cb4a4b1a4cd46dc4eab73459b85d759f9f5 | Python | 614 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Bagel
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEP... |
68c90e60f4a992105971703065832da39f083018b02a1e8a566b217089d78b3b | Python | 614 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Marqo
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEP... |
82391349dad414d1575014b9e71312b525267ef66a9d6006f5d8e5d9b715c93b | Python | 614 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import FAISS
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEP... |
8e3e7ad9fee3b81c29b4fa5e26d89a60e4efe5666da57a31aa9f3aee9b71c8e2 | Python | 614 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.graphs import KuzuGraph
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRE... |
9c856084fb9ec3bed120db04418259d0be0b3d45179c6da02fcd379ffb6fe337 | Python | 614 | 28 | from langchain_classic import utils
EXPECTED_ALL = [
"StrictFormatter",
"check_package_version",
"comma_list",
"convert_to_secret_str",
"cosine_similarity",
"cosine_similarity_top_k",
"formatter",
"get_bolded_text",
"get_color_mapping",
"get_colored_text",
"get_from_dict_or_... |
9f70194c7ba2a20024e58365039744dfe068cb65432d53862f75de200610d6e3 | Python | 614 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Annoy
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEP... |
b765f89b6c177e7137441ea48a212c0dbc71b261fb87b41e810722db84138dfa | Python | 614 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Dingo
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEP... |
d1d2c9d8e8885daf2db46c0b15850b2c3cf7a3c03683da03b66434359cf9980a | Python | 614 | 20 | import pandas as pd
import os
def save_straight_morpho_params( save_folder, cond, props ):
# Make it work for Python 2+3 and with Unicode
# print('### Done computing, saving data...')
data = pd.DataFrame(props)
fname = os.path.join(save_folder,cond+'_morpho_straight_params.json')
data = data.to_js... |
da4fd8774c66bb87fc28fff869ba221d5ccce475224373e8dd086aacb214f50a | Python | 614 | 17 | import requests
from requests.auth import HTTPBasicAuth
class CatmaidApiTokenAuth(HTTPBasicAuth):
"""Attaches HTTP X-Authorization Token headers to the given Request.
Optionally, Basic HTTP Authentication can also be used.
"""
def __init__(self, token, username=None, password=None):
super(Catm... |
fb5feaa5a6b26f9fc7685bacc43fff4c9b3917ffcc1d5be4e2c037ae4fc1d92c | Python | 614 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import Portkey
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPR... |
12bdf19f1d715b98ba0e799a5540765055d3c990da546c524d5df192c6ad5ee4 | Python | 615 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import NasaAction
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRE... |
5291796edc0261d660f267313f0a830a6343fd91b45002172e42102cca16dc15 | Python | 615 | 22 | from . import loader
from ._types import PfpData
from .core import create_pfp, reduce_pfp_in_dataset, apply_reduction_to_pfp_in_dataset
from .logger import PFPLOGGER
from .fingerprints import reduce_fp_set, apply_reduction_fp_set
from .utils import test_polymer_smiles, test_endgroup, test_startgroup
from . import datar... |
6dc248d8b582021370516da10fc3148f79d1122f7e2f2e8af5c5bbaa1e2118f3 | Python | 615 | 22 | import numpy as np
import copy
class simulatorClass:
def __init__(self, networkInstance, dt=0.1, T=1.):
self.network = networkInstance
self.dt = dt
self.T = T
self.time = np.arange(0., self.T, self.dt)
self.N = len(self.time)
self.parameters = None
def subclass... |
cca6c13e7d79769ac16a9d6efd3ffb54dca5ec6198f4f80f7e631e04bbc7a0f3 | Python | 615 | 16 | def addWeightDecay(model, weight_decay=1e-5, skip_list=()):
"""This function excludes certain parameters (e.g. batch norm, and linear biases)
from being subject to weight decay"""
decay = []
no_decay = []
for name, param in model.named_parameters():
if not param.requires_grad:
co... |
e564037d39b5776196ae486420f9d8bf4cc00935476de51146f6c15e8ef0dbd0 | Python | 615 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import EdenaiTool
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRE... |
0045135406383359b6db06f464bd075ee32a2604264740e02235690498ec3dc1 | Python | 616 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import CerebriumAI
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRE... |
b85c65b52d6b720d68c3fd66c43cf5d06e1866620b0ab50085d0a7641888792d | Python | 616 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import CTranslate2
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRE... |
b8c50093858fd3f3f53166f9c0e1fa2002888dabe39819bd40fb33e7e8cbdb1a | Python | 616 | 15 | #TO BE UPDATED
from NeuronModel.NeuronClass import neuronClass
from InitFunctions import gaussian
class rate(neuronClass) :
parameters = {'save': True, 'spike':False, 'tau': 10., 'R': 1.}
def __init__(self,**kwargs):
neuronClass.__init__(self,**kwargs)
neuronClass.subclass(self,rate.parameters... |
c6ba47751e798caf788861b2f892aa7d31f8b0ba9e73f5bf25ecb017c1ae9aa5 | Python | 616 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import ForefrontAI
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRE... |
0f1bcf692d37da94a0982f40019e7cc5ce652fc0fd9bec7300c5ef03f8abb2b3 | Python | 617 | 23 | from abc import abstractmethod
import torch
from torch import nn
from torch.nn.functional import elu
class NonLinearity(nn.Module):
@abstractmethod
def forward_implementation(self, x: torch.Tensor) -> torch.Tensor:
raise NotImplementedError
def forward(self, x: torch.Tensor) -> torch.Tensor:
... |
1f4d289bd19fe6d85d669d5dafa8693008edd19b3ef3a80186c4afdb5695b817 | Python | 617 | 21 | from pdearena.configs.config_coal import CoalVelocityVfracTempTimeIntegratorConfig
from pdearena.configs.config import PretrainedCFDConfig
class CoalVelocityVfracTempPretrainedCFDConfig(
CoalVelocityVfracTempTimeIntegratorConfig,
PretrainedCFDConfig
):
model: str = "Unetmod-cond2-v2-64_4_1" # p... |
2065d5af859da5faca156b3cfe1611561680e46c5a43e91066536662d8f23943 | Python | 617 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.graphs import Neo4jGraph
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPR... |
2be3241c1c917d72f970dfb0efc26b50e90baaa0641bd0fd9b986aa8eca70710 | Python | 617 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import SemaDB
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DE... |
6de5eef37f8ec252e8972628a42e12a84456eb20167486e3886e59452a864619 | Python | 617 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Milvus
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DE... |
75c1ce0216d9b4b21611f735fcb4b06308968725f44418072f714aa2f7b410db | Python | 617 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import TileDB
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DE... |
c3dae76b91ef548edf6d0304cda90796e7fb48b394f63f09231104147a60faef | Python | 617 | 22 | """Checksums and atomic JSON output shared by pipeline stages."""
import hashlib
import json
import os
from pathlib import Path
def sha256_file(path):
digest = hashlib.sha256()
with open(path, "rb") as stream:
for chunk in iter(lambda: stream.read(1024 * 1024), b""):
digest.update(chunk)
... |
c4ec34ac56539611de7c40ba944b6d6f2068df97e1915bf1914b3c23ccd9ec17 | Python | 617 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Zilliz
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DE... |
d20159056f4a8e54bef864febb21433f116f06b91ffa3490099a54e7dad81f8c | Python | 617 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Chroma
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DE... |
de4328bfe93ac4c285ff2f94e17461b9230fb83387bc3982bfac4d618f0477bd | Python | 617 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Vearch
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DE... |
fd8403d0c8550f7b4d24955ed27f2dbcfa0f90d7d277c3c7c5194fe93fbb12c1 | Python | 617 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import SparkSQL
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEP... |
25ac654401054e81c68f68bcdc9811e762f2ee37aee57653671fac5848f8b232 | Python | 618 | 22 | """`RunInfo` class."""
from __future__ import annotations
from uuid import UUID
from pydantic import BaseModel
class RunInfo(BaseModel):
"""Class that contains metadata for a single execution of a chain or model.
Defined for backwards compatibility with older versions of `langchain_core`.
!!! warning... |
605ae8027706544e53a979efb15fac6395b849657885db390166b11e291698fa | Python | 618 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import BraveSearch
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPR... |
ab5bec53199f181ae6a51032ce41825cfae9d9d799310f3cc1df5c0dc0980b25 | Python | 618 | 20 | from typing import Any
def get_prompt_input_key(inputs: dict[str, Any], memory_variables: list[str]) -> str:
"""Get the prompt input key.
Args:
inputs: Dict[str, Any]
memory_variables: List[str]
Returns:
A prompt input key.
"""
# "stop" is a special key that can be passed... |
00f9597afc67385a2e38f307abd64ddbb369dd32a924924a59d374a3d91cc286 | Python | 619 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import TitanTakeoff
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPR... |
3abbc9ee3de2e0d8dbcdcb886cb2d7152358becbfdd0a0e53381e297b8a89491 | Python | 619 | 28 | import math
import torch
import torch.nn.functional as F
def ShiftedSoftPlus(x):
return torch.nn.functional.softplus(x) - math.log(2.0)
def get_nonlinear(nonlinear: str):
if nonlinear.lower() == 'ssp':
return ShiftedSoftPlus
elif nonlinear.lower() == 'silu':
return F.silu
... |
5c84447290f75a685fcfdaefb9387c4feca4efaa564dab9fa99a33751eb463c7 | Python | 619 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.storage import RedisStore
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEP... |
76962677ac7a357f612fbcb8a64b86897ff689837795c0a2bd8eaf91574ebc03 | Python | 619 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import KoboldApiLLM
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPR... |
cf557c71c7bc48b2099ef9abb1265266d4c799d98bf5376071479e1caacce0fc | Python | 619 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import StochasticAI
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPR... |
05efdcc5b8ce3fffd0d232513184012abb0cc3de5f65731891ae6c0ede4d8914 | Python | 620 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import AtlasDB
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
D... |
1c6ed937fe1a40e4fad32eab99277b198a75303f7dbcaf47eb118ebd943914f2 | Python | 620 | 37 |
infile=open("imm1415_pathway_gene_symbol_tbl.tsv", "r")
outfile=open("imm1415_pathway_genesymbol.gmt", "w")
tab="\t"
pathwaydb={}
fs=infile.readline()
while 1:
fs=infile.readline()
if fs=="":
break
fsl=fs[:-1].split(tab)
path=fsl[0]
gene=fsl[1]
if path in pathwaydb.keys():
... |
37e6362b677f6adf1e6228571d6bf6d8fa17e129af209b0a846fd900586a61c3 | Python | 620 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import USearch
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
D... |
3b4f4e09e110498ce76991a007f4ebef82694010d3afc2bdd4c649abf29afe7a | Python | 620 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.graphs import NebulaGraph
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEP... |
431463f214dbed8e6e7f5a4f5635214d35f122e85e9a379700742d3c6c209b52 | Python | 620 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import AstraDB
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
D... |
562de740d5714eb317ef8e8fa149db90ffc1ed0dd48f538d7cf80c45ceb51c7e | Python | 620 | 24 | from .pca import \
calculate_pca, \
pca_eigenvalues_plot, \
project_on_pc, \
get_components_pca, \
sort_traj_along_pc, \
sort_trajs_along_common_pc, \
sort_mult_trajs_along_common_pc
from .tica import \
calculate_tica, \
tica_eigenvalues_plot, \
project_on_tic, \
get_compone... |
66cb0d04cb8ea0abe5990db242f8ffeb856645a584f90b19352cb6bfbd5b8d7d | Python | 620 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Rockset
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
D... |
8982c64d8f79a95250a1dd6fdf28db1e7bca6dac49fa1db570842dfe641a3cfd | Python | 620 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import LanceDB
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
D... |
8e92c0c7524aca2c5f551fb689f52ebfb26d8fbbb0ce5a046c2b8e3ef1327929 | Python | 620 | 21 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 7 18:39:26 2019
@author: shni2598
"""
#from connection import g_pool_generator
#from connection import hybrid_degree
#from connection import generate_connection
#from connection import inverse_pool
from connection import connect_2latti... |
b993551fb4c8245f9b64f09371e2d4f9f1499f0eec1c03aeb181af5d9b8489ed | Python | 620 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Epsilla
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
D... |
175e22d9daeaa241daa4c969199a227146a87620df70c057744898496e4bdf6f | Python | 621 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import IFTTTWebhook
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEP... |
876b0ce5501e6e2ab09f6ad690ae1964f0d24573c3e57645f7a229685ef53df7 | Python | 621 | 18 | import sys
sys.path.append('../source')
from tina_main import dataset
import tinaui
t1 = dataset(folder='../test/sampledata/ocn') # initialize the dataset
# load images with smaller extent, using the information from .xml-files
# for spacing of the image data
tinaui.load_initial_data(t1, ftype='tif', nfilter=[
... |
9cd12447854da4b024b9d5a234fea7359f3d6c16b021a895d2880c79433cd091 | Python | 622 | 24 | from setuptools import setup, find_packages
# setup.
setup(name='retina-chatbands',
version='0.1',
description='detection of retina chatbands in 3d fluorescence microscopy stacks',
license='BSD',
packages=find_packages(exclude=[
'tests',
]),
install_requires=[
'l... |
a91112f1d6da327d30901ababb75993fcb6c6d598dd4b349d3facb743a782f94 | Python | 622 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import OpaquePrompts
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEP... |
b9c7a86d79594f257c16b4afd50a8a4a3ea8939a109e0b65b3d5275432b8e431 | Python | 622 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import CTransformers
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEP... |
dfb7b6c51d6d458aaaf9ca1dd84c5f05381fe2d02306a4ceb749b2628da74239 | Python | 622 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import HumanInputLLM
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEP... |
35b2f8f337e6094dec037b5801b61cd6bd7acb8d3ff96824ba19534ae98ac1da | Python | 623 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import DeepLake
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
... |
4817a300bcae59556af4205b39924615829325353e0d9d82309d743d5bd084f5 | Python | 623 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Clarifai
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
... |
60087bdc02e2652c5a42b55c01fb79d71a50964ce26cec516fecc7dc345914c6 | Python | 623 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Pinecone
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
... |
684d0a287571e8066105cc6d03744fbd4927560b907a856ec0dadd7c01f3d586 | Python | 623 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Hologres
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
... |
8d21809f2e6a7f3242e4b2758338449e66f033456c5193c794460e0428ed7256 | Python | 623 | 9 | #!/usr/bin/env python
HUMAN_SOMATIC_CHROMOSOMES = [ str(x) for x in range(1, 23) ]
BASELINE_WEIGHTS_URL = "https://storage.googleapis.com/broad-alkesgroup-public/LDSCORE/GRCh38/weights.tgz"
BASELINE_FREQUENCIES_URL = "https://storage.googleapis.com/broad-alkesgroup-public/LDSCORE/1000G_Phase3_frq.tgz"
BASELINE_LD_URL... |
91c6882965232cdab243e367a516c3ef23f629436e20994301050cf1a78cdb0c | Python | 623 | 32 | # 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 PolyFit(x,fs,N):
x = np.transpose(x)
L = len(x)
n = np.arange(0,L)
t = n... |
a8bee19025495a4593540e9e68ef1b15ccf12e4426a86ab8f07a58dfaff03827 | Python | 623 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Weaviate
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
... |
e7e25bdc20904b4c42504bb26ba89707436445ec4ba5a3801d6be40f2c2a69b4 | Python | 623 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.graphs import NeptuneGraph
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DE... |
8005c7b5bff2e0b9138e2066a412c3f5cd091d76e8209a0da5763d92d033ea6c | Python | 624 | 20 | import tensorflow as tf
from tensorflow.keras.layers import Flatten, Reshape
from typing import List
from .layer import LRPLayer
class ReshapeLRP(LRPLayer):
def __init__(self, layer, *args, name: str = 'reshape_lrp', **kwargs):
assert isinstance(layer, (Flatten, Reshape)), \
'ReshapeLRP shoul... |
a0c457dd6957a0f33fd43a9f3fa385ee6421279dd9bb75e85f4c12104b307480 | Python | 624 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import HumanInputRun
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DE... |
0d8ca7ccb5c3e6426994e58e69435cdbd531d097253a510a967771552bc7ec3e | Python | 625 | 19 | """This module provides backward-compatible exports of core language model classes.
These classes are re-exported for compatibility with older versions of LangChain
and allow users to import language model interfaces from a stable path.
Exports:
- LLM: Abstract base class for all LLMs
- BaseLLM: Deprecated or... |
23333baed7fb32817e4eace814e1c965be629bec73c20124d2bbddb6b7227b4f | Python | 625 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import HuggingFaceHub
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DE... |
3993115812de8d79c135743d3a52882b015c7105d9e2cf3e54d9afa6109c0c49 | Python | 625 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import PaiEasEndpoint
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DE... |
828ee260082c59ba65c4f5f6fb35532ab05192c64d1f86bdaf534e2cf9f5fa33 | Python | 625 | 15 | import numpy as np
def lof_1d(data, k):
distances = np.abs(np.subtract.outer(data, data))
kdist = np.apply_along_axis(lambda x: np.sort(x)[k-1], 0, distances)
lrd = 1 / (np.apply_along_axis(lambda x: np.sum(kdist[x != 0]), 0, distances) / (k * np.sum(kdist)))
lof = np.apply_along_axis(lambda x: n... |
af60110e9ed6a28c8f26d1a70b2e952f33fff7b97a0ae33ca90821c830197672 | Python | 625 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import NIBittensorLLM
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DE... |
d6c0494d972d06c2a371d25847e5fd7b7934af5bcf24149ca032137ee25ecf7b | Python | 625 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import OctoAIEndpoint
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DE... |
107514b3b8a0702d5f3214f583cb599a43df35b69c55bd6fed1bf7f0fffd0239 | Python | 626 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Cassandra
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.... |
4950169e06cd4fcfc93857b3ae5335ec1f8a34077d19de390ee0c663b2f02e48 | Python | 626 | 19 | from PIL import Image
import numpy as np
def save_gif(single_seq, fname):
"""Save a single gif consisting of image sequence in single_seq to fname."""
img_seq = [Image.fromarray(img.astype(np.float32) * 255, 'F').convert("L") for img in single_seq]
img = img_seq[0]
img.save(fname, save_all=True, append... |
4f1697c9527c31369a227616d4823f3dea441629e80b9d81b3a12854b0935a95 | Python | 626 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.graphs import FalkorDBGraph
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
D... |
a29c67b27c801d0093cd3bdce4d2ed65a8c705a4486f7e5a605f5b29d84ab7df | Python | 626 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import SQLiteVSS
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.... |
b342ad3b163fcb73b534af1d70c95b7a8fbd7584f3992dae06082e963749fa4b | Python | 626 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import Typesense
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.... |
d0530d2756dae20f9e93afc938fd3ed26a0f490ee12f542b590449c2f3c54527 | Python | 626 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores.hippo import Hippo
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional import... |
f71a125c3da08e3926933fcdbf186422f9478039222f071ca0fcc3e0479f3ca0 | Python | 626 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.graphs import MemgraphGraph
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
D... |
0b524e38672e80246dc909d657af1a375ae0b29e3284919cf1c79159a74e8151 | Python | 627 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import PubmedQueryRun
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
D... |
dcd8a055860ec49578b5bfdf778a8d007b0f8607af36c1890bd9529e691a0782 | Python | 627 | 24 | """
test the ability to acquisitions to have String axes instead of int ones
"""
from pycromanager import JavaBackendAcquisition
from launcher import multi_d_acquisition_events_new
with JavaBackendAcquisition(directory="/Users/henrypinkard/tmp", name="NDTiff3.2_monochrome", debug=False) as acq:
# Generate the e... |
314ae252a5638f2241dd57a2344745776f0397d96b88373e926f819a8f52f754 | Python | 628 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import ManifestWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
D... |
38f15a9b31528988dc983f6d1d611cec22b92335897deee6420959d1f17e7b8d | Python | 628 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import MlflowAIGateway
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
D... |
c75af3bf5296785fe0279aa4ab1252705c1731863966c7ffd5fd3d1090fc1414 | Python | 628 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import TitanTakeoffPro
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
D... |
df752ff12ee2a5da7741e203396e32ea1bf0faeea4945bf687d76be51125e949 | Python | 628 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import PredictionGuard
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
D... |
05004daed54cc7f17080c09f5862ada8ba13cdabdc12dd750f6b2d139f553ebb | Python | 629 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import AnalyticDB
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports... |
0d125d1d9313b238f7dbfd1b3910024fb6fc77d8666f15cd52dca654897451f1 | Python | 629 | 23 | import os
from pycromanager import ZMQRemoteMMCoreJ, JavaBackendAcquisition, multi_d_acquisition_events, start_headless
PORT1 = 4827
PORT2 = 5827
events1 = multi_d_acquisition_events(num_time_points = 100)
events2 = multi_d_acquisition_events(num_time_points = 50)
save_path = r"C:\Users\henry\Desktop\datadump"
acq... |
42cb0eb1ce1ebb49ab180c628c54aa82e37c076115b537d6d600c93ad22cc872 | Python | 629 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import ApifyWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.... |
650e9f8c117bb0e205c3b17d0b4c2eab474abce667b72bad9af94b9b571dd786 | Python | 629 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import VespaStore
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports... |
b678d2eef98429b33c64e63a3b1748537a490ab99e6c86da7accce14768f18af | Python | 629 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.vectorstores import DashVector
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports... |
bbfbfc4e5083f98157dc5fb395387ebfc3da539558aabbc167ca093729fe67ac | Python | 629 | 14 | # Copyright (c) MONAI Consortium
# 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, so... |
1c32392009bd032580b449620794442a3b9e859adfd3decf97b7fa9616f32a21 | Python | 630 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import BaseGraphQLTool
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
... |
670fb8abd817304f0020cde9dfc2eb3548ba2efc6e8cd376af87533720a1b8e7 | Python | 630 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import ExtractTextTool
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
... |
953d93e5c4467da196a7d964de8d6b75030b0a3d0b24b41191e75edfd5af575a | Python | 630 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import SlackGetChannel
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
... |
51a5089a474b6dbe582bf4144e9a5052135f1ad8724ab3b497d58bbd3f603bdf | Python | 631 | 25 | """Shell tool."""
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import ShellTool
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optio... |
a1b485cf0c0f9dd8ae5a23db0202032ba3b9912a669c80a1839c03c31a3ced22 | Python | 631 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import AmazonAPIGateway
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
... |
b63ddfb24b3554ac8291353468919d3634740f528dd82769310fd3cf58bd14f5 | Python | 631 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.retrievers import SVMRetriever
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports... |
dd8e4bfe2966e5432819cd8404561aeb2ac2a4347e6787b933be9d97b2f0b348 | Python | 631 | 23 | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_loaders import HNLoader
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional impor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.