« first day (2908 days earlier)      last day (2043 days later) » 

12:10 PM
I'm reading about password-based key derivation with PBKDF2 and I'm confused why it requires a salt as input. I thought salts were only used by one-way hash functions intended for storing the result somewhere so attackers can't use rainbow tables to figure out the original password. But the output of key derivation functions isn't supposed to be stored anyway, so what's the point of the salt?
For example if you used the output of the PBKDF2 function as the key for an AES encryption, there's going to be a random IV anyway. So what does the salt accomplish?
 
Hi there!
What companies in the UK use cloud services? I need a kind of database of more than 1,000 companies.
 
It doesn't look like the same question, but I'll read the answers anyway
 
Any ideas on where I may look for it?
 
@Aran-Fey yes, the question ain't same, but some of the answers shed light on the "why" of salt.
@БеляковаАнастасия Certainly not here I'm afraid (this is the Python room)
 
12:21 PM
The answer you linked seems to assume that the derived key will be stored, in which case the use of a salt makes perfect sense to me. I'm still processing the other answers though
 
@shad0w_wa1k3r Any ideas where ?
 
Maybe I simply misunderstood the purpose of key derivation functions as a whole
 
@Aran-Fey yeah, I am not aware of how much deep you are looking into it, but the answers on that do give away quite some details
You can certainly ask another (related but specific) question there :-p
 
1:14 PM
"Customer #1 says they've been accidentally sending us malformed data. All of their widgets have seven spokes, but in our database it says they have five. Please correct these rows."
"Sure thing. It's easy to change all five-spoked widgets to seven."
"Wait, don't do that. Customer #2 has widgets that really do have five spokes, and it would be wrong to change their data to seven."
"Ok, fine. Is there any way to distinguish between Customer #1 data and Customer #2 data?"
"Every row has a DATASOURCE field indicating who sent us the data, but it won't say 'Customer 1' or 'Customer 2', it will be the name of the employee that sent us the data."
"Ok... Do we have a list of the employees (past and current) of Customer #1?"
"No."
 
@Aran-Fey The salt ensures that the generated password is unique, on the off-chance that a password is reused. See security.stackexchange.com/questions/48000/…
@Kevin picard_facepalm.gif Does Customer #1 have a list of their employees who sent you the malformed data? I'm guessing that the answer is "Yes, but they can't give us that because it's personal information".
 
I don't understand a word of the first half of that answer, but this paragraph seems to state that there's no need to use different salts for each file (or even use a salt at all):
> If the same salt is used for several files (with the same password)(*), then the consequence is that the same key will be used for all these files, which is fine... as long as each file also gets its own IV.
 
We probably could get a list of employees that were in the position to send us bad data. It would probably be like three people, considering the time frame and frequency of updates. It's just a pain because I don't have a direct contact so I'll need to send a request up the chain during the next meeting
Or (and this is the outcome I'm hoping for), $coworker will come back and say "actually it turns out that customer #2's data is also malformed, so let's just globally change all fives to sevens". Five spoked widgets are unusual enough that this might actually be the case.
 
1:34 PM
\o cbg
 
@Kevin Well, that's not so bad, just annoying.
 
@MooingRawr what's a code-writing service :-))))) I mean, the name was funny!
 
? o.o
 
@MooingRawr talking about your comment on a question "not a code-writing service" :-P
 
1:40 PM
oh. :D
 
When I have money, I'll open up a "code-writing service" ... That's my dream now!
I "might" hire you guys :-)))))) really depends if you pass my "technical interview" though... :-))))
 
@Aran-Fey For your use case, it's probably ok to not use a salt for the password generation. But it still makes me a little nervous. ;) Where are these passwords coming from? This is for your file backup utility, right?
 
@NasrinShirali codementor.io
Yamming google
 
@PM2Ring Yes. And the password comes from the user, otherwise there'd hardly be a point in encrypting the data :)
 
@NasrinShirali With those questions, I'm so tempted to comment: "What did your last slave die from?" But I know that would be Not Nice. :D
 
1:45 PM
@Aran-Fey ransomware ;)
 
cbg folks
 
AD, would you be annoyed if I started to use 'A:D' to denote something you did that put a smile on my face
 
@PM2Ring :-)))) I opened SO and that was the first question I saw, and there was @MooingRawr 's comment and I choked on my tea
 
