« first day (1829 days earlier)      last day (3343 days later) » 

01:15
Well I'm having a night of the stupids
02:13
What is the fastest way to plot a large matrix in Python?
@davidism Usually I include a comment that they shouldn't just dump their pile of code onto SO. Forgot it this time.
Is anyone here familiar with scipy.optimize.curve_fit?
03:19
Cabbage
 
2 hours later…
05:27
Hi ! How to check if a string is decimal in python ? I used the method isdigit() to the object after converting it to unicode. But still it is not giving me the correct output ?
>>> var1 = "123.45"
>>> var1.isdecimal()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'str' object has no attribute 'isdecimal'
>>> var1=unicode(var1, "utf-8")
>>> var1.isdecimal()
False
>>> str1=u"123.45"
>>> str1.isdecimal()
False
>>> str1=u'123.45'
>>> str1.isdecimal()
False
05:38
@psychoCoder The usual approach is to just assume that the string is a legal decimal and attempt to convert it to a float, catching the exception if it isn't. This is called "Easier to ask for forgiveness than permission". See EAFP in the Glossary. I'll post some code in a minute.
for v in ("123.45", "kitten"):
    try:
        a = float(v)
    except ValueError:
        a = None
    print a
What do you mean by a decimal? You mean a valid floating point number, but not an integer?
output
123.45
None
@TigerhawkT3 Yes I mean a valid floating point number
Eg : 123.45 , 122.00 but not -2 , 5
@PM2Ring Okay I understand. But when is this attribute of a unicode object isdecimal() used then.
In that case, you'll have to check whether '.' in var1, then, if that passes, try with float as PM says.
Or I can use the split(.) function to get a list and then check the length of the returned list.
Which one would be cheap ?
05:45
If the goal is finding out whether a string contains a substring, use in.
@psychoCoder You could, but if '.' in s: is simpler & more efficient than using .split().
Ohh yeah! Right (y)
What do you want to do with numbers in scientific notation, eg 1.2E3 and 5e2? Technically, both of those are floats. I.e., they can be converted to float, but will raise ValueError if you pass them to int().
The following code will handle numbers in scientific notation. But rather than doing 3 scans on the string to see if it contains a ., e or E, we use set intersection:
data = ('123.45', 'kitten', '122.00', '-2', '5', '3E2', '6.2e4')
edot = frozenset('.Ee')
for s in data:
    try:
        if edot & set(s):
            a = (float(s), 'float')
        else:
            a = (int(s), 'int')
    except ValueError:
        a = (s, 'not a number')
    print a
output
(123.45, 'float')
('kitten', 'not a number')
(122.0, 'float')
(-2, 'int')
(5, 'int')
(300.0, 'float')
(62000.0, 'float')
Alternatively, we can write that test as
`if edot.intersection(s):`
The long form will automatically convert the arg of `.intersection()` to a set, the short form doesn't, in order to minimize coding errors.
06:03
@PM2Ring set(s) will still scan the complete string. Try edot.intersection(s) instead...
@JonClements Interesting. I assumed that edot.intersection(s) converts s to a set, but I guess it doesn't need to. But doesn't it still need to scan every element of s to compute the intersection?
@PM2Ring it does... just doesn't need to convert to a set first
@JonClements Rightio. I shall bear that in mind. :)
I'd probably also go for something like:
for s in data:
    for T in (int, float):
        try:
            return T(s), T.__name__
        except ValueError:
            pass
    return s, 'not a number'
