Skip to content

Instantly share code, notes, and snippets.

Installing Python 3 compatible Fabric

Unfortunately, Fabric has not yet officilly been ported to Python 3. However, it is possible to get it to work. Here is how I did it.

First, create a virtual environment to run fabric in. (If you haven't set up virtual environments for Python, go ahead and do that now, then come back.) I have the [fink environment] (http://finkproject.org) installed on my Mac, and

@8dspaces
8dspaces / robot_framework_highlight_notepad++.xml
Created April 2, 2016 05:22 — forked from Tattoo/robot_framework_highlight_notepad++.xml
Robot Framework syntax hilighting for Notepad++
<!-- take into use:
Save this file
Open Notepad++
Select menu: Language > Define your language...
You get a popup. Select "Import", navigate to xml-file
Click "Save as" and name your file eg. "RobotFramework"
Now you can open a Robot test suite file and select from Languages -menu the correct language (in the bottom)
-->
<NotepadPlus>
<UserLang name="RobotFramework" ext="txt">
@8dspaces
8dspaces / HP_ALM_python
Created December 11, 2015 09:28 — forked from barkady/HP_ALM_python
HP ALM python RESTful client
# -*- coding: utf-8 -*-
__author__ = 'Arkady.Babaev'
import requests
import xml.etree.ElementTree as ET
class ALMUrl:
def __init__(self, ip, port, domain, project):
self.__base = u'http://' + ip + u':' + port + u'/qcbin'
self.__auth = self.__base + u'/authentication-point/authenticate'
@8dspaces
8dspaces / ipy_repl.py
Created December 10, 2015 07:25 — forked from MattDMo/ipy_repl.py
SublimeREPL ipy_repl.py for running IPython 4/Jupyter in Sublime Text
import os
import sys
import json
import socket
import threading
activate_this = os.environ.get("SUBLIMEREPL_ACTIVATE_THIS", None)
# turn off pager
os.environ['TERM'] = 'emacs'
@8dspaces
8dspaces / bobp-python.md
Created November 22, 2015 13:34 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@8dspaces
8dspaces / client.js
Last active August 30, 2015 04:20 — forked from steinwaywhw/client.js
A minimal term.js server/client demo. To be used with node.js
var client = {};
client.run = function (options) {
options = options || {};
var socket = io.connect(options.remote || "http://localhost:8080");
socket.on('connect', function() {
var term = new Terminal({
import unittest
from pyramid import testing
from paste.deploy.loadwsgi import appconfig
from webtest import TestApp
from mock import Mock
from sqlalchemy import engine_from_config
from sqlalchemy.orm import sessionmaker
from app.db import Session
@8dspaces
8dspaces / pyramid_test_example.py
Created April 2, 2015 15:00
research how to test pyramid
import unittest
from pyramid import testing
from paste.deploy.loadwsgi import appconfig
from webtest import TestApp
from mock import Mock
from sqlalchemy import engine_from_config
from sqlalchemy.orm import sessionmaker
from app.db import Session
@8dspaces
8dspaces / 0_reuse_code.js
Last active May 19, 2018 13:39
算法练习(一)
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console