don't ask me how the to make an eye brow in the shape of a side ways A though...
 
@Aran-Fey Just use a simple non-random salt, eg a counter, or something derived from the date. Pbkdf2 wants a salt anyway, it costs you (almost) nothing to give it one.
 
1:49 PM
@AndrasDeak code-writing is a real service :-))) I though Mooing just made it up!
Ugh, now it's less funny :-(
 
@PM2Ring Well, unfortunately my code isn't designed for key derivation functions that require data (like a salt). Of course I'll rewrite it if necessary, but if I don't have to... I'll just hard-code a salt.
 
@NasrinShirali The "not a code writing service" thing is a fairly common comment on questions like that. However, we are being encouraged to not say that sort of thing because it's not very welcoming. So we need to say basically the same thing in friendlier more diplomatic fashion.
 
I still don't think that "not a code writing service" is not nice. It's not welcoming but it's not not nice. It's informational is how I see it , not personal
 
Not not nice?
@MooingRawr lack of frowns unpromised
 
it's early, I haven't had my tea, I couldn't think of another way of saying 'not not nice' T.T I'm sorry
 
1:55 PM
You said not nice nice
 
....
 
A:D
 
If I wanted to ask a question that'd annoy people, I'd create a new account and then ask it. Most of the question I see which have this trait come from new contributors. So I really am not convinced that they do not know the rules.
 
@Aran-Fey Whatever. It's also nice to protect people who reuse passwords. But I guess that's not really a problem, since the IV acts like a salt anyway.
 
1:56 PM
I don't much care for "not a code writing service" because we write code for people all the time. It's not even something that only fast guns do.
 
@NasrinShirali you would be surprised on the amount of people who do not read the rules.
 
A more honest comment would be "we only write code for people we like, and we don't like you (yet)"
 
"we only write code for people who we deemed has put enough effort into their question"
 
Pretty much.
Half the time a commenter asks for an MCVE or complete stack trace or whatever, it's not because they need it to solve the problem. They need it as proof that the OP is worth their time.
 
2:02 PM
I saw this API yesterday and was thinking how sometimes it is "very" useful. At least it'd be very useful on Twitter!
Then I was thinking if I'd really put time into developing it
so I think we write code for ourselves?
 
I like to see effort, but I also like to see what the OP's coding skill is like so I know what level to aim my answer. And if I'm writing code, I'd much rather tweak an existing program than write it from scratch. It's less work for me, and easier for the OP to read & understand because it's similar to what he's been working on.
@Kevin As Shog9 said:
Sep 20 at 20:45, by PM 2Ring
Folks aren't looking for "effort" because they think displays of struggle are some sort of magic pixie dust, able to turn a terrible, useless question into gold. They're looking for effort because the lack thereof is the most blatantly obvious hallmark of the thousands of terrible, terrible questions asked every day on Stack Overflow.
 
@PM2Ring this is what I was complaining about the other day. There was a very simple question on loops, clearly, the OP didn't have enough control over loops yet, and answers using lambdas came. I mean, someone who searches for that question, needs answers at that level.
 
@Kevin agreed
 
@NasrinShirali Stuff like that you should mark as NSFW.
 
@PM2Ring Googling :-P
 
2:10 PM
Huh
 
Ah ok. Got it
 
@NasrinShirali Sometimes, people answer questions that are too simple with complicated code that the OP won't be able to hand in as their own work, and if they do hand it in the teacher will instantly know that the OP could never have written it in a million years.
 
@AndrasDeak ...I see Martijn Pieters on there! is that you?
 
Once again, stunts like that are discouraged as Not Nice and Unwelcoming... but it is kinda fun. :)
 
@Mirv huh?
 
2:13 PM
You link to codementors
 
Probably not
I never was Martijn as far as I know
 
so Andras Deak != Martijn Pieters alt accnt?
 
I spent several minutes looking for a dupe target for this, but it's just a bit too simple. In the mean time, it got an answer, but I guess it should still be hammered if a decent target can be found. stackoverflow.com/questions/52609260/rs-rep-feature-in-python
 
Tea is better than Coffee. ( random observations)
 
2:24 PM
@Mirv Andras is good, but he ain't no invisible framework coding ninja.
 
