« first day (1446 days earlier)      last day (3496 days later) » 

12:15 AM
@JoeSaad you just point at the existing database...
@corvid you don't need an oauth server, you need a client. The server is for being an oauth source for other sites
 
cool, I actually think I got this mostly working with github... totally copied your code though
 
12:39 AM
Hi
 
Hey @Johnston :-)
 
Should I consider using GitPython in my project seeing as it may or may not be maintained?
I think I might just use sh
 
I don't know gitpython ... it does look to be fairly inactive, but if it works, it works.
 
right. If it works it works
 
Slightly worrying that the most recent package on PyPI is a release candidate three years ago ... one would hope if there were no issues, that would have ended up as a final release.
Lots of downloads though:
> 2201 downloads in the last day
> 12061 downloads in the last week
> 53358 downloads in the last month
 
user559633
12:51 AM
@Johnston you could always fork it and make patches if needed
 
@tristan Yes true...
@ZeroPiraeus Its so strange that it is used so much for being developed three years ago
 
user559633
maybe it's pretty straightforward
 
user559633
there's issues on github, but from a quick look, there's lots of stupid ones
 
A (very) quick google suggests there isn't much else around for the same task - dulwich appears to be the main competitor.
 
@ZeroPiraeus Well I guess it's time to write a python git client
I think I'll stick to sh.
 
user559633
12:56 AM
i kind of don't understand why gitpython is so many lines
 
I didn't even look
 
user559633
oh forgot to look at deletes. 62k-ish lines. still.
 
oh
 
user559633
the original linux had like 1/6th of that
 
I don't see a lot of spam on SO, really ... this is pretty blatant though :-)
 
1:09 AM
@ZeroPiraeus Maybe he is just a really positive guy trying to help people earn money
by posting on the wrong site in a very spammy way
 
@Johnston Yeah, that would be characteristic of a member of the Illuminati ... as would advertising their organisation ;-)
 
@ZeroPiraeus I commented on it
And downvoted
He spelled Illuminati incorrectly
 
No point losing yourself a point (even temporarily) by downvoting the answer ... just flag as spam and it'll get nuked.
 
You are correct. that is the appropriate response.
I guess homeofilluminati.wealth@gmail.com was taken
 
That's what they want you to think ;-)
 
1:15 AM
ooooooo touche
 
 
1 hour later…
2:37 AM
What do you guys generally do about people trying php attacks on your site ... sutff like:
`[2014-09-30 22:36:49 +0000] [23988] [DEBUG] GET /vendor/symfony/symfony/src/Symfony/Bridge/Propel1/Form/`
any sort thing you put in place to block this sort of stuff?
 
user559633
2:55 AM
holy hell
 
user559633
@Johnston in the past, i've redirected those to a honey pot to harvest future targets for my attacks
 
user559633
but now i'm boring so i just ignore them
 
@tristan har
 
user559633
they used to make some of my best botn^h^h^h^h security audit targets
 
user559633
considering putting "most popular review of a past employer on glassdoor" on my linkedin ^__^
 
3:27 AM
Hello
I'm having an odd error with my Python script where the traceback reveals "RuntimeError: dictionary changed size during iteration"
But how is that possible? How can the dictionary size change during iteration?
Only one function can operate at a time. I am not spawning additional threads in the script. It seems improbable.
> def event_check(self):
X,Y = self.get_local_mousepos()
T = list(self.Actives.values())
J = self.Actives.items()
for key,val in J:
if X in range(val[0],val[2]) and Y in range(val[1],val[3]):
F = self.Sprites[key]
if F[2] != False:
F[2]()
Oh darn, the formatting didn't stay. Anyways. It seems to be associated with the .items() call or my use of it.
There is a striking similarity between my code and this: stackoverflow.com/questions/13519644/… post
 
cbg
 
cbg
 
why would iterating through an array of dictionaries break when trying to access the dictionary's properties?
for i in myArr:
  print(i) #shows the properties including name
  print(i.name) #breaks, no property error
 
What happens if you write:
'print(i,i.name)'
I found out why my dictionary was changing size. Well darn.
Ha. Fixed with one call. "break"
 
user559633
3:43 AM
@Owatch why was your dictionary changing size? iteration that appended a non trivial amount of items?
 
