« first day (3181 days earlier)      last day (1992 days later) » 
00:00 - 17:0017:00 - 21:00

17:00
@TheNamesAlc please read this to prevent further confusion in this matter
user10984358
so I will use the df.copy() method then
if you want a copy use a copy, yes
user10984358
also on a side note, which is encouraged to select all but one column
I'm mildly annoyed at the += operator for muddling the distinction between value mutation and name rebinding.
user10984358
the drop syntax without inplace or df[:, df != colLabel]
17:01
a += b might mutate a's value or it might change what value a refers to, depending on the type of a. No me gusta.
@Kevin a minor inconvenience. Though Ned Batchelder's blog post should be part of the official tutorial...
@TheNamesAlc the latter doesn't work
user10984358
I just tried it works
df[df.columns.difference(['colLabel']),sort=False)] is what you are looking for i think @TheNamesAlc
And I just tried it and it doesn't.
user10984358
>>> df.loc[:, df.columns != 'class'].head(2)
   variance  skewness  kurtosis  entropy
0    3.6216    8.6661   -2.8073 -0.44699
1    4.5459    8.1674   -2.4586 -1.46210
17:04
@TheNamesAlc oh look, that's not what you wrote. *surprised*
user10984358
colLabel was set to 'class'
user10984358
but yeah my bad
@MisterMiyagi there are probably a number of corner cases where fancy assignment can have interesting side effects, so I'll qualify my original statement by saying "an assignment of the form <identifier> = <identifier> never creates a new object"
@TheNamesAlc and you added .loc. And you added .columns. But otherwise 100% match, yeah
user10984358
yes I totally messed that up, should have just copied that instead of typing what I thought was on the top of my head
17:05
Indeed.
Lord knows that x[0] = y can do anything, up to and including creating new objects while making demons fly out your nose, if you control x's __setitem__ implementation
user10984358
@anky_91 this looks new to me, I will try this out
@Kevin depends... is a.b, a[b] or a[:] an identifier?
@TheNamesAlc you can read about it here
@MisterMiyagi Not the way I define it.
17:06
@anky_91 df.columns ^ ['colLabel'] ;)
which is the only way that counts!
user10984358
alrighty thanks for the suggestions, i will be looking into the links you guys provided to avoid any hassle down the road
thanks
@AndrasDeak thats a good one. :) will use that in upcoming answers :P
And I define it using docs.python.org/3/reference/lexical_analysis.html#identifiers with some handwaves to exclude ambiguities like "is yield an identifier?"
user10984358
17:08
@AndrasDeak this does what I asked for as well?
@AndrasDeak preserves order too?
user10984358
@anky_91 can you tell me why the sort argument is needed there?
@anky_91 no idea
@TheNamesAlc partly, but don't use it. You're stricken enough without using weird syntax quirks.
@TheNamesAlc if you want to preserve order, else its just a set difference
@anky_91 my hunch is that it calls .difference or they call the same method under the hood
17:10
Hi guys
@AndrasDeak it might, but difference() has a sort param like a dict.fromkeys(), which this one doesn't have . Nevertheless, looks good to me for a lot of usecases. Thanks for that :)
I know that I can take a stratified sample by creating a dummy freq column and pass that as weights to a sample function
Is there any other way apart from that, without using a dummy column
Any idea if Python 3.X has eggs to connect SAP RFC ?
i found a way but that was with 2.7 :/
What way was that? Maybe there's a 3.X port for that solution.
17:18
let me find the link
this one, i had read this a few months ago. reading it once again. there is an adhoc project long pending which struck my head today
:D
If the documentation is to be believed, that project is Python 3 compatible. Give it a shot.
hello everybody
someone can help me with a sqlalchemy question?
Sure. I will utilize all 45 minutes of my sqlalchemy education to its greatest effect
jejeje okey. the question is this, i have a database called store_a with a users table and a have another database called store_b. i want create relation between users of store_a and other tables in store_b. like using a foreign key based in a ID from another database
@Kevin the last time i read i was just a month old to coding and in Python. looks more promising now. :) Thanks. will try to find a way in the next couple of days and ask for your help if required. :)
@VictorAlvarado what kind of relation?
17:30
Cross database join in sqlalchemy looks like it might be relevant
@Kevin :O
something like that
thanks kevin!
\o
now, can you help me with an advice?
lego ghost has entered chat.
17:35
hello all
Kudos to Google for seeing me searching for something like "sqlaclehmy interdatabase relation" and suggesting "did you mean: sqlalchemy cross database relationship?"
The former having 0 results and the latter having ten million
I'll give all the advice that I know of from my 45 minutes of sqlalchemy education
okey jajaja but know is something about design of database
Make sure your primary key is unique. Sessions shouldn't be too short or too long. Don't write sql queries using strings, and definitely don't parameterize them with .format.
General database design I have more experience with.
i have a year using flask :)
the question is this: i have a car_engine, reparation tables. the app can save all the reparation that a car_engine can have. car_engine one to reparation many
@idjaw - Hello!
17:41
@idjaw hello mister lego
ahoy
also the app will check is the car_engine is repaired because you cant repair an repaired engine. what will be better. have a status column in car_engine and change it to repaired/damaged with every reparation record or set the status column in reparation and search in the last reparation record to verify is the engine is repaired
@AndrasDeak May I ask a question about cryptography?
@X4748 enigma machine
@X4748 If it has to do with python, sure. Just don't ask me.
17:44
@Kevin thats the question bro and sorry ping
What is the key size of AES encryption?
@X4748 And you needn't ask me, just read sopython.com/chatroom
Really simple :D
@X4748 sounds like google
@VictorAlvarado I'd be inclined to make it a column in the car_engine table. This way is faster when you want to check the status of an engine (or many engines).
17:46
you are awesome men :)
It may also be useful to do it this way, if it's possible for an engine to break more than once.
@X4748 with your history of off-topic questions here I'd try very hard to use with care the limited patience you will find here, if I were you.
@AndrasDeak Hmm... I'll try not to ask off-topic questions anymore! I thought chat rooms are made to ask these kinds of questions.
For those kinds of questions we have google
may i ask about "python learning path"?
17:50
Google: For AES, NIST selected three members of the Rijndael family, each with a block size of 128 bits, but three different key lengths: 128, 192 and 256 bits. AES has been adopted by the U.S. government and is now used worldwide. It supersedes the Data Encryption Standard (DES), which was published in 1977.
Honestly, I didn't understand anything
try the next google result
or try a different query. Not sure what you searched for, but my first result was a simple explanation on wikipedia
Question-asking tip: including details from your prior research can give valuable context to potential answerers. "What is the key size of AES encryption? Google says it can have different key lengths (128, 192, and 256), but I don't understand when each of these lengths should be used" will receive a much warmer welcome than just "What is the key size of AES encryption?"
@Aran-Fey I googled the same thing that I asked. + I tried 3 different queries but none of them changed the result.
I've played with AES and Rijndael's algorithm a long time ago
wow....I'm realizing it's actually inching to almost 20 years LOL
17:56
@X4748 Was "aes key size" one of those 3?
@Aran-Fey Yeap
and wikipedia wasn't among your results or did you just not click it?
@Aran-Fey It makes things too long... I wanted to get a quick result like What is the symmetric encryption? Symmetric encryption is a type of encryption where only one key (a secret key) is used to both encrypt and decrypt electronic information.
Some things just don't have a concise one sentence explanation. I've been looking for one for fourier transforms for ten years.
Anyways, Asking here became longer... lol
18:02
the whole problem is here:
import scapy_http.http as http

