conda info --envs
: lists all environmentssource activate <env name>
: activate an environmentsource deactivate
: deactivate an environmentconda list
: list all packages installedconda create --name <env name> python=3 astroid babel
: create new environment, specify version of python, and install packages- WINDOWS NOTE: SOURCE is not recognized. When deactivating and activating in the anaconda command prompt, skip
source
and just typedeactivate
oractivate
depending on what you are trying to do. conda env export > environment.yml
: export conda environment requirements list to a fileconda env remove -n ENV_NAME
: delete environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 | |
height: 500 | |
border: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plot_df <-df %>% group_by(feature) %>% | |
do( | |
plots = ggplot(data = .) + aes(x = xcol, y = ycol) + | |
geom_point() + ggtitle(.$feature) | |
) | |
# show plots | |
plot_df$plots |
- sudo -i : elevate to super user
- du : get breakdown of memory usage of all subdirectories
- df -h : get breakdown of memory usage on disk
- ls -a : show all files in directory (including hidden files)
- rsync : copy files from one server to another (similar to scp but more functionality)
- Set up rsync with sudo
- rsync -az -e "ssh" --rsync-path="sudo rsync" user@servername:/pulled-source-directory /local-directory/
- rsync [source] [destination]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Python: Current File", | |
"type": "python", | |
"request": "launch", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# code for streaming twitter to a mysql db | |
# for Python 3 and will support emoji characters (utf8mb4) | |
# based on the Python 2 code | |
# supplied by http://pythonprogramming.net/twitter-api-streaming-tweets-python-tutorial/ | |
# for further information on how to use python 3, twitter's api, and | |
# mysql together visit: http://miningthedetails.com/blog/python/TwitterStreamsPythonMySQL/ | |
from tweepy import Stream | |
from tweepy import OAuthHandler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 | |
height: 500 | |
scrolling: no | |
border: no |
NewerOlder