06:10
So the above should read: The long form can take any iterable as the arg of .intersection(). And that also applies to union(), difference(), and symmetric_difference(), issubset(), and issuperset(). See set in the docs.
@PM2Ring heck - even use ast.literal_eval if you really wanted
@JonClements I guess that's the simplest way, if we don't have to handle strings that aren't valid numbers. And if we do need to handle such strings, we can keep the try: ... except ValueError: stuff.
Hi, idjaw.
07:15
Hey up all
hi all
how to host a python script as a web service
anybody please?
@Sajeetharan you've asked an extremely broad, and quite possibly unanswerable, question.
You don't need to say "anybody please?"
Anyone who is here will have read your question, if they've chosen not to answer then that's their business.
I'd suggest you instead ask a specific question that people can actually answer.
You need to provide actual detail of what you want.
07:31
@Ffisegydd i have created a web service in python for accessign data with biquery, when i runs locally it gets hosted in port 8080, i want to host the same service in the server and provide as api for the front end developers. i have hosted dot net web services in iis, but no idea on how to host python script as a service! if any help would be appreciated
Okay, now you've asked an actual question that people (not me, as I don't have the time) can answer.
cbg @HieuNguyen
conf-cbg from pycon-fi
07:51
:o
08:20
heh, it turns out that SO does not allow the word 'problem' in the question title.
cbg
Cabbage!
@AnttiHaapala is it in F-Secure building?
or, actually, next to it, the same office-center.
used to work there.
until the *#$%ers sold us to Synchronoss :/
08:36
Cbg :)
Is "cbg"/"cabbage" the SOP version of "ni"? Or "mine mine mine"?
08:51
We are the knights who say 'cabbage'.
Sounds good.
@TigerhawkT3 enjoying your hard earned gold badge? :p
09:12
Very much so.
Now I have to swing my hammer faster than the western guns.
@TigerhawkT3 Funny you should mention that. I've just been writing an answer to: How to deal with unclear questions and their lightning-fast (“fastest gun in the west”) answers?
I must admit, I did a lot of gunslinging, but my goal was to unlock the hammer.
Melee weapons OP.
I must admit it'd be nice to have the hammer. OTOH, who needs weapons when you have friends with weapons. :)
09:31
@PM2Ring everything's eventual :p
Ahh... forgotten it was a King book :p - I just mean it'll come in it's own time :p
I guess so, I'll probably hit 10k before then. Although at the current rate that decent questions are coming in, that might take some time, too.
09:49
@Ffisegydd Gutted.
Although, unlike many of my countrymen I support any and all of the home nations. My brother is in Australia and the Aussies are probably going to make his life nightmarish.
I gotta work on my hammer speed - just closed a question that had been open for a whopping 4 minutes... but had answers within 2 minutes.
Correction, it was 4 minutes old by the time I loaded new questions, then I took another couple minutes to find a good dup.
Well - finding a good dupe is the main thing... if it happens to acquire answers while you find one - so be it
What Jon said. Ideally, all answers to dupes should be concentrated on the dupe target page. So in a sense, people who write answers to dupes penalize themselves by having their answers scattered all over the place. But in practice, there's often not a single clear dupe target, so some amount of answer diffusion is inevitable.
10:07
cbg JRS
On the question I closed, the OP commented on one answer saying he was going to accept it, then saw one he liked more, deleted his comment, and accepted the other one. Ah, la asker e mobile.
OTOH, there is some personal benefit to having your answer on a dupe page, rather than on the main page: you've got a better chance of earning votes, and possibly even a accept.
Oh, there's no question: if you want rep, you answer that dup and you answer it hard.
Hmmm... I wonder how this would go down: block accepts on questions that have been locked as dupes. :evil grin:
Cbg jon. Brief writing hiatus as it's wife's birthday and I'm collecting comments after completing a draft over a looooong weekend...
10:09
Eh, it would just be more time to race. Too late to prevent an answer and its upvotes? Maybe there's time to prevent an accept! Probably not too much benefit. I admit though, it'd be funny.
@JRichardSnape I just realized that I never got around to working on that inclusion-exclusion problem again
@JRichardSnape Ok, that sounds like a valid excuse. But shouldn't you be with your wife, celebrating? :)
And it seems like I don't even really care anymore :/
I've had a meta thread about rewarding administrative actions in a "compose" box for a couple weeks now. Insufficient confidence to click "Post Your Question."
10:15
Call of the hammer: answered.
@TigerhawkT3 Wow. And I thought I was slow composing Meta posts. :) I advise to not worry too much: you can't win or lose rep, and even if you get a ton of negative votes it (probably) just means people disagree, not that it's a bad question. Of course, you should first ensure that it's not a dupe. :)
Why do some people consider Python slow ?
Because it is slow compared to more-native programs.
Oh, I composed it quickly, I just haven't posted it.
The question isn't whether Python is slow, the question is whether it's too slow for your needs at hand.
What do you mean by more-native languages ?
10:22
C, C++, Java, etc.
Not Java.
@DarshanChaudhary Because standard Python (aka CPython) is considerably slower than a program that's compiled to machine code. And it's slower than using a JIT compiler, like Java. Some implementations of Python use JIT, but even then they aren't that fast, since there are unavoidable overheads involved in the object model of Python. Eg, Python integers are immutable objects, so doing arithmetic on them is, by necessity, slower than doing arithmetic on native numerical types.
Isn't Java faster?
@TigerhawkT3 "Call of the hammer" - umm... not heard that before :)
more-native means that they compile to a level that is closer to machine code.
10:23
I am processing some data for a project and the program is painfully slow. It's almost as if I can do it by hand faster.
@TigerhawkT3 Not necessarily.
(Ie - no bytecode)
@DarshanChaudhary Then analyse for bottlenecks. If need be, you can write that part in C and call it from Python
I remember hearing consistently that Java was faster than Python.
Not that that'll convince me to use it.
Mind looking at some code and suggesting ?
@DarshanChaudhary Depending on the task, you may be able to speed that up with a better algorithm, or by using a library that can do some of the slow stuff at C speed.
10:24
I am using the scipy stack, so the speed is suppose to be at the maximum theoretical limit, no ?
It still depends on how you do it.
@DarshanChaudhary Ok. If you're already using scipy then you may not be able to get much of a speedup, unless your algorithm is doing something dumb. :)
I am being prudent with my commands, nothing dumb really.
I could use a Hennessey Venom GT, but if I drive backwards, through mud and with no tires, I suspect that I could still be outpaced by a Reliant Robin.
10:26
I heard PyPy will make python faster ?
import numpy # yay, scipy stack!
for _ in range(10**1000):
    pass
