- Install Ubuntu Server.
- Update Ubuntu with the commands:
This file contains 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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
server { | |
listen 80; | |
server_name aduffy.org; |
This file contains 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
language: python | |
python: | |
- 2.7 | |
- 3.4 | |
# Setup anaconda | |
before_install: | |
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh | |
- chmod +x miniconda.sh | |
- ./miniconda.sh -b |
This file contains 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
# !/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
__author__ = 'Diego Garcia' | |
import tornado.web | |
import tornado.ioloop | |
import oauth2.tokengenerator | |
import oauth2.grant | |
import oauth2.store.redisdb | |
import oauth2.store.mongodb |
This file contains 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 asyncio | |
import tornado.concurrent | |
import tornado.ioloop | |
import tornado.web | |
import tornado.platform.asyncio | |
import tornado.httpclient | |
class ReqHandler(tornado.web.RequestHandler): | |
async def get(self): |
This file contains 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
#include <string> | |
#include <iostream> | |
#include "H5Cpp.h" | |
#define MAX_NAME_LENGTH 32 | |
const std::string FileName("SimpleCompound.h5"); | |
const std::string DatasetName("PersonalInformation"); | |
const std::string member_age("Age"); | |
const std::string member_sex("Sex"); | |
const std::string member_name("Name"); |
This file contains 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 tornado.ioloop | |
import tornado.autoreload | |
from PyQt4 import QtGui | |
import sys | |
class Window(QtGui.QWidget): | |
def __init__(self): | |
super(Window, self).__init__() | |
self.timer = tornado.ioloop.PeriodicCallback(self.printable, 300) | |
self.timer.start() |
This file contains 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 tornado.httpclient import HTTPRequest, AsyncHTTPClient | |
import tornado.ioloop | |
import tornado.web | |
from tornado import gen | |
GB = 1024 * 1024 * 1024 | |
total_downloaded = 0 | |
def streaming_callback(chunk): |
This file contains 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 time import sleep | |
from tornado.httpserver import HTTPServer | |
from tornado.ioloop import IOLoop | |
from tornado.web import Application, asynchronous, RequestHandler | |
from multiprocessing.pool import ThreadPool | |
_workers = ThreadPool(10) | |
def run_background(func, callback, args=(), kwds={}): | |
def _callback(result): |