« first day (1731 days earlier)      last day (3441 days later) » 

00:40
namey's back...
Aaron Hall - ???
00:54
!!!
01:05
@AaronHall nice pic
thanks.
01:19
Took me a while, but I'm starting to realize that "smart" to-bool conversion is a mistake in dynamic languages
Aka, within if/while statments
not knowing what type your variables are (based on either definition, assignment, or the return from a function or method) can be a major problem in dynamic languages
also not knowing what is true and what is false
I think namey is trolling us, just a little.
yeah, but I see that so many times with beginner mistakes
Is criticism = trolling now?
Naming is an acquired skill.
01:31
So anonymity = trolling, then?
At first you don't know what names to go with. Then you find something that kinda makes sense, and you use it everywhere, and then when you realize being tersely specific is optimal, you've got to learn to write macros in emacs to fix it.
Oh, you were talking about naming variables? Not sure what the context of that was, but okay
(Thought you were commenting on my name)
I'm an artist. It works on multiple levels.
...or vim :P
01:48
JGreenwell seems to have this down. I wonder what his code looks like...
I know what his face looks like. :D
My github is linked on my career page (though it is only the stuff I've done for school and most of that is tutoring; other stuff is hidden behind "non-disclosures")
...need to update my github its structure is a mess right now
If I ever have to meet Peter Varo in real life, I'm going to be looking for the pixelated bald albino with beady eyes and a black beard.
I only updated my picture to an actual photo when I started looking for work - for resume
Sounds legit.
02:30
ok, good night good people. (may bad people have a bad night, respectively.)
 
3 hours later…
05:14
Cbg all
 
2 hours later…
07:10
Cabbage people :-)
*bows to the superior answer* +1 (It seems dogs reign supreme on this question ;-) ) — Cerbrus 2 days ago
@thefourtheye cbg and it does seems like the dogs are ruling SO :) :P but I thought you were a puppy
I am the only puppy here, my evil twin has become a nuppy
bon chou!
lol. நல்ல முட்டைக்கோஸ் :D
It is the same thing, but in Tamil ;-)
Nice way to great a person :P
07:23
@thefourtheye when in France, speak like the French do ;)
@AnttiHaapala ROFL. I was literally laughing out loud at my desk. People came to check why I am laughing hard, they didn't understand anything and they left. :-|
@NoobSaibot Just when Windows 10 is looking really promising :)
@RobertGrant Cabbage :-)
My regional expression of the SA government want all Uber drivers to be licenced taxi drivers
Followon from: Uber drivers assaulted
Ah, SA
Having said that, I went to a cool JS conference on Saturday :)
07:41
Hello Everyone. Can some one help me out Please? I am stuck up on an issue. :(
Please.
It's pretty urgent actually. So if someone of you could help, it would be really good for me.
@AshutoshSaboo don't ask to ask. Ask and if anyone has time/will, you will be answered. If your question is "longer" I suggest you post a full blown question to the main website. After you've done thorough research, of course.
Yes, I'll post the link to the question, now
If you have made a post, we don't need a link. Many people see your question as it is.
0
Q: Multiprocessing Scrapy Spider Scripts Issue when called from a single script

Ashutosh SabooUPDATED QUESTION-: As some of them had marked it as broad, I have edited it to shorten it to only one part of the question! Please read my entire question once (I know it's a bit long), but I have tried to include all details in it, so that you all may help me in a better way! (Please don't dow...

Yes, it is here.
Or maybe, a smaller version of it - stackoverflow.com/questions/31087268/…
So, someone can help? Please!
I have researched a lot, but no solution as of now. :(
stackoverflow.com/questions/31087268/… - A half-answer is posted here. Can someone tell me where should I place that class?
@AshutoshSaboo you've asked your question, if someone wants to answer then they will.
07:49
ok sure. Thanks
Incidentally, if you've recently asked a question on the main site, please don't share it here.
People here are already watching new questions.
Actually the question was asked several days ago, so it might be well below! That is why I shared it, for attention!
:)
I would link you our room rules, but I'm on my phone so can't.
Ah okay awesome :D I couldn't tell as I'm on my phone :p
07:51
Okay! Sure. :)
Thanks for all the help btw! :)
08:03
@VigneshKalai are u on FB or WhatsApp....would be more convenient....Currently I am Working in AN IT firm And USing Django but i dont know everything in Django......So for few concepts i need suggestion....i just need help in approach rest i will do it myself... i am from India...
08:16
Passwords must be 8 characters long, contain only letters & numbers and need to start with a letter. <- Screw off.
@Ffisegydd :)
08:32
cabbage
I'm really annoyed actually. Without going into too many details, I use a standard password system where I have a main password which I modify in a secret way for each website that I sign up for, meaning that if I come to a site I can usually guess my password etc. So I signed up for broadband and gave them "my password" for what I presumed would be logging in online.
Turns out it was actually a "Please give us the 1st, 3rd, and 8th letters of your password." deal. Meaning they're now storing my password, in plaintext, on some bloody database somewhere.
Hey, maybe they optimised and only store the 1st, 3rd and 8th
And I guess they could encrypt each char, which might be why it needs to be exactly 8 chars
@Ffisegydd Here's a nice password maker written in JavaScript that uses SHA-1 to make random passwords from a master pass phrase & a site-specific tag (eg, the site's base URL). It was written by Googler Tab Atkins Jr, aka Xanthir.
@PM2 yeah I should use something like that really :/
I first saw that script several years ago, when Xanthir first posted the link on xkcd, but I only began using it last year. I wish I'd started sooner...
08:42
What's the difference between the three terms @PM2? I assume Site Tag should be something that's for that site only (such as stackoverflow).
What's the hash word meant to be though?
I have a slightly modified version on my HD (and a USB stick) that adds a title attribute to the Master Key text box so I get a hint when I hover over it.
@Ffisegydd That's where the output appears
Ah :P
Yeah I should have just pressed the button :P
:)
His HTML is a bit radical - there's no <head> or <body>, which I found a bit surprising for somebody who writes stuff for the W3C.
He probably knows Arcane Ways that would scar the common man.
@Ffisegydd The Site Tag can be anything you like that's unique to the site. I normally put the site's base URL, since it's easy to copy & paste.
08:48
Yeah makes sense.
I've read quite a few articles about how passwords, or even passphrases, in general are troublesome.
Unfortunately there's not really a better alternative.
FWIW, here's the thread that Xanthir originally posted the link in, with some relevant discussion. Passwords and hashing and not hashing.
Genius.
I love xkcd in general, but admit that sometimes he can miss the mark, but that's brilliant.
@Ffisegydd That is really sh1t. They should not call that a password imho.
Tries Vivaldi as primary browser for a day
10:02
anyones knows django here...need some help
regarding foreign Key
@Naresh just ask
@RobertGrant below is the link of my questionhttp://stackoverflow.com/questions/31334660/need-help-to-define-model-fi‌​elds-in-django
0
Q: Need help to define model fields in Django

