Saravanan666/pypi-org huggingface dataset:
Package: fasm
FPGA Assembly (FASM) Parser and Generation libraryThis repository documents the FASM file format and provides parsing libraries and simple tooling for working with FASM files.It provides both a pure Python parser based ontextxand a significantly faster C parser based onANTLR. The library will try and use the ANTLR parser first and fall back to thetextxparser if the compiled module is not found.Which parsers are supported by your currently install can be found viapython3 -c "import fasm.parser as p; print(p.available). The currently in use parser can be found viafasm.parser.implementation.It is highly recommended to use the ANTLR parser as it is about 15 times faster.functions for parsing and generating FASM files.Build InstructionsCMake is required, and ANTLR has a few dependencies:sudo apt install cmake default-jre-headless uuid-dev libantlr4-runtime-devPull dependencies inthird_party:git submodule update --initBuild:make buildTest with:python setup.py testThe ANTLR runtime can either be linked statically or as a shared library. Use the--antlr-runtime=[static|shared]flag to select between the two modes e.g.:python setup.py install --antlr-runtime=sharedOr, usingpip:pip install . --install-option="--antlr-runtime=shared" --no-use-pep517The runtime will be built and statically linked by default. This flag is available in the build_ext, build, develop, and install commands.The --no-use-pep517 flag is needed because there is currently no way to pass flags with PEP517.
Relevant issue:https://github.com/pypa/pip/issues/5771FPGA Assembly (FASM)FPGA Assembly is a file format designed by theF4PGA Projectdevelopers to provide a plain
text file format for configuring the internals of an FPGA.It is designed to allow FPGA place and route to not care about theactualbitstream format used on an FPGA.PropertiesRemoving a line from a FASM file leaves you with a valid FASM file.Allow annotation with human readable comments.Allow annotation with "computer readable" comments.Has syntactic sugar for expressing memory / lut init bits / other large
arrays of data.Has a canonical form.Does not require any specific bitstream format.Supported ByFASM is currently supported by theF4PGA Verilog to Routing fork,
but we hope to get it merged upstream sometime soon.It is also used byProject X-Ray.
Package: fasmga.py
fasmga.pyfasmga.py is aFasm.gaAPI wrapper written using asyncio.Fasm.gais a free and open-source URL shortener.Installationfasmga.py works with Python 3.7 and greater.To install, you need to have pip installed first.pipinstall-Ufasmga.pyNote: The package name isfasmga.pyandnotfasmga!ExamplesSee the examples directory.
Package: fASP
fASPEfficient enumeration of fixed points in Boolean networks using answer set programmingInstallYou can install fASP withpipdirectly from the Package Index:$python3-mpipinstallfASPYou will also need theclingoASP solver in your PATH.
Instructions are provided directly on thePotassco pages.Run fASP from the command lineAfter installingfASP(andclingo), just run$ fASP -h
usage: fASP [-h] [-v] [-m MAX] [-t TIME] [-e {conj,disj,source}] [infile]

Compute fixed points of complex Boolean networks. Copyright (C) 2023 Sylvain.Soliman@inria.fr and giang.trinh91@gmail.com GPLv3

positional arguments:
  infile                BoolNet (.bnet) file

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -m MAX, --max MAX     Maximum number of solutions (0 for all).
  -t TIME, --time TIME  Maximum number of seconds for search (0 for no-limit).
  -e {conj,disj,source}, --encoding {conj,disj,source}
                        ASP encoding to compute fixed points.
