Giter Club home page Giter Club logo

juliacoursenotebooks's Introduction

JuliaCourseNotebooks

Jupyter notebooks and Juno .jl files for the Julia Scientific Programming course on Coursera

The recently released version 1.0 of Julia marked a milestone in the development of the language. Julia has been a rapidly evolving language. This creates challenges when teaching Julia. Over the next few weeks and month the course code will be adapted to comply with the changes introduced in Julia 1.0 (0.7).

Juno is the integrated development environment (IDE) choice for Julia. It is built on the Atom IDE. As of the time of writing of this README file, Julia Computing still releases version 0.6.4 of Julia. To use Julia 1.0, dowload it from https://julialang.org. Also dowload Atom from https://atom.io In Atom hit the CONTROL key (or COMMAND key on a Mac) and the comma key. This brings up the settings. Under the Install tab search for uber-juno which will install the Julia interface for Atom. When this is done, also add the address to the julia 1.0 executable on your computer. Restart ATOM.

When creating a new file, save it first, explicitely using the .jl extension. This will tell Atom to use the Julia interface. Have a look at some of the new .jl files added to this repository.

Julia Computing ( https://www.juliacomputing.com ) releases of Julia contains the Juno interface. We will let you know when the 1.0 release goes live.

juliacoursenotebooks's People

Contributors

juanklopper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

juliacoursenotebooks's Issues

Week2_4-SimplePlots.ipynb shows warning in cell 1

In cell 1 the following warning is reported:

# Setting up a custom stylesheet in IJulia
file = open("style.css") # A .css file in the same folder as this notebook file
styl = readall(file) # Read the file
HTML("$styl") # Output as HTML
WARNING: readall is deprecated, use readstring instead.
 in depwarn(::String, ::Symbol) at ./deprecated.jl:64
 in readall(::IOStream, ::Vararg{IOStream,N}) at ./deprecated.jl:30
 in include_string(::String, ::String) at ./loading.jl:441
 in execute_request(::ZMQ.Socket, ::IJulia.Msg) at /home/balleng/.julia/v0.5/IJulia/src/execute_request.jl:169
 in eventloop(::ZMQ.Socket) at /home/balleng/.julia/v0.5/IJulia/src/eventloop.jl:8
 in (::IJulia.##9#15)() at ./task.jl:360
while loading In[1], in expression starting on line 3

Using the function readstring instead of readall in line 3 solves the problem.

Cheers,

Gustavo

Updating notebooks for Julia v1.0.3

Hi!

Now that Julia v1.0.3 is out as a stable release, is it possible to update the notebooks accordingly?
I have modified some notebooks for week 1 and will continue the same for next weeks and can share them if that helps.

Thanks

Week2_4-SimplePlots.ipynb shows error in cell with multiline plot

in the function call:

plot(epidays, allcases,   # here are the data to be plotted, below are the attributes
title       = "West African EVD epidemic, total cases", 
xlabel    = "Days since 22 March 2014",
ylabel    = "Total cases to date (three countries)",
marker  = (:diamond, 8),  # note the use of  parentheses to group the marker attributes into a composite of attributes 
line         = (:path, :dot, :gray),   # line attributes likewise put together as one unit by the use of parantheses
legend   = false,
grid        = false)

The value :gray in argument line provides the following error in emacs:

Truncated Traceback (Use C-c C-x to view full TB):
 in eventloop(::ZMQ.Socket) at /home/balleng/.julia/v0.5/IJulia/src/eventloop.jl:8
 in (::IJulia.##9#15)() at ./task.jl:360

The only difference with a jupyter notebook opened in firefox is that such error includes the whole traceback (see below):

PyError (:PyObject_Call) <type 'exceptions.ValueError'>
ValueError(u'to_rgba: Invalid rgba arg "[(5.119113838889112e-07, 2.0522701956616554e-06, 5.982577941045683e-06, 1.0), (0.012635372261218893, 0.012335021633001353, 0.012360877171488911, 1.0), (0.044490079205597936, 0.0435012249064101, 0.04340640025397465, 1.0), (0.07713594055593873, 0.07588867046670467, 0.07566786755046528, 1.0), (0.11178889127514621, 0.11032073740675324, 0.10995609611040333, 1.0), (0.14512501670019584, 0.14348952603947387, 0.14297737699866214, 1.0), (0.17765450576970573, 0.17589297587514247, 0.17522919919060903, 1.0), (0.20969965735391027, 0.20784549559783222, 0.2070258098028131, 1.0), (0.23796048310857054, 0.2360475214306363, 0.2350855890963675, 1.0), (0.2696569270618427, 0.2677005000273448, 0.26657436399140455, 1.0), (0.30138082493046714, 0.2994018026306029, 0.29810697690547344, 1.0), (0.3332444459470546, 0.33126104503880144, 0.32979296721613593, 1.0), (0.3653442112181758, 0.3633724431782132, 0.3617264613451084, 1.0), (0.39414504258482247, 0.39219552930598844, 0.39038742177072233, 1.0), (0.4269187984448541, 0.42500621977889325, 0.4230111265300785, 1.0), (0.460158604360502, 0.4582941323523669, 0.45610706159309317, 1.0), (0.4939355476732588, 0.49212900530265485, 0.4897448180837611, 1.0), (0.5244666093614033, 0.5227187960704766, 0.5201549485201331, 1.0), (0.5594473424891353, 0.5577726697981703, 0.55500154023374, 1.0), (0.5951655745855984, 0.5935704457174206, 0.5905863774429682, 1.0), (0.6316921719290114, 0.6301818997985384, 0.626979021888779, 1.0), (0.6691001601199109, 0.6676789871782777, 0.6642511944588598, 1.0), (0.7031529592909377, 0.7018136865365993, 0.6981806378980351, 1.0), (0.7424359788373007, 0.7411909081795812, 0.7373206957932009, 1.0), (0.782830460120099, 0.7816807284649387, 0.7775664424093063, 1.0), (0.8244250973312831, 0.823370722798173, 0.8190051235631107, 1.0), (0.8673145804816755, 0.8663544202760625, 0.8617299082816555, 1.0), (0.9066075595860337, 0.9057292049450164, 0.9008678509007446, 1.0), (0.9522264455488126, 0.9514367761124457, 0.9463010502097274, 1.0), (0.9994561956101177, 0.9987503615523224, 0.9933314215482737, 1.0)]"\nlength of rgba sequence should be either 3 or 4',)
  File "/usr/lib/python2.7/dist-packages/matplotlib/artist.py", line 61, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1159, in draw
    func(*args)
  File "/usr/lib/python2.7/dist-packages/matplotlib/artist.py", line 61, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 2324, in draw
    a.draw(renderer)
  File "/usr/lib/python2.7/dist-packages/matplotlib/artist.py", line 61, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/lines.py", line 739, in draw
    ln_color_rgba = self._get_rgba_ln_color()
  File "/usr/lib/python2.7/dist-packages/matplotlib/lines.py", line 1251, in _get_rgba_ln_color
    return colorConverter.to_rgba(self._color, self._alpha)
  File "/usr/lib/python2.7/dist-packages/matplotlib/colors.py", line 376, in to_rgba
    'to_rgba: Invalid rgba arg "%s"\n%s' % (str(arg), exc))


 in pyerr_check at /home/balleng/.julia/v0.5/PyCall/src/exception.jl:56 [inlined]
 in pyerr_check at /home/balleng/.julia/v0.5/PyCall/src/exception.jl:61 [inlined]
 in macro expansion at /home/balleng/.julia/v0.5/PyCall/src/exception.jl:81 [inlined]
 in #_pycall#62(::Array{Any,1}, ::Function, ::PyCall.PyObject, ::PyCall.PyObject, ::Vararg{PyCall.PyObject,N}) at /home/balleng/.julia/v0.5/PyCall/src/PyCall.jl:546
 in _pycall(::PyCall.PyObject, ::PyCall.PyObject, ::Vararg{PyCall.PyObject,N}) at /home/balleng/.julia/v0.5/PyCall/src/PyCall.jl:534
 in #pycall#66(::Array{Any,1}, ::Function, ::PyCall.PyObject, ::Type{PyCall.PyAny}, ::PyCall.PyObject, ::Vararg{PyCall.PyObject,N}) at /home/balleng/.julia/v0.5/PyCall/src/PyCall.jl:568
 in pycall(::PyCall.PyObject, ::Type{PyCall.PyAny}, ::PyCall.PyObject, ::Vararg{PyCall.PyObject,N}) at /home/balleng/.julia/v0.5/PyCall/src/PyCall.jl:568
 in #call#67(::Array{Any,1}, ::PyCall.PyObject, ::PyCall.PyObject, ::Vararg{PyCall.PyObject,N}) at /home/balleng/.julia/v0.5/PyCall/src/PyCall.jl:571
 in (::PyCall.PyObject)(::PyCall.PyObject, ::Vararg{PyCall.PyObject,N}) at /home/balleng/.julia/v0.5/PyCall/src/PyCall.jl:571
 in _before_layout_calcs(::Plots.Plot{Plots.PyPlotBackend}) at /home/balleng/.julia/v0.5/Plots/src/backends/pyplot.jl:1072
 in prepare_output(::Plots.Plot{Plots.PyPlotBackend}) at /home/balleng/.julia/v0.5/Plots/src/plot.jl:248
 in show(::Base64EncodePipe, ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.PyPlotBackend}) at /home/balleng/.julia/v0.5/Plots/src/output.jl:170
 in base64encode(::Function, ::MIME{Symbol("image/png")}, ::Vararg{Any,N}) at ./base64.jl:160
 in show(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::MIME{Symbol("text/html")}, ::Plots.Plot{Plots.PyPlotBackend}) at /home/balleng/.julia/v0.5/Plots/src/output.jl:148
 in show(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::String, ::Plots.Plot{Plots.PyPlotBackend}) at ./multimedia.jl:33
 in #sprint#304(::Void, ::Function, ::Int64, ::Function, ::String, ::Vararg{Any,N}) at ./strings/io.jl:37
 in display_dict(::Plots.Plot{Plots.PyPlotBackend}) at /home/balleng/.julia/v0.5/Plots/src/output.jl:240
 in execute_request(::ZMQ.Socket, ::IJulia.Msg) at /home/balleng/.julia/v0.5/IJulia/src/execute_request.jl:200
 in eventloop(::ZMQ.Socket) at /home/balleng/.julia/v0.5/IJulia/src/eventloop.jl:8
 in (::IJulia.##9#15)() at ./task.jl:360

Given some of the information (I had no patience for going through the whole traceback by calls related to rbg colors pointed to something related to color) I tried changing the value associated to a color (:gray in the line argument) to the values :grey, :black, and even getting rid of such portion, and the error does not show up anymore in all three cases.

Don't understand if this is something related to julia 0.5.0, jupyter, or even emacs. The latter seems less viable since the error shows up both in emacs using ein (latest version installed from MELPA) and firefox.

I'm taking julia programming in coursera so I'm very interested in a possible explanation for this behavior.

Thanks in advance,

Gustavo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.