« first day (2832 days earlier)      last day (2132 days later) » 
02:00 - 20:0020:00 - 00:00

8:00 PM
thanks very much all. I will try to work out what .mean() is actually doing
 
it seems a bit counter-intuitive as a pandas non-user that .ewm is not actually a mean, but a dedicated object the .mean() of which is the actual weighted moving average
 
@AndrasDeak right!!
 
that being said, lot of pandas is counter-intuitive for me so I'd just read the documentation first :P
 
:)
"Returns:
a Window sub-classed for the particular operation"
is pretty obscure to me
 
You use quite a bit of numpy though, Andras?
 
8:01 PM
lot of numpy, yup
 
I'm curious what problems you work on?
 
Various. Mostly data visualization and some lightweight (occasionally not-so-lightweight) simulations, Monte Carlo and discrete Fourier transforms and whatnot
 
DSM
I'll admit it makes more sense when you were following the design decisions. The new setup is much easier to explain than the old one starting from scratch, though, or so it seems to me.
 
For something as versatile as pandas I believe it's acceptable to expect the user to go through a learning curve before trying to use the package. Of course a good official tutorial is paramount in this scenario.
 
@AndrasDeak Meaning that most of the time, you're cleaning data before applying the formulas to it ?
 
8:05 PM
I use pandas more as an intermediate
It's not bad to get something from a spreadsheet into something that can go cleanly into an array, and then get the output back into something legible to the interested parties. But I'm not sure I find it intuitive.
 
@IMCoins sort of, except they're not dirty
for instance, I'm converting a collaborator's results for a specific problem to our convention as we speak so that I can feed it into my post-processing scripts that assume our convention
 
@Simon My passive aggressive obnoxious answer
a = np.array([[1, 10], [2, 12], [3, 5]])
b = np.array([[1, 0.78], [3, 0.23]])

pd.concat(
    map(pd.Series, map(dict, (a, b))), axis=1
).stack().groupby(level=0).apply(list).reset_index().values

array([[1, list([10.0, 0.78])],
       [2, list([12.0])],
       [3, list([5.0, 0.23])]], dtype=object)
 
So you're the brick that make sure all the data fits into the Data visualizations tools you have ?
Seems like a cool job to me.
 
recbg. I got distracted responding to a [comment on a 2 year old answer ](stackoverflow.com/questions/38302765/…). Here's my code to print the digits one by one:
 
No, it's just that instead of doing all the work all the time I automized a lot of my work by writing scripts that do a lot of my work for me, for problems that arise often. But now I need to do the same to foreign data, and nobody else will do this conversion that I need :P
 
8:11 PM
def show(num):
    for x, c in enumerate(str(num)):
        segs = segments[int(c)]
        if x:
            print(f'\x1b[3A', end='')
            for s in segs:
                print(f'\x1b[{4*x}C{s}')
        else:
            for s in segs:
                print(s)
 
nobody cares how I end up with final results as long as I obtain them
 
@piRSquared It's been edited, so I retracted the close vote. I can't say I understand much, because I don't know pandas. Sorry your talent is wasted on me
 
I've found python to be the most productive route since I learned it
 
You're a Data Scientist ?
 
nope, regular one
 
8:12 PM
/rollseyes "Normal Scientist" (-:
 
He probably is, it's just his algorithm puts him into the wrong category
 
Andras is actually a quantum mechanic: he fixes broken quantums.
 
@piRSquared * slap * No explanation or anything on that answer?
 
8:15 PM
@Simon incoming.
 
Do you use more...
matplotlib, numpy, pandas, seaborn... etc...
or
hadoop, elasticsearch, kibana... ?
 
matplotlib, numpy, scipy; that's it for 99% of my stuff
 
For me, the former, but I still take "data scientist" titles
Combinatorial optimisation is wide-open
 
Here in France, big companies only use the second pack. I get why, but to me it's frustrating since I spent a good amount of time learning the former.
 
get better and faster guesses to a practical issue in a service-driven environment, it's still data science
 
8:21 PM
@AndrasDeak I wish I had your job. ;D
 
@IMCoins are you trying to maintain that infrastructure or making use of it?
 
@IMCoins you do ;)
 