Poor code design in the end.
 
user559633
still curious. strange that you got an error too -- it was my understanding that when the hash table resized, python continued to preserve the pointers
 
user559633
actually, maybe not, that last bit doesn't make a sense for C arrays
 
Basically, I had a function that fired when a mouseclick was detected. It iterates through a list of active sprites in a dictionary called Actives to see if the mouse position is inside any of the sprites. If it is, it calls a function associated with that sprite. I had linked a sprite to a function that removes another sprite. So it did, and then an automated function removed it;s active location so it can't be clicked. Then it returned to the loop to iterate through other sprites.
But the Active dictionary had changed by then. A element had been removed. So an error occured
This was fixed by having the event function break if it ever calls the function of a sprite. This should work because there should not be two functions on one sprite. And now it won't try to iterate through a dictionary that changed.
 
user559633
neat :)
 
3:49 AM
Yeah, it's part of a simpler API I'm writing for pySDL.
 
user559633
I hadn't even heard of libSDL
 
There are already some button classes in the documentation. But it's really lacking and I know that I can probably do a better job than SDL could. So I'm busy reinventing the wheel as all programmers know they should. Next I'll write my own encryption and use it for my bank details.
 
user559633
heh. why go through this trouble?
 
user559633
project that demands it or just trying to make things less bad for others?
 
Well, there's only one source for documentation on pySDL2. And I find it difficult to understand and lacking substance. I should have mentioned it's pySDL2 since SDL2 has changed a lot since SDL. And so you can't really rely too much on older documentation to use it. I was making the API for fun TBH.
It's not worth the trouble. So I rarely work on it.
 
3:56 AM
Next question (Django)
 
The main attraction for me is that it doesn't need to use the Windows window manager like Kivy and other GUI API's do. So I can make my own borderless windows which are really neat.
 
Cannot assign "[<Team: e2323>]": "Pokemon.team" must be a "Team" instance
^ isn't that a Team instance?
 
user559633
lol like i know what your custom pokemon code looks like from a one line error message
 
team = Team.objects.filter(name=data['team'])
if not team:
    team = Team.objects.create(name=data['team'])
helpful?
 
user559633
where's the assignment? that's your filtering and doing some other jazz
 
4:00 AM
pokemon = Pokemon.objects.create(
    # jazz
    team=team
)
 
user559633
i don't know wtf Pokemon.objects does (or what's in your create pseudo-initializer), but I assume you expect team=team to associate the Pokemans to a "team?"
 
user559633
okay, probably bedtime if i'm debugging someone's cartoon animal django project. goodnight all (rb rb)
 
gnight
 
4:31 AM
hi there
can Anyone help me with Django setup
?
@SomeKittens hi
Anyone active in this ROOM :(
 
Hi @xK0nB1n ... looks like there's no-one around who can help with your Django issue right now. Sorry about that ...
 
@ZeroPiraeus hi
@ZeroPiraeus sorry for late reply :)
 
Don't worry about it :-)
 
oh thank god I found someone to talk to
I'hv been wondering for so long
So zero can U help me with Django
@ZeroPiraeus hey
 
For future reference, you're better off just asking your question rather than asking "can anyone help me with X".
 
4:45 AM
ok sorry
 
You might find this page useful: sopython.com/pages/chatroom
 
I am stucked in Django setup for windows
@ZeroPiraeus I can't run my Django postgreSQL connection..
 
Sorry to hear that, but: from the page I pointed you to - "don't use @username notification unless that user has already told you it's okay to ping them; that's like jabbing someone in the shoulder and saying "Hey! Answer me!", and will quickly mark you out as someone to be avoided".
 
OK.... I'll keep this thing in mind
 
5:10 AM
@xK0nB1n please provide some information about what is going wrong, otherwise we can't help
 
while running python manage syncdb there is a long error ..
I'm running psAdminIII
python 3.4, django 1.7
 
use dpaste.com to paste long code or errors
 
you need to install psycopg2, as the error explains it is not found
 
I have installed psycopg2, using command pip install psycopg2
I can try reinstalling
 
5:18 AM
you need to install it with extensions, which means you need a compiler available on windows
 
which compiler. I don't understand
Cpython!!
 
sorry, my standard answer to windows problems is "use linux"
 
