Skip to content

Instantly share code, notes, and snippets.


Mike DePalatis mivade

View GitHub Profile
a10y / nginx.conf
Last active Jan 23, 2016
Nginx + LetsEncrypt Configuration With Proxying to Github Pages
View nginx.conf
worker_processes 1;
events {
worker_connections 1024;
http {
server {
listen 80;
yoavram / .travis.yml
Last active Jun 7, 2019
Build and deploy conda packages to from Travis-CI
View .travis.yml
language: python
- 2.7
- 3.4
# Setup anaconda
- wget -O
- chmod +x
- ./ -b
drgarcia1986 /
Last active Jun 13, 2021
Example of OAuth2 autentication server with Client Credentials grant (using python-oauth2 and tornado)
# !/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Diego Garcia'
import tornado.web
import tornado.ioloop
import oauth2.tokengenerator
import oauth2.grant
UnderGreen / installation.rst
Last active Oct 29, 2020 — forked from marcinkuzminski/installation.rst
Installation instruction for Kallithea
View installation.rst

Setting up Kallithea on Ubuntu Server 12.04


  1. Install Ubuntu Server.
  2. Update Ubuntu with the commands:
arvidfm /
Last active Dec 4, 2018
Running Tornado on asyncio's event loop, including 'yield from' support in request handlers
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):
YukiSakamoto / hdf5_simple.cpp
Created Aug 23, 2013
simple example to write hdf5 using c++.
View hdf5_simple.cpp
#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");
yanmhlv / gist:6220591
Created Aug 13, 2013
Launch PyQt4 with tornado
View gist:6220591
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)
ajdavis /
Created May 22, 2013
Big download demo with Tornado 3.0.1 and pycurl.
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):
methane / gist:2185380
Created Mar 24, 2012
Tornado Example: Delegating an blocking task to a worker thread pool from an asynchronous request handler
View gist:2185380
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):