« first day (1132 days earlier)      last day (4039 days later) » 
00:00 - 11:0011:00 - 00:00

00:01
Oh,
see my code again
Precisely midnight!
I've looked at your code
This is mine:

    while i < 5:
    	i+=1
    	print ('.', end='')
    	time.sleep(1)
This is yours:

    while i < 5:
    	i+=1
    	print ('.', end='')
    time.sleep(1)
@aIKid Ok then, it still won't work each time I indent the time.sleep(5):
Thanks
That same error again?
Yes
????
00:05
Listen
In a code
You can either use tabs or four spaces
And this has to be consistent.
I know...
That's what causing the error..
Where? I've done four spaces
(When I need to)
And in the other parts, do you use tabs at all?
time.sleep(5) is indented
@aIKid I know that this might sound stupid, but what are tabs?
00:07
You'll have to either always use tabs, or always four spaces.
The tab key.
Above the caps lock?
Yes
Anyway, the software does it automatically for me
What are you using?
Ah, PyCharm
Well, that's the problem with your code, and i can't fix it from here.
Haha
Sorry, gotta go!
Bye, cabbage!
@ThiefMaster Please could you look above, sorry for disturbing. But aIkid has already gone and I can no longer find the issue with my code. Many thanks
Does anybody else know?
Thanks in advance
@Code-Guru Do you know? Thanks
00:43
Is anyone there?
@HamZa This code will not produce dots one by one:
i = 0
print("Please wait.", end="")
while i < 2:
    i+=1
    print(".", end="")
    time.sleep(1)
@HamZa Art thou there?
@AshleyPine Do you have any idea? Why isn't the code above not working? Thanks :)
@Tim do I have to keep telling you about pinging people?
@JonClements I am not pinging people!!
I know them!
I talked to them on the php room
@JonClements I never ignore people!
00:58
Please do not ping me to fix your code. It makes me less likely to do so.
Especially if it's code that's pretty much on the same level as fizzbuzz
@ThiefMaster Excuse me, you have been at that level too ("fizzbuzz")
d
Long time ago in another language? Yes. In Python? No.
Regardless of that, we didn't go around going... HI ... CAN YOU HELP.... NOPE... CAN YOU HELP.... HELLO - WHO ELSE CAN I @ NOW.... HELLO... HERE'S MY CODE... AGAIN..... IT STILL DOESN'T WORK... I'LL PING SOMEONE ELSE
@TimTimmy what version of Py are you using ?
What I was trying to say way that it's one thing to be pinged about a difficult issue that's interesting to think about.
00:59
@HamZa 3x
@TimTimmy screw it lol
But being pinged because of an issue that might be caused by shitty indentation (which seemed to be an issue in the past if i'm reading over the transcript of the last hours correctly)... just annoying. Especially if it makes me pause whatever I was doing.
import time
i=0
while i < 5:
    i+=1
    print ("."),
    time.sleep(1)
PyCharm has an option to convert all tabs to spaces by the way. You want to enable that :)
py 2.7, tested and it works
01:02
@ThiefMaster Please could I mention that for almost 2 hours I have been on this task, and there is no longer the issue of indentation with the code.
@HamZa Won't that print dots on a new line? Thanks :)
@TimTimmy nope
@HamZa Thanks but it still does a new line each time:
Is this a Python 3x bug?
No - it's a user bug, and you don't need to keep posting a screenshot
use print('.', end='') instead of print('.'), - if you're using Py3.x
@JonClements I post a screenshot each time I need to, to help others answer my question. Thank you for answering
@JonClements :
    print ("." + end=""),
              ^
SyntaxError: keyword can't be an expression
Instead of screenshots, use a gist/pastebin or similar, and for small snippets post them here and make sure they're indented properly...
01:06
Sorry, I'll put the comma
Then if someone really wants to, they can copy/paste your code to run it and test it theirselves...
it reminds me about pebcak
Even though I put the comma, it still has an error:
 print (".", + end="")
                ^
