« first day (3151 days earlier)      last day (1806 days later) » 

12:39 AM
20 hours ago, by cs95
20k+ rep and nothing better to do? We want you! 1. Click this link 2. Start deleting.
alternatively, sort by votes and start with the most negative ones. Keep an eye out for gems.
 
 
1 hour later…
1:51 AM
it's 2019 and it's still a hassle to install tensorflow-gpu on linux... sigh
 
 
6 hours later…
7:23 AM
@cs95 no need to post that daily
 
7:37 AM
to be fair, I've seen it for the first time today
 
7:59 AM
voted not because of the Q but because of the useless answers
 
> But if you want to do it in a pythonic way:
proceeds to use global anyway...
 
8:20 AM
And doesn't explain where global goes and why
Cargo cult galore
 
 
1 hour later…
10:03 AM
closed
 
cbg
 
@AndrasDeak I wouldn't have to if it was someplace people could see it... hint hint
 
 
1 hour later…
11:20 AM
Wait... a question, when you say a: 3, do you need to really do:
>>> __annotations__['a']
4
>>>
To get the value?
I am rbrbing
now
Come back in around 12 hours or so
 
@U9-Forward I mean.. where else would you expect that value to be? also, just in case it isn't clear, you'd usually annotate that as a: int = 3, in which case you'd get the 3 like
>>> a
3
 
11:39 AM
and the annotation will contain a type, where third party tools can use it to hint you which operations are allowed and what not
 
Yeah, you usually don't need to access type hints from the local scope
And for everything else there's typing.get_type_hints
 
12:02 PM
Hi everyone, I'm new to python, please rate my "hello world" program:
import typing

class Foo:
    x: 'print("Hello World")'

typing.get_type_hints(Foo)
Dang, I just wasted a neat puzzle opportunity, didn't I
 
 
2 hours later…
2:29 PM
@Aran-Fey somehow i feel like there is a vulnerability in there somwhere....
 
It's kinda bad because most people probably don't know that type hints are eval'd... but I don't think anyone's ever used user input as a type hint, so...
 
Not until someone makes a blog post about Python's Type System being turing complete.
 
but how can the type system be turing complete when python 3 isn't turing complete :thonking:
3
 
 
1 hour later…
3:51 PM
anyone knows where I can casually chill with R people?
 
Are we not cool enough for you?
 
nope
unless there's R people here
 