Umm... do you know of any open source projects I can contribute to? Whatever I look at has been around for years and to get domain knowledge I need to be spending lots of time looking at how to do stuff. I have about 2 weeks, and I have nothing to do really :-(
 
2:52 PM
The canned response is "look around on Github". I'm not aware of any project that explicitly advertises itself as looking for aspiring green programmers.
You'll find a zillion projects with a community standards document saying "of course we welcome programmers of all kinds!" but that doesn't tell you whether you'll get actual interesting assignments, or you'll get sent to toil in the mines of correcting capitalization in the documentation
It would be interesting performance art if someone created a Github project that only accepted contributions from users whose account is less than a month old. You might get the occasional veteran programmer that just happened to sign up thirty years into their career, but they'd be outnumbered by true neonates to the extent that their expert contributions won't impact much.
 
YEY. I've finally convinced one of the main Spyder maintainers that the default namespace settings might need to be changed so it's going to be raised in the team :)
 
3:28 PM
I wonder if there are any alien societies where the connotation of "light" and "darkness" are reversed, e.g. that darkness represents good and light represents evil. Basically I'm imagining an environment where daylight has been considered harmful since the dawn of history. (or would they call it the dusk of history?) Perhaps on a planet that's tidally locked to its star, so life can't flourish on the side that gets 24/7 illumination.
But that's not a perfect scenario because darkness would also be considered bad, since life also can't flourish on the side that gets no illumination. They would venerate the eternal twilight that suffuses the narrow ring where the inhospitable hemispheres meet.
 
Can a planet have a proper magnetic field without rotation?
 
As long as the core is still rotating, it doesn't matter if the surface is.
Possibly it's very rare that tidally locked planets still have a rotating core. Maybe core rotation tends to stop after 10e7 years, and planets tend to tidally lock after 10e9 years. I'm making these numbers up, obviously, but it demonstrates the possible disparity.
 
Is that enough for life, let alone intelligent life?
 
As in, "can life evolve from primordial soup in only 10e9 years?". Sure. Earth is about 4*10e9 years old, and it has life.
 
How did you get to the light vs. dark thought, anyway, Kevin?
 
3:38 PM
I was playing a video game where darkness (and equivalently, evil) slowly encroaches over the land, and I wondered what darkness did to get this bad rap.
 
be full of terrors?
 
I think darkness is associated with "unknows" which can be terrorizing, and thus inherently considered bad / evil.
 
A society of blind cave fish might be indifferent to darkness vs light, since nothing in their ecosystem can see anyway. For the same reason, infrared light does not have a strong connotation in human cultures.
 
How about a nocturnal species? If you need to hide from huge mindless predators, the darkness may be safer than the light.
 
Mm hmm, the abilities of the other participants in one's food chain probably has a lot to do with this
 
3:43 PM
well, for all human context / considerations, I think my point stands :-p For everything else, we have Kevin to dig deeper.
 
For instance, big cats have good night vision, so early humans sharing territory with big cats would associate darkness with increased danger. Hmm, I wonder if there are any early human settlements in areas that didn't have night predators? What would that be like?
 
Can you even evolve strong intelligence if your environment is dominated by your predators? True, proto-humans had to contend with lions & stuff, but they aren't too hard to avoid if you keep away from their territory. Would we gave fared so well if we had to deal with patroling flocks of giant pterodactyls?
 
And of course, there's this -
> 3 And God said, Let there be light: and there was light.
 
Hi, does anyone know how do I add value to username in this multi-line string:
username = "Test_UN"
data = """{"customProp": [
{
"name": "request",
"value": "local"
},
{
"name": "owner",
"value": '{0}'
},
{
"name": "email",
"value": "myEmail.com"
}
],
"myRecordChanges": [""".format(username)
print data
 
@roganjosh huh, way to break everyone's workflow ;)
 
3:51 PM
One theory for the rapid evolution of human intelligence is that we got into an "arms race" feedback loop because other humans are the smartest and most violently dangerous creatures in our environment. So if a smarter or more violent predator dominated our space, then maybe that feedback wouldn't happen. Or it would be slower.
 
Gtting error: ValueError: unmatched '{' in format
 
@AndrasDeak I think it will be for going forwards. Finally they are considering having the console --> script namespace sharing turned off by default.
 
@Kevin [citation needed]
 
@Damon You should use %s or f-string formatting if you don't want to escape the .format brackets.
 
