« first day (2125 days earlier)      last day (2809 days later) » 

1:03 AM
Hey, does Python time.time() give back POSIX time or UTC time in seconds? I mean, does it account for leap seconds/leap years or not?
 
 
1 hour later…
user559633
2:14 AM
@Kelthar It's epoch seconds and relies on timespec from time.h. I think that means it's dependent on your OS providing leap second support.
 
2:37 AM
cabbage!
working with selenium, would love a simple way to listen for a keypress and do something with it. Anyone familiar with a solution for this sort of task?
on windows
 
on windows? are we talking about selenium the web framework?
 
cbg
How to check whether the entire database is loaded into the memory or not?
 
either way, create an event listener class which inherits AbstractEventListener (from selenium.webdriver.support.events...I think) and pass the element and a driver if needed
 
2:55 AM
yeah, and thanks, I'll look into that
what's a dirty simple ide like Idle except better for Windows? i'm sick of it's issues but I don't like pycharm
 
I use GVIM
 
i'll check it out
 
its not an IDE - it was my way of saying I don't use an IDE (actually on point I used PyCharm when I do but it is rare)
 
user559633
3:10 AM
@AvinashRaj I don't know what you're asking
 
I'm having two files.. called cli.py and helper.py. From the clip.py, it has to call the class which exists in helper.py . But I declared connection, cursor object before that particular class. A function from the cli.py file is responsible for calling a method exists inside the Helper class. That particular method would use the already defined cursor object (we declared above the class definition).
That particular func of Helper class should be called repeatedly. So I have a doubt of , python loaded the whole database into the memory on each time a call to the helper method is made.
 
 
1 hour later…
4:32 AM
i have save the data in mongodb bt when i query it from db part its give me only one user data.Y it so happen
 
@imdadhussain why are you asking this in Python room?
 
just i want to know y it happen
 
4:48 AM
I understand, but it doesn't seem to be related to Python. But more importantly, nobody can help you unless you provide a MCVE
 
@davidism Oh Yeah. I wasn't nice :)
 
5:37 AM
@Ffisegydd I'm interested. but I need a few months more of practice ,. I guess :(
 
6:16 AM
wow
this is the worst PHP NIH that I've ever seen
 
Interesting. You can have code too large in Java stackoverflow.com/q/243097/945456
 
why does it have two syntaxes for if else in the first place?
 
that's just weird
 
6:27 AM
as include just includes textually
or I am not sure :D
 
that's insane
 
does it or does it not
hmm nvm
they just keep adding "features"
 
I think they just leave bugs in
 
I thought Javascript was bad
but this is worse
 
@khajvah javascript was designed and implemented in 2 weeks, PHP is a long-term accident that just happened over more than 2 decades.
nuff' said; concatenated for easier starring :D
@khajvah you should remember the design constraints for Javascript:
"it needs to be Java because Java is hip and cool."
 
6:43 AM
@AnttiHaapala I didn't get this part
 
@khajvah it could have been something like vbscript, or php, and it would have fulfilled the requirements
@khajvah brendan eich was told that he needs to design a language to be embedded on web pages.
brendan eich said "kewl, I will write an implementation of Scheme"
but they said "it is too difficult, just something like java but simple. Java is in"
so he did, superficially something like java and simple but which still has first class lambda functions and closures.
all in 2 weeks
 
yeah but it is similar to java only sytaxwize
 
that is awesome :D
of course, because java was retarded
back then java was 1.0
 
JS functional stuff are nice
recently I solved a problem in a really cute way that I really liked
 
@khajvah this happened because it was designed
contrary to the wishes of netscape execs :D
 
6:46 AM
:)
 
true story
no one told php guys "you need to do it like this and your time is constrained to 2 weeks"
 
it would be cool to have scheme though
 
"In 1995, the company recruited Brendan Eich with the goal of embedding the Scheme programming language into its Netscape Navigator. Before he could get started, Netscape Communications collaborated with Sun Microsystems to include its more static programming language, Java, in Netscape Navigator, to compete with Microsoft for user adoption of Web technologies and platforms."
"Netscape Communications then decided that the scripting language would complement Java and should have a similar syntax, which excluded adopting other languages such as Perl, Python, TCL, or Scheme. To defend the idea of JavaScript against competing proposals, Netscape needed a prototype. Eich wrote one in 10 days, in May 1995."
remember back then python didn't have closures.
perl did, as naturally did scheme.
 
