Skip to content

Instantly share code, notes, and snippets.


Alvaro Silvino alvarojoao

Block or report user

Report or block alvarojoao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
alvarojoao / interview solutions
Last active Oct 30, 2017
interview solutions 3
View interview solutions
# We want to implement a feature to suggest to users the cheapest hotel that is
# more popular than the one they are looking at.
# Write a function that given an array of hotels sorted by their popularity,
# returns a map from hotel ids to hotel ids that associates each hotel with the
# cheapest hotel that is more popular than the one in question.
# If there's no hotel that is cheaper and more popular than the one with that id,
# then it shouldn't be put in the map.
alvarojoao /
Last active Sep 8, 2017
interview solutions 2
# Assume we have a long list of words from English dictionary, like:
# EnglishWords: ["water", "big", "banana", "york", "amsterdam", "orange", "macintosh", "bottle", "book", "apple", "watch", ...]
# And another long list of strings to process, write a function to identify "compound words" and return them:
# input:[ "paris", "applewatch", "ipod", "amsterdam", "bigbook", "orange", "waterbottle",... ]
# output: [ "applewatch", "bigbook", "waterbottle",...]
alvarojoao / interview solutions
Created Aug 26, 2017
interview solutions for b.
View interview solutions
def isAnagram(A,B):
A = A.lower()
B = B.lower()
if len(A) == 0 or len(B) ==0:
return False
dictA = {}
dictB = {}
for a in A:
if a in dictA:
dictA[a] += 1
# -*- coding: utf8
# Author: David C. Lambert [dcl -at- panix -dot- com]
# Copyright(c) 2013
# License: Simple BSD
The :mod:`elm` module implements the
Extreme Learning Machine Classifiers and Regressors (ELMClassifier,
ELMRegressor, SimpleELMRegressor, SimpleELMClassifier).
An Extreme Learning Machine (ELM) is a single layer feedforward
import tensorflow as tf
import numpy as np
import pandas as pd
from tensorflow.examples.tutorials.mnist import input_data
from sklearn import svm
import time
from elm import GenELMClassifier
from random_layer import MLPRandomLayer
# Declare variable choice and assign value -1
# Print to stdout
ARRAY=( 'ssh://'
'ssh://' )
alvarojoao /
Created Jun 21, 2016 — forked from gabrieleangeletti/
Restricted Boltzmann Machine implementation in TensorFlow, before and after code refactoring. Blog post:
import tensorflow as tf
import numpy as np
import os
import zconfig
import utils
class RBM(object):
alvarojoao / .jshintrc
Created Jun 21, 2016
.jshintrc example file
View .jshintrc
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": false,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
alvarojoao / stopwords.txt
Created Feb 25, 2016 — forked from alopes/stopwords.txt
Portuguese stop words
View stopwords.txt
alvarojoao / config.rb
Created Jan 26, 2016 — forked from nathansmith/config.rb
Example config.rb file for Compass
View config.rb
preferred_syntax = :sass
http_path = '/'
css_dir = 'assets/stylesheets'
sass_dir = 'assets/sass'
images_dir = 'assets/images'
javascripts_dir = 'assets/javascripts'
relative_assets = true
line_comments = true
# output_style = :compressed
You can’t perform that action at this time.