@Damon format strings don't like to have curly brackets in them unless they're part of the format specifier. I believe you can escape them by changing { to {{, and } to }}.
 
3:53 PM
Actually, unsure if f-strings would work, so %s is better
 
Frankly, there is no reason anyone should be relying on the current default behaviour and, if they are, they're probably MATLAB users so I don't really care :P
 
same error with %s
and {{0}}
 
NO, not {{0}} the other way around
 
*X files music*
 
@Damon Percent formatting works for me: ideone.com/VTI2zg
 
3:56 PM
oh .. I has %s but still .format(username)
had*
 
Taking a step back, it might be better to skip string formatting entirely. Instead, try constructing your object as a normal dict. Then serialize it with json or similar.
 
^^
 
^_^
 
did not expect that
good one
 
3:57 PM
I was originally a JSON dict but I need to loop and add more blocks .. so I am converting it into string .. loop and concatinate more block and at the end convert back to JSON
 
why can't you loop and add more blocks to a regular dict, and later convert it to a JSON string?
 
@Damon But the real question is why on earth are you trying to manually mess around with JSON in string format? You really ought to load it using the json module, modify it as required, then save it again using the json module.
 
When in python, do python, until you have to export / output stuff elsewhere.
 
Define "JSON dict". Python does not have a "Json" type. It has regular dicts, which may contain nested data structures. It has strings, which may become dicts when you call json.loads on them. But it doesn't have a Json dict.
 
I did some research and couldn't find a way to insert a new block in the middle of JSON
 
4:01 PM
You can add new key-value pairs to a dictionary with ordinary indexed assignment, e.g. my_data["foo"] = "bar". You can add new elements to a list with append.
 
cbg all!
 
ok, thanks .. I will look more into it then :)
 
There are lots of examples of doing those sorts of modifications on SO.
 
cbg, shuttle87
 
A lot of users get tripped up when they try to manipulate nested data because they think there are special rules for it, but really you just have to apply the usual rules for updating flat data
It's a bit jarring to have to hold N contexts in your mind when you only used to need 1. It's like going from addition to multiplication and exponentiation.
 
4:07 PM
@Kevin it would :-)
 
Yes
 
stackoverflow.com/questions/52593499/… duplicate by same user, fixed python tag
 
^ closed
 
@PM2Ring Yeah, I was wondering that also. Octopi have a good number of natural predators and they're pretty smart. Hard to say whether they could bootstrap all the way up to human level intelligence in an environment like that though.
IIRC there have been recorded instances of large-scale fighting between two groups of octopus, which might qualify as an arms race
 
@Kevin Also, they have a fairly short life span, so they can't afford to spend a lot of time learning. Or teaching.
 
4:15 PM
It's been theorized that it is pretty much only their lifespan that stops them being pretty dominant
Cross then with the possibly-immortal lobster, though...
 
It's hard for an octopus and lobster to get along. "Too snippy," says the octopus. "Too clingy," says the lobster.
 
stackoverflow.com/questions/14612530/… useless "give me the codez pls" click magnet with 4k views
 
@Aran-Fey Gone.
But anyone using ECB is in serious trouble anyway.
 
Well, at least it won't lure in unsuspecting passersby like me anymore
 
@NasrinShirali what sort of projects are you looking to get involved with?
 
4:28 PM
stackoverflow.com/questions/23440319/… no mvce, bad question, asker should be question banned
 
Re: my data integrity problem from this morning, good news: I really can assume all five-spoke widgets are from malformed data. Bad news: There are fifty times as many malformed widgets than we thought there would be, which suggests a systemic problem and not just one data entry guy with clumsy fingers
 
DSM
Like-a-returning-hero cabbage for all!
 
I'm not sure which I would prefer: if it was the customer's system that was broken, or if it was ours. In the former case, it's not my responsibility to fix it, but it is my responsibility to respond to bad data in a more graceful way than crashing with "sorry, we're not going to accept that"
 
stackoverflow.com/questions/23440319/… 4 years old, 230 views, I don't think it's ever going to be useful to anyone.
 
@user3483203 final nail courtesy of me :)
 
4:36 PM
tyty :)
 