damn you Netscape Communications
 
so all they cared for was java-like syntax
and brendan eich put in closures and first class functions
that's awesome
 
6:51 AM
yeah. The best thing in JS
 
so don't think it is too much of an accident
it could have been much worse.
and not much better.
 
so Brendan is the guy behind brave browsers
 
I am gonna try it
they seem to have some interesting ideas about advertisement
 
who? :D
ah brave :D
 
6:56 AM
yeah :)
 
:(
I'd prefer firefox engine though
 
is it on custom engine?
 
no, chromium
 
ah just like every other browser :D
it is pretty fast
and uses less ram
I think I found a new favorite browser
 
7:16 AM
Installed Brave...
Interface is kind of clumsy
 
the tab preview thing is annoying
other than that, it's alright
 
target global calling
 
@khajvah True that... I hate that as well
 
I disabled it
 
We can? Let me check
Ah, Tab Settings
 
7:23 AM
that's strange :D they're trying to get me invest into Target Global :D
haha so I lied that I've got too much money
 
I disabled the Ads
 
they say that they give away money generated from "brave ads" to publishers, not sure if I can trust them
 
Who are those publishers?
 
@thefourtheye website publishers
you may route your earnings back to the sites you browse, and even add more through the use of a Brave wallet, administered through BitGo. In exchange for your generosity, we will block all of the ads on the sites you choose to pay.
In exchange for your generosity, we will block all of the ads on the sites you choose to pay
 
@AnttiHaapala That's nice :)
 
7:30 AM
that's the perfect solution to ad problem
but there is trust involved
 
I find that too complicated though
 
Trust problem is very difficult to solve. Trust one great leader, he will save us.
 
bitcoin wallets and so
@thefourtheye trust me
 
All Heil Anti
 
8. Why aren’t you using Mozilla’s Gecko engine on laptops?

We were, under a partially sandboxed, multi-process architecture called Graphene. But we did a careful head-to-head comparison and by every measure, Electron/chromium won. We wish Mozilla well, but as a startup, we must use all sound leverage available to us. For web compatibility and in particular Chrome compatibility, this means chromium.
 
7:32 AM
:(
 
that is utter shit!
for "web compatibility it means Chrome"
sounds more like Brendan Eich showing the finger to Mozilla now
 
the only downside is that it's written in JavaScript :(
the entire thing
 
@khajvah What else can we expect from the father of JavaScript?
 
I don't think he likes JS
he was enthusiastic about webassembly and getting rid of JS
 
SLOOOW
I installed brave and it is slooow
 
7:38 AM
I find it faster than FF tbh
 
no flash
bad rendering on ubuntu
 
rendering is true
 
dunno, rendering is really bad
 
yeah I mean it's bad
 
I mean dunno about speed but rendering is bad
Firefox loads sites slower
but it is exactly because it loads those shitty ads from cdn
which only later get blocked by adblock plus
facebook.com, static.fbcdn, whatever
 
7:41 AM
rendering is bad
 
it is flashing all the time as well
 
I use Mac and it looks fine till now.
@khajvah Hey, you use i3. Nice... :)
 
now that you said about rendering, I can't unnotice it. THANK YOU
:D
@thefourtheye I had been using it only at work but I've completely switched to on all my computers lately
 
can't see difference in the end result
different subpixels in fonts?
I have 13 inch fullhd
 
mine is 24 full hd
 
7:46 AM
@khajvah Man, that really makes one productive.
 
yeah
 
@khajvah Linux Desktop Version of skype. still working?Last time I tried(early in 2016) It got so buggy that I switched to the browser version
 
@ProblemSlover yeah it was updated 2 years ago. It is terrible but works.
also they are working on a new one
 
user6568562
Good morning, Everybody [ :
 
new one.wow. anyway I think browser version is quite suitable for most purposes
 
7:50 AM
no video calls on browser right?
 
user6568562
I don't think so. Last time I checked, it wasn't available in browser version.
And the rest of the services were too slow compared to the mobile version.
 
@khajvah well no. video calls. anyway. i use mobile version for calls. Its' quite convenient.
 
looks exactly as the browser version.
 
7:56 AM
> The new version of Skype for Linux is a brand new client using WebRTC, the launch of which ensures we can continue to support our Linux users in the years to come.
 
@AnttiHaapala Yet another proof of my assertion that the value of advertising to the consumer is negative (otherwise why would they pay to make it go away?)
Fickong dyslexia
 
It gives you some customisation options of the web ui.
 
not gonna install skype for linux alpha
no video calls!!!!
wtf this shit?
change device settings - not implemented?!
nice!!!
glorified chat then.
yay we get new emoticon packs
then they say "linux alpha wasn't successful, we stop supporting linux"
and yet another thing: does it allow connecting to lync
 
lol,. run skype in vm is a good option as well
 
@AnttiHaapala They have a separate app, right? Skype for Business?
 
8:09 AM
@AnttiHaapala it is alpha
 
@thefourtheye never coupled
 
Ya, that's bad :(
 
I thought skype for business is dead
 
Hopefully, they will implement everything in the end product
 
the "skype" for business can send messages to windows skypes and call
 
8:09 AM
Have to open two different but similar softwares.
 
but linux skypes they do not see.
it is always the same: "do you have skype? yes! I have skype, for business"
"oh then you don't have skype"
 
I tried to swtich to slack or gitter but nobody cared in my company
 
same here
it is skype for business and lync and yammer here in one instance.
average score 95 %
everyone else gives 100, I give 0.
ah they added ads to the new linux skype d:
 
microsoft are bad
 
paid by facebook article
sick of this stuff./ this guy advocates that using ad blocker is selfish.
OOh. yeah. especially when you get paid by facebook to write such crap
 
8:14 AM
yeah and websites spreading malware is not selfish at all
 
@khajvah I made my team use Slack successfully
 
TEACH ME MASTER
 
My selling points were, 1. integration with GitHub and Rally, 2. Code Highlighting, 3. Star/Pinning
 
1. Not all website "spread malware", if you're going to make massive generalisations like that then you should back yourself up.
2. Using an ad blocker is effectively taking content for free. You are taking content that someone has put together and you are restricting their ability to make money from it.
@Robert (the man himself has just arrived) could probably be more eloquent on this subject.
 
Haha I was just starting to reply :)
 
8:17 AM
@Ffisegydd the problem is that you can't know if it is spreading malware or not, so you can't trust any website automatically
 
@ProblemSlover using a website with adblocking is stealing; have the adverts or don't use the website
 
Facebook has quite smart team of engineers.l but not smart enough to come up with ideas of the premium features/service which which are worth to pay for.
 
@ProblemSlover tbh, ads on facebook make perfect sense
I am against random website ads that are harmful but in facebook, it makes sense
and can actually be useful
 
depending on ads .should be thing of the past. Checkout chinese video websites and social media. they know how to make money. without pushing ads
 
Sigh.
How's it going Bob?
 
8:21 AM
:D
@ProblemSlover facebook ads are not harmful.
 
@khajvah Yeah. but what concerns me that facebook depends on ads. well they say user data as well. but huge income comes from ads
 
why does its business model concern you?
 
because of such thing as adblocker :D
 
Mark should be concerned :D
I still see facebook ads with an ad blocker
random page ads on my newsfeed
 
@khajvah I had seen too. but blocked them manually by creating html rules
 
8:39 AM
I don't see much advertising at all. The latest trend is to detect ad blockers and disable the site (or, in the Grauniad's case, politely request you subscribe or whitelist them). I am quite happy not to use those sites.
 
