Saravanan666/pypi-org huggingface dataset:
Package: fastgpu
fastgpuA queue service for quickly developing scripts that use all your GPUs efficientlyfastgpuprovides a single command,fastgpu_poll, which polls a directory to check for scripts to run, and then runs them on the first available GPU. If no GPUs are available, it waits until one is. If more than one GPU is available, multiple scripts are run in parallel, one per GPU.An API is also provided for polling programmatically, which is extensible for assigning other resources to processes besides GPUs. For details on the API, see the docs forcore.Installpip install fastgpuHow to use--helpprovides command help:$ fastgpu_poll --help
usage: fastgpu_poll [-h] [--path PATH] [--exit EXIT]

Poll `path` for scripts using `ResourcePoolGPU.poll_scripts`

optional arguments:
  -h, --help   show this help message and exit
  --path PATH  Path containing `to_run` directory
  --exit EXIT  Exit when `to_run` is emptypathdefaults to the current directory. The path should contain a subdirectoryto_runcontaining executable scripts you wish to run. It should not contain any other files, although it can contain subdirectories (which are ignored).fastgpu_pollwill run each script into_runin sorted order. Each script will be assigned to one GPU. TheCUDA_VISIBLE_DEVICESenvironment variable will be set to the ID of this GPU in the script's subprocess. In addition, theFASTGPU_IDenvironment variable will also be set to this ID.Once a script is selected to be run, it is moved into a directory calledrunning. Once it's finished, it's moved intocompleteorfailas appropriate. stdout and stderr are captured to files with the same name as the script, plusstdoutorstderrappended.Ifexitis1(which is the default), then once all scripts are run,fastgpu_pollwill exit. If it is0thenfastgpu_pollwill continue running until it is killed; it will keep polling for any new scripts that are added toto_run.To limit the GPUs available to fastgpu, setCUDA_VISIBLE_DEVICESbefore polling, e.g.:CUDA_VISIBLE_DEVICES=2,3 fastgpu_poll script_dir
