« first day (1904 days earlier)      last day (2586 days later) » 

2:00 AM
@halirutan i got the style transfer stuff running last night, albeit poorly. here's the performance on the msi gs63vr (16gb/6gb gtx 1060) if you are curious. couldnt get it to peg to processor so maybe more room for speed. wolframcloud.com/objects/…
 
2:36 AM
@J.M. Could you help to remove that Duplicated mark?That is not a duplicated question exactly.
I hope to call api,but I found I cannot call it,so I find a new method here.The new post is about how to use HTTPRequest to replace that java code actually.
 
3:09 AM
BTW, I have a function that takes a matrix as an argument. Usually this works, but this one seems to run the function for every single item in the matrix, instead of once for the entire matrix. Any idea how to fix it?
Here is my code:
ClearAll[XYZtoOCIO]
(* Assumes data is fed in as {{Xr,Yr,Zr},{Xg,Yg,Zg},{Xb,Yb,Zb}}. If not, transpose*)
XYZtoOCIO[matrix_] := ("        - !<MatrixTransform> {matrix: [" Riffle[Flatten[matrix], 0, 4]   ", 0, 0, 0, 0, 1]}")
 
@ThomasLackner Not bad for laptop. You can use BenchmarkReport[] to get a more visual representation on how you compare to other systems.
@GiantCowFilms Don't you think you want to join strings rather than multiplying them?
 
@halirutan I guess so
I'm not sure
I'm just trying to output them to the screen. I won't use them after that.
 
@GiantCowFilms Let me give you an example so that you understand it:
In[6]:= a {1, 2, 3, 4}

Out[6]= {a, 2 a, 3 a, 4 a}
 
Tried using the string join operator <>
 
@GiantCowFilms You see what happens here and that it is the usual behavior..
@GiantCowFilms But?
 
3:22 AM
@halirutan Ah I see now
@halirutan It doesn't seem to be able to convert my matrix's contents into strings to combine
 
@GiantCowFilms That is the right question :)
@GiantCowFilms So what you will get in the middle is a number of matrix elements in a flat list:
{1,2,3,4,5,6}
How you want the output to look?
 
@GiantCowFilms What are you trying to do with XYZ colors?
 
@halirutan Like that, but without the curly braces
@J.M. I'm trying to print a matrix out in a way I can just copy paste into an OCIO configuration
 
@GiantCowFilms OK, you understand this here:
In[10]:= ToString /@ {1, 2, 3, 4, 5}

Out[10]= {"1", "2", "3", "4", "5"}
right?
 
Correct
although I don't see quotes around it on my copy
but the error goes away.
 
3:29 AM
@GiantCowFilms Luckily for us, StringRiffle does the conversion from number to string by itself. So what you probably want is commas between your entries.
In[16]:= StringRiffle[{1, 2, 3, 4}, ", "]

Out[16]= "1, 2, 3, 4"
Which leads us to the final answer:
ClearAll[XYZtoOCIO]
(*Assumes data is fed in as {{Xr,Yr,Zr},{Xg,Yg,Zg},{Xb,Yb,Zb}}.If \
not,transpose*)

XYZtoOCIO[
  matrix_] := ("        - !<MatrixTransform> {matrix: [" <>
   StringRiffle[Riffle[Flatten[matrix], 0, 4], ", "] <>
   ", 0, 0, 0, 0, 1]}")
 
@halirutan Hm, it doesn't seem to like StringRiffle's output.
StringJoin::string: String expected at position 2 in - !<MatrixTransform>{matrix:[<>StringRiffle[{0.782501,0.147614,0.034668,0,0.246704‌​,1.05734,-0.304047,0,0.013916,-0.405457,1.21603},,]<>,0,0,0,0,1]}. >>
Thats whats wrong
StringRiffle is undefined
 
@GiantCowFilms Which version are you using?
 
Ah yes, I have an older version
 
@GiantCowFilms Hehe..
 
@halirutan Just about to say, an old one. Not sure. But its old
Version 10
 
3:34 AM
@GiantCowFilms But you have Riffle, right?
 
@halirutan yes
 
@GiantCowFilms OK, here is the answer, but you might want to try yourself to use Riffle and implement a stringRiffle.
Use Map, Riffle and StringJoin.
If you cannot do it, you can evaluate this code and get the answer:
Import["http://halirutan.github.io/Mathematica-SE-Tools/decode.m"]["http://i.stack.imgur.com/mqo8C.png"]
I'm on the run.
 
Try this: StringTemplate[" - !<MatrixTransform> {matrix: [`mat`]}"] @ <|"mat" -> ExportString[{Flatten[First[AffineTransform[matrix]]]}, "CSV"]|>
 
@halirutan Thanks so much
@J.M. Two solutions! My word
halirutan's is a bit more clean, so I'll run with that. But thanks.
Okay, I gotta run too. Getting over the flu, so I shouldn't be staying up to late.
 