^ is still slow :P
@DarshanChaudhary How much code are you talking about? Can you give us a rough sketch of what your program does?
Yes, I have the time series measurements of patients vitals when they are in ICU
There are 3800 patients and each patient has about 30 variables
@pm2 taking her out for lunch now :) She's grateful for your concern ;)
Which are measured at random intervals.
10:29
Are you threading perchance?
@JRichardSnape Excellent. Wish her "Happy Birthday" for me.
No, not threading. I heard Python does not support threading ?
@poke What is the solution ?
Python supports threading, and multiprocessing. The former is limited by the global interpreter lock which makes threading not really useful for high-CPU-bound tasks, but multiprocessing is fine for that to spread the work onto multiple physical processors.
Yes and no. It doesn't support threading in the "traditional sense" of threading (see Python's Global Interpreter Lock), but you can use the multiprocessing module to get some better performance depending on your solution...
Damnit poke!
:)
10:33
@bereal yeap, and a f-secure guy speaking now
@DarshanChaudhary Take a look at Multiprocessing vs Threading Python; note that the accepted answer is not the highest scoring answer.
But when you say 'slow', do you mean that you need better guaranteed minimum response times? Because if that's the case, then you might need to be looking at using a RTOS
@bereal and no bereal here...
I'll check the solutions. Thanks ! Namaste.
@DarshanChaudhary Is this doing real-time analysis of ICU patient data?
10:36
Yes. Predicting mortality
Have you considered using Pandas? I know almost nothing about Pandas, but I figured it may be relevant, and some of the SO Python regulars do know a bit about it...
I have used Pandas to load data and read it.
Will dwell on the suggestion
I have created a web service in python for accessing data with bi query, when i runs locally it gets hosted in port 8080, i want to host the same service in the server and provide as API for the front end developers. i have hosted dot net web services in IIS, but no idea on how to host python script as a service! if any help would be appreciated.

