Saravanan666/pypi-org huggingface dataset:
Package: pyfastcopy
pyfastcopy is a simple Python module that monkey patches theshutil.copyfilefunction of Python standard library to internally
use the sendfile system call.It can provide important performance improvements for large file copy
(typically 30-40%). Seethe performance sectionfor
some numbers.Becauseshutil.copyfileis used by other fonctions in theshutilmodule, the following functions also automatically benefit from the
performance boost:shutil.copyshutil.copy2shutil.copytreeIfsendfileis not available on your system or fails, the classic,
slower chunk file copy is used, so there is no downside to using this
module.For more information, seemy proposed
patchfor Python.PerformanceTests were done copying files (source and destination) on atmpfsfilesystem, so that no
slowdown related to hard drive or SSD storage occurs. Test files were
generated with pseudo random data usingfrandom.Seebenchmark.pyfor details about the test procedure and how the following graphs were
generated.Python 3.4:Python 3.6:These tests show a 30-50% performance improvement of
``shutil.copyfile`` compared to stock Python.UsageJust import the module:import pyfastcopyAnd then use the patchedshutil.copyfileas usual:shutil.copyfile(src, dst)The ``sendfile`` system call does not exist on Windows, so importing
this module will have no effect.InstallationFrom PyPI (with PIP)If you don’t already have it,install
pipfor Python 3 (not
needed if you are using Python >= 3.4)Install pyfastcopy:pip3 install pyfastcopyEnjoy fast copy when usingshutil.copyfile,shutil.copy,shutil.copy2orshutil.copytreeFrom sourceIf you don’t already have it,install
setuptoolsfor Python 3Clone this repository:git clonehttps://github.com/desbma/pyfastcopyInstall pyfastcopy:python3 setup.py installEnjoy fast copy when usingshutil.copyfile,shutil.copy,shutil.copy2orshutil.copytreeLicensePython Software Foundation License
Package: pyfastcore
pyfastcoreA python implementation of the context-specific model extraction method FastCore by Vlassis et al. (2014)Vlassis, N., Pacheco, M. P., & Sauter, T. (2014). PLoS Computational Biology, 10(1)[Full Article]INSTALATIONYou can install pyfastcore using:python setup.py installof via pip:pip install pyfastcoreUSAGE EXAMPLEfrom cobra.test import create_test_model
from pyfastcore import Fastcore

# Loading a toy model of E. coli from cobra.test package
model = create_test_model('textbook')
# Define the list of core reactions
core_reactions = ['Biomass_Ecoli_core', 'ATPM']
# Setting the penalty of exchange fluxes to 0
penalties = {}
for r in model.exchanges:
    penalties[r.id] = 0

# Creating a fastcore solver instnace
fc_builder = Fastcore(model, core_reactions,
                      penalties=penalties,
                      default_penalty=10,
                      debug_mode=True)

# Rnunning fastcore
fc_builder.fast_core()

# checking the list of reaction in the consistent network found
consistent_subnetwork = fc_builder.consistent_subnetwork
print("Consistent subnetworksize set size", len(consistent_subnetwork))
print("Context specific core:")
print(consistent_subnetwork)

# creating a cobra model for the consistent network found
print(f"Building context-specific model for {model.id}")
cs_model = fc_builder.build_context_specific_model()

