-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
59 changed files
with
4,342 additions
and
1,075 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,4 @@ html/ | |
.vscode/ | ||
.ipynb_checkpoints/ | ||
|
||
# workaround for #892 | ||
doc/0-9 | ||
doc/data | ||
doc/xyz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from pyq import q, K | ||
from matplotlib import pyplot as plt | ||
|
||
def read_image(path): | ||
path = str(path).lstrip(':') | ||
x = plt.imread(path) | ||
return K(x) | ||
r = q('{x enlist y}', read_image) | ||
q.set('.im.read', r) | ||
|
||
def save_image(path, image): | ||
path = str(path).lstrip(':') | ||
plt.imsave(path, image) | ||
q.set('.im.save', save_image) | ||
q).q.imsave:{.im.save(x;y)} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,3 +122,5 @@ Install PyQ: | |
.. include:: centos32on64.rst | ||
|
||
.. include:: ubuntu.rst | ||
|
||
.. include:: macos.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
Installing PyQ on macOS | ||
----------------------- | ||
|
||
In order to use PyQ with the free 32-bit kdb+ on macOS, you need a 32-bit version of Python. Out of the box, | ||
macOS Sierra and High Sierra come with a universal version of Python 2.7.10. | ||
|
||
System Python 2 | ||
............... | ||
|
||
Install virtualenv module: | ||
|
||
.. code-block:: bash | ||
$ pip install virtualenv | ||
If your system, does not have pip installed, follow `pip installation guide <https://pip.pypa.io/en/stable/installing/>`_. | ||
|
||
Create and activate virtual environment: | ||
|
||
.. code-block:: bash | ||
$ virtualenv ${HOME}/pyq2 | ||
$ source ${HOME}/pyq2/bin/activate | ||
Download `kdb+ by following this link <https://kx.com/download/>`_ and save the downloaded file as `${HOME}/Downloads/macosx.zip`. | ||
|
||
Install kdb+ and PyQ: | ||
|
||
.. code-block:: bash | ||
(pyq2) $ unzip ${HOME}/Downloads/macosx.zip -d ${VIRTUAL_ENV} | ||
(pyq2) $ pip install -i https://pyq.enlnt.com --no-binary pyq pyq | ||
PyQ is ready and can be launched: | ||
|
||
.. code-block:: bash | ||
(pyq2) $ pyq | ||
Brewing Universal Python | ||
........................ | ||
|
||
If you would like to use latest version of the Python 2.7 or Python 3, you will need to install it | ||
using package manager `Homebrew <https://brew.sh/>`_. | ||
|
||
1. Install Homebrew. Installation instructions are available at `Homebrew's website <https://brew.sh/>`_. | ||
2. Install universal Python 2.7 and Python 3.6: | ||
|
||
.. code-block:: bash | ||
$ brew install --universal sashkab/python/python27 sashkab/python/python36 | ||
3. Install virtualenv package. | ||
|
||
.. code-block:: bash | ||
$ /usr/local/opt/pythonXY/bin/pythonX -mpip install -U virtualenv | ||
`X` is major version of the Python, `Y` - minor, i.e. 2.7 or 3.6. | ||
|
||
4. Create new virtual environment and activate it: | ||
|
||
.. code-block:: bash | ||
$ mkvirtualenv -p /usr/local/opt/pythonXY/bin/pythonX ${HOME}/pyq | ||
$ source ${HOME}/pyq/bin/activate | ||
5. Download `kdb+ by following this link <https://kx.com/download/>`_ and save the downloaded file as `${HOME}/Downloads/macosx.zip`. | ||
|
||
6. Install kdb+ and PyQ: | ||
|
||
.. code-block:: bash | ||
(pyq) $ unzip ${HOME}/Downloads/macosx.zip -d ${VIRTUAL_ENV} | ||
(pyq) $ pip install -i https://pyq.enlnt.com --no-binary pyq pyq | ||
PyQ is ready and can be launched: | ||
|
||
.. code-block:: bash | ||
(pyq2) $ pyq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.