« first day (2322 days earlier)      last day (2851 days later) » 

00:03
re-cbg
 
1 hour later…
user1118051
01:10
hey guys
user1118051
@PM2Ring wow. thats sounds very serious. wish her and you all the best. I'm sure she can overcome it.
user1118051
how can i change the format of timeit.timeit in python console
user1118051
>>> timeit.timeit('l[100000]', setup='l=range(1000000)')
0.14162550005882224
user1118051
its not very readable
05:31
morning cbg
06:06
cbg
Yesterday was messed up at work. Everything crashed at one time
errors?
06:23
@KevinMGranger I retain my info on stack overflow
and I get rep for it.
Too bad I can't upvote myself when I find my answer useful :(
06:44
any advice now i am going to learn datascience
did a lot of scrapping and making api's
em starting getting bore
so any advice where i start learning datascience
data science is cool because you can call yourself a scientist. This is coming from a computer scientist
07:05
em also a computer scientist:p
so whats the first step for data science
i know python
now learn Math
then relearn Python
libraries?
that used in data science
i am going to learn those
first, learn the math
libs are easy to pick up
i know about math
calculus linera algebra cal 2 numerical computing etc
that's not enough though
let me find a book
This is good for machine learning stuff
but its in R
not in python
@SohaibAsif statistics is what is essential
Without knowledge of stats, a data scientist is just like a script kiddie.
@SohaibAsif doesn't matter
so first start learning stats
thanks @khajvah @AshishNitinPatil
08:11
anyone knows why [edit] is greyed out?
Does anyone know about this error: 'ufunc 'subtract' did not contain a loop with signature matching types dtype('<U32') dtype('<U32') dtype('<U32')'
It is related to data type of the dataset i think
which is float in my case
i tries setting dtype=float
but it didnt work
any suggestions?
thank you
metrics.accuracy_score(label_test,knn_pred) is where i am getting this error
i am using sklearn to try out some ML algos on my dataset
The most elegant way is to upgrade to Python 3. — Antti Haapala 34 secs ago
hmm
I got an idea about a web site that I could do :D
mojibake detection
you paste in text and it suggests which codepage is used to produce that mojibake
09:04
Reviewing Close votes takes ages...
This should be one of the reason for the number of pending reviews... 8.6K as of this moment.
@AshishNitinPatil there were way more, 50Kish not so long ago
but yeah, they age too fast.
09:27
Ooh, thanks for the info! I had not considered the ageing.
cbg
cbg
I am trying to make web crawler which notify me about weather with location from google.
for getting location I need to find id = wob_loc
for which I did something like this
location = soup.find('div',{'id':'wob_tm'})
but that returns None!
So how can I get text?
wob_loc vs wob_tm?
wob_loc will give location and wob_tm will give temperature
but I am getting None for both
then it is not a div...
>>> s = bs4.BeautifulSoup('<html><div id="wob_loc"></div></html>')
>>> s.find('div',{'id':'wob_loc'})
<div id="wob_loc"></div>
09:41
<div class="vk_gy vk_h" id="wob_loc">Pant Nagar, Ghatkopar East, Mumbai, Maharashtra</div>
or you have the same id multiple times
ah no, not even that...
you're using bs4?
yes
(and if you aren't, then upgrade)
as you can see from the code above, it works.
there is something fishy
I tried printing html...it's getting correct one
@AnttiHaapala is it something google thing?
because I am using google for getting weather google.co.in/search?q=weather
Cabbage!
(I didn’t already say that, did I?)
09:52
cbg
@poke you did, on another day.
@Freddy idk, print the source you're souping yourself...
perhaps it is a page that tells "Hey Freddy, roboting google is not ok"
or perhaps that weather comes from javascript
@AnttiHaapala pff :P
10:41
problem solved....when I tried printing source html code was bit different
so now I first get a html code in a file and then parse that file
Joe
Joe
if I want to same a matrix as following : save(matrix,x); and x is equal to 1.. then I want to repeat the measurements and save : save(matrix,x); there x=2 now ,, matlab complains because x is a number ,, how to fix that?
in matlab
hey guys how to install eyed3 package on mac?
@Joe This is the python channel, unless instead of Matlab you're really talking about numpy.
I'm really new on python and mac
I wanted to run this command:
python audioAnalysis.py trainClassifier -i classifierData/speech/ classifierData/music/ --method svm -o data/svmSM
but it says ImportError: No module named eyed3
how to install eyed3?
10:57
You can simply do - pip install eyed3
If you need help on installing pip then you can refer to the answers on this page - stackoverflow.com/questions/17271319/…
Brew is your savior
Joe
Joe
I have a simple ques in matlab
about save a matrix
look at this code
@PomeGranate pip install <whatever u want to install>
Joe
Joe
How can I save the new matrix : out .. in a new file and then continue running the code?
you have any idea?
@IljaEverilä
@Joe I think this is just a matlab question, unrelated to python. You may not get the required help here.
Joe
Joe
@ there is no one active in matlab room
so u dont have an answer
11:08
Cabbage
@Joe Just from a quick google search, you may try fprintf or save
@Joe Your question is off-topic for this room. It's not our fault that there's no one active in the matlab room. You should still post your question there and hopefully someone will see it in the next day or so.
Do SE chat rooms have a mailing list or something?
Joe
Joe
@AshishNitinPatil true ,, but I did that... I acually want to save a new file for each measurement after that the for loop is finished
I have a while loop and the code runs continously
I want to save a new matrix called out in each time
@AshishNitinPatil Some might, but it's not a standard feature. However all chat messages are archived, so they can be accessed via the transcripts. Many room regulars skim the transcripts for interesting messages that were posted while they were offline.
11:16
@PM2Ring Ohk, thanks!
@AshishNitinPatil If you wish to assist Joe with this question please do so in the Matlab room.
@PM2Ring ok, but doesn't look like I might be of much help.
11:33
If this question were related to python instead of R, would it be closed? stackoverflow.com/questions/42409523/…
All close votes were cast by SO users with mostly R-related posts, but the review history showed last 3/4 reviews as "Leave Open", thus asking.
The 3/4 users (myself included) were all "non-R" users, just checked.
@AshishNitinPatil Probably. Questions that can be answered by simply reading the docs are not very welcome on SO. OTOH, if the OP has difficulties understanding the docs, and posts some relevant code, then the question is more likely to get a positive response.
@PM2Ring Ah, did not take into account the ease of finding the solution, was instead focusing on being "off-topic". Thanks!
We expect people to search the docs, and SO, before they ask a question. Of course, it can be hard to search effectively if you don't know the appropriate search terms, and we try to take that into account. But that OP knows that the relevant OOP keyword is "super", so they have no excuse.
In fact, they're very lucky that they didn't get multiple downvotes for "does not show any research effort".
Yep
@AnttiHaapala Fast ageing means more redundant / low-quality questions still persisting on SO?!
But I guess, it's a difficult trade-off to consider
12:00
@AshishNitinPatil The theory is that it's more important to deal with fresh questions than old ones. If a bad question is attracting bad answers we want to deal with it quickly. But if a bad question is basically being ignored it doesn't matter so much. Hopefully, if a bad question is attracting answers it will also attract the attention of people who will flag or close-vote it.
Yeah, that should weigh heavily on the list of things to consider
 
1 hour later…
13:11
I wonder if they've unleashed it on SO already...
guys i have a quick question
does anyone know how you pass back to two pieces of data in django
response = HttpResponse(xml_news, content_type='application/xml')
response2 = HttpResponse(xml_news2, content_type='application/xml')
return HttpResponse(response)
in the HttpResponse i want to return response and response2
Why would you require to pass 2 responses?!
@IljaEverilä Hmmm. The ultimate cargo-culting tool. And it's hardly writing it's own code, is it?
because i have requeseted two pieces of xml data and stored them in 2 variabels
xml_news
and xml_news2
i need to return both of these in the response
13:27
Not meaning to sound nasty Rhys, but that's relatively trivial to do in Django.
I suspect this is the point where you should really be picking up the Django tutorial and really getting to grips with it
i have been watching tutorials and going over this for the past 4 days
so far i havent found how to do it
thats why i thought i would try here
@PM2Ring The headline is quite misleading.
That's rather typical for New Scientist.
Here's what I'd do. Before even thinking about response objects, I would take my two xml objects and combine them into a single xml object. I don't know how specifically that would be done, but I assume any good xml library has a way to turn <a>b</a> and <c>d</c> into <a>b</a><c>d</c>. Then I would take that single xml object and put it into a single HttpResponse object.
I would be tempted to not use HttpResponse objects
13:32
This is the same approach that Python programmers take when they need to return more than one object from a function call. return a,b takes a and b, combines them into a single tuple, and returns that single tuple object.
Man, I used to like the clarity of the Django tutorials. What've they done to the 1.10 tutorial?
It's thanks to optional parentheses for tuple literals, and thanks to argument unpacking, that most people don't even know that a tuple is involved in the process at all
"if executing pip with sudo, you may want sudo's -H flag."

what does that mean?
@RhysCopperthwaite Long story short, depending on what you're actually wanting to do with the xml objects, look into render and Django's templating system
what does -H means?
13:34
Did you check the sudo documentation?
No idea what why they bang on about HttpResponses for so long in the tutorial, since that's generally not the best way to go.
@IntrepidBrit Reminds me of a lot of OpenGL tutorials I read in years past, which all start you off with a suite of matrix-manipulating functions that no "real" graphics program actually uses, apparently. They're just easier for newbies to grasp.
thanks guys i will look into this stuff now !
I do think there is a practical sensibility in getting readers from "nothing" to "successfully rendered a (triangle | web page) on the screen" as fast as possible, in order to encourage them, even if they have to un-teach some things later.
This is assuming that HttpResponses are actually easier and/or faster than the right way to do it
I can get on-board with that style of teaching - nothing worse than learning, learning and learning without having anything to show for it and turning people off to what they're trying to learn
13:37
@PomeGranate Apparently it means:
 -H, --set-home
    Request that the security policy set the HOME environment variable to the home directory specified by the target user's password database entry. Depending on the policy, this may be the default behavior.
Which, uh, hmm. Why does pip need that?
But the problem is the HTTPResponse is just that, a little better than a raw http response. I'm a bit rusty on my Django, but you can't do all the really important things like protecting against cross site scripting attacks etc
@Kevin thx I read that, but don't know exactly what it really means

I tried to install "sklearn.svm" with pip
sudo pip install sklearn.svm
I think in the old tutorials, they endeavoured to put you onto templating system pretty promptly
but it says: could not find a version that satisfies the requirement sklearn.svm (from versions: )
Mysterious.
13:40
no matching distribution found for sklearn.svm
what is sklearn.svm meant to be?
@IntrepidBrit I try to run this code
morning everyone
Maybe it's registered under a different name in pypi. What if you try to install sklearn instead of sklearn.svm?
13:41
python audioAnalysis.py trainClassifier -i classifierData/speech/ classifierData/music/ --method svm -o data/svmSM
Neat, I didn't know you could pip install multiple libs in one command.
wow you can do it on one line?
haha me either
Awesome. It's not often Kevin learns something from me
Interesting read if you're in to security
Are you using a virtual environment?
@IntrepidBrit do you have an idea?
I mean, I know you're not, but that's a polite way of asking if you know about them xD
no I dont have hmm
haha
thx for asking
ehm
now it seems to have everything installed
Basically, if you use a virtual environment, you won't need superuser privileges to python packages stuff to your environment
13:51
very strange... I just re entered the comand and now it says Req. already satisfied: ....
It's a good practise that could save you a lot of headaches in the long run
hmm ok - I have just no idea how to set a virtual environment
new to mac and python
but thank you for your support ^^ it worked now
til now
Oh dear
Ana
Ana
hi everyone, sorry i am trying to look for some help i am a begginer in python and i am tryign to retrive some data from a website using Selenium, i am facing some issues. Can anyone help me please?
hi deer
Ana
Ana
14:00
is anyone available?
I'm available but I have no idea
I don't know anything about Selenium, alas.
maybe you tell us a litte more about your problem
Ana
Ana
Oh ok sure thank you
Hey @Ana! Welcome to room 6!
Ana
Ana
14:01
Thank you
room 6? oO
If this is in reference to your recent question then it's definitely out of my depth.
What's your overall goal? Why are you using selenium to get data from a website
Ana
Ana
Yes it is in reference to the question, thank you
@idjaw Ok, so it takes 6,600 computer-years to create a SHA-1 collision if you have control of both docs, and 100,000 times longer if you're brute-forcing the second document. That's not a huge risk, but it is good evidence to encourage people to move away from SHA-1. OTOH, as article mentions, it's been known that SHA-1 is vulnerable with current technology for several years.
Ana
Ana
14:03
My overall goal is to get the data from the website to then make a visualisation of it. The website shows animal population data by year but first it shows a selectable field to select the year then after this has been selected it loads a table with the information for that year
what i want is to get that information for all th years so i am trying to get the website to select one year load the table, select the next year and again select the table....and so on for each year available in the year field options
but so far i can't make it work
For the problem you mention in your comment, it may be worthwhile making an entirely new question for just that. Answerers tend to get discouraged when they post something and the reply they see is "that works, but now I have this other issue..."
Ana
Ana
oh ok i get it makes sense thank you
sorry!
will post a new entry then :) thank you
The reason why we encourage people to do that is to help produce high quality questions and answers that will help everyone :)
Ana
Ana
Thank you
OTOH, that just refers to a simple SHA-1 hash. It has virtually no impact in its use in algorithms that use repeated hashing like HMAC, where even the old MD5 is still quite safe.
14:09
@PM2Ring Yeah, the real world risk is not quite there. But the computation data was pretty interesting
@PomeGranate Going back to your sudo comment, you generally don't want to use sudo
It's far too easy for things to break
@PM2Ring Every time I read a news item like "vulnerability in security algorithm discovered", I mentally replace "discovered" with "publicized". I just assume that shadowy government agencies discovered it years ago.
And it's only now getting out because some NSA drones finally discussed the algorithm in enough detail by the potted plant that Bruce Schneier dropped a hidden microphone into years ago, that it could be reverse-engineered by private citizens.
@idjaw I wonder how long those computations would've taken back in 1995 when SHA-1 was first published...
@PM2Ring zoom in to an old computer sitting in the basement of an old warehouse still chugging numbers
@Kevin Wikipedia says that knowledge of its vulnerabilities were known back in 2005. However, that's a far cry from being able to produce a pair of colliding documents. Especially if you want the documents to appear to be normal documents and not just a bunch of gobbledygook.
14:18
Yeah we're going to need way more potted plant microphones if we want a practical exploit.
\o cbg
Kevin... I forgot to ping you but I was not hungry again 2 hours after eating Chinese food
@idjaw Make that 1000 old computers sitting in the basement. Or at least a cluster of supercomputers. IIRC, people were starting to use GPUs for non-graphic computations back then, but of course GPUs have increased in speed and power quite a bit since then.
Chinese food fill you
until you have no place left
going back to work
14:25
@MarcusS cbg ;3 \o how goes it
@MooingRawr Yes, but you did eat enough food in one sitting to last a typical small Chinese family for a week...
@PM2Ring what ?!?!?!?! o.o It was only one rice dish, a friend noodle dish and a soup :( Don't tell me, I'm that fat ;(
Just kidding. :D
Could someone with the appropriate privileges un-duplicate this question? They aren't duplicates, they have similar symptoms to different problems.. stackoverflow.com/questions/26045113/…
14:35
Hmm, ok, voted
Thank you Kevin
there are other dups for that question xD
I know, I wanted to un-dupe it from the wrong one so I could re-dupe it to the right one
:)
I've been bamboozled into a reduping ploy once again
>bam·boo·zle
Origin
early 18th century: of unknown origin.
14:37
Actually flaschbier's answer on that one is pretty good, maybe this one should be the dupe-receiever
@MackM. I agree with you. And I see that Kevin's already un-hammered it. But I'll link the old target to the newer question with a comment.
D: I wanted to know where it came from :(
The feeling of having your tests pass after a long rebase and merge conflict is faaaantastic
If you think about it, most words have an unclear origin. Even if you can trace their lineage back to ancient Sumerian or whatever, you still don't know where the Sumerians got it from.
The exception being onomatopoeias. The origin of "moo" is from cows, because cows go "moo". (approximately)
:( one day, we will find out. Or rather I hope we do...
@idjaw congratz, xD At least one of us is moving forward.
14:41
@IntrepidBrit why? what can break?
I don't think we're going to learn anything more about prehistory unless we can invent a way to turn dust back into clay tablets
#timeTravel!
\o cbg Antti how goes it :D
> When you run pip with sudo, you run setup.py with sudo. In other words, you run arbitrary Python code from the Internet as root. If someone puts up a malicious project on PyPI and you install it, you give an attacker root access to your machine. Prior to some recent fixes to pip and PyPI, an attacker could also run a man in the middle attack to inject their code when you download a trustworthy project.
6
14:46
Not even physical time travel is necessary, necessarily. You just need a time-looker-backwards-tube so you can peek over the shoulder of Mesopotamian scribes.
That's taking a paranoid perspective on it, but I take a "humans are fallible" perspective
We merely need to extrapolate the complete state of the universe, present and past, by carefully observing a single slice of fairy cake
@IntrepidBrit Is there also a possibility of conflicting dependencies if you install everything as root rather than into a virtualenv?
14:59
Definitely.
Although you can muddle through, like I used to until Fizzy bullied me into doing it properly
I say bully, I actually mean "used logic and reason"

« first day (2322 days earlier)      last day (2851 days later) »