# Running and FBA using subnetwork model 
print("Running FBA on CS-model")
sol = cs_model.optimize()
print(cs_model.summary())CitationIf you use this package cite:Ponce-De-Leon, M. et al. (2015) Consistency Analysis of Genome-Scale Models of Bacterial Metabolism: A Metamodel Approach. PloS one, 10, e0143626.
Package: py-fast-grpc
Fast-gRPCFast-gRPC it is simple and easy to use Python gRPC framework.Installationpipinstallpy-fast-grpcQuick Startfromfast_grpcimportFastGRPC,FastGRPCService,grpc_methodfrompydanticimportBaseModelclassHelloRequest(BaseModel):name:strclassHelloResponse(BaseModel):text:strclassGreeter(FastGRPCService):@grpc_method()asyncdefsay_hello(self,request:HelloRequest)->HelloResponse:returnHelloResponse(text=f"Hello,{request.name}!")app=FastGRPC(Greeter())app.run()TODOMore unit testsAdd lintersAdd CI/CDAdd documentation
Package: pyfastkvjson
run command to installpip install pyfastkvjsonjsonstore kvThis module provides a class that maps keys and values from a JSON file
onto its attributes.The goal was to provide a convenient way of loading and saving
configuration in a familiar human readable format. This is a bit more
flexible than theconfigparsermodule which is included with Python.This works is tested and working on Python 2.7+ and Python 3.3+. It will
not work on 2.6 or lower, but is expected to work on 3.0-3.2. The tests
do not work in 3.2.6 due tomistreatingthe 💩 when parsing the test code. This is also tested on pypy and pypy3.ExamplesBasics# by default JsonStore commits on every change unless in a transactionstore=JsonStore('config.json')store.a_string="something"store.a_list=[1,2,3]store.a_dictionary={'dict-list':[{}],'ln(2)':0.69314718056,'for-you':u"💐",}# you can use […] to set/get/delete string keysstore['some_key']="a value"# the key is split on '.'s and works on dictionariesdelstore['a_dictionary.dict-list']store['a_dictionary.new_value']="old value"#  you can also use the syntactic sugar for tuple keys (explicit lists work too)assertstore['a_dictionary','new_value']=="old value"# you can traverse lists tooassertstore['a_list',-1]==3# you can use slices in listsassertlen(store['a_list',1:])==2# deep copies are made when assigning valuesmy_list=['fun']store.a_list=my_listassertstore.a_listisnotmy_listassert'a_list'instore# deep copies are also returned to avoid unsanitary changes being madestore.a_dictionary['new_value']="new value"# won't update the store!assertstore.a_dictionary['new_value']=="old value"assertstore.a_dictionaryisnotstore.a_dictionary# Appending to, extending a list>>>store.list=[1,2,3]# Because of the fact that .append won't modify the list in the actual file,# but only a copy...>>>store.list.append(4)>>>store.list[1,2,3]# ... we need to rather use the += operator to append to a list.>>>store.list+=[4]>>>store.list[1,2,3,4]# Similarly, we can extend the list>>>store.list+=[5,6]>>>store.list[1,2,3,4,5,6]Additional encryptionsTEST_PASSWORD="123456"secret_file_name=mktemp()+".aes"store_ram=JsonStore(secret_file_name,indent=None,auto_commit=True,password=TEST_PASSWORD)TransactionsJsonStoreobjects can be used ascontext
managersto provide
transactions which are rolled back in the event of an exception. The
transaction model is primitive; you can only nest transactions.While a store is put into a transaction, it will not save changes to
file until all of the transactions have been closed.fromjsonstoreimportJsonStore# even with auto_commit=True, the file won't be saved until the last contexts has been closedwithJsonStore('config.json',indent=None,auto_commit=False)asstore:self.value=1# the context manager will roll back changes made if an exception is raisedstore=JsonStore('config.json',indent=None)try:withstore:store.value="new"raiseExceptionexceptException:pass# here we see the value that was saved previouslyassertstore.value==1
Package: pyfastlz-native
pyfastlz-nativeThis is a native python3 implementation of the FastLZ algorithm (more info inLempel-Ziv 77 algorithm).Currently it only implements decompression.Usageimport fastlz_native

