« first day (1851 days earlier)      last day (3321 days later) » 

20:00
@wim what's the target?
wim
wim
i'm not talking about dupe hammer
What about it ? — davidism 10 secs ago
wim
wim
I wish I could ban these annoying types of questions
If you can shorten f, I'll be super impressed.
Ah I see what you meant :P
wim
wim
heh. thanks
DSM
DSM
@MorganThrapp: can make ' '.join(x) for x in into map(' '.join,[(str etc., which saves a few.
@MorganThrapp: am I right in thinking that b is constant?
Oh, nice. Yeah.
DSM
DSM
b={z,E,F,I,J} and then while b&set(u):
Oh cool. I always forget about sets.
20:11
Could I describe a program I'm hoping to make, and you guys give me a quick run down on the steps that need to be taken? I'm lost on where to start and do, and I'd appreciate the help.
Depends on how difficult it is ;-)
Describe your program, and let the winds of chaos determine how the room reacts.
You must first invent the universe.
Haha, alright. So basically I'd like to host it on a server of mine, though at 8:03 AM (CST) every day, I'd like it to sign me in to a specific website. From there, it'd look for a certain group of text; and if it's not there, it'd try it again within a minute. Once the text is there, it'd select it; like a mouse clicking on a hyperlink. I don't know if this makes sense on it's own, though this is what I'm hoping to accomplish.
Our advice is MIT licensed too, so we're off the hook if it solves a totally different problem.
20:15
@QuestionC what if it solves no problem at all?
I was with you up until "select". Emulating an actual web browser is a fair amount harder than just fetching html data
@AdamSmith NO WARRANTY REAL OR IMPLIED
Additional complications: if the text is populated using javascript, it becomes double plus hard to detect
@Saroekin I'm not sure what you mean by "select it"
so far it looks like you write a script that runs via cronjob
Yeah I'm not sure on how to click on a link with an application; I've looked around though haven't found any working answers.
20:17
the script issues a request to a website and reads the response
So... this is like a program that plays cookie clicker for you or something?
By "select," I mean as if a mouse was left clicking on a link.
if the response has what you need....now what? I don't know what it means to "select" something in that context
If at all possible, examine the source of the page to determine what happens behind the scenes when the link is clicked. Ex. If it sends a GET request, then don't bother emulating the clicking action, just send the GET request yourself.
No it's not, I'm going to use it for school.
20:18
when you left click on a link, you issue a GET request to the target link
is the text just text? Or is it a button?
Not all links; some <a> elements might just have an onclick event that fires off some local javascript, for example.
hrm true
@Saroekin is it possible to share the website? Or at least a screenshot or SOMETHING so we can look at what you mean, rather than have you try to describe it?
@Saroekin Perhaps you want Selenium. I've never used it myself.
The problem, as described, is incredibly difficult. Actually reading the screen and clicking the mouse are both really hard.
@AdamSmith Yes I'll take some screenshots, thanks again for the help.
20:21
Extra hard if it's being run on a server that doesn't have a screen.
If you can just curl the webpage and follow a link, then yea it's easy.
@QuestionC Yes I'm fairly certain I could do it that way, I just didn't know how else to describe it.
user559633
My advice is WTFPL licensed.
user559633
Unless you end up making money as a result of it, in which case it becomes "buy me a beer" licensed.
DSM
DSM
20:24
@MorganThrapp: k=lambda x:[x[0],x][type(x)is str], then e=list(map(k,n)) and k(x) in the print saves 12 or so.
That's the license I use in my heart. I don't put it on my Github projects because I want to keep 'em PG.
user559633
A bit of coarse language doesn't hurt anyone.
If someone uses less than a hundred lines of code of mine for non-evil purposes, I will almost certainly not sue them.
(pasting my code directly into your homework assignment without attribution counts as evil)
user559633
My lawyer plays mostly defense.
DSM
DSM
@MorganThrapp: but I suspect that a change in data structure could remove all the parentheses from f (at the cost of maybe introducing some extra brackets elsewhere).
user559633
20:26
I demand to be attributed as: Tristan "1995 Seattle Supersonics NBA All-Star Power Forward Shawn 'Reign Man' Kemp" Gunhammer
DSM
DSM
Wouldn't have taken you for a Sonics fan!
user559633
They're my favorite baseball team.
Each line must be annotated with #written by Kevin 'Starlord' Kevinson, first of his name, King in the North, may he live a thousand years
@DSM I originally had the decaying particles as classes with those chunks being instance attributes.
DSM
DSM
@tristan: you can't fool me with that, not after you've dropped a Kemp reference. :-)
20:28
@Kevin Haha, that'd be perfect.
user559633
@DSM Me IRL. I like so many sports that if you met me, you'd say "whoa, that guy likes his sports"
Here are the images I'm working with:
user559633
Link them, don't inline them.
user559633
Thank you :)
20:30
I did, I didn't mean to hit enter for my last message; therefore, I didn't finish gathering the links and submitting at once, haha.
And yeah, thanks.
DSM
DSM
I've arranged my office pretty well. I can talk to guy #1 about football and basketball, guy #2 about hockey and college football and baseball, guy #3 about hockey and soccer and rugby, and guy #4 about soccer and cricket (if I understood anything he ever said).
user559633
No worries, just figured that I'd suggest it before saying "UGH why can't you read my mind"
DSM
DSM
@MorganThrapp: wait, did it just go up?
user559633
@DSM Haha same, except I work from home and don't socialize.
@DSM Yeah, my original solution was duplicating Higgs Boson. So it would print The universe contains 4 Higgs boson and 4 Higgs boson.
Your hints made it less of an increase.
20:33
So yes, in relation to the images, I'm hoping to sign me into the designated website, and select one of the blue links in the second picture to sign me up for a certain class that day, everyday.
*myself, not me; haha.
I did something very similar to this in node. It was fairly straight forward in node. Python, I would probably stick with Selenium as it is the only thing that comes to mind.
Selenium describes itself as a 'robot browser' so it definitely should be capable of the thing you want
user559633
It browses robots?
Hmm, I'll look into node sometime; though Selenium is starting to sound promising.
@tristan Uh. I don't think it browses robots, although maybe it should be called a 'browser robot' for semantic clarity
user559633
20:38
@JeremyKemball I'm just being a jerk
user559633
Sweet of you to respond
DSM
DSM
Belated lunchtime.
Selenium could definitely do it, but my understanding is that it's a rather extensive framework
there is phantompy
which is a headless webkit engine
what does the link do? What's it doing?
20:41
@tristan I am just a green bean wrestling with loneliness and I/O streams
does it run some javascript?
does it send a POST?
etc
Adam brings up a good point...if you can find out if there are GET, POST calls being made
you can avoid the navigation and just make those calls yourself
I think this was mentioned earlier?
user559633
@JeremyKemball all of human life is I/O
user559633
i think it's just browser driving with a session tbh. definitely tutorial territory :)
(still haven't seen a question asked by VinodPrime btw :P)
20:45
Waiting with batted keyboards.
The link is sending a message towards the server, and entering my name for the link or "class" I selected. At least, that's what I suspect.
@Ffisegydd "baited" may be apropos here, but I think the term you're looking for is bated
@Saroekin can you right-click the link, click "Copy Target URL", and paste it here?
Sure, one sec.
user559633
Alembic migrations and pathing are making me sad. alembic revision --autogenerate == just fine. alembic upgrade head == barfs everywhere due to one of my imports
20:47
@AdamSmith This is the target link:

https://[fill]/Home_Student.aspx#
I never got the hang on alembic
oh yeah, definitely need selenium then :D
Haha, okay gotcha. I'll look into the framework, what did the link tell?
That it didn't look like https://.../classes/<some_id>/register?name=saroekin&pass=hunter2
so it's not a POST
it's running some ASP.NET script
which isn't really inspectable
@Saroekin start here, and then look up some examples: selenium-python.readthedocs.org
should be able to easily get the hang of how it works, then it's a matter of figuring out what it is you have to select on in the site you are looking to navigate
@idjaw @AdamSmith Awesome, thanks for the help guys (everyone). I'll start researching into the API.
20:53
cheers. Good luck!
21:33
So I'm dealing with an issue with a piece of software I use (basically just a GUI wrapper around a SQL database with a bit of reporting attached) where changes I make will appear to have been committed, I can report on them, but some time later they disappear
It's frustrating as all Hell.
is someone just replacing your sql file?
db.commit() ?
is it the software i wrote years ago which sucks horribly
@JoranBeasley I mean, if you're volunteering for blame duty...
I'm not sure what the bug is
that's my guess as well -- for some reason the session doesn't commit
so when I query for a report it appears like it was accepted, but only because I'm grabbing session data
and as soon as I close the program, it's rolled back
but I'm not sure that's the case. Nothing tips me off that "This data isn't saved" until someone complains about it two weeks later
and I go back and cover my ass by checking the report I ran "See! Look! It's there!" But then I view the live data and it's not.
Can you at least save the query?
I think so? I know there's a function that's supposed to do that. I'm assuming it works ;)
but saving the query doesn't do much good. I can requery with the same prompt and get different data
since That Which Once Was There is now gone
Oh...maybe drop to a new table? Although that seems like a waste. I guess it might not be committed either...
21:49
@AdamSmith I feel like that's a Led Zeppelin lyric.
No way to do that. I'm strictly end-user on this :P
I'm really just complaining
I need a way to be able to say "Yes, this is absolutely entered and ready to go"
I used to do that through reporting on the data after I submitted it
Don't ever close it again...:D
but in the last three months we've had this happen four or five times
even though my report shows the data
I think my best bet is to commit, close the program, re-open the program (presumably starting a fresh session), and report then
This isn't related to your outdated hardware right? :p
Not in this case! :)
ooh we're upgrading though! Pilot program started and 10 units (of the ~100 we have in service) are on the way
upgrading from 1GB RAM -> 8GB RAM
lol
21:53
Are you still reliant on the system running DOS though? (I believe it was..)
yep
Win95
That whole situation confuses me on many levels
but close enough
Err wait 98
if it ain't broke
erm, well in this case it's more like even if it breaks...
That was part of the software stack that we're trying to get replaced that I had the meeting about yesterday
Well that's something at least...
I've had enough headaches for today. Rbrb
rhubarb @Programmer
21:59
what software is it?
is it custom? or some product?
some product
does it start with an A? or a D?
Neither! It starts with a "P". The company name does too :P
Part of our POS suite. Manages pricing details
Actually one of the more solid pieces of software in their stack
this is one of only three or four problems I've had with it in the last two years
phew its not my fault for sure then :P
that sounds scarily like some software I wrote as an undergrad intern that is still around :P
haha
Software dev says we need to update
latest version is 11.1.3.4
They get us the installer and instructions
we ended up being too busy to upgrade yesterday and weren't going to have time until Thursday
22:09
It had to do with trying to encrypt a database and maintain checksums to make sqlite3 encrypted (cause for some reason it was too hard for me to build the encrypted version of sqlite3) and they often get out of sync and it helpfully rolls back to the latest known good state
Our support rep emails us all Priority: Important at 5am this morning
>Good morning,