well, I know For django, python development I should have used linux. But I already started in windows and I'm not so good with linux.
you mean this problem can't be solved in windows
 
the official site has windows builds, did you even look first?
 
yes I did
Seems I have to restart from scratch :)
 
5:56 AM
cbg(folks)
 
cbg @Peter X-(
 
@ZeroPiraeus what's wrong?
(based on the smiley)
 
Well, you didn't like the happy smiley last time ...
 
How's things?
 
5:59 AM
well, happy smileys are better than sad smileys -- this is a fact ;)
I'm okay, I guess, starting my daily routine, although I ran out of milk.. and I like my coffee with a few drops of milk.. :(
how's yourself?
 
I am in a state of psychological stability and composure which is undisturbed by experience of or exposure to emotions, pain, or other phenomena.
So, y'know, can't complain :-)
 
user3444876
Hi
 
I'm actually wondering when it is that the tags recalc happens ... got quite a few upvotes yesterday, and would like to see how much closer it got me to a gold badge.
 
cbg @GauravGhosal
 
6:08 AM
Hi @GauravGhosal 8-|
 
Anyone fancy knocking the final nail into this (primarily opinion-based) Q?
 
6:27 AM
cbg @RobertGrant
 
Crouching Salad, Hidden Cabbage.
4
 
cbg *
 
AAAsaarrghhh. I hate mutation
 
You should have stayed away from the disused chemical factory then, shouldn't you?
 
...yes
 
6:59 AM
Urgh the students are back which means that the buses are heaving again. Why can't I work at a university with no students?
 
You could always try killing all the students
 
You could organize a free trip to the disused chemical factory ...
 
Tempting...
 
hey guys a small help. I have this list called deleted_list_1 and for each p i need a list within it.. The following code just adds elements to the list deleted_list_1
for p in tree.findall('.//{' + w + '}p'):
    deleted_list_1 += [t.text for t in p.findall('.//{' + w + '}delText')]
it should be like [[p1 elements],[p2 elements],[p3....]]
 
I'm not sure what you're asking.
 
7:14 AM
and this code gives me [p1elements,p2elements,p3elements..]
 
Do you want .append instead of +=?
 
nah , it does the same thing
 
It doesn't
lst = []
lst += [1, 2, 3]
lst += [4, 5, 6]
lst
#>>> [1, 2, 3, 4, 5, 6]

lst = []
lst.append([1, 2, 3])
lst.append([4, 5, 6])
lst
#>>> [[1, 2, 3], [4, 5, 6]]
 
yeah it worked..actually appended the value to current list
sorry
:D
thanks..
 
7:33 AM
Hiya
 
Mornin' @vaultah :-)
 
Must. Not. Be. Sarcastic.
Comments so sarcastic I'll regret having typed them so I just don't.
Must control myself.
> Look i know you guys are moderators and will try to save someone of your skin but
He'll save our skin?! Oh dear lord he's got the wrong end of the stick.
Okay, ranted out, done now, thank you all for listening.
> The arguments i present can only be understood by someone who has the intellect enough to understand them
facepalm.
You DON'T SAY THAT OUT LOUD!
groans.
 
7:49 AM
.lol, makes an entertaining read :)
 
Yeah, that was fun
 
If i knew you guys werent moderators i wouldnt have wasted time to explain so much
 
yeah, poor mods need more explanations that the rest do.
well, that was good morning coffee fun
 
8:12 AM
Bug?
 
-15... lol
 
can't find that Q
could be a deletion or something
and there's only 1 Q:
1
Q: Parts of this Sentence

