« first day (1282 days earlier)      last day (3651 days later) » 
05:00 - 20:0020:00 - 00:00

5:31 AM
anyone here?
 
 
2 hours later…
7:36 AM
running celery -A proj beat with no celery worker. looks like beat executes the tasks anyway. anyone knows how to make the beat route the tasks to appropriate queue?
 
7:48 AM
Cbg all
 
@Ffisegydd STEWIE!!!!!!!!!!!!!!!
 
Cabbage!
 
@Terfin cabbage!
 
@Jon Briiiian!
 
Since I can't get this out of my head... and Peter's suffering too... I share it once more... (it's good Sunday morning music cough)
 
8:05 AM
Cbg
Christmas?:D
 
cbg @mamasi
 
Sab
Apples everyone.
Can anyone explain why we use if(name == main)
Well, that was unexpected to have a bold name and main, but you get what I mean.
 
I'm on my phone but there is an example on common questions
 
@Ffisegydd hehe... both thinking the same :)
 
Sab
Thanks :)
 
8:15 AM
Great minds think alike and all that
 
But fools seldom differ? :p
 
Sab
What about the Inbetweeners ;-;
Movie puns are simply awesome ;-; tears of joy
 
8:39 AM
Ugh... well... the day's not looking any nicer, but gotta go out and do a couple of bits...
Speak to y'all laters - rbrb for now
 
 
2 hours later…
10:11 AM
Cabbage all :D
 
cbg @Iplodman
 
@JonClements you...
 
Anyone know out of which of these (imgur.com/6sU934O) brackets would be called in Notepad++?
Don't worry, it's the identifier :l
I'm making a N++ theme :D
 
11:05 AM
Might think about putting a similar question to that in the common questions later
 
11:32 AM
yay, for shaders ;) (it is only 4 vertices!)
 
 
1 hour later…
Sab
12:36 PM
Apples everyone.
So silent :'(
 
cabbage!
 
Sab
Apples!
 
Hi all :)
 
12:52 PM
Cbg all
 
1:20 PM
Hiya
anyone here?
 
Hello
 
@Ffisegydd new?
ah..o/
 
What's up @user3546546?
 
@Ffisegydd I'm good, what about you?
trying to solve a Python issue..
 
What's your issue?
 
1:34 PM
@Ffisegydd Trying to avoid a db call with Flask. Maybe what I'm trying to do is possible with two different POST requests but I'm not sure..
this is the question with the details
Actually I'd double the throughput just by cutting the call
 
You really need to give it more than 40 minutes before coming in here and asking more. Your question hasn't even been up for an hour.
 
@Ffisegydd thanks I'll do it. Will people see it even when it's not in the frontpage if they're subscribed to the tag right?
 
Especially on a Sunday afternoon. You're going to have to wait a little longer for an answer.
Yeah if they look at unanswered or at the specific tags they will
If you still don't have an answer tomorrow then by all means come back in and ask :)
 
@Ffisegydd Oh, ok thanks again for your help :)
 
We just prefer if people give it some time before linking it in here, anyone who is actively answering questions at the moment will be keeping up to date with the site
 
1:42 PM
1 message moved to recycle bin
 
@Ffisegydd Just found and read the chatiquette and says exactly what you say :)
 
Yeah I'm on my phone so couldn't find it or I would have linked it :p
 
@Ffisegydd Your suggestion would have been enough :)
@Ffisegydd do you also develop in Python?
 
Yeah I'm actually a scientist but I analyse data using python and do some software stuff as a hobby
 
@Ffisegydd Nice. I was doing that as a hobby alone too but I'm slowly moving to commercial (open source) applications. I transitioned from Php one week ago and it's faster and easier to work with.
 
2:04 PM
cbg
 
hey jon, are you familiar with flask by any chance?
 
woof?
 
caw.
 
@Ffisegydd have you been here all day on your phone Stewie? :p
 
I pop in occasionally :p
 
2:16 PM
Fair enough :)
 
Poorman's connection :P
 
2:49 PM
@JonClements are you good at linear algebra?
 
Errr....C yesterday, algebra today... you've really taken this Ben Pearce thing personally haven't you? ;p
 
:):)
I think I have a basic problem, and I can't figure out how to solve it..
I have a square -1, -1 -> 1, 1
I want to map all of it's values to 0..1, so for example: 0,378, -0.5 -> 0.25
I'v got this so far ^
but this is only working when my rotation angle is 90deg
but I want to do this also: rotation angle = 45, so 1, 0 -> 0.25
here is my code:
(I think it will be a little easier to understand what I am doing)
 
