• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

jolin-io/fall-in-love-with-julia: An introductory 101 series to get to know the ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

jolin-io/fall-in-love-with-julia

开源软件地址:

https://github.com/jolin-io/fall-in-love-with-julia

开源编程语言:

Jupyter Notebook 97.3%

开源软件介绍:

image

fall-in-love-with-julia

Binder

An introductory 101 series to get to know the power of Julialang.

Author: Stephan Sahm, Julia User Group Munich.

Why Julia?

Why was Julia created? Definitely read this now impressively old post by Julia founders by Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and Alan Edelman https://julialang.org/blog/2012/02/why-we-created-julia/.

Here my favourite passage

We want the speed of C with the dynamism of Ruby. We want a language that's homoiconic, with true macros like Lisp, but with obvious, familiar mathematical notation like Matlab. We want something as usable for general programming as Python, as easy for statistics as R, as natural for string processing as Perl, as powerful for linear algebra as Matlab, as good at gluing programs together as the shell. Something that is dirt simple to learn, yet keeps the most serious hackers happy. We want it interactive and we want it compiled.

Why this needs to be an extra language? Why cannot Python be made that fast for instance? Checkout the official compact answer to this in the julia manual F&Q https://docs.julialang.org/en/v1/manual/faq/#Why-don't-you-compile-Matlab/Python/R/%E2%80%A6-code-to-Julia?-1

Here my favourite passage

Julia's advantage is that good performance is not limited to a small subset of “built-in” types and operations, and one can write high-level type-generic code that works on arbitrary user-defined types while remaining fast and memory-efficient. Types in languages like Python simply don't provide enough information to the compiler for similar capabilities, so as soon as you used those languages as a Julia front-end you would be stuck.

Local installation

If Binder does not work for you, you can install the package locally. There are two options, using docker, or using plain julia.

Docker (recommended)

This process is identical to how mybinder.org is actually doing it. Hence you will get the very same environment.

  1. Install docker

  2. Install repo2docker by running

    python3 -m pip install --user jupyter-repo2docker

    If you do not have python, consider installing it via Anaconda.

  3. Execute repo2docker on this repository. It will take several 10 minutes to build everything.

    jupyter-repo2docker https://github.com/jolin-io/fall-in-love-with-julia

    Usually, a browser is opened automatically for you, but if not, an url is also printed at the very end of the command output. Copy that one to your browser and you are ready to go.

Julia only

This process is installing dependencies tracked by Julia, which will suffice for 98% of the material here.

  1. Download and install Julia from https://julialang.org/downloads/

  2. Instantiate the fall-in-love-with-julia package

    ProjectFolder="$HOME/JuliaProjects"
    mkdir -p "$ProjectFolder"
    cd "$ProjectFolder"
    
    git clone https://github.com/jolin-io/fall-in-love-with-julia
    cd fall-in-love-with-julia
    julia --project --eval 'import Pkg; Pkg.instantiate(); Pkg.add("IJulia")'
  3. Run jupyter

    Either use your favorite jupyter installation or run

    ProjectFolder="$HOME/JuliaProjects"
    cd "$ProjectFolder"
    julia --project --eval 'import IJulia; notebook()' 

In case a specific example (e.g. the Streaming Kaggle example) does not work, you may need to install extra packages similar to those described in apt.txt or execute further steps on the commandline similar to those described in postBuild.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap