Upgrade python packages from requirements.txt using pip command

I already answered this question here. Here’s my solution: Because there was no easy way for upgrading package by package, and updating the requirements.txt file, I wrote this pip-upgrader which also updates the versions in your requirements.txt file for the packages chosen (or all packages). Installation pip install pip-upgrader Usage Activate your virtualenv (important, because … Read more

NodeJS require a global module/package

In Node.js, require doesn’t look in the folder where global modules are installed. You can fix this by setting the NODE_PATH environment variable. In Linux this will be: export NODE_PATH=/usr/lib/node_modules Note: This depend on where your global modules are actually installed. See: Loading from the global folders.

How to select a CRAN mirror in R

You should either get a window with a list of repositories or a text menu with some options. But if that is not appearing, you can always specify the mirror from where to download the packages yourself by using repos parameter. By doing that, R will not ask you anymore about the repository. Example: install.packages(‘RMySQL’, … Read more

Are there best practices for (Java) package organization? [closed]

I organize packages by feature, not by patterns or implementation roles. I think packages like: beans factories collections are wrong. I prefer, for example: orders store reports so I can hide implementation details through package visibility. Factory of orders should be in the orders package so details about how to create an order are hidden.

How do I write good/correct package __init__.py files

__all__ is very good – it helps guide import statements without automatically importing modules http://docs.python.org/tutorial/modules.html#importing-from-a-package using __all__ and import * is redundant, only __all__ is needed I think one of the most powerful reasons to use import * in an __init__.py to import packages is to be able to refactor a script that has grown … Read more

Where does R store packages?

The install.packages command looks through the .libPaths variable. Here’s what mine defaults to on OSX: > .libPaths() [1] “/Library/Frameworks/R.framework/Resources/library” I don’t install packages there by default, I prefer to have them installed in my home directory. In my .Rprofile, I have this line: .libPaths( “/Users/tex/lib/R” ) This adds the directory “/Users/tex/lib/R” to the front of … Read more

How do I find a list of Homebrew’s installable packages?

brew help will show you the list of commands that are available. brew list will show you the list of installed packages. You can also append formulae, for example brew list postgres will tell you of files installed by postgres (providing it is indeed installed). brew search <search term> will list the possible packages that … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)