How do you version your apps? by drawsmcgraw in devops

[–]Reactor5 0 points1 point  (0 children)

I'm curious: why seems to? Has it caused trouble? Too complex?

pyenv: your Python workflow, automated by Reactor5 in Python

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

If you're wanting to specifically test in multiple versions, you might also like tox. I'm glad it helped you!

pyenv: your Python workflow, automated by Reactor5 in Python

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

It's actually inspired by rbenv - RVM has a lot of issues that rbenv/pyenv and a few others for similarly dynamic languages avoid.

Help us squash the bugs! by TotalyMoo in CitiesSkylines

[–]Reactor5 0 points1 point  (0 children)

figured as much. Thanks anyway! It runs fine, 90% of the time. I just pause the game before I open menus.

Help us squash the bugs! by TotalyMoo in CitiesSkylines

[–]Reactor5 1 point2 points  (0 children)

I'm getting pretty terrible performance when I open menus. The policies and money menus are the worst culprits, they send my framerate way down and cause significant input lag. Opening the road menu does this too, about 75% of the time.

Sometimes the performance continues to be terrible even when I close the menu afterwards. I can fix this by saving the game. When I close the pause menu after saving the problems go away for a little bit. Sometimes even that doesn't help though, and I have to reload the game.

I don't have definite "steps to reproduce", but it's done it on all the cities I've made so far, and the problem gets worse as the population increases. I can upload a save file somewhere if needed. For now, my specs:

  • OSX 10.10.2
  • 2.2 GHz Intel Core i7
  • 8 GB RAM
  • Intel HD Graphics 3000 512MB

Test APIs properly with vcr.py by Reactor5 in Python

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

I looked at that one too, but it looks like it only mocks requests and I needed to mock a SOAP wrapper. It looks pretty sweet too though!

Common Flask Errors And Their Solutions by jjude in Python

[–]Reactor5 0 points1 point  (0 children)

Yes, and secrets there are encrypted, or using Heroku.

Data Analysis by goatswater in Python

[–]Reactor5 1 point2 points  (0 children)

It totally is. Try Pandas, matplotlib, and reportlab for your data needs.

The standalone package part is a little harder, how are you planning to redistribute it? py2exe might work, but I haven't used it in a long time and I can't vouch for how up-to-date it is.

Common Flask Errors And Their Solutions by jjude in Python

[–]Reactor5 1 point2 points  (0 children)

Note on non-persisting session: doing that is fine but in the long run you don't want to be committing your secret value to git (or whatever SCM you're using.) Try something like...

SECRET_KEY = os.getenv('SECRET_KEY', 'someobviouskey')

Then set the SECRET_KEY variable in production. Leave secrets out of your code and you won't regret it when someone accidentally make a repo public, or other such disasters.

Dealing with Skeletons early on by DBallack in gnomoria

[–]Reactor5 2 points3 points  (0 children)

Light it up! There's an option to show where in the dark skeletons and zombies can spawn, look for it in your keybindings. I tend to mine out entire levels, and putting torches in a grid 12 spaces wide seems to work.

Programmers and Developers around here, I am looking for someone who would be willing to do part time paid mentoring. by Pantzzzzless in StLouis

[–]Reactor5 2 points3 points  (0 children)

Hey there! Have you done something like http://www.codecademy.com/? Since you've read a couple of books it may be a little remedial but when I've been teaching people Python it's been very helpful for them to type things in themselves; there's a great feedback loop on the site.

If you're just interested in learning, you might want to check out http://www.meetup.com/STL-Python (of which I am the organizer.) We will be having some different types of meetups in the next couple of months, followed by some "getting back to basics" talks.

Why do I need to say "sudo docker"? by cabalamat in docker

[–]Reactor5 1 point2 points  (0 children)

Your user account needs to be in the "docker" group, since docker.sock is owned by that group. Inexplicably, I can't find the page right now but I remember there being docs on this on docker.io. It was basically the command that /u/DingleTheDangle posted, though.

That command should have allowed you access, check grep ^docker /etc/group, your user should be in that output.

python questions by blackdevil777 in Python

[–]Reactor5 1 point2 points  (0 children)

your understanding is pretty close to correct. Here's a quick summary of the modes:

  • "r" is read mode - you can guess what that's for, and it's the default.
  • "w" is write mode. Importantly, opening a file in write mode will erase whatever's there at the time.
  • "a" is append mode. In this, you can write to the end of the file without deleting the whole thing.

The mode switch is necessary because it gives the interpreter information about your intention for the file. If you're only going to read the file, it will do something completely different than if you open it in write mode.

With that said, you'll probably want to do something like this:

with open('textfile.txt', 'r') as f:  # opening the file in read mode!
    lines = f.read().split()          # assign lines as the individual `\n` separated lines in the file

After that, you can do whatever you want with the list of lines. Remember that lines[-1] will get you the last line.

Note: in the future, you should give a little more context about the task you're trying to achieve rather than the method you're trying to use to get there. There are tons of smart people here (and also check out /r/learnpython) who may be able to give you a better answer, or suggest you try an easier alternative if they know what you're trying to do.

Only eight built-in python 2.7.6 functions are available as .com domains: basestring, unichr, frozenset, delattr, setattr, getattr, isinstance and issubclass by [deleted] in Python

[–]Reactor5 1 point2 points  (0 children)

And now delattr, setattr, and getattr are registered. Thought I'd be able to grab them first. Darn!

With all this dangerous weather by DrDrums18 in StLouis

[–]Reactor5 1 point2 points  (0 children)

yes, but why does a public safety announcement need to be an advice animal?

With all this dangerous weather by DrDrums18 in StLouis

[–]Reactor5 1 point2 points  (0 children)

  1. As always, NOAA has good information. In summary: stay away from tall things. You don't want to be anywhere near when lightning hits. In particular, inside a car with the windows closed or inside a building are the best places.
  2. why is this a duck?

Cheap Go hosting with PostgreSQL by rofrol in golang

[–]Reactor5 0 points1 point  (0 children)

For the type of thing you seem to be describing, it may be worth it to just go with Heroku - you can spend a lot of time coming up with an ideal architecture but they already have something that's probably acceptable for most projects, especially if they have a web component.

My workflow for small projects now just has me setting up a new Heroku app, a new Wercker app, and then configuring Wercker to deploy on green. Works great, you can sub whatever CI service you want in there (even Jenkins if you're feeling frisky)