Saravanan666/pypi-org huggingface dataset:
Package: array-as-vcf
Array As VCFarray-as-vcfis a small library and tool to
convert common SNP array formats to VCF format.There are four currently supported array formats:Affymetrix (TSV export)Cytoscan HD Array (TSV export)Lumi 317k array (TSV export)Lumi 370k array (TSV export)Multi-sample OpenArray (TSV export)Binary formats are not (yet) supported.RequirementsPython 3.6requestsCLI usageThearray-as-vcftool will convert array files to VCF format.
It will auto-detect the type of array file, and throw an error if it can't
determine it.The generated VCF file is printed to stdout.A sample name to be used in the VCF filemustbe supplied.The REF and ALT alleles will be queried from Ensembl if nolookup-tableis
supplied. This requires a working internet connection, and can be quite slow
due the amount of HTTP requests that are necessary.When supplied withlookup-table, no requests are made for the rsIDs
which exist within the lookup table. The lookup table is a JSON file,
containing a single large object of shape:{"rs0":"{ref_allele}:{alt_alleles}:{ref_is_minor_allele}"}E.g.{"rs1000003":"A:G:F"}If you have never runarray-as-vcfbefore , you can runarray-as-vcfsans lookup table
anddumpthe generated internal lookup table to a file for next iterations.Usage:array-as-vcf[OPTIONS]Options:-p,--pathPATHPathtoarrayfile[required]-b,--build[GRCh37|GRCh38]-s,--sample-nameTEXTNameofsampleinVCFfile-c,--chr-prefixTEXTOptionalprefixtochromosomenames-l,--lookup-tablePATHOptionalpathtoexistinglookuptableforrsIDs.-d,--dumpPATHOptionalpathtowritegeneratedlookuptable--helpShowthismessageandexit.
Package: arraybuffer
arraybufferisMIT Licensedpython library.
It implements typesarraybufferandarraybuffer_dscfor efficient creation of typed memoryviews and multidimensional arrays.arraybufferis buffer for multidimensional arrays and typed memoryviews.arraybuffer_dscis a type for desciption of buffers for creation of multidimensional arrays and typed memoryviews.Main repository forarraybufferis onbitbucket.There areexampleandbenchmark.
Package: arrayclasses
arrayclassA small@dataclass-like decorator for python classes. The class will store its values in a single contiguousnumpyarray. It can also be converted to and from plain numpy arrays.Installationpoetry add dataclassesorpip install dataclassesUsagedefsimulate(steps:int,fs:float)->np.ndarray:# Define the state class.# Imagine we had 20 variables here...@arrayclasses.arrayclassclassState:x:floaty:floatdefstep(t,xy):# normally, this would be `x, y, ... = xy`s=arrayclasses.from_array(State,xy)a=1-np.sqrt(s.x**2+s.y**2)w=2*np.pi/(1*fs)# normally, this would be `return (..., ...)`returnState(x=a*s.x-w*s.y,y=a*s.y+w*s.x,)solved=integrate.solve_ivp(fun=step,y0=State(-1,0),t_span=(0,steps),method="RK45")returnsolved.yFeatures@arrayclasses.arrayclass(dtype=object)  # You can coerce the array dtype manually
class Object:
    x: int  # A single value.
    y: tuple[int, int]  # Will yield np.ndarray windows, not tuples. Should be np.ndarray[float, ...] but requires PEP 646 to work.

