{ "info": { "author": "Liokta Bagaskara", "author_email": "shiroasasin@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Lintang\n\n[![Build Status](https://travis-ci.org/joemccann/dillinger.svg?branch=master)](https://pypi.org/project/lintang/)\n\nThis module is personally developed as a documentation of all functions or methods or classes that are most often used by it's developers.\n\n### Release\n\n - Date convertion from Gregorian to Javanese-Hijri Calendar\n - Calculate distance with Heversine formula\n - Factorial numbers\n - Permutation and combination\n - Read data from .csv file\n\n### Installation\n\nLintang requires [Python 3.6](https://www.python.org/download/releases/3.0/) +.\n\nInstall the module with pip.\n\n```sh\n$ pip install lintang\n```\n\n##\n### Documentation:\n\n##### Haversine Formula\n\n![enter image description here](https://upload.wikimedia.org/wikipedia/commons/3/38/Law-of-haversines.svg)\n\nThe haversine formula determines the great-circle distance between two points on a sphere given their longitudes and latitudes. Important in navigation, it is a special case of a more general formula in spherical trigonometry, the law of haversines, that relates the sides and angles of spherical triangles.\n\nThe first table of haversines in English was published by James Andrew in 1805, but Florian Cajori credits an earlier use by Jos\u00e9 de Mendoza y R\u00edos in 1801. The term haversine was coined in 1835 by James Inman.\n\nThese names follow from the fact that they are customarily written in terms of the haversine function, given by haversin(\u03b8) = sin2(\n\u03b8\n/\n2\n). The formulas could equally be written in terms of any multiple of the haversine, such as the older versine function (twice the haversine). Prior to the advent of computers, the elimination of division and multiplication by factors of two proved convenient enough that tables of haversine values and logarithms were included in 19th and early 20th century navigation and trigonometric texts. These days, the haversine form is also convenient in that it has no coefficient in front of the sin2 function.\n\n\n```\nfrom lintang.calc import Haversine\n```\n\nUsage:\n```text\nfrom lintang.calc import Haversine\n\nlon1 = -103.548851\nlat1 = 32.0004311\nlon2 = -103.6041946\nlat2 = 33.374939\n\ndistance = Haversine.get_distance(lat1, lon1, lat2, lon2)\n\nprint(distance)\n```\nresult:\n```text\n152.96923374692167\n```\n\nget_distance parameters:\n```text\nlon1 : longitude domain\nlat1 : latitude domain\n\nlon2 : longitude destination\nlat2 : latitude destination\n\ntype : \"kilometers\" or \"miles\", (default in kilometers)\n\n```\n##\n##### Factorial Number\nIn mathematics, the factorial of a positive integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example,\n\n5!=5x4x3x2x1=120\n\nThe value of 0! is 1, according to the convention for an empty product.\n\nThe factorial operation is encountered in many areas of mathematics, notably in combinatorics, algebra, and mathematical analysis. Its most basic use counts the possible distinct sequences -- the permutations -- of n distinct objects: there are n!\n\n```text\nfrom lintang.calc import factorial\n```\nUsage:\n```text\nnumber = factorial(5)\n\nprint(number)\n```\nresult:\n```text\n120\n```\n\n##\n##### Permutation and Combination\n\n- Permutation\n\nIn mathematics, permutation is the act of arranging the members of a set into a sequence or order, or, if the set is already ordered, rearranging (reordering) its elements\u2014a process called permuting. Permutations differ from combinations, which are selections of some members of a set regardless of order. \n\nFor example, written as tuples, there are six permutations of the set {1,2,3}, namely: (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), and (3,2,1). These are all the possible orderings of this three-element set. Anagrams of words whose letters are different are also permutations: the letters are already ordered in the original word, and the anagram is a reordering of the letters. The study of permutations of finite sets is an important topic in the fields of combinatorics and group theory.\n```text\nfrom lintang.calc import permutation\n```\nUsage:\n```text\nnumber = permutation(7, 3)\n\nprint(number)\n```\nresult:\n```text\n120\n```\n- Combination\n\nA combination is a selection of items from a collection, such that (unlike permutations) the order of selection does not matter. For example, given three fruits, say an apple, an orange and a pear, there are three combinations of two that can be drawn from this set: an apple and a pear; an apple and an orange; or a pear and an orange. More formally, a k-combination of a set S is a subset of k distinct elements of S. If the set has n elements, the number of k-combinations is equal to the binomial coefficient\n\n```text\nfrom lintang.calc import combination\n```\nUsage:\n```text\nnumber = combination(7, 3)\n\nprint(number)\n```\nresult:\n```text\n35\n```\n\n##\n##### Neptu: Date Conversion to Javanese Calendar\nConvert date to Javanese calendar\n```text\nfrom lintang.calendar import Neptu\n```\nUsage:\n```text\ndate = Neptu.convert_date(15, 5, 2019)\n\nprint(date.get('pasaran'))\n```\nresult:\n```text\n'Kliwon'\n```\nconvert_date parameters:\n```text\nconvert_date(day, month, year)\n\nday : day\nmonth : month \nyear : year\n```\n\nconvert_date result:\n```text\n {\n 'day': ,\n 'month': ,\n 'month_name': ,\n 'day_name': ,\n 'pasaran': ,\n 'year': \n}\n```\n\n##\n##### Polaris: Read data from csv file\n\n```text\nfrom lintang.core import Polaris\n```\nUsage:\n```text\na = Polaris.read_csv(\"/path/to/file.csv\")\n\nprint(a.data)\n```\nresult:\n```text\n[{'age': 19, 'name': 'Nikhil'}, {'age': 20, 'name': 'Nandini'}, {'age': 20, 'name': 'Manjeet'}]\n```\nOrder by field name:\n```text\na = Polaris.read_csv(\"/path/to/file.csv\")\n\na.order_by('field_name').data\n\n# or \n\na.order_by('field_name', descending=True).data\n\n```\n\nLicense\n----\n\nCopyright (c) 2018 The Python Packaging Authority\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/liokta/arrya", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "lintang", "package_url": "https://pypi.org/project/lintang/", "platform": "", "project_url": "https://pypi.org/project/lintang/", "project_urls": { "Homepage": "https://gitlab.com/liokta/arrya" }, "release_url": "https://pypi.org/project/lintang/0.0.5/", "requires_dist": null, "requires_python": "", "summary": "Lintang", "version": "0.0.5" }, "last_serial": 5282694, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "6019bb6be031de086f3a2042b73bb6de", "sha256": "4831b291c3ed03a3ada6ff7851885c8393acd75a2f2acbebe865093201501ccc" }, "downloads": -1, "filename": "lintang-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "6019bb6be031de086f3a2042b73bb6de", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 1891, "upload_time": "2019-05-13T15:10:28", "url": "https://files.pythonhosted.org/packages/f1/2b/34f3db8b1225a398bcd4ce8e20575644be875c32cc14679e744795f51e94/lintang-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c2afcf4019937495bfafa607f1fe168c", "sha256": "aeeec701db6957a778905530c373f2e33e5d6b44ae0273eaf3ea8f3d05fb6b80" }, "downloads": -1, "filename": "lintang-0.0.1.tar.gz", "has_sig": false, "md5_digest": "c2afcf4019937495bfafa607f1fe168c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1393, "upload_time": "2019-05-13T15:10:30", "url": "https://files.pythonhosted.org/packages/26/ec/5ce8838af34ebc297328080b257c66b7c9866a02caac31848fa87e966400/lintang-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "f63ade47ec95b9cc48701467f132d8a0", "sha256": "ffea7144e650d6020b389daaff5ceace84ccbbae8d2a880b9a7a9e1ae7084b93" }, "downloads": -1, "filename": "lintang-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f63ade47ec95b9cc48701467f132d8a0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2871, "upload_time": "2019-05-15T15:05:19", "url": "https://files.pythonhosted.org/packages/28/8f/87a75b2cc82a31723c7a53a57cd774a08d4995d36131db7b815e782e4207/lintang-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a9766949f08d159d3ade074306347049", "sha256": "b9b924e1478efa45e02e69cf434f8ae13811161249b86859183bcdd471905269" }, "downloads": -1, "filename": "lintang-0.0.2.tar.gz", "has_sig": false, "md5_digest": "a9766949f08d159d3ade074306347049", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2196, "upload_time": "2019-05-15T15:05:22", "url": "https://files.pythonhosted.org/packages/b5/61/f7dc0b4a379ab12f5385d44161abcac603351e068b82cb9a9dcbbf056dc4/lintang-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "74f8a481b5dee007989c8ac3e7a3c48a", "sha256": "8cdc2866a40acf14bacd8746d6a703da023470fc81e9a55e473d7ebbd0c9a90f" }, "downloads": -1, "filename": "lintang-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "74f8a481b5dee007989c8ac3e7a3c48a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2887, "upload_time": "2019-05-16T05:13:18", "url": "https://files.pythonhosted.org/packages/e8/1b/6bfda5e2f0fd41f324dcc60ad20ea1d5cd04ba4c0d8a30588dcd1764bd9a/lintang-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "82e835ac97e81ad3c2bc6533332319b6", "sha256": "113bcd7290d94e2db0af5464065c53a7b54128b719410b552f5006df6d1e02af" }, "downloads": -1, "filename": "lintang-0.0.3.tar.gz", "has_sig": false, "md5_digest": "82e835ac97e81ad3c2bc6533332319b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2214, "upload_time": "2019-05-16T05:13:21", "url": "https://files.pythonhosted.org/packages/19/fc/5cb02fbf2c5a5718de53476e01f86135369bd8ef91be0abb95a985711172/lintang-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "4a58340b6928f78970d20585af179edb", "sha256": "a8f91248e7979dd76b75a559331bf2d54afa99d2a527b6c4965c529fda58e97e" }, "downloads": -1, "filename": "lintang-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "4a58340b6928f78970d20585af179edb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5787, "upload_time": "2019-05-17T08:25:48", "url": "https://files.pythonhosted.org/packages/fd/66/a8754bd95b236c5b4a2d1af9161327f25679249892967bed5ffd12d99fce/lintang-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d15e208151ec4c65e581e905c6aea782", "sha256": "fd4a02a9c6325ea51b9c080c16cd81902c1c70ff32a8f826c0444b610f1fe089" }, "downloads": -1, "filename": "lintang-0.0.4.tar.gz", "has_sig": false, "md5_digest": "d15e208151ec4c65e581e905c6aea782", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5751, "upload_time": "2019-05-17T08:25:52", "url": "https://files.pythonhosted.org/packages/7b/7a/39d014b6710facf1da1de6c64d7a9e7281a290710bc06741d78e8eaa5332/lintang-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "accb5147a5c36bd7f2e654a0e5d0d2a6", "sha256": "ed9be40cfdc0323534952108314bed88b12de5fa861ce8e621252d317184247b" }, "downloads": -1, "filename": "lintang-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "accb5147a5c36bd7f2e654a0e5d0d2a6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6431, "upload_time": "2019-05-17T15:16:56", "url": "https://files.pythonhosted.org/packages/5f/35/05ede989240855bdfc51e23316f32e861a8e9e9803303ad0a351c1a95acf/lintang-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9713ccd56b757ee1be261b0647667cb2", "sha256": "4ee738d144ba7c106d3481bb42ec90ccaa9cba46b0d48bdba6861de9db8ada17" }, "downloads": -1, "filename": "lintang-0.0.5.tar.gz", "has_sig": false, "md5_digest": "9713ccd56b757ee1be261b0647667cb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6296, "upload_time": "2019-05-17T15:17:01", "url": "https://files.pythonhosted.org/packages/31/15/3635d1e83c7f4079a925d6c81becc7fd499017e38687127fe43df9cb2d30/lintang-0.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "accb5147a5c36bd7f2e654a0e5d0d2a6", "sha256": "ed9be40cfdc0323534952108314bed88b12de5fa861ce8e621252d317184247b" }, "downloads": -1, "filename": "lintang-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "accb5147a5c36bd7f2e654a0e5d0d2a6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6431, "upload_time": "2019-05-17T15:16:56", "url": "https://files.pythonhosted.org/packages/5f/35/05ede989240855bdfc51e23316f32e861a8e9e9803303ad0a351c1a95acf/lintang-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9713ccd56b757ee1be261b0647667cb2", "sha256": "4ee738d144ba7c106d3481bb42ec90ccaa9cba46b0d48bdba6861de9db8ada17" }, "downloads": -1, "filename": "lintang-0.0.5.tar.gz", "has_sig": false, "md5_digest": "9713ccd56b757ee1be261b0647667cb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6296, "upload_time": "2019-05-17T15:17:01", "url": "https://files.pythonhosted.org/packages/31/15/3635d1e83c7f4079a925d6c81becc7fd499017e38687127fe43df9cb2d30/lintang-0.0.5.tar.gz" } ] }