Saravanan666/pypi-org huggingface dataset:
Package: fastack-mail
fastack-mailSimple plugin for sending email.This plugin is inspired byfastapi-mailInstallationpip install fastack-mailUsageInstall pluginPLUGINS=[...,"fastack_mail",]ConfigurationEMAIL_BACKEND= "fastack_mail.backend.EmailBackend" [required]EMAIL_HOSTNAME= SMTP Server (e.g. "localhost") [required]EMAIL_PORT= SMTP Port Server (e.g. 8025) [required]EMAIL_USERNAME= SMTP username (e.g. "john@doe.com") [optional]EMAIL_PASSWORD= SMTP password (e.g. "luarbiasa") [optional]EMAIL_TIMEOUT= Connection time out (default 60) [optional]EMAIL_USE_TLS= IfTrue, make theinitialconnection to the server over TLS/SSL (default False)EMAIL_START_TLS= IfTrue, make theinitialconnection to the server over plaintext, and then upgrade the connection to TLS/SSL. Not compatible withEMAIL_USE_TLS. (default False)EMAIL_VALIDATE_CERTS= Determines if server certificates are validated (default True)EMAIL_CLIENT_CERT= Path to client side certificate, for TLS verification. (default None)EMAIL_CLIENT_KEY= Path to client side key, for TLS verification. (default None)EMAIL_CERT_BUNDLE= Path to certificate bundle, for TLS verification. (default None)EMAIL_ASYNC_MODE= IfTrue, theEmailBackend.sendfunction returns an awaitable object, ifFalseit returns an immediate send result. (default False)DEFAULT_FROM_EMAIL= Default sender email for use globally (if there is no sender email) (e.g. "Local <noreply@localhost>")ExampleSee herehttps://github.com/fastack-dev/fastack-mail/tree/main/examples/mail
Package: fastack-migrate
fastack-migratefastack-migrate is a database migration tool forfastack.This is a fork offlask-migrate!UsageInstall plugin:pip install -U fastack-migrateAdd the plugin to your project configuration:PLUGINS=["fastack_sqlmodel","fastack_migrate",...]And initialize your project with alembic template:fastack db initThen check if there are any changes inapp.models:fastack db migrateUpdate all changes inapp.models:fastack db upgradeFor more, please visithttps://flask-migrate.readthedocs.io/en/latest/
Package: fastack-staticfiles
fastack-staticfilesEasy to add static filesUsagepip install fastack-staticfilesAdd the plugin to your project configurationPLUGINS=["fastack_staticfiles",...]Plugin configuration exampleSTATICFILES=[("/static","static",{"directory":"assets","packages":[],"html":False,"check_dir":True},)]Configuration format like this(path: str, name: str, options: dict)Theoptionshere will be passed tostarlette.staticfiles.StaticFiles.
Package: fastaframes
FastaFramesFastaFrames is a python package to convert between FASTA files and pandas DataFrames.UsageTo install fastaframes use pip:pipinstallfastaframesReading a FASTA filefromfastaframesimportto_dffasta_df=to_df(data='example.fasta')Writing a FASTA filefromfastaframesimportto_fastato_fasta(data=fasta_df,output_file='output.fasta')Columns:db: Database from which the sequence was retrieved. db is 'sp' for UniProtKB/Swiss-Prot and 'tr' for UniProtKB/TrEMBL.unique_identifier: The primary accession number of the UniProtKB entry.entry_name: The entry name of the UniProtKB entry.protein_name: The recommended name of the UniProtKB entry as annotated in the RecName field. For UniProtKB/TrEMBL entries without a RecName field, the SubName field is used. In case of multiple SubNames, the first one is used. The 'precursor' attribute is excluded, 'Fragment' is included with the name if applicable.organism_name:  The scientific name of the organism of the UniProtKB entry.organism_identifier: The unique identifier of the source organism, assigned by the NCBI.gene_name: The first gene name of the UniProtKB entry. If there is no gene name, OrderedLocusName or ORFname, the GN field is not listed.protein_existence: The numerical value describing the evidence for the existence of the protein.sequence_version: The version number of the sequence.protein_sequence: The protein amino acid sequence.Example FASTA file:>sp|A0A087X1C5|CP2D7_HUMAN Putative cytochrome P450 2D7 OS=Homo sapiens OX=9606 GN=CYP2D7 PE=5 SV=1
MGLEALVPLAMIVAIFLLLVDLMHRHQRWAARYPPGPLPLPGLGNLLHVDFQNTPYCFDQWill produce the following:dbunique_identifierentry_nameprotein_nameorganism_nameorganism_identifiergene_nameprotein_existencesequence_versionprotein_sequence0spA0A087X1C5CP2D7_HUMANPutative cytochrome P450 2D7Homo sapiens9606.0CYP2D75.01.0MGLEALVPLAMIVAIFLLLVDLMHRHQRWAARYPPGPLPLPGLGNLLHVDFQNTPYCFDQ
Package: fastafurious
FASTAfuriousBundled utilities for manipulation and integration of FASTA filesFASTAfurious provides a set of utilities for the following routine FASTA modifications:creating a FASTA subset based on a list of sequence names (inclusion or exclusion)printing statistics and filtering sequences based on genome completeness and lengthrenaming fasta headers based on a data sheetInstallationgit clone https://github.com/matt-sd-watson/FASTAfurious.git && cd FASTAfurious
conda env create -f environment.yml
conda activate fastafurious
pip install .Updatingcd FASTAfurious && git pull
pip install .Usagefastafurious -h
usage: fastafurious [-h] {filter,composition,subset,rename,compare} ...

