« first day (1676 days earlier)      last day (3255 days later) » 

1:15 AM
Hello, Python room, I believe I have documented the memory savings that __slots__ provides. Any suggestions or criticisms would be nice: stackoverflow.com/a/28059785/541136
 
 
3 hours later…
3:55 AM
Cabbage :-)
 
cbg
 
4:17 AM
cbg
 
@AaronHall there was a bug that slots wouldn't work with collections abc classes in Python 2 :D
 
@AnttiHaapala sorry for stepping in earlier
It wasn't the worst question in the world, but the user has a history of being pretty not good at chat, and the thing wasn't going anywhere.
 
@AaronHall there is 1 problem with your calculations: the getsize in the dict example I guess must include the space used by strings (the attribute names); but normally these would be interned...
@davidism np, I just wanted to understand why the metaclass didn't work (though the approach was a bit fruitless)
 
@AnttiHaapala what? can you point that out to me?
 
4:28 AM
sorry just woke up :D
 
I just posted a new answer on getting the size of Python objects: stackoverflow.com/a/30316760/541136
 
six 96 64 + 1048
this one, the 1048 I guess must be counting in the sizes of the attributes
aka strings...though usually they'd be interned
 
It's a preallocation of space
 
yes you're correct...
 
4:30 AM
most of those bytes are empty
 
hmhm but why did a dict spend that much space
 
My wife is about to be furious with me if I don't go to bed now. Ciao, folks!
 
rbrb
 
lol :D
 
4:32 AM
it's a preallocation up to 22, then it gets even bigger!
ok, gnight!!
But seriously, make sure I didn't mess anything up here too: stackoverflow.com/a/30316760/541136
 
I know, but 280 for 6ish items is kind of much
seems that 1 entry takes 24 bytes on 64-bits
key, value and cached hash
 
3 * 8 * 8
?
I don't know why, but that's the overhead
maybe a lot different in 3? didn't check there yet
 
I mean that I get from the ctypes, so the 6 items would take 6 * 24 = 144 bytes, then object overhead and so
wish that python had the javascript hack of slotting stuff for fast access :D
 
in Python 3 they're smaller
grows at 6, 12, 22, 44
 
dicts?
not for me
 
4:40 AM
288, 480, 864, 1632, 3168
 
ah yeah
not necessarily a good thing either :D
 
tradeoffs
I figure they're done tweaking 2.7
 
higher constants for O
 
ok, bed!
review my getsize function
 
5:03 AM
Yay, finally i am able to speak in the chat
 
cabbage
 
Cabbage?
 
I can't believe that is a thing hahahahaha
Seems like i will need to learn a new language
(?)
 
5:34 AM
good morning
 
@StephanKetterer cabbage
 
5:51 AM
mongodb open, pymongo installed and working on an example, importing a json file, not yet working, i tried mongoimport --db osm_karlsruhe --collection points --file c:\Users\Stephan\Desktop\data.json
 
CBG!
 
@StephanKetterer maybe you should post your mongo questions here too
even if there's nobody there now
 
oh thank you , did not know that existed, unfortunately the room is empty :)
 
yeah, it is empty because no one is talking in there :d
someone must be the first, start hanging in there too
 
main_list=[["john"],["24"],["katie"],["23"]]
 
5:56 AM
mongodb is not very popular in python world
 
Yes, but this room isn't for mongodb. You should either ask in the appropriate room or ask a question on the main site.
 
expected output: main_list[[john,24],[katie,23]]
 
@d-coder why
why do you have [["john"],["24"],["katie"],["23"]] in the first place
 
Xy
 
yes
that datastructure does not make any sense at all, the 1-nested lists are definitely an XY problem
 
5:58 AM
some data scraping let to that disaster!
has led to that disaster*
 
you'd want to have ['john', '24', 'katie', '23'] first
or... alternatively you'd do:
[ i[0] + i[1] for i in zip(main_list[::2], main_list[1::2]) ]
 
list comphrehension
@AnttiHaapala : Thanks a lot.
 
6:20 AM
Cbg
 
I have a question about something Linux related (got a Django, python project running on it), is this the right place?
 