4:28 AM
@GiantCowFilms You're welcome.
 
 
5 hours later…
9:12 AM
If people can confirm it and agree that it is a bug, please go ahead, tag it, and add the bugs header.
@yode Please use this and test it with your excel sheets. I cannot test much on Windows. If you find any issues, however minor, let me know. dropbox.com/s/qtnbu6yh37rxz79/TablePaste-0.91.0.paclet?dl=0
I am a bit frustrated that making a palette as simple as this already exposed not one, but two issues that needed to be worked around: mathematica.stackexchange.com/q/141776/12 mathematica.stackexchange.com/q/141871/12
 
9:46 AM
@Szabolcs welcome to 'more than Manipulate' gui programming in Mathematica :)
 
10:03 AM
@yode Sorry, use this instead. My first link won't work anymore. I consider this final, so let me know of any issues (or suggestions).
 
10:20 AM
@Szabolcs I have tested it in my windows 10 with 11.1.It work well.Actually I even cannot find any difference with your last version..
They are both work well for me.
 
11:15 AM
@yode Thanks! Here's the final version then: github.com/szhorvat/TablePaste
 
How to make Query filter, so that this:
<|"a" -> 1, "b" -> 2|> // Query[{"a" -> f}]
<|"a" -> f[1], "b" -> 2|>
would return <|"a" -> f[1]|>
 
 
1 hour later…
12:31 PM
@Kuba <| "a" -> 1, "b" -> 2|> // Query[KeySelect[# == "a" &] /* Map[f]]
 
@Edmund something more general is needed, e.g. association contains keys a,b,c,d,e and you have mapping rules for a,c,e, like {"a" -> f, "c" -> g, "e" -> h}, though this specification form is not a must.
 
12:49 PM
`maps = {"a" -> f, "c" -> g}; <|"a" -> 1, "b" -> 2, "c" -> 3|> //
Query[(KeyDrop[#, Complement[Keys@#, Keys@maps]] &) /* Query[maps]]`
 
@Edmund quite long :) but thanks.
 
@Kuba Well, you wanted a general case. :-)
Shortened it : `<|"a" -> 1, "b" -> 2, "c" -> 3|> //
Query[KeyTake[Keys@maps] /* Query[maps]]`
 
 
2 hours later…
2:32 PM
@Kuba Perhaps <|"a" -> 1, "b" -> 2|> // Query[<|"a" -> "a" /* f|>]?
 
 
2 hours later…
4:46 PM
Something interesting here:
5
A: Error changing Dataset using Part

Taliesin BeynonI have implemented the underlying kernel functionality that is needed to make this possible. However it is not yet implemented on the Dataset side. I don't think this will happen in the immediate future owing to other priorities. Here is a stop-gap that implements a simple version of mutable upd...

Language`SetMutationHandler
 
@Szabolcs I try to look how do you implement that TablePaste here,but I have seen nothing but RowBox...:)
 
5:10 PM
@yode I was lazy and I used a notebook. Click click the Raw button on that page, and save it.
Then open the notebook.
 
@halirutan Regarding the DateValue[{2017,1,1},"Week"] issue, it turns out that is by design. According to ISO that day was part of the 52nd week of 2016. I told them I was concerned about how many detours it took me to find the proper way to chart average weekly values. I suggested maybe a more prominent example in the DateObject docs.
 
5:48 PM
I am trying to run mathematica code on HPC and I am getting this message: "Updating from Wolfram Research server ..."
Why am I getting this message?
 
@psimeson Just wait for a moment,and cherish that time.Because you will not see it again after this time. :)
 
@yode... I waited for three days :) but no luck... that's the on;y thing that I see on my output file
 
@yode I was also wondering about the use of BinarySerialize, and I do not think that the motivation was space efficiency.
 
@Szabolcs Have you seen this comment?I think that make sense maybe.
Oh,I just mean this part: faster to revert using BinaryDeserialize
@Szabolcs
 
It has an option to optimize for speed or size, did you play with those?
 
6:04 PM
@Szabolcs You are not in 11.1?That PerformanceGoal -> "Speed" is not very useful here.
Of course,PerformanceGoal -> "Size" work well
 
6:24 PM
I posted a somewhat related question here, right now: community.wolfram.com/groups/-/m/t/1053802
 
6:41 PM
@WReach Yes :)
 
 
1 hour later…
8:01 PM
And now we also have NDArray, which seems to be the default data type for neural networks.
it is similar to numpy's ndarray, but allows computation on GPU.
 
 
2 hours later…
10:13 PM
MPM beta: github.com/kubaPod/MPM will try to upgrade it as often as possible, feedback appreciated. Extended discussions in PackageData.net chat room
 

« first day (1904 days earlier)      last day (2586 days later) »