fastafurious: Bundled utilities for manipulating and integrating FASTA files

optional arguments:
  -h, --help            show this help message and exit

subcommands:
  fastafurious provides a series of bundled functions to 
  easily manipulate and integrate FASTA FILES into routine 
  bioinformatics workflows

  {filter,composition,subset,rename,compare}
    filter              filter sequences in FASTA based on completeness and length
    composition         Print the composition statistics of FASTA sequences (completeness/length)
    subset              Create a FASTA subset based on a txt list or bash record input
    rename              Rename the headers of a fasta file based on the columns of a CSV file
    compare             Compare the header entries of two FASTA input files
    version             Print the current FASTAfurious version then exit.Acknowledgmentscode for fastafurious subset was based on the python script originally written by santiagosnchezhere
Package: fastai2
Welcome to fastai v2NB: This is still in early development. Use v1 unless you want to contribute to the next version of fastaiTo learn more about the library, read our introduction in thepaperpresenting it.Note that the docs are in a submodule, so to clone with docs included, you should use:git clone --recurse-submodules https://github.com/fastai/fastai2If you're using a fork of fastai2, you'll need to fork thefastai-docsrepo as well.InstallingYou can get all the necessary dependencies by simply installing fastai v1:conda install -c fastai -c pytorch fastai. Or alternatively you can automatically install the dependencies into a new environment:condaenvcreate-fenvironment.ymlsourceactivatefastai2Then, you can install fastai v2 with pip:pip install fastai2.Or you can use an editable install (which is probably the best approach at the moment, since fastai v2 is under heavy development):git clone --recurse-submodules https://github.com/fastai/fastai2
cd fastai2
pip install -e ".[dev]"You should also use an editable install offastcoreto go with it.If you want to browse the notebooks and build the library from them you will need nbdev, which you can install with conda or pip.To usefastai2.medical.imagingyou'll also need to:condainstallpyarrow
pipinstallpydicomkorniaopencv-pythonscikit-imageTestsTo run the tests in parallel, launch:nbdev_test_nbsormaketestFor all the tests to pass, you'll need to install the following optional dependencies:pip install "sentencepiece<0.1.90" wandb tensorboard albumentations pydicom opencv-python scikit-image pyarrow korniaContributingAfter you clone this repository, please runnbdev_install_git_hooksin your terminal. This sets up git hooks, which clean up the notebooks to remove the extraneous stuff stored in the notebooks (e.g. which cells you ran) which causes unnecessary merge conflicts.Before submitting a PR, check that the local library and notebooks match. The scriptnbdev_diff_nbscan let you know if there is a difference between the local library and the notebooks.If you made a change to the notebooks in one of the exported cells, you can export it to the library withnbdev_build_libormake fastai2.If you made a change to the library, you can export it back to the notebooks withnbdev_update_lib.Docker ContainersFor those interested in offical docker containers for this project, they can be foundhere.
Package: fastaibreadcrumbs
FastaibreadcrumbsBreadcrumbs for fastai users.Installpip install fastaibreadcrumbsHow to useJust import "fastaibreadcrumbs" and get started.Some tiny convience functions are available which are handy while working on projects based onfastkaggleand/orfastai.A couple of examples aresetup_datato setup kaggle data on your local machine andcrappifierto create crappified version of image data. Explore the "fastaibreadcrumbs.core" page for more functions.
Package: fastai-category-encoders
fastai-category-encodersGet StartedInstall as a Python packagepipinstallgit+https://github.com/kireygroup/fastai-category-encodersPrerequisitesTo run this project you need to install Docker or Nvidia-Docker.Build the imageAn utility script can be found inbin/build.sh:./bin/build.shRun the imageIf you want to use Docker (on CPU):./bin/run-cpu.shIf you want to run the container using Nvidia-Docker:./bin/run-cuda.shNote: if you plan on using Nvidia-Docker, you should use one of the images available on the Nvidia Container Repository.The container will start a new Jupyter Notebook server on port 8888.Note that the fastai_category_encoders folder will be mounted inside the container, so any change you make to the source files or notebooks will be replicated on both systems.
Package: fastai-datasets
fastai-datasetsDocsSeehttps://irad-zehavi.github.io/fastai-datasets/Installpipinstallfastai_datasetsHow to useAs an nbdev library,fatai_datasetssupportsimport *(without
importing unwanted symbols):fromfastai_datasets.allimport*Here are a few usage examles:Easily load a datasetmnist=MNIST()mnist.dls().show_batch()Show the class distributionmnist.plot_class_distribution()Sample a subsetWhole datasets:mnist[(#60000) [(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7))...]
(#10000) [(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7))...]]Subset:mnist.random_sub_dsets(1000)[(#861) [(PILImageBW mode=L size=28x28, TensorCategory(3)),(PILImageBW mode=L size=28x28, TensorCategory(6)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(3)),(PILImageBW mode=L size=28x28, TensorCategory(3)),(PILImageBW mode=L size=28x28, TensorCategory(3)),(PILImageBW mode=L size=28x28, TensorCategory(4)),(PILImageBW mode=L size=28x28, TensorCategory(1)),(PILImageBW mode=L size=28x28, TensorCategory(5)),(PILImageBW mode=L size=28x28, TensorCategory(1))...]
(#139) [(PILImageBW mode=L size=28x28, TensorCategory(0)),(PILImageBW mode=L size=28x28, TensorCategory(0)),(PILImageBW mode=L size=28x28, TensorCategory(1)),(PILImageBW mode=L size=28x28, TensorCategory(2)),(PILImageBW mode=L size=28x28, TensorCategory(8)),(PILImageBW mode=L size=28x28, TensorCategory(4)),(PILImageBW mode=L size=28x28, TensorCategory(2)),(PILImageBW mode=L size=28x28, TensorCategory(8)),(PILImageBW mode=L size=28x28, TensorCategory(1)),(PILImageBW mode=L size=28x28, TensorCategory(9))...]]Construct a subset based on classescifar10=CIFAR10()dig_frog_bird=cifar10.by_target['dog']+cifar10.by_target['frog']+cifar10.by_target['bird']dig_frog_bird.dls().show_batch()Construct a dataset of similarity pairsPairs(cifar10,.01).dls().show_batch()
Package: fastai-minima
fastai_minimaA mimal version of fastai with the barebones needed to work with Pytorch#all_slowInstallpip install fastai_minimaHow to useThis library is designed to bring in only theminimalneeded fromfastaito work with raw Pytorch. This includes:LearnerCallbacksOptimizerDataLoaders (but not theDataBlock)MetricsBelow we can find a very minimal example based off myPytorch to fastai, Bridging the Gaparticle:importtorchimporttorchvisionimporttorchvision.transformsastransformstransform=transforms.Compose([transforms.ToTensor(),transforms.Normalize((0.5,0.5,0.5),(0.5,0.5,0.5))])dset_train=torchvision.datasets.CIFAR10(root='./data',train=True,download=True,transform=transform)dset_test=torchvision.datasets.CIFAR10(root='./data',train=False,download=True,transform=transform)trainloader=torch.utils.data.DataLoader(dset_train,batch_size=4,shuffle=True,num_workers=2)testloader=torch.utils.data.DataLoader(dset_test,batch_size=4,shuffle=False,num_workers=2)Files already downloaded and verified
Files already downloaded and verifiedimporttorch.nnasnnimporttorch.nn.functionalasFclassNet(nn.Module):def__init__(self):super(Net,self).__init__()self.conv1=nn.Conv2d(3,6,5)self.pool=nn.MaxPool2d(2,2)self.conv2=nn.Conv2d(6,16,5)self.fc1=nn.Linear(16*5*5,120)self.fc2=nn.Linear(120,84)self.fc3=nn.Linear(84,10)defforward(self,x):x=self.pool(F.relu(self.conv1(x)))x=self.pool(F.relu(self.conv2(x)))x=x.view(-1,16*5*5)x=F.relu(self.fc1(x))x=F.relu(self.fc2(x))x=self.fc3(x)returnxcriterion=nn.CrossEntropyLoss()fromtorchimportoptimfromfastai_minima.optimizerimportOptimWrapperfromfastai_minima.learnerimportLearner,DataLoadersfromfastai_minima.callback.trainingimportCudaCallback,ProgressCallbackdefopt_func(params,**kwargs):returnOptimWrapper(optim.SGD(params,**kwargs))dls=DataLoaders(trainloader,testloader)learn=Learner(dls,Net(),loss_func=criterion,opt_func=opt_func)# To use the GPU, do# learn = Learner(dls, Net(), loss_func=criterion, opt_func=opt_func, cbs=[CudaCallback()])learn.fit(2,lr=0.001)epochtrain_lossvalid_losstime02.2694672.26647201:2011.8768981.87959301:21/mnt/d/lib/python3.7/site-packages/torch/autograd/__init__.py:132: UserWarning: CUDA initialization: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx (Triggered internally at  /pytorch/c10/cuda/CUDAFunctions.cpp:100.)
  allow_unreachable=True)  # allow_unreachable flagIf you want to do differential learning rates, when creating yoursplitterto pass into fastai'sLearneryou should utilize theconvert_paramsto make it compatable with Pytorch Optimizers:defsplitter(m):returnconvert_params([[m.a],[m.b]])learn=Learner(...,splitter=splitter)
Package: fastai-rawpy
Connecting fast.ai with RawPyHere we can make fast.ai framework support RawPy library, hence use RAW image files on fastai.The list of all the RAW image files that can be supported by rawpy (based on LibRaw):https://www.libraw.org/supported-camerasPartial list of the supported RAW formats:*.IIQ (Phase One)*.3FR (Hasselblad)*.DCR, *.K25, *.KDC (Kodak)*.CRW *.CR2 *.CR3 (Canon)*.ERF (Epson)*.MEF (Mamiya)*.MOS (Leaf)*.NEF *.NRW (Nikon)*.ORF (Olympus)*.PEF (Pentax)*.RW2 (Panasonic)*.ARW, *.SRF, *.SR2 (Sony)How to installUse:pip install fastai-rawpyto install this package.How to import fastai-rawpyUse:from fastairawpy import *in order to importRawImageBlockas well as all of the necessary functions/classes/etc that adjust fast.ai so it supports RawPy.How to use fastai-rawpyUpon using fast.ai, wherever you could have usedImageBlock, just type inRawImageBlock.Examplesexample (1)dblock = DataBlock(blocks=(ImageBlock(cls=PILImage),Categorize))This line creates two blocks (input and target) of anImageBlock, that is a transform to be applied to create items of image type. The transform usesPILImageas a data-holder of the image files (such as JPG, PNG, BMP, ...).dblock = DataBlock(blocks=(RawImageBlock,Categorize))But this line usesRawImageBlocktransform, that is applied automatically on built-inRAWImageitems.RAWImageis a data-holder of RAW image files, alikePILImage, but is based onrawpypackage.example (2)This line code snippet creates twoRawImageBlockblocks of input and target, where the parameters being passed in define the postprocessing of each blocks' image:dblock = DataBlock(blocks=(RawImageBlock(  # Input
                                         gamma=(2.222, 4.5),                 # Gamma values
                                         output_color=rawpy.ColorSpace.sRGB, # sRGB Color Space
                                         output_bps=16),                     # Bits_per_pixel 
                           RawImageBlock( # Target
                                         use_camera_wb=True,                 # White blanace
                                         output_color=rawpy.ColorSpace.sRGB, # sRGB Color Space
                                         output_bps=16)                      # Bits_per_pixel 
                           )
                    )The full list of parameters:https://letmaik.github.io/rawpy/api/rawpy.Params.htmlWhy use fastai-rawpyRAW format has a bit-depth of 16bits for every channel (R,G,B[,G]), meaning: every pixel gets values in between 0 up to... 65535!2^16=65536Therefore, a RAW image file would normally have a larger range of values for every pixel. This can help training a model become more precise, when switching from JPG to RAW.Note: in practice, every DSLR stores RAW files and postprocesses these files into other formats such as JPG. For instance, it crops and compresses the JPG image out of the RAW file.PerformanceBehind the stageNew objects that create the bond between fast.ai and rawpyclass TensorRawImage+class RAWImage
