« first day (3389 days earlier)      last day (1542 days later) » 

12:35 AM
@JonClements my favourite MP sketch!
 
 
3 hours later…
3:17 AM
Hi, is it possible to import a module(say "foo") within an init.py, then import the directory that contains the init.py (say it's fooDir) and then access the names inside foo like this: fooDir.foo.foo_method() ?
It's not working for me
I know there's the sys.path way I just wonder why this doesn't work
 
not sure if this is a stupid question, and I'm probably searching for the wrong thing.. given an equal elements, what's the best way to set every 4th element as a dictionary key and the following 3 arguments into it's values as an array
so [0,1,2,3,4,5,6,7] would be {0 : [1,2,3], 4: [5,6,7]} .. and so forth
 
3:34 AM
may be overhead with pandas
l = [0,1,2,3,4,5,6,7]
s = pd.Series(l)
{g.iat[0]:g.iloc[1:].tolist() for _,g in s.groupby(s.index//4)}
#{0: [1, 2, 3], 4: [5, 6, 7]}
but I am sure you should be able to find a way using python
basically group every 4 elements and split the group into key (1st value) and values (rest of the values in the group) @Datanovice
 
thansk :) I have my own hacky method which works fine but it's like 5 lines of code .. and I'd need to add another line if my length was changed to 5
so I'm sure there is better method to do it in python
your solution works well @anky_91 !
 
cool
:)
 
3:49 AM
I think i've spent way to much time learning pandas, I need to learn the proper basics of python data structures @anky_91
 
 
1 hour later…
4:50 AM
Hey guys, I'm just wondering if Google IT Python automation certificate is worth getting
 
user10984358
5:09 AM
Someone in this chat room was asking about this very course two days back. There wasn’t much of a discussion on that but if you want you can look into that
 
8:07 AM
@KyleMa worth it if u r a python beginner..
 
 
2 hours later…
user10984358
9:58 AM
My gui has a couple radio buttons, check boxes and text fields and every time "Button 1" is clicked it schedules a task based on these, is there a way (without a db) to store these values so I can have an option say "View Created" and when clicked it is going to display all the tasks that are creating using the GUI? I am inclined towards adding all the required values from the GUI to a file (csv?) and "View Created" will just read this and show in a GUI, is saving this as a JSON even possible?
 
of course it is
 
user10984358
is there a better way to do this?
 
What kind of scheduled tasks are we talking about here? Are these tasks that run within your program? Or more like cronjobs or the Windows Task Scheduler?
In the first case there's no other option than saving the tasks to a file/db, and in the 2nd case there might be another option
I've gotta go now though, good luck
 
user10984358
I am using pywin32 and adding tasks Ref : docs.microsoft.com/en-us/windows/win32/taskschd/…
 
user10984358
thanks for the help though
 
10:38 AM
@Datanovice pedestrian version: {lst[k]: lst[k+1:k+4] for k in range(0, len(lst), 4)} give or take. We could spice it up with the "cut iterable into even batches" pattern.
@aderchox important subtlety: you never import directories, you import modules or packages. Don't think and don't name in terms of directories.
If you turn your directory into a proper installable package then this should work.
Don't know how it works locally without installation. I suspect you need to be in the package root.
 
11:10 AM
I mean you definitely have to be there but it might work then
 
11:27 AM
$ tree
.
└── foo_package
    ├── foo.py
    └── __init__py

$ tail -n +1 foo_package/*
==> foo_package/foo.py <==
def foo_function():
    return 'foo'

==> foo_package/__init__py <==
import foo

$ python3
>>> import foo_package.foo
>>> foo_package.foo.foo_function()
'foo'
@aderchox ^
 
@AndrasDeak and of course the arbitrary iterable approach: it = iter(r); {v: list(islice(it, 4)) for v in it}
 
yeah
 
11:49 AM
Is it just me or is anyone else thinking: "how can January nearly be over already!"?
 
Nope. I have deadlines in February :P
 
Gotta make sure everything's done for Feb 30th, yeah? :)
 
I wish
 
Just having a look on sopy... got quite a few birthdays next month it seems as well
 
12:06 PM
@AndrasDeak Thank you. Yes I realized I was wrong about importing "directories" after I searched a bit more. But now I also suspect something else. It sounds like a "package" are also a type of module! that allows better structured access to other modules... I'm saying this because in the documentation on "import" there's only "module" in front of it. I might be severely wrong though. :p
 
12:17 PM
@aderchox even .py files are modules, it's a very broad term. "Package" is something more specific, although sometimes a bit fuzzy
 
12:29 PM
@AndrasDeak \0 thanks
 
 
1 hour later…
1:45 PM
guys?? Can I ask for some help here??
 
Hello. Yes, but first please read our rules to see how.
 
@JonClements A nice illustration of the Pigeonhole Principle :) At first glance I thought there were no duplicates but, indeed, there's 1
 
Before I forget... didn't someone the other day suggest we change the room topic so the rules weren't a tinyurl and that it'd still fit if we did so?
 
shad0w_wa1k3r i think
 
@roganjosh that randomhopeful ruining things :p
 
1:54 PM
Ha, soz, it's not your day!
Oh, there's 2 dupes in February actually
 
ooo yeah... people not formatting considerately :)
oh and 2 in january :)
2 in June...
 
I'm trying to implement TfidfVectorizer from sklearn. What sklearn does is it normalizes the final output. You can turn this off by passing in norm=None. Here is my problem: My algorithm works unless I normalize the output, but when I normalize it breaks for some reason. I've tried normalizing along both of the axis, it doesn't work.
I've checked all other parts of my code and all of them seem to work. I use the same normalize function that sklearn's preprocessing provides, this is also the same function the actual TfidfVectorizer uses. How do I go about rectifying this. Any leads that I can follow??
 
Breaks how?
 
my_output == sklearn_output when i don't normalize. But when I do it stops being equal
 
Floating point issues?
 
2:01 PM
definitely
try np.allclose instead of ==
 
I think we're going to need to see some minimal example. I'm assuming that normalization is causing floating point issues
 
and if that's False it's worth looking at how many are not np.isclose in case there are nones or large numbers due to some numerical instability
 
@AndrasDeak I'll try this and report back. Thanks
@AndrasDeak Thanks very much. It was indeed a floating point issue. np.allclose works fine. Thanks again
 
thank roganjosh ;)
 
2:05 PM
@roganjosh thank you too :)
 
@PranavVoid for future reference this is the problem:
>>> 0.1 * 3 == 0.3
False
 
@PranavVoid no worries :)
 
I'll remember that now thanks
 
2:17 PM
Umm... stackoverflow.com/questions/59919147/… - does anyone remember seeing something like that - surely it's come up before as I imagine people from other languages might well expect that to be a class instance variable or something...
 
Was starting to think you were going down the typo rabbit hole there :)
 
I have...
 
2:33 PM
okay... avoid the queen of hearts will ya? :)
 
Answered by Martijn --> ultra-wary mode for me
 
Is it just me or is it a little worrying when people struggle with things like this
 
@JonClements Kind of related: stackoverflow.com/q/15999917/4014959 with an answer by Martijn.
 
yeah... I wonder if that confuses things... I think for the OP - the accepted answer they to is probably a little more straight-forward with the example
good find... I should probably make a rule of thumb when looking for dupes to just search Martijn's stuff first though :p
 
Maybe just link it with a comment, rather than hammering.
 
2:42 PM
def convertIQRmatrix(pmatrix):
    for i in range(len(pmatrix)):
        if all([v == 0 for v in pmatrix[i]]):
pmatrix is a list of lists
anyone know why the last line doesnt work?
 
define "doesn't work".....
 
'int' object is not iterable
 
odds are pmatrix is not a list of lists
 
@JonClements It's a useful strategy, which I've often used. :) Especially if I vaguely remember a relevant Martijn answer. But I didn't use it that time.
 
@AndrasDeak pmatrix = [[0,1,0,0,0,1],[4,0,0,3,2,0],[0,0,0,0,0,0],[0,0,0,0,0,0],[0,0,0,0,0,0]]
 
2:45 PM
Or, it's mismatched and contains some lists and otherwise just ints
 
@Permian I doubt it
 
@AndrasDeak its ture
 
>>> pmatrix = [[0,1,0,0,0,1],[4,0,0,3,2,0],[0,0,0,0,0,0],[0,0,0,0,0,0],[0,0,0,0,0,0]]
... for i in range(len(pmatrix)):
...     if all([v == 0 for v in pmatrix[i]]):
...         print('potato')
...     else:
...         print('potatoeh')
potatoeh
potatoeh
potato
potato
potato
yeah, no.
 
omg
 
I didn't say that's not your error.
 
2:48 PM
ok
 
for item in pmatrix:
    if isinstance(item, int):
        print(item)
Then you'll need to trace back from that. Python doesn't lie, though, unless we're talking about a really obscure bug
 
you dont think this is a python 2 or 3 problem?
 
@Permian BTW, it's better to use all or any wirh a gen exp, not a list comp. So, all(v == 0 for v in pmatrix[i]). all & any can short-circuit, that is, they bail out as soon as they get a definite result. So all will stop testing as soon as something fails the test. But if you feed it a list comp the whole list has to be created before all can start testing.
 
python doesn't lie, period
@PM2Ring in case of a list of list of ints it should just be all(pmatrix[i]) anyway
 
@AndrasDeak Well, not any(pmatrix[i]), since the test is that all ints in the list are zero.
 
2:55 PM
ah, yes, sorry
 
@Permian Unlikely. If Andras' example doesn't convince you, you need to give us an actual MCVE.
 
Has anyone written program for solving linear equation with large number of variables with the requirement that the solution should be correct upto 5-6 decimal places?
If yes, which method did you use?
 
Is this still a problem from some weird code challenge site?
 
In my program, I am using Cramer's rule[Because it is simple to implement]
@AndrasDeak why it is weird?[I am ready to give description[Because last time you called it weird as I was giving insufficient description]]
2) I have still not found any other method to make my programming skills better.
 
I said "weird code chalenge site", not "weird problem"
although it's weird in the sense that I'd use a linear algebra library (in particular, numpy)
 
3:10 PM
numpy is blocked.
 
hence weird :P
 
They explicitly stated that. :)
BTW numpy uses LU decomposition and that's why it seems the answers have some errors.
 
You basically need a stable method for computing A^(-1)*b, which doesn't necessarily involve computing the inverse of A. For instance in MATLAB A \ b would do exactly this, and better than inv(A) * b.
 
Yeah, I think too that I should do that, but the only method I can think of is Gaussian elimination, which is not stable.
 
then instead of "thinking of" you should do some research
 
3:14 PM
That's what I am doing for the last 10 hours. :(
I've found some research papers for bareiss algorithm which is efficient than gaussian elimination, but the notation was weird and I didn't found any good tutorial for that.
I checked and tried QR decomposition, but I wasn't able to implement, I tried gauss siedel method but it was timing out.
 
@AjayMishra en.wikipedia.org/wiki/Cramer%27s_rule says there's a new more efficient Cramer's algorithm, but I haven't read the paper yet. doi.org/10.1016%2Fj.jda.2011.06.007
 
if i have foo.shape = (a,b,c,d,e) and bar.shape = (a,b,d) , how can i multiply foo*bar so that each subarray foo[I,J,:,K,:] is multiplyed with bar [I,J,K] for every I,J,K
 
3:42 PM
@StipeGalić foo * bar[:, :, None, :, None]
the second factor could be written as bar[..., None, :, None] but in such cases I prefer to keep explicit colons
 
@TheNamesAlc thanks
 
@AndrasDeak thanks, perfect!
 
no problem
 
Having a little play with: stackoverflow.com/questions/59919277/…...
How awful is...
def var_window(current_row, values, lookback, **kwargs):
    loc = values.index.get_loc(current_row.name)
    lb = lookback.loc[current_row.name]
    return values.iloc[loc - lb: loc + 1].sum()

df.apply(var_window, values=df.Data, lookback=df.Lookback, axis=1)
 
user10984358
How can I do the following in an efficient manner? Whenever someone clicks a button in my GUI I am adding some value to a dict and this dict is then stored as a file using json.dump, say this dict has 100 items and every time the button is clicked new values are added to this 100, so first time 101 values are dumped, second click 102 values and so on, thinking of doing the dump call when the user exits by overriding exit signal in PyQt that works?
 
3:53 PM
Any particular reason you're using json for storage?
 
user10984358
I dont want to have a db, that is the only constraint, I want some way to keep track of tasks created using my GUI, so I am open to suggestions
 
Are you by any chance asking how to drive a screw specifically without using a screwdriver?
 
user10984358
think of the json like a config.ini in some games, where you can manually edit the resolution or FOV or something and on relaunch that option is loaded, using a db I cant manually edit now can I?
 
Do you really need to save that dict to disk every time the button is clicked? Or can it wait until the user closes the GUI?
 
user10984358
right now I was doing it every time until I realized overtime this can be bad, I only need the dict during the run time, the gui will have some "History" column that will show values based on this dict
 
user10984358
3:59 PM
also in case the gui crashes I want to make sure the tasks created in that run time are added to this dict so history can be seen, the more I explain the more I see the need for a db here
 
you could still have an "export to human-editable format" function be called on exit even if you have a proper db
 
user10984358
I dont need to run a db server or anything for this?
 
Also, you could write a small utility program that lets you update the database independently of the main program.
 
@TheNamesAlc JSON is a pretty bad format for incremental writes. If you have a structured format, something as simple as CSV will yield much better results.
 
4:05 PM
@TheNamesAlc There are so many database systems I'm pretty sure you don't. For instance redis is an in-memory database, but this is as much as I know about databases so I don't know if it's good for your "make sure data is not lost" use case.
I mean assuming by "db server" you mean a fully fledged independent server that runs somewhere
 
user10984358
like XAMPP thats the only I used and only once when we were taught about DB connectivity in python, also I am not aiming for 100% fault tolerance, something that provides this is enough
 
user10984358
Will look into sqlite3 and csv for human readable form
 
the simplest option for O(1) pop/insert is just to write a new file per datum, by the way
 
user10984358
I have decided to go with sqlite and writing a utility program that can take a csv as input or edit the csv to update the db, thanks guys!
 
4:24 PM
@MisterMiyagi I'm guessing roads[random.choice([b for a, b in junctions if a == 1])] will work there but seems a rather odd way to structure data if they're going to be doing that a lot...
 
huh, sqlite3 official docs links to Bobby Tables
 
@JonClements I assume there is a big gotcha looming in that simple problem description. Something "oh, and roads is an infinite stream" followed by "but I'm only allowed 1 symbol lookahead".
Garnished with "and I require 100% accuracy from now to the heat death of the universe".
 
that's normally the way :)
@AndrasDeak that guy gets everywhere :)
 
@AndrasDeak Thank you!
 
@JonClements Ah yes, the OP just clarified they'd like a result while looping, i.e. no lookahead.
 
4:36 PM
@AndrasDeak Sadly, it also links to w3schools... but maybe their SQL tutorial is ok. I didn't bother checking because I don't like to give them page hits. ;)
 
Huh? :)
Something's important guys :)
 
"I have found this homework"
 
TIL: "China is known to have artificial planets." We get some "interesting" posts on Astronomy. :D astronomy.stackexchange.com/q/34824/16685
 
the Hungarian word for satellite (as in artificial) is "artificial moon"
 
It's really sad... but every time I read the word "China" - I just hear Trump saying it over and over again :)
 
4:43 PM
@JonClements "Help me help a student." That's meta.
 
@JonClements Ttttchinuh :P
 
@AndrasDeak That's sensible.
 
for the third time today I started spelling "journal" with a y :|
to be fair it's "New Journal of Phyics" so I'm probably being thrown by New York
 
do you actually needs the variables diagonal_row and source_row ??
 
@PM2Ring Thanks, I implemented the chio condensation part, they have given the method when a_kk is not zero, but that's not always the case.
 
4:54 PM
@Permian no
 
thought so
 
And it seems to me that in the case when a_kk is zero, applying row exchange give errorneous result.
 
@anky_91 I had pretty much the same sum and enumerate jobby... I just really wanted to fathom out a way to get a function to work with apply :)
 
uhh ohh :) but why apply on axis = 1
 
It's a bit of a faff getting the index otherwise
 
4:58 PM
hmm, makes sense :) Nice work on the func without a doubt
 
melon... no doubt it can be improved though... will have a play around more later when my brain isn't hurting :)
 
@AjayMishra I had a quick look at the article. It seems interesting. But I don't know how they handle the case when a_kk is zero.
 
@JonClements Sure I will follow :)
 
Umm... tempted to close stackoverflow.com/questions/59920404/… as a dupe of stackoverflow.com/questions/13188476/… - but that could look dodgy
Haha... was going to close a dupe of the possible dupe on the dupe (stackoverflow.com/questions/13084619/…) but I answered that one as well!?
and that's a duplicate as well - but at least I didn't answer that one... bit of a rabbit hole of dupes there...
 
if you have a list of floats
how do you find the least common denomiator?
 
5:10 PM
The OP seems to be satisfied with your choice.
 
Can someone help me out with selenium in python for automation ?
 
@Permian Convert them to fractions, although that's not guaranteed to work, due to float rounding errors. See docs.python.org/3/library/fractions.html
 
@PM2Ring ah grim
 
@Mukesh Could you be more specific - that's a rather expansive topic :)
 
I am trying to book tickets using paytm site paytm.com/movies/hyderabad/pvr-kukatpally-c/…, I am able to crawl till that page and select the movie, what I am trying to do is select any random seat which is available which according to me has a class _37EOG but when I click on it using selenium I am getting xpath error
 
5:16 PM
@Permian yeah, you can start with a method that handles [0.1*3, 0.3] appropriately
 
@Permian It's not so bad if you can supply a reasonable limit_denominator, but that's not always possible.
 
So when that seat layout thing comes, I am unable to select the seat using xpath class, is it due to nesting of div classes ?
 
Does the error you're getting (which is obviously top secret :p) hint at that?
 
No, it simply states selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[@class="_2wEg3"]"}, But the class is very well inside that inspect code, I guess the class for booked seats are constant while unbooked seats class shows up only after we click the link on it which is _2wEg3
Not able to figure out how to access unbooked seats
 
I guess you just have to make sure that you instruct the browser to do exactly the same things you do to the point you know that element is actually there...
 
5:28 PM
I can say a seat is unbooked because of human intelligence and every movie theatre has different seat layout with occupied and unoccupied ones having unique classes, but getting any random unoccupied seat is becoming a challenge for me
 
What method are you using to try and find the div elements with that class? If you're trying an exact xpath then don't forget things like @class="..." looks for a class exactly matching that.... so if the target has a class="something something-else _2e3_whatever" - it won't match
 
Target simply has a class _2wEg3 which is visible only when i click the seat. It should have worked right ?
 
So if you take the automation window... only execute code up to a certain point, then click the seat to get the class, and then run a single line to see if you can find the seat - does that work?
 
But one major concern is there are many unbooked seats having class _2wEg3 , so how my driver will be able to locate a particular one. Ya i tried that it didn't work
 
for col in xrange(n):
        diagonal_row = col
        assert(m[diagonal_row][col] != 0)
        k = Fraction(1, m[diagonal_row][col])
how does the assert help there?
 
5:38 PM
NameError: name 'xrange' is not defined
@Permian it doesn't
 
both arguments should be Rational instances
when i dont have it
 
user10984358
@Mukesh I looked at the site and there is only two classes showing up, not the ones you mentioned though, get the two class names, and try clicking on each of the class, if it is clickable then that class is for unbooked, try something along this line, if it is raises an exception the other class is unbooked, I guess this should work
 
@TheNamesAlc isn't the class for unbooked class="_2wEg3" and booked "zAyOh" ? Also, does selenium automatically choose any seat from the bunch of seats ?
Like don't I need to run an iterator ?
 
user10984358
before you click I get _37EOG yes you need an iterator, every row is an un ordered list, so you can iterate row wise and see if any element is clickable
 
5:55 PM
God knows how to figure out this, trying different ways to see if it works or not :) The try except thing isn't working as of now for me
 
user10984358
why dont you try giving the full xpath? for a certain "row" /html/body/div/div[2]/div[4]/div[3]/div[16]/div[2]/div/div[3]/div[2]/div[2]/ul[1]/li[3] and for the next row it is /html/body/div/div[2]/div[4]/div[3]/div[16]/div[2]/div/div[3]/div[2]/div[2]/ul[2]/li[3] the li[x] indicates the seats and ul[x] indicates the row, dynamically generate the xpath as you iterate, thats how I would do
 
user10984358
in case I messed up what I wanted to say the first xpath is for the left most seat in row P, the second xpath is for the left most seat in row N
 
full xpaths I had used once for other site, but the results where not good, will try this, but for different seat layout this has be different I guess because not all theatres will have same seat rows or in same image space
 
user10984358
a clumsy way would be to use try and increaseli[x] until you get NoElementFound Exception this means that you have exceeded the seats in a row, same for rows but try with ul[x], I am sure you will find better ways later
 
@TheNamesAlc Ya that might work for this theatre, but for theatres which has different layouts, it will obviously have different xpath right ? Let me try this for some random samples.
because some theatre have rows which are different than others, I mean orientation
 
user10984358
6:05 PM
I just checked the xpath for two different theaters at different cities, the ul always starts from 1 and you get missing li[x] if the layout changes but the ul remains constant, so you can maybe fix a range of row of seats say for x in range(1,30) and try the li[x] till it reaches 30, those that are missing will raise an exception ignore and proceed with the next number
 
user10984358
/html/body/div/div[2]/div[5]/div[3]/div[43]/div[2]/div/div[3]/div[1]/div[2]/ul[1] this is constant, this is the row, f'/html/body/div/div[2]/div[5]/div[3]/div[43]/div[2]/div/div[3]/div[1]/div[2]/ul[1]li[x]' is what I was suggesting inside the loop
 
Ya let me find some patterns in xpath for series of theatres will try this rn, let's hope it works at least for now. And you are sure that every ul has the above same xpath ?
/html/body/div[1]/div[2]/div[4]/div[3]/div[6]/div[2]/div/div[3]/div[1]/div[2]/ul coz I am getting this for inox elpro city square pune
 
user10984358
full screen?
 
? Not able to get
 
user10984358
sometimes some site change layouts according to your chrome window size, I was facing this issue when I was scraping, they tend to hide some elements to focus on the main ones, this site could do that
 
user10984358
6:19 PM
If that is not the reason here then you will have to find some other pattern in the code sorry :(
 
Oh, I guess that's the reason I had read somewhere xpath should only be the last resort. Thanks anyways, will try to do this
Thanks a lot for your time :)
 
@anky_91 huh... that's a surprising comment there... I'd have thought my function would be the one that's more confusing...? Weird...
 
user10984358
@Mukesh fwiw I keep getting the same xpath, Pune and Kolkata, np good luck
 
@JonClements On the contrary :), the OP understands the params to input to get what they wished for instead of the enumerate + reverse and what not thing :P
 
@anky_91 melon for the accept nudge thingy :)
 
6:26 PM
watermelon , it needed a closure anyway :)
what should be the salad for don't mention
 
@AndrasDeak cannot find that specifically
 
I linked to "watermelon" specifically
 
makes much sense now, thought I am in completely different universe
 
@anky_91 do you need glasses? :p
 
6:31 PM
@AndrasDeak i already mentioned that? wondering
@JonClements may be :P
 
The Salad language was created and introduced to the room on April 10, 2013 by Jon Clements and Inbar Rose. The usage of the greeting quickly spread among regulars, and participants added additional words to the lexicon over time. ? Is this the same guy ?
 
This answer wont work
 
Who's Jon? :P Yes, same guy
 
answer[a] = Fraction(c3[0][a]).limit_denominator(5) #bad

IndexError: list assignment index out of range
i seem to be having problems with the matrix algebra as well
 
@Permian so either c3 is empty or c3[0] is at most a long
none of your problems for today have had to do with linear algebra
 
6:35 PM
[[0.19999999999999998, 0.6], [0.39999999999999997, 0.19999999999999998]]
thats c3
 
I don't trust you anymore, but OK
 
omfg
 
@Permian oh, third option: answer is at most a long
in particular, I hope this is not the brain fart of sopython.com/canon/135/…
 
@AndrasDeak arghghgh... trying to remember is it php that you can append to a list by doing list_name[] = "something new" ?
 
@JonClements bdw didn't explore but that may also be possible with numba i am guessing?
 
6:42 PM
@JonClements I don't know php. I know MATLAB allows that, implicitly padding with zeros.
@anky_91 are you referring to something else?
 
@anky_91 lettuce?
 
@JonClements Sorry I meant this
@AndrasDeak yes sorry :)
 
@anky_91 possibly... or a custom cython jobby or something... but ultimately... shrugs
 
okay
 
numba is usually a fairly low-cost option assuming the underlying code lends itself to numbification
and of course if you want to call a function many times
 
6:47 PM
right, was curious, i would do some testing later then
 
@anky_91 what I did have a quick peek at was github.com/pandas-dev/pandas/blob/master/pandas/core/window/… - it might be possible to inherit/base something on that that instead of fixed windows takes a separate input to do stuff.... maybe _create_blocks or something
 
if rolling iterates on the window, do you think rolling is actually reqd? asking since i don't know the initial, i will have to read the source
still not sure if i will understand fully :P
 
yeah... my brain's tired so not sure if I'm ever in the right place... just something I thought I'd take a quick goosey at and then thought better of but didn't think it'd hurt to mention it just in case
Surely we've got a dupe for stackoverflow.com/questions/59921604/… - I'm fairly sure I've written an answer that reads the next line in a for loop or something
 
i appreciate that Jon
 
Umm... might be thinking of stackoverflow.com/questions/49599623/…
Surely we must have something as simple as:
with open('somefile') as fin, open('results', 'w') as fout:
    for line in fin:
        if next(fin).strip() != 'Downloaded':
            fout.write(line)
 
7:14 PM
rbrb
 
@anky_91 rbrb! \o/
 
:)
 
 
4 hours later…
11:40 PM
@JonClements you there?
nevermind...
 

« first day (3389 days earlier)      last day (1542 days later) »