Package: fast1dkmeans
fast1dkmeansA Python library which implements several variations of optimalk-means clustering on 1D data, based on the algorithms presented by Gronlund et al. (2017). This package is inspired by thekmeans1dpackage but extends it by implementing additional algorithms, in particular those with reduced memory requirements O(n) instead of O(kn).There are several different ways to compute the optimal k-means clustering in 1d.
Currently the package implements the following methods:"binary-search-interpolation"default[O(n lg(U) ), O(n) space, "wilber-interpolation"]"dynamic-programming-kn"[O(kn), O(kn) space]"dynamic-programming-space"[O(kn), O(n) space, "dp-linear"]"binary-search-normal"[O(n lg(U) ), O(n) space, section 2.4, "wilber-binary"]The code is written in Python and relies on thenumbacompiler for speed.Requirementsfast1dkmeansrelies onnumpyandnumbawhich currently support python 3.8-3.10.Installationfast1dkmeansis available on PyPI, the Python Package Index.$pip3installfast1dkmeansExample Usageimportfast1dkmeansx=[4.0,4.1,4.2,-50,200.2,200.4,200.9,80,100,102]k=4clusters=fast1dkmeans.cluster(x,k)print(clusters)# [1, 1, 1, 0, 3, 3, 3, 2, 2, 2]Important notice: On first usage the the code is compiled once which may take about 30s. On subsequent usages this is no longer necessary and execution is much faster.TestsTests are intests/.# Run tests$python3-mpytest.LicenseThe code in this repository has an BSD 2-Clause "Simplified" License.SeeLICENSE.References[1] Gronlund, Allan, Kasper Green Larsen, Alexander Mathiasen, Jesper Sindahl Nielsen, Stefan Schneider,
and Mingzhou Song. "Fast Exact K-Means, k-Medians and Bregman Divergence Clustering in 1D."
ArXiv:1701.07204 [Cs], January 25, 2017.http://arxiv.org/abs/1701.07204.
Package: fast2webp
一个将 PNG、JPG、JPEG、BMP、GIF 等格式的图像文件批量 (递归) 转换为 webp 格式的 Python 脚本可以设定压缩级别 (0 ~ 100)，数字越大品质越好。支持无损压缩。支持多线程。可以在 GNU/Linux 上运行，Mac OS 估计也可以 (没测试过)，Windows 上可能要修改一下才能用 (主要是目录地址中/与\的区别)突然发现webp的工具包中有一个叫img2webp的工具 (没用过所以不知道QAQ)，为了避免冲突现将项目改名为fast2webp_(:з」∠)_依赖Python3webp安装sudo pip3 install fast2webp使用fast2webp [options] <value>截图参数 (options)usage: fast2webp [-h] [-i <dir>] [-o <dir>] [-q <int> | -lossless][-t <int>]
                [-only {png,jpg,bmp,gif}] [-enable_gif] [-uncopy]

-i <dir> .......... 需要转换的文件所在的目录，会递归进行转换  (默认：.[当前目录])
-o <dir> .......... *.webp 文件的输出目录，输出目录结构与输入目录保持一致 (默认：./output)
                    如果输出目录不存则会按照给定的路径新建文件夹
                    如果缺省，则会在当前目录中新建并输出到目录 'output'
-q <int> .......... 与 'cwebp' 中相同；表示压缩的程度 (0 ~ 100)，数字越大品质越好 (默认：80)
-t <int> .......... 线程池中线程的个数；数字越大转换速度越快。当然，也更吃资源 (默认：10)
-lossless ......... 与 'cwebp' 中相同；无损压缩
-only <value> ..... 只执行某单一任务 (可接受的值有：png、jpg、bmp、gif)
                    例如：-only png 表示只转换输入目录中的 png 文件为到输出目录
-enable_gif ....... 将 gif 转为 webp (默认情况下会跳过 gif 文件)
                    转换 gif 文件比较吃资源，慎用
                    转换 gif 文件不支持无损压缩，此时 -lossless = -q 100
-uncopy ........... 默认情况下会将非图片文件复制到输出目录中，使用参数 -uncopy 关闭这一特性
                    (*.webp 和 *.gif 仍会被复制)
-h ................ 展示帮助信息TODO支持 Windows支持更多的参数
Package: fast5purge
fast5purgePurge a fast5 file or directory of fast5 files from potentially sensitive information:
the information in data in following locations will be erased:UniqueGlobalKey/context_tags/filenameUniqueGlobalKey/context_tags/user_filename_inputUniqueGlobalKey/tracking_id/sample_idUniqueGlobalKey/tracking_id/ip_addressWARNINGCurrently modifies fast5 file IN PLACE. You cannot get your original data data back if you do not have a copy.I hope to fix this sooner or later, pull requests are very much welcomeINSTALLATIONpip install fast5purgeUSAGEfast5purge [-h] [-d DIR] [-f FILE] [-r]