also the thing which makes me sick that some sites set localisation based on your IP rather than preferred language in the browser. this information is handed over in the headers
 
8:59 AM
Release day cabbage, all
 
Cabbage @holdenweb, bonne chance!
 
RIP sopython community team… q_q
 
9:21 AM
Just come across a new entry for the room's occasional series of "road layouts from hell". First the sign.
WTF
Until you realise it describes...
That debacle
I particularly like the exit to a dead end!
 
what's the point?
 
I think the designers either thought: I wonder what's the most interesting way to get sacked. Or: I'm an artist, man, an artist, and all they do is get me to bring 5 roads together.
 
:D
['1','1'].join()
"1,1"
thank you JS, I really needed that comma in between by default
 
@JRichardSnape You’re doing something seriously wrong when you name your construction “the magic roundabout”
 
It's designed to summon Demons from the 6th Circle of Hell.
 
9:32 AM
But +1 for creativity on problem solving.
 
I wonder what they were smoking...
Don't stress, man, chill - just go with the [traffic] flow
 
@Ffisegydd hence being based on the points of a pentagram, I guess. Nice catch.
 
10:00 AM
@poke I doubt that was its official name
But if it was, it was probably named after the mushrooms the designer had consumed
 
But it says so on the sign? :o
 
[shrug]
 