The middle ground on data science is probably not workable. People trying to maintain clusters that don't work properly and others trying to use that cluster for its intended purpose
 
@roganjosh Neither. I ""only"" applied to 4 jobs in this field. They liked me even though I have 1 year experience and the job required 5 years of experience... but these companies want people who have immediate experience in their field. But enough about me, I don't feel narcissic tonight haha.
 
And then another bunch of people that don't know how to use the cluster properly even if it was stable
 
8:26 PM
@Simon my posts tend to evolve
 
@IMCoins there was nothing narcissistic (to me) in what you said
 
What is the name of your job ? I'd like to know what's it called so I know where these loving libraries are used.
 
@piRSquared It's better now. (I hope my removed comment did not seem inpolite, sorry if it did)
 
nope, I thought nothing of it (-:
 
@IMCoins theoretical physicist
what I use before post-processing is fortran :P
 
8:31 PM
Damn PhDs. haha
 
I have a feeling that job title comes with baggage outside of programming...
@AndrasDeak I can't help myself. What's your opinion on the simulation hypothesis?
 
I can't get this shifted from my head "fortan"
 
@roganjosh Which is...that our world is a simulation and we're electronic brains in a jar or something?
 
@AndrasDeak **Universe.
 
world == universe
 
8:34 PM
Kinda. But that light has a fixed speed (CPU limited), quantum entanglement making sense if objects were in memory next to each other. Double slit experiment able to back-date whether a photon acted as a particle or wave
 
I believe this sums it up.
 
I don't think my profession is relevant in that matter
 
Theoretical physics?
 
It's a cute idea, but ultimately useless, since if you can prove you're in a sim then it's not a very good sim... unless the people running the sim want you to eventually learn that you're living in a sim.
 
I should read into the subject to be sure but this doesn't sound like a scientific statement. Not something more tangible than the existence or lack thereof of deities.
and if it's not scientific then my being a physicist is irrelevant
 
8:37 PM
From my searches, the vastness of the universe causes issues for me
 
What's interesting about this question is the philosophy behind it.
 
yes, philosophy
 
Take the Truman Show for instance. Does it really matter if you live in a "simulation", if you can never realize it.
 
(to push that theory forwards, maybe as devil's advocate). Either we'd be a quirk of their simulation rules on a micro scale or they would necessarily create a universe so large that we could exist (that the probability of life existing is very small)
 
8:41 PM
@PM2Ring Thanks, I'll read through
 
@IMCoins yes, it would matter to me just as much as knowing that the Universe spontaneously existed. My appetite for the answer is completely separate from the quest to find the answer
 
What doesn't kill us, makes us curious... er? :P
 
I'll give you the flip-side
My father and I acknowledge that one of us will die before the other. This is overwhelmingly likely.
So we have a word that nobody else knows
We have pledged to go to at least 3 mediums. They are not to be believed unless that word is conveyed
 
make sure you never eat the same food or drive in the same car or take the same plane, lest it ruins your experiment
 
8:48 PM
To ruin the experiment would to be us both be dead, and we'll both have the answer :)
 
You wish to discover who will die first ? :P
If you live long enough, Google might give you the answer in the next 50 to 100 years. :D
 
No, that's not the premise. Only that the living person would know whether or not there was something more
 
time travel would really suck for meteorologists...
4
 
You deserve a medal for this one.
 
sP_
[Python: Does `multiprocessing.Process(…).start()` start all processes on the same cpu?
](https://stackoverflow.com/questions/51410836/python-does-multiprocessing-process-start-start-all-processes-on-the-s)
 
9:03 PM
@sP_ please refrain from posting links to questions <48hrs old unless they were already being discussed here
 
And I think you also got a reasonably clear answer to that question already
 
Maybe he needs to look at multithreading/asynchronous difference ?
 
sP_
9:21 PM
@MoxieBall I didn't know this was a rule, just read the rules again, sorry.
@roganjosh I posted here without reading, should have given it some time.
@IMCoins Isn't multi-threading used to run threads asynchronously?
 
Let's Golf Suppose I have an list with lenght that is an arbitrary multiple of 4. I want to take every group of 4 and print it out to a new line. However, I also want the columns to be aligned. Two attempts.
a = ['abcd', 'e', 'fg', 'higklmn', 'opq', 'rs', 'tuvwxy', 'z']
a += a[::-1]

# Pandas/Numpy
print('\n'.join(pd.DataFrame(np.array(a).reshape(-1, 4)).to_string(index=False).splitlines()[1:]))

# This hot garbage
a0, a1, a2, a3 = a[::4], a[1::4], a[2::4], a[3::4]
l0, l1, l2, l3 = [max(map(len, x)) for x in (a0, a1, a2, a3)]
print('\n'.join(f"{x:>{l0}} {y:>{l1}} {z:>{l2}} {w:>{l3}}" for x, y, z, w in zip(a0, a1, a2, a3)))
Should look like this
   abcd       e      fg  higklmn
    opq      rs  tuvwxy        z
      z  tuvwxy      rs      opq
higklmn      fg       e     abcd
 
wim
ooh, new code on SO
I can now see a flag next to comments I've flagged
 
@piRSquared does it matter if they're right or left-aligned?
 
I wish they had used the icon that used to be there when you hovered over the comment instead. This way it looks like I need to click on the button to flag it.
 
@MoxieBall nope
 
9:34 PM
@wim you sure that wasn't always there?
In [45]: print('\n'.join(' '.join(f'{w:>{max(map(len,a))}}' for w in l) for l in zip(*[iter(a)]*4)))
   abcd       e      fg higklmn
    opq      rs  tuvwxy       z
      z  tuvwxy      rs     opq
higklmn      fg       e    abcd
 
pretty good
 
that's where I was going, you beat me there
rbrb all
 
rbrb
 
that exhausting of the iterator via the [pointer] * 4 is a down right dirty. Do you suppose itertools uses that kinda thing in any recipes?
 
 
9:45 PM
FIRE ZE MISSILES
cbg
 
@piRSquared the izip documentation says "The left-to-right evaluation order of the iterables is guaranteed. This makes possible an idiom for clustering a data series into n-length groups using izip(*[iter(s)]*n)." so it's at least on their radar
 
bit more exotic:
In [74]: from textwrap import TextWrapper as T;b=max(map(len,a))+1;print('\n'.join(T(tabsize=b,width=4*b).wrap('\t'.join(a))))
abcd    e       fg      higklmn
opq     rs      tuvwxy  z
z       tuvwxy  rs      opq
higklmn fg      e       abcd
 
the rbrb is a lie
 
well, grouper there is a bit smarter, but the same trick
 
9:59 PM
So digging deeper: Allowing for groups of 6 print('\n'.join(' '.join(f'{w:>{max(map(len,a))}}' for w in l) for l in (zip(*[iter(a)]*6)))) I see that there is a fixed width for each column. I want the column width to vary by the max length in the column.
 
Ah, I see. Yeah, I chose the largest size across the whole list
 
for groups of six, should look like this
  abcd  e  fg  higklmn  opq   rs
tuvwxy  z   z   tuvwxy   rs  opq
 
generalization is left as an exercise for the reader
 
(-:
 
10:15 PM
generalization 1
z=[*zip(*[iter(a)]*6)];n=[*map(max,(map(len,t) for t in zip(*z)))]; print('\n'.join(' '.join(f"{x:{y}}" for x, y in zip(w,n)) for w in z))
 
10:29 PM
rbrb all
 
11:07 PM
rbrb
 
11:17 PM
Hi
I just gained access to chats
I made a Rock Paper Scissors game today if anyone wants to see it and wants to improve it
I'm assuming you can't post links to a project here
 
11:49 PM
Room rules are here sopython.com/chatroom. I don't remember any discouraging linking to personal projects.
 
02:00 - 20:0020:00 - 00:00

« first day (2832 days earlier)      last day (2132 days later) »