{ "info": { "author": "thautwarm", "author_email": "twshere@outlook.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython" ], "description": ".. image:: https://img.shields.io/pypi/v/idris-python.svg\n :target: https://pypi.python.org/pypi/idris-python\n\nidris-cam\n==============\n\nFinally, we reached dependent types in Python community.\n\nInstall\n================\n\n\n.. code ::\n\n pip install idris-python\n\n\nUsage\n====================\n\n\n- Command: Idris-Python\n\n.. image:: https://raw.githubusercontent.com/thautwarm/idris-python/master/cmd-idris-python.png\n :width: 90%\n :align: center\n\n\n- Command: Run-Cam\n\n.. image:: https://raw.githubusercontent.com/thautwarm/idris-python/master/cmd-run-cam.png\n :width: 90%\n :align: center\n\n## Example\n\nQuite verbose for the lack of encapsulations, not a good example but I'm so busy..\n\nFollowing example just revealed that I've alredy implmented such a big task.\n\n.. code-block :: idris\n\n module Main\n import Cam.FFI\n import Cam.IO\n import Cam.Data.Collections\n import Cam.Data.FCollections\n import Cam.Data.Compat\n import Data.Vect\n import Data.HVect\n\n %access export\n\n main : IO ()\n main = do\n putStrLn $ show vect\n sklearn <- camImport $ TheModule \"sklearn.datasets\"\n load_iris <- camImportFrom sklearn \"load_iris\"\n iris <- unsafeCall load_iris $ zero_ary\n data' <- getattr iris \"data\"\n tag <- getattr iris \"target\"\n rfc <- let ensemble = camImport $ TheModule \"sklearn.ensemble\" in\n camImportFrom !ensemble \"RandomForestClassifier\"\n clf <- unsafeCall rfc zero_ary\n fit <- getattr clf \"fit\"\n unsafeCall fit . unsafe $ the (FList _) [data', tag]\n score <- getattr clf \"score\"\n value <- unsafeCall score . unsafe $ the (FList _) [data', tag] -- overfit\n println value\n where\n vect : HVect [Int]\n vect = the (HVect _) [1]\n\n zero_ary : Unsafe\n zero_ary = unsafe $ the (FList Unsafe) $ []\n\n getattr' : IO Unsafe\n getattr' = do\n b <- camImport $ TheModule \"builtins\"\n camImportFrom b \"getattr\"\n\n getattr : Unsafe -> String -> IO Unsafe\n getattr obj s =\n let s = unsafe . the (Boxed String) $ s in\n let args = unsafe . the (FHVect [_, _]) $ [obj, toText s] in\n unsafeCall !getattr' args\n\n\nYou might got\n\n.. code ::\n\n [1]\n 0.99\n\nIf you run it as a file with command ``idris-python``.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/thautwarm/idris-python", "keywords": "Idris,Dependent Types,Type Safety,Compiler", "license": "bsd3", "maintainer": "", "maintainer_email": "", "name": "idris-python", "package_url": "https://pypi.org/project/idris-python/", "platform": "any", "project_url": "https://pypi.org/project/idris-python/", "project_urls": { "Homepage": "https://github.com/thautwarm/idris-python" }, "release_url": "https://pypi.org/project/idris-python/0.25/", "requires_dist": [ "wisepy2", "toml" ], "requires_python": "", "summary": "Loader for a kind of Idris IR.", "version": "0.25" }, "last_serial": 5185435, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "0b051f0bb6f6b88348670b82c58b8401", "sha256": "b551c9b3b6fb6586f2eeca1b1bb165f3e20fb099dd6bcdbf1119c45e8fb4107b" }, "downloads": -1, "filename": "idris_python-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "0b051f0bb6f6b88348670b82c58b8401", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11382, "upload_time": "2019-04-25T00:09:58", "url": "https://files.pythonhosted.org/packages/28/b5/da29038dcc50c25cd526e3e5507e849aa29d51489f2dfbf849ba1924bf12/idris_python-0.2-py3-none-any.whl" } ], "0.25": [ { "comment_text": "", "digests": { "md5": "8b0fb42d8bf9e34ff8276f7674020bcd", "sha256": "dd5b1d9a4fa571b4143dbba66db1635a6d1582e80376394fc781e52d467dedcc" }, "downloads": -1, "filename": "idris_python-0.25-py3-none-any.whl", "has_sig": false, "md5_digest": "8b0fb42d8bf9e34ff8276f7674020bcd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11465, "upload_time": "2019-04-25T00:34:12", "url": "https://files.pythonhosted.org/packages/ec/3d/53b6930fec3aec67d5d3a0a6fa83b616f66c3b6774354fb55495c95eea25/idris_python-0.25-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8b0fb42d8bf9e34ff8276f7674020bcd", "sha256": "dd5b1d9a4fa571b4143dbba66db1635a6d1582e80376394fc781e52d467dedcc" }, "downloads": -1, "filename": "idris_python-0.25-py3-none-any.whl", "has_sig": false, "md5_digest": "8b0fb42d8bf9e34ff8276f7674020bcd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11465, "upload_time": "2019-04-25T00:34:12", "url": "https://files.pythonhosted.org/packages/ec/3d/53b6930fec3aec67d5d3a0a6fa83b616f66c3b6774354fb55495c95eea25/idris_python-0.25-py3-none-any.whl" } ] }