This file contains hidden or 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
(require 'epc) | |
(defvar py-epc nil) | |
(defun py-epc:connect (port) | |
(interactive "nEnter py-epc port : ") | |
(setq py-epc (epc:start-epc-debug port)) | |
) | |
(defun py-epc:run-cell-region (start end) | |
(interactive "r") |
This file contains hidden or 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
""" | |
epc_server.py | |
""" | |
from epc.server import EPCServer | |
from epc.server import ThreadingEPCServer | |
import threading | |
__version__ = "0.1" | |
def load_ipython_extension(ipython): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
def dicts_to_html(dicts,keys = None): | |
from IPython.display import HTML | |
if not keys : | |
keys = dicts[0].keys() | |
rows = ["<table>"] | |
header = ["<tr>"] | |
for key in keys : | |
header.append("<th>"+key+"</th>") | |
header.append("</tr>") | |
rows.append("".join(header)) |
This file contains hidden or 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
import os,subprocess,plumbum | |
import servers.secret as secret | |
sshDir = "%s/.ssh" % os.environ['HOME'] | |
def create_ssh_dir(): | |
if not os.path.exists(sshDir): | |
os.mkdir(sshDir) | |
def install_pip2(ssh): |
This file contains hidden or 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
from plumbum import SshMachine | |
from plumbum import local | |
from plumbum.cmd import sudo | |
from plumbum.cmd import grep, wc, cat, head | |
import os,subprocess,digitalocean,shutil,glob,os.path,plumbum | |
import servers.secret as secret | |
from servers.common import sshDir,create_ssh_dir | |
#http://www.robotgoblin.co.uk/blog/2012/07/24/managing-multiple-ssh-keys/ | |
def read_hosts(): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
# Enable compression, to make data link quicker. | |
# Put or append this file in /system/etc/ppp directory | |
# http://forum.xda-developers.com/showthread.php?t=1800351 | |
# Mohammad Bahathir Hashim ([email protected]) | |
# GPL | |
# 2013 | |
crtscts | |
vj | |
bsdcomp |
OlderNewer