« first day (2156 days earlier)      last day (2809 days later) » 

8:33 PM
Howdy,
 
cbg
 
cbg
 
Just making sure I understand something from the Python website... "The continue statement, also borrowed from C, continues with the next iteration of the loop" this means that the current iteration of the loop is terminated and next is started. Correct?
 
yes
 
Bueno, thank you :)
 
8:34 PM
but why don't you try it?
you'll never learn python on paper
 
Simple question: if I have A = [[1,2],[3,4]], how would I use tile to get [[1,1,2,2],[3,3,4,4]]
 
@MikeVandenberg I'm not sure tile will do that for you, tile...tiles:)
 
I just like to confirm that I am utilising something correctly is all :) although I do understand your sentiment
 
and prepend "numpy", most of the guys here don't use it
 
utilizing^
 
8:36 PM
ah thanks for the heads up. Sorry let me actually rephrase I cus I typed my output wrong anyway
 
ok, the answer is probably np.repeat
 
looking for [[1,1,2,2],[1,1,2,2],[3,3,4,4],[3,3,4,4]]
 
repeat+tile
In [100]: np.repeat([[1,2],[3,4]],2,axis=1)
Out[100]:
array([[1, 1, 2, 2],
       [3, 3, 4, 4]])
repeat first, then tile this [1,2] times
wait
I misread it first...
you need two repeats, along perpendicular dimensions
In [104]: np.repeat(np.repeat([[1,2],[3,4]],2,axis=1),2,axis=0)
Out[104]:
array([[1, 1, 2, 2],
       [1, 1, 2, 2],
       [3, 3, 4, 4],
       [3, 3, 4, 4]])
 
ah there it is
 
and the order should be irrelevant
np.kron(np.arange(1,5).reshape(2,2),np.ones((2,2))) is another option:P
 
8:41 PM
I'm moving onto my GPU parallelization so I'm trying to avoid kron
 
OK:)
 
Admittedly, I believe I'm in way over my head but we shall see
 
good luck with it
 
Cbg
Maths SE is being completely useless today
 
Weekends :/
 
user6568562
8:53 PM
@AndrasDeak You're green again : D Nice
 
He became green the Kevin way.
 
user6568562
Hey Bhargav. What's new on that IntelliGate
 
Which is the better target 1 2?
@randomhopeful *IntelliPaat.
Not much. Need to go in the afternoons. :/
 
user6568562
 
user6568562
~ 2 Kbits / sec upstream / ~ 4 Mbits / sec downstream. I think Nasa and I share the same ISP
 
kepler probably doesn't do bittorrent though:P
 
is it possible to add tuple elements to single-valued elements in a list?
 
Can ya provide an example?
 
i have a list of values [1,2,3,4,5...] and i want to associate values with those values later, [(1,10),(2,20),(3,30)...]
 
9:22 PM
is that a dummy example? or your use case?
if you just want to index your second list, you can use enumerate(lst,start=1) (or list(enumerate(...)) in python3 to have a list)
 
that is a dummy example but it is essentially the same
 
@user5797668 Use zip
 
or that ^ :)
 
Create your second list and pass it
 
zip(lst1,list2)
 
9:23 PM
oh right, zip
 
>>> zip([1,2,3,4,5], [10,20,30,40,50])
[(1, 10), (2, 20), (3, 30), (4, 40), (5, 50)]
 
in python 2 ^
in py3 you need list(zip())
 
i guess i cann't do it one by one, but all at once, but i think that is fine
 
@AndrasDeak Oh, good catch
 
i worry that want i'm doing is an approximation of objects however
 
9:23 PM
@user5797668 You can build up your list
 
a collection of attributes for each entry..
 
approximation of objects?
 
without knowing what you're really talking about, I'm not sure we can help you:)
 
i presume i have to remember which index into the tuple contains the desired attribute..
 
First think of concrete example that you can provide or a good explanation of what you're after.
 
9:25 PM
so if the format is (time, energy, extra_info)..
i'd have to say list[0][3] to get the extra_info associated with that entry
instead of list[0].extra_info
 
[0][2] actually
 
yeah 02 sorry
 
