Christopher2222

MaplePrimes Activity


These are replies submitted by Christopher2222

@Preben Alsholm I agree.  I made a recent post about spam attacka again before I noticed this post.  Funny thing how a mathematics forum is easily spammed isn't it?  You'd think it would be the hardest to spam. 

I recall reading about the mapleprimes administrators saying something like the forum will take care of itself.  Meaning us, we mapleprimers have to continually clean this forum up.  Which also tells me mapleprimes administrators aren't going to fix the issue or fix the underlying issue. 

I think if the spamers are actual people and not bots the issue is a bit harder but I believe the issue lies in the security of creating new accounts.

@acer valuable information.  Thanks for the in depth examinations.

@dsh1 I currently can not see your images.  All I see is a small computer icon with an x on the monitor part. 

Interesting graphical analysis.  Just a quick comment .. based on performance gains it's hardly worth devoting more than 4 of 5 cpu's to a task, unless for some reason a deadline looms and calculations are required to be completed before a specific time.

As a side comment I wonder if two dual core processors (two physical processors with two independent cores each) would outperform a quad core processor (single processor with four independent cores).

@Carl Love ok FileTools:-Text:-Close or fclose.  Thanks

I got the URL:-Get to work once.  Thanks Stephen but the website seems to be offline again.  However while I had the data I was able to produce some code like this ..

propane := proc ()
  uses StringTools
  local data, a:
  data := URL:-Get("http://www.fuelsonline.ca/"):
  a := SearchAll("PROPANE:", data):
  cat("The price of propane on ", FormatTime(), " is ", data[a+41 .. a+42], data[a+48 .. a+49], " cents");
end proc:

Unfortunately I could not test it properly to see if works as the website is offline. Should it work properly I expect it's output today to be as follows:

propane()

       "The price of propane on 2016-07-26 is 39.9 cents"

 

It appears I can't even access the webpage at all right now.   It must be offline.

If I add the options redirections=3 I get much more information but not exactly what's on the view source webpage.  So I'm still stuck.

@Stephen Forrest Using data := URL:-Get("http://www.fuelsonline.ca/");

I get document has moved.  I can't figure out how to proceed from there.  I can't figure out the User-Agent settings properly to work.  Can an example be provided?

@Axel Vogt Then what would be the point of Maple having HTTP[Get] or the sockets package?

I suppose in some cases there would be times it would be better to use something other than Maple.

Nice little statistical visualization but those are cheap house prices!  Where do you find deals like that?

I grabbed some data around the nearest city

bedrooms := `<,>`(3, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4):

area := `<,>`(1176, 1300, 1370, 800, 2300, 1633, 1646, 1200, 1978, 2036, 2678):

price := `<,>`(314900, 199900, 185000, 179000, 619000, 374900, 419990, 599000, 439990, 439990, 519990):

HouseSalesData := DataFrame([bedrooms, area, price], columns = [Bedrooms, Area, Price])

Matrix([[``, Bedrooms, Area, Price], [1, 3, 1176, 314900], [2, 2, 1300, 199900], [3, 3, 1370, 185000], [4, 3, 800, 179000], [5, 3, 2300, 619000], [6, 3, 1633, 374900], [7, 3, 1646, 419990], [8, 4, 1200, 599000], [`...`, `...`, `...`, `...`]])

(1)

Aggregate(HouseSalesData, Bedrooms, columns = [Price])

Matrix([[``, Bedrooms, Price], [1, 2, 199900.], [2, 3, 348798.333333333], [3, 4, 499742.500000000]])

(2)

Aggregate(HouseSalesData, Bedrooms, tally)

Matrix([[``, Bedrooms, Area, Price, Tally], [1, 2, 1300., 199900., 1], [2, 3, 1487.50000000000, 348798.333333333, 6], [3, 4, 1973., 499742.500000000, 4]])

(3)

Aggregate(HouseSalesData, Bedrooms, function = Statistics:-Median)

Matrix([[``, Bedrooms, Area, Price], [1, 2, 1300., 199900.], [2, 3, 1501.50000000000, 344900.], [3, 4, 2007., 479990.]])

(4)

with(Statistics):

ByRooms := SplitByColumn(HouseSalesData, Bedrooms)

[Matrix(2, 4, {(1, 1) = ``, (1, 2) = Bedrooms, (1, 3) = Area, (1, 4) = Price, (2, 1) = 2, (2, 2) = 2, (2, 3) = 1300, (2, 4) = 199900}), Matrix(7, 4, {(1, 1) = ``, (1, 2) = Bedrooms, (1, 3) = Area, (1, 4) = Price, (2, 1) = 1, (2, 2) = 3, (2, 3) = 1176, (2, 4) = 314900, (3, 1) = 3, (3, 2) = 3, (3, 3) = 1370, (3, 4) = 185000, (4, 1) = 4, (4, 2) = 3, (4, 3) = 800, (4, 4) = 179000, (5, 1) = 5, (5, 2) = 3, (5, 3) = 2300, (5, 4) = 619000, (6, 1) = 6, (6, 2) = 3, (6, 3) = 1633, (6, 4) = 374900, (7, 1) = 7, (7, 2) = 3, (7, 3) = 1646, (7, 4) = 419990}), Matrix(5, 4, {(1, 1) = ``, (1, 2) = Bedrooms, (1, 3) = Area, (1, 4) = Price, (2, 1) = 8, (2, 2) = 4, (2, 3) = 1200, (2, 4) = 599000, (3, 1) = 9, (3, 2) = 4, (3, 3) = 1978, (3, 4) = 439990, (4, 1) = 10, (4, 2) = 4, (4, 3) = 2036, (4, 4) = 439990, (5, 1) = 11, (5, 2) = 4, (5, 3) = 2678, (5, 4) = 519990})]

(5)

BoxPlot(map(proc (m) options operator, arrow; m[Price] end proc, ByRooms), deciles = false, datasetlabels = ["2 bdrms", "3 bdrms", "4 bdrms"], color = ["Red", "Purple", "Blue"], size = [800, "golden"]);

Download houseprices.mw

 

Maplesoft should have a version 6 lying around shouldn't they?

Thanks for that simple solution. 

I can't figure out for adding the stat for a team that makes it to the final match but looses.

How do we continue a simulation if we already know a few of the winners in the round of 16?  How can we modify the code?

@Markiyan Hirnyk thanks Markiyan!  I thought I asked that question but I could not locate it.  Thanks for pointing it out, but there wasn't any code presented in the other post. 

First 51 52 53 54 55 56 57 Last Page 53 of 155