@shuttle87 I've only ever contributed to two open source projects. One was writing an algorithm in C++ another one also helping with enhancing a standard CPP library. I have never done anything in Python so I kept on looking at the projects, and some were very interesting like "requests" but I highly doubt I can be of any help there. So I think I a project which is not very old and I can get involved might be interesting to me.
 
@NasrinShirali I think it would be good to find a project that has some issues that are friendly to new contributors
 
@NasrinShirali if you want to start contributing to OS python projects, just start submitting PR's for documentation. You'll get a feel for the project and documentation edits are always needed, but often ignored
 
I keep an eye on first timers but problem is... most of the time it's some
haha I was going to say they always send you to the documentation room :-D
 
DSM
My first PR to Python itself was I think fixing typos.
 
4:40 PM
I have a bunch of typo only commits to things
 
but makes sense @user3483203 I need to read the documentation so why not help while doing it.
 
I've been trying to tag things as first time contributor friendly with easy-first in the issues tracker
I think the issue in a fast paced small team is that most of the easy-first stuff gets done as it comes up, it's a bit rarer to get something where you know that it's an easy-first issue but to only tag it and not to do it
 
Simple, fun, not snatched up five minutes after creation: choose two.
Applies to OS issues as well as to SO questions :-)
 
:-P I sometimes wonder how people type... I mean... there's a new question and I open it and read the first line and BOOM there's an answer!
 
This discussion has led me to actually make sure I have easy-first issue tags in the projects I'm maintaining
I think I made a bit of a mistake over in one repo by making the tag "easy-first" and not "good first issue". Will "easy-first" get found over on that first timers page?
 
4:52 PM
@shuttle87 "label:first-timers-only"
 
Oh I see, there's no special behavior there just an issues search
 
yup I just search "label:easy-first language:Python" or change the label to first-timers
and see what comes up
 
Hmm I wonder how I can get my repositories to show up there... I'd be happy to help some people contribute to a few libraries
 
4:58 PM
I think there's an option to add a repository, but I stated from here
 
Just in response to that, I just added some labels to issues but I can't help feel I'm missing something
Oh I see that first-timers-only is a separate concept, cool
 
also, I am on dev.to and people weekly talk about their projects and ask for help.
 
@NasrinShirali Most of the time when that happens it means the question is likely to have been asked before, so the "fast gun" answerer really should have been searching for a dupe instead of composing an answer. But of course you don't win points for dupe-hunting...
 
there's you can also advertise your projects :-)
 
hello, sorry for askign this here i wanted to contact davidism
You have reached your question limit
Sorry, we are no longer accepting questions from this account.
how can i get out this question ban?
 
5:08 PM
Might be worth reading this meta post
 
@ΝικόλαοςΒέργος Please google it.
 
user: you have removed the ban?
 
No, I decided to leave the ban in place, mostly because I am unable to remove it.
 
@user3483203 that was a good decision.
 
The (removed) you're seeing is from me refactoring a link to be less spammy
 
5:12 PM
ah!
thanks for letting me know
who can remove the ban?
 
@ΝικόλαοςΒέργος Do you want to contact davidism regarding your question ban? It has absolutely nothing to do with him.
 
who shall i contact?
 
You shall contact this meta post.
 
i need to talk to someone regarding this
 
@ΝικόλαοςΒέργος Have you thoroughly read that meta post?
 
5:18 PM
no, its too big, i just need someoen to talk about this matter, some admin.
 
DSM
If you ever do manage to speak to an admin, my advice is not to open with "it's too big" when they asked if you read their documentation..
 
@ΝικόλαοςΒέργος It mentions all the steps you need to take, and the steps that you can't take. All we can tell you here is, that please read that post.
 
you're welcome
 
DSM
5:31 PM
@Kevin: I had just written "Are you sure that's the code you're running? You've tagged this question". :-P
 
I wager 50 quatloos on "he redefined zip"
 
DSM
If so, it would have probably failed at the call, no? I think he's not using the code he thinks he is.
 
I was going to say "he might have done zip = lambda *args: list(__builtins__.zip(args[0], args[1]))", but that requires enough advanced concepts that anyone capable of writing it probably knows not to overshadow builtins to begin with
 
DSM
Yeah, I trust that the intersection of the set of people who know how to do that and the set who would do that is empty.
 
morning cabbage
 
DSM
5:45 PM
Morning cabbage for the apprentice.
@Kevin: I should have spotted what Ionic did, I'm usually good with that..
 