SyntaxError: keyword can't be an expression
Thanks in advance
@HamZa Any ideas why? Thanks ;)
@TimTimmy meh, I'm a newbie in python and can't help
@HamZa Okay dokie, thanks for your help!!
01:10
If I were you, I would use a search engine
@Tim... have you ever read what I posted and the code you've written that's producing the error...
@JonClements @ThiefMaster I care:
Undeniably, I am sick of people in this chat room commenting on the following:
1. *Saying to stop pinging* - I only ping when necessary
2. *Thinking that I don’t read anything and am a dummy having all the help from you* - you may think so, but that is not true
3. *Criticizing me* - a little criticism is ok, but don’t go too far
I strongly believe that the social majority of people not only have the determination but they cry out for a social, moral change. Please do **not** annoy me by complaining that I do not read your posts, I do. I am not an idiot.
Hey guys, if anyone here uses Sublime 2 as their text editor I could use some help. I'm trying to define a new keyboard shortcut under the user key bindings preferences but I'm not sure how to implement the command I need. The command should go to:
tools > SublimeREPL > Shell
It's in JSON so idk if there's a standard across json scripts for this
heres what i have:
 { "keys": ["super+alt+s"], "command": "idk" }
@TimTimmy 1) Err completely disagree - you feel you may need help, if so - ask in the room - if people are about and choose to respond then fine... otherwise, there is still no need to ping them - , 2 & 3) May I ask that you read more carefully then - no where did I put a "+" in the post, not only that, but you also then managed to get two different ways of making it error... Take that into account and we'll get on fine :)
@samrap not sure... never really done any config on ST2 - is there an example config you can nick from somewhere?
@Jon I'm looking at the default configuration right now, but those are all built-in to the program and somewhere the commands are defined. Here they are just being called. Plus, the command I need is from a package, so I'm not sure where I could find what the JSON command is
01:24
@Samrap shame Peter isn't about - I know he's done quite a bit of stuff with ST
Do you think the question is worthy of an SO post? I feel like it's not that important @Jon
I'd be surprised if there wasn't already something on SO (failing that - SU)
I'll give that a look, thanks
On a side note, JSON seems like a much nicer and organized way of transferring data then XML, I've never used XML, but I've learned the basics and it can get pretty messy
JSON is smaller and not an entire pain to edit by hand...
XML was always really meant for machines... and there's cool stuff that can be done with it... but config files is not really one of its best uses
I see. Still no luck with the search. I'll ask Peter next time I see him online
01:39
4 messages moved to recycle bin
@TimTimmy about this pasting or using a gist I mentioned... how's that going?
@JonClements Why?
@JonClements I have compared your code to mine and it does not work
@TimTimmy post it to a pastebin so we can edit it ourselves
Excellent... then please produce a gist or a pastebin as mentioned...
laggy spam-filled videos that are zoomed in and pixelated aren't helping
Oh, I didn't know what that was
@samrap I have to pay for better quality :(
01:41
^ probably they are classmates ;)
No - you need to not post images and pictures for assistance with coding problems :)
@PeterVaro can you look at my question above?
anyway: good morning|day|night|cabbage to everyone:)
Cabbage
01:42
Thanks in advance
@samrap Cabbage!
@tim and can you describe the "not working"...
The dots are not appearing one by one
Should this be a SO question? Thanks :)
5
Q: How to print one character at a time on one line?

purpleladydragonsHow would one print the string "hello world" onto one line, but one character at a time so that there is a delay between the printing of each letter? My solutions have either resulted in one character per line, or a delayed printing of the entire string at once. This is the closest I've gotten. ...