RicoI have the following questions regarding this sentence. To train them is my cause. What is/are the verb(s) in the sentence? My guess: train. Question: only train or to train? What is subject and predicate? My guess: subject = My cause, predicate = To train them What the type of word (n...

 
0
Q: Bug in SE Android app?

vaultahThis -15 question was asked on Meta Stack Overflow App version: 1.0.51

 
other one is a negged answer
 
See the above. I believe it's a bug.
 
8:23 AM
on meta or ELU?
the pic says ELU
how did you get that pic anyway? Are you the Rico?
 
I'm not sure I get it :D The question
Is on Meta SO
The app shows it in ELU
 
@Jerry no he just viewed Rico's profile on the app.
 
is there any good librairy to parse make files?
 
oh meta SO... I somehow read it as just meta (as in meta SE)
and ok, that's a bug then
 
I should state that I'm not Rico in my question :D
 
8:36 AM
yeah yeah :P
 
I found a super annoying bug in tkinter -- at least under GNU/Linux, I did not test under Mac but will in a few seconds
if you are accessing to the clipboard
like: root.clipboard_clear(); root.clipboard_append(text)
it will work -- however, if you quit right after these calls
text won't be copied to the clipboard
I created this workaround (dirty one):
 
@vaultah might want to put your Android version on too.
 
root.clipboard_clear()
root.clipboard_append(text)
root.after(100, root.quit)
 
I'm able to replicate it and have comment as such.
 
this is working but ugly as hell
@Ffisegydd commented on my issue?
 
8:41 AM
@Peter no was talking to vaultah
 
oh okay
 
You have way too much time on your hands. +1 :-) — Zero Piraeus 35 mins ago
@Veedrac I concur.
 
It is true
mostly because I don't do what I should be doing
 
Martijn said that Jon was close to silver "Refiner" badge (which is 50 edits) but when I run the query for Jon it only shows him as having 4...
 
Wat?
 
8:55 AM
It says I have 5 which is surprising as I'm pretty sure I've edited more than 5 questions that I've also answered (and had an upvote on, etc)
stackoverflow.com/questions/26137222/… no code to work with :( shame as I'd like to have a go at it.
 
if anyone uses XFCE4 and its appfinder, may find this mini-snippet useful: gist.github.com/petervaro/030b6ef2f4e1199576b5
 
XFCE4NOOBZ
 
I can't reproduce that bug anymore...
 
@vaultah Have you tried turning it... erm.. on then off again?
 
9:05 AM
echo cbg
@PeterVaro You know what would be cool?
Hooking your script into SymPy
 
@Martijn for some reason when I run Jon's query for the badge it shows he has a count of 4, but you mentioned earlier that he was close to the Refiner which is 50.
 
@Ffisegydd let me re-check what I did.
 
@Veedrac I don't use SymPy, but you can do that -- as you can see, it is quite lightweight
very easy to add sympy functionality
 
@Ffisegydd: that's not Jon's user id.
That is Peter Varo! :-P
 
Ah ok :P
 
9:09 AM
erm, not sure what that link is doing.
 
Alas I am only on 5. Thought I would be on more than that but never mind.
 
from sympy.parsing.sympy_parser import parse_expr
parse_expr("sqrt(32)")
#>>> 4*sqrt(2)
parse_expr("sqrt(32)").evalf()
#>>> 5.65685424949238
 
Someone downvoted my question.... why..?
:(
 
@Veedrac self-answer envy
 
9:17 AM
@Veedrac I was wondering about that too.
 
Happened to both of my self-answered posts too.
There are, sadly, still people with 125+ points that don't know that that is encouraged.
 
Well, not always
 
@Veedrac nice followup, by the way ... I wasn't going to do the maths, but I had considered amplifying my answer to the original question to talk a little more about insertion/iteration order and collisions, since it's clear a lot of people don't get it ... for example: stackoverflow.com/questions/26115765/…
Decidided the answer was already unwieldy enough though.
 
And I didn't vote on @veedrac's post
> the hash values(?) of strings, bytes and datetimes are randomized
 
Are @Zero and @Veedrac friends again now? :p
cbg @Martijn and @vaultah
 
9:28 AM
cbg
 
@JonClements Never!
Also cbg
 
Or "hash value of strings, bytes and datetimes are randomized" is acceptable?
 
I don't have friends. I'm too dark and moody
@vaultah I think it should be plural
 
@Veedrac now it contains everything from math you can easily expand it with sympy
 
@JonClements My admration and respect for @Veedrac are impossible to put into words :-)
 
9:30 AM
@Zero in other words, you think @Veedrac is cabbage ?
 
Carabbaggio!
 
@ZeroPiraeus Don't go too far or you might open my heart.
We wouldn't want to go all Disney
 
@Zero is my edit correct?
 
news.slashdot.org/story/14/10/01/011235/… Oh Cameron...you truly are a top-class pr***.
 
cbg
I'm getting this error: FloatingPointError: overflow encountered in double_scalars
c = beta[j,i] + oneminusbeta[j,i]
but when i print out the values, this is all i get:
beta: -131.340389182
oneminusbeta: 0.0
and this is how i initialized the arrays:
beta = np.empty([m,n])
oneminusbeta = np.empty([m,n])
 
9:33 AM
@Ffisegydd what? I was taught in both
 
on this line:
 
@vaultah Seems fine to me ... that paragraph ended up being a collaborative effort between me and @Veedrac, so I imagine the error is his ;-)
 