A roundabout is a type of circular intersection or junction in which road traffic flows almost continuously in one direction around a central island. So-called "modern" roundabouts require entering traffic to give way to traffic already in the circle and optimally observe various design rules to increase safety. Compared to stop signs, traffic signals, and earlier forms of roundabouts, modern roundabouts reduce the likelihood and severity of collisions by reducing traffic speeds and minimizing T-bone and head-on collisions. Variations on the basic concept include integration with tram and/or train...
The Magic Roundabout in Swindon, England, was constructed in 1972 and consists of five mini-roundabouts arranged around a sixth central, anti-clockwise roundabout. Located near the County Ground, home of Swindon Town F.C., its name comes from the popular children's television series The Magic Roundabout. In 2009 it was voted the fourth scariest junction in Britain, in a poll by Britannia Rescue. == HistoryEdit == === ConceptEdit === The roundabout was constructed according to the design of Frank Blackmore, of the British Transport and Road Research Laboratory. Traffic flow around the l...
^ looks real to me
which makes it kind of awesome
 
10:17 AM
intel is into machine learning
 
F4z
with django, what are some reasons a view may not get activated?
 
did you register it in your urlconf?
@f4
sorry
@F4z
 
F4z
hey, is that in the settings?
 
F4z
yup!
so basically my scenario is that i have an app called forum which is <websiteURL>/forum
so that part works well
but then I have a loop which adds topics into the page
which is gathered from a database
so my url for the forum app is url(r'^(?P<topic>[a-zA-Z-]+)/$', views.show_posts, name = 'show_posts'),
thing is when i navigate to <website>/forum/general-discussion after clicking on the link for general-discussion
it doesn't activate the function show_posts
`def show_posts(request, topic):`
`print(topic)`
 
10:31 AM
Maybe you have an earlier route that is being activated in preference?
 
F4z
i have an index that basically display and loads the topics
so def index(request):
# loads the topics from database
jinja looks like this:
<h4 class="text-normal"><a href="{{ topic.topicURL }}">{{ topic.topicName }}</a></h4>
topic.topicURL is simply a string with the text 'general-discussion'
so it looks like <website>/forum/general-discussion
 
lol, I read the Tau manifesto again and indeed if one could choose between pi or tau now, then I'd rather choose tau.
@F4z ctrl-k
 
F4z
what's that do @AnttiHaapala
 
indent your multiline code properly
 
F4z
oh thanks!
so atm i feel like it may be something wrong with the url? since the show_posts function doesn't get triggered
but i'm not sure what's wrong with the url, it all seems fine
 
10:40 AM
does your url end in /
 
F4z
nop
so initially <website>/forum , user clicks on the topic let's say General Discussion, then url changes to <website>/forum/general-discussion but the function inside the forum.views.show_posts doesn't get activated
 
so does <website>/forum/general-discussion end in /?
-> it doesn't
then your url is wrong.
your regular expression above has /
QED
 
cabbagey mornin'
 
F4z
r'^(?P<topic>[a-zA-Z-]+)$
 
also do understand that urls with / and without / are 2 completely different urls with completely different behaviour
you would want to use the one with / for something that can have subcomponents
 
F4z
10:45 AM
@AnttiHaapala I was planning to do general-discussion/posts
that was how it is
but i can't get the view to work so i'm a little puzzled
ok
 
it is as if you were pinging with @AntiHaapala and no one answers.
Just guess why?
 
F4z
so i managed to make it so that <website>/forum/general-discussion/posts
now it's throwing a 404 error which means that app isn't created
also @AnttiHaapala i was pinging you to be specific and answer you stuff :P
 