Package: fastalchemy
FastAlchemySQLAlchemy Middleware forFastAPIinspired by theofficial tutorial.Installpip install fastapi fastalchemyFeaturesSuper-easy configuration: simply putdatabase.pyandmodels.pyfiles in your project folder with the following code.fromfastapiimportFastAPIfromfastalchemyimportSQLAlchemyMiddleware,dbfrommodelsimportUserapp=FastAPI()app.add_middleware(SQLAlchemyMiddleware)@app.get('/users')defget_users():returndb.query(User).order_by(User.id).all()DetailsPlease peektests/appfolder if you want to know the way to createdatabase.pyandmodelspy.
Package: fast-align-audio
fast-align-audio: high-speed NumPy audio alignmentfast-align-audio is designed to swiftly align two similar 1-dimensional NumPy arrays — a common need
in various fields including audio signal processing. If you have two arrays where one
"lags behind" the other due to factors such as different capture sensors (microphones),
propagation delays, or post-processing like reverberation or MP3 compression,
fast-align-audio is here to help.The package employs a "brute force" alignment approach, leveraging a C-based algorithm
for maximum speed while providing a user-friendly Python API for easy integration.While this library was initially developed with audio ndarrays in mind, it could also be
used to align other kinds of time-series data that are represented as 1D NumPy arrays.Installation$ pip install fast-align-audioUsageHere is a basic usage example:importfast_align_audioimportnumpyasnp# Create a random NumPy arrayreference=np.random.uniform(size=10_000).astype("float32")delayed=np.pad(reference,(121,0))[0:10_000]# Find the best offset for aligning two arraysoffset,mse=fast_align_audio.find_best_alignment_offset(reference_signal=reference,delayed_signal=delayed,max_offset_samples=1000,lookahead_samples=5000,)print(offset)# 121negative_offset,mse2=fast_align_audio.find_best_alignment_offset(reference_signal=reference,delayed_signal=reference[121:],max_offset_samples=1000,lookahead_samples=5000,)print(negative_offset)# -121# Align two arrays and confirm they're equal post alignmentaligned_audio,gaps=fast_align_audio.align_delayed_signal_with_reference(reference,delayed,offset=offset)print(np.array_equal(reference[500:600],aligned_audio[500:600]))# TrueIn this example, we first create a random numpy array. We then call thefind_best_alignment_offsetmethod to find the best offset to align two arrays, and we use the align method to align
the arrays. The np.array_equal method checks if two arrays are equal, demonstrating the
successful alignment of the two original arrays.TipsFor more reliable alignments, filter out unwanted/unrelated sounds before passing the audio snippets to fast-align-audio. E.g. if you are aligning two speech recordings, you could band-pass filter and/or denoise them first.This library assumes that the delay is fixed throughout the audio snippet. If you need something that aligns audio tracks in a dynamic way (e.g. due to distance between microphones changing over time), look elsewhere.The"mse"method is sensitive to loudness differences. If you use this method, make sure the two input audio snippets have roughly the same loudnessThis lib only works well for small offsets, like up to 500 ms, and suitable audio file durations, like for example between 3 and 45 seconds. If you have large audio files with large offsets between them, a different algorithm may be required to solve the problem well.DevelopmentInstall dev/build/test dependencies as denoted in setup.pypython setup.py developpytestAcknowledgementsOriginal C implementation by jonashaag. Now maintained/backed byNomono.
Package: fastalite
The simplest possible fasta and fastq parsers I could come up
with. Useful for simple manipulations of sequence files without
creating complex dependencies.Thefastaliteandfastqlitefunctions return an iterator of
namedtuples, each with attributesid, (the header line before the
first whitespace)description(the entire header line), andseq(the sequence as a string).fastqliteoutput also has an attributequalcontaining the quality scores. For example:from fastalite import fastalite

