Skip to content

Instantly share code, notes, and snippets.

Kevin Mader kmader

  • Magic Leap
  • Zurich, Switzerland
View GitHub Profile
View numba-cuda-stencil.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fperez
fperez / README.md
Last active Mar 28, 2019
Polyglot Data Science with IPython
View README.md

Polyglot Data Science with IPython & friends

Author: Fernando Pérez.

A demonstration of how to use Python, Julia, Fortran and R cooperatively to analyze data, in the same process.

This is supported by the IPython kernel and a few extensions that take advantage of IPython's magic system to provide low-level integration between Python and other languages.

See the companion notebook for data preparation and setup.

@oarriaga
oarriaga / spatial_transformer_network.py
Last active Jul 18, 2017
Implementation of Spatial Transformer Networks (https://arxiv.org/abs/1506.02025) in Keras 2.
View spatial_transformer_network.py
from keras.layers.core import Layer
import keras.backend as K
if K.backend() == 'tensorflow':
import tensorflow as tf
def K_arange(start, stop=None, step=1, dtype='int32'):
result = tf.range(start, limit=stop, delta=step, name='arange')
if dtype != 'int32':
result = K.cast(result, dtype)
return result
@jfeala
jfeala / batch.py
Created Apr 18, 2017
AWS Batch wrapper for Luigi
View batch.py
"""
AWS Batch wrapper for Luigi
From the AWS website:
AWS Batch enables you to run batch computing workloads on the AWS Cloud.
Batch computing is a common way for developers, scientists, and engineers
to access large amounts of compute resources, and AWS Batch removes the
undifferentiated heavy lifting of configuring and managing the required
View Delayed-Feather.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EderSantana
EderSantana / CATCH_Keras_RL.md
Last active Mar 20, 2019
Keras plays catch - a single file Reinforcement Learning example
View CATCH_Keras_RL.md
View flask_script_name.md

Serving Flask under a subpath

Your Flask app object implements the __call__ method, which means it can be called like a regular function. When your WSGI container receives a HTTP request it calls your app with the environ dict and the start_response callable. WSGI is specified in PEP 0333. The two relevant environ variables are:

SCRIPT_NAME
The initial portion of the request URL's "path" that corresponds to the application object, so that the application knows its virtual "location". This may be an empty string, if the application corresponds to the "root" of the server.

@shivaram
shivaram / dataframe_example.R
Created Jun 2, 2015
DataFrame example in SparkR
View dataframe_example.R
# Download Spark 1.4 from http://spark.apache.org/downloads.html
#
# Download the nyc flights dataset as a CSV from https://s3-us-west-2.amazonaws.com/sparkr-data/nycflights13.csv
# Launch SparkR using
# ./bin/sparkR --packages com.databricks:spark-csv_2.10:1.0.3
# The SparkSQL context should already be created for you as sqlContext
sqlContext
# Java ref type org.apache.spark.sql.SQLContext id 1
@kevin-keraudren
kevin-keraudren / volume_rendering.py
Last active Feb 14, 2018
Volume rendering in Python using VTK-SimpleITK
View volume_rendering.py
#!/usr/bin/python
import SimpleITK as sitk
import vtk
import numpy as np
import sys
from vtk.util.vtkConstants import *
filename = sys.argv[1]
@ellisonbg
ellisonbg / test_basic.js
Created Aug 12, 2012
Simple test of IPython Notebook using phantomjs and casperjs
View test_basic.js
// Simple IPython Notebook test
// Requires PhantomJS and CasperJS.
// To run:
// 1) Start a notebook server in an empty directory.
// 2) casperjs test_basic.js
var casper = require('casper').create({
// verbose: true,
// logLevel: "debug"
});
You can’t perform that action at this time.