Skip to content

Instantly share code, notes, and snippets.

View floringogianu's full-sized avatar
🐳
Chasing Moby-Dick

Florin Gogianu floringogianu

🐳
Chasing Moby-Dick
View GitHub Profile
@floringogianu
floringogianu / Julia Build
Last active August 29, 2015 14:18
Julia build error
2015-04-01 09:36:04 +0300
make
prefix=/usr/local/Cellar/julia/0.3.6_1
USE_BLAS64=0
FC=/usr/local/bin/gfortran
LLVM_CONFIG=llvm-config-3.3
USECLANG=1
VERBOSE=1
LIBBLAS=-lopenblas
@floringogianu
floringogianu / index.js
Last active December 30, 2015 00:59
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var feedParser = require('feedparser');
var _ = require('highland');
var $ = require('jquery');
var author = 'Jaderberg_M';
var url = 'http://export.arxiv.org/api/query?search_query=au:' + author;
// Create a new parser stream
@floringogianu
floringogianu / gist:384cbbe9adf7e64f505b67a20c39c146
Created April 9, 2016 18:54 — forked from akolosov/gist:cedaac86b333a4ced95f
vim 7.4 with lua+GUI on Ubuntu 14.04
#!/bin/sh
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev mercurial libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
sudo mkdir /usr/include/lua5.1/include
sudo ln -s /usr/include/luajit-2.0 /usr/include/lua5.1/include
cd ~
hg clone https://code.google.com/p/vim/
@floringogianu
floringogianu / fc_benchmark.lua
Created April 20, 2016 11:09 — forked from jcjohnson/fc_benchmark.lua
Simple torch benchmarking tool for fully-connected networks
require 'nn'
require 'cutorch'
require 'cunn'
--[[
-- A simple benchmark comparing fully-connected net times on CPU and GPU.
--
-- Note that we don't count time it takes to transfer data to the GPU.
--]]
require 'torch'
require 'cutorch'
require 'nn'
require 'cunn'
require 'cudnn'
local N = 32
local cin = 64
local cout = 64
local height = 256
# This should work with xitari (the c++ Arcade Learning Environment fork) too.
# Define a type for the c struct pointer
type DoomGame end
# Load the shared object. This needs to expose c functions (see "extern C")
newGame = ccall( (:vizdoom_new, "libvizdoom"), Ptr{DoomGame}, ())
# Load a configuration file.
hasLoaded = ccall( (:vizdoom_loadConfig, "libvizdoom"), Bool, (Ptr{DoomGame},Cstring), newGame, "../../examples/config/basic.cfg")
@floringogianu
floringogianu / color.string
Created November 29, 2016 15:25
Colored strings in Lua
-- credit to Jesse Paroz (@jparoz)
local FG = {
black = 30,
red = 31,
green = 32,
yellow = 33,
blue = 34,
magenta = 35,
cyan = 36,
white = 37,
@floringogianu
floringogianu / pytorch_setup_log.log
Created February 15, 2017 03:13
Pytorch setup log
running install
running build_deps
-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Checking if C linker supports --verbose
-- Checking if C linker supports --verbose - no
-- Detecting C compiler ABI info - done
@floringogianu
floringogianu / resize_benchmark.py
Created May 1, 2017 20:58
Simple benchmark of image resize methods.
import time
import numpy as np
from skimage.transform import resize
from PIL import Image
def pil_resize(x, target, method=Image.NEAREST):
img = Image.fromarray(x)
return np.array(img.resize(target, resample=method))

#Create bitbucket branch

##Create local branch

$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
  master
* sync