Ugh nope... I'm tired... and still working on other stuff... sadly I think it's safe to say I'm not going to be any use here
 
(I'm looking for the solution at line exprs = float(x*y))
 
3:39 PM
it's easter today?
 
3:51 PM
Hi,
I have a basic problem regarding encoding.
I have a string "Definitivamente volver\u00eda.".
Converting it to unicode prints "u'Definitivamente volver\xeda.'"
How can I know what is this character '\u00' or '\x'?

I actually have to transfer this string from a JSON file to a text file. But whenever I do I get this error `UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 35: ordinal not in range(128)`.
Is it recommended to remove non-ascii characters.
?
 
I have that problem yesterday, are you reading from a file?
 
Yes
a JSON file
but copying that string to another text file is creating issues
 
4:42 PM
Wow... I'm yawning a lot today
 
CBG
When I download a module for python I get a lot of files. How do I generate a single file without installinmg it on my system?
@JonClements
I want to use mechanize on Google app enigne
 
I thought gae already had something like mechanize built in
Anyway... I don't have any experience with that combo, but err:
4
Q: Mechanize and Google App Engine

Marek StójHas someone managed to use mechanize with Google App Engine application?

 
How do I build a single module from the source code
@JonClements
Instad of installing it
 
4:58 PM
Pass... maybe you could mangle it all together so it works as one module... otherwise, pass - not something I'm going to think about :)
 
I used the build commmand and got a lot of fies with _ befor them like _mechanize.py
@JonClements
 
Sab
Apples all :D
 
5:15 PM
Hello all
 
heya @Moayad
 
5:33 PM
hi @Bob
 
Bob
hi
 
sooo... I'm a bit lost as to deployment of a web application.
 
2nd star to the right and straight on till morning @Crow
 
huh?
 
Directions...
 
5:41 PM
Oh, I was looking at the star board hah
 
Well, I suppose "starboard" is "right" :p
 
6:05 PM
cbg!
 
CBG!
 
Cabbage all.
You know what weird? I can't reply to Youtube comments o.o
 
We need to have a cheer squad made out of bots that will randomly sing a vegetarian song to a random member of the chat room.
 
Any ideas?
(The video in particular youtu.be/IBbcBeeMD0k)
 
Guys this is hell!!! I have a problem in Python for about a week now!!! Sometimes life sucks!!!
 
6:10 PM
@Terfin I'll put it down on the todo lits :)
 
@JonClements :D
 
@Exotic, what is it? :P
 
-1
Q: Python 2.7 extremelly persisting error

ExoticBirdsMerchantI have this module import os import sys sys.path.append("C:\pysec-master") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pysec-master.settings") from pysec.models import * """get a file from the index. it may or may not be present on our hard disk. if it's not, it will be downloaded the f...

i cant stand it anymore i have asked 4~5 questions noone answers
 
First thing I notice: Do not use backslashes. Even if you are on windows. And if you really want to use them, mark the strings as raw strings r'c:\foo\bar'
Also, stop abusing docstrings for comments. If you want a comment, you write # whatever
Docstrings generally only make sense as the first statement in a module/function
 
Sab
Guys
 
6:13 PM
yup i know i put a lot of writing
 
Sab
why word.lower() has '()'
 
in docstrings
 
Sab
I mean what's the purpose of the () in word.lower?
 
.....
it's a function call
 
invoking a function?
 
6:13 PM
It's a function
all functions have ()
 
Sab
Thanks. But why doesn't it work like lower(word)
?
TOo late plod :3
 
That's just not how it's built @Sab.
 
cool, I actually got a setup.py file to work... now just to figure out fabfiles
 
Sab
aha
 
@ThiefMaster do you mean do not use backlashes and instead of sys.path.append("C:\pysec-master") i should put sys.path.append("C:/pysec-master")???
 
6:15 PM
@Sab: Because unlike PHP Python is not a piece of crap with a bloated global scope and a completely messed up stdlib :)
@ExoticBirdsMerchant: Exactly!
Windows' APIs actually support forward slashes. So when programming you usually do not need to use backslashes for paths.
 
Sab
What has PHP got to do with the question? o.o
I barely know programming and you're invoking PHP and stdlib O.O
 