@DSM Did you have a chance to look at the project I linked you a while back?
 
I am trying to scatter the data from this dataset:
data = sklearn.datasets.make_classification()
data
(array([[-1.45105813, -0.02962166, -0.99335057],
       [ 0.45671441,  0.02884693,  0.96737049],
       [ 1.31686604,  0.03256333,  1.09199843],
     ...
       [ 0.75601517,  0.02852542,  0.95658885],
       [-0.09089419,  0.03056437,  1.02496411]]), array([0, 1, 1, 0,
...
       1, 0, 0, 1, 1, 0, 1, 1]))

I have  tried the following:
X = data[0][:, :]
y = data[1]
plt.scatter(X, y); plt.show();
 
DSM
@Code-Apprentice: not yet! It's on the queue. ;-)
 
Full code:
import sklearn.datasets as d
import matplotlib.pyplot as plt
data = d.make_classification(n_samples=100, n_features=3, n_informative=1, n_redundant=1, n_clusters_per_class=1)
X = data[0][:, :]
y = data[1]
plt.scatter(X, y)
plt.show()
 
DSM
@SebastianNielsen: that makes it seem like you're trying to scatter a 2D array against a 1D array. So they're not the same shape, much less the same size.
 
5:49 PM
You might want to open a question instead of asking and posting your whole code here.
 
@DSM no worries. I was just wondering if you'd had time. It's kind of incomplete anyway. When you get around to it, I'd appreciate some feedback on the documentation. Not sure if setting it up is very clear...and it probably needs some docs about what to do with it after you set it up, too.
 
I am afraid of asking questions on SO (not in chat), they are so mean and downvote me each time.
 
Writing a good question is an art form
 
At least that way those who answer could be rewarded with imaginary internet points. Those sweet, sweet internet points....
 
An art I haven't mastered yet, and one that I am still far from mastering.
 
5:51 PM
it's difficult to write a question that gets the answers you are looking for
 
I have always been welcomed nicely on SO. And my questions are usually answered very fast.
 
@DSM Oh, I missed that too. That makes it far more likely that he's simply running code that has nothing to do with the code he showed us.
 
me, too. Look at my questions...many of them aren't great. But I probably get a lot of slack now because of my rep...which is unfortunate.
 
Changing wager from "this is a REPL and he messed up an important name earlier in the session" to "he's running desktop/test.py in his shell, but looking at projects/test.py in his text editor"
 
I even have questions with negative votes
 
5:54 PM
No.. not you @Code-Apprentice :)
 
[[ 9.47577087e-01 -1.01227208e+00 1.79994791e-01]
[ -8.48122868e-01 -1.02730428e+00 1.82667706e-01]
...
[ -3.74858480e-01 8.19191842e-01 -1.45662680e-01]
[ -9.40794891e-02 -8.92560817e-01 1.58708612e-01]]

[[0]
[0]
...
[0]
[1]
[0]]

After converting the 1d array into 2d, the error still persists :/
 
Write a clear question. Provide an [mcve], say the ouput you want, give us your code. I swear, the "SO is not a welcoming community" is just a myth that needs to be busted. SO active members, by downvoting bad questions, are just trying to make SO a greater and more respectful place. :)
 
I'm still an Apprentice ;-)
 
And don't do the mistake of sending the link here just after you finished posting it. ;)
 
Of course not :)
 
5:56 PM
There's no such thing as a Q and A "community"
 
@ritlew go on...
 
@SebastianNielsen what error? what's the code? what do you expect the code to do? These are all critical elements of a good question whether on the main site or in chat.
 
Not my question but I have a bad feeling the community is not going to like my question
-3
Q: ValueError("x and y must be the same size")

ahhdioguyFor the dataframe Urban_Summary_df as shown below city Rides (per City) Average Fare Driver Density 0 Barronchester 16 36.422500 11 1 Bethanyland 18 32.956111 22 2 Brandonfort 19 35.437368 ...

0
Q: ValueError: x and y must be the same size

user3521180import numpy as np import pandas as pd import matplotlib.pyplot as pt data1 = pd.read_csv('stage1_labels.csv') X = data1.iloc[:, :-1].values y = data1.iloc[:, 1].values from sklearn.preprocessing import LabelEncoder, OneHotEncoder label_X = LabelEncoder() X[:,0] = label_X.fit_transform(X[:,0])...

 
DSM
You have a 100x3 array of random floats around -2 to 3, and a 100-length array consisting of 0s and 1s. It's not obvious what you're hoping that scatter(X, y) will do.
 