This is how i am accessing the web service when running
nose.proxy.AssertionError: Lists differ: [<Alarm.CRITICAL_LOW_LIMIT: 32>] != [<Alarm.CRITICAL_LOW_LIMIT: 32>] . Little test, why are you failing?
The little test is tired of running, so it's falling. *failing :P
10:55
@Sajeetharan Sorry. I thought I'd seen that question on the main site. But maybe it's just that you mentioned it in here recently.
Little test can get it's stuff together until it forms a union.
@AnttiHaapala yep, I'm not there.
Sandboxed Execution Environment, yeah, that rings a bell.
luckily they'll have recordings this year
so I do not have to follow :D
AAB
AAB
Hi everyone
11:07
@idjaw I saw your dup suggestion but cannot act on it because I have no idea what that asker is doing with that code. Maybe I'll VTC as unclear?
AAB
AAB
Hi @bereal
@AAB hi
@TigerhawkT3 Actually I'm glad you didn't. After I re-read realized it was a slightly different problem. I flagged it because yesterday similar questions to that came up. No need to take action. Thanks.
Sounds good.
11:23
Can global variable declated as self in init function?
@user123 I am not sure what you're asking exactly, but the answer is very probably "no".
It sounds like you want a reference to have two scopes, which I hope isn't possible.
sounds XY-ish to me
okay
functions are not inside class, which I was trying to put withing class
11:29
Hackaholic the nympy-maniac is at it again... stackoverflow.com/a/33213144/4014959
but confused what to do with variable which are declared with global scope
@user123 that really depends, you may either leave them as they are or make them attributes (which I'd prefer).
CBG all
I have a problem case two python script must take the same file as input process different lines
@bereal thanks, keeping them as usual works fine, then I am fine
How to do this should I be adding a status to the text file
11:32
Oops, I forgot, there should be a on stackoverflow.com/a/33213144/4014959
@bereal in that can where should I place the variable declaration for
pos = MyDict()
neg = MyDict()
features = set()
totals = [0, 0]
delchars = ''.join(c for c in map(chr, range(128)) if not c.isalnum())
MyDict
is class name
"SO is not a code writing service" - question answered by two code writers
@TigerhawkT3 They're both chronic repeat offenders.
Maybe they're clawing for points so they can get a hammer. I did a bit of clawing myself.
@user123 that's quite broad... actually, if you keep them global, they will be re-used between class instances, is that what you want?
11:37
@TigerhawkT3 Perhaps. But neither of them have the time to look for dupe targets - they're too busy writing answers. :)
@VigneshKalai What's the problem? Multiple programs can get read access to the same file simultaneously on any sane filesystem / OS. And quite a few not-so-sane ones. :)
@PM2Ring they should not read the same line
Answers can get you rep. Looking for dupe targets cannot. Maybe they'll become better SO custodians once they get hammers (emphasis on maybe).
@VigneshKalai So how do you want to decide on which script reads a given line?
11:40
@bereal I didnt get you
If I declare variables globally, then can I use them inside functions of class?
For i.e.) three python scripts 1 2 3 a .txt file with three lines python script 1 will be processing one line like wise others will be processing different line
@user123 yes you can. The same way.
@PM2Ring they are same scripts it does not matter which line they process it only matters they process unique lines
I am trying to do this for load balancing
@bereal thanks, it helped
12:01
@VigneshKalai Sorry, I got distracted by Antti's ujson link. :) Just pass a couple of command-line args to each of your scripts: eg the total number of scripts, and this script's number. Let's call them total_num and my_num. Then:
with open(fname) as f:
    for i, line in enumerate(f):
        if i % total_num == my_num:
            process(line)
