Skip to content

Instantly share code, notes, and snippets.

View sergeyk's full-sized avatar

Sergey Karayev sergeyk

View GitHub Profile
@sergeyk
sergeyk / return_image_and_plot_with_flask.py
Created January 15, 2013 05:50
Demonstration of how to return an image generated with numpy and a plot generated with matplotlib using the Flask web server.
"""
Demonstration of how to return an image generated with numpy and a plot
generated with matplotlib using the Flask web server.
Requirements: numpy, flask, scikit-image, matplotlib.
"""
import cStringIO as StringIO
from flask import Flask, send_file
import numpy as np
@sergeyk
sergeyk / gene_correlations.ipynb
Last active December 11, 2015 20:19
Plotting some (outdated) art genome gene correlation data for Leonard.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "imagenet2"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sergeyk
sergeyk / plotting_ilsvrc65.py
Created April 17, 2013 18:38
plotting ilsvrc65
# assumes there is a dictionary that has keys
# 'g': the nx.DiGraph graph
# 'nodes': list of node names
# 'heights': list of integer heights of the nodes
fig = plt.figure()
ax = fig.add_subplot(111)
g = graph['g']
nodes = graph['nodes']
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{