Skip to content

Instantly share code, notes, and snippets.

View gpuglia's full-sized avatar

Gustavo Puglia gpuglia

View GitHub Profile
@gpuglia
gpuglia / email_pred.md
Last active March 25, 2019 09:28
Email Prediction

Email discovery and prediction

We often have to outreach to people whose contact information we do not possess in order to find the best expert for a given project.

You have a db of company domain names with matching email addresses.

Sample DB

Company Email
@gpuglia
gpuglia / em.md
Created February 28, 2019 15:35
Elevation Map

Elevation map

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.

Example:

Input: [0,1,0,2,1,0,1,3,2,1,2,1]

Output: 6

class Person < ActiveRecord::Base
scope :people_of_london, -> { where(age: 4..25).order(:first_name).where(birthplace: 'London') }
def welcome_message
if admin?
"Welcome God"
else
"Welcome #{full_name}"
end
end

##WHAT IS SCRUM?

###Scrum Software development Scrum is an iterative and incremental agile software development framework for managing software projects and product or application development.

Wikipedia

###Related topics

@gpuglia
gpuglia / 0_reuse_code.js
Created April 23, 2014 15:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gpuglia
gpuglia / jquery_example.html
Last active August 29, 2015 13:58 — forked from dbc-challenges/jquery_example.html
Intro to jQuery for Phase 0
<!DOCTYPE html>
<html>
<head>
<title>DOM manipulation with jQuery</title>
<!-- Add a link to jQuery CDN here script here -->
<script type="text/javascript" src="jquery_example.js"></script>
</head>
<body>
@gpuglia
gpuglia / 0.2.1-boggle_class_from_methods.rb
Last active August 29, 2015 13:56 — forked from dbc-challenges/0.2.1-boggle_class_from_methods.rb
phase 0 unit 2 week 1boggle class challenge
class Boggle
attr_reader :board
def initialize(board)
@board = board
end
def create_word(*coords)
coords.map { |coord| @board[coord.first][coord.last]}.join("")
end