Skip to content

Instantly share code, notes, and snippets.

Avatar

Min RK minrk

View GitHub Profile
@minrk
minrk / client.py
Created Nov 9, 2017 — forked from costrouc/client.py
Asyncio Majordomo Protocol (18/MDP)
View client.py
import asyncio
import logging
import zmq
import zmq.asyncio
from scheduler import SchedulerCode
class Client:
View big.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Untitled1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View matplotlibrc
### MATPLOTLIBRC FORMAT
# This is a sample matplotlib configuration file - you can find a copy
# of it on your system in
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
# there, please note that it will be overridden in your next install.
# If you want to keep a permanent local copy that will not be
# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux
# like systems) and C:\Documents and Settings\yourname\.matplotlib
# (win32 systems).
View forwarder.py
import logging
import zmq
def main():
context = zmq.Context()
frontend = context.socket(zmq.PULL)
frontend.bind('tcp://*:5559')
backend = context.socket(zmq.PUB)
View build_pandoc_for_heroku.sh
# bring up the vagrant VM
sudo apt-get install vagrant
git clone https://bitbucket.org/puffnfresh/vagrant-haskell-heroku.git
cd vagrant-haskell-heroku
vagrant up
vagrant ssh
# run this in vagrant shell
cabal update
cabal install cabal-install
View ipynb_run_save.py
#!/usr/bin/env python
"""
Script for running and save notebooks from command line.
How to use: `ipynb_run_save.py foo.ipynb
Some tweaks over ipydoctest.py from minrk
by @damianavila
"""
View ondemand_scheduler.py
from IPython.parallel import Client
from IPython.parallel import interactive
import time
import random
@interactive
def work(i):
import time
import random
sleeptime = 1 + random.random() * 2
View embedded_qtconsole.py
import os
from IPython.frontend.qt.console.rich_ipython_widget import RichIPythonWidget
from IPython.frontend.qt.kernelmanager import QtKernelManager
from IPython.frontend.qt.inprocess_kernelmanager import QtInProcessKernelManager
from IPython.kernel.zmq.ipkernel import Kernel
from IPython.kernel.inprocess.ipkernel import InProcessKernel
from IPython.lib import guisupport
View parallel_tweaking.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.