comp_data = bytes(raw_data)
decompressed = fastlz_native.fastlz_decompress(comp_data)Expected formatThis implementation expects the decompressed size in bytes in the first uint32_t chunk.
Package: pyfastnoiselite
Cython wrapper for theFastNoise LitelibraryThis wraps Auburns' greatFastNoise Litelibrary using Cython  for use in Python 3.6+InstallationThis package is available on thePython Package Indexboth
as source and binary distribution for a variety of Python versions and
platforms using the following command:pipinstallpyfastnoiselite# On some systems, "pip" has to be replaced by "pip3"Note:This wrapper currently lacks the domain warping functionality and
documentation. Both are planned to be added in the future.
Package: pyfastpfor
Pythong bindings for FastPFor: A research library with integer compression schemes. FastPFor is broadly applicable to the compression of arrays of 32-bit integers where most integers are small. The library seeks to exploit SIMD instructions (SSE) whenever possible. This library can decode at least 4 billions of compressed integers per second on most desktop or laptop processors. That is, it can decompress data at a rate of 15 GB/s. This is significantly faster than generic codecs like gzip, LZO, Snappy or LZ4.
Package: pyfastq-filter
pyfastq_filterFilter FASTQ Files.Installationpip3install--userpyfastq_filterUsageUsage:
  pyfastq_filter.py [-q i] [-l n] [-m m] [-o OUTNAME] FASTQ

Options:
  -l --length=n      minimum length to let through [default: 300]
  -m --max-length=m  maximum length to let through [default: infinity]
  -q --quality=i     minimum quality to let through [default: 10]
  -o --outfile=FILE  output filename, otherwise STDOUT [default: -]Extract only FASTQ entries with sequence length >= 5000 and mean quality >= 12:pyfastq_filter.py-q12-l5000example.fastq>example-q12-l5000.fastq
