Skip to content

Instantly share code, notes, and snippets.

View rcgalbo's full-sized avatar

Rick Galbo rcgalbo

View GitHub Profile
@rcgalbo
rcgalbo / .theanorc
Last active February 28, 2018 15:20
theanorc - cus u know ur gonna forget it
[global]
floatx = float32
device = gpu
[cuda]
root=/user/local/cuda-7.5/
@rcgalbo
rcgalbo / kaggle_submission.py
Last active February 1, 2018 21:12
Creating a file link for browser download (kaggle submissions)
from IPython.display import FileLink
"%cd $PROJECT_HOME_DIR"
FileLink('data/redux/'+submission_file_name)
@rcgalbo
rcgalbo / keras.json
Created December 1, 2017 17:09
Keras config for TF backend
{
"image_data_format": "channels_last",
"epsilon": 1e-07,
"floatx": "float32",
"backend": "tensorflow"
}
@rcgalbo
rcgalbo / createMySQL.py
Last active January 19, 2018 19:59
creating MySQL with python
import MySQLdb
# Open database connection ( If database is not created don't give dbname)
db = MySQLdb.connect("localhost","yourusername","yourpassword","yourdbname" )
# prepare a cursor object using cursor() method
cursor = db.cursor()
# For creating create db
# Below line is hide your warning
@rcgalbo
rcgalbo / scroll_horizontal.r
Created February 1, 2018 21:03
Add a horizontal scroll bar to datatable in shinydashboard
ui<-fluidPage(DT::dataTableOutput("wideTable"))
server<-function(input, output) {
output$wideTable <- DT::renderDataTable({
table <- do.call(cbind, lapply(1:100, function(i) 1:1000))
colnames(table) <- paste0("name.", 1:100)
DT::datatable(table, options = list(scrollX = TRUE))
})
}
@rcgalbo
rcgalbo / keybase.md
Created February 8, 2018 16:10
keybase verification

Keybase proof

I hereby claim:

  • I am rgalbo on github.
  • I am rgalbo (https://keybase.io/rgalbo) on keybase.
  • I have a public key ASDdh70Q-ZM9yDCT_uzsC1K6r2AhNk__d590rTRF-d5Pogo

To claim this, I am signing this object:

@rcgalbo
rcgalbo / express.js
Last active March 7, 2018 03:22
express app boilerplate
var express = require('express');
var bodyParser = require('body-parser');
var app = express();
app.set('view engine', 'ejs');
app.use(bodyParser.urlencoded({ extended: false }))
app.listen(4000, function() {
console.log('server is listening!!');
});
@rcgalbo
rcgalbo / Dockerfile
Created March 9, 2018 18:44
fast.ai docker file
FROM nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04
LABEL com.nvidia.volumes.needed="nvidia_driver"
RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list
RUN apt-get update && apt-get install -y --allow-downgrades --no-install-recommends \
build-essential \
cmake \
git \

meeting notes - COMPANY-NAME

contact: {CONTACT NAME}

metrics:

offering:

@rcgalbo
rcgalbo / react_component.js
Last active March 19, 2018 21:51
react.js component boilerplate
import React, {Component} from 'react';
class someFeature extends Component {
constructor(props){
super(props);
this.state = {};
}