But why?
it works when you remove this module.
@HibritUsta I'm not interested in helping without a traceback.
I've asked for it three times now. I'm beginning to suspect that you're trolling me.
Huh, DuckDuckGo even shows the relevant part of the wikipedia article as the preview. Google uses the first two sentences instead. That's pretty neat.
@Kevin No, I've been dealing with the problem for 2 hours, and the problem is solved when I remove this module!
I'm glad to hear that the problem is solved. Next time please provide a traceback in your first message so it doesn't take 2 hours to find the solution.
I couldn't completely solve the problem
import scapy http.http as I want to use the https module as well.
18:10
Best of luck with that.
Sam
Sam
Interview went well. Turned out to be no ML programming exercise in the end
pysftp v/s paramiko which one is faster to get a file from sftp?
@X4748 You don't need to read the whole article... just hit Ctrl+F and enter "key size"
keeping in mind proxy handling
or is there anything better?
Network I/O tends to be the bottleneck in programs that involve network I/O, so I'd expect both to take about the same amount of time.
18:15
ouuuuu....
@HibritUsta You wouldn't happen to have a file in your local directory or your PYTHONPATH named scapy_http.py, would you?
It doesn't matter much how pysftp and paramiko prepare the ftp request, since the ftp-ing itself will take a hundred times longer
... But as I am famously underinformed in many fields, I encourage you to treat my guesses with skepticism and draw your own conclusions via experimentation
ohh, so then paramiko is easier to write acc to me
:)
@Kevin understood... :)
@anky_91 thanks to you too
@VictorAlvarado for what? :P i don't remember
anyways...cheers..!! Hope you do well..!!
18:25
@anky_91 you got interested in help with sqlalchemy question :)
it's chemistry... ;)
@VictorAlvarado i work for an alcohol company, imagine the effects.. :P
jajajaja
i work for a company that produce glass flasks
@anky_91 I have never drunk alcohol... I wonder how it effects on your brain...
@X4748 to be specific medulla oblongata you shouldn't :)
@anky_91 search about "cocuy de penca"
18:35
@VictorAlvarado searched
:)
you drink a bottle and then you will start programming a new os in c
jajaja
even can kill a person that drink, because it can be handcrafted
when I check with pip freeze
It looks.
the goverment close a fabric that use "peroxide" to the drunked effect jajaja
@VictorAlvarado :D
@VictorAlvarado I am better without it, I just work for that org. ;)
18:39
yeah jajaja
omg! only 55 pandas questions "110,111 questions"
Never really check that, is it normally much higher? @piRSquared
@HibritUsta It may very well be in pip freeze, but if you also have a local file by that name, the local file will supercede whatever you have installed. This is why I asked specifically about the presence of a local file, not about pip freeze.
I'm just messing around. It's One Hundred Ten Thousand, One Hundred Eleven questions. I'm just pointing out that its also binary (-:
haha gotcha
18:47
Problem Solving Time: What are the chances that a random base 10 integer chosen between (and including) 0 and 999,999 can also be interpreted as a binary number.
1-1/5**6 give or take
OK, bit more complicated, but meh
I'm thinking view spoiler
Oh, it can be interpreted. Still meh.
it probably gets nontrivial because/if you have to consider the possible number of digits
("nontrivial")
It doesn't change the answer if you consider 37 as 000037
Oops, no. What I said?
18:51
you mean, what you said (-:
Having just brute-forced the answer, I think I'm wrong.
Probably because 1 and 0000001 are not distinct numbers
if you promise that 000037 works then view spoiler
lol, that came out weird
I was like... I don't know what that means.
umm......
Neat.
18:54
had to escape the powers
backticks may prevent interesting formatting like the first link
good idea, I'll try to keep that in mind
Anyway. The answer you just got is the one that my brute-forcer spat out.
I want a brute-force emoji
and one can nicely see that as the number of digits -> infinity the probability goes to 0, since a single non-binary digit is enough to mess up your number
19:00
half-baked thought: humans can easily follow the instruction "pick a number" because they don't know that randomly choosing a single element from an infinite set is impossible.
Next time someone asks me that, I'm going to choose an absurdly large irrational number
How curious that almost all numbers chosen this way are integers above 0 and below 100. The odds of that are like... one in infinity.
Graham's Number is considered to be the largest "useful" integer. I wonder, what's the largest useful irrational?
@Kevin what do you mean?
Something probabilistic, something technical, or something axiom of choice?
Graham's Number plus pi
eclipse feed is live youtube.com/watch?v=eL6QX5SPxgk
@AndrasDeak The axiom of choice confuses and frightens me, so I'll go with the first two.
19:05
@piRSquared I've been watching two feeds for an hour, no action yet
@PaulMcG I'm checking.
silly totality starting above the ocean
For example, on a technical level, Python can represent an integer of any size. But you can't write a program that returns a random integer, where each number is equally likely to be returned.
(Assume we're using TPython, the Python distribution designed for idealized turing machines, so we have infinite memory.)
there's a difference between "randomly" and "uniformly randomly"
when you ask someone to pick a number you're implicitly telling them to do the former, because who are we kidding
Oh, if it can be non-uniform, it's easy. x = 0: while random.choice((True, False)): x += 1 tadaa
19:08
@PaulMcG yes there is such a file.
(Assume we're using Atomic Python, the Python distribution whose random module works by measuring the decay of a radioactive sample)
And in principle you could put your finger somewhere on a line segment, and that could correspond to a single point on the continuously infinite set of points on the line. This would allow you a choice of a points down to the Planck scale I guess.
uniform on ℝ is certainly impossible because the corresponding probability density would be the 0 function
(a dozen stochasticians breathe in to say "well actually...")
Set theory is an infinite fractal of well actuallies
"Actually, it's a fractal of arbitrary size _approaching_ infinity"
"no it isn't, you fool, limits aren't required here"
[nerdy scuffling noises ensue]
an infinite well of actuallies
Truth coming out of her well to "actually..." mankind
(^tier 3 meme, do not google "truth coming out of her well" if your workplace looks down upon classical paintings of nude anthropomorphizations of abstract concepts)
19:18
@HibritUsta The presence of that file is why your import is failing. Rename it to something else.
how can I do that ?
seriously?
The biggest problems I have experienced in Python programming language have always been the mismatch between data types.
Python 3 is always a problem.
yeah, python 3 is the worst
@HibritUsta Please read this guide and understand that you've become a burden to those trying to help you, as evidenced by multiple responses you've received. Read the post and change your behaviour so that the effort of others spent helping you is not wasted. Don't be a vampire.
19:25
eclipse started in Chile
I better get my moon crystal out... I don't know if it can recharge just by being in front of a webcam transmission of an eclipse, but it's worth a shot
starting in Argentina too \o/
Looking at the sun reminds me, I should pick up sugar cookies on the way home
Mm, all golden brown on the edges... Oh, the feed changed. Now I'm in the mood for oreos.
This shot of an observatory does not correspond to any known cookie.
20:05
cbg
Any strange reason why, when a module fooey has foo = 'bar' in it, that import foo might work fine, but from fooey import foo might tell me fooey has no attribute foo?
This is in the context of trying to deploy a flask app on pythonanywhere.
does your module have an __all__? And if yes, is 'foo' in it?
is it set conditionally, e.g. inside __main__ guard?
@Aran-Fey No. I've never used all before.
Also, is fooey a single file or a package (folder)?
wait, do you mean import foo or import .foo?
20:09
Single file. No __main__guard
I mean import fooey
that shouldn't work at all if foo is actually fooey.foo
is there a separate foo module?
wait, hol' up a minute, import foo works? Even though the module is named fooey?
@Aran-Fey No, I mistyped
Ok, Andras is right though, without a MCVE this isn't likely to go anywhere
20:15
Fair enough, thanks. I don't know how to MCVE this, as I can't reproduce the error on my machine at all. The imports work, and in fact my original import fooey; app.register_blueprint(fooey.foo) works just as well as from fooey import foo; app.register_blueprint(foo), excepting that foo is a flask blueprint in my code.
I presume that importing a reference/variable isn't affected by that variable holding a flask blueprint rather than a string?
the import system doesn't care about the values of the things you import, no
@toonarmycaptain so what doesn't work...?
@AndrasDeak That import when I try to run it on pythonanywhere.
MCVE with an example that works locally but not on PA
only one of those works on pythonanywhere?
20:22
@AndrasDeak Neither. And it works locally, that's my confusion.
So your original question which suggested that one works and the other does not...?
perhaps I misunderstood your original unclear question :P
without an MCVE we can just give general tips, like make sure you're copying over the right version of the files and that there's no clashes with something else by the same name already there
Hmm, is it, maybe, slightly possible that since some of this importing was happening inside an init, it was doing things I did not expect?
rbrb
20:49
Solar eclipse, US about to beat England... It's a good day
*WE about to beat England. Mind your grammar.
00:00 - 17:0017:00 - 21:00

« first day (3181 days earlier)      last day (1992 days later) »