:(
I one time wrote a function in R.
 
welcome to the cool kids table
 
(but seriously I don't know where you would do that...)
have you considered trying the chat rooms at cross validated?
 
3:55 PM
never heard of that
 
it's the statistician equiv to stackoverflow, and given that R is mainly used for stats you might want to see if there are any R users on there.
 
oh, neat
thanks
 
@towc R room?
 
literally can't find it
 
4:05 PM
It's here, you only needed to go to page 2. That said, it looks pretty dead.
 
it is
 
Is it possible to access local variable of a function outside the function?
 
Yes, by using global
 
yuck. return it from the function.
 
oh, someone actually pointed to another one: chat.stackoverflow.com/rooms/106/r
which is also dead
 
4:06 PM
I think all the r rooms are dead
unfortunately
 
nuuuh
 
looks like most of the cross validated rooms are also dead ish
 
it's weird though. I'm sure there's a pretty active R community
but maybe they're mostly academics who already have places to hang out
 
there's gotta be an IRC channel somewhere
 
Actually I'm using a library and going through the code of that library I found if I can access a variable of that function, it could be much more useful, is there anyway to access that variable by not changing the code of that library.
 
4:08 PM
no, the R tag wiki doesn't even mention anything
 
@connectyourcharger it's not supposed to
 
@Rahul Unfortunately not, without manually injecting globals
 
Completely off-topic for a tag wiki
 
But the Python tag wiki has an IRC channel, I swear
 
Then it should be removed
 
4:09 PM
well, there's #R on freenode
seems to have many nicks
 
freehand circles rule
 
"circle"
 
but anyway, there it is in the python tag wiki
sorry, freehand ovals rule
 
I think that is the official IRC as per the Python website...
 
"oval"
pretty sure that's an artistic representation of a cucumber
 
4:10 PM
yes, yes it is
 
More like an L^6 norm circle.
 
I don't know why you've twice "corrected" the plural form since it's perfectly valid
 
"valid"
 
oh my
 
ok, I'm done
 
4:12 PM
Ok, that was my misreading :P
My brain is fried, off out for a walk. I'm now reaping the reward of "working from home" on Friday and secretly knowing that I could just make it all back up today. Until alembic + sqlite. I'd like to say I've learned my lesson but I really haven't; I'll scrape it back yet
 
@roganjosh I ate chicken rogan josh tooday :P
 
there's a chicken version of him!? licks lips and bears teeth... :p
 
tasty rawr
 
@JonClements g'day pupper!
 
cbg :)
 
4:19 PM
pupper?
 
Here's your doggo speak 101
May 23 at 4:44, by cs95
A pupperino is the male version of a pupperina, also known as a pupper, it is the formal name given to a floofin woofer or a mleming potat
 
wow this channel has really degenerated, between eating chicken forms of humans and using the abbreviated form of pupperino
I mean really, if you're going to talk about pupperinos, at least use the proper term
 
get out you non-degenerate
 
I'm also eating it tomorrow.
 
> You've earned the "Enthusiast" badge (Visit the site each day for 30 consecutive days. (Days are counted in UTC.)).
 
4:25 PM
I just earned fanatic badge
 
accidentally earnt from work being so hard lately
 
it's something I've been working on for a long time
I want to keep the streak going for as long as possible
 
at least you got your goals sorted out
 
I've noticed a strong correlation between Fanatics and rep hunters
 
Which is ?
 
4:36 PM
...positive
 
Hmm, I love python, but using "This is just why I love python :)" to explain the logic behind an answer seems... lazy
 
@JonClements The chicken is bruised and bitter today, I'm afraid :/
 
I don't understand why even users answer without mvce on plz send me teh codez questions where there is guessing involed. Can anyone explain ?
 
@Rahul because people sometimes answer them?
 
4:40 PM
@Rahul rep?
 
@JonClements what breed is that if I may ask?
 
huh?
 
@JonClements sorry I mean the dog in your profile picture
 
oh that... I'm relatively sure it's a chihuahua
 
@JonClements Even I thought so
 
4:44 PM
darn... the ninja outfit isn't doing a good enough job then! :p
 
I only now realized that's a dog
 
 
@towc or maybe it is then? :p
 
Picture of young Jon Clements, circa 1950, colorized
he "loves white chicken meat"
 
if you take only the head, it looks like a kangaroo
 
4:45 PM
@JonClements Isn't that your dog ?
 
@Devesh nope - don't currently have a dog - just an image someone found on the 'net for me and thought it was fun to use :)
 
@JonClements aah okay, a better DP then Identicon I sppose
 
@JonClements hope the license allows for this :P
 
@towc shrugs... no qualms in changing it if some copyright holder disputes it... but it's only a tiny pic anyway and not exactly that accessible anyway
 
famous last words
 
4:53 PM
heh... there is that I guess :)
 
> SO moderator sued for 3 billion dollars, has to sell house and kidneys (not only his) in order to stay alive
 
:p
@towc ^^ besides - could be much "cooler" looking :p
 
did you check the license for that?
also, I bet you'd get some "aggressive masculinity" backlash
here's a filter including license: google.co.uk/…
 
wow... you're the embodiment of being pessimistic these days aren't you :)
 
^
Not quite everyone is completely bonkers just yet
 
5:01 PM
are you suggesting I was ever different?
watch your tongue, young man
what about this?
 
Might go watch some weird Netflix series - could possibly end up being less surreal than this conversation
 
@JonClements how are the kids anyway?
 
I wouldn't know... I imagine baby goats across the world are doing mostly better than worse around the world though
 
I can live with that
 
5:10 PM
I see more questions on installing tensorflow than on tensorflow itself
@JonClements until they're turned into mutton rogan josh
 
The lamb has been marinading in the beer garden for 45 minutes, it's now ready to go
 
@roganjosh enjoy
 