with open('inseqs.fasta') as infile, open('outseqs.fasta', 'w') as outfile:
    for seq in fastalite(infile):
        outfile.write('>{}\n{}\n'.format(seq.id, seq.seq))Thefastqliteparser also performs some limited error checking and
raisesValueErrorwhen it encounters a malformed record.TheOpenerclass may be used in place ofargparse.FileTypeto
support transparent reading and writing of compressed files (inferred
from a .gz or .bz2 suffix), for example:import argparse
from fastalite import Opener, fastalite

parser = argparse.ArgumentParser()
parser.add_argument('infile', type=Opener())
args = parser.parse_args(arguments)
seqs = fastalite(args.infile)You can perform a few actions on input files using the command line
interface. For a list of available commands:python -m fastalite -hInstallationCompatible with Python versions 2.7 and 3.4+Install from PyPi using pip:pip install fastaliteOr install directly from the git repository:pip install git+https://github.com/nhoffman/fastalite.gitTestingRun all tests like this:python setup.py test
Package: fastaliyun
fastaliyun介绍快捷使用阿里云模块软件架构软件架构说明安装教程pip安装pipinstallfastaliyunpip安装（使用淘宝镜像加速）pipinstallfastaliyun-ihttps://mirrors.aliyun.com/pypi/simple使用说明demoimportfastaliyunres=fastaliyun.datahub.project_list()