@PM2Ring actually I thought of that but still load balancing would not be efficient since the processing time of each line would vary i.e)line 1 would take 10 minutes line 2 would take 3 minutes like wise
If I am unable to find any other way I would be doing this only @PM2Ring :)
*inefficient me and my stupid hand :P
@VigneshKalai You could have mentioned that earlier... Anyway, writing the status to the input file is not a good idea, since it means that each script needs write access to the file.
However, each script can generate its own log of the lines it has processed, and the line it's currently processing. And each script can safely read the logs of all the other scripts. Unfortunately, even doing that it's still tricky to avoid race conditions. Do you have any way of getting a rough estimate of how long it will take to process a given line?
good morning all
10 seconds to 4 minutes for a line.I was trying to mention that in the begging itself but I think I was not clear there :P
12:27
im trying to scrape data from a website. after login, it shows me some folders thru which i need to navigate. On hovering on folder i see javascript:__doPOstBack('5',''). I am trying to build a query to access the page but unable to navigate...
http_req = urllib2.Request(url='http://43.228.176.134/download.aspx', headers={'Cookie': cookie}, data=urllib.urlencode(query))
webpage = urllib2.urlopen(http_req)
@VigneshKalai Ok. But can you quickly scan the file and estimate the time that each line will take? If you can do that, then you can split the file into separate files that should take roughly equal time.
it hits this breakpoint with eventTArgetvalue=5
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
@VigneshKalai you may also want to look at docs.python.org/3/library/…
my query
{'__EVENTARGUMENT': '', '__VIEWSTATE': 'HS...', '__EVENTTARGET': 5, 'btnExit': 'Exit', 'btnLogin': 'Login', 'hCurrDirID': 5}
@JonClements threading ?
12:34
@VigneshKalai: I forgot to ask: You mentioned load balancing, so I assumed that these scripts will be running on multiple machines. Is that correct?
@PM2Ring NO same system they will be called by a scheduler every one hour
@VigneshKalai either multiprocess or multithread yeah
@user1977867 Just a guess: does your query take into account that "__VIEWSTATE" changes every time you access the page?
Yes that does do all the load balancing and stuffs neat :) @JonClements thanks I got an Idea of what to do. @PM2Ring if that idea fails then your idea is my backup thank you.And again thanks both of you :P
No worries, Vignesh.
12:46
@user1977867 instead of posting a large chunk of code, could you instead pop them in a gist or pastebin.com ?
I'm going to remove your current code block as it literally takes up my entire screen, and we ask that people don't do that.
@Ffisegydd sorry, i 'll keep that in mind
I will become rustled if this guy replies with "ok how do I fix it?"
Hello, any ideas on how to solve this. I’m failing to see what option I’m missing in that very simple problem. So I’m stuck here

pip install --allow-all-external --allow-unverified gitlib --pre Gitlib
Collecting Gitlib
Could not find a version that satisfies the requirement Gitlib (from versions: )
No matching distribution found for Gitlib