@ZeroPiraeus That sounds like an assertion I need to prove wrong
 
@Ffisegydd used metric in physics and stuff, maths covered conversion such as how many square meters is a hectare etc... Woodwork and cooking were imperial and metric...
 
any ideas about the "FloatingPointError"?
 
9:35 AM
@user961627 your issue is possibly that you're using np.empty
np.empty will create the array but not initialise any of the values, so they could be pretty much anything
 
oh! then do you suggest zeros?
but i've actually already run this loop twice before
so all the values were populated
this crash happened in the second or third iteration
 
Ah so you have populated the values? You should say things like this :)
This is why we ask people to provide MWEs.
 
ok :)
 
A man should take care on whose shoulders he stands, evidently ;-)
 
9:38 AM
@Veedrac errr... West life!
 
what even are double scalars? This is my full question: stackoverflow.com/questions/26124464/…
 
Scalars are just single numbers, like "12"
possibly with units
 
or is it maybe something unimportant that i could do without? I've set up this line: np.seterr(invalid='raise', over ='raise', under='raise')
 
Why have you used np.seterr?
 
@Ffisegydd Wouldn't you?
 
9:42 AM
@Veedrac I've never had to use it before, that's why I was asking.
 
I've used it because it's a really loong calculation which includes exponents and things
and so it crashed on and off, so in order to see exactly what calculation was causing the crash, I used np.seterr
it's supposed to raise an error exactly when there's an overflow, underflow, or "invalid", i.e. NaN detected
so I know what line to fix
 
Ah fair enough.
It was not a case of "Oh you shouldn't be doing this!" but more curiosity as to why.
@Veedrac the default dtype is float
 
@Ffisegydd Yes, but the dtypes of numbers can change depending on what operations you do
 
10:08 AM
bbiab - mid week shopping... need to replenish bacon supplies!
 
10:33 AM
@MartijnPieters using xpath gives this
 
@Swordy and what's in w then?
Why not just use prefixes anyway?
 
ahh damn me
 
The xpath() method supports a namespaces argument to supply a mapping.
 
how could i forget that
doesn't it work with './/{' + w etc?
 
@Swordy depends on what you have in w..
 
10:47 AM
'.//w:p' and './/{' + w + '}p' are equivalent?
@MartijnPieters here's a sample
<w:ins w:id="44" w:author="Author"><w:r w:rsidR="00832992"><w:rPr><w:lang w:eastAsia="ja-JP"/></w:rPr><w:t>provide</w:t></w:r></w:ins><w:r w:rsidR="00D754F4"><w:rPr><w:rFonts w:hint="eastAsia"/><w:lang w:eastAsia="ja-JP"/></w:rPr><w:t xml:space="preserve"> appropriate examples for these activities.</w:t></w:r></w:p>
 
There is no text directly in the ins tag.
 
the word provide is the text
 
use xpath("//text()") to get all text nodes in a list.
Yes, I understood that, but it is not a child node of <ins>. It is a child node of a child node.
 
i just need ones that are within ins (indirectly)
yeah.. should i add an extra .// ?
 
prolly, sorry.
 
10:57 AM
@MartijnPieters thanks , i finally got it by using:
inserted_list_1.append([t for t in p.xpath('./w:ins//text()',namespaces={'w': w})])
could you add this in ur answer so that it would look completed.
 
That .append looks a bit sus. Even if it is right, that t for t isn't needed
 
actually i want a list of lists
hence append
so just p.xpath?
 
@Swordy yeah... .xpath returns a list
you're just building another list from a list unncessarily
 
inserted_list_1.append(p.xpath('./w:ins//text()',namespaces={'w': w}))
 

« first day (1446 days earlier)      last day (3496 days later) »