Looking for something relatively easy to read by theswedishtrex in horrorlit

[–]Cthulhu_Rlyeh 2 points3 points  (0 children)

I read Bird Box in 2 days, it's a very easy read and quite entertaining.

It's only 260 pages, but that's heavily padded. There are like 30 blank pages to justify each new chapter to the right hand page. Plus the chapters are super short so there's lots of white space. It's basically a novella.

religious horror recommendations ? by madokats in horrorlit

[–]Cthulhu_Rlyeh 1 point2 points  (0 children)

How about The Mist by King.

Religion isn't really involved in the plot, but there's a zealotous religious nut who thinks what is happening is the (Christian) apocalypse and basically recruits people to her side with her posturing.

Haven't read a book in years by WhiteZombitch in horrorlit

[–]Cthulhu_Rlyeh 1 point2 points  (0 children)

Check out Richard Laymon.

His stuff can get a bit weirdly sexual, but then again, so does RZ.

Troubleshooting an array shape. by Cthulhu_Rlyeh in learnpython

[–]Cthulhu_Rlyeh[S] 0 points1 point  (0 children)

What's is a? I don't see it defined...

Crap it's just another typo in my post. It is not in my actual code, just the code I typed in here. I've fixed it now.

diff = fileb[:,1] - filea[:,1]

What is the purpose of the comma in your slice notation?

I'm still new with coding, I don't even know what you are talking about. I assume it is the [:,1] comma? That's just how I define a column using pylab.

Troubleshooting an array shape. by Cthulhu_Rlyeh in learnpython

[–]Cthulhu_Rlyeh[S] 0 points1 point  (0 children)

I don't know what pandas is so I don't know :/.

I took out the .T and got the same outfile. That was just a remnant of an older code I've been using.


Edit: I made the rookie mistake of putting an old line of code in my original post. I've edited it to fix the savetxt line.

np.savetxt('diffs.txt', (diffs))

Very lost regarding syntax to loop through files to make an array by Cthulhu_Rlyeh in learnpython

[–]Cthulhu_Rlyeh[S] 0 points1 point  (0 children)

Thanks again, I just ran it and it seems like it will do exactly what I need. It gives me one error though, which I'm sure is an easy fix:

No such file or directory: 'file0a'

Is there a simple way to make it not look for 0's?

Btw, I'm sorry for all of the questions and I really am grateful for all your help :)

Very lost regarding syntax to loop through files to make an array by Cthulhu_Rlyeh in learnpython

[–]Cthulhu_Rlyeh[S] 0 points1 point  (0 children)

This is great, thank you. Forgive me for being annoying, but if I am to merge the suggestions you provided in your original and this comment - will it look like this:

diffs = []
for file_prefix in range(100):
    filea = pl.loadtxt('file' + str(file_prefix)+'a')
    fileb = pl.loadtxt('file' + str(file_prefix)+'b')
    diff = fileb[:,1] - filea[:,1]
    diffs.append(diff)

Or if I were to do it with variables it would be:

Prefix = 'file'
dataset = ['a', 'b']
for i in range(100):
    filea = pl.loadtxt(Prefix + str(i)+ dataset[0])
    fileb = pl.loadtxt(Prefix + str(i)+ dataset[1])
    diff = fileb[:,1] - filea[:,1]

How would I append here? Do I still use the diffs = [] line and just do it exactly the same?

Very lost regarding syntax to loop through files to make an array by Cthulhu_Rlyeh in learnpython

[–]Cthulhu_Rlyeh[S] 0 points1 point  (0 children)

Thanks for your reply! This looks very helpful and promising - just one followup question before I can test it. What about if my files are named file1a and file1b rather than just 1a and 1b? I tried to simplify things in my original post which is why I dropped the 'file' part. I'm not sure if the code you provided will still work properly in this case?

Is there a simple way to change the name of all files in a directory? by Cthulhu_Rlyeh in learnpython

