Re: [julia-users] Re: eachline() work with pmap() is slow

2016-10-16 Thread lovebufan
codes link is the same link in my first reply. On Monday, October 17, 2016 at 12:47:15 AM UTC+8, Jeremy McNees wrote: > > Care to share the code you used? > > On Sun, Oct 16, 2016 at 9:24 AM > wrote: > >> Problem solved by hand

[julia-users] Re: eachline() work with pmap() is slow

2016-10-16 Thread lovebufan
Problem solved by hand writing an implementation of ``pmap`` & codes updated :)

[julia-users] Re: eachline() work with pmap() is slow

2016-10-14 Thread lovebufan
I have change the code to parallel on files rather than lines. codes are available here if anyone have interests. However, the speed is not satisfactory still (total processing speed approx. 10M/s, ideally it should be 100M/s,

[julia-users] eachline() work with pmap() is slow

2016-10-13 Thread lovebufan
I want to process each line of a large text file (100G) in parallel using the following code pmap(process_fun, eachline(the_file)) however, it seems that pmap is slow. following is a dummy experiment: julia> writedlm("tmp.txt",rand(10,100)) # produce a large file julia> @time for l in e

[julia-users] Re: How to convert a jpeg base64 encoded string to Image

2016-10-13 Thread lovebufan
no, it does not... just because "image/jpeg" will produce an error. On Thursday, October 13, 2016 at 3:55:22 PM UTC+8, Andreas Lobinger wrote: > > Why does stringmime("image/png" produce jpeg? > > On Thursday, October 13, 2016 at 7:44:42 AM UTC+2, love...@gmail.com > wrote: >> >> I have some jpeg

[julia-users] Re: How to convert a jpeg base64 encoded string to Image

2016-10-13 Thread lovebufan
Well, by trial & error, I found the correct function is ``readblob``. On Thursday, October 13, 2016 at 1:44:42 PM UTC+8, love...@gmail.com wrote: > > I have some jpeg images saved as base64 encoded strings (such strings can > be produced by ```stringmime("image/png", convert(Image, rand(5,5)))```

[julia-users] How to convert a jpeg base64 encoded string to Image

2016-10-12 Thread lovebufan
I have some jpeg images saved as base64 encoded strings (such strings can be produced by ```stringmime("image/png", convert(Image, rand(5,5)))``` using Images.jl). but I tried a whole day and cannot convert them back (without disk I/O)...

Re: [julia-users] Re: How to install 0.4.5 on Ubuntu?

2016-07-15 Thread lovebufan
Agree. On Saturday, July 16, 2016 at 8:40:18 AM UTC+8, Uwe Fechner wrote: > > Well, you can always pin a version. See: > https://help.ubuntu.com/community/PinningHowto > > For me, using Ubuntu packages is the easiest way to go, in particular if I > have to explain students how > to install Juli

[julia-users] Re: What should Julia do on "Ubuntu compatibility mode in Windows 10"?

2016-05-31 Thread lovebufan
Just run Ubuntu version of Julia on Ubuntu mode on windows 10. Everything seems good. On Sunday, April 3, 2016 at 3:27:04 AM UTC+8, Páll Haraldsson wrote: > > I guess just run as a regular Linux ELF binary.. > > Since the news, and Windows Julia works, we can just ignore and run Julia > in non-U

[julia-users] Re: What features are interesting in a VS Code plug-in?

2016-05-27 Thread lovebufan
any updates? On Thursday, October 8, 2015 at 2:04:51 PM UTC+8, Tomas Lycken wrote: > > I've just been invited to an early look at a plug-in SDK for Visual Studio > Code, and I want to start experimenting with it in a plug-in for Julia > development. > > What features are interesting in such a p

[julia-users] How to check whether a macro is defined

2016-05-13 Thread lovebufan
to suppress some annoying method overwritten warnings, I found a useful @nowarn macro. However, I need to check whether this macro is defined and include the definition if not. Question, how to check whether a macro is defined? If one thread can ask multiple questions, I'm also interested in ho