Package: fast-gpu-voronoi
Demo (Google Colab)ResearchAuthors[slides]GPU-Accelerated Jump Flooding Algorithm for Voronoi Diagram in log*(n)[this]Maciej A. Czyzewski[article]Facet-JFA: Faster computation of discrete Voronoi diagrams [2014]Talha Bin Masood, Hari Krishna Malladi, Vijay Natarajan[article]Jump Flooding in GPU with Applications to Voronoi Diagram and Distance Transform [2006]Guodong Rong, Tiow-Seng TanImplemented AlgorithmsJFA*JFA+JFAused improvementnoise+selectionnoise--num. of needed stepslog*(n)log4(p)log2(p)step sizep/(3^i)p/(2^i)p/(2^i)research(our)(our)[Guodong 2006]Installation & ExampleProject can be installed usingpip:$pip3installfast_gpu_voronoiHere is a small example to whet your appetite:fromfast_gpu_voronoiimportInstancefromfast_gpu_voronoi.jfaimportJFA_starfromfast_gpu_voronoi.debugimportsaveI=Instance(alg=JFA_star,x=50,y=50,\pts=[[7,14],[33,34],[27,10],[35,10],[23,42],[34,39]])I.run()print(I.M.shape)# (50, 50, 1)save(I.M,I.x,I.y,force=True)# __1_debug.pngDevelopmentIf you want to contribute, first clone git repository and then run tests:$gitclonegit@github.com:maciejczyzewski/fast_gpu_voronoi.git
$pip3install-rrequirements.txt
$pytestResultsOur methodCurrent bestJFA*JFAsteps = log*(2000) = 4steps = log(720) ~= 10...for x = 720; y = 720; seeds = 2000 (read as n = 2000; p = 720).Thanks
Package: fastGraph
===========fastGraph===========A fast and lightweight package designed for Graph Embedding.Built for DeepWalk, node2vec walk and likely walk(sampled with edges of transition probability).Built for both undirected, directed and both weighted-, binary-edge graph.Usage-------Work in progress, and absolutely welcomeDataset-------There are various graph dataset available on the internet, for example here's a collection_ from Stanford... _collection: https://snap.stanford.edu/data/Acknowledgement-------Inspired by the great work from deepwalk_... _deepwalk: https://github.com/phanein/deepwalk
Package: fastgraphql
FastGraphQLFastGraphQL is a tool for creating code-driven GraphQL APIs.Documentation:https://hugowschneider.github.io/fastgraphqlSource Code:https://github.com/hugowschneider/fastgraphqlDisclaimerThis is still a work in progress and all support is welcomedMotivationSo far most of the projects that use GraphQL need to duplicate
many definitions to be able to have a consistent GraphQL API schema
alongside well-defined models that governs the development and the application.FastGraphQL proposes to shortcut the path between python models and GraphQL schema
usingPydanticmodels. This ensures not only a single source of truth when comes to
type, input, query and mutation definitions, but also the
ability to usePydanticto features on models and inputs.Installation$pipinstall"fastgraphql[all]"You will also need an ASGI server as well to serve your API$pipinstall"uvicorn[standard]"UsageThe very first Hello Work example.fromfastapiimportFastAPIfromfastgraphqlimportFastGraphQLfromfastgraphql.fastapiimportmake_ariadne_fastapi_routerapp=FastAPI()fast_graphql=FastGraphQL()@fast_graphql.query()defhello()->str:return"Hello FastGraphQL!!!"app.include_router(make_ariadne_fastapi_router(fast_graphql=fast_graphql))$uvicornmain:app--reloadA simple example will not show you the allFastGraphQLcapabilities, but it
shows how simple this can be.LearnTo start your journey intoFastGraphQL, please refer toGetting Started.You can find the API documentationhere.IntegrationFastGraphQL generates independently of any integration a data structure containing all GraphQL definitions and resolvers, which
generates a GraphQL schema.With that said, all integration will add functionalities and provide
easy and alternative deployments of the defined API.You can find out more about the different integrations underIntegrationsAcknowledgmentThanks toFastAPIfor the inspiration!
Package: fastgrouper
fastgrouperAllows for fast groupby-apply operations, in python.InstallUsers can install the package from PyPI via:python-mpipinstallfastgrouperUsageUse thearrinterface, for numpy array focused applications.importnumpyasnpimportfastgrouper.arrdefbaz(x,y):returnnp.mean(x+y)-3# Sample arrays, to slicexvals=np.array([1,2,10])yvals=np.array([4,5,6])# Group idsgids=np.array([1,-3,1])# Perform groupby-apply; note that keyword args are supported as well.grpd=fastgrouper.arr.Grouped(gids)result=grpd.apply(baz,xvals,y=yvals)# np.array([7.5, 4])# The gids correponding to the result above can be found via the `dedup_gids` attribute.grpd.dedup_gids# np.array([ 1, -3])# Users can also perform groupby-apply, and then expand results back to align with the original gids.result=grpd.apply_expand(baz,xvals,yvals)# np.array([7.5, 4, 7.5])Theliinterface returns the results over the groups as a list (instead of an array); this may be useful for functions that return different-sized results. Note that in all interfaces (e.g. botharrandli), the order in which the group elements appear is preserved when the group slices are passed to the function being applied.importnumpyasnpimportfastgrouper.lidefbop(x):returnlist(x)# Sample arrays, to slicexvals=np.array([2,3,4])# Group idsgids=np.array([10,-20,10])grpd=fastgrouper.li.Grouped(gids)grpd.apply(bop,xvals)# [[2, 4], [3]]For additional examples, checkout thetests.
Package: fast-hadamard-transform
Fast Hadamard Transform in CUDA, with a PyTorch interfaceFeatures:Support fp32, fp16, bf16, for dimension up to 32768.Implicitly pad with zeros if dimension is not a power of 2.How to usefrom fast_hadamard_transform import hadamard_transformdef hadamard_transform(x, scale=1.0):
    """
    Arguments:
        x: (..., dim)
        scale: float. Multiply the output by this number.
    Returns:
        out: (..., dim)

    Multiply each row of x by the Hadamard transform matrix.
    Equivalent to F.linear(x, torch.tensor(scipy.linalg.hadamard(dim))) * scale.
    If dim is not a power of 2, we implicitly pad x with zero so that dim is the next power of 2.
    """SpeedBenchmarked on A100, for not too small batch size, compared to memcpy
