Skip to content

Instantly share code, notes, and snippets.

@kpykc
kpykc / ipython-notebook.conf
Last active November 22, 2015 17:27 — forked from whophil/ipython-notebook.conf
Upstart file (Ubuntu) for Jupyter / IPython notebook
# To be placed in /etc/init/ with 644 permissions
start on filesystem or runlevel [2345]
stop on shutdown
description "Jupyter / IPython Notebook Upstart script for Jetson TK-1"
script
export HOME="/home/ubuntu"; cd $HOME
export PATH=/usr/local/cuda-6.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-6.5/lib:$LD_LIBRARY_PATH
@kpykc
kpykc / Dockerfile
Created November 21, 2015 13:23
Jupyter Notebook with CUDA accelerated Theano and Keras all in a Docker container
# Docker container that spins up a Jupyter notebook server
# with CUDA accelerated Theano support. Assumes the host
# system has CUDA drivers installed that match the version below.
#
# Launch with a comman line similar to the following:
#
# docker run -it \
# --device /dev/nvidiactl --device /dev/nvidia-uvm --device /dev/nvidia0
# -p 8888:8888
# -v /[where notebooks are on your local machine]:/notebooks
@kpykc
kpykc / Ruse IPython Notebook
Created November 19, 2015 05:32 — forked from kapadia/Ruse IPython Notebook
WebGL plotting in IPython Notebook
{
"metadata": {
"name": "Ruse Integration"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Setup lisp with slime on OS X

Install your favorite lisp interpreter

If you already have Homebrew, just open a terminal and type

$ brew install clozure-cl
@kpykc
kpykc / notify.R
Last active August 31, 2015 22:20 — forked from hrbrmstr/notify.R
Send OS X notifications from R (RStudio, R GUI or R console)
notify <- function(msg="Operation complete") {
in.osx <- (Sys.info()['sysname'] == "Darwin")
in.rstudio <- (Sys.getenv("RSTUDIO") == "1")
in.rgui <- (Sys.getenv("R_GUI_APP_REVISION") != "")
if (in.rstudio) { # hack to see if running in RStudio
title <- "RStudio"
sender <- activate <- "org.rstudio.RStudio"
}
@kpykc
kpykc / write_png_to_memory_with_libpng.cpp
Last active August 30, 2015 03:53 — forked from dobrokot/write_png_to_memory_with_libpng.cpp
encode and write PNG to memory (std::vector) with libpng on C++
#include <png.h>
#include <vector>
#include <iostream>
#include <stdlib.h>
//encode and write PNG to memory (std::vector) with libpng on C++
typedef unsigned char ui8;
#define ASSERT_EX(cond, error_message) do { if (!(cond)) { std::cerr << error_message; exit(1);} } while(0)
@kpykc
kpykc / fontawesome.sty
Last active August 29, 2015 14:27 — forked from sway/fontawesome.sty
FontAwesome mapping for XeLaTeX
% FontAwesome (http://fortawesome.github.com/Font-Awesome/) bindings for (Xe)LaTeX
% Author: Honza Ustohal <[email protected]>
%
% Translation of FontAwesome's private range characters into XeTeX symbols. All icons are camel-cased and prefixed with 'fa', i.e. what was .icon-align-center the CSS version of FontAwesome becomes \faAlignCenter
% This might be reworked into a full blown package in the near future
%
% Prerequisite:
% XeLaTeX, FontAwesome installed as a system font accessible by XeLaTeX
%
% Usage:
@kpykc
kpykc / oclMat_custom_kernel.cpp
Last active August 29, 2015 14:26 — forked from atinfinity/oclMat_custom_kernel.cpp
sample code to execute custom OpenCL kernel on OpenCV 2.4.9
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/ocl/ocl.hpp>
// cl_mem構造体を参照するためにインクルード
#if defined __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
(from :http://www.entropy.ch/blog/Developer/2010/04/15/Git-diff-for-Localizable-strings-Files.html)
First, add this to the project’s .git/info/attributes file:
+
*.strings diff=localizablestrings
(Unfortunately you do have to add it to every project, there doesn’t seem to be a global attributes configuration file)
Second, add this to your ~/.gitconfig file: