#Debian 8 DO Locale Issues Fix
##Problem
"Locale problems" in both the 32-bit & 64-bit versions of Debian 8 droplets
Create a new Debian 8 droplet and login as root
:
autoload -Uz colors && colors | |
autoload -Uz vcs_info | |
zstyle ':vcs_info:*' check-for-changes true | |
zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes | |
zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes | |
zstyle ':vcs_info:*' actionformats '%F{5}(%F{2}%b%F{3}|%F{1}%a%c%u%m%F{5})%f ' | |
zstyle ':vcs_info:*' formats '%F{5}(%F{2}%b%c%u%m%F{5})%f ' | |
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' | |
zstyle ':vcs_info:*' enable git cvs svn |
PROMPT='%(!.%B%F{red}.%B%F{green}%n@)%m %F{blue}%(!.%1~.%~) %{$fg[cyan]%}$(virtualenv_prompt_info) %{$reset_color%}% ${vcs_info_msg_0_}%(!.#.$)%{$reset_color%} ' |
pyenv activate your_env | |
pip install jupyter | |
python -m ipykernel install --user | |
pyenv deactivate | |
# by Henrique Bastos |
redis-server /usr/local/etc/redis.conf |
"""IPython startup script to detect and inject VIRTUAL_ENV's site-packages dirs. | |
IPython can detect virtualenv's path and injects it's site-packages dirs into sys.path. | |
But it can go wrong if IPython's python version differs from VIRTUAL_ENV's. | |
This module fixes it looking for the actual directories. We use only old stdlib | |
resources so it can work with as many Python versions as possible. | |
References: | |
http://stackoverflow.com/a/30650831/443564 |
#Debian 8 DO Locale Issues Fix
##Problem
"Locale problems" in both the 32-bit & 64-bit versions of Debian 8 droplets
Create a new Debian 8 droplet and login as root
:
############################################################################## | |
# | |
# An example of converting a Pandas dataframe with datetimes to an xlsx file | |
# with a default datetime and date format using Pandas and XlsxWriter. | |
# | |
# Copyright 2013-2015, John McNamara, jmcnamara@cpan.org | |
# | |
# http://xlsxwriter.readthedocs.org/example_pandas_datetime.html#ex-pandas-datetime | |
# | |
import pandas as pd |
// https://danlimerick.wordpress.com/2014/01/18/how-to-catch-javascript-errors-with-window-onerror-even-on-chrome-and-firefox/ | |
window.onerror = function (errorMsg, url, lineNumber, column, errorObj) { | |
alert('Error: ' + errorMsg + ' Script: ' + url + ' Line: ' + lineNumber | |
+ ' Column: ' + column + ' StackTrace: ' + errorObj); | |
} |
# -*- coding: utf-8 -*- | |
# Natural Language Toolkit: Interface to the Stanford NER-tagger | |
# | |
# Copyright (C) 2001-2014 NLTK Project | |
# Author: Nitin Madnani <nmadnani@ets.org> | |
# Rami Al-Rfou' <ralrfou@cs.stonybrook.edu> | |
# URL: <http://nltk.org/> | |
# For license information, see LICENSE.TXT | |
""" |