Saravanan666/pypi-org huggingface dataset:
Package: fastcp
Fast CpA Python Library that contains various functions to make Competitive Programming easy.
This Package includes pre-defined functions that are quite useful in Competitive Programming.To View the Package ->Click HereTo View Documentation Web Page ->Click HerePurpose of PackageThe main purpose of this package is to provide various functions that are helpful for Competitive Programming.FeaturesCollections of fastcpCollections of arraysUniqueSubarrSubseqFreqLengthCollections of stringsVowelCountFreqSubstrSubseqCollections of bitManBinaryHexaOctalToggleCountSetBitsBinToDecimalOctToDecimalHexToDecimalCollections of mathProductSieveIsPrimeAlong with all functions in python 3.11.0mathlibraryCollections of searchFindLowerBoundUpperBoundCollections of sortingSortSortDictSortDictValuesCollections of collectionsMultMapAlong with all functions in python 3.11.0collectionslibraryCollections of dataStructuresminHeapmaxHeapPriorityQueueSimpleQueuequeueStackAlong with all functions in python 3.11.0QueueslibraryCollections of treesCreateInorderPreorderPostorderLevelorderSearchNodeSumGetting StartedThis package can be found on PyPi. Hence you can install it using pipInstallationpipinstallfastcpUsageimporting all sub-packages from fastcp>>>fromfastcpimport*>>>subsequences=Subseq([1,2,3,4,5])importingasinglesub-packagefromfastcp>>>fromfastcpimportbitMan>>>toggled_number=bitMan.Toggle(123)Examples>>>fromfastcpimportarrays>>>arrays.Freq([1,1,2,2,2,3]){1:2,2:3,3:1}>>>fromfastcpimport*>>>Substr("python")['python','ython','thon','hon','on','n']>>>Subseq("Pypi")['Pypi','Pyp','Pyi','Py','Ppi','Pp','Pi','P','ypi','yp','yi','y','pi','p','i','']New Libraries: (v.1.0.2)sortingcollections>>>fromfastcpimportsorting>>># Sort function at O(N) Complexity>>>dict={10:1,8:2,1:3,4:4}>>>print(sorting.SortDict(dict)){1:3,4:4,8:2,10:1}>>>print(sorting.SortDict(dict,True)){10:1,8:2,4:4,1:3}>>>fromfastcpimport*>>>d=MultMap(0)>>># creates a Multi-Dictionary with default value as Int (0);>>>d[0][0]0>>>d=MultMap([])>>># creates a Multi-Dictionary with default value as List ([]);>>>d[0][0][]>>>d[0][0].append(20)>>>d[0][0][20]>>>d=defaultdict(int)>>>d[0]0>>>fromfastcpimportdataStructuresasds>>>d=ds.maxHeap()>>># creates a maxHeap object (d)>>>d.put(20)>>>d.put(50)>>>d.get()50# returns the max value in heap>>>d.size()1# since 50 is removed from heap>>>s=ds.Stack()# create a stack data structure>>>s.push(10)>>>s.push(20)>>>s.size()2>>>s.pop()20>>>s.pop()10>>>s.pop()None>>>d=ds.minHeap()>>># creates a minHeap object (d)>>>d.put(20)>>>d.put(50)>>>d.get()20# returns the min value in heap>>>d.size()1# since 20 is removed from heap>>>fromfastcpimporttrees>>>root=trees.Create(10)>>>root.left=Create(5)>>>root.right=Create(20)>>>trees.Inorder(root)[5,10,20]>>>trees.Preorder(root)[10,5,20]>>>trees.Postorder(root)[5,20,10]>>>trees.Levelorder(root)[[10],[5,20]]AuthorAvinash Doddi [https://github.com/avinash-doddi]
Package: fastcpu
Inspired with code fromhttps://github.com/fastai/fastgpufastcpuA queue service for quickly developing scripts that use all your CPUs efficientlyPULL REQUESTS WELCOME!fastcpu provides a single command, fastcpu_poll, which polls a directory to check for scripts to run, and then runs them
on the first available CPU. If no CPUs are available, it waits until one is. If more than one CPU is available,
multiple scripts are run in parallel, one per CPU.
(Note currently the CPU load checking is not implemented, the scripts are run sequentially at polling interval)Installationpip install fastcpuHow to use--help provides command help:$ fastgpu_poll --help