I kind of wish there was a Stack Overflow Workshop where you could post a question and users would say whether it was upvote-worthy or not, and give advice on improving it. This would be useful for users that care about the quality of their posts, but don't have a good idea of what a quality post is.
 
6:01 PM
A community post on meta should be sufficient, no ?
 
@Kevin there was an experiment with a "mentoring" service for new users posting their firest question
 
"mentoring", to me, implies a one-on-one experience. This is more of a town hall kind of thing.
 
Perhaps you can raise it to the Meta SO, iirc they were looking for ideas on how to help new users, that would help if it would prove to be a hit with answer-ers.
 
yah, the experiment was designed for one on one advice
still it was in the spirit of what you are suggesting...although I'm sure there are different tweaks that would improve it.
 
I don't know if a Workshop is practical in reality. First, how many users would actually post in it (both criticism-seekers and critics)? Second, could the critics resist the urge to say "actually I know the answer to your question, so I'll just solve it for you now"?
 
6:04 PM
yah, that last was a difficult part of the mentoring program
 
I think downvotes are altogether useless. What is the benefit of knowing the difference between bad content, really bad content, and the dumbest thing ever posted. A binary system would be fine I think. And users might rather see two competing highly voted answers rather than one answer with zero votes coming from 20 upvotes and 20 downvotes.
 
I guess the problem is : How to add more filter, knowing the ones already in place are already flooded. :p
 
I remember when I was a young lad learning to program...there was no such thing as SO. We had to write our own sorting and linked lists and stacks in the snow uphill both ways.
 
You could, for instance, imagine a panel in which new questions by new users are sent, and needs to be cross-validated by say 5 experienced users before being sent to the main SE wall.
 
The review queue kind of does that. And yet, we still get bad questions!
 
6:07 PM
I didn't know, I never took the time to fully explore the queues and haven't been a good help with them yet.
 
I don't do reviews because I don't find them fun. This would probably also be a problem for any cross-validation solution.
 
That might be a threat to Stack Overflow. :p
 
Forget semantic search for Github, I'd just be happy with a "only search through files with this extension" option
Pretty tired of seeing .rst documents every time I search for something in the CPython code base
 
recbg
 
@Code-Apprentice you think that rep gives you leeway? I'd say the opposite, especially if you're known for moderation against other users.
I think everyone is probably prone to innocent mistakes but if you're closing similar questions from new users, you should probably accept a KAPOW
 
6:19 PM
@Kevin this'll blow your mind
 
I'm a power user, I can't be expected to submit a search and then click on a thing. That's two whole page loads!
 
The mouse needs some love, too! You can't do everything with the keyboard!
 
You should. :p
 
DSM
 
That made me smile :)
 
6:43 PM
awww
but that may be a rat
 
The DB guy says he'll look into the five-spoke widget problem, which means that I don't have to look into it. Great success!
 
umm.. if I import a module which has already imported a module, why'd I import the already imported module back in this module :-)))
ok... I am terrible!
 
@NasrinShirali example? What you're describing may make complete sense
 
I mean why'd I have to import sre_parse.py in re.py when it is already imported in sre_compile.py which is also imported in re.py
 
