[julia-users] Re: Creating a stable version of Julia + Packages for a semester long course?

2015-11-15 Thread Eric Forgy
I have a similar situation. I am building up a team of modelers and would like to make sure we're all using the same versions of everything (Julia + packages). DeclarativePackages.jl looks promising/interesting and I'm curious what other things people have tried. On Monday, November 16, 2015 a

[julia-users] Re: run parallel code in two machine with julia

2015-11-15 Thread mahdi jamshidian
thank you very much On Sunday, November 15, 2015 at 1:33:13 AM UTC+3:30, André Lage wrote: > > Hi Mahdi, > > Just configure these machines with SSH passwordless login and run your > code. > > More info at: > http://docs.julialang.org/en/release-0.4/manual/parallel-computing/ > > A tutorial on Di

[julia-users] Re: Creating a stable version of Julia + Packages for a semester long course?

2015-11-15 Thread David P. Sanders
El domingo, 15 de noviembre de 2015, 21:05:45 (UTC-6), Sheehan Olver escribió: > > > I'm trying to figure out the "best" way to create a stable version of > Julia + Gadfly + PyPlot + IJulia (+ other packages?) for a semester long > course. I don't want to have the students run Pkg.add(...)/Pk

[julia-users] Creating a stable version of Julia + Packages for a semester long course?

2015-11-15 Thread Sheehan Olver
I'm trying to figure out the "best" way to create a stable version of Julia + Gadfly + PyPlot + IJulia (+ other packages?) for a semester long course. I don't want to have the students run Pkg.add(...)/Pkg.update(), as packages have a tendency to occasionally break on updates, and it's a head

[julia-users] Re: General question on indexing

2015-11-15 Thread Seth
Hustf, I don't know why my reply didn't show up here yesterday, but I wanted to thank you for the code. I'm looking at how to make that work. Thanks for your response. On Saturday, November 14, 2015 at 2:18:45 PM UTC-8, hustf wrote: > > I believe this work-in-progress type may be adapted? I want

Re: [julia-users] Re: General question on indexing

2015-11-15 Thread Seth
That's very cool and close to what I need. Thanks. I'm using adjacency lists (vectors of vectors) but I'm sure I can adapt this code. On Sunday, November 15, 2015 at 6:12:19 PM UTC-8, Tim Holy wrote: > > Haven't tested timing carefully, but something like the following should > be > pretty dece

Re: [julia-users] Re: General question on indexing

2015-11-15 Thread Tim Holy
Haven't tested timing carefully, but something like the following should be pretty decent: julia> immutable LowerTriangularIterator{A<:AbstractMatrix} data::A end julia> Base.start(iter::LowerTriangularIterator) = (1,1) start (generic function with 49 methods) julia> Base.done

[julia-users] Re: push! performance

2015-11-15 Thread Seth
What happens if you use sizehint!() with dynamic()? On Sunday, November 15, 2015 at 3:35:45 PM UTC-8, Steven G. Johnson wrote: > > function prealloc(n) > a = Array(Int, n) > for i = 1:n > a[i] = i > end > return a > end > function dynamic(n) > a = Int[] > for i = 1:

Re: [julia-users] Re: General question on indexing

2015-11-15 Thread Seth
Thank you, Tim - I'll definitely check it out. Right now I can't seem to find an efficient way of doing it, but there are a few tricks in Iterators.jl that might work. On Sunday, November 15, 2015 at 1:33:29 PM UTC-8, Tim Holy wrote: > > This may also be a case where writing an iterator that jus

Re: [julia-users] display precision

2015-11-15 Thread David P. Sanders
El domingo, 15 de noviembre de 2015, 12:45:11 (UTC-6), Yichao Yu escribió: > > On Sun, Nov 15, 2015 at 1:25 PM, digxx > > wrote: > > Is it possible to display the precision of a number to arbitrary > decimals > > points? > > For example if I want to display pi (or any other result) up to 1e6

[julia-users] Re: push! performance

2015-11-15 Thread David P. Sanders
El domingo, 15 de noviembre de 2015, 18:00:09 (UTC-6), David P. Sanders escribió: > > > > El domingo, 15 de noviembre de 2015, 17:35:45 (UTC-6), Steven G. Johnson > escribió: >> >> function prealloc(n) >> a = Array(Int, n) >> for i = 1:n >> a[i] = i >> end >> return a >>

[julia-users] Re: push! performance

2015-11-15 Thread David P. Sanders
El domingo, 15 de noviembre de 2015, 17:35:45 (UTC-6), Steven G. Johnson escribió: > > function prealloc(n) > a = Array(Int, n) > for i = 1:n > a[i] = i > end > return a > end > function dynamic(n) > a = Int[] > for i = 1:n > push!(a, i) > end > re

[julia-users] Re: push! performance