optional arguments:

  -h, --help                         show this help message and exit
  --path PATH                        Path containing `to_run` directory (default: .)
  --exit_when_empty EXIT_WHEN_EMPTY  Exit when `to_run` is empty (default: 1)
  --poll_interval POLL_INTERVAL      The duration between polls (default: 0.1)
  --terminate_timout                 The timeout at which point we kill the running script in seconds, -1 to never terminateIf installed via pip there is a handy command line method availablefastcpu_poll --path /path/to/scripts --exit_when_empty 0 --poll_interval 60If running as a modulepython -m fastcpu.cli --path /path/to/scripts --exit_when_empty 0 --poll_interval 60The above examples will run scrips located in the to_run subdirectory of the directory being monitored
The program will not exit when there are no scripts left to run, it will keep polling since we set that to 0
the polling interval is 60 seconds, it can be set as fractions of a second e.g 0.1once the program starts it creates the following directory structure. you can then  your scripts in the to_run folder,
and the scrips are run sequentially.
├── complete
├── fail
├── out
├── running
└── to_run
    ├── script_example1.sh
    └── script_example2.shfastcpu_pollwill run each script into_runin sorted order.
Each script will be assigned to one CPU (future)Once a script is selected to be run, it is moved into a directory calledrunning. Once it's finished,
it's moved into complete or fail as appropriate. stdout and stderr are captured to files with the same name as the script,
plus stdout or stderr appended.If exit_when_empty is 1 (which is the default), then once all scripts are run,fastcpu_pollwill exit.
If it is 0 thenfastcpu_pollwill continue running until it is killed; it will keep polling for any new scripts that are added toto_run.Developmentlocal testingpython -m fastcpu.cli --path test_scripts --exit_when_empty 1 --poll_interval 5 --terminate_timeout 12TroubleshootingIf you get permission denied error in stderr logs check that your scripts are executable
Package: fastcrc
A hyper-fast Python module for computing CRC(8, 16, 32, 64) checksum.Installationpip install fastcrcUsagefromfastcrcimportcrc8,crc16,crc32,crc64data=b"123456789"print(f"crc8 checksum with cdma2000 algorithm:{crc8.cdma2000(data)}")print(f"crc16 checksum with xmodem algorithm:{crc16.xmodem(data)}")print(f"crc32 checksum with aixm algorithm:{crc32.aixm(data)}")print(f"crc64 checksum with ecma_182 algorithm:{crc64.ecma_182(data)}")print(f"crc16 checksum with xmodem algorithm (with initial data):{crc16.xmodem(b'56789',crc16.xmodem(b'1234'))}")Documentationfastcrc’s documentation can be found athttps://fastcrc.readthedocs.ioLicensefastcrc is licensed underMIT License.Thanksfastcrc is made possible bycrc-rs.
Package: fastcrudapi
fastcrudapiSuper easy to generate CRUD api routes.Documentation:https://fastcrudapi.lpthong90.devSource  Code:https://github.com/lpthong90/fastcrudapiThe package helps to build CRUD APIs for models based on FastAPI.InstallationpipinstallfastcrudapiBasic UsagefromfastapiimportFastAPIfromfastcrudapiimportCrudApiRouterfrompydanticimportBaseModelapp=FastAPI()classBook(BaseModel):id:intname:strbook_router=CrudApiRouter(prefix="/books",schema=Book,)app.include_router(book_router)
Package: fastcrypto
fastcrypto 加密库, 支持aes加密解密"fastcrypto aes加密解密库# -*- coding: utf-8 -*-importsys#from fastcrypto import fastcryptoimportfastcryptodata=bytes([125,2,3,4])#,key,iv  length must 16key=bytes([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])iv=bytes([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])ret=fastcrypto.aes_encode(data,key,iv)print(ret)ifret[0]==0:crypt_data=ret[1]ret=fastcrypto.aes_decode(crypt_data,key,iv)print(ret)
Package: fastcs
PyPI:pip install FastCSSource code:https://github.com/DiamondLightSource/FastCSDocumentation:https://DiamondLightSource.github.io/FastCSReleases:https://github.com/DiamondLightSource/FastCS/releasesFastCS is a control system agnostic framework for building Device support in
Python that will work for both EPICS and Tango without depending on either.NoteThis repository is in an early stage of development, and doesn’t currently do the above!Seehttps://DiamondLightSource.github.io/FastCSfor more detailed documentation.
Package: fast-csv
requirementsPandasNumpyinstallationpip install fast_csv!pip install fast_csvfor Google Colab or Kaggle notebookusageimportfast_csvasfcdata=fc.read_csv('$PATH/$FILE.csv')importpandasaspdimportfast_csvasfcdata=fc.reduce_df(pd.DataFrame())vs pd.read_csvSeedata.info()it reduces 50% of memory usage on averageit reduces 90%+ of memory usage on a good day
Package: fast-csv-middleware
FastAPI CSV MiddlewareThis is a simple middleware for FastAPI that allows you to upload CSV files and parse them into a list of dictionaries.I've explained a bit more inthis blog post here.Installationpipinstallfast-csv-middlewareUsagefromfastapiimportFastAPIfromfastapicsvimportCSVMiddlewareapp=FastAPI()app.add_middleware(CSVMiddleware)TestingRequest BodyUseContent-Type=text/csvin request headers when sendingcsvtext in request body.Response BodyUseAccept=text/csvin request headers to receivecsvtext in response body.
Package: fast-ctc-decode
fast-ctc-decodeBlitzing fast CTC decoding library.$ pip install fast-ctc-decode
$ npm i @nanopore/fast-ctc-decodeUsagePython>>>fromfast_ctc_decodeimportbeam_search,viterbi_search>>>>>>alphabet="NACGT">>>posteriors=np.random.rand(100,len(alphabet)).astype(np.float32)>>>>>>seq,path=viterbi_search(posteriors,alphabet)>>>seq'ACACTCGCAGCGCGATACGACTGATCGAGATATACTCAGTGTACACAGT'>>>>>>seq,path=beam_search(posteriors,alphabet,beam_size=5,beam_cut_threshold=0.1)>>>seq'ACACTCGCAGCGCGATACGACTGATCGAGATATACTCAGTGTACACAGT'Node / Webimportinit,{beam_search,viterbi_search}from'fast-ctc';constfloatArr=[0.0,0.4,0.6,0.0,0.3,0.7,0.3,0.3,0.4,0.4,0.3,0.3,0.4,0.3,0.3,0.3,0.3,0.4,0.1,0.4,0.5,0.1,0.5,0.4,0.8,0.1,0.1,0.1,0.1,0.8];constalphabet=["N","A","G"];constbeamSize=5;constbeamCutThreshold=Number(0.0).toPrecision(2);constcollapseRepeats=true;constshape=[10,3];conststring=false;constqBias=Number(0.0).toPrecision(2);constqScale=Number(1.0).toPrecision(2);// On web, note the base path will be your public folderinit('fast_ctc_decode_wasm_bg.wasm');constviterbisearch=awaitbeam_search(floatArr,alphabet,string,qScale,qBias,collapseRepeats,shape);constbeamsearch=awaitbeam_search(floatArr,alphabet,beamSize,beamCutThreshold,collapseRepeats,shape);console.log(viterbisearch);// GGAGconsole.log(beamsearch);// GAGAGBenchmarkImplementationTime (s)URLViterbi (Rust)0.0003nanoporetech/fast-ctc-decodeViterbi (Python)0.0022Beam Search (Rust)0.0033nanoporetech/fast-ctc-decodeBeam Search (C++)0.1034parlance/ctcdecodeBeam Search (Python)3.3337githubharald/CTCDecoderDeveloper QuickstartPython$ git clone https://github.com/nanoporetech/fast-ctc-decode.git
$ cd fast-ctc-decode
$ pip install --user maturin
$ make testJavaScript / Nodenpm i
npm testNote: You'll need a recentrustcompiler on your path to build the project.By default, a fast (and less accurate) version of exponentiation is used for the 2D search. This can
be disabled by passing--cargo-extra-args="--no-default-features"to maturin, which provides more
accurate calculations but makes the 2D search take about twice as long.CreditsThe original 1D beam search implementation was developed by@usamecfordeepnano-blitz.The 2D beam search is based on@jordisrand@ihhwork in theirpair consensus decodingpaper.Licence and Copyright(c) 2019 Oxford Nanopore Technologies Ltd.fast-ctc-decode is distributed under the terms of the MIT License.  If a copy of the License
was not distributed with this file, You can obtain one athttps://github.com/nanoporetech/fast-ctc-decode/Research ReleaseResearch releases are provided as technology demonstrators to provide early access to features or stimulate Community development of tools. Support for this software will be minimal and is only provided directly by the developers. Feature requests, improvements, and discussions are welcome and can be implemented by forking and pull requests. However much as we would like to rectify every issue and piece of feedback users may have, the developers may have limited resource for support of this software. Research releases may be unstable and subject to rapid iteration by Oxford Nanopore Technologies.
Package: fast-curator
fast-curatorCreate, read and write dictionary descriptions of input datasets to process.
Currently all datasets are expected to be built from sets of ROOT Trees.Installingpipinstall--userfast-curatorUsage# Local files:fast_curator-ooutput_file_list.txt-ttree_name-ddataset_name--mcinput/files/*root# Single XROOTD files:fast_curator-ooutput_file_list.txt--mcroot://my.domain.with.files://input/files/one_file.root# XROOTD files with several globsfast_curator-ooutput_file_list.txt--mcroot://my.domain.with.files://inp*/files/*.rootNotes:
1. If the command is called multiple times with the same output file (using the-ooption), the additional files specified will be appended to the output file.
2. Arbitrary meta-data (such as cross-section, data quality, generator precision, etc) can be added to each dataset with the-moption.For more guidance try the built-in help:fast_curator --helpReading dataset files backimportfast_curatordatasets=fast_curator.read.from_yaml("my_dataset_file.yml")Will return a list of datasets with thedefaultsection applied to each dataset.Further DocumentationIs on its way…
Package: fastcv
<p align=”center”><img src=”assets/fastcv.webp” height=120></p>## Tenetsthe most common type is numpysize always be height, width.
├── core
│   ├── io
│   ├── view
│   ├── cast
│   ├── auto### layoutnp: hwcpil: hwccv2: hwctensor: nchw### cast` # type: tensor, numpy, pil, cv2 # dtype: auto, fp32, fp16 # range: [0, 255],[-1.0,1.0], [0.0, 1.0 fastcv.cast(t,type="tensor",) `
Package: fastcvapp
Welcome to Fast CV App!What is Fast CV App? Fast Computer Vision App is a small framework, guide, and examples about running Python code with multiprocessing from start to finish, beginning withpython main.pyand ending with an executable with PyInstaller on Windows and Mac.Here you will learn know how to sidestep bottlenecks using multiprocessing and shared memory. Fast CV App was inspired by the ease and speed ofFastAPI, and while the decorator functionality of FastAPI is not available, rest assured that there are tutorials and examples to make a working CV App within 15 minutes.Getting Started (Youtube Link)See for yourself:Fast CV App is built on Kivy for the sole purpose of accessing OpenGL methods in Python without having to learn the ins and outs of OpenGL. This makes cross platform a lot more achievable and the same techniques you can learn here are applicable to any framework as long as you have access to a canvas and can update the canvas whenever you want.PyInstaller is used to create the Windows and MacOS (M1 chip) files, and associated .spec files are left in for examination.#Windows Example:https://github.com/AccelQuasarDragon/FastCVApp/assets/138998466/372cb252-0a6f-41eb-a05f-ac4302cb1f6b#Mac M1 Example:https://github.com/AccelQuasarDragon/FastCVApp/assets/138998466/eab19c82-a179-4346-9c6a-d6d6e3d1e3bfInitial setupRunning examples:Creating a simple exampleCommunityKivy Discorddocumentation: readthedocsdone
~ > added to todolist
-what FCVA is about (sell)
-fast
-runs on opengl (kivy)
-cross platform: tested with pyinstaller on windows and macOS (m1-silicon)
~images/examples
Initial setup
Running examples:
Creating a simple example
community;
kivy discord
documentation: readthedocs
Package: fast-das
fast-DASParallel delay-and-sum implementation wrapping native CUDA from pythonAboutSupports windows and unixUses CPU-multithreading whenuse_gpuisFalseUses NVIDIA CUDA library whenuse_gpuisTrueCross-compiled on windows using WSL and CMakeUsagefast-DAS is a python wrapper and native code implementation for the delay-and-sum algorithm pre-compiled in C++ (CPU version) and CUDA (GPU version).The goal is to boost the digital beamforming process for ultrasound acquisitions.Installationpip install fast-dasNote on Windows/CPU usageIn Windows, you may encounter the following error when setting the use_gpu flag to False:FileNotFoundError: Could not find module '..\lib\site-packages\fastDAS\bin\libdas.dll' (or one of its dependencies). Try using the full path with constructor syntax.This is because multi-threading is performed with the pthreads library, which is not natively included in Windows.
pthreads is included in MinGW, so adding gcc to your conda environment will resolve this issue (for example fromhere).Input formatTo beamform with fast-DAS, initialize a DAS object based on your compute preference (CPU/GPU):fromfastDASimportdelay_and_sumasfddas=fd.DAS(use_gpu=True)Forout-of-the-boxusage with Verasonics Vantage systems, save the MATLAB workspace after collecting an RF acquisition.The workspace file should contain at least the following variables as a .mat file:{
        'NA': {'NA_tot':_, 'NA':_},
        'PData': {
            'Size': _,
            'PDelta': _,
            'Origin': _,
        },
        'Trans': {
            'lensCorrection': _,
            'ElementPos': _,
            'WavelenToMm': _,
        },
        'TX': {
            'Steer': _,
            'Delay': _,
        },
        'TW': {
            'Peak': _
        },
        'Receive': {
            'SamplesPerWave': _,
            'StartDepth': _,
            'StartSample': _,
            'EndSample': _
        }
    }In a plane wave compounding acqusition, theinit_delays()function can be used to calculate the Tx and Rx delay map based on a workspace like the one above.Otherwise, you can implement thedel_Txanddel_Rxvariables yourself.Note that the units of these delay maps are not[usec]but rather[samples].Customized UsageIf you want to use the native code wrapper in an acquisition other than plane wave steering, calculate your own del_Tx and del_Rx delays.You'll need to provide the DAS class with some basic information on the acquisition protocol (see DAS.beamform() docstring for specific details)das=fd.DAS(use_gpu=True)del_Tx=np.zeros((NA,FOVz,FOVx),dtype=np.float32)del_Rx=np.zeros((n_el,FOVz,FOVx),dtype=np.float32)# Calc the delays# ...das.del_Tx=del_Txdas.del_Rx=del_RxRF=get_your_RF_data()das.beamform(RF,N,start_sample,end_sample)