(torch.clone), which is a lower bound for the time taken as we'd need to read
inputs from GPU memory and write output to GPU memory anyway.Data typeDimensionTime taken vs memcpyfp16/bf16<= 5121.0x512 - 8192<= 1.2x163841.3x327681.8xfp32<= 81921.0x163841.1x327681.2x
Package: fast-hdbscan
Fast Multicore HDBSCANAhefast_hdbscanlibrary provides a simple implementation of the HDBSCAN clustering algorithm designed specifically
for high performance on multicore machine with low dimensional data (2D to about 20D). The algorithm runs in parallel and can make
effective use of as many cores as you wish to throw at a problem. It is thus ideal for large SMP systems, and even
modern multicore laptops.This library provides a
re-implementation of a subset of the HDBSCAN algorithm that is compatible with thehdbscanlibrary for data that is Euclidean and
low dimensional. The primary advantages of this library over the standardhdbscanlibrary are:this library can easily use all available cores to speed up computation;this library has much faster implementations of tree condensing and cluster extraction;this library is much simpler and more approachable for extending or using components from;this library is built on numba and has less issues with binaries and compilation.This library does not support all the features and input formats available in the hdbscan library.Basic UsageThefast_hdbscanlibrary follows thehdbscanlibrary in using the sklearn API. You can use thefast_hdbscanclassHDBSCANexactly as you would that of thehdbscanlibrary with the caveat thatfast_hdbscanonly
supports a subset of the parameters and options ofhdbscan. Nonetheless, if you have low-dimensional
Euclidean data (e.g. the output of UMAP), you can use this library as a straightforward drop in replacement forhdbscan:importfast_hdbscanfromsklearn.datasetsimportmake_blobsdata,_=make_blobs(1000)clusterer=fast_hdbscan.HDBSCAN(min_cluster_size=10)cluster_labels=clusterer.fit_predict(data)Installationfast_hdbscan requires:numbanumpyscikit-learnfast_hdbscan can be installed via pip:pipinstallfast_hdbscanTo manually install this package:wgethttps://github.com/TutteInstitute/fast_hdbscan/archive/main.zipunzipmain.ziprmmain.zipcdfast_hdbscan-mainpythonsetup.pyinstallReferencesThe algorithm used here is an adaptation of the algorithms described in the papers:McInnes L, Healy J.Accelerated Hierarchical Density Based ClusteringIn: 2017 IEEE International Conference on Data Mining Workshops (ICDMW), IEEE, pp 33-42.
2017[pdf]R. Campello, D. Moulavi, and J. Sander,Density-Based Clustering Based on
Hierarchical Density EstimatesIn: Advances in Knowledge Discovery and Data Mining, Springer, pp 160-172.
2013Licensefast_hdbscan is BSD (2-clause) licensed. See the LICENSE file for details.ContributingContributions are more than welcome! If you have ideas for features of projects please get in touch. Everything from
code to notebooks to examples and documentation are allequally valuableso please don’t feel you can’t contribute.
To contribute pleasefork the projectmake your
changes and submit a pull request. We will do our best to work through any issues with you and get your code merged in.
Package: fasthep
fasthepFAST-HEP provides tools for analysis of high-energy physics data. It is designed
to be used in conjunctionSciKit-HEPpackages such asuprootandawkward-arrayand more. On the data
processing side it leveragesNumbaandCupyto provide fast and efficient implementations of
common analysis tasks. For distributed computing, Dask is used as the primary
backend.InstallationThe meta-packagefasthepcan be installed viapiporconda:pipinstallfasthepby default, this will install only the core packages such as the FAST-HEP CLI
and logging packages. To install the full package, including the optional
dependencies, use:pipinstallfasthep[full]You can also cherry-picker the optional dependencies you want to install:pipinstallfasthep[plotting,carpenter,validate]
Package: fasthep-logging
fasthep-loggingThe FAST-HEP logging package adds two new log levels to the standard Python
logging:TRACEis the most verbose level, and is used for debugging purposes.TIMINGis used to log timing information. Log level is betweenDEBUGandWARNING.In addition, this package sets a logging standard for FAST-HEP projects:per-log-level formattinglog file supportExamplefromfasthep_loggingimportget_logger,TRACElog=get_logger("FASTHEP::Carpenter")log.setLevel(TRACE)...log.debug("This is a debug message%s",msg)log.trace("This is a verbosity level higher than DEBUG")fromcodetimingimportTimerwithTimer(text=f"Processing data took{{:.3f}}s for{file_path}",logger=log.timing,# type: ignore[attr-defined]):process_data(file_path)
Package: fasthttppy
FastHttpPyPython implementation of Golang FastHttp63k requests/second
(for comparisons the fastest Python server (uvicorn) does 8k/s without multiprocess)Benchmark made on MacBook Pro M2 PropipinstallfasthttppyExample:fromfasthttppyimportFastHttp,MakeResponse,Requestapp=FastHttp()app.Static("/static","static")defmy_callback(req:Request):print(req.contents.GetURI())print(req.contents.GetHeaders())print(req.contents.GetData())returnMakeResponse(200,"Hello world")app.Get("/py",my_callback)app.Post("/py",my_callback)app.Run()Methods:classFastHttp:defStatic(self,path:str,dir:str)#=-=-=Serve static folder=-=-=#path: url path#dir: folder#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=defGet(self,path:str,function:Callable)#=-=-Bind path to function-=-=#path: url path#function: function#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=defPost(self,path:str,function:Callable)#=-=-Bind path to function-=-=#path: url path#function: function#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=defSetErrorPage(self,content:str)#=-=-=-=Set error page-=-=-=-=#content: html content#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=defSetNotFoundPage(self,path:str,dir:str)#=-=-=-=-Set 404 page=-=-=-=-=#content: html content#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=defRun(self,host:str,port:int)#=-=-=-=Start Go server=-=-=-=#host: server host#port: server port#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=It is still possible to improve performance a lot, the golang/py communication is done through a *C.char Json that can be replaced by structs (removing the json encode decode step)
Package: fasthugs
FastHugsTraining HuggingFace models using fastaiInstallpip install git+git://github.com/aikindergarten/fasthugs.gitHow to usePre-trainingMasked Language modelingFine-tuningSentiment classification: IMDBGLUE benchmarkMachine TranslationSummarizationMultiple ChoiceToken ClassificationHyper-parameter searchW&B sweepsAnd more coming soon...AcknoledgementsThis library is lightweight wrapper for this two awesome libraries: HuggingFacetransformersandfastaiand is inspired by other work in same direction namely earlierfasthugsby @morganmcg1 andblurrby @ohmeow.
Package: fast-hypo-client
API Client for Earthquake LocationInstallationpipinstallfast-hypo-clientUsagefromdatetimeimportdatetimeimportrequestsfromfast_hypo_client.modelsimportVelocityLayer1D,VelocityModel1D,PhaseReading,StationLatLng,PhaseDescriptorP,FirstMotion,LocationRequestNLLocfromfast_hypo_client.clientimportClientfromfast_hypo_client.api.non_lin_locimportlocate_nlloc_locate_nlloc_postvelocity_model=VelocityModel1D(layers=[VelocityLayer1D(depth_km=0.0,vp_top=4.0,vs_top=2.38,rho_top=2.7,vp_grad=0.0,vs_grad=0.0,rho_grad=0.0,),VelocityLayer1D(depth_km=2.0,vp_top=6.0,vs_top=3.57,rho_top=2.7,vp_grad=0.0,vs_grad=0.0,rho_grad=0.0,),VelocityLayer1D(depth_km=10.0,vp_top=6.3,vs_top=3.75,rho_top=2.7,vp_grad=0.0,vs_grad=0.0,rho_grad=0.0,),])stations=[StationLatLng(code="SBF",latitude=43.8635,longitude=7.43483,elevation_km=0.847,depth_km=0.0,),StationLatLng(code="CEPP",latitude=43.9163,longitude=7.7465,elevation_km=1.08,depth_km=0.0,),StationLatLng(code="MVIF",latitude=43.8965,longitude=7.1525,elevation_km=1.48,depth_km=0.0,),StationLatLng(code="IMI",latitude=43.9105,longitude=7.89317,elevation_km=0.84,depth_km=0.0,),]events=[[PhaseReading(station_name="SBF",p_phase_descriptor=PhaseDescriptorP.P,p_arrival=datetime.fromisoformat("1995-04-21T08:03:00.260"),),PhaseReading(station_name="CEPP",p_phase_descriptor=PhaseDescriptorP.P,p_first_motion=FirstMotion.UP,p_arrival=datetime.fromisoformat("1995-04-21T08:03:01.140"),),PhaseReading(station_name="MVIF",p_phase_descriptor=PhaseDescriptorP.P,p_weight=0,p_arrival=datetime.fromisoformat("1995-04-21T08:03:03.580"),s_arrival=datetime.fromisoformat("1995-04-21T08:03:08.680"),),PhaseReading(station_name="IMI",p_phase_descriptor=PhaseDescriptorP.P,p_weight=0,p_arrival=datetime.fromisoformat("1995-04-21T08:03:02.770"),),]]request=LocationRequestNLLoc(events=events,stations=stations,velocity_model=velocity_model,)client=Client(base_url="https://fast-hypo.fly.dev")response=locate_nlloc_locate_nlloc_post.sync_detailed(client=client,json_body=request)print(response.parsed)# [Origin(latitude=43.882196, longitude=7.550554, depth_m=11976.562, uncertainty=HorizontalUncertainty(max_horizontal_uncertainty_m=25324.4, min_horizontal_uncertainty_m=15945.2, azimuth_max_horizontal_uncertainty_deg=163.321, additional_properties={}), additional_properties={})]
Package: fastidious2
fastidious2The best PEG parser generator I write (so far)Free software: GNU General Public License v3Documentation:https://fastidious2.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.1 (2021-01-16)Package metadata fixes[Doc] github -> gitlab0.1.0 (2021-01-14)First release on PyPI.
Package: fastidius
FastidiusFastidius is a CLI tool for creatingFastAPIbackends, with integrations for deploying to DigitalOcean via Github Actions.Installationpip install fastidiusUsageTo initialize a new project, runfastidius createThis will take you through a few setup instructions, then you'll have a fully fledged FastAPI
application ready to go.Deploying the API on DigitalOceanFastidius's real strength lies in it's quick deploy capability for DigitalOcean.It's currently set up to use Ubunutu droplets. Once you've spin up a brand
new droplet on your DigitalOcean account, run this commandexport IP_ADDRESS=<Your droplet's IP>
fastidius initialize-serverThis will generate another command for running the initializer – this will set up firewalls,
add a non-root user (ubuntu), set up docker, and a few other configurations.Next, we configure caddy server.fastidius configure-caddyCaddy is an awesome replacement for Nginx or Traefik, with SSL out of the box and minimal boilerplate.
Fastidius will use the above command to set up a new docker container that will manage caddy.After you've set up your Caddyfile, you can deploy it usingfastidius deploy-caddyNext, we want to set up the secrets on Github. This will create a CI/CD pipeline automatically.fastidius github-setupOnce this is all done, pushing to the main branch on github will deploy your API 😏
Package: fastilybot
fastilybotFastily's Wikipedia Bots.This repository contains the rewritten and improved successor to the originalfastilybot.InstallpipinstallfastilybotUsageusage: __main__.py [-h] [-u username] [-b bot_id] [-r report_id] [--all-reports] [--no-color] [--purge-cache]

FastilyBot CLI

options:
  -h, --help     show this help message and exit
  -u username    the username to use
  -b bot_id      comma deliminated ids of bot tasks to run
  -r report_id   comma deliminated ids of report tasks to run
  --all-reports  runs all possible reports tasks
  --no-color     disables colored log output
  --purge-cache  delete all cached files created by fastilybot and exit👉 Password is set via env variable<USERNAME>_PW, such that<USERNAME>is the username of the bot in all caps.See Alsotoollabs reports
Package: fastimgconcat
Concatenates a list of pictures (numpy arrays) without allocating new memorypip install fastimgconcatTested against Windows 10 / Python 3.10 / Anacondafromfastimgconcatimporttemparrays,fastconcat_horizontal,fastconcat_verticalimportnumpyasnpimportrandomimportcv2# This code demonstrates the usage of the fastconcat_vertical()# function to concatenate pictures (numpy arrays)# vertically in a# faster and more efficient way.# The fastconcat_vertical() function takes a list of numpy arrays and concatenates# them vertically without allocating new memory. It is recommended to use this# function when you are #concatenating several pictures multiple times, and# the shape of the output array never (or rarely) # changes, e.g. streaming# screenshots of 2 monitors.# Initialize the height, width and RGB values for the numpy arrays.height=200width=500rgbValues0=np.zeros((height,width,3),dtype=np.uint8)rgbValues0[:]=[255,0,0]rgbValues1=np.zeros((height,width,3),dtype=np.uint8)rgbValues1[:]=[0,0,255]# In the for loop, the fastconcat_vertical()# function is used to concatenate the numpy arrays vertically.# If you want to concatenate them horizontally,# use fastconcat_horizontal() instead.checkarraysize=Trueforrinrange(1000):fastconcat_vertical([random.choice([rgbValues0,rgbValues1]),random.choice([rgbValues0,rgbValues1]),],checkarraysize=checkarraysize,)checkarraysize=False# If you check the array size each time, it is about 10% slower.# The values in temparrays.vertical / temparrays.horizontal# will be changed the next iteration. Therefore,# it is recommended to process the output data right# after each iteration. If you still need the arrays,# copy them (e.g. temparrays.horizontal.copy()), but keep in mind that copying is expensive.# This code displays the concatenated image in the cv2 window "test".# If the 'q' key is pressed, the program breaks out of the loop and closes the window.cv2.imshow("test",temparrays.vertical)ifcv2.waitKey(1)&0xFF==ord("q"):breakcv2.destroyAllWindows()
Package: fast-impl
Fast ImplementationsFastai(v2) has become de facto high level API for Pytorch and is highly engineered to bring your research into proudction. This library is built on top of fastai(v2) to support my implementations.The githubrepositoryholds application notebooks.Installationlatest releasepipinstallfast-implFrom git repository (for changes not released yet)pipinstallgit+https://github.com/Kshitij09/fast_impl
Package: fastindex
fastIndexawesome way to select from pandas multi index and moreWarning! this repository is on early develoapment stage!installation:pip install fastindexconfiguration:fromfastindeximportfast_indeximportpandasaspd#expanding pandas with fastindexfast_index(pd)example usage:setting pandas MultiIndexdf=read_csv("data.csv")df.set_index(["Country","City","District","first_name","Age","ID"],inplace=True)df.sort_index(inplace=True)Basic SelectionRegular Pandas:df.loc[(slice(None),slice(None),slice(None),slice(None),24),:]With fastindexdf.fidx.slice(Age=24)RangesRegular Pandas:df.loc[("Spain",slice(None),slice(None),slice(None),slice(23,25)),:]With fastindexdf.fidx.slice(Age=slice(23,25),Country="Spain")Selecting columnsRegular Pandas:df.loc[("Spain",slice(None),slice(None),slice(None),slice(23,25)),["last_name"]]With fastindexdf.fidx.slice(Age=slice(23,25),Country="Spain",columns=["last_name"])setting values using f_slice:slc=df.fidx.f_slice(Age=slice(23,25),Country="Spain")df.loc[slc,"last_name"]="Leonardo"
Package: fastinference
fastinferenceA collection of inference modules for fastai including inference speedup and interpretabilityInstallpip install fastinferenceThere are submodules available as well via:pip install fastinference[interp]- Interpretability modules such as SHAP and Feature Importancepip install fastinference[onnx-cpu]- ONNX for a CPU environmentpip install fastinference[onnx-gpu]- ONNX for a GPU environmentWonderful Contributors:(Using both theirfastaihandles as well as their GitHub handles if possible):Pavel (Pak)
Package: fastinferenz
fastinferenceA collection of inference modules for fastai including inference speedup and interpretabilityInstallpip install fastinferenceThere are submodules available as well via:pip install fastinference[interp]- Interpretability modules such as SHAP and Feature Importancepip install fastinference[onnxcpu]- ONNX for a CPU environmentpip install fastinference[onnxgpu]- ONNX for a GPU environmentWonderful Contributors:(Using both theirfastaihandles as well as their GitHub handles if possible):Pavel (Pak)