a = Object(x=5, y=(2, 3))
print(len(a))  # 3
print(tuple(a))  # (5, 2, 3)Why would I need this?You may be forced, or inclined, to use numpy arrays in some situations where classes would be more appropriate.An example might bescipy.integrate- You are working with an array of numbers that really wants to be a class.Packing and unpacking tuples is a common workaround. However, when you approach 10 or 20 variables, this gets quite messy fast. Now, you might prefer to use an@arrayclassto get nicer code that plays well with your IDE.
Package: arraycontext
GPU arrays? Deferred-evaluation arrays? Just plainnumpyarrays? You’d like your
code to work with all of them? No problem! Comes with pre-made array context
implementations for:numpyPyOpenCLPytato(for lazy/deferred evaluation)DebuggingProfilingarraycontextstarted life as an array abstraction for use with themeshmodeunstrucuted discretization
package.Distributed under the MIT license.LinksSource code on GithubDocumentation
Package: arraycontract
ArrayContractfromarraycontractimportshape,_importtorch@shape(x=(_,'N'),y=('N',_))defmatrix_dot(x,y):returnx@ymatrix_dot(torch.rand(3,4),torch.rand(4,5))# OKmatrix_dot(torch.rand(3,4),torch.rand(3,5))# raise AssertionErrorfromarraycontractimportshape,_importtorchfromtorchimportnnlinear=nn.Linear(3,4)@shape((...,3))defforward_linear(x):"""requires x.shape[-1] == 3"""returnlinear(x)forward_linear(torch.rand(4,5,3))# OKforward_linear(torch.rand(4,4))# raise AssertionErrorfromarraycontractimportdtypefromarraycontractimportndimimporttorch@ndim(x=3,y=4)defndim_contract(x,y):print("requires x.ndim == 3 and y.ndim == 4")@dtype(x=torch.long)defdtype_contract(x):print("requires x.dtype == torch.long")fromarraycontractimportTriggerfromarraycontractimportdtypeimporttorchTrigger.dtype_check_trigger=False@dtype(x=torch.long)defdtype_contract(x):print("not requires x.dtype == torch.long")dtype_contract(torch.rand(3,4).float())# OK
Package: arraydb
ArrayDbA database where data is stored in a array of dictsFeaturesInsert, Update, DeleteFilter dataChange/Add columns in databaseDemofromarraydbimportArrayDbmembers=ArrayDb(["username","age","gender"],[])# insert datamembers.insert({"username":"John","age":22,"gender":"Male"})members.insert({"username":"Ayesha","age":20,"gender":"Female"})# Update specific datamembers.update(where={"username":"John"},data={"age":21})# Even bettermembers.update(where={"age":{"gt":20}},# Update all rows where age is greater than 20data={"age":21})# gt, lt, gte, lte, not, contains, in, startswith, endswith -> More coming soon
Package: arrayfield_tagsinput
django-arrayfield-tagsinput===========================.. image:: https://travis-ci.org/RouteAtlas/django-arrayfield-tagsinput.png?branch=master:target: https://travis-ci.org/RouteAtlas/django-arrayfield-tagsinput.. image:: https://coveralls.io/repos/RouteAtlas/django-arrayfield-tagsinput/badge.png?branch=master:target: https://coveralls.io/r/RouteAtlas/django-arrayfield-tagsinput?branch=master.. image:: https://requires.io/github/RouteAtlas/django-arrayfield-tagsinput/requirements.png?branch=master:target: https://requires.io/github/RouteAtlas/django-arrayfield-tagsinput/requirements/?branch=master:alt: Requirements Status.. image:: https://landscape.io/github/RouteAtlas/django-arrayfield-tagsinput/master/landscape.png:target: https://landscape.io/github/RouteAtlas/django-arrayfield-tagsinput/master:alt: Code Health.. image:: https://d2weczhvl823v0.cloudfront.net/RouteAtlas/django-arrayfield-tagsinput/trend.png:alt: Bitdeli badge:target: https://bitdeli.com/freeWelcome to the documentation for django-arrayfield-tagsinput!Django Tags Input is a module that gives you a modified version of the `Xoxco jQuery Tags Input`_ library within Django,for use with `djorm-pgarray`_It's inspired on `django-tagsinput`_ module from `@WoLpH`_ but for ArrayField forpostgres.We created this for `RouteAtlas`_ you should check also `our github page`_ :)... image:: https://s3.amazonaws.com/rabackoffice/vagrantbox/django-arrayfield-tagsinput.png:alt: You get the idea huh?.. _Xoxco jQuery Tags Input: http://xoxco.com/projects/code/tagsinput/.. _djorm-pgarray: https://github.com/niwibe/djorm-ext-pgarray.. _django-tagsinput: https://github.com/WoLpH/django-tags-input.. _WoLpH: https://github.com/WoLpH.. _RouteAtlas: http://routeatlas.com.. _our github page: http://github.com/RouteAtlasRunning the Tests-----------------You can run the tests with via::python setup.py testor::python runtests.pyActually we don't have much tests here, but they will be :)
Package: arrayfiles
ArrayFiles: Array-like File Access in PythonArrayFiles allows you to access an arbitrary line of a text file.If your interest is in using arrayfiles for Deep Learning, please checkLineFlow.InstallationTo install arrayfiles:pipinstallarrayfilesUsageimportarrayfilesdata=arrayfiles.read_text('/path/to/text')data[0]# Access the first line of your textdata[-1]# Access the last line of your textdata[10:100]# Access the 10th line to the 100 the line of your text
Package: arrayhascher
Fast hash in 2D Arrays (Numpy/Pandas/lists/tuples)pip install arrayhascherTested against Windows / Python 3.11 / AnacondaCython (and a C/C++ compiler) must be installedComputesahashvalueforeachcolumninaDataFrame/NumPyArray/list/tuple.Parameters:-df(numpy.ndarray,pandas.Series,pandas.DataFrame,list,tuple):2D(!)Inputdatatocomputehashvaluesfor.-fail_convert_to_string(bool,optional):IfTrue,triestoconvertnon-stringcolumnstostringsafterfailedhashing.-Theoriginaldatawon't change!IfFalse,raisesanexceptionifconversionfails.DefaultisTrue.-whole_result(bool,optional):IfTrue,returnsanarrayofhashvaluesforeachelementintheDataFrame/NumPyArray/list/tuple.IfFalse,returnsacondensedarrayofhashvaluesforeachcolumn.DefaultisFalse.Returns:-numpy.ndarray:If`whole_result`isFalse,returnsacondensedarrayofhashvaluesforeachcolumn.If`whole_result`isTrue,returnsanarrayofhashvaluesforeachelementintheDataFrame.Example:importpandasaspdfromarrayhascherimportget_hash_columndeftest_drop_duplicates(df,hashdata):# Example of how to delete duplicatesreturndf.assign(__XXXX___DELETE____=hashdata).drop_duplicates(subset='__XXXX___DELETE____').drop(columns='__XXXX___DELETE____')# With pandas ----------------------------------------------------------------df=pd.read_csv("https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv")df=pd.concat([dffor_inrange(10000)],ignore_index=True)df=df.sample(len(df))hashdata=get_hash_column(df,fail_convert_to_string=True,whole_result=False)# Out[3]:# array([-4123592378399267822,   -20629003135630820,  1205215161148196795,#        ...,  4571993557129865534, -5454081294880889185,#         2672790383060839465], dtype=int64)# %timeit test_drop_duplicates(df,hashdata)# %timeit df.drop_duplicates()# 947 ms ± 18.1 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)# 2.94 s ± 10.1 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)# Numpy only  ----------------------------------------------------------------hashdata=get_hash_column(df.to_numpy(),fail_convert_to_string=True,whole_result=False)print(hashdata)# # array([-4123592378399267822,   -20629003135630820,  1205215161148196795,# #        ...,  4571993557129865534, -5454081294880889185,# #         2672790383060839465], dtype=int64)# Works also with lists  ------------------------------------------------------get_hash_column(df[:100].to_numpy().tolist(),fail_convert_to_string=True,whole_result=False)# array([-5436153420663104440, -1384246600780856199,   177114776690388363,#          788413506175135724,  1442743010667139722, -6386366738900951630,#        -8610361015858259700,  3995349003546064044,  3627302932646306514,#         3448626572271213155, -1555175565302024830,  3265835764424924148, ....# And tuples  ----------------------------------------------------------------tuple(map(tuple,df[:100].to_numpy().tolist()))
Package: arrayish
A library for downstream compatibility of Numpy-compatible arrays.UsageFor an alternative array implementationimportnumpyasnpimportarrayishasaiclassCustomArray(object):"""Your custom ``ndarray`` compatible implementation."""passdefdot(a,b,out=None)""" Your custom implementation of ``np.dot``. """pass# Between your own arraysai.dot.add((CustomArray,CustomArray),dot)# With Numpy Arrays, if you'd like. Can also pass another functionai.dot.add((np.ndarray,CustomArray),dot)ai.dot.add((CustomArray,np.ndarray),dot)For a downstream library willing to support alternative arraysimportarrayishasaiimportnumpyasnp# Instead of this:np.dot(a,b)# Do this:ai.dot(a,b)
Package: arraylias
arrayliasThis repo is still in the early stages of development, there will be breaking API changesArraylias is an open-source Python library providing single-dispatching tools centred around the
construction of an aliased module. Aliased modules are built by initially registering "libraries"
consisting of a collection of types, then registering different versions of a given function in the
aliased module for each underlying type library. When using the aliased module, function calls are
automatically dispatched to version of the function for the correct library based on the type of the
first argument.Arraylias contains default pre-built aliased versions of bothNumPyandScipy, with additional
registration of theJAXandTensorflowarray libraries. This enables writingNumPyandScipylike code that
will execute onNumPy,JAX, andTensorflowarray objects
as if it had been written in the respective native libraries. If necessary, these default aliases
can be further extended to fit the needs of the application.Reference documentation may be foundhere, includingtutorials,user guide, andAPI reference.InstallationArraylias is installed by usingpip:pip install arrayliasContribution GuidelinesIf you'd like to contribute to Arraylias, please take a look at ourcontribution guidelines. This project adheres to Qiskit'scode of conduct. By participating, you are expected to uphold this code.We useGitHub issuesfor tracking
requests and bugs. For questions that are more suited for a forum we use the Qiskit tag in theStack Exchange.Authors and CitationLicenseApache License 2.0
Package: arraylib
arraylib— Library for array computing in PythonThearraylibpackage aims to provide a standardised interface to array
implementations such asNumPy,JAX,PyTorch, etc.The standard array functions are modelled on theArray API, and should be
compatible with it.The goal of thearraylibpackage is to extend the standard with many of the
special functions which are necessary for scientific computing.UsageInstall thearraylibpackage and an array implementation, for exampleNumPy.  Load both, then obtain anarraylibnamespace by binding
thenumpyarray namespace:>>>importarraylib>>>importnumpyasnp>>>xp=arraylib.bind(np)>>>xp.log<ufunc'log'>>>>xp.logisnp.logTrue>>>xp.sinpi(2.5)1.0
Package: arraylib-solve
arraylib-solveIntroductionarraylib-solveis a tool to deconvolve combinatorially pooled arrayed random mutagenesis libraries (e.g. by transposon mutagenesis). In a typical experiment generating arrayed mutagenesis libraries, first a pooled version of the library is created and arrayed on a grid of well plates. To infer the identities of each mutant on the well plate, wells are pooled in combinatorial manner such that each mutant appears in a unique combination of pools. The pools are then sequenced using NGS and sequenced reads are stored in individual fastq files per pool.arraylib-solvedeconvolves the pools and returns summaries stating the identity and location of each mutant on the original well grid. The package is based on the approach described in[1].InstallationTo installarraylibfirst createPython 3.8environment e.g. byconda create --name arraylib-env python=3.8
conda activate arraylib-envand install the package usingpip install arraylib-solvearraylib-solveuses bowtie2[2]to align reads to the reference genome. Please ensure that bowtie2 is installed in your environment by running:conda install -c bioconda bowtie2How to runarraylibA detailed manual how to runarraylibinteractively and from the command line can be found herehttps://tcapraz.github.io/arraylib/index.html.References[1]Baym, M., Shaket, L., Anzai, I.A., Adesina, O. and Barstow, B., 2016. Rapid construction of a whole-genome transposon insertion collection for Shewanella oneidensis by Knockout Sudoku. Nature communications, 7(1), p.13270.[2]Langmead, B. and Salzberg, S.L., 2012. Fast gapped-read alignment with Bowtie 2. Nature methods, 9(4), pp.357-359.
Package: array-lstm
ArrayLSTMThis code was implemented as part of the IEEE S&PDeepCASE[1] paper.
We provide a Pytorch implementation ofRecurrent Memory Array Structuresby Kamil M Rocki.
We ask people tociteboth works when using the software for academic research papers.IntroductionThe following report introduces ideas augmenting standard Long Short Term Memory (LSTM) architecture with multiple memory cells per hidden unit in order to improve its generalization capabilities.
It considers both deterministic and stochastic variants of memory operation.
It is shown that the nondeterministic Array-LSTM approach improves state-of-the-art performance on character level text prediction achieving 1.402 BPC on enwik8 dataset.
Furthermore, this report estabilishes baseline neural-based results of 1.12 BPC and 1.19 BPC for enwik9 and enwik10 datasets respectively.DocumentationWe provide an extensive documentation including installation instructions and reference atarraylstm.readthedocs.ioReferences[1]van Ede, T., Aghakhani, H., Spahn, N., Bortolameotti, R., Cova, M., Continella, A., van Steen, M., Peter, A., Kruegel, C. & Vigna, G. (2022, May). DeepCASE: Semi-Supervised Contextual Analysis of Security Events. In 2022 Proceedings of the IEEE Symposium on Security and Privacy (S&P). IEEE.[2]Rocki, K.M. (2016). Recurrent memory array structures. In arXiv preprint arXiv:1607.03085.Bibtex@inproceedings{vanede2020deepcase,
  title={{DeepCASE: Semi-Supervised Contextual Analysis of Security Events}},
  author={van Ede, Thijs and Aghakhani, Hojjat and Spahn, Noah and Bortolameotti, Riccardo and Cova, Marco and Continella, Andrea and van Steen, Maarten and Peter, Andreas and Kruegel, Christopher and Vigna, Giovanni},
  booktitle={Proceedings of the IEEE Symposium on Security and Privacy (S&P)},
  year={2022},
  organization={IEEE}
}@article{rocki2016recurrent,
  title={Recurrent memory array structures},
  author={Rocki, Kamil},
  journal={arXiv preprint arXiv:1607.03085},
  year={2016}
}
Package: arraymap
arraymapThe ArrayMap library provides dictionary-like lookup from NumPy array values to their integer positions. The hash table design and C implementation is based on [AutoMap](https://github.com/brandtbucher/automap), with extensive additions for direct support of NumPy arrays.Code:https://github.com/static-frame/arraymapPackages:https://pypi.org/project/arraymapDependenciesArrayMap requires the following:Python >= 3.8NumPy >= 1.18.5What is New in ArrayMap0.2.2Restored functional wheels for Mac OSx86_64.0.2.1Restored functional wheels for Mac OSx86_64.0.2.0Now building wheels for 3.12.Now building functional wheels for Mac OSarm64/ Apple Silicon.0.1.9Improvements toPyObjectstruct layout and other internal refactoring.0.1.8Corrected issue when usingget_all()andget_any()onFrozenAutoMapbacked by numerical arrays with less than 64-bit element size.0.1.7Corrected issue when creating aFrozenAutoMapfrom adatetime64array that has duplicates.0.1.6Implementedget_all()andget_any()for optimized lookup of multiple keys from arrays or lists.Implemented full support fornp.datetime64arrays.0.1.5Improved handling for Unicode elements that contain non-terminal NULL strings.0.1.4Corrected comparison in lookup of Unicode elements.0.1.3Updatedclassifiers,install_requireswithsetuptools.0.1.2Corrected segfault resulting from initialization from generators that raise.0.1.1Added__version__to module; releasing wheels.0.1.0Initial release with NumPy integration.
Package: arrayqueues
ArrayQueuesThis package provides a drop-in replacement for the Python multiprocessing Queue class which handles transport of large numpy arrays.
It avoids pickling and uses the multiprocessing Array class in the background.
The major difference between this implementation and the normal queue is that the maximal amount of memory that the queue can have must be specified beforehand.Attempting to send an array of a different shape or datatype of the previously inserted one resets the queue.
Only passing of numpy arrays is supported, optionally annotated with timestamps if using the TimestampedArrayQueue class,
but other object types can be supported by extending the class.The package has been tested on Python 3.6/3/7 on Windows and MacOS and Linux with Travis. Python 2.7 is not supported.Usage examplefromarrayqueues.shared_arraysimportArrayQueuefrommultiprocessingimportProcessimportnumpyasnpclassReadProcess(Process):def__init__(self,source_queue):super().__init__()self.source_queue=source_queuedefrun(self):print(self.source_queue.get())if__name__=="__main__":q=ArrayQueue(1)# intitialises an ArrayQueue which can hold 1MB of datan=np.full((5,5),5)q.put(n)r=ReadProcess(q)r.start()r.join()Further examples can be found in tests.
Package: arrayscaler
ARRAY SCALERIntroductionA simple python tool for scaling and rescaling arrays:InstallationTo install Array Scaler, run the following command:pipinstall-e'.[lint, test]'UsageHere is a simple example of how to use Array Scaler:fromarrayscaler.arrayscalerimportScalingHelperimportnumpyasnp# Scaling integers (5) with a lower limit of 0 and upper limit of 10print(ScalingHelper.scale(5,0,10))# Scaling numpy arrayprint(ScalingHelper.scale(np.array([1,3,4,5,3,2]),0,2))# Rescaling the scaled numpy arrayprint(ScalingHelper.rescale(ScalingHelper.scale(np.array([1,3,4,5,3,2]),0,2),0,2))Thescalemethod will scale the input array to a range of 0 to 1. Therescalemethod will rescale the scaled array back to its original range.Contributing
Package: arrayterator
This class creates a buffered iterator for reading big arrays in small
contiguous blocks. The class is useful for objects stored in the
filesystem. It allows iteration over the objectwithoutreading
everything in memory; instead, small blocks are read and iterated over.The class can be used with any object that supports multidimensional
slices, like variables from Scientific.IO.NetCDF, pynetcdf and ndarrays.Changelog:1.0.1 - Implemented the array interface.The latest version is available in aSubversion repository.
Package: arraytex
ArrayTeXConvert anumpy.NDArrayto various LaTeX forms.>>>importnumpyasnp>>>importarraytexasatx>>>A=np.array([[1,2,3],[4,5,6]])>>>print(atx.to_matrix(A))\begin{bmatrix}1&2&3\\4&5&6\\
\end{bmatrix}>>>print(atx.to_tabular(A))\begin{tabular}{ccc}\topruleCol1&Col2&Col3\\
\midrule1&2&3\\4&5&6\\
\bottomrule\end{tabular}Inspired by@josephcslater'sarray_to_latex.FeaturesSupport for matrix environments with different delimiters (bmatrix,pmatrix, etc.).Support for tabular environments.Support for builtin number formats (:.2f,:.3e, etc.).Fully tested and typed.Requirementspython >= 3.8InstallationYou can installArrayTeXviapipfromPyPI:$pipinstallarraytexUsagePlease see thedocsfor more information.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,ArrayTeXis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz'sHypermodern Python Cookiecuttertemplate.
Package: arraytool
arraytool介绍基于numpy的Series及DataFrame数据结构。arraytool包中对应于Series及DataFrame的数据类分别为ArraySeries及ArrayFrame，两者同Series及DataFrame之间可方便地进行转换。安装pipinstallarraytool引入importarraytoolfromarraytoolimportArraySeries,ArrayFrameArraySeries构造>>>s1=ArraySeries(['a','bb','ccc'])>>>s10a1bb2cccdtype:object取值>>>s1[2]'ccc'>>>s1[:2]0a1bbdtype:object使用索引>>>s2=ArraySeries([2,3,4,5],list('aabc'))>>>s2.iloc[:2]a2a3dtype:object>>>s2.loc['a']a2a3dtype:object>>>s2.loc['b']4>>>s2.loc[list('ab')]a2a3b4dtype:objectArrayFrame构造>>>af=ArrayFrame()>>>af['A']=list('abcd')>>>af['B']=range(4)>>>af['C']=[True,True,False,False]>>>afABC0a0True1b1True2c2False3d3False取值>>>af[list('BC')]BC00True11True22False33False使用索引iloc索引>>>af.iloc[0,0]'a'>>>af.iloc[0]ABC0a0Trueloc索引>>>af.set_index(index_cols='A')>>>afABCAaa0Truebb1Truecc2Falsedd3False>>>af.loc['a','C']True>>>af.loc[list('bd'),list('AC')]ACAbbTrueddFalseix索引类R语言data.frame的索引语法，使用pandas弃用的ix索引器。>>>af.ix[2,'B']2>>>af.ix[:2,list('AB')]ABAaa0bb1