Skip to content

Instantly share code, notes, and snippets.

View dashesy's full-sized avatar

Ehsan Azar dashesy

  • Microsoft
  • Redmond
View GitHub Profile
@dashesy
dashesy / test_nccl.c
Created May 16, 2018 17:30 — forked from alsrgv/test_nccl.c
Test NCCL
// Code from http://docs.nvidia.com/deeplearning/sdk/nccl-developer-guide/index.html#onedevprothrd
#define _BSD_SOURCE
#include <stdio.h>
#include "cuda_runtime.h"
#include "nccl.h"
#include "mpi.h"
#include <stdint.h>
#include <stdlib.h>
@dashesy
dashesy / ipython-notebook.service
Created October 8, 2015 20:25 — forked from amitsaha/ipython-notebook.service
Run IPython notebook under systemd
# README:
# Copy this file to /usr/lib/systemd/system/
# sudo systemctl daemon-reload
# systemctl enable ipython-notebook
# systemctl start ipython-notebook
# The WorkingDirectory and ipython-dir must exist
# If you don't want anything fancy, go to http://127.0.0.1:8888 to see your notebook
# wheneber you want it
[Unit]
@dashesy
dashesy / joint_classifier.py
Last active December 19, 2015 05:19
Joint classifier inspired by FeatureUnion
'''
Created on June 26, 2013
@author: dashesy
Purpose: Like FeatureUnion but can apply different X,y to different transformers
Each transformer could accept different number os samples or features
but the result should be concatenatable
'''
@dashesy
dashesy / joint_classifier.py
Created June 28, 2013 21:03
Joint classifier for FeatureUnion in the pipeline
'''
Created on June 26, 2013
@author: dashesy
Purpose: glue the classifier wire logic to have multiple
classifiers work jointly with different groups of X,y
Each group could accept different number os samples or features
'''
@dashesy
dashesy / kernel_pca.py
Created May 27, 2013 18:17
KernelPCA with callable kernel
"""Kernel Principal Components Analysis"""
# Author: Mathieu Blondel <mathieu@mblondel.org>
# License: BSD Style.
import numpy as np
from scipy import linalg
from ..utils.arpack import eigsh
from ..base import BaseEstimator, TransformerMixin
@dashesy
dashesy / gist:5577051
Last active December 17, 2015 07:59
sklearn GMM suitable for prediction at the last stage of pipeline
"""
Gaussian Mixture Models.
This implementation corresponds to frequentist (non-Bayesian) formulation
of Gaussian Mixture Models.
"""
# Author: Ron Weiss <ronweiss@gmail.com>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Bertrand Thirion <bertrand.thirion@inria.fr>