« first day (70 days earlier)      last day (3165 days later) » 
05:00 - 19:0019:00 - 22:00

7:02 PM
yes :)
ok, reduced my byte count from 182 down to 157. very nice.
This one
3
A: The Margin is too Narrow

rayryengPython 2, 182 161 157 bytes I usually answer in MATLAB, but because there are already two solutions in that language, I'd figure I'd try another language :) def f(c,x):print(max([('%d^%d + %d^%d < %d^%d'%(a,x,b,x,c,x),a**x+b**x) for b in range(1,c+1) for a in range(b,c+1) if a**x+b**x<c**x],key...

I couldn't answer in MATLAB because there are two solutions already :( lol. Had to pull out my Python muscles.
 
darn, 38 chars is ridiculous :P
 
lol yeah I decided to make it into a function, rather than make it accept user input from standard in.
By doing that, it shaved my byte count significantly. We're allowed to make it a function
 
ah, Dough is asking documentation questions again
 
The 3D image person?
ohh.. Doug Null lol
 
if you all vote down that image guy (well, 2 more times) I'm in league for reversal at least :P
 
7:11 PM
:D I forgot. how many votes do you need for reversal?
upvotes on your answer.
 
+20 on a -5 question if Im not mistaken
 
oh boy lol
I showed you Amro's Neural Network post right?
 
did Shai get it on that battery question? He got to +10 on -8 last time I checked
yea, you did
 
I'm gonna try and spread it around. Get people to vote.
 
Shai's one is definitely worth it
Ive got the feeling some badges arent worth their colours. I see people with multiple gold and solver badges, only on famous questions for instance
and rep less than 500
 
7:16 PM
yup...
There are some badges you can get quite easily that are Gold more than others.
I believe there's one where you need to vote 500 times lol
 
jup
I've very ambitiously put 'refiner' as my next badge. I like that one
 
oh :D. Yes, I'm trying to get that as well
I put Epic next to mine.
 
you do deserve that!
I falgged that as a duplicate, got disputed, then the gold badge swoops in and does it single0handedly
 
hey anybody as some experience in probability theory ?
 
having a gold badge in Facebook... does he have no friends?
@ninja a bit, shoot
 
7:23 PM
p(a.b) exist but if u want to find out p(A) then its equal to ....integral{p(a,b) db}
for all b
how?????????
srry p(a,b)
 
chance for a given b?
or is p a function of a and b
 
yes
the later one
 
P{a|b}
 
no
p(a,b)
 
in the latter case, just integrate from minus inf to positive inf over de function with respect to b
 
7:25 PM
okay ;)
 
no no hw
is this true
p(A) then its equal to ....integral{p(a,b) db}
hw probaility of one varibale is comming out from the probailty of two varibale in a function
universla fact or concept?
 
Brunn's formula isnt it?
 
i have no idea just readin g abt robotics SLAM
there they mentioned this
 
@rayryeng I cant find that answer of Shai at the battery question anymore...
 
@Adriaan - let me try
I don't see it in his history. It must have gotten deleted.
 
7:41 PM
trying to hand-solve PDEs after 19:00 is not a good idea in my case. Buh
aww. It was ridiculously good. Should've been his reversal badge
 
I know :( I don't even remember what it was called either.
 
something with rotating the picture and then getting the size of the battery in pixels
an idea I got the last week: would it be beneficial to create a least-squares Q/A for MATLAB?
 
in what context?
 
@Adriaan is there a matlab golf ?
 
@Agawa001 - If we do it, it'll probably be here only.
There is a dedicated Code Golf website
 
7:45 PM
@Agawa001 there's that homework question of the OP somewhere, but Stewie already stumped us with an 18 char code, and beaker with a 14 char octave code :P
 
@rayryeng i know, i had already a history of matlab/C submissions
 
mine was only 16
 
ah, sorry
the only golf Im good at is with my waterpolo team. We usually end up 20-1 or something :P
 
I'm late to the conversation so I probably missed what you talked about earlier.
oh :D
 
oh, you meant golf sport
/me sneaks away
 
7:48 PM
@Agawa001 Are you looking for something like Cody?
 
I usually answer the golf questions in MATLAB, but there was a question that had 2 MATLAB submissions... had to use another language lol
Oh MATLAB Cody could work.
 
@beaker neat!i can improve my golfing skills there :D
 
@Agawa001 - Be wary that a lot of people know how to circumvent the system lol.
They exploit bugs in the code length evaluator.
As long as you get below the average, you're solid.
 
Yes, a lot of them game the system
but that doesn't mean that you can't submit your own more realistic results :)
@Agawa001 I'll pass along a tip I learned from Amro...
when writing a function, don't set a return value...
just put the result in a variable called ans
 
@beaker that's so sneaky :P
 
7:55 PM
that'll usually lower your score by 1 ;)
@Adriaan Yep, that's how they roll
 
Yup. Make the output variable ans :) One of the tricks.
 
there's my problem. I do not roll, I walk
 