Remove sensible content from a fast5 file or directory

optional arguments:
  -h, --help            show this help message and exit
  -d DIR, --dir DIR     directory in which fast5 files have to be purged
  -f FILE, --file FILE  single fast5 file to purge
  -r, --recursive       recursively go through directory
Package: fast5_rekindler
fast5_rekindlerDocumentation:https://adnaniazi.github.io/fast5_rekindlerSource Code:https://github.com/adnaniazi/fast5_rekindlerPyPI:https://pypi.org/project/fast5_rekindler/Collates information from BAM and POD5 files and generates FAST5 files for use in legacy tools such as tailfindr.Installation1. Create Python 3.10 or 3.11 environment.condacreate-nf5rpython=3.112. Activate the environment.condaactivatef5r3. Install FAST5 Rekindler.pipinstallfast5_rekindlerUsageFAST5 rekindler needs:1. A BAM file withmovestable in it.You can generate it using Dorado:doradobasecaller/path/to/basecalling/model\/pod5/dir/path\--recursive\--emit-sam\--emit-moves\--device"cpu"\# or "cuda:all"--reference/path/to/alginment/reference>/path/to/calls.sam2. Convert Doarado's output SAM file to a BAM file.samtoolsview-bS/path/to/calls.sam>/path/to/calls.bam3. Sort the BAM file.samtoolssort/path/to/calls.bam-o/path/to/sorted.calls.bam4. Use FAST5 Rekindler to convert POD5 files to FAST5 files.fast5_rekindler/path/to/sorted.calls.bam\/path/to/pod5_dir\/path/to/output_dir\--num_processes100To invoke help for FAST5 Rekindler, just type:fast5_rekindler--helpDevelopmentClone this repositoryRequirements:PoetryPython 3.7+Create a virtual environment and install the dependenciespoetryinstallActivate the virtual environmentpoetryshellTestingpytestDocumentationThe documentation is automatically generated from the content of thedocs directoryand from the docstrings
of the public signatures of the source code. The documentation is updated and published as aGithub project pageautomatically as part each release.ReleasingTrigger theDraft release workflow(pressRun workflow). This will update the changelog & version and create a GitHub release which is inDraftstate.Find the draft release from theGitHub releasesand publish it. When
a release is published, it'll triggerreleaseworkflow which creates PyPI
release and deploys updated documentation.Pre-commitPre-commit hooks run all the auto-formatters (e.g.black,isort), linters (e.g.mypy,flake8), and other quality
checks to make sure the changeset is in good shape before a commit/push happens.You can install the hooks with (runs for each commit):pre-commitinstallOr if you want them to run only for each push:pre-commitinstall-tpre-pushOr if you want e.g. want to run all checks manually for all files:pre-commitrun--all-files
Package: fast5-research
fast5_researchPython fast5 reading and writing functionality provided by ONT Research.© 2018 Oxford Nanopore Technologies Ltd.FeaturesRead interface bulk.fast5file for extracting reads, channel states, voltage, ...Read/Write interface to single read files guaranteeing conformity.Works on Linux, MacOS, and Windows.Open source (Mozilla Public License 2.0).Documentation can be found athttps://nanoporetech.github.io/fast5_research/.Installationfast5_researchis available from pypi can can be installed with pip:pip install fast5_researchUsageFull documentation can be found at the link above, below are two simple examples.To read a file:from fast5_research import Fast5

filename='my.fast5'

with Fast5(filename) as fh:
    raw = fh.get_read(raw=True)
    summary = fh.summary()
print('Raw is {} samples long.'.format(len(raw)))
print('Summary {}.'.format(summary))Write a file, the library will check the given meta data, ensure that all required
values are present, and covert all values to their defined types.from uuid import uuid4
import numpy as np
from fast5_research import Fast5