F4z
11:04 AM
quick update, got it to work
turns out I had forgotten to add a '$'
#/forum/
url(r'^$', views.index, name = 'index'),
#/forum/forum-topic/
url(r'^general-discussion/posts/$', views.posts, name = 'posts'),
]
was the new one
#/forum/
url(r'^', views.index, name = 'index'),
#/forum/forum-topic/
url(r'^general-discussion/posts/$', views.posts, name = 'posts'),
]
old
 
hello everyone
do we have any Django/Python experts here?
 
F4z
i've been using django for a little while, unless you're more experienced than me, chances are i MIGHT be able to see whats up
 
@SomdipDey please see sopython.com/chatroom
 
F4z
ah man, i've never used it using an apache server so i wouldn't know the stuff :(
 
In particular, please do not link newly asked questions.
 
11:09 AM
Cabbage.
 
You've been waiting for 2 hours for an answer, not exactly a lifetime.
 
haha. apologise for this. I am new to chatroom as well......
 
@SomdipDey BTW, those images in your question are not very useful. Actually, on SO images of text are generally not welcome. Just post the relevant text as text. You can put it in a code block if you need to preserve the formatting. Or turn it into a numbered list to preserve line structure.
 
thank you for the suggestions, guys
 
11:22 AM
Listening to Heather Hardy again - thanks for linking to her many moons ago @pm2 :)
 
Thanks for reminding me of her. :)
 
Really lovely fiddle playing and singing. Happy Snapey
 
11:37 AM
So if anyone is in need of an urgent solution and the question posted in the main SO site still haven't got a reply/answer, then what should that person do? any suggestions?
 
post a bounty oh, right
 
You can't really rush the crowd, unfortunately. Post it and they will come.
 
@SomdipDey If it's urgent? Pay a consultant to solve it for you.
 
I'd also probably spend some time looking though any server logs I'd got, working out what was actually happening (or not).
 
hmmm
thanks guys
 
11:40 AM
Considering the Lakes for holiday this autumn, anyone here been/got recommendations?
 
stackoverflow.com/q/38872166/2301450 no repro, the OP doesn't respond
argh
never mind, got closed as dupe
 
@Ffisegydd I went here. It was the nicest pig sty I've ever seen. Back in the day when it was just me and partner...
Unusual area of Cumbria, though, slightly off the beaten tourist track.
Grasmere is nice if you want more central
 
12:13 PM
@JRich nice, I think we'll end up going somewhere centralish just so we can travel to other parts easier.
 
Yeah, in that case Ambleside or Grasmere probably good.
 
Four years ago I wrote a Python script that uses PostScript to make nice cover images for EPUB files from Project Gutenberg that lacked cover images. I just hacked it slightly to produce this masterpiece. :)
user image
6
 
I approve heartily.
 
Please feel free to link when required. :)
 
cabbage
 
12:28 PM
@PM2Ring sorry to be the party pooper, but please do not. Linking to that image in a comment will rightly be removed as non-constructive.
 
user559633
never mind. can't computer.
 
Maybe if we put it in a sentence... (the image, I mean)
 
user559633
Back to wasting time on a ciphertext
 
One of the coolest projects I've seen in a long time mewo2.com/notes/terrain
5
 
user559633
That's cool!
 
12:43 PM
Well worth a thorough read/playing with his demos.
You're able to copy your progress as you go and create your own map.
 
@MartijnPieters Oh, ok.
 
Using selenium to run javascript styling on a page. Simple stuff but runs pretty slow through the page unless I put everything, as much as I can, inside a bit execute_script command. a la driver.execute_script("document.getElementById('ads-col').style.display = 'none'; If I put all my DOM modification all on one line it runs much faster but is unreadably long. How can I put it all on multiple lines?
 
tool req stackoverflow.com/questions/38873910/… OP wants a Python tool equivalent to a Matlab thing.
 
Here's an open-ended question on version handling: I have a function that returns an AMQP routing key. If this function is changed, chances are it'll mean that the forthcoming version will not be backwards compatible with previous versions. What's a good way of making sure this is enforced? Currently I'm doing it through the unit test framework, but is there a better way?
(I also have a snarky message in the comments)
 

« first day (2125 days earlier)      last day (2809 days later) »