Skip to content

Instantly share code, notes, and snippets.

Fermin 'Piscu' Carranza efecarranza

  • 305/011
Block or report user

Report or block efecarranza

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
View nico.rb
class ComputerGuess
def play
possible_digits = [0,1,2,3,4,5,6,7,8,9]
good_digits = []
bad_digits = []
playing = true
while playing
initial_guess = generate_number(possible_digits)
clues = get_clues(initial_guess)
running = did_we_guess?(clues)
View human_guess.rb
class HumanGuessing
def play:
guessme = get_number_to_guess
until endgame
guess = get_user_guess
if !valid?(guess)
# Ask user to guess again
else
check_versus_generated_number(guessme, guess)
View script
import random
MAX_TEAMS = 5
back_end = ['Evan Reisman', 'Cort Lyons', 'Rogerio da Silva', 'Bruno Coelho', 'Alireza Golkar', 'Rodrigo Quaresma',
'Dimitri Vassiliev', 'Ozan Ackin', 'Josh Brickner', 'Benjamin Matthews']
front_end = ['Paul Parker', 'Noah Drabinsky', 'Balinder Singh', 'Mohammed Alsaid', 'Pouya Sanoeei', 'Angel Garbarino']
qa = ['Jacek Adamczyk', 'Greg McAlpine', 'Justin Siples', 'Warren Tom', 'Paul Ripley', 'Maria Luisa Chau', 'Anna Prokofyev']
@efecarranza
efecarranza / Fibs
Created Apr 17, 2015
Interque Question - Fibonacci Code
View Fibs
def fibs(n)
first_fib = 1
second_fib = 1
result = [first_fib, second_fib]
if n < 1
return "Please enter a valid number, it has to be greater than or equal to 1."
end
while second_fib < n
@efecarranza
efecarranza / gist:54d4c5669fef4b3cbf3d
Created Feb 6, 2015
All In One - Input Validation jQuery work
View gist:54d4c5669fef4b3cbf3d
CSS file
.error {
color: red;
}
JavaScript/jQuery file
$(function() {
View gist:264d9f33c324a1b2a7ba
# Author: piscu Carranza
# January 19, 2015
# Week Two - Wyncode
# Profile
module WyncodeMethods
# Problems With Floats
puts "Here's a calculator to give the check with tip included."
View gist:5803c16086ff9ea8b95e
# Author: piscu Carranza
# January 19, 2015
# Week Two - Wyncode
# Profile
# Problems With Floats
puts <<END
Using floats can be a pain. Therefore,
here is an idea on how to make sure no
@efecarranza
efecarranza / wyncode.rb
Created Jan 14, 2015
First Week Coding Ruby
View wyncode.rb
#Profile
# Problems With Floats
puts <<END
Using floats can be a pain. Therefore,
here is an idea on how to make sure no
random digits are added (stupid binary!).
END
You can’t perform that action at this time.