NareshI Have some data in JSON format and i want to load that data with manage.py loaddata data.json command. I have below JSON format. { "fields":{ "user id":12026, "user name":"Paul Graham", "email":"[email protected]", "city":"China", "VIdeoData":[ { ...

10:17
Guys, the above question is still not closed
Is this where I buy snakes? :P
Yes.
10:33
@vaultah BAM!
cbg Jon
Cabbage!
cbg, poke.
11:22
Accounts destroyed today: 48.
guys let's solve global warming because I am sick of this dreadful heat
And had to buy an air conditioner to keep my room at a cool 40 degrees, the energy bill is so worth it
@corvid and you don't see the irony in that.. :-P
So where is your energy generated?
An aramada of genetically enhanced hamsters on wheels
11:38
That would be fine if it didn't take a billion gallons of oil a day to lubricate the wheels
@JRichardSnape That's no moon not a password, that's an identifier... and that's scary!
So far: Vivaldi not bad, except it seems to have started a million processes
IE8: one process per tab. Vivaldi: 2 processes per tab! blows raspberry at IE8
Okay I have a small problem...
formatter = PrettyPrinter(indent=2, width=50)
def prettify(func):
    @wraps(func)
    def wrapper(*args, **kwargs):
        json_data = func(*args, **kwargs)
        if isinstance(json_data, dict) or isinstance(json_data, list):
            return formatter.pformat(json_data)
        return json_data
    return wrapper
When it's formatted, it prints out really ugly formatting full of \n,s what should I do?
11:57
example?
In [1]: api.get('cards')
Out[1]: "{ 'data': [ { '_id': 'snKbGdmHtJGf6gz8y',\n              'wells': [ 1,\n                         12,\n                         1,\n
Do print(_) afterwards.
That fixes it, but what's the deal with it outputting weird the first time?
You’re looking at the repr of a string, which is a string literal.
Ah I see, but is there a way to return the variable, but not have it output the ugly string?
12:00
    >>> 'hello\n  world'
'hello\n  world'
>>> print(repr('hello\n  world'))
'hello\n  world'
>>> print('hello\n  world')
hello
  world
print it
the output comes from your REPL that just prints the last return value.
Can I suppress the return value from certain methods being output to the REPL?
Capture it in a variable
@corvid wow... if you're going to answer stuff like this - you should really add a \n there or use print("print('hello world!')", file=py_file) or something :p
The REPL only prints stuff that you don't assign to a variable. So if you don't want to see that stuff, do like poke says & capture it in a variable.
yeah probably @JonClements hah but just answered in 2 seconds because it's such a common thing
12:12
upvoted :)
Note that the REPL won't automatically print stuff that's `None`, so you can do
>>> 'silly' and None

and nothing gets printed
Which kind of implies there's likely a duplicate then?
Hello again my lovelies.
hey beautiful
12:15
<3
Got a new date for internet. Only got to last until 22nd July. Incidentally it's time for my second entry into my journal
Are you working yet? Sorry, I keep forgetting your start date
Day Without Internet #2: The walls are talking to me. They don't like that I've been carving the days I've had to endure this torture into them with my bare nails.
I start Aug 3rd with an induction week @Rob
Sounds like The Yellow Wallpaper
Nice
12:16
""Day 2 without Internet... I can feel my mind slipping but so far I've clung to my sanity... as each hour proceeds, the voices taunt me further"
I'm trying to weigh up whether an hour's commute is worth living somewhere nice, where we know people, or not.
Luckily I've got some decent DVD boxsets to watch, and can work through some books.
@Robert depends on the commute method.
Car
No direct train
@Ffisegydd you need to summarise each day in a wiki article on sopython! It might be of future historical importance!
Unless there's another option I haven't thought of
12:17
I wouldn't fancy driving an hour a day but I'd handle a train as long as it wasn't too horrendous (i.e. inner city london)
I'm basically wondering about Oxford->Andover
If you want to train it you go via Reading
Also I'm going to find out if I can work from home sometimes, but with defence stuff I wonder if that's possible
For some reason I thought Andover wasn't a British town at first, I thought "Bloody hell that's a commute."
Also, you know. Oxford is cool.
Oxford is very pretty.
:)
Jul 6 at 8:20, by Robert Grant
@Ffisegydd possibility of a job in Andover
12:19
I'd say it's worth it personally. Oxford is cool and if both you and t'missus are working then it's worth it, even though it'll be more expensive presumably.
Jul 6 at 8:20, by Robert Grant
Which it turns out isn't in Germany
@corvid Naughty crow! IIRC, Windows doesn't cope well with text files that aren't terminated with an EOL sequence. OTOH, it wouldn't surprise me that Windows will add an EOL if there isn't one when you write a text file. Also, you might like to tell the OP how to append stuff, rather than overwriting. On the other other hand, maybe it's not a good idea to encourage clueless newbies to write programs that write other programs. :)
Missus won't be working, for a reason I will now make public. We're pregnant :)
(Mostly her)
I call shotgun on naming your child!
Also, congratulations!
12:20
Thanks :)
Congrats, Mr & Mrs Grant
Someone already suggested "waitforit" as a middle name
And by suggested, I mean he said he'd pay the kid's tuition if we did it
Well, she might start working again, but kid+move+visa+moving her qualification will take a bit of time :)
@PM2Ring thanks :)
@Rob is she South African?
@Ffisegydd No suggestions involving the initial "V A", please. :)
12:22
Haha
So many
Theodore Harold Oliver Nicholas is another good one
First thoughts include: Winfred, Archibald, Agnes, Baldrick, Gregory.
I'll come up with more.
Yeah Gregory Roger Eric would be pretty fun
Robert Grant II is another contender.
Had 12 (actually 13)-week scan on Thursday. Amazing change from a few weeks before. See brain, spinal cord, hands etc, and it's moving round loads. Can see it's a little person. Buys gymnastics equipment to force on child
On the xkcd Language / Linguistics forum there's a large thread called Think Before Naming Your Child. There are some classics in there, but also a lot of repetition.
12:25
Repetition, huh? So no Grant Grant Grant?
You gotta call it Bobby G Jnr :)
Whoa whoa whoa. I've got it. Benjamin. Then we've got Bobby G and Benny G.
Then you can go Bobby for a boy, or Bobi for a girl or something :)
Booby G? :p
Probably not. :) I mean that thread has lots of posts by people who haven't read the rest of the thread, so they repeat stuff that's already been mentioned.
@PM2Ring yeah I'm just kidding :)
12:31
bbiab
places that put "must have a 3.5 GPA" are annoying... wouldn't that be like... less than 4% of students if it was on a bell curve?
@PM2Ring Nah, Windows doesn’t care about whether there is a trailing newline or not. It’s Unix tooling that usually expects them everywhere.
@RobertGrant Congratulations! :)
12:49
Thanks :)
hmm... how do you confirm that a user requesting a resource on an API is definitely who they claim to be? As in, userIds are probably public enough that they could just attach it
Greetings and saladtations, Morgan.
This is a much better reception than I got when I told rms
12:52
@corvid Think grade inflation. It's at least 10%, and probably higher. Grad school GPA's are even higher.
@RobertGrant RMS? Root-mean square?
@AaronHall that's kinda dumb, in most of my classes a "C" was basically considered "proficiently understands the material"
You grew up in the 50's?
@Aaron Huh, I almost didn’t recognize you with that avatar
Thanks, I think.
12:56
@corvid The users should have a key for the API as well as their user ID.
user559633
"morning" all
@PM2Ring So store that securely on the server and return it when they successfully authenticate?
@tristan check it, new avatar.
@tristan it's always morning to the crows. Caw
Hey up tristan, you back stateside?
user559633
12:58
@AaronHall nice -- where is that? cool wall
user559633
@Ffisegydd hey! not yet, back in Moscow.
Coney Island, behind Nathans like when you're heading to the beach.
user559633
@AaronHall That's cool, good shot
@tristan looks like your avatar is related to commander Ken.
user559633
@RomanLuštrik Keen, yes
12:59
@Ffisegydd just joshin
Keen? Hum, maybe I had it wrong all these years. Decades.
user559633
@Ffisegydd I was planning on being in Berlin today, but I'm fitting in another session with a tattoo artist in St Petersburg and my talk got accepted for PyGotham, so I'm going to be "head down" and it's easier to focus in our apartment than in an AirBNB
@corvid Depends on how your API authentication works
My family would go to the beach so much that in high school, random people would come up to me and ask me if I was Filipino. Now I'm supa pale.
@poke simple answer: it doesn't
13:00
haha
Then you should start there :P
Go with OAuth2!
I'd like to but have so many things to do first ._. is it hard to implement server-side? I've only interacted with other people's OAuth servers
@AnttiHaapala As a German, this is kind of impossible to watch… :/
@corvid: The first rule of crypto is: DON'T write your own crypto. CrackStation has a helpful article.
@corvid You’re using Flask, right? flask-oauthlib.readthedocs.org/en/latest/index.html
@PM2Ring huh? How is that related?
@poke corvid mentioned storing the API key as plain text. That article explains why doing that sort of thing with any kind of password is unwise.
I guess lots of sites do store plain text passwords, API keys etc. But I don't have to like it. :)
13:18
I thought you make a one way hash and check it against the stored hash usually?
I have to debug my old code today. :/ Time to find out how bad I was at programming 6 months ago.
@poke it's pretty awesome though
It's amazing how much better people get at programming in 6 months though
@corvid Yes, that's correct. But you should also salt the password.
And for hash you want to use scrypt if you can, apparently
13:25
I prefer pepper on my passwords.
Obviously not md5, but apparently everything other than scrypt has flaws
Bcrypt seems to be the most popular in the javascript space
@RobertGrant It’s less awesome if you understand ever word they are actually saying. I can’t concentrate on the subtitles at all.
@corvid I like to use Thyme.
@poke oh sorry yeah
Mute it :)
@corvid scrypt is bcrypt ON STEROIDS
In that it can vary memory used etc to compute the hash, so dedicated hardware won't work. But bcrypt is still very good.
13:32
can anyone point me to a good introduction to reading json files with python
The python json docs should help you
user559633
@DanielPrinsloo "python documentation json" any search engine
user559633
you could probably also just shout it at birds and one would eventually drop off a descriptive scroll
Assuming you can read bird poo
thank you i may be back for some help clearing up things in my head
13:34
(Still getting on okay with Vivaldi; will use it tomorrow as well)
user559633
@DanielPrinsloo make sure to put in at least a minute of effort before coming back to ask someone to help, otherwise, you're being disrespectful of others' time
I think you're right poke, need OAuth because another application is connecting to my application. Does OAuth work with websockets?
user559633
@DanielPrinsloo cheers and thanks
tries to find a local parkrun
13:38
Good morning, and shredded cabbage on a Mexican shrimp taco to you all.
Oh, @tristan are you still interested in seeing the C code I wrote that creates Mercator projections?
user559633
@PM2Ring Very
Google's not helping me here. In Ruby, I can force something to be an array with the Array method: Array("foo") results in ["foo"]. If the argument is already an array, it is passed through unchanged: Array(["foo"]) results in ["foo"]. How would this be done in Python?
user559633
@WayneConrad (nope, bad guess)
Yeah but if 1...yeah.
13:42
Unfortunately, list("abc") decomposes the string into an array of characters. That won't do for what I need.
@tristan Ok. It's not really of a standard that I'd like to release, but I think I can put it up temporarily on pastebin. The code's not that big, but it's split over a couple of files. So I'll zip it up & base64 encode it into a Python script. :)
So you want func('abc') to return ['abc']?
I mean, there's always type()
a if type(a) is list else [a]
@Ffisegydd and func(['abc']) to return ['abc']
@QuestionC yeah that's what I'd do
x if isinstance(x, list) else [x]
13:44
In fact I've done that before
user559633
yeah, that's what i was going to suggest
I'd probably do something similar using isins - never mind Poke got there first :P
@Ffisegydd Yes, exactly. I've got an API where the programmer is supposed to pass an array of strings, but is instead sometimes passing a single string. I'm putting in a quick workaround in the API until the programmer fixes his code.
isinstance vs type?
user559633
@PM2Ring ha, or just email me -- my name @tristanfisher.com, also, appreciated as i have no idea how you'd go about doing such a thing
13:45
It's ugly, but that seems okay since the concept is ugly.
Try this pastebin.com/02UzrRYS I've given it an expiration time of 1 day.
It seems that either type() or isinstance() will do for this purpose. Thanks, everyone!
@Wayne use isinstance over type.
Why's that? I have a guess, and was just about to look it up... my guess was that isinstance respects subtypes.
@tristan As I said, the code's not fantastic, but it does contain some comments, so hopefully it won't be too mysterious.
13:48
be there anyone here who is good at math? Specifically, 3d geometries
@WayneConrad Exactly. type returns the type of an object, but you can’t check inheritance that way.
user559633
@PM2Ring grabbed it, very clever :) thanks for sharing
list(x) if isinstance(x, collections.Sequence) and not isinstance(x, str) else [x]
never mind, I can't read
^ even better
13:49
@davidism did someone misread the issue? :P
I think isinstance reads better also. How often would someone subclass list? Does that happen? In Ruby, we generally don't subclass the basic container types, but instead wrap them and use delegation or what-not.
I've subclassed list before now.
@tristan Thanks. I used to do that sort of thing a lot when I hung out on a text-only forum.
SE Shanty subclasses list
> The Welsh Government reportedly sent back this preliminary response: “jang vIDa je due luq. ‘ach ghotvam’e’ QI’yaH-devolved qaS" (that's Klingon, not Cymreg)
13:51
@davidism was gonna say...:)
They misspelled 'Cymraeg' -_-
It's pretty possible the Welsh misspelled it first
ducks
@poke Because that turns tuples into lists, right?
@WayneConrad Because it reuses the sequence of all sequence types except string
So you can pass e.g. even generator functions and you will get a list back
That's beautiful.
13:54
I even wrote a thing in JavaScript that does LZW compression & base64 encoding, saving the result as a self-decoding JavaScript data URI. But the output only works on browsers that supply a base46 decoding function and that tolerate JS in data URIs, which most modern browsers no longer do.
They don’t?
Can’t you put whatever in data uris?
@WayneConrad It's probably more common just to use a wrapper. Deriving from a primitive gives you cleaner use syntax, but it's more work to implement, since you generally have to create implementations of lots of double-underscore methods (aka magic methods or dunder methods).
data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+DQo8aGVhZD4NCjxtZXRhIGNoYXJzZXQ9InV0Zi04IiAvPg0KPHRpdGxlPldoZWU8L3RpdGxlPg0KPC9oZWFkPg0KPGJvZHk+DQo8aDEgaWQ9InRlc3QiPkhlbGxvIHdvcmxkPC9oMT4NCjxzY3JpcHQ+KGZ1bmN0aW9uICgpIHsgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3Rlc3QnKS5pbm5lckhUTUwgPSAnSGVsbG8gcm9vbSA2ISd9KSgpOzwvc2NyaXB0Pg0KPC9ib2R5Pg0KPC9odG1sPg==
Works for me, with JavaScript

« first day (1731 days earlier)      last day (3441 days later) »