I will try that one out now! @ThiefMaster do you believe it might have anything to do with my problem?
 
@ExoticBirdsMerchant since you look like you're trying to work in a Django "shell": have a read through stackoverflow.com/questions/4847469/… - that has approaches as to how to correctly get settings and the django environment running... then go from there...
 
Out of intrest, is there anything stdout and stdin stands for?
 
nop same @#%@$
i'll check it out
thanks
@ThiefMaster it's a little embarrasing but i have seen in the past too such tutorials and as a newbie it boils into one hot question: Where do you type python manage.py shell ? In the GUI? In the run? In the cmd after you do into the directory of the project? where?
 
6:21 PM
in the "shell".. so in your case - when you're in cmd
 
i will try that one out.
In the directory of the project i will try
Damn the same demon struck again!!! ImportError: Could not import settings 'pysec-master.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named pysec-master.settings i got that in cmd.....
I think whenever i try to go into tutorials like this one i am getting ripped by that hassle in the beginning
 
If you're in the django directory and do python manage.py shell does it work ?
 
@Iplodman Standard output/input I guess?
 
Ah, cool :P
 
I'll try that i was on the projects directory named pysec-master which is on C:\pysec-master
@JonClements that's where it is supposed to be typed right?
 
6:26 PM
Okay, that's the directory with your manage.py ?
 
@ExoticBirdsMerchant Type it in the folder where your manage.py file is
 
oh ok doint that now. My project has no manage.py file BTW
 
facepalms
 
Did you use the startproject command?
 
Not sure I even want to know why :)
 
6:29 PM
I think you're trying to use a Django app, not a complete project
 
@MoayadMardini no the project was downloaded from here github.com/lukerosiak/pysec
 
@ExoticBirdsMerchant Obviously it has a manage.py :)
 
I am trying to make it work
 
It's right there on Github
 
ohh
yup sorry that was haste it ha
has*
@MoayadMardini yup i went to the directory where manage.py is i typed in python manage.py shell and nothing i got hit by the same error again
 
6:34 PM
looks like the package is named pysec, what is pysec-master?
the repository clone?
 
If the project's pysec - the folder it's in should be called pysec
 