2015-11-15 Thread Alex Ames
Looks like push! reduces memory allocation by a constant-ish factor of 10^3, but reduces execution time exponentially. push!ing 1 elements takes the same time as copying 10. (gist )

[julia-users] Re: push! performance

2015-11-15 Thread Steven G. Johnson
function prealloc(n) a = Array(Int, n) for i = 1:n a[i] = i end return a end function dynamic(n) a = Int[] for i = 1:n push!(a, i) end return a end @time prealloc(10^7); @time dynamic(10^7); On my machine, the preallocated version is 2.5–3x faster

Re: [julia-users] Re: General question on indexing

2015-11-15 Thread Tim Holy
This may also be a case where writing an iterator that just visits the elements with i >= j might be what you want. You can study the implementation of CartesianIndex in Base for inspiration. --Tim On Saturday, November 14, 2015 02:18:45 PM hustf wrote: > I believe this work-in-progress type ma

Re: [julia-users] General question on indexing

2015-11-15 Thread Tim Holy
I don't think there's an obvious "policy" in place for this, but in general I'd agree that it's better foo[i] == collect(foo)[i]. But there's no reason you can't have different types of iterators that visit different types of edges: for edge in all_edges(graph) # visits symmetric ed

Re: [julia-users] using a JSON REST API from Julia

2015-11-15 Thread Avik Sengupta
Below is some recent code to access a REST API. This is possibly the simplest way to do this, using Dict's as inputs and outputs. https://github.com/aviks/Mandrill.jl/blob/2dbce6dc6b91a56a350b29a02d072b9b90416771/src/Mandrill.jl#L39 Regards - Avik On Saturday, 14 November 2015 14:42:31 UTC, Ja

Re: [julia-users] display precision

2015-11-15 Thread Yichao Yu
On Sun, Nov 15, 2015 at 1:25 PM, digxx wrote: > Is it possible to display the precision of a number to arbitrary decimals > points? > For example if I want to display pi (or any other result) up to 1e6 > decimals?! For arbitrary result, you can't print arbitrary precision if your calculation does

[julia-users] display precision

2015-11-15 Thread digxx
Is it possible to display the precision of a number to arbitrary decimals points? For example if I want to display pi (or any other result) up to 1e6 decimals?!

[julia-users] Re: Write an array of tuple to csv

2015-11-15 Thread Grey Marsh
Thanks for the help. On Saturday, November 14, 2015 at 9:28:05 PM UTC+5:30, Steven G. Johnson wrote: > > I've pushed a fix: https://github.com/JuliaLang/julia/pull/13989 >

[julia-users] Julia #1 on Hacker News

2015-11-15 Thread Mauro
The Moore Foundation's sponsorship of Julia is currently #1 on Hacker News: https://news.ycombinator.com/item?id=10565940 Thanks to Mike for posting!

[julia-users] Progress meter for parallel workers

2015-11-15 Thread Jason Eckstein
I was playing around with the ProgressMeter.jl package by Tim Holy and it works great for a single threaded loop. I was wondering if there's any way to run several loops on multiple workers and have a set of progress bars update in real time. When I tried this with Tim's package it just said

[julia-users] ANN: MXNet.jl v0.0.5, LSTM char-rnn tutorial for generating random sentences

2015-11-15 Thread Chiyuan Zhang
Please check out this new tutorial on training a char-level LSTM recurrent neural network (RNN) to generate random sentences from arbitrary domain. MXNet.jl is a flexible and efficient deep le

[julia-users] Re: Meshgrid

2015-11-15 Thread digxx
Hey Thanks for ur input...I have one question regarding plotting: Initially Plots (I just installed it) tried to call PyPlots and spit out this error: while loading C:\Users\Diger\Documents\Julia\timecompare.jl, in expression starting on line 27 in include_from_node1 at loading.jl:304 in include

Re: [julia-users] Re: The growth of Julia userbase

2015-11-15 Thread Ben Ward
Thanks, for the responses everyone, it was incredibly helpful! :) On Thursday, November 12, 2015 at 9:21:33 AM UTC, Viral Shah wrote: > > Attching the github traffic data. Doesn't have history though, but the > numbers were bigger than what I expected when I first saw this. > > > Some other inter

Re: [julia-users] Re: indexing with non Integer Reals is deprecated

2015-11-15 Thread Sheehan Olver
I didn't realize ÷ was div! I think people would be happier if they knew they could use A[n÷2] instead of A[div(n,2)]. On Sunday, November 15, 2015 at 12:48:54 PM UTC+11, Steven G. Johnson wrote: > > See also > > https://github.com/JuliaLang/julia/issues/10154 > > where a lot of this was dis

[julia-users] Re: push! performance

2015-11-15 Thread Dan
AFAIK the implementation of `push!` in Julia only occasionally allocates a bigger buffer for the new vector. This results in a very low average time for adding multiple elements (O(1) amortized time in complexity jargon). Notice, `a = [a new_element ]` would in Julia do something else than `pus