o/
I have a slight issue here
I've got about 75000 JSON objects, coming in one at a time, in a rather unreliable fashion. I can't control the input
So I save them to a file as soon as I get them
Is there a way to append them to a JSON array in the file?
As of now, the best bet seems to be one object per line, and then converting it to an array later
 
Doesn't that mean processing the data before saving it to a file?
 
Essentially, it's bio data for n number of people. So I get stuff like name, school etc. one at a time. I need it in an array in the end
But since it's being sent to me in a unreliable way, I'd prefer to save each person as he/she comes in
 
It's possible to append lists to a file, but I guess that's not what you need?
 
6:32 AM
I can already append to the file. I want it in a manner that the file has a JSON array of people. As each person comes in, he gets appended to the array, not just the file
 
6:43 AM
What kind of extension? Just a normal text file or a json file?
 
JSON file
I ended up going with one JSON object per line
I'll just post process it later
 
Sure thing
Im currently searching for a way to check if a certain interface device is up and want to log it's data usage with (Django) Python that runs on a Linux system.
Not easely found :P
 
Can't help you there :P My python experience is mostly limited to scrapers
 
Mine is mostly web applications with Django, have a lot of communications going with other devices or services, but somehow internal Linux stuff is harder then the external stuff I already have done.
 
CBG!
 
user4433485
6:58 AM
CBG
 
@Katherina Hey, how are you?
 
user4433485
Tired
 
user4433485
:p
 
user4433485
You?
 
lol... I am sleepy
 
user4433485
7:07 AM
been working from 08:00-01:00 for 4 days in a row
 
What are you up to these days?
 
user4433485
Can barely keep my eyes open
 
Oops, you should get sleep more often
How long do you sleep?
 
Cbg
 
rbrb for a bit
 
user4433485
7:09 AM
ehm
 
user4433485
couple hours
 
user4433485
5 hours likely
 
Slept last nite for around 2 hrs
:( project demo today
 
user4433485
ugh
 
Quite sad stuff here.
 
7:18 AM
Well, since we're doing this, my wife's ill today as well.
But I am GREAT! :)
 
cbg
coffee coffee coffee
lol "there's no corruption in Finland (tm)"
the chief of drug police in Helsinki now in court, lol, the guy's been one of the the biggest dealers in Finland
 
What a bizarre claim to make, even if he were innocent
 
was helping 1000 kg of hashish into the country
well not a dealer per se :D
 
No, of course :) But a supplier
Slash middleman
 
if he were innocent then he should be fired nevertheless because of incompetence, for allowing himself being framed like this by the criminals :D
guy had more than 100k eur in cash in garage :P
 
7:30 AM
Haha
Blimey, these people are bizarre
 
and had bought a house he can't afford with his salary, "yeah, just bought the house, so what"
 
It's interesting that with electronic banking, although electronic fraud is now possible, it's a lot harder to move large amounts of money around without a good reason
Because people just don't have that kind of money in cash any more
Well, I don't have that kind of money at all
 
me neither :D
wish I had...
 
Should've robbed that guy's house :)
 
if you were to frame a cop, surely you could find cheaper ways to do it than hiding 100k in cash in his house :d
 
7:34 AM
Well, chief of drug police though, I'd say you'd need at least that much. He must be on a pretty good salary; wouldn't risk it for a few k.
I find the idea that you can only reliably enfranchise people who have access to lots of money/expensive commodities by paying them just enough to keep them on your side quite interesting
 
sorry only 70k€
that's like how much he could put in savings max in a year :D
 
Oh, that's not amazing. But I guess there's other stuff like pension which keeps you hooked
Save 70k/year?
 
the chief of a dept in a 500k ppl police district is definitely not paid millions
anw, the guy is saying "I've been framed", someone put 70k in cash in there :D
 
No, sure, I'm just saying that whether he did it or they framed him, you'd expect to find amounts like 100k
At LEAST
Oh, I see what you mean by 70k
 
yeah... but who would pay that much, bc he was suspected and arrested and at that time being in detention already :d
 
7:40 AM
Depends when it was paid, I guess
Oh - Pyramid question
 
do ask, about to leave for lunch
 