You can create a dictionary instead then
Like this
>>> dict(zip(["time", "energy", "extra_info"],["time_val", "energy_val", "extra_info_val"]))
{'energy': 'energy_val', 'extra_info': 'extra_info_val', 'time': 'time_val'}
Unless you can generate the dictionary along the way
 
cbg
 
9:28 PM
Cbg
 
user6568562
Yo @Antti [ :
 
user6568562
Oh, I see, I am* the breaker of the cabbage-streak idjaw was speaking about
 
@randomhopeful !!!
 
user6568562
I'm sorry, man. I'm still learning the art of of room-sixing : D
 
Rhubarb all, Bit busy.
 
9:32 PM
@randomhopeful you're number 6!
 
user6568562
@AnttiHaapala If it's something cool, I'll take it
 
user6568562
@AndrasDeak I feel you would like this channel if you don't already
 
I'm not really the following kind of person:)
I try not to go too close to astronomy, it sucks you in
 
user6568562
I feel there's something fishy behind YT not allowing users to easily search by date. This infinite scroll thing smells of bandwidth poverty
 
Knowing google it's just the online equivalent of making a maze out of shopping centers and IKEAs.
the more content they can shove in your face until you find what you're looking for, the better
 
user6568562
9:47 PM
Oh that makes sense, and it's actually something I saw Operators and ISPs use a lot. Make you go through an hour of promo before giving you menu-dial options
 
user6568562
One day I'll make a terra terrabyte home server and have my own internet of vidz, tunez and lolz. I'll only use internet to come and break cabbage-steaks
 
I don't want to sound like a smartass, but it's tera with a single r, and tera tera would probably be yotta
 
user6568562
Oh I see. Yeah terra would be the earth in Greek or Latin
 
user6568562
A yotta yottabyte then : D
 
@randomhopeful yup
@randomhopeful also, it's not a real internet without 90% of it being porn
I don't expect you to produce all that yourself
 
user6568562
9:53 PM
Hahaa, that would be a bit too much narcissistic to make your own summin-summin moving picture
 
sorry if I was being ableist:P
 
user6568562
I'll probably make a Python scraper and come ask you guys for help
 
user6568562
The yotta-yotta-filler
 
just dd if=/dev/random of=/mnt/my_interwebz
Oh, I found a good reference for the "should we close crap" discussions that often occur. I've seen it earlier, then lost it, now Hans linked to it once more
190
A: Should trivial re-occurring questions really be answered?

Hans PassantA question like this would have been closed in a heartbeat in the olden days. But not anymore, it is hard to close it today. There's history behind this that's relevant. The two site founders, Jeff Atwood and Joel Spolsky, had very different ideas what kind of questions should be on topic for ...

I'm also sad right now
 
user6568562
Don't be. As much as Antwood was so right [And you gave me a link to the blog post Answer Author mentioned], if SO is meant to endure, we'll find the efficient way to contain this problem by trial and error
 
user6568562
10:02 PM
Otherwise, you know there will be blackjack and hookers
 
there won't, Jeff is gone for good
and SO has too much of an advantage to rebuild someplace else
and all the experts who've worked for long years wouldn't want to start from scratch in a safe place where vamps get garlic
 
user6568562
I see your point very well. I'm most probably optimistic because I'm still too new to SO
 
user6568562
I mean I didn't feel a shred of fatigue due to seeing the same mediocre thing happen again and again and again, yet*
 
I'm not much of a veteran myself, but I compensate with cynism.
 
user6568562
Hey, unrelated, but I just remembered something from my childhood. Our trains from that time were built by Ganz Mavaq, a company in Budapest
 
user6568562
10:16 PM
Any meaning to their name ?
 
user6568562
 
user6568562
I can still smell that sweet odor of unchanged oil filters
 
10:29 PM
Ganz-MÁVAG:) Ganz is the family name of Ábrahám Ganz, one of the greatest industrial magnates in the 19th century. Ganz-MÁVAG comes from a merger with MÁVAG, the name of which is an acronym of Magyar Királyi Állami Vas-, Acél- és Gépgyárak (literally: Hungarian Royal State Railroads' Machine Factory)
 
@AndrasDeak are popularizing hungary -- again? ;)
 
