[julia-users] Crashing while parsing large XML file

2016-01-28 Thread Brandon Booth
I'm parsing an XML file that's about 30gb and wrote the loop below to parse it line by line. My code cycles through each line and builds a 1x200 dataframe that is appended to a larger dataframe. When the larger dataframe gets to 1000 rows I stream it to an SQLite table. The code works for the

[julia-users] Re: DateTime business days, Wall Street days, ...

2016-01-28 Thread Michael Landis
Wow, I will give that a try. Thank you! On Thursday, January 28, 2016 at 6:52:38 AM UTC-8, Michael Landis wrote: > > Maybe I'm missing something, but the one thing I want from DateTime is the > ability to determine whether a day has elapsed since a file modify date, > but not just a calendar

Re: [julia-users] how to get gurobi log file

2016-01-28 Thread Stefan Karpinski
Michela, would you mind posting these questions on the julia-opt list since that's a specific list for optimization? On Thu, Jan 28, 2016 at 10:14 AM, Michela Di Lullo < michela.dilu...@uniroma1.it> wrote: > Hello, > > does anyone know how to get the gurobi log on a txt file when using julia? >

[julia-users] how to get gurobi log file

2016-01-28 Thread Michela Di Lullo
Hello, does anyone know how to get the gurobi log on a txt file when using julia? Thanks for any suggestion, Michela

Re: [julia-users] Create local function variables programmatically from a dictionnary

2016-01-28 Thread Fady Shoukry
On Thursday, 28 January 2016 08:12:06 UTC-5, Stefan Karpinski wrote: > > Please try to avoid this business of creating the same conversation in > three places. > > On Thu, Jan 28, 2016 at 8:10 AM, Stefan Karpinski > wrote: > >> >>

Re: [julia-users] Create local function variables programmatically from a dictionnary

2016-01-28 Thread Stefan Karpinski
Reifying local scopes is a feature that dynamic languages often allow as an artifact of the most obvious implementation of scopes in low-performance interpreters: as dictionaries from symbols to values. Exposing this, however, effectively prevents any other possible implementation. In particular,

Re: [julia-users] Re: DateTime business days, Wall Street days, ...

2016-01-28 Thread Tom Breloff
Also check out Ito.jl and TimeZones.jl. It seems that both Ito.jl and BusinessDays.jl are geared towards bond trading, so I'm not sure how well they work for general queries. If you find you have opinions about the strengths/weaknesses of any of these packages, please post here! On Thu, Jan 28,

Re: [julia-users] Re: Julia Vector declare/load confusion

2016-01-28 Thread Christopher Alexander
Milan, Thanks for this! That is quite a difference, I might be making some changes to my code! Chris On Thursday, January 28, 2016 at 5:36:07 AM UTC-5, Milan Bouchet-Valat wrote: > > Le mercredi 27 janvier 2016 à 22:37 -0800, Christopher Alexander a > écrit : > > Try something like this:

[julia-users] Re: DateTime business days, Wall Street days, ...

2016-01-28 Thread Christopher Alexander
I have some code (based somewhat on both Ito and BusinessDays), that is part of a larger Quantlib implementation that I'm working on in Julia, which deals with business days. You can check it out here:

[julia-users] Re: Crashing while parsing large XML file

2016-01-28 Thread Diego Javier Zea
Hi! Why you are using for line in eachline(f) l = readline(f) instead of for l in eachline(f) ? Best El jueves, 28 de enero de 2016, 12:42:35 (UTC-3), Brandon Booth escribió: > > I'm parsing an XML file that's about 30gb and wrote the loop below to > parse it line by line. My code

Re: [julia-users] Re: a good IDE for Julia ? (Julia Studio does not work with Julia v 0.3.0)

2016-01-28 Thread Mike Innes
Since Juno/Atom came up, I'll mention that we've just posted some (beta) bundles here . In theory, they should be very easy to get going with; in practice, let me know how it goes and we'll start to iron out the cracks. On Tue, 26 Jan 2016 at 20:11 cdm

[julia-users] Re: Crashing while parsing large XML file