>If you haven’t already installed the upgrade please don’t. I will send you 11.1.1.1. The one we sent was just released and we have found some issues where we would prefer you install 11.1.1.1.
That's not a red flag, right?
meh it happens
the one thing that you didnt test is the one thing thats broken (its always just the one thing)
never two things
test everything
lol
22:12
The Oatmeal just got me right in the feels
Just noticed I had three copies of the Python34 REPL open
one of them had the following code:
>>> True
True
>>>
Just checking.
(I have no idea when or why I opened that. I'm pretty sure I wasn't wondering if True had become False)
DSM
DSM
How long has that window been open? Didn't we have this conversation about a year ago? :-)
We did talk about rebinding True and False in Python2
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> False, True = True, False
>>> False
True
>>> True
False
@thefourtheye Great!
isn't there also a way to rebind the builtin small numbers too?
22:19
not that I'm aware of
1 = 2 fails :P
I can't remember how to actually do it, came across an article on it once and how the interpreter behaves hilariously if 0 is redefined to 1.
DSM
DSM
I vaguely remember something like that but not in Python.
hello, does anybody here know of matplotlib and there animation like a moving ellipse or other patch item?
I think the trick might need to be done at the C level
Maybe by overriding 1.__str__ or 1.__repr__?
DSM
DSM
22:22
Don't think you can. Guess you could modify the C, but I don't think you can do it at Python level.
stackoverflow.com/feeds/question/33635967 - here I described the problem ...
I wish I bookmarked that page.
aww, str and repr are read-only
DSM
DSM
@kampmannpeine: instead of returning e1 in init and animateEllipse, try returning [e1] instead (a list containing an ellipse) so that the return value is iterable.
sounds well, I will try it ...
@DSM: tnx
@DSM - that was it ... gorgeous! anyway: I do not quite understand this, becaus "e1" is an instance of something ... what kind of syntax is this?
DSM
DSM
22:32
Gern.. anyway, [e1] is just the ordinary list syntax, like somelist = [1,2,3] or vowels = ['a','e','i','o','u']. It's just here the list only has one element, and that element is an Ellipse.
22:42
@DSM: OK, I got that - btw: are you familiar with Digital Equipment MUMPS ?? the acronym for that used to be DSM
@kampmannpeine You're giving me chills
a) MUMPS
DSM
DSM
@kampmannpeine: nope, never heard of it-- usually I think of the psychiatric manual.
b) digital equipment mumps -> DSM ????
Hmmmm DSM -> Damn! Software Mollusks!
DSM
DSM
22:46
Rhubarb for all.
yes Digital Equipment was founded by Ken Olsen in the 1970-ies and was abandoned in 1998, lately bought by HP (e.g. the VAX and Alpha processors have been developed by DEC = Digital Equipment Corporation) ... was a super company ...
hey does anyone here know how to extract cookies from firefox using python?
@DonyorM Blackmail
MUMPS here is not a disease :) ... has to do with Massachusets Universal Medical Processing System (I guess)
@AdamSmith lol. However, I've heard that the blackmail library got into some legal implications
22:48
@kampmannpeine a legendarily difficult and awful programming language
you are right, but it was super effective and fast .. however by no way OO ... :) :)
and there was a data base included ...
@DonyorM from blackmail import threatening_note, deaddrop_location, co_conspirators
well, good nigth from Germany --- it is bedtime (LOL)
try:
    threatening_note(content="We need your cookies",
                     target=webbrowser.get('firefox'),
                     demand="cookies",
                     location=deaddrop_location)
except IllegalOperationError:
    co_conspirators.getaway()
user559633
if you used finally, your co_conspirators would have gotten away, even if your threatening_note failed
23:05
Why split the money more ways than I need to?
user559633
Because you'd bubble up the stack and your remains would be discarded the way you currently have it coded
user559633
@QuestionC hello fellow kids, does anyone have any more of those drugs that we all like so much?
> hello fellow youth
user559633
nice
user559633
23:40
heya @AaronHall
user559633
23:52
i wish there was a way on stackoverflow similar to flags that allowed for positive feedback
Hi, can you guys take a look to this problem? stackoverflow.com/questions/33631652/…

« first day (1851 days earlier)      last day (3321 days later) »