I'm working on "stroll". I haven't got it quite right yet.
 
@beaker easy way to learn to stroll: walk with coffee in hand. You can't properly walk or your coffee will spill all over, so you'll have to walk like a laid-back surfing dude
 
in flip-flops?
 
8:00 PM
I won't, since I hate those toe-cutters
I prefer loafers and a tweed
 
just so long as I know
 
LOL
 
I shall begin my training forthwith
 
@beaker go forth, and walk with swag! Believe in yourself, and you will succeed
hmm, speaking about tweeds, I do need to fill the cigar pockets ...
 
8:24 PM
it's still a bit warm here for tweeds
a bit warm here for loafers, to be honest
 
go live on the Arctic circle ;)
 
i intend to
 
You do not wear a tweed for warmth, you wear it because of the pride of being English!
(not that I am)
neat, where on the circle?
 
8:37 PM
Iceland, for a start ;)
of course i've been saying that for 5 years ;)
 
ah, been there last summer. Wonderful country
bit expensive for my taste though
 
rats, thought i had a new code golf trick... turns out it's 1 byte longer :(
 
Iceland's got only one very small island (inhabited by puffins) on the Arctic circle though :P
 
I like puffins, but they do smell a bit
 
and give of too little meat. Good meat, but I'd rather have a proper whale steak
 
8:40 PM
whale steak? woah lol
 
best perk of living in Iceland
minke whale steak with Viking Classic beer
much better than the rotten shark they've got lying around in their own urine for tourists, blègh
 
i do like shark, but... um... fresher
 
exactly!
French guy in my common kitchen in Luleåpulled open a can of sörströming, Swedish herring. It says on the tin 'open outside under water', but he didnt, so my kitchen smelled of rotten fish for a month >.<
 
ugh lol
Open outside under water? That MUST stink
 
Surströmming (pronounced [ˈsʉ̟ːˌʂʈrœmːɪŋ], Swedish for "soured herring"), is fermented Baltic Sea herring that has been a staple of traditional northern Swedish cuisine since at least the 16th century. Just enough salt is used to prevent the raw fish from rotting (chemical decomposition). A fermentation process (which converts sugar to acids, gases, and alcohol) of at least six months gives the lightly-salted fish its characteristic strong smell and somewhat acidic taste. When opened, the contents release a strong and sometimes overwhelming odour; the dish is ordinarily eaten outdoors. According...
I misspelled, apologies
 
8:47 PM
Soured herring. Yuck lol
 
I love the legend about its origins. Swedish merchants sailed back to Stockholm and stopped at the Ålands (Finnish islands) to trade. The islanders wanted food, but all the Swedes had left was rotten herring. They thought "oh well, they're only Finnish. They won't know the difference", so they sold them the herring.
When they returned half a year later the islanders swamped them to get more of that delicious fish they had brought last time and offered outrageous prices
with that story I'm waving my hat at you and going to bed. Tomorrow will be another fun day of solving PDEs.
good night y'all
 
g'nite
 
good night!
 
9:05 PM
I'm sure there's a matlab command to generate this matrix:
12
Q: Show tree rings age

Juan Carlos OropezaIntroduction Yesterday I saw a birthday puzzle. Congrats!! Also this week I watched an episode of the TV show Bones where a dead body was found buried under a tree. To calculate the time of death, they counted the tree rings. Tree rings form because trees grow slower during the winter and fast...

I just can't remember what it is
 
oooo
let me see...
ok, so at each level, we use a different character.
I swear I saw a MATLAB Cody challenge that did something similar.
 
maybe that's where i saw it
pff
that's no good
 
no that could work
just throw in a mod.
 
too long though
 
I can't think of any other way to do it lol
 
9:13 PM
i was thinking there was a direct method or maybe a gallery matrix
 
ohhh
let me see
 
i wish the documentation for gallery had examples... it would make it much easier to scan :D
 
no kidding lol
can we use the image processing toolbox?
bwdist is perfect.
A(5,5) = 0;
A(3,3) = 1;
B = bwdist(A, 'chessboard')
B =

     2     2     2     2     2
     2     1     1     1     2
     2     1     0     1     2
     2     1     1     1     2
     2     2     2     2     2
 
what does it do for larger values, though?
 
It's relatively fast... here's what it is for n=10
well for a 11 x 11 matrix
ans =

     5     5     5     5     5     5     5     5     5     5     5
     5     4     4     4     4     4     4     4     4     4     5
     5     4     3     3     3     3     3     3     3     4     5
     5     4     3     2     2     2     2     2     3     4     5
     5     4     3     2     1     1     1     2     3     4     5
     5     4     3     2     1     0     1     2     3     4     5
     5     4     3     2     1     1     1     2     3     4     5
     5     4     3     2     2     2     2     2     3     4     5
 
9:18 PM
so we'd still need to do a mod()+1
 
yup
I'd run that through mod() + 1 and index into a character array
 
yup
hmm... gonna think on that some more
 