Package: fast-dash
Open source, Python-based tool to build prototypes lightning fast ⚡Documentation:https://docs.fastdash.appSource code:github.com/dkedar7/fast_dashInstallation:pip install fast-dashFast Dash is a Python module that makes the development of web applications fast and easy. It can build web interfaces for Machine Learning models or to showcase any proof of concept without the hassle of developing UI from scratch.ExamplesWith Fast Dash's decorator@fastdash, it's a breeze to deploy any Python function as a web app. Here's how to use it to write your first Fast Dash app:fromfast_dashimportfastdash@fastdashdeftext_to_text_function(input_text):returninput_text# * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)And just like that, we have a completely functional interactive app!Output:Fast Dash can read all the function details, like its name, input and output types, docstring, and uses this information to infer which components to use.For example, here's how to deploy an app that takes a string and an integer as inputs and returns some text.fromfast_dashimportfastdash@fastdashdefdisplay_selected_text_and_number(text:str,number:int)->str:"Simply display the selected text and number"processed_text=f'Selected text is{text}and the number is{number}.'returnprocessed_text# * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)Output:And with just a few more lines, we can add a title icon, subheader and other social branding details.Output components can be arranged using a mosaic layout (ASCII art), inspired from Matplotlib'ssubplot_mosaicfeature.fromfast_dashimportfastdash,UploadImage,Graphimportmatplotlib.pyplotaspltmosaic="""ABAC"""@fastdash(mosaic=mosaic,theme="BOOTSTRAP")defmultiple_output_components(start_date:datetime.date,# Adds a date componentupload_image:UploadImage,# Adds an upload componentfips:str=[ListofFIPs])# Adds a single select dropdown->(Graph,plt.Figure,plt.Figure):# Output components are a Plotly graph, and two figure components"Fast Dash allows using mosaic arrays to arrange output components"choropleth_map=...histogram=...radar_chart=...returnchloropleth_map,histogram,radar_chart# * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)In just a few lines of code, you can also add a chat component.You can use your favorite Python libraries. Here's an example of an advanced geospatial application built usinggeemapand Google Earth Engine.AboutRead different ways to build Fast Dash apps and additional details by navigating to theproject documentation.Key featuresDuild and deploy a web app by adding a decorator only.Components are inferred from function type hints. Allows using Dash components as type hints.Use multiple input and output components simultaneously.Build fast, share and iterate.CommunityFast Dash is built usingPlotly Dashand it's completely open-source.
Package: fastdataing
Common fast data processing methodsA collection of frequently employed functions!Smoothsmooth_MIS(x,y,factor=300):smooth datasmooth_SF(x,y,factors=[5,3]):smooth datafiles processingget_files(directory, suffix):Read files with the same suffix in the folder and save them as a listplot figsadd_fig(figsize=(10,8)):add a canvas, return axplot_fig(ax,x,y,label=False,linewidth=1,
factors=False,color="r",savefig="temp.png",
xlabel=False,ylabel=False,fontweight="bold",alpha=1.0,
dpi=300,transparent=True,fontsize=26):plot figFigure Processingfig2ico(png_file,ico_file=False):convert png to ico filefig2binary(fig_file, binary_file=False, threshold=128):convert fig to binary imagebinary2dxf(binary_image_file,dxf_file=False):convert binary to dxf format...
Package: fast-dataset-cleaner
Fast Dataset Cleaner by PhotoRoom - 🏃InstallationRunpip3 install fast-dataset-cleaner.Launch the platformRunfast-dataset-cleanerin your CLI. You can optionally add a specific port:fast-dataset-cleaner --port _CUSTOM_PORT_(default: 1747).
Open your browser and go tolocalhost:1747(or your custom port) to see the live platform.RequirementsSave images for annotation in a single folder.Create a csv with anidcolumn containing all the ids or names of the images to annotate. For instance, if your images are inimage_{id}.jpgformat, your csv should look like :id
image_0
image_1
image_2How it worksThis platform is designed for binary classification of images. This can be helpful either to clean up datasets or to add a label to each image.When launching the platform for the first time, you have to fill in the entries in the left menu - accessible by clicking on the banner or by typing on theSpace bar. Once you are finished, click on theGet imagesbutton or reload the page. The required password is the one displayed in your CLI.The entire annotation process can be done using the keyboard. The images are displayed with a number on their left. To annotate one of them, press the associated key or click on the card. By default, each image has the valuetrue. When all the images on a page are annotated, press theEnterkey to validate the annotations. You can then check in your files that a new csv was created - the initial name of the csv with the suffix_annotated- with two new columns for the annotator and the annotation, and that these annotations have been saved.You canchange pages with the arrows on your keyboard, which allows you to navigate through your dataset and re-annotate some images if necessary. BEWARE: ONLY theEnterbutton saves the annotations.When refreshing the page, unlabeled images are displayed. If after a page refresh the final screen is displayed, you're done labeling your dataset! 🎉Use masksYou can also use masks to check segmentations. For this task, save all your binary masks in another folder with the same ids as the original images. Add this folder to the platform entries and you should be able to see the segmented images after a page refresh.ShortcutsFor convenience and speed, we implemented a few keyboard shortcuts:Open/Close the menu:morSpace bar.Navigate between images: Keyboard arrows.Annotate an image: Press the number key associated with the image number.Validate annotations:Enter.Load images when the menu is open:iorg.