semvec/pypi-packages huggingface dataset:
simplepycuda 0.0.1
A simple wrapper for CUDA functions in Python.
License: MIT

The library cudapp is the basis of SimplePyCuda, a simple wrapper for CUDA functions in Python.
The idea is to workaround the issues regarding Context in old CUDA versions, that persist on PyCuda.

Usage:

"make [all]" will build the lib cudapp.so

"make run" will execute "testSimplePyCuda.py", using library "simplepycuda.py".

==========================

In Python:

```python
import ctypes
import numpy
from simplepycuda import SimplePyCuda, SimpleSourceModule, grid, block

def classicExample(cuda):
	a = numpy.random.randn(4,4)
	a = a.astype(numpy.float32)
	print a
	a_gpu = cuda.mem_alloc(a.nbytes)
	cuda.memcpy_htod(a_gpu, a)
	mod = SimpleSourceModule("""
          #include<stdio.h>
          __global__ void doublify ( float* a )
	  {
	    int idx = threadIdx.x + threadIdx.y*4;
	    a[idx] *= 2;
            //printf("oi=%d\\n",idx);
	  }
	""")
	func = mod.get_function("doublify")
	# TODO: this next line will be made automatically in get_function method... just need a few more time :)
	func.argtypes = [ctypes.c_void_p, grid, block, ctypes.c_ulong, ctypes.c_ulong]
	func(a_gpu, grid(1,1), block(4,4,1), 0, 0)
	cuda.memcpy_dtoh(a, a_gpu)
	cuda.deviceSynchronize()
	print a
	cuda.free(a_gpu) # this is not necessary in PyCUDA
	print "Finished"

def main():
	cuda = SimplePyCuda()

	classicExample(cuda)	
	return 0
```

[MIT License](LICENSE) - Igor Machado Coelho and Rodolfo Pereira Araujo (2017)
arxiv-cli 0.1.6
A Python wrapper for the arXiv API.
License: MIT

===========
 arXiv-CLI
===========

.. image:: https://travis-ci.org/jacquerie/arxiv-cli.svg?branch=master
    :target: https://travis-ci.org/jacquerie/arxiv-cli

.. image:: https://coveralls.io/repos/github/jacquerie/arxiv-cli/badge.svg?branch=master
    :target: https://coveralls.io/github/jacquerie/arxiv-cli?branch=master


About
=====

A Python wrapper for the arXiv API.


Install
=======

.. code-block:: console

    $ pip install arxiv-cli


Usage
=====

You can use ``arXiv-CLI`` as a CLI to navigate arXiv or as a library to query
its API.

CLI
---

Currently ``arXiv-CLI`` implements three subcommands:

.. code-block:: console

    $ arxiv download [-t/--timeout seconds] IDS
    $ arxiv fetch [-t/--timeout seconds] IDS
    $ arxiv find [-i/--ids, -t/--timeout seconds] QUERY

The first two commands accept a list of arXiv ids and, respectively, download
the corresponding PDFs or display their metadata in JSON format.

The third command runs a query against arXiv and prints the metadata in JSON
format of the records that match. Adding the ``-i/--ids`` flag will return only
their ids.

Adding the ``-t/--timeout seconds`` option will sleep for that amount of
seconds between successive requests to the arXiv API.

Note that the previous commands can be chained, therefore running

.. code-block:: console

    $ arxiv download $(arxiv find --ids QUERY)

will download all papers that match ``QUERY``, while

.. code-block:: console

    $ arxiv fetch $(arxiv find --ids QUERY)

will fetch all their metadata.

API
---

The previous CLI is built on top of a Python library that can be used on its
own to query arXiv's API. For example:

.. code-block:: python

    >>> from arxiv_cli import Client
    >>> client = Client()
    >>> client.download([IDS])

will achieve the same effect as

.. code-block:: console

    $ arxiv download IDS


Author
======

Jacopo Notarstefano (`@Jaconotar`_)


License
=======

MIT


.. _`@Jaconotar`: https://twitter.com/Jaconotar