One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
#!/usr/bin/env bash | |
# referencing: https://www.moerats.com/archives/507/ | |
set -e | |
# Usage: pipe to `sh` on the fly, or download and use | |
# curl -L https://tinyurl.com/mk-inst-py | PYTHON_VERSION=<2.7.15 or 3.6.5> [SILENT_SUDO=1] sh | |
# wget https://tinyurl.com/mk-inst-py && PYTHON_VERSION=3.6.5 sh ./install_python_from_source.sh | |
if ! [[ "$PYTHON_VERSION" =~ ^(2.7.15|3.6.5)$ ]]; then # required environ var | |
echo "Usage: PYTHON_VERSION=<2.7.15 or 3.6.5> [SILENT_SUDO=1] sh $BASH_SOURCE" |
import pprint | |
class MyPrettyPrinter(pprint.PrettyPrinter): | |
"""PrettyPrint with UTF-8 text. | |
Refer to: http://stackoverflow.com/questions/10883399/unable-to-encode-decode-pprint-output | |
""" | |
def format(self, object, context, maxlevels, level): | |
if isinstance(object, unicode): | |
return (object.encode('utf8'), True, False) | |
return pprint.PrettyPrinter.format(self, object, context, maxlevels, level) |
pkill -f "Jitouch" | |
sleep 5 | |
nohup ~/Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/Jitouch.app/Contents/MacOS/Jitouch > /dev/null 2>&1 & |
""" | |
Add copy to clipboard from IPython! | |
To install, just copy it to your profile/startup directory, typically: | |
~/.ipython/profile_default/startup/ | |
Example usage: | |
%copy hello world | |
# will store "hello world" |
def rolling_window(array, window=(0,), asteps=None, wsteps=None, axes=None, toend=True): | |
"""Create a view of `array` which for every point gives the n-dimensional | |
neighbourhood of size window. New dimensions are added at the end of | |
`array` or after the corresponding original dimension. | |
Parameters | |
---------- | |
array : array_like | |
Array to which the rolling window is applied. | |
window : int or tuple |
[user] | |
name = Pavan Kumar Sunkara | |
email = [email protected] | |
username = pksunkara | |
[init] | |
defaultBranch = master | |
[core] | |
editor = nvim | |
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
pager = delta |