2016-01-28 Thread Brandon Booth
No real reason. I was going back and forth between eachline(f) and for i = 1:n to see if it worked for 1000 rows, then 10,000 rows, etc. I ended up with a hybrid of the two. Will that matter much? On Thursday, January 28, 2016 at 1:32:09 PM UTC-5, Diego Javier Zea wrote: > > Hi! > > Why you

[julia-users] Does calling python packages through PyCall.jl require author permission

2016-01-28 Thread Rob
I would like to include a call to python MNE in my EEG.jl package. I would not use their code, just call the function and have the package as a requirement. Does this break any licensing? Would I require the authors permission before I could commit this change to pkg.julialang?

Re: [julia-users] Re: Crashing while parsing large XML file

2016-01-28 Thread Stefan Karpinski
At best, you'll only see every other line, right? At worst, eachline may do some IO lookahead (i.e. read one line ahead) and this will do something even more confusing. On Thu, Jan 28, 2016 at 3:35 PM, Brandon Booth wrote: > No real reason. I was going back and forth between

Re: [julia-users] Circular parametric types

2016-01-28 Thread Tommy Hofmann
This is now https://github.com/JuliaLang/julia/issues/14825 On Wednesday, January 27, 2016 at 4:52:00 PM UTC+1, Yichao Yu wrote: > > On Wed, Jan 27, 2016 at 10:35 AM, Tommy Hofmann > wrote: > > I am trying to define two parametric types with circular dependency as > >

Re: [julia-users] how to i get number of arguments of a function?

2016-01-28 Thread Mauro
> Wow, thanks a lot, That one I would never had a chance to figure out. It's easy enough, you could figure it out yourself too, knowing just a few tricks. The essentials are here: http://docs.julialang.org/en/release-0.4/devdocs/reflection/ plus the tools: xdump, @less, @edit, @which. In fact,

Re: [julia-users] Create local function variables programmatically from a dictionnary

2016-01-28 Thread Stefan Karpinski
https://groups.google.com/forum/#!topic/julia-users/axwQqFeIlCQ On Wed, Jan 27, 2016 at 11:05 PM, Yichao Yu wrote: > On Wed, Jan 27, 2016 at 9:47 PM, Fady Shoukry > wrote: > > > >> > >> Depending on what API JuMP provide and what API you want to

Re: [julia-users] Create local function variables programmatically from a dictionnary

2016-01-28 Thread Stefan Karpinski
http://stackoverflow.com/questions/35051773/create-local-variables-programmatically-from-a-dictionary-in-julia On Thu, Jan 28, 2016 at 8:10 AM, Stefan Karpinski wrote: > https://groups.google.com/forum/#!topic/julia-users/axwQqFeIlCQ > > On Wed, Jan 27, 2016 at 11:05 PM,

Re: [julia-users] Create local function variables programmatically from a dictionnary

2016-01-28 Thread Stefan Karpinski
Please try to avoid this business of creating the same conversation in three places. On Thu, Jan 28, 2016 at 8:10 AM, Stefan Karpinski wrote: > > http://stackoverflow.com/questions/35051773/create-local-variables-programmatically-from-a-dictionary-in-julia > > On Thu, Jan

Re: [julia-users] Re: Programmatically creating variables from a dictionary

2016-01-28 Thread Stefan Karpinski
https://groups.google.com/forum/#!topic/julia-users/j3GeOUK59fA On Thu, Jan 28, 2016 at 8:08 AM, Stefan Karpinski wrote: > > http://stackoverflow.com/questions/35051773/create-local-variables-programmatically-from-a-dictionary-in-julia > > On Wed, Jan 27, 2016 at 11:45 PM,

Re: [julia-users] Re: Programmatically creating variables from a dictionary

2016-01-28 Thread Stefan Karpinski
http://stackoverflow.com/questions/35051773/create-local-variables-programmatically-from-a-dictionary-in-julia On Wed, Jan 27, 2016 at 11:45 PM, Ethan Anderes wrote: > This isn't exactly what you want... but you can always can splat > `Dict{Symbol, T}` into named

Re: [julia-users] Re: Julia Vector declare/load confusion