I'm trying to grab the subdomain from the request, to do SAASy mycompany.app.com sort of stuff. I'm currently just calling a function from within the view to extract it; is there any funky smart way to do this? E.g. I was looking at decorating the function late last night, but then I broke the url routing so I changed it back.
 
it depends on what you want to do it...
that might be of interest
 
Will take a look, thanks!
 
the second one really only applies to url traversal only, but it makes sense too :D
 
7:45 AM
That's cool though, then I can do subdomains without configuring apache yet
 
or: you can make a completely distinct wsgi app for each user
 
Cabbage!
 
@AnttiHaapala hm that sounds interesting, but can I do that programmatically?
So each company that signs up to the site gets their own wsgi app?
 
yeah, you can do that programmatically too,
1 pyramid process can have any number of wsgi apps...
if you do not use global state but only the request object, they can live in the same process but all of them could have distinct configuration
 
7:48 AM
Yeah I don't use any global state
(AFAIK)
 
the sqlalchemy does then give some constraints too
for example we found out in 1 of our product that it might not be good idea to stuff every user into the same DB...
but OTOH you'd need the connection pooling
 
Oh yeah, so I do have global state. Hah.
I'm fine with the way I'm doing it, it's not something I haven't accomplished. I'm just wondering if there's a wizzy alternative
I thought decorators could be cool, except that I broke it all even trying to decorate the function with a decorator that did nothing
 
just do it that way then later realize you should do it the other way then refactor
 
Yeah that's my thinking :)
 
decorators are not cool
though...
 
7:51 AM
They're.... HOT
 
you'd want to use things like tweens, or sth.
and this too
 
Oh flip, I think I see why that didn't work
And why I should stick with they way I'm doing it now :)
Thanks!
 
8:19 AM
Cabbage from the UK all.
 
Cbg
How is the UK?
Any bluer?
 
Wet, so maybe the lakes are bluer
 
Makes sense :) NHS still there?
 
Hello, is it recommended to use OpenBR in Python or C++ ?
 
8:32 AM
Just
 
What would be one word to describe an ideal judge?
 
Fizzy
 
terminal ?
 
Sorry, Robert, I missed your cue due to phone not playing nice.
 
8:46 AM
Tip of the day: if you're going through a proxy, editing your hosts file won't do anything (on Firefox on Windows, anyway)
 
Hey ho. Phase 2 of day recovery for me today. Any recommendations on external HDs (2TB+). I guess they're all much the same, really
 
@JRS I've always been a fan of Seagate, though I have no quantitative data to back this up.
 
Man, I still love Opera. Maybe I should use it more.
 
Fair enough. They're a well known brand, thanks @fizzy
 
I think ours are Seagate
 
8:54 AM
Suppose I develop a commercial application. Do you think it is a bad idea to host it in a private depo on GitHub, Mercurial and similar tools ?
 
Why would it be? It's private.
 
@Nakkini probably okay to start with
If you got big you could always move your IP in-house
Github should make an on-prem Github in a box
Github Appliance
 
@RobertGrant thank you. But i read on Internet that GitHub was hacked several times in the past and hackers got acceess to private depos of other users
 
Everything's hackable, I guess
 
9:07 AM
That particular instance is a good thing, as it means their bug bounty program is working
 
9:33 AM
Morning folks
Does anyone know of a good project management software, that "automatically" calculates workflow, the order in which things should be tackled etc
(Most importantly, how much a new task would affect the existing workflow)
 
Haha okay you got me
I'm literally trying to make something like that now
Although workflow is a bit of a stretch, actually
 
When's it finished? :P
 
You'd have to tell it what comes before what; you're looking for something that will work that out for you?
Haha, it's just started :)
 
That would be nice - but not as important as the second part
Basically, one of my clients has a number of departments, and miscommunication about how much something will impact the existing the workflow keeps tripping them up
and it's painful to watch
 
Yeah I was experiencing the problem directly, and watching a manager use Project is as painful as watching a manager do anything
So I'm building something that might be a bit more useful
 
9:45 AM
Sales: "How long will it take?"
Engineer: "2 weeks"
Sales (to customer): "It'll be ready in 2 weeks"
IntrepidFacepalm
 