Ah, I'm back home now. I just needed at least some time away from a screen to regroup since 7am :)
 
ooh, you're cooking lamb?
did you cook enough for everybody in the chat room?
 
As long as I don't need to add any more fields to my test database... ever, then I have a nice flashy product for tomorrow's meeting :)
Is anyone familiar with Alembic btw? I tried every fix I could possibly find about altering an SQLite DB but for new foreign keys it lurched into different errors when I tried them. In theory I could have another script to manually make the ALTER commands when Alembic fails, but I'm not sure whether that screws up Alembic's migrations (is it all-or-nothing with Alembic?)
 
5:24 PM
@roganjosh possibly davidism/Antti are your best bets there... I've not used it to any level of being able to provide assistance I'm afraid :(
 
@JonClements No worries. shad0w_wa1k3r has an answer similar to the docs, but that just pushed me into an index error. Deleting the database and starting again does make a valid database though, so I'm a bit lost on what's screwing up
SQLite decided to be awkward in this respect so I think the batch migrations for alembic are "try as best you can" and not definitive
 
oh, if it's a test system, and not a live production DB, you can pretty much always get away with just a complete turn it off/on again thing...
then maybe squash those migrations into one on the next attempt and go from there being a little more careful kind of thing
 
I need to be able to port the db between two development PC's so it's not a test per-se but rather, a db of test data that I can use to advance the program
 
okay, so why not just an RDMS to start with then instead of a local file system DB?
 
Not sure what you're hinting at. I currently have SQLite for development because I can dump the whole project to a memory stick and either work from it in the office or at home. You're suggesting a remote db hosted somewhere that I connect to from wherever?
 
5:35 PM
depends on your constraints
you can dump an entire OS system and DB setup on a flashdrive if you really wanted to... make it bootable and all that if you wanted
 
True, but both dev systems are in Windows. It's only production on Linux
So I think it would be rather large to get on a flash drive
The company will not pay me in the short-term for some cloud server but, actually, it might work in my favour just to buy one to develop this in order to get the project up and running
 
my to go for a really cheap solution that isn't actually too bad is Digital Ocean... you can get something reasoning to play with and destroy for $5
 
Which probably is a more sensible choice for me, because then my migration scripts will reflect the production db and not be fudged to accommodate SQLite
 
the $5/mth plan on DO although small, just about gives you enough space/resources to docker things up etc... I use a few of 'em instead of the larger plans there or linode for instance (and other places such as AWS/GCP) to just experiment and (possibly) break ideas/tests.
 
I've fixed my schema for tonight, now just to tie up the front end, but I think you've swayed me @JonClements, thanks
 
5:47 PM
invoice in the post? :p
 
Sure, I live at 123 Sesame street, Noawear best not give my address out in public :P
 
:p
I'll look forward to my other 5 imaginary sausage rolls :p
 
Have 6 right now! I've had them couriered over, special delivery
 
woof woof woof!.... runs around in excitement
joking aside though... good luck tomorrow
 
yes, good luck at your meeting
I have been reading this conversation even though I've been silent :P
 
5:54 PM
Say, if someone were to post their DB URI on SO, with credentials and all, what's there to do? Flag for moderator intervention?
 
Yes
immediately
 
Thanks mate, it'll be fine. Gonna keep my head down for an hour or so to pull the bits together; the backend has been a lot more work than expected, but now it's just a bit of pulling things together
 
And don't publicise it either
Like, don't share a link here
 
@connectyourcharger That's a given.
 
I know, just making sure
 
5:58 PM
@IljaEverilä edit and flag for redaction
mods will remove it from the edit history entirely
 
I wouldn't even edit it
 
and shout at OP in comments
 
Then it goes through the review queues
 
@connectyourcharger okay
 
And somebody might see it
 
5:59 PM
@connectyourcharger if you edit it, yes
 
I would just flag
Hopefully not too many people see it
 
If you can edit the post yourself, then do that
 
I couldn't find it on the new questions list, so I guess that's a good thing
 
let's just assume for a second that I'm more aware of protocol here
 
Yes, if you have enough rep, edit it yourself
 
6:01 PM
"I Know What I'm Doingâ„¢"
 
"I Don't Know What I'm Doingâ„¢"
 
@connectyourcharger This.
 
definitely that
 
that's not trademarked because no one wants to admit it
 
I will gladly trademark it
 
6:05 PM
break a leg
 
in the patent office
 
@IljaEverilä I've put in a moderator redaction request just in case... it will take another mod to approve it though
 
6:21 PM
oh yeah, I think I knew that once
 
6:45 PM
Downvote isn't from me, but thanks for updating! — cs95 2 hours ago
@cs95 ^ Why not, though? :P
 
Didn't want my rep to stop being a multiple of 5, lol
 
fair 'nuff
 
If you're in a pickle you just have to ask to get a downvote. I'm here for you.
 
Thanks, but I don't hate the answer that much.
 
for the record I meant cs :P
 
6:55 PM
Oh :D
 
7:08 PM
Some Class A cold-shoulder right there
 
@AndrasDeak no thanks, I'd rather downvote you twice ;)
 
7:33 PM
What is the proper way of installing Python on Windows? I usually use Linux and everything works well there. For Windows I used standard installer from Python website and now for example making some not reasonable charts is hell. I decided to use Bokeh, now I am stuck trying to install Scipy.
 
Two main options: Anaconda/MiniConda or unofficial binaries
 
Scipy itself suggests "complete scientific Python distribution" for example winpython.github.io but I worry that it will be broken in some other way.
Thanks for lfd.uci.edu/~gohlke/pythonlibs - at this point I will happily install random binaries :)
 
