Saravanan666/pypi-org huggingface dataset:
Package: fastemc
FastEMCFast Exponential Monte CarloFastEMC is a method for dimensionality reduction.
FastEMC was designed for datasets with a small number of samples,
and a large number of features.
This version of FastEMC can only handle numerical features,
and binary classification of samples.
FastEMC can be installed using pip$ pip install fastemcIf pip fails on windows try installing scikit-learn manually using conda,
then install fastemc using pip.
You can interact with FastEMC directly using the python module>>> import fastemc
>>> scores, clusters = fastemc.run(features, labels, **kwargs)or through the command line$ python -m fastemc --features features.csv --labels labels.csvThe features.csv and labels.csv files can be generated using pandas, e.g.,>>> labels.to_csv("labels.csv")
>>> features.to_csv("features.csv")where labels and features are pandas dataframes with the same index.FastEMC outputs a list of feature clusters.
The size of each cluster and the number of clusters to collect are optional parameters.
Each cluster is also given a score.
The score is based on k-fold cross-validation of a logistic regression classifier using only features in the cluster.When using FastEMC in published works, please cite the original manuscript
and the author of the software:[1] Stackhouse, C.T.; Rowland, J.R.; Shevin, R.S.; Singh, R.; Gillespie, G.Y.; Willey, C.D. A Novel
Assay for Profiling GBM Cancer Model Heterogeneity and Drug Screening. Cells 2019, 8, 702. (https://www.ncbi.nlm.nih.gov/pubmed/31336733)[2] Rowland, J.R. FastEMC. 2019. (https://github.com/rowland-208/fastemc)
Package: fasten
fasten-python-pluginsThis package provides a template for creating FASTEN plug-ins.
It composed of two abstract classes;FastenPluginandKafkaPlugin.FastenPluginimplements logging methodserrandlog, and specifies
abstract methods abstract methods for declaring the metadata of a FASTEN
plug-in.KafkaPluginimplements the methodsset_consumer,set_producer,create_message,emit_message, andconsume_messages. It also declares
the abstract methodconsumes.
An example is provided in thedemodirectory.Installpip install fastenUsagefromfasten.plugins.kafkaimportKafkaPlugin
Package: fastencode
Fast Encode - Encoding Made EasyWith Fast Encode you can createa single objectthat automatically uses many encoding types.OverviewThe Fast Encode module provides the following features:A single object that abstracts the following encodings: hex, ascii array, string, bytes, binary and long number.Many helper functions that makes changing encoding easier.Getting StartedFirst, you need to download it from pip.pip install fastencodeThen import it to your project.fromfastencodeimportDataObjasDCreating and Using an ObjectFor each encoding type, there is factory function that creates a DataObj object from it.
The factory functions are:fromHex,fromAsc,fromStr,fromBin,fromNumandfromBytes.plaintext=D.fromStr('secret_msg')# This creates a Data object from a plain stringkey=D.fromHex('deadbeef1234')# This creates a Data object from hexPrinting the DataObj will show a lot of different encoding at once:print(f'Output -{plaintext}')Output-Hex:7365637265745f6d7367,Ascii:[115,101,99,114,101,116,95,109,115,103],String:secret_msg,Number:544942432582961455788903Binary:01110011011001010110001101110010011001010111010001011111011011010111001101100111We can get to a specific encoding by using the DataObj fields:hex,asc,str,bytes,binandnum.print(key.bytes)# prints b'\xde\xad\xbe\xef\x124'print(key.asc)# asc is shorthand for ascii, and is a list of integer of the indvidual ascii value of every byte.# prints [222, 173, 190, 239, 18, 52]Simple XOR exmapleLet's take a look at a simple example of XOR-ing 2 strings. We will see how simple it is to do with fastencode.fromfastencodeimportDataObjasDplaintext=D.fromStr('secret_msg')key=D.fromStr('secret_key')xored_integer_value=plaintext.num^key.num# ^ is the python operand for xorprint(xored_integer_value)# prints 398878ciphertext=D.fromNum(xored_integer_value)# Creating another Data object from the result of the xorprint(ciphertext)# prints Hex: 6161e, ascii: [97, 97, 14], String: aa, Number: 398878 Binary: 011000010110000100001110Note: In the example the result is only 3-bytes long - as expected - because the first 7 bytes match and are therefore removed.Forking and Contribution IdeasCreating a genreal function that automatically detects the type of the encoding.Adding base64 and base32 encodings.
Package: fasteners
FastenersCross-platform locks for threads and processes.🔩 Installpip install fasteners🔩 UsageLock for processes has the same API as thethreading.Lockfor threads:importfastenersimportthreadinglock=threading.Lock()# for threadslock=fasteners.InterProcessLock('path/to/lock.file')# for processeswithlock:...# exclusive access# or alternativelylock.acquire()...# exclusive accesslock.release()Reader Writer lock has a similar API, which is the same for threads or processes:importfastenersrw_lock=fasteners.ReaderWriterLock()# for threadsrw_lock=fasteners.InterProcessReaderWriterLock('path/to/lock.file')# for processeswithrw_lock.write_lock():...# write accesswithrw_lock.read_lock():...# read access# or alternativelyrw_lock.acquire_read_lock()...# read accessrw_lock.release_read_lock()rw_lock.acquire_write_lock()...# write accessrw_lock.release_write_lock()🔩 OverviewPython standard library provides a lock for threads (both a reentrant one, and a
non-reentrant one, see below). Fasteners extends this, and provides a lock for
processes, as well as Reader Writer locks for both threads and processes.
Definitions of terms used in this overview can be found in theglossary.The specifics of the locks are as follows:Process locksThefasteners.InterProcessLockusesfcntlon Unix-like systems and
msvc_lockingon Windows.
As a result, if used cross-platform it guarantees an intersection of their features:lockreentrantmandatoryfcntl✘✘_locking✔✔fasteners.InterProcessLock✘✘Thefasteners.InterProcessReaderWriterLockalso uses fcntl on Unix-like systems andLockFileExon Windows. Their
features are as follows:lockreentrantmandatoryupgradablepreferencefcntl✘✘✔readerLockFileEx✔✔✘readerfasteners.InterProcessReaderWriterLock✘✘✘readerThread locksFasteners does not provide a simple thread lock, but for the sake of comparison note that thethreadingmodule
provides both a reentrant and non-reentrant locks:lockreentrantmandatorythreading.Lock✘✘threading.RLock✔✘Thefasteners.ReaderWriterLockat the moment is as follows:lockreentrantmandatoryupgradablepreferencefasteners.ReaderWriterLock✔✘✘writerIf your threads are created by some other means than the standard librarythreadingmodule (for exampleeventlet), you may need to provide the corresponding thread
identification and synchronisation functions to theReaderWriterLock.
Package: fast-ensemble
fast-ensembleScikit-learn-style library for effecient and convenient high level table model ensemblingUsage Example:Initialize StackfromcatboostimportCatBoostRegressorfromlightgbmimportLGBMRegressorfromsklearn.datasetsimportmake_regressionfromsklearn.ensembleimportGradientBoostingRegressorfromsklearn.metricsimportmean_squared_errorfromxgboostimportXGBRegressorfromfast_ensembleimportStackingTransformerfromfast_ensembleimport(CatBoostRegressorWrapper,LGBMRegressorWrapper,XGBRegressorWrapper,)stack_1=StackingTransformer(models=[("catboost",CatBoostRegressorWrapper(CatBoostRegressor(verbose=0),use_best_model=True,early_stopping_rounds=100,),),("xgboost",XGBRegressorWrapper(XGBRegressor(),use_best_model=True,early_stopping_rounds=100),),("lgmb",LGBMRegressorWrapper(LGBMRegressor(),use_best_model=True,early_stopping_rounds=100),),("boosting",GradientBoostingRegressor()),],main_metric=mean_squared_error,regression=True,n_folds=5,random_state=None,shuffle=False,verbose=True,stratified=True,stratification_bins=7)And another onestack_2=StackingTransformer(models=[("Dummy Regressor",DummyRegressor()),],main_metric=mean_squared_error,regression=True,n_folds=5,random_state=None,shuffle=False,verbose=True,stratified=True,stratification_bins=7)Train your stacks (and get transformed dataframes)X,y=make_regression(n_targets=1)X_1_trans=stack_1.fit_transform(X,y)X_2_trans=stack_2.fit_transform(X,y)Want to merge 2 stacks for convenience? Here you go!stack_1.merge(stack_2)stack_1.get_scores(prettified=True)catboostxgboostlgmbboostingDummyRegressor09852.05553523389.7810038872.05547913130.50406321344.359900114259.40742420177.58790812040.54849214088.52960428620.260635216393.25442124267.4096829503.01111815067.34904533377.287468312694.79112416349.9318317188.30132610675.85360829510.019041417505.26471612158.83453310273.5476059621.04111939099.670810
Package: fastent
fastent=======Fastent is a tool designed for creating end to end Custom Named EntityRecognition models. Entities **ARE NOT** limited to the usual predefiendclasses of Person(PER), Location(LOC),Companies/agencies/institutions(ORG) etc etc. Any custom entity that canbe described using a list of words can be created.The package is comprised of several modules that can be used bothsperately for their designated tasks (i.e Anotation, contextualization,etc etc.) or in a combined workflow. Most of the modules offermultilingual support, meaning the datasets and text don't necessarilyrequire English language.Table of contents=================.. raw:: html<!--ts-->-  `Installation <#installation>`__-  `Usage <#usage>`__-  `Dataset generation <#Dataset-Generation>`__-  `Contextualization <#Contextualization>`__-  `Api for model download <#Api>`__-  `Annotation <#Annotation>`__-  `Text utilities <#Text-utilities>`__-  `wordnet utilities <#Wordnet>`__-  `Poincare embeddings wrapper <#Poincare>`__-  `Combinging everyting <#combo>`__-  `Baselines <#tests>`__-  `Dependency <#dependency>`__Installation============This section show the process for installing the package with differentmethodsFrom source~~~~~~~~~~~1) lets start by cloning the package::git clone https://github.com/fastent/fastent.git2) Installing all the relevant packages::pip install -r requirements.txt3) Install couchDBUpdate the current packages::sudo apt-get updateAdding PPA Repository::sudo apt-get install software-properties-commonsudo add-apt-repository ppa:couchdb/stablesudo apt-get updateInstalling CouchDB::sudo apt-get install couchdbOwnership changes (recommended to fix the permission)::sudo chown -R couchdb:couchdb /usr/bin/couchdb /etc/couchdb /usr/share/couchdbOnce this is completed we need to fix the permissions::sudo chmod -R 0770 /usr/bin/couchdb /etc/couchdb /usr/share/couchdbRestarting CouchDB::sudo systemctl restart couchdbcouchDB can now be accessed from http://127.0.0.1:5984/\_utils/4) Now you need to install NLTK dependencies.::>>> import nltk>>> nltk.download()The minimum installation requires to download the *stopwords* corpora.(Feel free to add more if you feel so)From pip~~~~~~~~Coming SoonUsage=====Dataset generation~~~~~~~~~~~~~~~~~~The module includes a possibility to generate a dataset for raw entitywords. Example command looks as this if using source::python dataset_pseudo_generator.py -m en_core_web_lg -s cocaine,heroinIf using the package is installed::from fastent import dataset_pseudo_generatormodel = dataset_pseudo_generator.spacy_initialize(model_name)dataset_pseudo_generator.dataset_generate(model,['cocaine', 'heroin'], 100)
Package: fastentrypoints
Usingentry_pointsin your setup.py makes scripts that start really
slowly because it importspkg_resources, which is a horrible thing
to do if you want your trivial script to execute more or less instantly.
check it out:https://github.com/pypa/setuptools/issues/510importingfastentrypointsin your setup.py file produces scripts
that look like this:# -*- coding: utf-8 -*-importreimportsysfrompackage.moduleimportentry_functionif__name__=='__main__':sys.argv[0]=re.sub(r'(-script\.pyw?|\.exe)?$','',sys.argv[0])sys.exit(entry_function())This is ripped directly from the way wheels do it and is faster than
whatever the heck the normal console scripts do.Note:This bug in setuptools only affects packages built with the normal
setup.py method. Building wheels avoids the problem and has many other
benefits as well.fastentrypointssimply ensures that your user
scripts will not automatically import pkg_resources, no matter how
they are built.UsageTo use fastentrypoints, simply copy fastentrypoints.py into your project
folder in the same directory as setup.py, andimport fastentrypointsin your setup.py file. This monkey-patchessetuptools.command.easy_install.ScriptWriter.get_args()in the
background, which in turn produces simple entry scripts (like the one
above) when you install the package.If you install fastentrypoints as a module, you have thefastepexecutable, which will copy fastentrypoints.py into the working
directory (or into a list of directories you give it as arguments) and
appendinclude fastentrypoints.pyto the MANIFEST.in file, and
add an import statement to setup.py. It is available from PyPI.You can’t really make it a proper dependency because setuptools has to
import it to work, so chicken-egg. right? Luckily, the script is trivial
and will not hurt you project much to copy this 60-line file into the
folder. Be sure to add it to MANIFEST.ini if you want to distributie it
on PyPI.Alternatively, if you don’t want to vendor the code, it is possible to
install it from pypi with easy_install in the setup script:try:importfastentrypointsexceptImportError:fromsetuptools.commandimporteasy_installimportpkg_resourceseasy_install.main(['fastentrypoints'])pkg_resources.require('fastentrypoints')importfastentrypointLet me know if there are places where this doesn’t work well. I’ve
mostly tested it withconsole_scriptsso far, since I don’t write
the other thing.
Package: fastenum
fastenumA roughly 3x faster drop-in replacement of Python'senum.WhyPython'senumtype is a useful building block for creating semantic types and constants in your programs.The problem is, if you're doing millions and millions of enum lookups (even simple expressions likeColor.ORANGE) it's a little bit slow.fastenumis a stripped-down enum implementation that's up to 3.5x faster than the standard library implementation. AtQuantlanewe use it in production code as a drop-in replacement. Read more, including benchmarks, on our blog:A 3x faster enum type for Python.Installationfastenumisavailable on PyPIand you can install it with:pipinstallfastenumorpoetryaddfastenumHow to use itSimply usefastenum.Enuminstead ofenum.Enum:importfastenumclassColor(fastenum.Enum):RED=0BLUE=1GREEN=2assertisinstance(Color.RED,Color)assertColor.REDisColor['RED']assertColor.BLUE!=1assertColor.GREEN.value==2defis_red(c:Color)->bool:returncisColor.REDThere is also a mypy plugin that you'll want to enable inmypy.inito help mypy understandfastenumjust like it understandsenum:[mypy]plugins=fastenum.mypy_plugin:pluginTradeoffs and disadvantagesThere is no support for automatic values, unique value checks, aliases, custom__init__implementations on members,IntEnum,Flag, or the functional API. If you require any of these features it's probably best to just useenum.fastenum's mypy plugin may cause issues with your mypy cache (see above).Running tests & benchmarkspoetryinstall
poetryrunpytestContributingPull requests are welcome!We will accept pull requests adding missing functionalityprovidedthey do not impact basefastenumperformance (it's best to verify that with benchmarks).fastenumwas made byQuantlane <https://quantlane.com>_, a systematic trading firm.
We design, build and run our own stock trading platform.
Package: faster
# Faster - a  python registry manager----![python2.7](https://img.shields.io/badge/python-2.7-green.svg?branch=master)![python3.6](https://img.shields.io/badge/python-3.6-green.svg?branch=master)![platform](https://img.shields.io/conda/pn/conda-forge/python.svg)## InstallationUse pip:```pip install faster```if you want to install from source code , you can download from pypi or simple use:```git clone https://github.com/lfzark/faster```then run:```python setup.py install```## Example```bashfaster auto``````log[+] May cost your few minutes according your network situation.[+] douban      https://pypi.douban.com/simple  0.496495008469[+] pypi        https://pypi.python.org/simple  2.82570886612[+] tencent     https://mirrors.cloud.tencent.com/pypi/simple   0.392730951309[+] tsinghua    https://pypi.tuna.tsinghua.edu.cn/simple        0.177893877029[+] aliyun      https://mirrors.aliyun.com/pypi/simple  <urlopen error [Errno -2] Name or service not known>[+] ustc        https://pypi.mirrors.ustc.edu.cn/simple 0.687880992889[+] BEST PIP : tsinghua  -  https://pypi.tuna.tsinghua.edu.cn/simple ,SPEED: 0.178USE tsinghua - https://pypi.tuna.tsinghua.edu.cn/simple``````faster use douban``````logUSE douban - https://pypi.douban.com/simple```## TODO-  update pip list fron remote
Package: fasterai
FasteraiFeatures•Installation•Tutorials•Community•Citing•Licensefasteraiis a library created to make neural networksmallerandfaster. It essentially relies on common compression techniques for networks such as pruning, knowledge distillation, Lottery Ticket Hypothesis, ...The core feature offasteraiis its Sparsifying capabilities, constructed on 4 main modules:granularity,context,criteria,schedule. Each of these modules is highly customizable, allowing you to change them according to your needs or even to come up with your own !Project DocumentationVisitRead The Docs Project Pageor read following README to know more about usingfasterai.Features1. SparsifyingMake your model sparse (i.e.prune it) according to a:Sparsity:the percentage of weights that will be replaced by 0Granularity:the granularity at which you operate the pruning (removing weights, vectors, kernels, filters)Context:prune either each layer independantly (local pruning) or the whole model (global pruning)Criteria:the criteria used to select the weights to remove (magnitude, movement, ...)Schedule:which schedule you want to use for pruning (one shot, iterative, gradual, ...)This can be achieved by using theSparsifyCallback(sparsity, granularity, context, criteria, schedule)2. PruningOnce your model has useless nodes due to zero-weights, they can be removed to not be a part of the network anymore.This can be achieved by using thePruner()method3. RegularizationInstead of explicitely make your network sparse, let it train towards sparse connections by pushing the weights to be as small as possible.Regularization can be applied to groups of weights, following the same granularities as for sparsifying, i.e.:Granularity:the granularity at which you operate the regularization (weights, vectors, kernels, filters, ...)This can be achieved by using theRegularizationCallback(granularity)4. Knowledge DistillationDistill the knowledge acquired by a big model into a smaller one, by using theKnowledgeDistillationcallback.5. Lottery Ticket HypothesisFind the winning ticket in you network,i.e.the initial subnetwork able to attain at least similar performances than the network as a whole.Quick Start0. Import fasteraifromfasterai.sparse.allimport*1. Create your model with fastailearn=cnn_learner(dls,model)2. Get you Fasterai Callbacksp_cb=SparsifyCallback(sparsity,granularity,context,criteria,schedule)3. Train you model to make it sparse !learn.fit_one_cycle(n_epochs,cbs=sp_cb)Installationpip install git+https://github.com/nathanhubens/fasterai.gitorpip install fasteraiTutorialsGet Started with FasterAICreate your own pruning scheduleFind winning tickets using the Lottery Ticket HypothesisUse Knowledge Distillation to help a student model to reach higher performanceSparsify TransformersMore to come...Join the communityJoinour discord serverto meet other FasterAI users and share your projects!Citing@software{Hubens,
  author       = {Nathan Hubens},
  title        = {fasterai},
  year         = 2022,
  publisher    = {Zenodo},
  version      = {v0.1.6},
  doi          = {10.5281/zenodo.6469868},
  url          = {https://doi.org/10.5281/zenodo.6469868}
}LicenseApache-2.0License.
Package: faster-dj-dev
Faster Django DevelopmentA Simple tool that makes your Django development faster. It allows you to do the tedious Django tasks quickly. You can use it to create an entire Django project in less than 10 seconds plus options to install the popular Django tools in no time.Installationvirtual environment is required!python -m virtualenv venv
source venv/bin/activate
pip install faster_dj_devTo install virtualenvpython -m pip install virtualenvExampleLet's use this tool to create a new Django project with all its configurations related to static, media and templates. Also, we will create a new Django app with it.faster_dj_dev --init --working-directory path_of_the_folder --project-folder name_of_the_django_project_folder
faster_dj_dev --create_project --config-templates --config-static --config-media --initial-migrate --app main --run-serverFeaturesCreate Django project/app in 10 secondsConfiguring static files (settings)Create starter templates for different projects (HTMX, Tailwind, etc...)Configuring media files (settings, urls)Configuring templates (settings)Install and configure Django packages (quick)More ...DocumentationPlease checkDoc
Package: faster-fishers
faster_fishersFast implementation of Fisher's exact test in Rust for Python.Benchmarks show that this version is about 20x faster than scipy's version when running on a large range of inputs and about 10x faster when running on 1 input:---------------------------------------------------------------------------------------------benchmark:2tests---------------------------------------------------------------------------------------------Name(timeinms)MinMaxMeanStdDevMedianIQROutliersOPSRoundsIterations--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------test_benchmark_faster_fischer114.5763(1.0)119.2121(1.0)116.1288(1.0)1.6386(1.0)115.5922(1.0)1.6018(1.0)2;1  8.6111 (1.0)           9           1test_benchmark_scipy2,403.8024(20.98)2,458.8598(20.63)2,423.2871(20.87)21.4687(13.10)2,415.6504(20.90)24.6082(15.36)1;0  0.4127 (0.05)          5           1--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Usage:>>>importnumpyasnp>>>importfaster_fishers>>>lefts,right,two_tails=faster_fishers.exact(np.array([1,3]),np.array([2,5]),np.array([1,4]),np.array([5,50]))>>>leftsarray([0.9166666666666647,0.9963034765672586])>>>rightsarray([0.5833333333333326,0.03970749246529451])>>>two_tailsarray([1.0,0.03970749246529451])DevelopingBuilding with cargoRuncargo buildin the main directory to build the project.Publishing on pypidocker run --rm -v $(pwd):/io ghcr.io/pyo3/maturin publish -u {USER} -p {PASSWORD}Using locallyInstall environment:poetry installAdd environment to current shellpoetry shellInstall faster_fishers in current environment:maturin developCheck that it works:python -c "import faster_fishers; print(dir(faster_fishers))"To try the library in a different environment:1.maturin build --release2.cd folder3.pip install {wheel_path}.whlBenchmarksMake sure to compile in release mode with maturin first:maturin develop --release*python:pytest --benchmark-warmup -m benchmark