Dev should've said "Development will take two weeks"
Crazy dev
 
Haha yep.
 
But I'll keep you posted on what I'm doing; I want to try and make something that's generally useful for planning projects, and integrating new projects into BAU, that sort of thing
How much durations extend, all that stuff
 
Brilliant
You githubbing it?
 
9:57 AM
Yeah but it's private, for now at least
I'll try and make it SAAS, and then factor out useful code into open source libs
 
just because i anoyed everyone with it so much, i finally got this whole mongodb on track :)
 
@IntrepidBrit it has leave booking and all sorts, so it all kind of fits together at the moment
 
Ah okay Bobby. Makes sense. After all, you are putting a lot of work into it :)
 
:)
Doing my slow best
 
user4587874
Hello, does anyone know of a useful reference for learning how to fit a sum to data? (i.e. fitting function f(x)=Sum_1^N [some expression of x]
 
10:03 AM
I thought it'd be cool to have something like that that companies pay a little bit a month to use, at least to partly fund future development, that sort of thing
 
@RobertGrant Well, if it's everything you're promising - I'd happily put money where my mouth is
 
Cool, I'll definitely keep you posted
 
user4587874
SO doesn't have Mathjax??
 
Here's a SAASy question: is it better to have slacklike URLs, where it's companyname.saas.com, or githublike URLs, where it's saas.com/companyname?
The only differences I can see are that the slack ones allow people to "discover" who's using slack (e.g. I could try google.slack.com), and the slack ones are slightly harder to configure
And look at that. google.slack.com works.
 
Yeah. I prefer that though personally. Makes me feel like that our slack space is separate, even though I know it's 99% not likely to be be :)
 
10:08 AM
Yeah that's true; there's a psychological difference
And I guess it's easier to actually give companies their own instance if they want that
 
@user929304 Have you checked out the scypi optimize documentation?
@RobertGrant Aye, there is that
 
Okay cool, I went with slack style. I'll stick with it.
 
Cracking. Let me know when you're at a stage where you want input :)
 
Thanks sir
 
how do you convert a numpy linspace to an array of 2d points...
 
10:29 AM
Trains are insane. If you travel to Oxford via Reading then you enter the "Greater London Area" (or whatever it's called) and the price goes from £12 for a return to £40-50.
 
Yeah
I looked at commuting from Oxford to London and it's about 5.5k/yr
 
Oh and that was with my Student discount card (so 1/3 off)
 
Wow
I seriously think it's worth just constantly being registered on cheap courses :)
 
Or, you know, just don't even visit London.
 
10:31 AM
Not visiting London is viable. I recommend almost anywhere else ;)
 
Yeah TfL are interesting in that they get to set their own prices, and the city of london disincentivises other modes of motorised transport
Not exactly a hard thing to keep running
 
Come to Bath! The world's best gin joint is next door to the world's best pie joint.
 
Eurgh. Gin?
 
How do you not like gin?
 
Easily. I put it in my mouth, then spit it out saying "Eurgh. Gin?"
 
10:33 AM
Gin is the best of things. Better than that whisk(e)y crap.
 
Them's fightin' words Fizzy
 
Come at me brah, I will reck u m8.
 
What's the m8 ever done to you?
 
(Where is the m8?)
As an aside, and rather cleverly, in South Africa A-roads are called M-roads (for Metropolitan) and M-roads are called N-roads (for National)
This makes it incredibly hard to work out which someone is referring to, as they sound so similar
 
(the m8 is in Scotland, naturally)
That's a pain in the arse. I find SA accents troublesome to follow even at the best of times
 
10:40 AM
Well you may not have heard a real one, if you've only seen films about south africa :)
The guy in District 9's was real
 
Pie followed by gin. Sounds good. Ever the peace maker (fence sitter?) I'm partial to whisky also
 
Yeah same
Gin's easier drinking
 
You're all mad.
 
Although therefore I often drink far too much. I wonder if this is where its reputation for making one maudlin stems from
 
10:42 AM
But, I shall happily partake in pies and any other kind of alcohol
 
As a box of frogs @IntrepidBrit. And I'm watching a backup complete with crossed fingers and not touching anything, so you can expect worse for a while
 
@IntrepidBrit Steak pie and alcopops it is!
 
Mmm. Dreaming of pie and a pint of stout now
 
Now there's an idea
(To the stout. Not the alcopops :P)
 
As an aside, USB 3.0 is properly fast with large files.didn't realise I'd become such a luddite so quickly by not having a fast external drive before
 
10:45 AM
Man I miss beer
@JRichardSnape yeah it's insane
 
Stout it is.
 
Congrats on your new drive
Long may it not break
@IntrepidBrit this is the crazy thing about developers. ONE PERSON tells me they want what I'm making and I want to quit my job
 
Don't do what I did in Texas. Back up near a dog. The blasted hound took out the new drive AND the original
@RobertGrant I know right?
But that's also what's amazing about being a developer ^^
 
@IntrepidBrit I thought you meant, like reversing a car near a dog, and it destroyed the driveway
That is one mean-ass dog
 
This is why I have no legs :(
 
10:50 AM
Lol at "the blasted hound". And the idea of a dog being an occupational hazard. Although wrt the data, I'm sorry for your loss
 
Stupid mutt
(Disclaimer: I do actually have legs)
 
But it sounds as though if you could tame it, that dog would make one bitchin' wheelchair
Assuming you could communicate the concept and get it paw-operated tools
 
I got distracted by cat videos on youtube again.
 
I love the idea that one might accidentally back up near a dog if in Texas, but there's a specific warning against it
Never code near a cat when in the West Country
 
Why's that?
 
10:53 AM
Distraction. They're wily, those felines
 
Oh flip, what if people take hours of leave instead of days? (Argh)
I'll have to sort that out tonight
Stupid people.
 
Ah. So felines are cementitious material friendly?
 
Apropos stout, this looks like an enterprise I should be supporting redlegbrewing.com/news/february-stout-month-red-leg-brewing
 
@RobertGrant Yup!
 
Urgh. Stout? Urgh.
 
10:56 AM
I an a stout chap, in more ways than one, unfortunately
 
Take your stout and your whisk(e)y and be on your way! Leave me with my cider and gin.
 
Can I take the cider with me?
 
I once lived on Guinness alone for a week in my more stupid days. But that's another story
 
No. If we're getting divorced then I'm keeping the cider. They belong with me in the West Country!
 
Okay okay. You can keep the cider. I'll take the scrumpy
 
10:58 AM
Anyhow, @IntrepidBrit, one level of abstraction too deep for me with the cementitious line. I can't follow the indirection
 
@JRichardSnape Cemenititious materials -> Concrete like-materials -> Drives in Texas are generally made from tarmac or concrete
 
Don't try that trick young man. Cider (all forms, including scrumpy) and Gin stay with me.
 
@Ffisegydd I did not ask you about the interviews you just had -- any luck, are you working at some place now?
 
@Peter no not yet, got an interview tomorrow.
 
now I'm thinking of sitting in a field drinking scrumpy, with the smell of onions gently frying and a band on stage. You lot are bad for my work ethic (or lack thereof)
 
11:01 AM
I'm waiting for offers from places I've interviewed at.
 
This meeting on Thursday, is that for anyone who's about, or Room Owners?
 
Anyone.
It's an open General Meeting that we have quarterly.
We generally just see who hasn't turned up and mock them ruthlessly behind their backs.
 
... I wasn't there last time :(
 
...awkward...
If it's any consolation, we were only mildly racist.
 
Well, that's okay then. In the best of British traditions
 
11:18 AM
late cbg
 
cbg AI
 
cabbage
 
@Pureferret Why?
 
@Unihedron It's a duplicate
Unless....you disagree?
 
11:27 AM
I would argue that the one asks for Unique Identifiers while the other is for global / universally unique identifiers
buuut cv'd :P
I'm back to my headquarters of monitoring your close vote requests, bye!
 
@Unihedron The answers both refer to the uuid module (which is the right way, right?) though....
 
11:37 AM
Hey up again.
 
hey up
 

« first day (1676 days earlier)      last day (3255 days later) »