numpy first, before scipy or pandas
the conda approach is almost always more manageable btw, it just depends how much space you have (Anaconda for the whole plug-and-play or Miniconda if you want to build up the libraries and run leaner in terms of disk space)
 
Anaconda is independent from system Python, right?
 
It depends, you get a choice of whether you want it to be the default Python installation for the user. It won't break Windows either way
 
7:47 PM
windows has no concept of system python I think
unless newer windowses shipping with linux do?
 
I think the same too. I have had a Jenga tower of Python installations and nothing touches Windows itself
 
I though rather about - is sctipt running in command line capable of using scipy installed by Anaconda? Is it necessary to uninstall existing Python from system before installing Anaconda?
 
It's not necessary, though how you go about specifying which python interpreter runs a script is not the easiest
What do you need that you currently have, but don't think will run in Anaconda?
 
I want to help friend with making some nice graphs. Bokeh prototype works well for me, I wanted to be sure that there are no unexpected problems.
And Windows turned out to be a problem.
 
Lol
Well, Anaconda won't be an issue in that regard because, regardless of the OS, you can use a virtual environment for this
 
7:56 PM
Now I am looking for solution that is likely to work without high chance of crippling her computer.
OK, I will try gohlke first (it seems sort of reputable and not something that will try to mine bitcoins or something), Anaconda as a backup.
 
If you're trying to streamline things and the binaries don't work out, then I'd uninstall the existing python and just go with Anaconda
 
Main problem with that solution is that I am the person who setup Python and I would prefer to not admit that I made a mistake :)
 
Can't help with that one :P
 
8:12 PM
@MateuszKonieczny any luck? One thing I found is that the requirements of each binary aren't necessarily consistent for the core scientific stack, so I ended up in an endless loop of each binary overwriting the library I installed earlier (which was trashing MKL on my numpy installation)
 
8:32 PM
@roganjosh I am still downloading numpy
 
wut
That's not ideal internet speed :/
 
Only 200 MB, but for some reason for this site it goes ridiculously and unusually slow.
 
@roganjosh Thanks, I finally have Bokeh graphs! I initially downloaded wrong wheels, but later everything went well and pandas turned out to be installable with normal pip.
 
No worries, and you kept your pride by sticking to original python :)
In future, I really do recommend going with Anaconda, though
 
Yeah. More seriously - this project is big enough to justify Python usage to generate graphs rather doing it manually (thousands of them), but it is not likely that this person will use Python again.
 
... <dramatic_drums> Or will they? </dramatic_drums>. But I was also being serious; on Windows, it's just easier with Anaconda. Normally space isn't really a concern, and the amount of time I've lost faffing with the wheels etc. it's just my go-to now
 
