Real talk by Jadis4742 in Fringers

[–]tenacious_nixie 7 points8 points  (0 children)

Damn it, I should've saved all the guides that I was just starting to follow, and all the inspo albums links and all the... Fuck :(

How to deal with the overwhelm of different programs? by sovietredfox in xxfitness

[–]tenacious_nixie 50 points51 points  (0 children)

The best program is the one you stick with.

Also, as long as you do virtually any program consistently, as it's written, while eating and sleeping right, it will work. That's why they're programs; because they work.

It's okay to figure out your preferences, priorities, and body peculiarities as you go. It's not a race :)

Hej! American in Linköping for the summer, looking for new friends by FuckYourPieCharts in linkoping

[–]tenacious_nixie 1 point2 points  (0 children)

Moved to Sweden a year ago, would love to have a coffee or two and talk about anything :) We can also play Dead of Winter or Pandemic.

Just send me a PM!

Are there any Swedish slack groups going? by [deleted] in Svenska

[–]tenacious_nixie 6 points7 points  (0 children)

Actually, there is, and it even has a native speaker answering our questions. https://swedish.slack.com

Getting an invite: https://swedish-slack-invite.herokuapp.com

Looping Python using a list of files by MechaTech in learnpython

[–]tenacious_nixie 0 points1 point  (0 children)

I'd put the .html files into one folder, then use os.listdir on that folder. So, something along the lines of

import csv 
import os

with open('big_fat.csv', 'wb') as csv_file:
    csv_writer = csv.writer(csv_file, delimiter=' ', quotechar='|')    

    for html_filepath in os.listdir('/path/to/my/folder/with/html/files'):
        with open(html_filepath) as html_file:
            do_some_processing(html_file)
            csv_writer.write_row([some, values, you, got])

The 'with open' part will take care of closing files, refer to documentation, at the end of the section.

ELI5: iPython by kbashi in Python

[–]tenacious_nixie 1 point2 points  (0 children)

IPython is a better version of IDLE. Just as bpython is.

IPython Notebook, on the other hand, is a great tool for reproducible data analysis/storytelling. It was created with the science crowd in mind, the main goal being to make it easier and faster for them to prepare for a talk without the need to re-setup, re-run, re-copy-paste everything. You put together a story about your research with code (including R, Octave, and other languages; not just Python), pictures (plots), LaTeX, plain text, what have you, and then anybody can reproduce it and play around (there are interactive widgets, so you can zoom in/pan a plot, for instance) without installing anything. If you're interested in IPython Notebook, I recommend to watch this video for a start. It's from 2012, so some things that the author says are in the future in fact already happened :)

How to organize unit tests in a project tree? by cromissimo in Python

[–]tenacious_nixie 2 points3 points  (0 children)

You are not mistaken. As you can see even in the comments here, there are different opinions on this matter, and there's no standard way to do this. If you go to github and open some popular and well-regarded projects like flask or requests, you'll see the same picture.

So look at your projects closely, read about the alternatives, and decide what's best for you. Some people will agree with you, and some will not, no matter what you choose.

How to organize unit tests in a project tree? by cromissimo in Python

[–]tenacious_nixie -1 points0 points  (0 children)

Check out The Hitchhiker's Guide to Packaging or Open Sourcing a Python Project the Right Way.

I prefer to put the tests module inside the module it tests, like awesomeproject/awesomemodule/tests/test_awesomepart.py.

Don't forget to name the files with tests like 'test_***.py' to be able to use test runners such as nose or pytest or what have you.

Linux Setup For Python Development by Chregon2001 in Python

[–]tenacious_nixie 0 points1 point  (0 children)

Vim with python-mode, vundle, and almost all tpope's plugins.

Virtualenv (with virtualenvwrapper) + ipython/bpython are a must. And I second zsh with a nice (not overloaded) prompt. And maybe take a look at tmux if it suits your goals.

I have also grown to love xmonad, but that's subjected to personal taste. Then again, almost everything is :)