@Tim
About 16,400,000 results (0.29 seconds)
@samrap Thanks, but the code is quite complicated in the answers.
Not at all
look
01:44
@Tim the relevant point is that you wish to flush stdout... so import sys and use sys.stdout.flush()
It's just two imports a for loop and 3 lines after
@JonClements Why didn't the code work?
@peter did you see Sam's SublimeText related question ^^^ ?
one sec
I just almost over-baked my pizza ;)
It's 3am there though, right?
01:47
Haha CATASTROPHE
@JonClements yepp, but I just accidently woke up at 1am.. :)
What's wrong with a 3am snack? ;)
I have no idea how I'm going to wake up!
@JonClements Thanks! It works perfectly!
@samrap Nothing wrong at all with a snack - I just don't normally go to the lengths of baking a pizza... :)
I'm 17 I go through any lengths necessary to empty the fridge/freezer
@Jon
01:49
Cabbage all :)
@thefourtheye cabbage!
Cabbage @thefourtheye
@thefourtheye Cabbage!
Spinach!
I have come to my hometown. So, for the next four days I ll not be see much in SO :(
Where at?
01:50
okay, @samrap now I'm here, so what exactly do you want? adding a new command to a new hotkey, or an existing command to a new hotkey, or..?
@samrap Tamilnadu :)
@thefourtheye What are we going to do without you for four days!
(quick guys... he's not going to be around much... get the party stuff out!)
@JonClements I know Jon. I ll miss you guys much
lol. Party? Without me? NOOOOOOOOOOOOOOOOOOO
So - spending time with family I take it ?
My brother is getting married, Jon.
01:52
@thefourtheye Take this with you! sniff :
@thefourtheye nope... no party.... I don't know what you're talking about.... :p
An existing command. The package I installed is called Sublime REPL and it contains every interactive-mode CLI e.i. Python, PHP, Shell, etc. The command to get the Shell up is in tools > SublimeREPL > Shell. I want to add that command to a new hotkey @PeterVaro
@thefourtheye oh fantastic... think there's one of the mods that apparently was still handling flags during their own wedding :)
@TimTimmy lol.
So you should still be able to answer a few questions... (sneak a tablet device in and do a couple of bits while no-one's looking)
01:53
Hahaha ^
@JonClements ha ha ha. I wish I could. Internet connectivity is rarely seen in my hometown :)
For God sakes it's a wedding hahaha you can't seriously be considering this :'D
What a website!:
I am already in SO chat, Sam ;)
url fail @Tim
Chat is acceptable
01:56
BTW, do we have any SO chat clients, for Android?
They can't take away your chat!
snickers "android" snickers
@thefourtheye I don't think so... it doesn't use XMPP or anything to use normal clients... so I think the best bet is just using the mobile site
My profile picture!
Haven't heard much about the official SE android app. either
does SO have an iphone app??
or SE rather?
01:58
@JonClements Oh. My mobile is very small. I would be difficult to read.
Seriously, I am going to miss you guys
How long are you gone for?
Till Sunday :( Marriages are like celebrations here.
Wow that's pretty awesome though. And the food is probably amazing. I love Indian food
@samrap I just can't find the article I'm looking for about this command thingy... and to be honest, I configured my ST a long time ago.. so I doN't know..
Speaking of food its almost dinner time here
02:00
??? Dinnertime?
It's two o-clock here!
I am not sure if you like spicy food, Sam. :P
No worries @Peter thanks for the help!
I live in California haha
@thefourtheye Don't miss us too much - you'll be having too much fun.... :)
02:00
BTW, Facebook Hacker Cup 2014 starts today
What's that?
I was supposed to write a WHILE loop, which asks for the amount of zombies killed and then works out the average. ???: HINT: Use a "look-out" value in you WHILE loop
Unfortunately, I was stupid enough to do a for in range() loop, but I still cannot see how I can change it to a WHILE loop. Thanks :)
Its an annual Programming Competition conducted by Facebook
for j in range(1, no_of_players + 1):
    j = int(input("How many zombies did player " + str(j) + " kill?: "))
    list.append(j)
list = sum(list)
average = list/no_of_players
print("The average of zombies your players have killed is " + str(average))
How could this be a while loop? Thanks in advance :)
@TimTimmy Never name your variables list
02:02
@thefourtheye Why not?
Haha I would fail first exercise
And that can be done with a comprehension,

myList = [int(input("How many zombies did player " + str(j) + " kill?: ")) for j in range(1, no_of_players + 1)]
@samrap Come on. Try that. It will be fun. :)
"dont" "comprehension" ??
A comprehension?
@Tim you do a while loop like your.... umm - while loop that you already have? :p
@JonClements No
The if range thingy magig
Thanks :)
02:04
@TimTimmy list is a built-in type's name. So, when you name your variables as list, they might shadow the built-in type
Okay... you're overdoing the "Thanks" - it's gone from being possibly sincere to just annoying now :)
@TimTimmy Try this