Yes, I also learned my lesson now :)
I will try it, I see why it is useful.
 
9:22 PM
@roganjosh people still using Windows? :p
 
@JonClements ouch :'(
 
@roganjosh btw... do you tell remember this youtube.com/watch?v=1fdbblQ2HMc ?
 
I didn't realise you nipped :P
 
hehe... better than limb removal? :p
 
I don't recall ever hearing that song
 
9:26 PM
@roganjosh panda is the best
 
@AndrasDeak It's a growing thing. I kinda anticipated it at the end of the answer I linked them to, but it falls short of catching all the wanderers searching for the match to their query
 
@roganjosh haven't heard it it in years - forgotten they existed
 
I haven't decided whether that's the one I want to elaborate on more or whether to wait for a different question.
 
I'm talking about consistent use of "panda" by the OP. Like calling collections collectives instead.
 
@JonClements It sounds a little... hectic
 
9:30 PM
or import multithreading
 
But panda is the bestest, I don't see the issue
 
@roganjosh probably same "era": youtube.com/watch?v=FEhpmuXHmRQ
 
@JonClements Oh, that's in a different league. A classic
 
just going through "old" things... anyone remember Alisha's Attic!? :p
oh gawd... shoot me... I have an Atomic Kitten album
 
@JonClements at the start of goth? youtube.com/watch?v=q-RVJyNpfDk
I'm trying to pull the breaks on this pop train :P
Also, Chris Norman (previous lead singer of Smokie) was fantastic and is on tour
I was gonna walk out from the band that was touring with him, but it ended up being a great Saturday night
@JonClements "I am, I Feel"... seems I remember more lyrics than I would have liked to admit to :P
 
9:43 PM
23 hours ago, by Andras Deak
ah, what do you know, np.testing.assert_equal actually checks for the exact equality case. So it does answer the original "assert that do dicts of arrays are equal"
that ^ made me curious because it's obviously recursing into the objects it's given
>>> a = []; a.append(a)

>>> np.testing.assert_equal(a, a)
Fatal Python error: Cannot recover from stack overflow.
 
Nothing recovers from stack overflow
 
there's also two pages of a stack trace :P
 
something something physics something black holes something
 
@roganjosh that's the one :p
strangely reminded of youtube.com/watch?v=1rr4tXN2eJM as well @roganjosh :p
might have to dig up some Travis
 
9:51 PM
omfg... completely forgotten about that one...
ty
 
:)
 
Bookmarked "James" - forgotten about 'em... (strangely... same way I forgot about Hinder I guess)... just found youtube.com/watch?v=RUmdWdEgHgk
 
(a:=[]).append(a)
 
@JonClements gosh, that's an old one I'm not overly familiar with
 
you know the Cranberries though?
 
9:58 PM
Zombie!
 
Sure, I also I have heard that song, but not one I've heard often
 
Dreams, Zombie & Linger are probably the most heard I guess
 
this does the rounds on the pub jukebox a lot and I quite like it; to push the genres a little broader
 
I'll give it a go... you try this one? :p
 
@JonClements Trying to think who that reminds me of. Good background music
@JonClements do you know Alt J?
 
10:13 PM
don't think so
just been getting all my "old stuff" old of the loft... had to ask a mate to help me out to clamber up into it - just spending a little time going through a storage create of CDs at the moment
think there's another 3 up there and 3/4 in external storage or something
 
This is a great song from them. I probably need to go to bed. If we go to vinyls then I could be here all night :P My mum has our full collection at hers and a turntable so that's always fun :)
Gonna head out. Pleasure as always. rbrb guys :)
 
rbrb :)
 
rbrb
 
hi , i was wondering , if i've a flask system that is similar to myPhpAdmin ...
lets say it's connected to 1 postgreSQL database that does 1 million rows entry each day...

what is the minimum hosting resource i should get for a system like that ?
how can i calculate the resources required for my system ?
 
10:29 PM
Of course they wouldn't want to pay 200 pounds, the exchange rates are horrible
 
Solid point
 
