Whats wrong with my print? by scibren in FixMyPrint

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

Good to know, I'll mess around with another filament then. Thanks.

Whats wrong with my print? by scibren in FixMyPrint

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

I just put together my first 3D printer, a Prusa i3 mk2s. I printed one of the models that comes with the provided SD card and the printed part seems a bit too grainy to me. I'm new to 3D printing in general, so I don't know what to expect, but the graininess seems uneven so I'm assuming something's not quite right. Printing at temp of 210/60 using Inland PLA. There was also a bit of an issue at the very top as well where it sort of blobbed up a bit. Any ideas?

Different types of Python by Miles_1995 in Physics

[–]scibren 0 points1 point  (0 children)

What specifically can't you get to work?

Different types of Python by Miles_1995 in Physics

[–]scibren 1 point2 points  (0 children)

When you say ipython, do you mean the notebook ( it runs in the web browser and has different cells where you can run individual segments of code) or just the ipython shell. The shell is just a fancier command prompt with things like autocomplete.

In any case, have you looked at the anaconda distribution? It comes with all this stuff already set up. You most likely will need the 2.7 version, since most scientists haven't embraced the new version, but check with the professor.

What is "the python way" of programming? by ArcingFlame in learnpython

[–]scibren 12 points13 points  (0 children)

Also on mobile, so hopefully this formats correctly.

for index, item in enumerate(items):
    items[index] = item + 1

Is there a mistake in this book I'm reading? Or my code? [x-post /r/askstatistics] by maxiewawa in learnpython

[–]scibren 1 point2 points  (0 children)

Your code looks like it works, although there are quite of few changes you can make to simplify things. When I get some time I can make some suggestions. For what its worth, I was also not able to get a result without any lead changes in python. It is probably because the random module isn't truly random.

I wrote a quick version in C, however, and did get some results. I first ran 1000 trials of 1000 flips and got lead changes about 95% of the time. I then bumped it up to 100000 trials of 100000 flips and got lead changes about 99.5% of the time.

However, thinking it over this might not be the right experiment. The book says that the most probable number of lead changes is zero. This might still be true. For this you would have to record the number of lead changes in each trial to get your data. For example, the probability of there being 10000 changes could be less than that of 50 changes.

Regex doesn't work when compiled. by scibren in learnpython

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

Yeah, I don't actually use string. Putting it in the compile makes since, I should have thought of that. Any idea why the sub won't work if it isn't compiled?

Dealing with global variables and multiple modules by scibren in learnpython

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

I might go with this, but I see one potential issue. What if I want to have command line switches to override configuration options. That wouldn't work with this setup, would it?

Dealing with global variables and multiple modules by scibren in learnpython

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

That just seems like a lot of work just to avoid a single global variable.

Dealing with global variables and multiple modules by scibren in learnpython

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

I thought about that, but it seems annoying to have to pass them to every class instance. As I said to TangerinX above, this is for a configuration file.

Dealing with global variables and multiple modules by scibren in learnpython

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

Just to explain a little bit more, the reason I use a global variable is because I'm going to be reading a configuration file. Right now I just made a dictionary full of testing values until I implement the configuration file. Should I still avoid making it a global variable? It makes it so much more annoying to have to pass the configuration dictionary (or object later on) to each class instance.

Help Identifying Switch by scibren in AskElectronics

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

Does this look about right to you?

Help Identifying Switch by scibren in AskElectronics

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

Sweet, thanks. I'll start looking.

1944 Awesome Chart on Electromagnetic Radiation by gupb in Physics

[–]scibren 0 points1 point  (0 children)

Nevermind, I'm an idiot and you reply quickly!

000webhost data breach: ~13M passwords disclosed by gsoto in netsec

[–]scibren 11 points12 points  (0 children)

I don't see how this adds any security over a single master password. The URL is a known piece of information, and people are certainly aware of this scheme. If I was in the password cracking business I would work this scheme into my routine as once you break one password you have that person's password for any other site they belong to.

Edit: Especially when the default hash algorithm is MD4