print type(list)
@thefourtheye Ok, please calm down!! How could it be a while loop?
@TimTimmy Is it a homework problem? :P
02:06
@Tim like your other while loop....
Btw, advice from the major players in chat right now. What's the best way to get good at programming? I know practice, practice, practice, and that has really helped. I learned HTML, CSS, and JS as my first languages over the summer, but really got into programming as I learned Python starting in September. Recently, I've been learning a lot and I'm wondering if it's a good idea to branch off early and learn new languages or stick with Python for a long time or what?
@thefourtheye might be worth scrolling back a few pages :)
I feel like the more languages I learn, I'll have a better understanding of how different things work, but at the same time, sticking with one language for a long time seems like it would help to
I'm really into web development and security, if that makes a difference
@JonClements I know how to make while loops, but I don't know how to relate it to the problem of asking the number killed and finding the average
Tim, have a look at codecademy. You'll learn enough there to make simple programs and better understand programming vocab and answers on SO
02:08
It's no different than any other while loop... put what you want to do in the loop, and the criteria for continuing in the while... the same you've done...
@samrap Good :) What are the platforms you worked on?
@samrap I've already been on codecademy
You mean my OS?
@thefourtheye
technologies?
I'm not sure what you mean by that
02:09
What does idk mean?
i dont know @Tim
You don't know?
@TimTimmy I dont know :P
It means "I don't know" haha
Ugh, nobody knows :)
02:10
I D K
@samrap Languages you used for web development?
Right.. have a good morning/afternoon/whatever gents... I will speak to you later
@JonClements rhubarb
@thefourtheye have a good time... we'll see you when you're back... hope the wedding goes well
Too much cabbage!
02:12
@JonClements Thanks Jon :) Take care. rhubarb
Oh I haven't really done any actual developing. I made a bunch of websites utilizing responsive design with CSS and animations with JS before I got into Python. Once I got into Python I realized I liked programming more than design. I feel like I don't know enough though, to start developing.
I want to at least learn PHP, Perl, and Java, plus have a better understanding of how it all works and how servers work, etc
@samrap What websites have you made?
None published :) just practice on localhost
Oh :)
Working on starting a personal blog soon though
02:14
Cool
I'm also taking an Internet History, Technology, and Security course on coursera by Charles Severance
@samrap I think the next step is (only after you think you know enough in Python) is to solve greater problems than a few lines of code: you should definitely write some GUI applications, some graphic and math oriented stuff, things like that.. Umm.. and after that you should learn some closer to the metal language like C or C++..
Rhubarb @Jon
Ok, thanks @Peter . I actually recently downloaded wxPy so I could get started with that. I also don't have my own computer, I use my mom's macbook pro, she's a graphic designer, but when it comes to programming she knows nothing, so its very difficult to get her to enter her admin password when I'm trying to edit a readonly file on the command line or download a new package. Very frustrating haha
02:18
@samrap why don't your mom creates a new user for you?
anyway, hacking into a computer that you have in your in hand.. well it takes about 2 and half minutes
;)
just saying :)
Still would need the admins password right? Haha that is very true, although the only solution I found was changing the password, that would get me in a load of trouble when she tries her nonexistent password
anyhow I was thinking about computer graphics as 3D and stuff -- not as graphic design
Does anyone use blender here?
@samrap yeah, the only thing you can do is reset the root password
Oh yea I know. I was just saying it's not like she's a computer dummy, just a programming dummy
02:21
Cabbage guys! See you later!
C is so intimidating for me haha.
Sometime I look through the C tag on SO and think 'here's where the big boys are'
Rhubarb!
Bye!
Bye :)
@samrap well C as a language is much much easier than Python (Python has so many syntactic sugars and hidden features) but as a thinking well, you know, all the pointers and memory locations and stuff -- it's really easy to mess up things:)
rbrb @TimTimmy
well I gtg, laters
~
02:25
Seeya, thanks for the suggestions. I'm already mid-way learning PHP, so after that I'll take your suggestions into account :) @Petter
@Peter *
hahaha
 
1 hour later…
03:46
How can I get the slope of 1 line if I only have these information:
- Line starts from 0,0
- Then it goes to the x,y point that the user inputs
- Then at that x,y point, the user inputs another point and the line goes there
- Now we have 2 lines
- How can I get the slope of each line?

For more information:

Project Information (http://www.cse.msu.edu/~cse231/PracticeOfComputingUsingPython/01_Beginnings/SecondWeekProjects/TurtleGraphicsAngles/project02.pdf)
Hope you can help me
04:03
slope of line = (y1 - y)/(x1 - x)
I know the formula, but I don't know how to explain, can I give you my code?
It also has a bug calculating the variable tan
Me wants that, too.
Done.
@a7xrturo One issue is you need parethesis here: m2 = (point1[1] - point2[1]) / (point1[0] - point2[0])
Otherwise point2[1] / point1[0] is going to be calculated first.
Instead of using point1 = get_x_and_y(), better use: x1, y1 = get_x_and_y(). Now use x1, y1 directly instead of ugly point1[0], point1[1].
05:05
Moreoever, point1 and point2 are integers, you may want to convert them to floats using float to get accurate results
05:47
I was trying to execute the code given by the OP for this question stackoverflow.com/questions/20113141/…
It worked fine on my machine. So, to show him that it works fine, I posted the code to ideone.com and it breaks the server
This is the code which I wanted to execute with ideone.com
# -*- coding: latin-1 -*-
import re
myString = "afdëhë:dfp"
newString = re.sub(ur'([aeiouäëöüáéíóúàèìò]|ù:|e:|i:|o:|u:|ä:|ë:|ö:|ü:|á:|é:|í:|ó:|ú:|à:|è:|ì:|ò:|ù:)h([aeiouäëöüáéíóúàèìòù])', ur'\1\2', myString)
print newString
06:09
@thefourtheye Strange..
Can you show the link to ideone?
 
1 hour later…
07:34
And the worst question award of the week goes to..
I am trying to post next Palindrome solution in python2.7 on spoj , but everytime I get NZEC runtime error . Although the same code runs perfectly in pyCharm and ideone.com
What is the reason behind NZEC error
Dang, no idea
Ask a question in the main site @Subbu
Weirdest bug in tHe world rigHt now. My "H" and "C" keys don't work unless I am pressing sHift...... But only in CHrome.
@thefourtheye stackoverflow.com/a/20115190/1561176 - NiCe answer :)
08:00
About all the pinging discussion yesterday: Pinging to help on a generic problem is not "necessary". Anyone can help with such a problem, not just a few people who happened to be helpful in the past or were active recently. Actually, in the latter case chances are good those people are either already looking at the chat or doing something else and would look at the chat later and then see the message anyway and possibly help.
indeed
08:32
@ThiefMaster What pinging discussion i missed yesterday?
@aIKid ah that guy that kept asking for help with his "time.sleep(1)" problem ...
Oh, he keeps asking it?
well he kept pinging several people
08:47
@InbarRose wow.. ;)
@PeterVaro Fixed it now...
@InbarRose how? duck tape + shift key ? :):)
@PeterVaro That's something that i would do
@InbarRose Indeed.. o_O
09:04
@InbarRose Nice, I see you got 10k
@ChristianCareaga yep. :)
sigh
Sorry I didn't change the first line. Now it works, perfectly :) Thx! — Kwiaci 52 secs ago
And no up vote or accept.
09:30
i have a problem in my python program if any of you can take a look at it
elif ((j==4 or j==4) ???
what is that supposed to do?
ah thats a mistake, but originally it was -4,4 and it didnt make a difference
ill test it againt o make sure
yep nothing is outputted to stream
when i attempted to debug it it seemed as if it was not going past -4 in that second loop
import re

def find_cases(file_path):
    with open(file_path) as f:
        return re.findall(r'([A-Z]{3}[a-z][A-Z]{3})', f.read())
@bh3244 This does what you want.
regex?
Indeed. A perfect task for it.
09:36
+1 for regex
hmm i am getting syntax error on 3rd line
i checked the tabs are you sure that is correct?
09:53
this works (without file for now)
just add the file handling stuff and you are good to go
it is exactly what @Ingbar posted just without file handling (i was too lazy to create a test file ;)
ok this one runs, apparently the file has no occurrences where it occurs??? possible i guess
@bh324 yeah, i think you were supposed to add this to the code snippet @Ingbar provided you, it was not a complete solution ;)
@bh3244 file_path is a variable that the function gets - you would call the function like: find_cases('python3.txt')
hm yea i added file_path = 'python3.txt'
>>> import re
>>> text = 'hgdjGHDjfsbEYQiPOIgfhjghjghGHJDGHhHGJGHghjHJJhTZR'
>>> re.findall(r'([A-Z]{3}[a-z][A-Z]{3})', text)
['EYQiPOI', 'DGHhHGJ', 'HJJhTZR']
@Mailerdaimon Just to show a sample.
10:07
yes it runs and i get no output i think i interpreted the challenge wrong
Have you looked at the file contents? Can you provide a sample of them?
@InbarRose have you added the ">>>" yourself or are there special "code tags" for the chat?
I just copy pasted from IDLE
its a challenge, in the source on this page
then press ctrl-K to add 4 levels of indent to my whole message.
10:11
@InbarRose Ok, good to know
@bh3244 oooooooooooooooooooooo I remember that.
yes i dont see whats wrong
i was already searching for xXXXaXXXx
Ahh.. you have to extend the regex a little bit.. the current although find "AAAAaAAAA"
better would be: re.findall(r'([a-z][A-Z]{3}[a-z][A-Z]{3}[a-z])', file_path)
this only finds "aAAAaAAAa"
yes
with this i get 10 possible solutions
10:19
hm i must be passing the file wrong
i have done it without files.. just copied the very long string into my script as "test" string
and the "code word" seems correct ;)
00:00 - 11:0011:00 - 00:00

« first day (1132 days earlier)      last day (4039 days later) »