« first day (2305 days earlier)      last day (2867 days later) » 

00:05
ok...first quarter...
nothing happened... I think...
:) I was afraid of falling over in the middle of a ruck. You can get your hands or head stomped on...
I just want to see Tom Brady get sacked again.....and again....and again....and again.....
ok, something happened :D
:) :D \o/
after 40 mintues of nothing happening when I finally thought I am going to sleep, and wasn't watching the game suddenly resumed.
00:34
@MoinuddinQuadri Willem has expanded his answer so it's now a good dupe target, IMHO.
 
1 hour later…
 
4 hours later…
05:40
cabbage
potato
Cabbage :-)
06:45
Hey guys
Is there anyone online?
Pls answer my question. I'm binding a socket to a port and when i change some of my codes and re-run the program it sais that address already in use. Is there anyway to when i stop program, make that port unused? I'm using PyCharm IDE.
Are you closing the socket anywhere in your code?
07:00
@Matarata Pls answer thefourtheye's question. ;)
user3295818
gud Mrng Python devs
07:19
@thefourtheye I close the client socket but not main socket
Is this the problem?
In Android we have a method called 'onStop' which do something when application is closing. Is there such a thing in python?
Why does windows keep executing my python scripts through the 2.7 version of python?
@Matarata If you could show the code, it would be better to comment.
Or well: it does so if I type tmp.py directly, yet when I type python tmp.py it uses 3.5. - I've changed all file associations in settings.
user3295818
@PM2Ring this is raghu iOs developer. That day i talked with you know...
user3295818
07:24
Except applepay i have completed everything in my project. Please help out. Issue in my python server code
@Matarata Take a look at atexit
@paul23 Hmmm, you might want to check the shebangs
that's what tmp.py does import sys; print(sys.version_info)
It's why I know for certain windows uses the 2.7 compiler
@thefourtheye Its a long code
@paul23 You might want to set the path like this.
07:28
@raghunath Yes, I remember. But I still can't help you, since I don't know Flask, and I know almost nothing about iOS. How are your Python studies progressing?
@Matarata Try the suggestion given by PM 2Ring.
@thefourtheye I will thanks guys.
Does anyone know what I should write in my python 3 code, so that when I run my code, the cmd window will be ran in full screen?
@thefourtheye path variable is set up perfectly fine - that's why python tmp.py uses the correct python version (3.5) and why pip etc work. It's only double clicking/running without python in front of it that doesn't work. And changing it doesn't seem to work either, it just keeps using python.exe from 2.7 area. It's like windows doesn't save the settings.
Sorry, I am out of clues then... I have a Macbook :-/
If you edited the PATH variable in "System Settings" -> "Environment Variables" section, you might want to try logoff & login/restart.
07:40
Does no one know how to start a python script in full screen? (python 3)
cbg!
@paul23 I don't use Windows, but I assume you've read Python Launcher for Windows
user3295818
@PM2Ring sir I have to submit this app today. Then how can i study python from basic? After completion oly i have to study.Thats why i will be asking again and again
@pm 2ring I havent read it all, I dont know what its called in english, but I have read it very fast, without reading every word.
And there was no solution.
@raghunath were you given the project yesterday, and asked to submit it today?
07:45
@raghunath No, you won't be asking again and again in here. And if you persist, you will be kicked out. You need to fix up your question on the main site. When you've fixed it up, you may let us know in here, and if you've improved it enough we will consider re-opening it.
Question reads: "How to implement an enemy running at you in a game?"
Answer: Not sure about the game, but borrowing huge sums of money from someone can get you the same implementation in real life :D
@PM2Ring laurel at that jhub1 question, I still don't know what their problem was
@SebastianNielsen Why are you pinging me? I wasn't replying to you.
@AnttiHaapala Which question was that?
FWIW, Nick Coghlan is a major core Python developer, so he knows what he's talking about. ;) — PM 2Ring 6 hours ago
this
was there a comment that was removed or sth :D
@AnttiHaapala Ah, right. That question was linked as a possible dupe target, so I read it & noticed that you had a typo in Nick Coghlan's name, so I fixed it, and added that comment for Future Readers who may not know of Nick.
07:52
lol I did :D
too much Vietnamese I guess, I know his surname is Coghlan,
but you know... ng... it just looks so natural :D
FWIW, the new question is stackoverflow.com/questions/42059371/… It's amazing how many people think that for _ in range(10): is some special syntax and don't realise that _` is just a variable name.
@AnttiHaapala :) FWIW, earlier I saw a question about printing Vietnamese to an image file with ImageMagick. I didn't write an answer, it got resolved in the comments. I guess it should be closed. stackoverflow.com/questions/42053326/…
Got ze swag today i.sstatic.net/Bf8Sp.jpg :)
11
Nice!
That stuff ought to get you some respect at dev conferences. ;)
Thanks. Yep :D
08:09
Congrats man :-) Mod swag?
user3295818
Please release my question @PM2Ring
@PM2Ring Nobody recognized my 100k SO tee shirt in my office... :-/
@raghunath That looks even worse than it was! For starters, you need to 1) put the code back into a code block; 2) take the plain text out of the code block you just put it in; 3) paste the error message into the question inside a code block; 4) add the tag to the question.
@thefourtheye I walked into a lecture hall in my college (for my presentation to new comers), One of them asked "Wow, Do you work at Stack Overflow?".
08:18
Lucky you...
I would have played along if my prof was not there :D
I think this is my super power. If I know/have something, I perfectly pick the wrong set of people to show off... :D
It's a dog's life. ;)
lol :D
Yesterday, I went to one of the top-notch colleges in India, as a mentor for a Hackathon. They asked me to introduce myself, and I started with a show of hands question. "How many of you know Node.js?". No hands were up and one guy asked, if it is the new name for JavaScript...
08:23
Lol, was it a hackathon for kids? :D
Not knowing about Node.js may be a good thing. :)
user3295818
@PM2Ring please tell me where am getting issue in python code. Then i can able to browse any solution.Changed my code.
My 5th Sem project had a Node.js part (I didn't work on that though, I handled the other part)
@raghunath How many times do I have to tell you this? I don't know the answer to your problem. And you still haven't pasted the text of the traceback into your question.
user3295818
Now its not showing error message....Its in running position for the past 4 hours
user3295818
08:30
Thats why am not able to post error message
@PM2Ring I am just a cute Puppy :D
@thefourtheye isn't that a problem in many of th emerging computing powers... everyone just uses the tech they're taught at schools
the same in Vietnam, no one tries anything else besides what everyone else is using locally, though it is made much worse by the fact that no one is fluent in English
True, I thought Node.js is quite popular. I'll bring up this experience to Node.js.
Fortunately, they all knew Python... Unfortunately, they all were using only Django. Yet another proof that, Python and Django are interchangeable in India :(
@AnttiHaapala In India, curriculum doesn't have Python. But almost everybody is familiar.
@PM2Ring wow that VN user cannot possibly be living in VN :D
@gloriousCatnip GitHub style markdowns would not work here. Use +
08:40
Waaht? Someone asked a question on correcting single letter typos. The author of python-Levenshtein package seemed a familiar one :D
@thefourtheye how about +
@MYGz no, but the maintainer is
    with open("./oving-3.txt", "w+") as f:
    	print("Oppgave 1a \n")
    	f.write("Hallo\n")
    	f.write("Skriver en linje til!\n")
    	f.write("Her kommer enda en linje!\n")
    	print("Ferdig!\n")

    	print("Oppgave 1b-c \n")
    with open("./oving-3.txt", "r+b") as f:
    	print f.read(10)

There we go, I think
also pypi doesn't support separating maintainer from author
@gloriousCatnip no.
@AnttiHaapala Thanks :-) Forgot about it
08:41
THERE we go
oh, now the indentation is all wrong
there is supposed to be another with open, not nested
You can still edit it
FINALLY, there we go lol
so anyway, why can't Python read() it? It's Python 2.7 btw
@AnttiHaapala You might have changed quite a few things to Pythonic!
it returns nothing, and readlines() returns nothing either
It prints Hallo\nSkri
08:45
hm, not for me
f.read() prints absolutely nothing
f.readlines() prints an empty list
Is that the complete code, or you have try...except:pass kind of a thing wrapping it?
.. jesus christ
my own code had all the with-statements nested inside the first
how did i not notice that
thanks anyway! haha
@AnttiHaapala .name? Is that for real?
@gloriousCatnip The rubber ducks of room 6 solve yet another problem. ;)
In this case, a rubber puppy :D
08:52
"marked as duplicate by Community♦" means the OP accepted that it's duplicate?
@gloriousCatnip BTW, you should be consistent with your file open modes. You write it in text mode, but you read it in binary mode. On Linux, it won't make a difference, but on Windows it will, due to \n -> \r\n conversions. And in Python 3 it's even more important, since the Python 3 text strings are Unicode.
@MYGz Correct. Some of us call that self-hammering.
@thefourtheye Really? 4 of our courses were based on Python :P
In India? :O
Woh, India really is a diverse country :D
08:54
Yeah :D
@PM2Ring oh, okay! I didn't know that, I was just messing around with open modes because I wasn't getting the result I wanted. I'll keep that in mind, though. Thanks!
@MYGz ... IANG
I am not google.
Your address on pypi I meant, with .name domain.
09:03
@AnttiHaapala Cool! :D
hey antti haapala you seems to be the smart guy. Do you know how I can make my python3 script run fullscreen in cmd?
@AnttiHaapala
@SebastianNielsen Antti's smart enough not to use Windows. ;)
@SebastianNielsen I don't, and I don't use windows, so please don't ping me about Windows problems. I saw your original question and didn't say anything because I don't have an answer.
I am sorry.
09:08
don't be sorry but rather, please follow the rules.
ok to ping me about the ^just-mentioned python-levenshtein say, or anything that has an answer written by me, but generally people will be annoyed about constant pings about questions they don't have an answer to.
Cabbbage!
@MYGz Also note that rot13('cbg') == 'pot'
09:24
@BhargavRao No mug?
codecs.encode('pot', 'rot13')
@poke Maybe they ran out of mugs... or they only give them to people who've earned them by scoring 100k. ;)
happy day today: tax paying day
\N{SARCASM MARK}
@PM2Ring Yeah, that’s possible. On the other hand, you got a second shirt
10:09
Ironic. 13 times rotten cbg makes a pot.
cbg
there was some serious garlic here
@poke Nope, that's only for 100k.
congrats on the loot, BR:)
Thanks :)
user3295818
@PM2Ring @idjaw @vaultah@AndrasDeak
user3295818
10:22
Changed my Question.Please release my question
Seriously, @raghunath, stop harassing users here. You are a help vampire and you've gotten waaay more help and patience than what you deserve.
@raghunath Does that mean that you are no longer getting an error message, and there is no Traceback being printed?
Morning cbg
user3295818
Last day it came. but Now the error Screen too not coming
user3295818
10:29
@PM2Ring
hey guys. I have been having an issue with this for a while. I have a type float pandas series and when i devide (S/K) it works, but taking the log(S/K) I get TypeError: cannot convert the series to <type 'float'>. Any ideas?
@raghunath Well, that sounds like you've made some progress...
@nemi well, what is its type?
I don't think both of them are float, considering the TypeError
user3295818
If i hit this API in postman means, it shows "error connecting". This is an API code. Am hitting this API by giving localIP:PythonPortNumber/pay(122.174.111.143:5000/pay).
user3295818
ISSUE: There is an error connecting to 122.174.111.143:5000/pay
10:36
@AndrasDeak: well, I looked into them with the debugger and both were marked as floats. I dealt with them within the pandas series and and separately extracting data from the series converting it to float and the same error arose.
what kind of "log" did you use?
and what does S.dtype and K.dtype tell you?
assuming that both are pandas objects
from math import log. as mentioned, they divide (S being the underlying and K being the strike) but can't take the log from the division nor from the series,
stored in a pandas dataframe
because math.log doesn't know how to handle pandas objects, I assume
you'll need something like numpy.log, which you already have as pandas.np.log if you don't have numpy imported separately
10:44
@AndrasDeak: like really it was that easy :) thanks
no worries:)
I've been down-voted a few times here. If it's just because you hate that GetVersionEx was deprecated in the first place, your are shooting the messenger :) — Chuck Walbourn Jul 17 '15 at 5:07
well you gotta shoot somebody, right?
user3295818
@PM2Ring issue shows You have to update Stripe like that. Then, For stripe version check, they gave code. In that code, it shows error "unexpected character after line continuation character"
user3295818
Line: {\rtf1\ansi\ansicpg1252\cocoartf1504
11:01
@raghunath There's no point in telling me that information. Put it into the question, so that people who have the knowledge to help you can see it.
user3295818
@PM2Ring release my question
user3295818
Added my issue
@raghunath Thankyou for adding the Traceback. I can't release your question by myself. It takes 5 votes to re-open a question, and one person has already cast a re-open vote. Because you have fixed your question a bit I'll vote to re-open it. But don't be surprised if it doesn't get re-opened because it still has problems.
@raghunath It looks like your main problem is that you are using an out-of-date API: "Stripe no longer supports API requests made with TLS 1.0. Please initiate HTTPS connections with TLS 1.2 or later." Did you follow the suggestions at stripe.com/blog/upgrading-tls ?
user3295818
@PM2Ring yes i followed steps for updating Stripe. But in that code, it shows error
user3295818
{\rtf1\ansi\ansicpg1252\cocoartf1504
^
SyntaxError: unexpected character after line continuation character
11:16
14 mins ago, by PM 2Ring
@raghunath There's no point in telling me that information. Put it into the question, so that people who have the knowledge to help you can see it.
If you harass me again about this problem you will get kicked out of the room.
user3295818
ok ok
@PM2Ring How to quote like that? When I click on link it, it gives this: ":35507214 "
@MYGz The :\d+ will link text to a specific line.
@MYGz Hover your mouse in the left side of the message box. A downward pointing triangle will appear. Click on that triangle and a context menu will appear that contains the permalink URL for that message. Copy the permalink, and paste it into the new message.
11:24
4 mins ago, by MYGz
@PM2Ring How to quote like that? When I click on link it, it gives this: ":35507214 "
Yay! Thanks :D
11:36
Hi All,
Can Anyone tell me what's this code means
myurl = urlparse(request.url).netloc
What exactly is your problem understanding it..?
I don't know about this code. Actually, I am integrating a payment gateway first time and I saw this line of code in another payment gateway which is already integrated. So I am not able to understand what exactly this code do?
I honestly wouldn't complicate your life any further.
Get your one working first, per whatever guide you're following.
Call the function urlparse and pass request.url to it. Then, from the result of that function call, get the value of the netloc attribute and assign that to myurl.
interesting.. why a classmethod can't be a dunder method?
11:51
It can?
>>> class Foo:
        @classmethod
        def __bar (cls):
            print(cls)

>>> Foo._Foo__bar()
<class '__main__.Foo'>
:35507579
sry by mistake sends this message
@poke not like that, gimme a sec
class C:
    @classmethod
    def __getitem__(cls, value):
        print(value)

C.__getitem__(None) # <-- works!
C[None] # <-- does not!
@poke I meant something like this ^
Oh, so you want to override the __getitem__ at type level? Then you need a meta class for that.
yepp I already realized that :)
but it is somewhat unintuitive :P
Not if you remember what @classmethod actually does :P
12:03
we can debate on that one.. but sure, from a certain perspective it does make sense..
I'm hungry
Afternoon y'all
messing with history, eh?
12:14
Shh, Andras, nothing to see.
:D
@PeterVaro classmethod still doesn't install that method as the slot method of the class itself.
ooooh crap, I brought a fork and a knife for spaghetti today:S
@Antti That’s basically what I meant with it makes absolute sense if you think about what @classmethod actually does (instead of what it could do if it was a language feature)
class Indexed(type):
    def __getitem__(self, value):
        return self.__getitem__(self, value)

class C(metaclass=Indexed):
    def __getitem__(self, index):
        return range(100000)[index]

print(C[42])
@PeterVaro here's headache for you :D
notice how the __getitem__ of metaclass looks up the __getitem__ on self :D
though...
I know aall of these
and I already implemented mine withmetaclasses.. but still
12:17
@PeterVaro a) classes are not intrinsically indexed.
indexed as in "has __getitem__"?
b) therefore thinking that __getitem__ would be looked up for class is... why? because classes are not intrinsically indexable...
hmm, isn't it weird to index into the class, functionally speaking?
c) classmethod changes the descriptor so that it doesn't matter whether it is looked up on a class, instance, it behaves in the very exact same manner, passing the cls as the first parameter...
but...
zazzy[3] returning whatever from Cat[3]?
12:22
Can you knife messages to any room or just that trash room?
any room
in case by "you" you mean "room owners of the source room"
yeap
:D
inb4 Antti dumps messages into php
12:23
haha
@AnttiHaapala huh, metaclasses get passed self (the object instance) instead of the metatype object instance?
12:41
@poke depends :D
see here I am faking it :D
it is not the C instance, necessarily...
depends on name? ;p
@AnttiHaapala Inside the __getitem__, it is.
oh no
it’s the C type, so cls would be more appropriate
class Indexed(type):
    def __getitem__(self, value):
        return self.__getitem__(value)

class C(metaclass=Indexed):
    @classmethod
    def __getitem__(cls, index):
        print(cls)
        return range(100000)[index]

print(C[42:98])
print(C()[42:98])
@poke no, it is either-or :P but here now with classmethod :P
<class '__main__.C'>
range(42, 98)
<class '__main__.C'>
range(42, 98)
Kind of makes the self.__getitem__(self, value) access pretty dangerous since you’re passing the class as self there.
because it is self.
12:44
class C(metaclass=Indexed):
    def __getitem__(self, index):
        return range(100000)[index]
Here, self is expected to be an instance of C.
<shia_magic.gif>
@poke true :D
But with the metaclass, you are passing the class as self instead:
class Indexed(type):
    def __getitem__(self, value):
        return self.__getitem__(self, value)
I fixed it above already ^
using classmethod
So that’s kind of dangerous if you end up calling something that actually requires self to be an instance :P
yeah
12:49
awww that doesn't work
if type(self) is not type ? :D
unless metaclass messes with that
I've been having fun with generators. I haven't used generator.send(value) very much before, so please let me know if I'm doing something silly. ;) stackoverflow.com/a/42068299/4014959
I've never seen that being used
I don't think I've ever used it before in a "proper" program, just in small experiments.
@poke What the actual yam? I think I better scroll back and read the earlier messages on this topic...
13:09
good to know what it does exist ;)
grumblecakes!

My flask-sqlalchemy is returning true for sqlite where the column value is 0
gah!
tricksy hobbitses
Is it at some point handling it as a string "0"? Or some such fun-times.
I switched over to using alembic and I created the column as sa.Text
even though the definition was sa.Boolean in the model
something should have told me I was stupid there :P
I knew my code was working the other day
for a sufficient meaning of working?;)
@PM2Ring it can be sent only once really...
13:21
nah, it actually worked, because I wasn't using alembic so the column was a Bool (well, int or smallint if sqlite has that sort of thing)
SQLite datatypes are based on only a few storage classes.
So yeppers, bools are backed by an integer.
I do so love that Linux (POSIX?) systems let me remove a name from an inode when something has a filehandle to that inode, unlike some inferior OSes I could name
@AnttiHaapala In that application, that's true, but I wanted to make it robust, so I used while prev instead of if prev. Eg:
def gen_with_push(iterable):
    it = iter(iterable)
    prev = None
    while True:
        while prev:
            yield prev
            prev = yield prev
        prev = yield next(it)

gen = gen_with_push('abcdefg')
for s in gen:
    print(s)
    if s == 'd':
        v = gen.send('dd')
        print('v', v)
    if s == 'dd':
        v = gen.send('Z')
        print('v', v)
#output
a
b
c
d
v dd
dd
v Z
Z
e
f
g
the gen send always now returns the very line that you sent into it
or you reyield it :D
ah gotcha...
I'd rather use a class with iter and deque
@WayneWerner You mean that quirky proprietary OS that requires you to open a file in delete mode (what the yam?) when you want to delete it?...
@AnttiHaapala I was very tempted to do it as a proper class, but I wanted to get some practice using .send
I'll be glad when summer's over. It's past midnight & the temperature here's just dropped to 27°C, but it's still really humid.
13:35
I think I've used generator.send like, once ever.
And the next day I gutted the whole thing and upgraded to 3.5ish so I could use asyncio instead
Better to have it and not need it, than to need it and not have it, I guess.
I have actually used .send in an answer before, but it was almost 2 years ago: stackoverflow.com/a/29193387/4014959
It's quite useful for quickly getting coroutine-like behavior, although I don't expect that's a scrape most people get into frequently
13:52
I've only had a brief play with the new asyncio module, but I noticed it uses yield rather heavily.
My experience was also brief, but that fits my fuzzy recollection, yes.
Possibly moreso for versions where async isn't a keyword yet
The OP almost chameleoned...
@MohammadElNesr Before I started to write this code I asked if "Each of these 3 files contains data for every station number in range(100798)" and you replied that that was correct. I need to change the logic a little if that's not correct. But it's getting late in my time zone, and I probably won't have time to make that change until tomorrow. — PM 2Ring 5 mins ago
14:14
cbg^cbg
cbg \o
14:27
morning everyone
HEllo
morning cabbage corvid et al
I'm confused by something, can network requests be cancelled?
sure, why not? Just close the socket. Or do you mean something else?
so, who watched that football game last night and caught the exact moment Atlanta forgot how to football
14:32
I think I don't get why the library I am using doesn't allow you to cancel the request, which made me wonder what making a request even means. Writing some data to a TCP socket and performing the handshake, correct?
Un-sending a request seems about as difficult as un-sending an email.
Well, this is before it's sent, right?
@idjaw I'm so upset on the outcome..... also I'm starting to become fond of calling it handegg, and reserve football to the True sport of kicking a ball with your foot
I have this deque generated list
[deque([1, 2, 3, 4, 5]), deque([1, 2, 3, 4, 5]), deque([1, 2, 3, 4, 5]), deque([1, 2, 3, 4, 5]), deque([1, 2, 3, 4, 5])]
and I want [[1, 2, 3, 4, 5], [2, 3, 4, 5, 1], [3, 4, 5, 1, 2], [4, 5, 1, 2, 3], [5, 1, 2, 3, 4]] as a result with the help of map function
can any one tell me how can I apply lambda on this
14:35
Hypothetically, let's say that it really is impossible to cancel a network request. What consequences does this have for your application? Do you have some algorithm that could accumulate dozens of requests, and are afraid of it clogging up your tubes?
"apply lambda"? That sounds very ambiguous. In python, isn't it effectively just an anonymous function?
@AmanJaiswal lambda of what ? oh you want to rotate based on the index of the list it seems
yas
*yes
but not be able to apply rotate on list
@Kevin Suppose my interface is very network intensive. I can either block navigation until the completion, or I can cancel the request before navigation, for the smoothest interface
result = [rotate(item, amt) for amt, item in enumerate(my_list_of_deques)]
Creating the rotate function is left as an exercise to the reader
14:38
deque has a built in rotate
yes but I have to use map
thats why I am trying to use rotate with index
Converting a list comprehension to an equivalent call to map is left as an exercise to the reader ;-)
cbg!
@AmanJaiswal school work im assuming ?
re.sub(r'\d+', lambda x: str(sum(map(int, list(x.group(0))))), "a11b22c33") --> a2b4c6
14:39
kind off but not completely
more Pythonic?
@corvid So I'm interpreting your use case as: "Sometimes I send a request and decide later that I don't actually need a response. Then when the response arrives, it consumes valuable processing time. How can I avoid this?" That does seem like a problem.
@AndrasDeak I think you should also be the owner of the target room for that? Or not?
no
but next time use a directed reply because we talked about this hours ago:P
@Kevin doesn't making the request and awaiting the response take a lot of processing time? Suppose, for example, I switched between pages every 500ms time and time again ad infinitum
14:44
rhubarb
:D okay. I trust your intelligence :D
Rhubarb
well in this case it worked, but you can never be sure:D
I'd expect sending a request to be fairly expensive, but not waiting for a response
@AmanJaiswal Why do you want to use a map? What's wrong with:
from collections import deque
a = [deque([1, 2, 3, 4, 5]) for _ in range(5)]
print(a)
b = [d.rotate(-i) or list(d) for i,d in enumerate(a)]
print(b)
#output
[deque([1, 2, 3, 4, 5]), deque([1, 2, 3, 4, 5]), deque([1, 2, 3, 4, 5]), deque([1, 2, 3, 4, 5]), deque([1, 2, 3, 4, 5])]
[[1, 2, 3, 4, 5], [2, 3, 4, 5, 1], [3, 4, 5, 1, 2], [4, 5, 1, 2, 3], [5, 1, 2, 3, 4]]
"I have to use map"
and "kind of like school work but not completely" unless I misunderstood that message
14:45
@PM2Ring Aside from the inherent naughtiness of invoking methods with side effects in a list comp? Nothing ;-)
anyone else with pypi cert problems?
@PM2Ring because problem statement is
from collections import deque

def doodledPassword(digits):
n = len(digits)
res = [deque(digits) for _ in range(n)]
deque(map(...), 0)
return [list(d) for d in res]

and I have to fill map(...)
huh. And they're gone now.
must've been a drive by MitM
@AmanJaiswal If you had given that from the start, I wouldn't have to come up with a hacky solution for you ><
I just got a stupid hacky solution to work too ;(
14:50
i am confuse here with <ul><li> class and id that how do i fetch data which is inside of <ul> <li>
html code http://pastebin.com/nK9usj2x
python code http://pastebin.com/ka6jhiFF
Oh a side note of hacky solution, you have to invoke map() for it to work in python 3 ?
from collections import deque
a = [deque([1, 2, 3, 4, 5]) for _ in range(5)]
print(a)
res = deque(map(lambda t:t[1].rotate(-t[0]) or t[1], enumerate(a)))
print([list(d) for d in res])
#output
[deque([1, 2, 3, 4, 5]), deque([1, 2, 3, 4, 5]), deque([1, 2, 3, 4, 5]), deque([1, 2, 3, 4, 5]), deque([1, 2, 3, 4, 5])]
[[1, 2, 3, 4, 5], [2, 3, 4, 5, 1], [3, 4, 5, 1, 2], [4, 5, 1, 2, 3], [5, 1, 2, 3, 4]]
However, it's not considered good style to use a lambda in map.
@WayneWerner They might have got cached? :D
any suggestion for optimizing this algorithm? stackoverflow.com/a/42069813/2063361
Wow, flags galore.
So much salt.
14:54
yeah, what happened there. Barely had time to see what the flags were though
can someone help me ?
http://pastebin.com/Le4A7YgG
map difference between python 2 and 3. I didn't know you had to explicitly invoke(not sure if that's the right word for it) the map() in Python 3...
seems like a disjoint set / forest type problem
@idjaw another rage quit spamming a new chat site
@MooingRawr Generally, Python 3 functions return iterators instead of lists.
14:58
I didn't got the context related to flags. What's wrong? Another spam attack on SO?
I think you can just do |= item as well

« first day (2305 days earlier)      last day (2867 days later) »