filename='my_new.fast5'
mean, stdv, n = 40.0, 2.0, 10000
raw_data = np.random.laplace(mean, stdv/np.sqrt(2), int(dwell))

# example of how to digitize data
start, stop = int(min(raw_data - 1)), int(max(raw_data + 1))
rng = stop - start
digitisation = 8192.0
bins = np.arange(start, stop, rng / digitisation)
# np.int16 is required, the library will refuse to write anything other
raw_data = np.digitize(raw_data, bins).astype(np.int16)

# The following are required meta data
channel_id = {
    'digitisation': digitisation,
    'offset': 0,
    'range': rng,
    'sampling_rate': 4000,
    'channel_number': 1,
    }
read_id = {
    'start_time': 0,
    'duration': len(raw_data),
    'read_number': 1,
    'start_mux': 1,
    'read_id': str(uuid4()),
    'scaling_used': 1,
    'median_before': 0,
}
tracking_id = {
    'exp_start_time': '1970-01-01T00:00:00Z',
    'run_id': str(uuid4()).replace('-',''),
    'flow_cell_id': 'FAH00000',
}
context_tags = {}

with Fast5.New(filename, 'w', tracking_id=tracking_id, context_tags=context_tags, channel_id=channel_id) as h:
    h.set_raw(raw_data, meta=read_id, read_number=1)HelpLicence and Copyright© 2018 Oxford Nanopore Technologies Ltd.medakais distributed under the terms of the Mozilla Public License 2.0.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: fastabf
