# Introduction to Probability for Data Science: collaborative effort to translate code to Julia

**URL:** https://discourse.julialang.org/t/introduction-to-probability-for-data-science-collaborative-effort-to-translate-code-to-julia/69614
**Category:** Teaching & Outreach
**Tags:** book, probability
**Created:** [October 12, 2021, 11:09am UTC](https://discourse.julialang.org/t/introduction-to-probability-for-data-science-collaborative-effort-to-translate-code-to-julia/69614 "2021-10-12T11:09:41Z")
**Posts on this page:** 10
**Page:** 2

<div class="post-metadata">

### Author: ![mcreel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcreel/32/30088_2.png) [@mcreel](https://discourse.julialang.org/u/mcreel)
#### Post date: [October 14, 2021, 8:48pm UTC](https://discourse.julialang.org/t/introduction-to-probability-for-data-science-collaborative-effort-to-translate-code-to-julia/69614/21 "2021-10-14T20:48:30Z")

</div>

Using the package seems fine to me. The Python code uses a package. We’re using packages in the code for the other chapters, too.

---

<div class="post-metadata">

### Author: ![mcreel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcreel/32/30088_2.png) [@mcreel](https://discourse.julialang.org/u/mcreel)
#### Post date: [October 14, 2021, 8:54pm UTC](https://discourse.julialang.org/t/introduction-to-probability-for-data-science-collaborative-effort-to-translate-code-to-julia/69614/22 "2021-10-14T20:54:35Z")

</div>

For all the people working on chapters, there has been some discussion of whether to put code inside functions, as is usual for Julia, or to leave code in the global scope, using the same style as the Python and Matlab code. For now, let’s leave the code pieces unwrapped, ok? Assume that the code pieces can be pasted into a newly started REPL which has all dependencies available. Or, executed from VS Code using CTRL-enter.

---

<div class="post-metadata">

### Author: ![mcreel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcreel/32/30088_2.png) [@mcreel](https://discourse.julialang.org/u/mcreel)
#### Post date: [October 17, 2021, 12:51pm UTC](https://discourse.julialang.org/t/introduction-to-probability-for-data-science-collaborative-effort-to-translate-code-to-julia/69614/23 "2021-10-17T12:51:09Z")

</div>

This effort is nearing completion. Before we notify the book’s author that it’s ready to use, if would be nice to receive any reports about errors or other problems. Please give it a try, if you’re interested, and raise an issue if you find a problem. [https://github.com/mcreel/IntProbDS.jl](https://github.com/mcreel/IntProbDS.jl)

---

<div class="post-metadata">

### Author: ![mcreel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcreel/32/30088_2.png) [@mcreel](https://discourse.julialang.org/u/mcreel)
#### Post date: [October 20, 2021, 2:02pm UTC](https://discourse.julialang.org/t/introduction-to-probability-for-data-science-collaborative-effort-to-translate-code-to-julia/69614/24 "2021-10-20T14:02:36Z")

</div>

Stanley Chan said “What an amazing speed!!!” when I informed him that the translations were done. :juliabouncing: :juliabouncing: :juliabouncing: I have asked him to link to contributors section of the github page to credit the people who have contributed, and he will do so.

---

<div class="post-metadata">

### Author: ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)
#### Post date: [October 20, 2021, 2:35pm UTC](https://discourse.julialang.org/t/introduction-to-probability-for-data-science-collaborative-effort-to-translate-code-to-julia/69614/25 "2021-10-20T14:35:57Z")

</div>

> [@mcreel](#):
>
> “What an amazing speed!!!”

And that using global contributors. If they were in a local scope it would have taken a minute. Congratulations!

---

<div class="post-metadata">

### Author: ![eliascarv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eliascarv/32/22152_2.png) [@eliascarv](https://discourse.julialang.org/u/eliascarv)
#### Post date: [October 21, 2021, 9:40am UTC](https://discourse.julialang.org/t/introduction-to-probability-for-data-science-collaborative-effort-to-translate-code-to-julia/69614/26 "2021-10-21T09:40:37Z")

</div>

@mcreel The website is having problems displaying Unicode characters.

---

<div class="post-metadata">

### Author: ![mcreel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcreel/32/30088_2.png) [@mcreel](https://discourse.julialang.org/u/mcreel)
#### Post date: [October 21, 2021, 11:46am UTC](https://discourse.julialang.org/t/introduction-to-probability-for-data-science-collaborative-effort-to-translate-code-to-julia/69614/27 "2021-10-21T11:46:51Z")

</div>

Hmm, I see. I think that the author is changing the unicode to plain text himself, but he’s not finished yet. Let’s wait a few days and see if it gets fixed that way.

---

<div class="post-metadata">

### Author: ![mcreel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcreel/32/30088_2.png) [@mcreel](https://discourse.julialang.org/u/mcreel)
#### Post date: [July 22, 2023, 9:16am UTC](https://discourse.julialang.org/t/introduction-to-probability-for-data-science-collaborative-effort-to-translate-code-to-julia/69614/28 "2023-07-22T09:16:10Z")

</div>

I’m checking that this is all working correctly still with Julia 1.9.x and updated packages. It appears to me that  
Ch07 @Paul_Soderlind  
Ch08 @mcreel✅  
Ch09 @mcreel ✅  
Ch10 @congUoM  
all have minor issues.

I can have a look at them, but maybe the original contributors would like to go first?

edit: chs 08 and 09 are done, it was very minor stuff. I have added some "##"s here and there to allow easy code block execution when using VSCode.

The working branch of the archive is [GitHub - mcreel/IntProbDS.jl at update](https://github.com/mcreel/IntProbDS.jl/tree/update)

---

<div class="post-metadata">

### Author: ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)
#### Post date: [July 23, 2023, 7:45am UTC](https://discourse.julialang.org/t/introduction-to-probability-for-data-science-collaborative-effort-to-translate-code-to-julia/69614/30 "2023-07-23T07:45:38Z")

</div>

Question: are we aiming for minimal changes or “good” changes?

Reason for asking: Ch07 uses Convex.jl, which is not actively developed. Personally, I now use OSQP.jl for these sort of things.

I could thus either stick with Convex.jl and do minimal changes or port it to OSQP. Any preferences?

---

<div class="post-metadata">

### Author: ![mcreel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcreel/32/30088_2.png) [@mcreel](https://discourse.julialang.org/u/mcreel)
#### Post date: [July 23, 2023, 1:05pm UTC](https://discourse.julialang.org/t/introduction-to-probability-for-data-science-collaborative-effort-to-translate-code-to-julia/69614/31 "2023-07-23T13:05:38Z")

</div>

Hi, Paul. The code on GitHub is yours, without modification (as far as I recall). A PR against that would be good, or email, or whatever is convenient.

Regarding OSQP, that sounds like a good idea to me. There’s no particular reason why the code can’t change. Best, M

[Previous page](https://discourse.julialang.org/t/introduction-to-probability-for-data-science-collaborative-effort-to-translate-code-to-julia/69614.md?page=1)
