Skip to content

Instantly share code, notes, and snippets.

View nanounanue's full-sized avatar
💭
😡

Adolfo De Unánue nanounanue

💭
😡
View GitHub Profile
# coding=utf-8
import pycurl
import StringIO
import sys
import ast
import pymongo
from pymongo import MongoClient
def construyeSQL(cadena):
aux = cadena.split(' ')
# use bigvis to bin, condense, smooth and present data
library('bigvis')
library('ggplot2')
# subset the diamonds data
mydiamonds <- subset(diamonds, carat < 2.75)
# condense avg price based on bins of carat sizes of .1 carat intervals
myd <- condense(bin(mydiamonds$carat, .1), z=mydiamonds$price, summary="mean")
# smooth out the trend
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
# coffeescript rules
# Pagination is sticked with model
#
# Server should response in that way:
# {
# articles: [{category_id:null, id:308,…}, {category_id:null, id:307,…}, {category_id:null, id:306,…},…]
# pagination: {total:34, page:2, per_page:15, cat_id:-1, source_id:-1}
# }
# To achieve this controller should look like (using will_paginate gem):
# per_page = params[:per_page].to_i || 15
# Bundler Integration
require "bundler/capistrano"
# Application Settings
set :application, "yourapplicationname"
set :user, "serveruser"
set :deploy_to, "/home/#{user}/rails-applications/#{application}"
set :rails_env, "production"
set :use_sudo, false
set :keep_releases, 3
# Guide
# Configure the essential configurations below and do the following:
#
# Repository Creation:
# cap deploy:repository:create
# git add .
# git commit -am "initial commit"
# git push origin master
#
# Initial Deployment:
# GeoNode / GeoServer install for Docker
# Save file as Dockerbuild; sudo docker build -t ubuntu/testgeo3 .
# VERSION 1.0.0
FROM ubuntu
MAINTAINER Derek Hohls <dhohls@csir.co.za>
# make sure the package repository is up to date
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
# GeoNode / GeoServer install for Docker
# Save file as Dockerbuild; sudo docker build -t ubuntu/testgeo3 .
# VERSION 1.0.0
FROM ubuntu
MAINTAINER Derek Hohls <dhohls@csir.co.za>
# make sure the package repository is up to date
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
Bigdata is like combination of bunch of subjects. Mainly require programming, analysis, nlp, MLP, mathematics.
To see links, Go : http://www.quora.com/What-are-some-good-sources-to-learn-big-data
Here are bunch of courses I came accross:
Introduction to CS Course
Notes: Introduction to Computer Science Course that provides instructions on coding.
Online Resources:
Udacity - intro to CS course,
Coursera - Computer Science 101
@nanounanue
nanounanue / trivial_file_upload_service.rb
Created May 5, 2011 12:45 — forked from gavinheavyside/trivial_file_upload_service.rb
Trivial file upload service using Sinatra
require 'rubygems'
require 'sinatra'
require 'fileutils'
# upload with:
# curl -v -F "data=@/path/to/filename" http://localhost:4567/user/filename
post '/:name/:filename' do
userdir = File.join("files", params[:name])