@AndrasDeak much better than they were though :)
 
yet again reality challenges The Onion with "hold my beer"
@JonClements indeed, May the exchange rates be ever in our favour
 
how you calculate the server resources required for a flask system?
is there is anything that can test the capability of the server ?
 
@JRick don't think of it as flask - that's not going to be anything you want to worry about unless you've got some really weird code... you want DB stuff
when you say you've got a "million rows entry each day" - what exactly does that mean?
 
10:33 PM
@JonClements i don't know lets say i'm hosting a social network and i'm expecting at least a million Database query everyday
 
and what would you think those DB queries would be and what is your DB? etc... etc...
I don't think anyone can help you here
 
are you planning on single database instance or scaling it across nodes etc...?
 
DB is postgresql for ex, but it's ok if no one can have an answer to this question but i'm hoping that someone can point me to the right direction
 
@JRick depending on the system you're wanting to have - it's going to be a "suck it and see" situtation
you'll just have to profile it as you go along
 
10:36 PM
i heard that java does that thing that is called " rendering " which stuff the server with loads and loads of query to see how far is it's breaking point
 
is your site even at working point?
 
@JonClements no , i'm preparing it , but i like to be prepared than sorry
i don't want to host something that required 10000gb of rams on server with 2gb rams
how can i test it ?
 
you're thinking about it the wrong way then... just make sure all the little bits work properly and efficiently even locally, then worry about scaling it later... if you get the small stuff done you can always launch multiple instances etc... or scale out postgres servers as required... just make sure it works first :)
 
@JonClements i see your point but what if my idea requires lot's of resources more than i can effort otherwise it will be a laggy buggy system for everyone / clients / customers
 
well, you won't know until they use it, will you, and for that to happen you to need it to be up first?
 
10:42 PM
shouldn't we be taking care of the working part along with the capability part ?

i know java does something sort of rendering thing to test the server's capability do we have anything that does this for python ?
 
get it working - monitor it... scale up later if you need to... you won't know if it's going to be laggy/slow until you do it
@JRick just use any testing tool... the backend being written in Python doesn't make any difference... just use whatever tool you want to hit it and go for it...
 
@JonClements oh ok .. i will give that a try
thanks man
 
@JRick how are you thinking of deploying your Flask app?
 
@JonClements what do you mean ?
 
well... how do you intend to run flask... presumably not its development server? Something like gnuicorn/uwsgi behind nginx etc... ?
(maybe with an haproxy in front?)
 
10:47 PM
i have no idea what u have just said
 
best you keep it simple then... get it working - see how it goes and worry about details later
 
i was just thinking about purchasing any hosting services and use it for hosting
@JonClements honestly it's like driving with both eyes closed , i have to know how much web hosting resources i'd need to keep my site up 247 without any problem , i think testing tool can give me an idea what to expect
 
look at the cheapest you can find - most offer a free month or something for relatively little - go for that - see if you can get what you want setup and working there as you have it locally....
@JRick but you have nothing to effectively test nor any current environment of what to test against from what I'm reading into this...
 
@JonClements i expect millions of database queries ... i have no idea how strong would be the cheapest hosting in situation like this
 
and a stranger on the net would when you don't? :p
we're flicking to and fro' on various things here... I wish you the best of luck, but I can't help you out here more than I've tried... please just take a bit of advice of walking before you run, because, with no offense intended, you're sounding slightly out of your depth.
 
10:57 PM
just worried that is all , i used to plan everything .. that what keeps me confident about my goals.
@JonClements but i appreciate your help tho and yes i'm a bit out of depth i know , but thanks for helping tho
 
good luck
 
thanks!!
 
11:20 PM
@JRick: As Clements has said "using Flask or not" is kind of the wrong question (again there are a bunch of considerations). But FWIW, I believe Reddit uses Flask. However, it's got a lot of things going on for it to operate, so it's definitely a more complicated than I'm making it out to be.
 
11:31 PM
@jrick yeah it's kinda complicated , it's differently relaying on lots of variables experiences and knowledge
have anyone had any experince with something like google cloud "aka : app engine "?
 

« first day (3151 days earlier)      last day (1806 days later) »