cool cool
 
but feel free to use that one if you want :D
for some reason i've started holding down the shift key when i hit enter
chat thinks i have more to say ;)
 
@beaker 63 bytes! :-)
0
A: Show tree rings age

Luis MendoMatlab, 63 bytes n=input('')-1;x='0*+';t=abs(-n:n);x(mod(bsxfun(@max,t,t'),3)+1) Example: >> n=input('')-1;x='0*+';t=abs(-n:n);x(mod(bsxfun(@max,t,t'),3)+1) 5 ans = ********* *0000000* *0+++++0* *0+***+0* *0+*0*+0* *0+***+0* *0+++++0* *0000000* *********

The Image Processing one is probably shorter!
 
9:25 PM
I'm 17 bytes over. I need to shorten it.
 
hey guys!
 
Is there a built-in function that places a 1 in the middle and zero elsewhere?
@OneRaynyDay - Hi!
 
I think I'll probably be doing some matlab stuff soon because of stanford's coursera for ML
 
It's a good course.
I did it 3 years ago, then did it again recently for review.
 
you guys think it's best to develop on matlab or octave? I probably won't be paying for it unless it's extremely good
 
9:27 PM
@LuisMendo Nice :D
 
MATLAB is good if you can afford it.
 
ah really? Sweet :) I don't have a ton of experience in linear algebra though
 
It has constant support and the toolboxes keep upgrading.
Octave is free, but development is slow.
 
Learned quite a bit of calculus(up to multivar), but no linear algebra
 
For Stanford's ML course, Octave is good enough.
 
9:27 PM
ahh okay
development is slow? You mean it's lower level software or just overall worse?
 
However, during the ML course, MATLAB is free to use.
development in terms of new features.
It takes a while for them to come up with new things, but it's a good alternative to MATLAB.
 
ahh gotcha
awesome. I think I'll try octave for now then ^_^
 
It'll be the same language (more or less) in either environment.
Linear Algebra I do. Just come and drop by and ask.
 
Awesome. Thank you so much ^_^
I probably won't bother you too much though, everyone's busy nowadays haha
 
haha no worries.
 
9:30 PM
maybe if I'm just really stuck on something
 
sounds good.
 
Oh and also, my name is Ray Zhang
Is yours Ray?
LOL
 
Are you intending to take the ML course starting this month?
uh.... no.
0:-)
 
oh. Darn I expected ray because of your username, and yep starting this month!
I'm looking up some caltech lectures on machine learning and I get really confused from the notations of vectors/matrices
 
hahaha yes it is. Just messing with you.
Notation in what way?
 
9:34 PM
@rayryeng riiight here: youtu.be/FIbVs5GbBlQ?t=44m8s
 
usually, a vector is represented as a N x 1 column matrix
so a matrix of only 1 column and N elements in that matrix
transposing means to make all of the rows columns and columns rows.
so doing a transpose operation on a column vector makes it a row vector... so it becomes 1 x N
 
ahhh I see
 
Stacking M of those 1 x N vectors on top of each other gives you a data matrix of M x N where each row is a single data point
and each column is one feature.
for example, in the case of Cartesian coordinates, a feature is one coordinate
so you could have a M x 2 matrix in the case of 2D, or M x 3 in the case of 3D.
 
so you mean like this? [(3,2),(2,5),(6,7)]
 
BTW the T as a superscript means transpose.
correc.t
you have 3 points and there are 2 features per point.
In Machine Learning, the data matrix is what you work with often.
 
9:36 PM
ahhh, gotcha. I thought it was ^-1 was transpose... but then again precalculus was years ago
 
That is the inverse.
that is finding a function such that x = f(y) given y = f(x)
 
Hmm.. I understand that in the sense of a single variable
 
In terms of linear algebra, ^-1 is to find a matrix B such that A*B = I where I is the identity matrix.
 
not so much in a matrix
Ah okay I think I understand that
 
did you learn linear regression by gradient descent yet?
or are you computing it by the pseudo-inverse still?
If and when you get to that point, I recommend you read this post
 
9:39 PM
I actually read up on gradient descent and pretty much understand it
it's basically using a unit Z vector of the derivative of the function of the hypothesis, right?
 
It's a post I wrote up a while ago on helping someone debug their linear regression via gradient descent algorithm
4
A: Machine learning - Batch gradient descent problems

rayryengThe error is very simple. Your delta declaration should be inside the first for loop. Every time you accumulate the weighted differences between the training sample and output, you should start accumulating from the beginning. By not doing this, what you're doing is accumulating the errors f...

 
ooh alrighty, one sec let me read it :)
 
yeah
the reason why the answer I wrote is useful is because it helps you compute it in a very MATLAB / Octave way.
ok I gotta get going actually. I'll be back later!
 
@rayryeng oh yeah no problem! Thank you for the link! have fun :)
 
05:00 - 19:0019:00 - 22:00

« first day (70 days earlier)      last day (3165 days later) »