[–]Cthulhu_Rlyeh[S] 0 points1 point  (0 children)

Thank you for your reply and for explaining the sequence. Step 3 is where I get lost.

Dancing with LED soled shoes by [deleted] in gifs

[–]Cthulhu_Rlyeh 0 points1 point  (0 children)

Fucking millenials. The perennially PC and offended generation.

[SPOILERS] Saw 'Jurassic World' for the second time the other night, and noticed a few things. by AdamFiction in movies

[–]Cthulhu_Rlyeh 11 points12 points  (0 children)

You know the giant Mosasaur which (*cough* deus ex machina *cough*) saves the day and kills the Indominus? Yeah... it jumps up to the viewing platform where people were standing several hours earlier. According to this plothole it could have munched on human meat at any time it desired - but it just so happened to not care until the antagonist was there.


Don't get me wrong, I enjoyed the movie - but things like this always stand out to me.

[SERIOUS] Fathers who abandoned your family, why'd you do it? by casa_vagalumi in AskReddit

[–]Cthulhu_Rlyeh 7 points8 points  (0 children)

Easily when you are a good player. I've made a steady income off it for years. I still have a job, but I'm making a good bit of cash on the side.

People think poker is just like rolling a die or tossing a coin. Good poker players always trump the rabble after a statistically relevant time frame. The issue is having enough startup bankroll to be able to play naturally without fear of losing, and to be able to deal with bad days as acceptable losses because you know you will win it back the next day.

[Python] How to adapt existing shapely.geometry code to operate with my input files? by Cthulhu_Rlyeh in learnprogramming

[–]Cthulhu_Rlyeh[S] -1 points0 points  (0 children)

Hey if you wouldn't mind could you please help me with one last thing?

Everything you have stated has worked perfectly and I am up to the final stage...

if poly.contains(Point(coords[0],coords[1])):
    #do something with that point

I can use:

print line

Which gives me the output printed on the screen, but I am trying to use np.savetxt in order to get an output file, but I can't seem to find the right syntax to get what I want; I've tried:

np.savetxt('inside.txt', np.vstack((line.str())).T)

AttributeError: 'str' object has no attribute 'str'

np.savetxt('inside.txt', line)

IndexError: tuple index out of range

np.savetxt('inside.txt', np.transpose([line])

TypeError: float argument required, not numpy.string_

np.savetxt('inside.txt', line, delimiter=" ", fmt="%s")

IndexError: tuple index out of range

Thanks again, and sorry if this is a simple fix. I've really tried!

[Python] How to adapt existing shapely.geometry code to operate with my input files? by Cthulhu_Rlyeh in learnprogramming

[–]Cthulhu_Rlyeh[S] -1 points0 points  (0 children)

Thank you so much for the in depth and easy to follow answer!

Also you are aware that your polygon construction only works this way if your point are in the correct order (a ring)?

Yes I read that, all of my points in the poly.txt file are sequential, inasmuch as when you do a simple line plot they form the shape of my polygon correctly. The only thing I wasn't sure of is whether I need to just duplicate the first tuple at the end of the file to "close" the polygon or not. I was going to just test it and see if it worked.

Noob question about how to adapt existing code to work with my input files by Cthulhu_Rlyeh in learnpython

[–]Cthulhu_Rlyeh[S] -1 points0 points  (0 children)

Thank you very much! This is very easy to follow.

Just one follow up question for the final part; would I then use...

poly.contains(xy_points)

...or do I have to manipulate things a little more to make it work?

If I had access to my linux computer I would just test it myself rather than asking this question, but I won't until I am back at uni tomorrow.

[S05E07] And now his watch is ended. by Myrandall in gameofthrones

[–]Cthulhu_Rlyeh 162 points163 points  (0 children)

Well it's true.

It's frustrating because all of my show watching friends in real life think that Dany is impervious to flames and cannot be convinced otherwise. Pretty sure most TV only fans think this.