ummm...I stole the translation from the wikipedia article; the Hungarian acronym actually says "Hungarian Royal Iron, Steel and Machine Factory" (but it's been changed to comply with MÁV = Magyar Államvasutak, Hungarian Railroad lines, I can only assume due to lack of Royalness in Hungary after the Monarchy)
@PeterVaro I didn't start it this time:P
 
don't get me wrong, I'm glad you do, just askin' ;)
 
then yes;D
 
10:34 PM
:D
 
user6568562
@AndrasDeak Man, that's really impressive. I was mistaking the g for a q. In 59 our elders were debating whether it's okay or upsetting to pray on donkey skin
 
user6568562
@PeterVaro Come on, I asked and he graciously answered
 
@randomhopeful FYI I'm also hungarian -- this was an inside joke, you know :P
 
user6568562
@PeterVaro Oh : D Sorry, now I see
 
@MartijnPieters I love your explanations.
 
10:40 PM
@idjaw Thanks! I enjoy writing them :-)
 
Any Windows users here know if you 100% can use subprocess.call without shell=True? I'm finding different answers and I can't test this myself (no windows here). I'm just wondering if I should suggest to an answerer to provide a shell != True alternative
 
user6568562
@idjaw I have Windows and Powershell, if you can guide me through the steps, I can do it and tell what I get
 
@randomhopeful This is the question in question stackoverflow.com/questions/39430972/…
the command seems fairly straightforward. I guess try to run any exe, or try to run a multiple command line without using shell=True
to see if Windows goes crazy
Thank you for doing this btw. Really appreciated!
 
user6568562
10:55 PM
The pleasure is all mine, I assure you. But I'm really noob so if you can tell me the command because I can't get it from what I read
 
@randomhopeful You can just replace Installer.exe with any valid exe on your computer, like notepad.exe
(you might need to provide the full path...not sure)
 
@idjaw I tried and it worked good
import subprocess

for i in range(0, 10):
    subprocess.Popen('notepad.exe', shell=False)
 
user6568562
@idjaw I'm really sorry, I get it now : D I was panicking like a damsel, but I see it. I'll tell you in a sec
 
@Slayther Thanks, but can you try this actually, instead:
subprocess.Popen(['notepad.exe'])
 
All good
Nothing out of the ordinary
 
10:59 PM
k awesome.
I wonder if there is anything that breaks it...hmmm
 
:)
 
can you try running a dir (last time I swear :P)
 
A dir?
And no worries bro, I can do this all day :D
 
whatever the equivalent of "ls" is to list the contents. Or even better, if any of you guys know of a good multi command line so you can do something like

['a', 'b', 'c']
each one of those being a command, obv.
sorry for all the demands =/ I should really get around to setting up my windows machine as a temporary dev machine at times :P
(brb)
 
Well ls is ls
But I'm not sure what you mean by "multi command line" "['a', 'b', 'c']"
What commands would I put there ?
import subprocess

for i in range(0, 10):
    subprocess.Popen(['ls'], shell=False)
Just opens those 10 cmd's manically and closes them.
Which is normal
And I can see flash of text that on the cmd's, which would be my dir's
 
11:07 PM
cool. Thanks
 
And what would be multi command line?
 
<command1> & <command2>
at least that's what I think it would be in windows?
so
 
Yeah
Like echo Hi & echo Bye ?
 
subprocess.call(['command1', '&', 'command2'])
 
Ok, what I put in those commands?
 
11:10 PM
@Slayther yeah that might work too
 
Just echos?
 
echo hi & echo bye
 
Ok
 
yeah
 
Those arguments aren't for concatenation of commands, it seems
WindowsError: [Error 2] The system cannot find the file specified
 
11:12 PM
Anyone got experience in PyOpenCL? Need some help writing a simple kernel
 
@MikeVandenberg Not me, unfortunately
@idjaw Should I put something else as arguments?
 
user6568562
@idjaw I'm sorry man I'm not gonna be of much help : /
 
@randomhopeful Don't worry. I'm helping him already. :)
@idjaw Oh, right, subprocess opens a task / process, it doesn't execute commands
 
