Skip to content

Instantly share code, notes, and snippets.

View marcionicolau's full-sized avatar

Marcio Nicolau marcionicolau

View GitHub Profile
@marcionicolau
marcionicolau / tensorflow_1_6_high_sierra_gpu.md
Created May 14, 2018 17:35 — forked from mattiasarro/tensorflow_1_6_high_sierra_gpu.md
Install Tensorflow 1.6 on macOS High Sierra 10.13.3 with GPU Acceleration (without disabling SIP)

Tensorflow 1.6 on macOS High Sierra 10.13.3 with GPU Acceleration (without disabling SIP)

This gist (based on a blog post at byai.io) documents how to set up TensorFlow 1.6 with (e)GPU support without the need to disable SIP. Following the original gist got me a saystem in which training TF on eGPU was successful, but there were various visual glitches due to the newer / less stable version of the driver.

As pointed out by ronchigram, many people are having issues with newer NVIDIA drivers, so it's worth using the nvidia-update script by Benjamin Dobell that installs the latest stable NVIDIA web driver, and if necessary patches it to run on your system. We also don't need to disable SIP when using nvidia-update.

I have als

@marcionicolau
marcionicolau / gist:9c04c7f3280114c6b79c3b6921fe4c3b
Created November 22, 2016 15:13 — forked from tomas789/gist:10915069
C++/C++11 Variadic template CSV parser. Supports quoted strings, custom parsers, strongly typed, STL-like, generic, fast, highly customizable.
#include <functional>
#include <fstream>
#include <iostream>
#include <limits>
#include <sstream>
#include <tuple>
#include <vector>
template <typename ... TList>
struct DefaultParsersTuple;
@marcionicolau
marcionicolau / CMakeLists.txt
Last active March 20, 2016 20:45
CMake with directories
cmake_minimum_required(VERSION 2.8.9)
project(directory_test)
#Bring the headers, such as Student.h into the project
include_directories(include)
#Can manually add the sources using the set command as follows:
#set(SOURCES src/mainapp.cpp src/Student.cpp)
#However, the file(GLOB...) allows for wildcard additions:
@marcionicolau
marcionicolau / fft-ex.R
Created March 4, 2016 03:41
FFT R Examples
xs <- seq(-2*pi,2*pi,pi/100)
wave.1 <- sin(3*xs)
wave.2 <- sin(10*xs)
par(mfrow = c(1, 2))
plot(xs,wave.1,type="l",ylim=c(-1,1)); abline(h=0,lty=3)
plot(xs,wave.2,type="l",ylim=c(-1,1)); abline(h=0,lty=3)
wave.3 <- 0.5 * wave.1 + 0.25 * wave.2
plot(xs,wave.3,type="l"); title("Eg complex wave"); abline(h=0,lty=3)
@marcionicolau
marcionicolau / clima-1516.csv
Created February 4, 2016 17:35
Aedes Aegypti ABM
DATE SRAD TMAX TMIN RAIN
15305 20.629771 23.4 15.3 0
15306 5.823043 17.6 15 17.400000000000002
15307 10.213278999999998 23.4 15.7 1.7999999999999998
15308 7.467642000000001 20.9 17.1 5.4
15309 7.387924 17 13.45 3
15310 18.030457 19 12.25 0
15311 21.045128000000002 25.1 12.65 0
15312 22.245425999999995 24.700000000000003 15.25 5.4
15313 26.588191 29.4 15 0
@marcionicolau
marcionicolau / app.R
Created September 29, 2015 13:18 — forked from gluc/app.R
Shiny CRUD
library(shiny)
library(shinyjs)
# Get table metadata. For now, just the fields
# Further development: also define field types
# and create inputs generically
GetTableMetadata <- function() {
fields <- c(id = "Id",
@marcionicolau
marcionicolau / 43MUE250GC_SIR.dbf
Last active August 29, 2015 14:06
RS State TopoJSON file
#!/path/2/Rscript
# License: CC0 (just be nice and point others to where you got this)
# Author: Robert M Flight <rflight79@gmail.com>, github.com/rmflight
#
# This is a post-commit hook that after a successful commit subsequently increments the package version in DESCRIPTION
# and commits that. Analogous to the pre-commit at https://gist.github.com/rmflight/8863882, but useful if you only have
# good reasons for not doing it on the pre-commit.
#
# To install it, simply copy this into the ".git/hooks/post-commit" file of your git repo, change /path/2/Rscript, and make
@marcionicolau
marcionicolau / index.Rmd
Created January 8, 2014 00:25 — forked from ramnathv/index.Rmd
Interactive Controls and rCharts
---
title: Interactive Controls and rCharts
framework: bootstrap
hitheme: twitter-bootstrap
highlighter: prettify
mode: standalone
---
<link href='http://fonts.googleapis.com/css?family=Lora|Lato' rel='stylesheet' type='text/css'>

This is a demo of an rCharts binding for the excellent Cal-Heatmap plugin, developed by Wan Qi Chen. This binding was motivated by a tweet by Alex Bresler and uses data provided by him on points scored by Paul George.

NOTE: This R package is not yet on github. I will update this note after I upload an alpha version on github.