because you don't want to access sre_compile.sre_parse.foo if you can access sre_parse.foo directly
modules are imported exactly once, the rest is just playing with namespaces (meaning there's no performance hit by importing something twice)
also you probably shouldn't rely on the implementation of another module
 
6:57 PM
noted @AndrasDeak, it'd my habit to make sure no modules are imported twice
so I won't do it in Python
and import again. Thanks
 
Importing a module that's already been imported is quite fast, so you may as well use them liberally
It's basically just a dict lookup, no recompilation needed
 
I used to think that'd throw errors... and I was always trying to make sure I didn't do it :-D
 
you'll even see things like
import matplotlib as mpl
import matplotlib.pyplot as plt
that's also importing twice in a way
(not always, but whatever)
 
The only thing worth avoiding is circular imports. if a.py imports b, and b.py imports a, then you're liable to get some pretty confusing behavior
 
Amazing. I'm pretty sure I did it a long time ago in another language and it threw a lot of errors. I think I just made a rule of thumb out of it and always made sure not to do it!
Yeah I read a question on that in SO, followed by lots of duplicates, which tell me it's a common mistake
 
7:24 PM
Has anyone used Python for port forwarding? i.e configuring router port mappings to communicate between sockets on different networks.
 
(Readers with trypophobia may wish to skip that first link)
 
@PM2Ring I asked the missus and she's generally interested in the sphere crochet thing
@Kevin that reminds me we saved our first bee a few weeks ago. I rarely get a chance to see a tired bee and be able to fetch sugary water to feed it
 
7:44 PM
 
@Kevin There are lots of bees here and I have a water spray with me to make them go away/ As for the second post...WHY
 
@Kevin hehe
bees are awesome, wasps are evil
 
I did not know "bumblebee" was a descriptive name until I read an article the other month saying "hey look at this slow motion video that shows how bumblebees can carom helplessly into things and keep flying anyway"
 
there's a fly also which looks like bees
It really looks like one, but if flies differently
 
@Kevin does "bumble" mean something? I thought it was onomatopoeic. I read it and only think of jumble and tumble...
@NasrinShirali the one that hovers in one place at a time then zaps elsewhere?
 
7:48 PM
@AndrasDeak yeah that one
haha "No one" guesses what I am saying as quick as you do Andras
:-))))
 
I changed the batteries in my crystal ball last week
the insect family is called hoverflies, by the way
(also I live in Hungary so the fauna here isn't all that different from yours)
 
I call them wannabees!
 
@AndrasDeak It means something and it's onomatopoeic, according to en.wiktionary.org/wiki/bumble
 
ah!
 
Took me five minutes to look that up because my computer bluescreened halfway through. THEY don't want you to know about words.
 
7:57 PM
My friend's oma told us to spray bees with water and they'd think it's raining and go home... I've been spraying them but they just get closer!
 
I endorse all kinds of non-destructive bee repellent attempts
 
I've been stung a lot. Once right next to my eye, and once on my belly. so I just don't want them very close
 
Ouch, how did that happen? They aren't supposed to be aggressive unless you're close to the hive
then again you've also been stung by a bus, so... ;D
 
:-))))) yeah, things happen to me a lot. But the one that stung me on my belly was far away and I told my brother that I think it wants to sting me
my brother said "impossible!" and it did
so... yeah!
 
You sure it was a bee? :P
 
8:02 PM
:-)))))
 
did it leave its stinger in you?
 
yea, then we took it out
 
weird!
 
we were in the middle of a garden and weren't close to a hive I guess. and I was just standing there.
 
Perhaps you smell weird (to a bee I mean). That kind of behaviour sounds much more like a wasp, but the stinger left behind can't really be anything other than a bee.
 
8:06 PM
might be
but I think I do have a tendency to get into weird stuff
 
bees can't know that ;)
but yeah, there's a kind of personality that always tends to get into trouble
 
Once I went to India, and there were lots of birds and I said how come people aren't scared of them shi**ing on them! a guy next to us said they "NEVER" do that... and BOOM! "on my head!"
 
hehe
 
:-)))) I am "that" type
 
8:33 PM
@MartijnPieters: Remember this answer?
 
My first question on crypto.SE made HNQ. Not bad.
 
At which point can you see who downvoted, and upvoted a question ?
 
when you start working for Stack Overflow
and even then only a specific subset of employees can access the database, and every query is thoroughly logged
 
:-)))) guys, remember my interview? I got an Email... They said they had a very good overall impression and would like to pursue the next steps towards an employment :-D
 
Awesome, congratulations!
 
8:44 PM
:-))))) this will be my first ever job as a developer
thanks .. I'm all smiles!
... Ok I don't know if they mean I am hired or not :-))) does that sentence mean I am hired? because he said he needs my current transcripts and I was "so" bad this semester :-D
 
I think it might mean that you're in for the next round of interviews, depending on how many candidates and positions are.
 
Which kind of developing will you do ?
 
for smaller places or not openly advertised positions you might only have a phone interview plus a personal one, in other places there's several rounds of filtering in order to reduce the number of candidates
 
:-D I will send me Bee force there otherwise!
 

« first day (2908 days earlier)      last day (2043 days later) »