yeah, ultimately, just trying to see if not using shell=True in Windows breaks easily and it is needed for some reason
 
@idjaw Doesn't seem to be needed to run error-free
But, I did used it before, where I needed shell=True for some reason
Can't remember why
 
11:21 PM
^^ Yeah that is what I was seeing, that a lot of windows uses shell=True a lot
 
I think I needed shell=True to pipe errors
I have one snippet saved
 
ah excellent. You can avoid that actually, which means it is behaving just like non-windows as well
that's good to know
thank you!
 
You're welcome! :D
 
btw.... just to let you know, to avoid shell=True when piping to a file, check this: stackoverflow.com/questions/2331339/…
 
Oh, so I can just remove that line
Because I already have those pipes set up
 
11:26 PM
I can find a more explicit example to show you how to work with it...hold on
there we go...that should be good...you can simply change that file open to use a context manager instead...but whatever, general solution is there
 
I already have that set
6 mins ago, by Slayther
https://gist.github.com/anonymous/5120da9e3bbd9b1034196a12a2b369c2
 
Heh, I've only now noticed that ipython has switched to ipython3 by default on my laptop
I love it!
 
@AndrasDeak Yeah, Python is awesome like that :)
 
I wish matlab's supported non-nvidia GPU's and I didn't have to learn an entirely new language to accomplish this task...
 
what's a non-nvidia GPU?;)
Look at it this way: you'll never have to use matlab ever again:P
I mean, you could never say something as poetic as np.einsum('abc,decfg->bdaecfg',rho_in,proj).reshape((NN,NN,num_probes,nbins_pha‌​‌​se,nbins_quadrature)) in matlab
 
11:35 PM
you have my heart
 
(see? it worked)
 
@AndrasDeak Add that to Shakespeare's sonnet collections
♫ :D
 
I might be biased, I'm an einsum fanboy
 
Good, now that note doesn't look like sperm
@AndrasDeak We're all biased towards something
 
11:39 PM
@AndrasDeak Specifically AMD GPU. Matlab only supports CUDA acceleration which is why I'm trying to learn OpenCL.
 
yeah, I know
I was trying to joke, sorry
 
Sorry =( shitty day fighting with this project
 
it probably wasn't funny:P
 
At least my code compiles? My answers are so far from correct it's astounding but hey
 
always suspect single precision though
 
11:44 PM
definitely working doubles this time
 
Can you implement the thing in the same way in numpy first? So that you only have to port it to opencl without reimplementing?
 
I think I've gotten that far. I used your repeating answer from earlier to replicate the kron function
now I'm trying to port over that elementwise multiplication between the repeated and tiled inputs to opencl
 
come to think of it, how is np.repeat more accessible than np.kron?
 
I was trying to start with porting over the simplest part of the project we worked on last night first. So I wanted to achieve elementwise kronecker multiplication on the GPU
Worry about efficiency and tiling and such later I guess
 
what are you working on exactly?
 
11:48 PM
    K = zeros([N*N,N*N],dtype=complex64)

        for a in range(num_probes):
            for m in range(nbins_phase):
                for n in range(nbins_quadrature):
                    temp1 = transpose(rho_in[:,:,a])
                    temp2 = proj[:,:,a,m,n]

                    M = kron(transpose(rho_in[:,:,a]),proj[:,:,a,m,n])

                    pr = real(trace(E*M))
                    if pr<=0:
                        pr = 1/(10**35)

                    K = K + H[m,n,a]*M/pr
        K = K/sum(sum(sum(H)))
rip formatting =(
close enough
 
ah ty.
I just opened a full question on stackexchange with my progress towards parallelizing the kronecker products
 
yeah, whoever follows pyopencl should see that
 
I'll give that question some time to marinate then. I've been trying to study some basic lecture series and tutorials on GPGPU in general but the most helpful ones that I've found are all CUDA or C oriented.
 
yup, with less mainstream tools patience is key
 
11:54 PM
I found some brilliantly documented examples of matrix dot products with several improved algorithms and everything but alas, none for outer products
and I'm just not experienced enough to modify them properly
 

« first day (2156 days earlier)      last day (2809 days later) »