fastABF is a fast and robust computation module for activity based funding (ABF). It helps to
streamline the computation of ABF activities as per the National Efficient Price (NEP) 20-21 framework guidelines.  It covers the following major ABF activity typesadmitted acuteadmitted sub/non-acutenon-admittedemergency department or emergency serviceDocumentation:fastABF docFeaturesFast to setup- go from start to computing an example ABF episode within 5 minutes. Saveclose to a monthof development and testing time!Robust- with python type hints, strong version control (via Poetry) and strong test coverage the code base is ready for use in backend systems.Easy to understand and extend- numerous comments and well structured organisation, ensure that health IT developers can easily use and extend these modules.Pain free- The code aims to distill the numerous computations detailed in the IHPA NEP 20-21 computation documentation and guidelines. These span over60 pages. This is in addition to the HAC computation guidelines which spanover 40 pages. The effort we have put into this is time that you can spend on making other innovative contributions (or taking several long walks :) ).Lower bug count- By leveraging a well tested and open source code base - developers can reduce the chance of introducing bugs into their ABF calculations by over 25-30%*Incorporates METeOR conventions- The METeOR identifiers have been mapped to user friendly PythonEnumnames. Now instead of remembering the METeOR numerical identifiers you can use these human readable class names  - reducing the possibility of bugs and errors creeping in.HAC adjustment computations- The detailed steps of the HAC adjustments are included as well.Remoteness calculations- This code also contains the steps to obtain the remoteness values (from postcode and SA2 address). Hence it enables automatic extraction of the RA16 remoteness class)* based on the experience of the internal dev-team and bugs caught and resolved via type checking and testing during development.Glossary[HAC]: hosptial acquired complications[IHPA]: Independent hospital pricing authority[METeOR]:  Metadata online registry[ABF]: Activity based funding[NEP]: National efficient priceIt is assumed that you are familiar withpythonthe terminology and concepts of ABF.
Package: fastachar
Fastacharis a graphical user interface that allows a simple
comparison of two sets of DNA sequences. A typical working example
is to have a selection of DNA sequences of different, but related
species. These sequences are divided in a set A, which are thought
to be a single taxon (species) and a set B, which is a collection of
different taxa. Using the program, it can be established easily whether:the DNA sequences in set A are all identical, and if not, list the
differences for those positions in the DNA sequences.set B has positions in the DNA that are different from those in
set A,  acrossallspecies in set B.Fastachartakes as input the alignments stored in a single file of
the fasta format.Fastacharis not a tool to align sequences. It is
assumed that the sequences were previously aligned with different algorithms
(e.g. MUSCLE) and the most reliable alignment was chosen.
Package: fasta-checksum-utils
fasta-checksum-utilsAsynchronous library and command-line utility for checksumming FASTA files and individual contigs.
Implements two checksumming algorithms:MD5andGA4GH, in order to fulfill the needs of theRefget v2API specification.InstallationTo installfasta-checksum-utils, run the followingpipcommand:pipinstallfasta-checksum-utilsCLI UsageTo generate a text report of checksums in the FASTA document, run the following command:fasta-checksum-utils./my-fasta.fa[.gz]This will print output in the following tab-delimited format:file  [file size in bytes]    md5 [file MD5 hash]           ga4gh  [file GA4GH hash]
chr1  [chr1 sequence length]  md5 [chr1 sequence MD5 hash]  ga4gh  [chr1 sequence GA4GH hash]
chr2  [chr2 sequence length]  md5 [chr2 sequence MD5 hash]  ga4gh  [chr2 sequence GA4GH hash]
...The following example is the output generated by specifying the SARS-CoV-2 genome FASTA from NCBI:file	    30428	md5	825ab3c54b7a67ff2db55262eb532438	ga4gh	SQ.mMg8qNej7pU84juQQWobw9JyUy09oYdd
NC_045512.2	29903	md5	105c82802b67521950854a851fc6eefd	ga4gh	SQ.SyGVJg_YRedxvsjpqNdUgyyqx7lUfu_DIf the--out-format bento-jsonarguments are passed, the tool will instead output the report in a JSON
format, designed to be compatible with the requirements of theBento Reference Service. The following example
is the output generated by specifying the SARS-CoV-2 genome:{"fasta":"sars_cov_2.fa","fasta_size":30428,"md5":"825ab3c54b7a67ff2db55262eb532438","ga4gh":"SQ.mMg8qNej7pU84juQQWobw9JyUy09oYdd","contigs":[{"name":"NC_045512.2","md5":"105c82802b67521950854a851fc6eefd","ga4gh":"SQ.SyGVJg_YRedxvsjpqNdUgyyqx7lUfu_D","length":29903}]}If an argument like--fai [path or URL]is passed, an additional"fai": "..."property will be added to the JSON
object output.If an argument like--genome-id GRCh38is provided, an additional"id": "GRCh38"property will be added to the
JSON object output.Library UsageBelow are some examples of howfasta-checksum-utilscan be used as an asynchronous Python library:importasyncioimportfasta_checksum_utilsasfcimportpysamfrompathlibimportPathasyncdefdemo():covid_genome:Path=Path("./sars_cov_2.fa")# calculate an MD5 checksum for a whole filefile_checksum:str=awaitfc.algorithms.AlgorithmMD5.checksum_file(covid_genome)print(file_checksum)# prints "863ee5dba1da0ca3f87783782284d489"all_algorithms=(fc.algorithms.AlgorithmMD5,fc.algorithms.AlgorithmGA4GH)# calculate multiple checksums for a whole fileall_checksums:tuple[str,...]=awaitfc.checksum_file(file=covid_genome,algorithms=all_algorithms)print(all_checksums)# prints tuple: ("863ee5dba1da0ca3f87783782284d489", "SQ.mMg8qNej7pU84juQQWobw9JyUy09oYdd")# calculate an MD5 and TRUNC512 checksum for a specific contig in a PySAM FASTA file:fh=pysam.FastaFile(str(covid_genome))try:contig_checksums:tuple[str,...]=awaitfc.checksum_contig(fh=fh,contig_name="NC_045512.2",algorithms=all_algorithms,)print(contig_checksums)# prints tuple: ("105c82802b67521950854a851fc6eefd", "SQ.SyGVJg_YRedxvsjpqNdUgyyqx7lUfu_D")finally:fh.close()# always close the file handleasyncio.run(demo())
Package: fastack
Fastack⚡ Fastack makes your FastAPI much easier 😎fastack is an intuitive framework based on FastAPI, for creating clean and easy-to-manage REST API project structures. It's built for FastAPI framework ❤️WARNING 🚨This is an early development, lots of changes with each release. Also this is an experimental project, as I'm currently studying asynchronous environments.FYI, this isn't the only intuitive framework project I've made. I've also made with different framework bases, including:zemfrog- Based onFlask frameworkfalca- Based onFalcon frameworkFeatures 🔥Project layout (based on cookiecutter template)Pagination supportProvide aControllerclass for creating REST APIsProvides command line to manage appSupport to accessapp,request,state, andwebsocketglobally!and more!Plugins 🎉List of official plugins:fastack-sqlmodel-SQLModelintegration for fastack.fastack-migrate-Alembicintegration for fastack.fastack-mongoengine-MongoEngineintegration for fastack.fastack-cache- Caching plugin for fastackInstallation 📦pip install -U fastackExample 📚Create a projectfastack new awesome-project
cd awesome-projectInstall pipenv & create virtual environmentpip install pipenv && pipenv install && pipenv shellRun appfastack runserverDocumentation 📖For the latest documentation, see thefeature/docsbranch.Build the latest documentation locally:mkdocs serveOr alternatively, you can visithttps://fastack.readthedocs.io/en/latest/Tests 🔬Run tests withtox, maybe you need to install python version3.7,3.8,3.9, and3.10first.tox
Package: fastack-cache
fastack-cachefastack-cache is a caching plugin forfastack❤️This plugin is inspired by thedjango cache frameworkanddjango-redis!Supported cache backend:Redis:fastack_cache.backends.redis.RedisBackend- Sync versionfastack_cache.backends.aioredis.AioRedisBackend- Async versionInstallationpip install -U fastack-cacheUsageAdd the plugin to your project configuration:PLUGINS=["fastack_cache",...]Configuration:REDIS_HOST="localhost"REDIS_PORT=6900REDIS_DB=0CACHES={# cache name"default":{# cache backend"BACKEND":"fastack_cache.backends.redis.RedisBackend",# Cache options to be passed to the Redis(...) class"OPTIONS":{"host":REDIS_HOST,"port":REDIS_PORT,"db":REDIS_DB,},# Serializer for converting data into cache"SERIALIZER":{"CLASS":"fastack_cache.serializers.JSONSerializer","OPTIONS":{# Option to pass when dumps() method in serializer class is called"DUMPS":{},# Option to pass when loads() method in serializer class is called"LOADS":{}}}}}
Package: fastack-celery
fastack-celerySimple package to integrate celery with fastack.To-doThere are several to-do lists for the futureSee#1Installationpip install fastack-celeryUsageCreate celery appCopy the code below and put it inapp/main.py:fromfastack_celeryimportmake_celerycelery=make_celery(app)You can also pass parameters to the celery app.ConfigurationFor celery configuration, you can create it viaCeleryclass in your app settings. For example:# app/settings/local.pyclassCelery:broker_url="amqp://strong_user:strong_password@localhost:5672/celery_vhost"result_backend="redis://localhost:6900/0"For other celery configurations, see herehttps://docs.celeryproject.org/en/stable/userguide/configuration.html#new-lowercase-settingsCreate a taskYou can create tasks using theshared_taskdecorator:# app/tasks.py# Sample task from examples/celery/app/tasks.py@shared_taskdefcounter_task(id:int):session=db.open()withsession.begin():obj:Counter=session.query(Counter).where(Counter.id==id).first()ifobj:print(f"start counting #{id}")obj.counter+=1state=obj.stateifstateisNoneorstate==Counter.State.NOT_IN_QUEUE:obj.state=Counter.State.NOT_IN_QUEUEelifstate==Counter.State.TERMINATED:task_id=obj.task_id# or current_task.request.idcelery.control.revoke(task_id,terminate=True)obj.task_id=Noneelse:obj.state=Counter.State.IN_QUEUEcounter_task.apply_async(args=(id,),countdown=1,task_id=obj.task_id)obj.save(session)else:print(f"Object with id #{id}not found")By default, all tasks must be stored inapp/tasks.pywhich will be automatically imported by themake_celeryfunction.Running celery workerscd your-project
celery -A app.main:celery worker -l info