{"id":21570041,"url":"https://github.com/lucifer1004/jl2py.jl","last_synced_at":"2026-03-06T20:31:36.414Z","repository":{"id":43124060,"uuid":"470620191","full_name":"lucifer1004/Jl2Py.jl","owner":"lucifer1004","description":"Transpile from Julia to Python","archived":false,"fork":false,"pushed_at":"2024-11-14T17:32:20.000Z","size":207,"stargazers_count":17,"open_issues_count":9,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T12:56:19.833Z","etag":null,"topics":["julia","python","transpiler"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucifer1004.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.bib","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-16T14:32:00.000Z","updated_at":"2024-03-13T04:58:41.000Z","dependencies_parsed_at":"2024-05-06T01:26:35.849Z","dependency_job_id":null,"html_url":"https://github.com/lucifer1004/Jl2Py.jl","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucifer1004%2FJl2Py.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucifer1004%2FJl2Py.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucifer1004%2FJl2Py.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucifer1004%2FJl2Py.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucifer1004","download_url":"https://codeload.github.com/lucifer1004/Jl2Py.jl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248232655,"owners_count":21069488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["julia","python","transpiler"],"created_at":"2024-11-24T11:11:31.170Z","updated_at":"2026-03-06T20:31:36.338Z","avatar_url":"https://github.com/lucifer1004.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jl2Py\n\n[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://lucifer1004.github.io/Jl2Py.jl/stable)\n[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://lucifer1004.github.io/Jl2Py.jl/dev)\n[![Build Status](https://github.com/lucifer1004/Jl2Py.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/lucifer1004/Jl2Py.jl/actions/workflows/CI.yml?query=branch%3Amain)\n[![Coverage](https://codecov.io/gh/lucifer1004/Jl2Py.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/lucifer1004/Jl2Py.jl)\n\n## Examples\n\nConversion results of [LeetCode.jl - 1. Two Sum](https://github.com/JuliaCN/LeetCode.jl/blob/master/src/problems/1.two-sum.jl)\n\n```python\ndef two_sum(nums: List[int], target: int, /) -\u003e Union[None, Tuple[int, int]]:\n    seen = {}\n    for (i, n) in enumerate(nums):\n        m = target - n\n        if haskey(seen, m):\n            return (seen[m], i)\n        else:\n            seen[n] = i\n```\n\nConversion results of [LeetCode.jl - 2. Add Two Numbers](https://github.com/JuliaCN/LeetCode.jl/blob/master/src/problems/2.add-two-numbers.jl)\n\n```python\ndef add_two_numbers(l1: ListNode, l2: ListNode, /) -\u003e ListNode:\n    carry = 0\n    fake_head = cur = ListNode()\n    while not isnothing(l1) or (not isnothing(l2) or not iszero(carry)):\n        (v1, v2) = (0, 0)\n        if not isnothing(l1):\n            v1 = val(l1)\n            l1 = next(l1)\n        if not isnothing(l2):\n            v2 = val(l2)\n            l2 = next(l2)\n        (carry, v) = divrem(v1 + v2 + carry, 10)\n        next_inplace(cur, ListNode(v))\n        cur = next(cur)\n        val_inplace(cur, v)\n    return next(fake_head)\n```\n\nWe can see that we only need to define a few polyfill functions to make the generated Python code work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucifer1004%2Fjl2py.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucifer1004%2Fjl2py.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucifer1004%2Fjl2py.jl/lists"}