@MoayadMardini when you download/unzip you get a file named pysec-master and inside there is local_settings.py and manage.py and settings.py` and a pysec file
 
Strange things happen otherwise with imports
 
@JonClements exactly that
 
@ExoticBirdsMerchant why are you downloading/unzipping... why aren't you just git cloneing it?
 
Sab
6:36 PM
Why is name == main used?
 
@JonClements because i dont know what that is.... i have a git account but only that...
 
Sab
well didn't expect it to be bold
but you know what i mean
 
@Sab you asked that earlier... we linked you to the sopython docs, which had a couple of posts... what did you not understand from those?
10 hours ago, by Sab
Can anyone explain why we use if(name == main)
 
@JonClements will git cloneing do what exactly? hmmmm
 
@Sab Nothing. Your question is just one that's likely to be asked by people who think PHP is awesome ;)
 
Sab
6:38 PM
What I don't understand is when to apply it
 
You also said:
10 hours ago, by Sab
Well, that was unexpected to have a bold name and main, but you get what I mean.
 
fyi, you can use backticks in chat when writing code. that way nothing will be bolded: __name__ == '__main__'
 
@JonClements which scene is you fav from HP?
 
Talk about deja vu
 
Sab
Heh
 
6:39 PM
@Sab and what didn't you get from reading
9
Q: What's the point of a main function and/or __name__ == "__main__" check in Python?

Richard Simões Possible Duplicate: What does <if __name__==”__main__”:> do? I occasionally notice something like the following in Python scripts: if __name__ == "__main__": # do stuff like call main() What's the point of this?

 
Sab
23 mins ago, by Sab
What has PHP got to do with the question? o.o
@ThiefMaster
 
wat?
 
Will git cloning it put is somewhere where we can put this problem in the firing spot and blast it to hell once and for all?
 
@Peter umm... not sure
 
Sab
2 mins ago, by ThiefMaster
@Sab Nothing. Your question is just one that's likely to be asked by people who think PHP is awesome ;)
 
6:40 PM
@ExoticBirdsMerchant if you're going to be working with git, even if it's just getting repos, install git, then use it's clone command... keeps things simpler
 
Sab
@ThiefMaster What's your point with PHP?
 
@Sab IT IS A JOKE
 
Sab
25 mins ago, by ThiefMaster
@Sab: Because unlike PHP Python is not a piece of crap with a bloated global scope and a completely messed up stdlib :)
I don't get the JOKE
 
@JonClements I just realised mine is when Dumbledore is fighting in the cave while they are hunting down a horcrux. I like the music, the colors, the content.. it is a very powerful scene IMHO
 
Sab
@JonClements I'm not sure about the importing of the .py file
 
6:42 PM
Everything you define in Python, class, def, module, ...etc. has a special namespace, which help keeps everything in control.
@Sab So he's saying one of the bad things about PHP is that it doesn't have that.
 
Sab
What I understood is that if _ name _ = '_ main _' is included, the file can be run as standalone
Yeah, but why should I care about PHP in a Python lounge?
 
@Sab then would you please instead of asking the same question - be more specific of what you're unsure of... we're not mind-readers and repeating yourself like that runs the risk of coming across as spammy... okay? :p
 
@Sab Not can be run, you are checking if it's run as a standalone, if it's so, do some special behavior
 
Sab
xD
 
I am installing that github now hope cloning does something..
 
Sab
6:44 PM
@JonClements I wasn't specific since I didn't think anyone from the morning was here now
 
@ExoticBirdsMerchant What OS are you using?
 
@Sab it doesn't matter... regardless of that, someone may just have pointed you to what you were pointed to this morning
Only for that new person to then receive "oh no - I've already looked at that, what I don't get is..."
 
Sab
I agree. My mistake @JonClements
 
@MoayadMardini Win 7 64bit
 
@ExoticBirdsMerchant Their Windows client is good, but it would really pay off if you installed git (git-scm.com) and learned how to use it
Just a quick advice
 
Sab
6:46 PM
So, let's say I got a .py file with 7 functions. When I run it as a standalone i use if(_ name _ == '_ main _') to check if it's running as a standalone, then based on that I execute what I want?
 
@MoayadMardini thank you but i think i must understand how that cloning_the_code could help me?
 
@Sab Yes, because if it's imported as a module, you wouldn't want to print something for example
 
would it show the problem to other people and we could all cooperate to solve each others problems?
 
Sab
@MoayadMardini But why can't I just use return() when importing?
 
@ExoticBirdsMerchant clone command downloads the repository as it is
@Sab I'm not sure I get your question
 
Sab
6:49 PM
You said, if it's imported as a module, I wouldn't want to print something(for example). Why can't I simply use return?
 
@MoayadMardini well when i downloaded pysec from github did it give me a different version of the code? anyway my questions must look very basic
 
What, like return(math.pi)?
 
Sab
ya
 
`if __name__ == "__main__":` then asks the user for his name, for example
if the code is used as a module, then there's no user, there's only a developer using the code, and thus the developer knows how to deal with the situation , as a quick example
 
Return is used inside functions, to return a value. It's not a function*, nor something to be used outside functions.
 
6:52 PM
@Sab Serious question, do you know what a module is?
 
Sab
I guess
It's a file which contains functions>
?
 
Kind of.
But using that description any OO code would be a module.
 
@Iplodman A single file doesn't make a module in Python
At least that's no the convention
 
^
I've made a one-filed
*module.
 
Code conventions of various languages. Is nice. Major convention of PHP: Pasta.
 
7:01 PM
@Iplodman Of course you can. I meant not every file is called a module.
 
My point exactly.
 
Guys i get in to C:\pysec-master and i type pythom manage.py shell and is giving me that error: Could not import settings 'pysec-master.settings but there is a settings.py in the C:\pysec-master directory...
 
@JonClements I'm listening to Lily Allen :)
 
Sab, so you can consider the file you first run is the main module
and thus you can base the logic of every module on the fact whether it's the main module or not
@Terfin Nice page, thanks
 
@Badger good job :)
 
7:03 PM
@ExoticBirdsMerchant can you run ls in that folder and tell us the result?
 
Yeah but @copy is not liking it :(
 
@MoayadMardini it runs with no error
 
Aww.... She's got enough stuff to like/not like anyway :)
 
@MoayadMardini and if i type in the GUI the command from pysec import settings it gives me cannot import name settings (!) strange...
@m
sorry*
 
Sab
@MoayadMardini So, basically you're creating a program which has some functions defined. Now you have the functions define up and put the program in the if name == main thing. Basically the program works now.
 
7:06 PM
because the folder isn't named pysec
 
I think he only likes Slayer
 
Sab
Then you decide to make a new program
instead of copying your functions you just import your previous program
and the name == main acts in such a way that the program from the previous program doesn't run in the new program?
That's what I understood
 
@MoayadMardini well import pysec works
@MoayadMardini i have set environment variable in the Path as C:\pysec-master for the directory C:\pysec-master where the settings.py resides
 
Sab
To summarize, I can just import a program and make use of it's functions in another program without the need to worry about the previous program affecting the new program.
 
exactly that, Sab
 
Sab
7:08 PM
:D Thanks man :D
 
@Sab anytime
@ExoticBirdsMerchant and?
 
@MoayadMardini well how is it possible to import pysec to be functioning and the command from pysec import settings to by giving the error cannot import name settings ?
 
Could try sticking a blank __init__.py in there
(after you've followed instructions on how to import settings on the post I linked ^^^^^^^^^^)
 
@JonClements i go to the directory where the project it at C:\pysec-master and i do the FIRST thing that the instructions say python manage.py shell and it gives me an error saying it cannot import settings... i am plagued for a week by that problem
 
Why is the project still in that directory!?
 
7:22 PM
@JonClements well what is wrong with the directory?
 
Because it's not supposed to be called that... did you read ^^^ ? :p
 
just a place i store the file of the downloaded project..
 
Things don't work quite like that.. if you have to put it in a dir, then put it in a dir called pysec somewhere
 
@JonClements not all i just stuck in the first feat
ok i will modify the mame from pysec-master to pysec
it's the - that is not allowed right?
 
If it's called "pysec" and imports are relative to "pysec" then it's not going to work (but yes - - is not allowed in names)
 
7:26 PM
@JonClements why if it is importing things from inside the pysec it is not going to work? i've modified the environment variable too
 
Because some are done as packages, whereby imports are from pysec.something import something for instance
 
@Sab; FFS, I told you that you can use backticks to post inline code properly in chat messages. Why don't you use them?
 
@ThiefMaster the same reason the same question gets asked again 10 hours later no doubt
 
Sab
@ThiefMaster It doesn't matter.
 
well i am stuck on the same spot for 8 days! no i know how someones feel when he jettisons a computer screen
 
7:38 PM
Yes it does. I don't like having to read poorly formatted messages in the rooms I'm in - and I'm sure I'm not the only one with that opinion :)
 
Sab
Well, you're not being constructive, why should I bother about your opinion?
Anyways, I gotta go. Ciao.
 
Guys how could git help the situation? It tells me to create a repository...
 
You're supposed to just clone the github repo...
 
@JonClements every tutorial on cloning uses a program called Eclipse do i need that?
 
No, no you don't
Just go to a directory somewhere, and do git clone https://github.com/lukerosiak/pysec.git
It'll then create a directory called pysec with all the stuff in it from the repo.
Then you work within the pysec directory
 
7:49 PM
@JonClements trying that out! Thaks!!!
@JonClements wink!!! git is not recognized as an internal or external command.... error! Why God?why
 
hey, I got a 100% in operating systems class... how does that work?
 
Because you need to make sure it's on your path...
 
@JonClements I created a blank file in C like C:\GH and i went there with cmd and then i typed the command.
@JonClements path meaning the environment variable? i hope i didn't drop a bomb....
 
I suggest you google/use superuser and find how you set a path environment variable for git
 
thnks checking it out
right makes sence the cmd must have path to know the command i am starting to understand wink
 
7:56 PM
Guys very urgent git crash. Anyone familiar with git. Giving 250 bounty reps for resolving problem. stackoverflow.com/questions/23159417/…
 
Exotic, which os are you using?
 
hii is mechanize compatible with python 3.3
 
@wudpecker looks like there's a python3.x branch - have you tried that?
 
nope
 
I don't personally know but a google for "mechanize python 3" seems to bring back quite a bit of info. :)
 
7:58 PM
can u give mi the link
okie thanks @JonClements
 
@Crow i use Win 7 and i have 64bit
 
are there any equivalent to mechanize in python
 
@Jon poor puppy needs hot chocolate with marshmallows...
 
05:00 - 20:0020:00 - 00:00

« first day (1282 days earlier)      last day (3651 days later) »