pip install --allow-external gitlib gitlib
Collecting gitlib
Could not find a version that satisfies the requirement gitlib (from versions: )
Some insecure and unverifiable files were ignored (use --allow-unverified gitlib to allow).
@Kevin I put money on it he will
12:50
"Glad you asked. You fix it by burning it all down and starting over"
@user2284570 are you behind some kind of corporate proxy?
@Kevin I actually went back to see if you in fact said that
@Ffisegydd : No I use a direct internet connection. I think you can reproduce that problem by triggering the pip command I wrote here.
is he doing some encryption?
Yeah most likely he's trying to (en|de)crypt a string using an eight character key, so the Nth character is encoded by the (N%len(key))th key character
12:54
@user2284570 I tried your command and I'm getting the same response.
Similar to a Vignere cipher. Or possibly identical to. Hard to tell with this weird implementation.
@user1977867 Your code looks ok to me, but I'm a bit rusty with the standard Python urllib stuff, I mostly use requests these days.
However, I noticed you're not supplying a User-Agent, so you'll get the default User-Agent header sent, which is something like "Python-urllib/2.7", if you're using Python 2.7. And the server might not like that, even though you're a member. So you might need to pretend that your script is a browser, and send a common browser's User-Agent header. However, they may not like people using scrapper scripts, even though you're a member. So consider parsing the RSS feed instead.
@idjaw : Yeah I’m failing to see how I can install it with pip. And I definitely need a git low level library (I don’t care about the language). It seems gitlib is the only one, but it require python (I’m ok for doing python, as I know the language very well).
Because I need to to things like update index file sha1 inside git objects.
I saw I can do that with Gitlib’s documentation.
13:13
Hey there, I started reading the Python tutorial that @tristan pointed out for me yesterday and I will definitely read it all. However, @PM2Ring pointed out that there are much more into the classes part that the tutorial wont cover. In fact I know some of the early/easy stuff about lists, strings, tuples and dictionaries from the python google tutorial I did. Any other suggestion on what to read for classes after the tutorial?
hey python guys, i have question related to python socket
@Grey Maybe you should ask again after you've worked through the tutorial. :) And had a look at the link I posted yesterday. But anyway... I hear that Dive Into Python 3 is quite good, and it looks like it has lots of good info about classes. But I haven't read it myself.
Hey guys, question: at your work, how are github issues assigned?
Any ideas ?
@user2284570 Sorry, I really don't know
13:22
i have a client and server python script,when i am try to run server in cloud 9 and client in my computer,both program run prefect but both program not work.i can not understand why happen?
Ok thanks @PM2Ring ! In general I would like to deal with machine learning programs like scikit-learn and theano and eventually be able to contribute to those projects.
@user2284570 The only thing I ever used for git with python was gitpython
@idjaw not even an another way to install it without using pip ?
@idjaw Yeah I don’t care about python, and I would have prefered A C library. But I need very low level functions for performance reasons.
@user2284570 nothing coming to mind. Unfortunately, I am unable to commit to testing things right now. Sorry.
@idjaw : not even an idea on how to download it without installing (I want the standalone library not the one packed with smug) ?
13:28
@user2284570 Usually when pip fails we point people at the gohlke wheel site. I don't see a "gitlib" download there, but I do see "pygit2". Knowing nothing about either, I wonder if they're interchangeable?
@Kevin pygit2 is high level like libgit2 and many others. It can’t pass os design limitations.
That's unfortunate.
@Kevin : That’s all I found. It’s website only list documentation telling it’s for a low level use of git objects (which is what I’m needing). pip seems to be the only way to download it.
user559633
Morning gents.
13:32
hey tristan
user559633
@Grey Finish the tutorial -- you'll run into some more examples and you'll be prepared to read the official documentation (which also has examples and more in-depth information)
user559633
@user2284570 Wait, is your assertion that you need a low-level way to interact with the git version control system?
DSM
DSM
Early morning cabbage for all.
ahoy @DSM
13:35
I never appreciated official docs enough, in college
user559633
@Programmer same, but s/official docs/costume parties/
Anyone remembers this small project I am inheriting, with a single commit, without documentation, and with the person responsible on vacation?
user559633
I remember that. I have a note here that says...*puts on reading glasses* "likely to be referenced in poke's manifesto"
DSM
DSM
I know it now and am projecting backward.
So I started digging into it, and guess what: the whole CSS is injected with JavaScript.
13:39
eh? how?
DSM
DSM
To make it faster and stronger, I guess? It was kind of a problem in the 90s.
do you have a sample you can show? I'm intrigued
@tristan : Yes, in order to create exploits/proof of concepts I found in various popular high level libraries. As per Gitlib’s documentation (with the examples functions I saw), It just give me what I need. (crafted objects but valid pack files and sha1)
Well, there is a build process that takes the CSS, puts it in a string, and then the generated (and minified) javascript file creates a style tag and puts the whole stuff inside of it.
oh
13:41
@DSM Morning? It's not morning until I go to sleep and wake up.
@TigerhawkT3 have you been up all night?
@idjaw Maybe.
user559633
@user2284570 okay, the limitations of trying to actually get that to be an exploit aside, if you find C libs and want to still use python, i'd say look into ctypes or the cpython foreign function interface
Though memory allocation controlled by user input seems to be the main concern (only leading to denial o service).
@tristan : I’d prefered a C library. But the only one which exist is python only. (though I’m completely fine for using things like python or ruby)
user559633
Every time you edit the message I get pinged, which means you've pinged me 8 times for 2 messages.
13:47
Oh, Sorry…
I blame the chat code for that, personally
Yeah spell checking shouldn’t ping.
In an ideal world, editing a message with an @ would update your "you got a message" count, but not play the sound effect
DSM
DSM
We could ask for it to be changed. ETA: 2023, by which time there won't be a SO.
user559633
Me too, but since stackexchange only gives a shit about careers/dumb-new-community-ideas and not the ugly business of maintenance, it's something to be aware of
13:49
I'd write a user script for it, but it is deep magic
user559633
Same, but for the reason of that I already waste too much time here
@tristan : I’m definitely stuck on how to install it. Or even just downloading.
DSM
DSM
Speaking of SO, I got the "box of stuff for you" email on the weekend. Now it's time to start re-evaluating my life choices..
user559633
And 3 times for that message so far. Stop pinging me, holy shit.
Images are inlined into the JavaScript too…
user559633
13:51
Open a question on stackoverflow with everything you've tried and the error message you've hit and I'll take a look.
The build script used on unmodified source code generates a different build-output than the one that was checked into source control…
(also, the build script was broken)
14:04
@poke Fun. But it could be worse: it could inject style attributes into tags, one by one.
@tristan : Done. But with how the solution should be simple. I’m sure it’ll get closed before someone answer it.
Night all - cabbage you later.
@TigerhawkT3 rest up Thor! ;)
user559633
@user2284570 And I answered it for you.
THanks @PM2Ring ,I'm not sure how to use RSS feed you mentioned. Although I used headers = { 'User-Agent' : 'Mozilla/5.0' } , didnt work... strangely I dont understand why the webpage is not changing although my arguments are correct in query. I doubt if the javascript dunction needs to invoked in a different way.
14:20
@user1977867 I'm not sure if the RSS feed will give you what you want, but it's worth looking at. See BSE RSS for details. bseindia.com/data/xml/notices.xml looks ok, but bseindia.com/data/xml/SensexRSS.xml appears to be broken to me.
DSM
DSM
@tristan: hilariously, it looks like even pip2.7 install smug works to provide gitlib (and as you suggested, cloning and installing from local works too.)
user559633
@DSM yeah, i tested the git clone first :) i think the more important lesson is understanding how pip interacts with pypi
user559633
@user2284570 put more directly, it looks like you chose a package that doesn't fit your needs.
user559633
pip interacts with pypi. if the files aren't available to download directly off of pypi, it's not going to machine learn its way into getting you what you want
user559633
pip doesn't promise that the code you download will even work either -- it's third party code. i mean this in the most helpful way possible: stop thinking that it's going to work the way that you assume and actually read the answer that I left on your question.
user559633
14:25
arguing with a dietician isn't going to make cupcakes non-fat
Ok.
@tristan : but as per documentation, it has the functions I need.
my cupcakes are ext4.
user559633
@user2284570 it's third party code.
Sorry for the spell pinging.
My cupcakes are NTFS.
user559633
14:27
are you trolling me?
No not at all.
DSM
DSM
Wait, am I misunderstanding here? Is the goal here for some reason to get gitlib installed but without smug, and we have to do this via pip somehow? That's.. strange.
user559633
i could upload a package called "free-puppies" and pip install free-puppies won't make free puppies appear. it's that direct.
For the record, I'm trolling you.
@PM2Ring bseindia.com/data/xml/SensexRSS.xml opens intermittently ... not to do with the current problem though, on hovering i see a javascript function and breakpoints give me its values, i took those values in my query....
user559633
14:29
pypi is simply a registry of non-standard library packages. pip interacts with pypi.
user559633
Gitlib 0.5
Downloads (All Versions):
0 downloads in the last day
2 downloads in the last week
7 downloads in the last month
user559633
suggests that maybe you should keep shopping.
shop smart shop s-mart
I need to watch that movie again
@DSM : Gitlib and smug are just 2 different packages that do different things. It’s just the public download url (the one which is here) is different from the one used by pip. So the current answer is to use gitlib through smug functions which doesn’t solve the problem of course.
DSM
DSM
That glob memory error question is astonishing.
14:35
(since I need to use gitlib directly)
Having a folder with 1 million files sounds untidy
DSM
DSM
@user2284570: you don't have to use gitlib through "smug functions", whatever those are. When you install the package, you then get to do import gitlib. I think you've convinced yourself there's a separate repo (separate from smug.git) which provides gitlib, but nothing you've shown makes me think that's true.
user559633
@user2284570 re-read my answer.
user559633
don't make assumptions, pretend you are hearing of pip for the first time, and don't assume that things should work.
user559633
that is reality.
user559633
14:41
if the package is a piece of shit and the download url is "mail.yahoo.com," that's just the way it is
@DSM : I think you've convinced yourself there's a separate repo. That’s just what is written here as stated by Gitlib was originally developed as part of Smug, but it is useful as a standalone library.
Why does FuncAnimation in matplotlib block?
and currently, the setup.py doesn’t allow to install it without smug nor it does allow to use it without smug.
user559633
@user2284570 it's third party code.
user559633
if that's the case, that's the case. if that's a dealbreaker for you, stop using it and move on with your life.
DSM
DSM
14:46
@user2284570: that something can be used standalone doesn't mean that there's anything which provides it that way short of a manual install. A cereal box can be handy for things other than holding cereal, but that doesn't mean a store is obligated to provide them for sale separately.
DSM: King Of The Metaphors.
Dropping in for a minute.
Why, oh why is Python hellish to work with when you're at a byte level?
Ahh - I see the gitlib thing is a thing. Sorry if my comments on the question have got in the middle of a heated debate.
@IntrepidBrit Because if you're fiddling bytes you probably should be using C. :) Seriously, it's not that bad (at least in Python 2), but it's not very efficient.
14:53
member.bseindia.com/Extranet_Login.aspx I try using requests to login into the page using r = requests.post('http://43.228.176.134/Extranet_Login.aspx', data=payload) however the page that comes is different from what comes if i login through my browser, the user name and password are same in both cases... unable to undertand whats wrong, is there anything else i need to do to submit the form
DSM
DSM
@JRichardSnape: it's not so heated, really, it's just that someone wants something that doesn't seem to be supported. :-) Sometimes the answer to questions is a variant of "no"..
@DSM Most of the time in my world :D
rbrb for now.
user559633
@IntrepidBrit at a byte or bytecode?
I probably will work in C in the future. I'm just tired of Python's constant trolling. Nothing big, it's just making me sigh a lot.

Ie, bytes("ABC", "ASCII") == b'ABC'. bytes("ABC", "ASCII")[0] == 65. *tear*
@DSM Ok, now since most high level git libraries use buffers that are duplicated many times for filenames, let’s start by creating an easy compressing filename that is several hundreds MB large!.
14:57
@user1977867 Well, I guess that's an improvement over what was happening before. Sorry, I don't have anything to suggest, and obviously I can't test stuff for myself, since I don't have a BSEIndia login. Maybe you should write a question for the main SO site, explaining what you've tried (with the code), and what happens when you try to run your code.
(some kb of network data when pushing, but several Gb of RAM when checking out)
DSM
DSM
@user2284570: Unfortunately I have to admit I have absolutely no idea what you're talking about. I'm sure it's very witty and insightful, and that if I did understand I would be suitably appreciative.
@DSM : Just take a look at the discussion above.
@IntrepidBrit bytearray is your friend.

« first day (1829 days earlier)      last day (3343 days later) »