Package: pyfastspm
FAST movie processorA python package for loading, processing and exporting scanning tunneling microscopy movies acquired with the FAST module.The package documentation can be found atthis link.ChangelogAll notable changes to this project will be documented in this file.The format is based onKeep a Changelog,
and this project adheres toSemantic Versioning.[Unreleased][1.0.4] - 2023-07-18FixedReplace deprecated pillow font.getsize() method (#5)[1.0.3] - 2023-06-20FixedCompatibility with file format version 2.6 (#4)several typos in CHANGELOGChangedRemoved any data inversion on loading.[1.0.2] - 2023-03-16Fixednumpydeprecation ofnp.float(#2)ChangedCreep correction: Both thesinandrootcreep corrections were re-derived with more strict constraints to prevent un-physical/nonsensical creep behavior.Added function constraints to documentation. The derivation of the creep functions is not part of this repo as of now.AddedFunctionssin_limit_functionandroot_limit_functionto automatically adapt the bounds for the optimizer when approximating the creep behavior insinorrootmode. This preventspyfastspmfrom crashing / skipping the creep correction if bounds are defined too loosely.[1.0.1] - 2022-07-20Changedcitation file: DOI, license ids, and bump version infouse concept DOI in README badge[1.0.0] - 2022-07-12Addedfirst public release
Package: py-fast-trie
py-fast-triepy-fast-trie is a package that contains pure-Python implementations of anX-fast Trieand aY-fast trie, as described in thefoundational paper.The most notable benefit of X-fast and Y-fast tries compared to more common data structures such as binary search trees is that searches are log-logarithmic in the cardinality of the universe as opposed to being logarithmic in the number of elements in the structure itself; For reference if you needed to store 2^20 items with a potential maximum value of 2^32 - 1, finding a particular item would take 20 operations in a red/black or AVL tree, but only 5 with an X-fast or Y-fast trie.UsageThe interfaces of the X-fast and Y-fast tries are identical, the Y-fast trie is used here as an example.>>> from py_fast_trie import YFastTrie
>>> t = YFastTrie(max_length=32)		# The library defaults to the machine's word size
>>> for i in range(10, 13):
...     t += i					# Value insertion/removal operations have intuitive
>>> t.min					# shorthands
10
>>> t += b'\x0d'				# The library can handle byte strings less than the
>>> t.max					# max length by treating them as integers
13
>>> for val in t:
...     print val
10
11
12
13
>>> t < 12					# Predecessor/successor queries have intuitive
11						# shorthands
>>> t > 0
10
t -= 13
>>> t > 12
>>>
Package: pyfatcache
Example usage:import pyfatcache

conn = pyfatcache.get_conn()
conn.delete("a")
print "expect (None, None) / get %s" % (str(conn.get("a")),)
conn.set("a", "a", flags=1)
print "expect ('a', 1) / get %s" % (str(conn.get("a")),)
conn.set("a", dict(name="pyfatcache"))
print "expect ({'name': 'pyfatcache'}, 0) / get %s" % (str(conn.get("a")),)
conn.set("a", None)
print "expect (None, 0) / get %s" % (str(conn.get("a")),)
conn.close()
Package: pyfatfs
pyfatfspyfatfs is a filesystem module for use withPyFilesystem2for anyone who needs to access or modify files on a FAT filesystem. It also
provides a low-level API that allows direct interaction with a FAT filesystem
without PyFilesystem2 abstraction.pyfatfs supports FAT12/FAT16/FAT32 as well as the VFAT extension (long file names).Installationpyfatfs is available via PyPI aspyfatfs, so just execute the following
command to install the package for your project:$pipinstallpyfatfsUsageThe easiest way to get started with pyfatfs is to use it in conjunction
with PyFilesystem2:PyFilesystem2Use fs.open_fs to open a filesystem with a FATFS URL:importfsmy_fs=fs.open_fs("fat:///dev/sda1")ParametersIt is possible to supply query parameters to the URI of the
PyFilesystem2 opener to influence certain behavior; it can
be compared to mount options. Multiple parameters can be
supplied by separating them viaampersand (&).encodingpyfatfs offers an encoding parameter to allow overriding the
default encoding of ibm437 for file names, which was mainly
used by DOS and still is thedefault on Linux.Any encoding known by Python can be used as value for this
parameter, but keep in mind that this might affect interoperability
with other systems, especially when the selected encoding/codepage
is not native or supported.Please note that this only affects encoding of the 8DOT3 short file names, not
long file names of the VFAT extension, as LFN are always stored as UTF-16-LE.importfsmy_fs=fs.open_fs("fat:///dev/sda1?encoding=cp1252")offsetSpecify an offset in bytes to skip when accessing the file. That way even
complete disk images can be read if the location of the partition is known:importfsmy_fs=fs.open_fs("fat:///dev/sda?offset=32256")preserve_casePreserve case when creating files. This will force LFN entries for all
created files that do not match the 8DOT3 rules. This defaults to true
but can be disabled by setting preserve_case to false:importfsmy_fs=fs.open_fs("fat:///dev/sda1?preserve_case=false")read_onlyOpen filesystem in read-only mode and thus don’t allow writes/modifications.
This defaults to false but can be enabled by setting read_only to true:importfsmy_fs=fs.open_fs("fat:///dev/sda1?read_only=true")utcCreate all timestamps on the filesystem in UTC time rather than local time.
Affects all directory entries’ creation, modification and access times.importfsmy_fs=fs.open_fs("fat:///dev/sda1?utc=true")TestingTests are located at thetestsdirectory. In order to test your new
contribution to pyfatfs just run$pythonsetup.pytestfrom your shell.
Package: py-fatigue
It provides:a powerful cycle-counting implementation based on the ASTM E1049-85 rainflow method that retrieves the main class of the package:CycleCountcapability of storing theCycleCountresults in a sparse format for storage and memory efficiencyeasy applicability of multiple mean stress effect correction modelsimplementation of low-frequency fatigue recovery when "summing" multipleCycleCountinstancesfatigue analysis through the combination of SN curves and multiple damage accumulation modelscrack propagation analysis through the combination of the Paris' law and multiple crack geometriesand more...Py-Fatigue is heavily based onnumba,numpyandpandas, for the analytical part, andmatplotlibas well asplotlyfor the plotting part.Therefore, it is highly recommended to have a look at the documentation of these packages as well.Installation requirementsPy-Fatigue requires Python 3.8 or higher. It is a 64-bit package and it is not compatible with 32-bit Python.To cite Py-FatigueIf you use Py-Fatigue in your research, please cite the following paper:BibTeX-style@misc{dantuono-2022,
	author ={given-i=P.D., given=Pietro, family=D'Antuono and given-i=W.W., given=Wout, family=Weijtjens and given-i=C.D., given=Christof, family=Devriendt},
	publisher ={https://www.owi-lab.be/},
	title ={{Py-Fatigue}},
	year ={2022},
	url ={https://owi-lab.github.io/py_fatigue},}BibLaTeX-style@software{dantuono-2022,
	author ={given-i=P.D., given=Pietro, family=D'Antuono and given-i=W.W., given=Wout, family=Weijtjens and given-i=C.D., given=Christof, family=Devriendt},
	date ={2022},
	language ={english},
	publisher ={https://www.owi-lab.be/},
	title ={Py-Fatigue},
	type ={software},
	url ={https://owi-lab.github.io/py_fatigue},
	version ={1.0.3},}APA 7-styleD’Antuono, P. D., Weijtjens, W. W., & Devriendt, C. D. (2022). Py-Fatigue [Software]. In Github (1.0.3). https://www.owi-lab.be/. https://owi-lab.github.io/py_fatigueLicenseThe package is licensed under theGNU General Public License v3.0.
Package: pyfaup
Faup is a URL parser, this is the Python library.ExamplesExample 1: Parse a URLfrompyfaup.faupimportFaupf=Faup()f.decode("https://pypi.org/project/pyfaup")print("TLD:"+f.get_tld())This will extract all the TLDs. Replace get_tld() with get() to grab all the parsed items.Example 2: MultithreadingReading from a file one url per line in multiple threads (example contributed by Sebastien Larinier):frompyfaup.faupimportFaupimportthreadingNUM_THREADS=5URLS_TO_READ="your_urls_file.txt"classThreadFaup(threading.Thread):def__init__(self,list_url,f):self.list_url=list_urlthreading.Thread.__init__(self)self.f=fdefrun(self):forurlinself.list_url:self.f.decode(url)printself.f.get()withopen(URLS_TO_READ,'r')asfd:forlineinfd:line=line.replace('\r\n','')list_url.append(line)f=Faup()foriinrange(0,NUM_THREADS):t=ThreadFaup(list_url,f)t.start()
Package: pyfaust-openblaso
The FAµST toolbox provides algorithms and data structures to decompose a given dense matrix into a product of sparse matrices in order to reduce its computational complexity (both for storage and manipulation).FaµST can be used to:speed up / reduce the memory footprint of iterative algorithms commonly used for solving high dimensional linear inverse problems,learn dictionaries with an intrinsically efficient implementation,compute (approximate) fast Fourier transforms on graphs.
Package: pyfaust-torch
The FAµST toolbox provides algorithms and data structures to decompose a given dense matrix into a product of sparse matrices in order to reduce its computational complexity (both for storage and manipulation).FaµST can be used to:speed up / reduce the memory footprint of iterative algorithms commonly used for solving high dimensional linear inverse problems,learn dictionaries with an intrinsically efficient implementation,compute (approximate) fast Fourier transforms on graphs.
Package: pyfav
pyfav is a simple Python library that helps you get afaviconfor a
supplied URL.Favicons can be annoying to track down because they’re commonly located
in a handful of different places. pyfav removes the annoyance by
handling the details for you – you supply a URL and pyfav will give you
the favicon.Exchange a URL for a favicon on diskThe simplest way to get started is to use the download_favicon
function,from pyfav import download_favicon

favicon_saved_at = download_favicon('https://www.python.org/')You should now see the favicon in your /tmp directory. If you want to
control where the favicon gets written to disk,from pyfav import download_favicon

mkdir /tmp/favicon-downloads

favicon_saved_at = download_favicon('https://www.python.org/', \
    file_prefix='python.org-', target_dir='/tmp/favicon-downloads')Get the locationIf you’d prefer to handle the writing piece, use the get_favicon_url
function,from pyfav import download_favicon

favicon_url = get_favicon_url('https://www.python.org/')InstallThe easiest to get pyfav is through PIPpip install pyfavLicensepyfav is open source and freely avaiable under theMIT License
Package: pyfav2
pyfav2-----pyfav2 is a simple Python library that helps you get a `favicon`_ for asupplied URL.Favicons can be annoying to track down because they’re commonly locatedin a handful of different places. pyfav2 removes the annoyance byhandling the details for you – you supply a URL and pyfav2 will give youthe favicon.Exchange a URL for a favicon on disk~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~The simplest way to get started is to use the download\_faviconfunction,::from pyfav2 import download_faviconfavicon_saved_at = download_favicon('https://www.python.org/')You should now see the favicon in your /tmp directory. If you want tocontrol where the favicon gets written to disk,::from pyfav2 import download_faviconmkdir /tmp/favicon-downloadsfavicon_saved_at = download_favicon('https://www.python.org/', \target_dir='/tmp/favicon-downloads')Get the location~~~~~~~~~~~~~~~~If you’d prefer to handle the writing piece, use the get\_favicon\_urlfunction,::from pyfav2 import get_favicon_urlfavicon_url = get_favicon_url('https://www.python.org/')Install~~~~~~~The easiest to get pyfav2 is through PIP::pip install pyfav2License~~~~~~~pyfav2 is open source and freely avaiable under the `MIT License`_.. _favicon: http://en.wikipedia.org/wiki/Favicon.. _MIT License: http://opensource.org/licenses/MIT
Package: pyfavicon
pyfaviconAsync favicon fetcherRequirementsPython 3.7aiohttpbeautifulsoup4PillowHow to usefrompyfaviconimportFaviconimportasynciofrompathlibimportPathasyncdefdownload_favicon():favicon_manager=Favicon(download_dir=Path('.'),headers={'DNT':'1'})icons=awaitfavicon_manager.from_url('https://gitlab.com')# icons = await favicon_manager.from_file('my_html_file.html')# icons = await avicon_manager.from_html('<link rel="icon" href="favicon.png">')foriconinicons:# We use PIL to get the exact size of images.print("Favicon from :{}".format(icon.link))print("Favicon export name :{}".format(icon.path))print("Favicon size :{}".format(icon.size))print("Favicon format:{}".format(icon.extension))# Select the largest iconlargest_icon=icons.get_largest()awaitlargest_icon.save()asyncio.run(download_favicon())ExamplesYou can find a bunch of usage examples here:Gtk Application
Package: pyfawkes
PyFawkesPyFawkes is a mutation testing too.
It supportspy.testtests in Python 3.5+.From article at Wikipedia:Mutation testingevaluates the quality of software tests.
Mutation testing involves modifying a program's source code or byte code in small ways.
A test suite that does not detect and reject the mutated code is considered defective.QuickstartPyFawkes is available onPyPI, so it can be installed via:$ pip install pyfawkes --user --upgradeRun PyFawkes specifying the location of your code and its unit tests:$ python -m pyfawkes --source <PATH TO SOURCE> --test <PATH TO UNIT TESTS>
Package: pyfax
pyfax is a Python library that can be used to generate teletext tti files.
These files can be used byvbit2to
generate teletext feeds.DocumentationDocumentation of pyfax can be found onRead the Docs.InstallationThe latest release of pyfax can be installed by running:pip3installpyfaxAlternatively, it can be installed by cloning this repo then running:pip3install.Testing & coverage
Package: py-fbchat
Facebook Chat (Messenger) for Python.
This project was inspired byfacebook-chat-api.No XMPP or API key is needed. Just use your email and password.Go toRead the Docsto see the full documentation,
or jump right into the code by viewing theexamplesInstallation:
.. code-block:$ git clone https://github.com/SneznyKocur/fbchat.git
$ pip install fbchatMaintainerMads Marquart /@madsmtmTaehoon Kim /@carpedm20