2016-01-28 Thread Milan Bouchet-Valat
Le mercredi 27 janvier 2016 à 22:37 -0800, Christopher Alexander a écrit : > Try something like this: > > adjCloseMuVec = Vector{Float32}(nFullYears) > or > adjCloseMuVec = zeros(Float32, nFullYears) > > This will init a vector of the proper size.  I think zeros is > slightly faster, but someone

[julia-users] Re: Julia Vector declare/load confusion

2016-01-28 Thread Michael Landis
Both zeros(Float32,nFullYears) and Vector(Float32,nFullYears) work. Thanks! I overwrite any contents, so unitialized is fine. There are rarely as many as forty of these (though there are four such vectors per issue), so it does add up, so I the performance analysis is much appreciated too.

Re: [julia-users] Circular parametric types

2016-01-28 Thread Tommy Hofmann
On Thursday, January 28, 2016 at 12:23:34 PM UTC+1, Toivo Henningsson wrote: > > Yes, you're right! I guess that you would have to break the chain at some > point with Any or similar, which doesn't feel quite satisfying. But maybe > it's the best that you can do for now. > > In your code, when

Re: [julia-users] Circular parametric types

2016-01-28 Thread Toivo Henningsson
In the meantime, you can relax the second type definition to type t2{C, T} <: abstest x::C y::T end which will allow you to construct all the parametric types that you want, plus some more. You could add a check in the t2 constructor to make sure that T meets your expectations.

[julia-users] how to get back the objective value, the number of explored nodes, number of simplex iterations from gurobi solver

2016-01-28 Thread Michela Di Lullo
Hello everyone, I'm solving iteratively a problem using gurobi solver and adding once a time a new violated constraint to the model. I want to iterate this procedure until the number of violated inequalities is zero and also I want to print for each iteration some informations I would like

Re: [julia-users] Circular parametric types

2016-01-28 Thread Tommy Hofmann
On Thursday, January 28, 2016 at 10:57:59 AM UTC+1, Toivo Henningsson wrote: > > In the meantime, you can relax the second type definition to > > type t2{C, T} <: abstest > x::C > y::T > end > > which will allow you to construct all the parametric types that you want, > plus some more. You

Re: [julia-users] Circular parametric types

2016-01-28 Thread Toivo Henningsson
Yes, you're right! I guess that you would have to break the chain at some point with Any or similar, which doesn't feel quite satisfying. But maybe it's the best that you can do for now. In your code, when you access fields that are not typed as strictly as you want, at least you can put in a

[julia-users] Re: DateTime business days, Wall Street days, ...

2016-01-28 Thread Christopher Alexander
I have some code (based somewhat on both Ito and BusinessDays), that is part of a larger Quantlib implementation I'm working on in Julia, which deals with business days and various financial calendars (so far just US and UK). You can check it out here:

[julia-users] Re: Overview of how ClusterManagers work?

2016-01-28 Thread Daniel Arndt
This may or may not be useful, I forget how much detail is given to SSHManager. https://www.youtube.com/watch?v=XJAQ24NS458 On Wednesday, 27 January 2016 00:07:54 UTC-4, Sam Morrison wrote: > > Hi there, > I’m a bit new to julia and parallel computing. I was wondering if anyone > could give me

Re: [julia-users] Re: DateTime business days, Wall Street days, ...

2016-01-28 Thread Michael Landis
My first impression on BusinessDays is that it's a brute force, first cut solution. For a small range of days it's probably just fine, but over several years performance is going to take a hit because every day in the range gets evaluated and every evaluation considers the entire set of

[julia-users] DateTime business days, Wall Street days, ...

2016-01-28 Thread Michael Landis
Maybe I'm missing something, but the one thing I want from DateTime is the ability to determine whether a day has elapsed since a file modify date, but not just a calendar day... at least a business day (i.e. Saturdays and Sundays don't count), but even better if a calendar could skip past

Re: [julia-users] DateTime business days, Wall Street days, ...

2016-01-28 Thread Kevin Squire
Hi Michael, I haven't used it, but does https://github.com/felipenoris/BusinessDays.jl suit your needs? Kevin On Thu, Jan 28, 2016 at 6:52 AM, Michael Landis wrote: > Maybe I'm missing something, but the one thing I want from DateTime is the > ability to determine