text:
<repo_name>ga-students/BEWD_SF_5_homework<file_sep>/johnfohr-jofo45/05_class/starter_code/ex_secret_number_objects/lib/secret_number.rb
class SecretNumber
# this class will generate our secret number for us

	attr_accessor :guess

		def initialize(guess)
			@guess = guess
		end

	secretnumber = rand(9)+1

end

<file_sep>/ColinCahill-leroyskagnetti/Rewsly/app/views/stories/index.html.erb

Welcome to Rewsly!

Your #1 BEWD-Class source for prefabricated news.

Have a great story? <%= link_to "Add it here.", new_story_path %>

Whatcha lookin' for, kid?

<%= form_tag stories_path, method: "GET" do %>
  <%= text_field_tag :q, params[:q] %>
  <%= submit_tag "Search" %>
<% end %>

Today's top stories:

<%= render 'story_list' %>

<file_sep>/ColinCahill-leroyskagnetti/games/app/controllers/rock_paper_scissors_controller.rb
class RockPaperScissorsController < ApplicationController
  def new
  end

  def show
  	# 0 = ROCK, 1 = PAPER, 2 = SCISSORS

  	@user_throw = params[:id].to_i
  	@throw_array = ["rock", "paper", "scissors"]
  	@computer_throw = rand(0..2)

  	if @user_throw == @computer_throw
  		@game_partial = "tie"
	elsif ((@user_throw == 0 && @computer_throw == 2) || (@user_throw == 2 &&  @computer_throw == 1) || (@user_throw == 1 && @computer_throw == 0))
		@game_partial = "win"
	elsif ((@user_throw == 2 && @computer_throw == 0) || (@user_throw == 1 &&  @computer_throw == 2) || (@user_throw == 0 && @computer_throw == 1))
		@game_partial = "lose"
	end

  end
end
<file_sep>/MaxBranzburg/midterm/lib/length.rb
# Gets users' maximum number of desired results and
# handles bad input.  If maximum number of desired
# results is not an integer, requires that user enter
# an integer to continue.  Returns 1 less than entered
# value to represent the maximum array index number to
# be accessed.

class Length

 attr_accessor :number_results

  def initialize
    @number_results = gets.chomp
  end

  def results_length

	while (@number_results.to_i.to_s != @number_results) || (@number_results.to_i <= 0) do
    	puts "Invalid search.  Please enter an integer greater than zero:"
    	@number_results = gets.chomp
	end

    @number_results.to_i - 1

  end

end<file_sep>/MaxBranzburg/rails_games/app/views/rock_paper_scissors/_tie.html.erb

You're just okay!

You threw a <%= @user_throw %>

I threw a <%= @comp_throw %>

Therefore...

You tied the game!
<file_sep>/TolisonHumphrey-thump/Games_08/games/app/controllers/rock_paper_scissors_controller.rb
class RockPaperScissorsController < ApplicationController
  def new
  	@options = [{name: "Rock", number: 0}, {name: "Paper", number: 1},{name: "Scissors", number: 2}]

  end

  def show
  	@computer_choice = rand(0..2)
  	@player_choice = params[:id].to_i
  	@player_won = (@player_choice )

  end

  private
  def calculate_winner(player, computer)
  	Rock
  end

end
<file_sep>/ColinCahill-leroyskagnetti/ex_secret_number_objects/lib/game.rb
require 'lib/person'
require 'lib/secret_number'

class Game
# this class will be complex
	attr_accessor :player, :secret_number, :welcome_message

	def initialize
		@player = Player.new
		@secret = SecretNumber.new
		self.welcome_message
	end

	def welcome_message
		puts "Welcome to a new instance of The Secret Number!\n  The rules are as follows:\n\n- You must guess a number between 1 and 10.\n- You have three chances to guess the number correctly.  The computer will give you hints on whether your guess is too high or too low.\n- If you are unable to guess the number within three chances, you will lose the game!"
	end

	def guess_loop

		@guess_count = 0
		@guess = nil
		while @guess_count < 3 && @guess != @secret.secret_number do
			puts "What is your guess?"
			@guess = gets.chomp.to_i
			if @guess == @secret.secret_number
			self.guess_winner
			elsif ((1..10) === @guess) == false
			puts "Please enter a number between 1 and 10.".center(100, "*")
			elsif @guess.to_i < @secret.secret_number
			self.guess_low
			elsif @guess.to_i > @secret.secret_number
			self.guess_high
			end
		end
		sleep 2
		puts "#{self.player.name}, you have failed to guess the secret number in three guesses!"
		sleep 1
		print "The actual secret number was..."
		sleep 1
		print "#{@secret.secret_number}!\n"
		puts "Better luck next time!"
	end

	def guess_winner
		puts "My stars!  You have guessed the secret number!"
		puts "Congratulations, #{self.player.name}you have won the game!"
	end

	def guess_low
		puts "Hmm, I think that is a little low..."
				@guess_count = @guess_count + 1
				sleep 1
				puts "Guesses remaining: #{3 - @guess_count}"
	end

	def guess_high
		puts "Hmm, I think that is a little high..."
				@guess_count = @guess_count + 1
				sleep 1
				puts "Guesses remaining: #{3 - @guess_count}"
	end

end

# we need to write logic to initialize a new game, and run the game loop
# we'll want to write a few separate methods for unique tasks so that our
# code is structured properly
<file_sep>/mattflannery/midterm/main.rb
#Solid use of multiple classes, inheritance, conditionals, private, local && instance_variables
#MULTIPLE APIs and pretty cool!

require_relative 'client'
require_relative 'coinbase_client'
require_relative 'mtgox_client'
require_relative 'blockchain_client'

puts "Welcome to the Bitcoin Expert!"
puts "Let's get the latest price of Bitcoin"

while true

	puts "Which exchange do you want to see? Coinbase or Blockchain?"
	user_preference = gets

	if user_preference.casecmp("coinbase")
		current_client = CoinbaseClient.new
		break
	elsif user_preference.casecmp("Blockchain")
		current_client = BlockChainClient.new
		break
	else
		puts "I don't recognize that, please try again."
	end
end

current_price = current_client.get_buy_price

puts "The Current Price at " + user_preference.to_s + " is " + current_price.to_s

<file_sep>/johnfohr-jofo45/04class/deafgrandma_homework.rb
puts""
puts""
puts "Ask me something sonny!"
question = "iokknk"
while question != question.upcase
	question = gets.chomp
	puts "HUH?! SPEAK UP, SONNY"

end
	puts "NO, NOT SINCE #{rand(20)+1930}!"

puts""
puts""

<file_sep>/johnfohr-jofo45/temptest2/testfile.rb
puts "this is my test file within testtemp dir."
puts "v1"<file_sep>/jianzheng-hzzj1023/ex_secret_number_objects/lib/secret_number.rb
class SecretNumber
# this class will generate our secret number for us

attr_accessor :value

def initialize

	number_array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

	@value = number_array.sample

end

end
<file_sep>/arjun-chemparathy/movie_app/app/views/movies/index.html.erb

Welcome to RetFlix!

<% @display_movies.each do |movie|%>

<%= movie.title%>
<%=movie.description%>
<%=movie.year_released%>

<% end %>

<file_sep>/ColinCahill-leroyskagnetti/Rewsly/app/mailers/user_mailer.rb
class UserMailer < ActionMailer::Base
  default from: "<EMAIL>"

  def welcome_email(user)
    @user = user
    @url  = 'http://www.rotten.com'
    mail(to: '<EMAIL>', subject: 'Check out this awesome ass site')
  end
end<file_sep>/ColinCahill-leroyskagnetti/ex_teddit_api_news.rb
require 'json'
require 'rest-client'

def show_message(message)
  puts message
end

# def show_new_story_notification(story)
#   show_message("New story added! #{story[:title]}, Category: #{story[:category].capitalize}, Current Upvotes: #{story[:upvotes]}")
# end

# def calculate_upvotes(story)
#   story[:upvotes] = 1

#   if story[:title].downcase.include? 'cat'
#     story[:upvotes] *= 5
#   elsif story[:title].downcase.include? 'bacon'
#     story[:upvotes] *= 8
#   end

#   if story[:category].downcase == "food"
#     story[:upvotes] *= 3
#   end
# end

def show_all_stories(stories)
  stories.each do |story|
    show_message "Story: #{story[:title]}, Category: #{story[:category]}, Current Upvotes: #{story[:upvotes]}"
  end
end

stories = []

reddit_json =JSON.load(RestClient.get('http://www.reddit.com/.json'))
	reddit_json['data']['children'].each do |reddit_story|
			story = {title: reddit_story['data']['title'], category: reddit_story['data']['subreddit'], upvotes: reddit_story['data']['ups']}
			stories << story
			end
puts ''
puts "Here are Reddit Stories".center(100, '*')
puts ''
show_all_stories stories
stories.clear

mashable_json = JSON.load(RestClient.get('http://mashable.com/stories.json'))
	mashable_json['new'].each do |mashable_story|
			story = {title: mashable_story['title'], category: mashable_story['channel'], upvotes: mashable_story['shares']['total']}
			stories << story
		end
puts ''
puts "Here are Mashable stories".center(100, '*')
puts ''
show_all_stories stories
stories.clear

digg_JSON = JSON.load(RestClient.get('http://digg.com/api/news/popular.json'))
	digg_JSON['data']['feed'].each do |digg_story|
			story = {title: digg_story['content']['title'], category: digg_story['content']['tags'].first['display'], upvotes: digg_story['diggs']['count']}
			stories << story
		end
puts ''
puts "Here are Digg Stories".center(100, '*')
puts ''
show_all_stories stories
stories.clear

# We're going to add a remote data source to pull in stories from Mashable and Digg.
	# http://www.reddit.com/.json
  # http://mashable.com/stories.json
  # http://digg.com/api/news/popular.json
# These stories will also be upvoted based on our rules. No more user input!

# Pull the json, parse it and then make a new story hash out of each story(Title, Category, Upvotes)
# Add each story to an array and display your "Front page"

<file_sep>/jianzheng-hzzj1023/ex_secret_number_objects/lib/person.rb
class Person
	attr_accessor :name

	def initialize
		puts "Please enter your name"
		@name = gets.strip
	end
# this class will likely be simple, and just remember its name
end
<file_sep>/johnfohr-jofo45/05_class/04_solutions/ex_teddit_api_news_SN_solution.rb
# We're going to add a remote data source to pull in stories, Digg and Mashable.
  # http://mashable.com/stories.json
  # http://digg.com/api/news/popular.json
# These stories will also be upvoted based on our rules. No more user input!

# Pull the json, parse it and then make a new story hash out of each story(Title, Category, Upvotes)
# Add each story to an array and display your "Front page"

require 'json'
require 'rest-client'

def get_input
  gets.strip
end

def show_message(message)
  puts message
end

def show_new_story_notification(story)
  show_message("New story added! #{story[:title]}, Category: #{story[:category].capitalize}, Current Upvotes: #{story[:upvotes]}")
end

def calculate_upvotes(story)
  story[:upvotes] = 1

  if story[:title].downcase.include? 'cat'
    story[:upvotes] *= 5
  elsif story[:title].downcase.include? 'bacon'
    story[:upvotes] *=8
  end

  if story[:category].downcase == "food"
    story[:upvotes] *= 3
  end
end

def show_all_stories(stories)
  stories.each do |story|
    show_message "Story: #{story[:title]}, Category: (#{story[:category]}), Current Upvotes: #{story[:upvotes]}"
  end
end

def get_from_mashable
  response = JSON.load(RestClient.get('http://mashable.com/stories.json'))

  response["hot"].map do |entry|
    story = {title: entry["title"], category: entry["channel"]}
    calculate_upvotes story
    show_new_story_notification story
    story
  end
end

def get_from_digg
  response = JSON.load(RestClient.get('http://digg.com/api/news/popular.json'))

  response["data"]["feed"].map do |entry|
    title = entry["content"]["title"]
    category = entry["content"]["tags"].map { |tag| tag["display"] }.join(', ')
    story = {title: category, category: category}

    calculate_upvotes story
    show_new_story_notification story

    story
  end
end

def get_from_reddit
  response = JSON.load(RestClient.get('http://www.reddit.com/.json'))

  response["data"]["children"].map do |entry|
    story = {title: story["data"]["title"], category: story["data"]["subreddit"]}

    calculate_upvotes story
    show_new_story_notification story

    story
  end
end

show_message("Welcome to Teddit! a text based news aggregator. Get today's news tomorrow!")

stories = get_from_mashable + get_from_digg + get_from_reddit

show_all_stories stories

<file_sep>/mattflannery/midterm/mtgox_client.rb
class MtgoxClient < Client

	@base_url = "http://data.mtgox.com/api/2/BTCUSD/money/ticker_fast"

	def initialize
		@client_name = CLIENT_NAMES[0]
	end

	def get_buy_price
		r = generic_get (@base_url)
		r['amount'].to_money(r['currency'])
	end

end<file_sep>/ColinCahill-leroyskagnetti/midterm/main.rb
require_relative 'session'
require 'pry'
#Pry is included for debugging purposes

# Session is initiated
session = Session.new

# session.start presents the user with the game options (Twitter Search, Location-based tweet search, Quit)
session.start

######Bryan's Notes##########
#### This really looks good Colin. In general it looks like this program really accomplished what was asked in the midterm prompt
#### I left a few notes in line on your code. For the most part I think you should clean up your indentation a bit. As you start
#### working with larger code bases indentation will help keep track of all the dos and ends. I also noticed that you left a binding.pry
#### in the code..tisk tisk... try to remove any debugging tools for final products.
#### I like that you wrote code to make sure that random user error won't break the program... though I found that if I enter % into
#### the search parameters, I get an error. That's probably an edge care haha, but I challenge you to be able to take care of that.
#### I can't tell if you wrote all the code here, but even if you didn't you clearly were able to follow documentation to make it work,
#### and that's what its all about.
#### Please let me know if you would like any other feed back here. We might be able to sit down one data and hammer out that OAuth thing.
<file_sep>/TolisonHumphrey-thump/lab_movie_part2/Movie_App/db/seeds.rb
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
#   cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
#   Mayor.create(name: 'Emanuel', city: cities.first)

Movie.create title: "Guardians of the Galaxy", description: "Marvel Movie", year_released: "2014"
Movie.create title: "The Dark Knight", description: "Why so serious???", year_released: "2012"
Movie.create title: "Enter the Dragon", description: "Classic Bruce Lee", year_released: "1973"

<file_sep>/jianzheng-hzzj1023/midterm/main.rb
$LOAD_PATH.unshift (File.dirname(__FILE__))
require 'lib/call'
require 'lib/teddit_search'
require 'lib/teddit_Json'
require 'pry'
require 'pry-debugger'

puts "Welcome to Teddit Search!"

#create the call object
new_call = Call.new

#ask for search type
new_call.ask_call_type()
#ask for search content
new_call.ask_call_content()

#create the json object
new_teddit_json = TedditJson.new("http://www.reddit.com/.json")

#create a search
new_search = TedditSearch.new(new_call, new_teddit_json.data)

#search and output the results
new_search.output_results()

##################################Bryan's Notes ###################################
#### Greate job on using classes here Jian ! I realy like how you segmented your program
#### into different files and used classes to encapsulate the different functionality. Overall
#### your code it very clean and lean! Also great use of comments. It always helps other people
#### understand the program and code when you have comments. I can also see that you were able to
#### successfully make a call to the Reddit API and return a json, and then parse so the user could
#### see the response in a nicely formatted way.
#### Here are a few suggestions to really tighten this code up. When you are writing the program,
#### always think about mistakes the user might make, and try to catch them. When the program asked
#### me for the type of search I wanted to make, I entered 'kittens'.... you caught that and made sure
#### that I entered the right thing before I went on, but then asked me what I wanted to search in kitten.
#### I left a note in the code about what that happened (hint: its has to do with an instance variable you set).
#### I would also challenge you to figure out how to take the user's input and then submit that to reddit
#### as a search parameter. Currently if what I am looking for in your program is not in the top 25,
#### then I am basically kicked out of the program. You should ask the user to search again.
#### Lastly, there are a few places where your indentation is a little sloppy. Make sure to indent correctly,
#### it will save you in the long run.

<file_sep>/ArelisCruz_areliscruz/extra_work/number_game.rb
count=0
play = true
while play = true

print "Please tell me the max value of the random number: "
    max= gets.to_i
    num= rand(max)
puts "Ok. The random number is generated between 1 and " + max.to_s +
"."
print "Make your guess: "
    guess=gets.to_i

    while guess != num && play != false
        if guess > num
        print "That's too high. Guess again: "
        guess=gets.to_i
        count+=1
    elsif guess < num
        print "That's too low. Guess again: "
        guess=gets.to_i
        count+=1
    else
        break
    end
end

puts "Correct!  You guessed the answer in " + count.to_s + " tries!"
print "Would you like to play again? "

answer=gets.chomp!
    if answer  == 'n'
        play = false
        break
    end

if
    answer == 'y'
    play = true
end

end
puts "OK. Goodbye"<file_sep>/TolisonHumphrey-thump/midterm/Swift_Foot/lib/eventbrite_api.rb
require 'json'
require 'rest-client'

def eventbrite_rec(eb_url, activity_bank)

	healthevents_eb = RestClient.get(eb_url)
	healthevents_json = JSON.load healthevents_eb
	health_options = healthevents_json["events"]

	health_options.each do |event|
	activity_suggestion={
		:title => event["name"]["text"],
		:description => event["description"]["text"]
		}

		activity_bank << activity_suggestion
	end

	short_list = activity_bank.first(3)

	def show_suggestions(event)
		def show_message(message)
  			puts message
		end

  		show_message("Activity Suggestion: #{event[:title]} \n\n Description: #{event[:description]} \n\n")
  	end

  	short_list.each do |event|
		show_suggestions(event)
	end
end

<file_sep>/RobFroetscher-rfroetscher/midterm/lib/templates.rb
class Template
	attr_accessor :body, :subject

	def initialize(type, sender, message, recipient)
		if type == "love"
			@subject = "You've received a love message!"
			@body =  %{
				<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

				<title>Love</title>

				            Love is a wondeful thing!

				                                                               Love:

				                                                                #{sender} is into you!

				                                                                Love is friendship that has caught fire. It is quiet understanding, mutual confidence, sharing and forgiving. It is loyalty through good and bad times. It settles for less than perfection and makes allowances for human weaknesses.

				                                                                You're purrrrfect for me, #{recipient}!

				                                                                Love is a force more formidable than any other. It is invisible - it cannot be seen or measured, yet it is powerful enough to transform you in a moment, and offer you more joy than any material possession could.

				                                                             	#{message}

				}
		elsif type == "congrats"
			@subject = "You've received a congratulations message!"
			@body =  %{
				<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

				<title>Congrats!</title>

				            Congratulations, #{recipient}!

				                                                               Congratulations, #{recipient}!

				                                                                You done good!

				                                                                #{message}

				                                                                Success consists of going from failure to failure without loss of enthusiasm.

				                                                                The price of success is hard work, dedication to the job at hand, and the determination that whether we win or lose, we have applied the best of ourselves to the task at hand.

				                                                             	Keep it up!

				                                                             	#{sender}

				}
		end
	end
end<file_sep>/MaxBranzburg/midterm/lib/stories.rb
# Builds array of Mashable stories of desired type that include
# users' query in their bodies.  Calls search and type classes
# to execute.

require_relative 'search'
require_relative 'type'

class Stories

  require 'json'
  require 'rest-client'

  attr_accessor :type, :query, :mashable_stories, :stories

  def initialize(desired_type, search_term)
    @type = Type.new(desired_type).desired_type
    @query = Search.new(search_term).search_term
    @mashable_stories = []
    @stories = []
  end

  def build_stories

    mashable_json = JSON.load RestClient.get('http://mashable.com/stories.json')
    mashable_new = mashable_json["new"]
    mashable_hot = mashable_json["hot"]
    mashable_rising = mashable_json["rising"]

    if @type == 'n'
      @mashable_stories = mashable_new
    elsif @type == 'h'
      @mashable_stories = mashable_hot
    elsif @type == 'r'
      @mashable_stories = mashable_rising
    end

    mashable_stories.each do |story|
      title = story["title"]
      channel = story["channel"]
      content = story["content"]["plain"]
      shares = story["shares"]["total"]

      if content.downcase.include? "#{@query}"
        @stories << {
          title: title,
          channel: channel,
          shares: shares
        }
      end

    end

    @stories

  end

end<file_sep>/ArelisCruz_areliscruz/midterm.rb
# Well not the most complicated thing in the world... but IS A HUGE step for me!
# I'm hoping to maybe get some links to open at some point. Maybe figure out the API part :)

#Commentary:
 # Firm understanding and use of classes, instance variables, which the critical
 # Let's work on integrating rest-client && an API together during office hours.

class User
  attr_accessor :name

  def initialize(name)
    @name = name
  end
end

class Moods
  attr_accessor :mood

  def initialize
    @mood = mood
  end
end

class Videos
  attr_accessor :user, :moods

  def initialize(user_name)
    @user = User.new(user_name)
    @mood = Moods.new
  end

  def start
    puts "Welcome #{@user.name}!"
    puts "How is your day going?"
    puts "Please answer: Good, Okay or Bad"
    gets_mood
  end

  def gets_mood
    mood = gets.chomp.capitalize
    if mood == "Good"
      puts "Would you like to see some videos?"
      video_options
    elsif mood == "Okay"
      puts "Let\'s make your day AWESOME!"
      puts "Here are some videos that might help!"
      puts "Visit! http://digg.com/tag/funny"
    else mood == "Bad"
      puts "Let\'s FIX THAT NOW!"
      puts "Visit! http://digg.com/tag/funny"
    end
  end

  def video_options
    good_answer = gets.chomp.capitalize
    if good_answer == "Yes"
      puts "Would you like to see News, Funny or Music videos?"
      good_video_options
    else good_answer == "No"
      puts "Good Bye!"
    end
  end

  def good_video_options
    video_answer = gets.chomp.capitalize
    if video_answer == "News"
    puts "Visit! http://digg.com/tag/news"
    elsif video_answer == "Funny"
    puts "Visit! http://digg.com/tag/funny"
    else video_answer == "Music"
    puts "Visit! http://digg.com/tag/music"
    end
  end

end

puts "Hello, welcome to Happy Videos!"
puts "Our goal is to improve your day with interesting videos!"
puts "What is your name?"
user_name = gets.chomp.capitalize
happy_videos = Videos.new(user_name)

happy_videos.start
<file_sep>/RobFroetscher-rfroetscher/midterm/midterm.rb
require 'mail'
require 'pry'
require_relative 'lib/templates'
require_relative 'lib/participant'
require_relative 'lib/mailing'

puts "Welcome to Send-Pretty-Email!\nThis program will help you send beautiful HTML emails to those you love or want to congratulate."
email = Mailing.new
email.send
puts "Message sent!"

###########################################################################
############################ Bryan's Notes ################################
### I'm really impressed. Over all I can tell that you really understand the whole object oriented thing.
### Good job on tackling the whole sendgrid thing. I like that each of your files only has a small amound of code,
### and I think that you have written the program such that you could further divide it. For example, people will
### often times have a file per class.
### I did notice there were a few places, where you used a "while true"(I left inline notes where I found them).
### In the places I noticed, the "while true" code is not actually doing anything. From what I can tell there is no
### instance in which that particular code would evaluate to false. Clearly your code is still working, just make sure
### you know why you are using certain things. The other thing I would challenge you to do, is make sure that you are
### handling user error a little better. For example, I can just enter "@" as my email address and your code accepts it,
### but then throws an error when its time to send the email. Also you don't do anything to make sure that the user enters
### a name, I left it blank and the program proceeded just fine. Clearly these are not deal breakers, just something to think
### about. Lastly, its dangerous to check passwords into github. Your sendgrid password is shown in your code, and thats public.
### There are different ways to hide that type of thing from public view, I would suggest looking into using your ENV files to,
### store sensitive info.
### Great Job overall, I sent myself an email and it worked like a charm.
<file_sep>/RobFroetscher-rfroetscher/ex_teddit_api_news.rb
# We're going to add a remote data source to pull in stories from Mashable and Digg.
  # http://mashable.com/stories.json
  # http://digg.com/api/news/popular.json
# These stories will also be upvoted based on our rules. No more user input!

# Pull the json, parse it and then make a new story hash out of each story(Title, Category, Upvotes)
# Add each story to an array and display your "Front page"

require 'json'
require 'rest-client'
require 'pry'

def calculate_upvotes(story)
	# Write code so that:
		# If the Story is about cats multiply the upvotes by 5
		# If the Story is about bacon multiply the upvotes by 8
		# If the Story is about Food it gets 3 times the upvotes.

	def upvote_multiplier(string_var)
		if string_var.downcase.to_s == "cats"
			5
		elsif string_var.downcase.to_s == "bacon"
			8
		elsif string_var.downcase.to_s == "food"
			3
		else
			1
		end
	end

	if story[:category].class == Array
		multiplier = 1
		story[:category].each do |cat|
			multiplier = multiplier * upvote_multiplier(cat)
		end

		story[:upvotes] = story[:upvotes] * multiplier

	else

		if story[:category].downcase.to_s == "cats"
			story[:upvotes] = story[:upvotes] * 5

		elsif story[:category].downcase.to_s == "bacon"
			story[:upvotes] = story[:upvotes] * 8

		elsif story[:category].downcase.to_s == "food"
			story[:upvotes] = story[:upvotes] * 3

		else story[:upvotes]

		end
	end

	#For example:
	# "Cats frolic despite tuna shortage" should give you 5 times the upvotes!
end

def get_from_mashable
	stories = []
	mashable_news = JSON.load(RestClient.get('http://mashable.com/stories.json'))

	mashable_news['new'].each do | json_story |
		stories << {
			title: json_story['title'],
			category: json_story['channel'],
			upvotes: json_story['shares']['total'] # no upvotes so shares total instead
		}

	end
	stories
end

def get_from_reddit
  stories = []
  reddit_news = JSON.load(RestClient.get('http://www.reddit.com/.json'))

  reddit_news['data']['children'].each do |json_story|
    stories << {
      title: json_story['data']['title'],
      category: json_story['data']['subreddit'],
      upvotes: json_story['data']['ups']
    }
  end
  stories
end

def get_from_digg

	def load_inner_array (key_name)
	collection = []
		self.each do |cat_hash|
			collection << cat_hash[key_name]
		end
	collection
	end

	stories = []
	digg_news = JSON.load(RestClient.get('http://digg.com/api/news/popular.json'))

	digg_news['data']['feed'].each do | json_story |
		stories << {
			title: json_story['content']['title'],
			category: json_story['content']['tags'].load_inner_array('display'),
			upvotes: json_story['digg_score']

		}

	end
	stories
end

def get_from_hacker_news
	stories = []
	hacker_news = JSON.load(RestClient.get('http://api.ihackernews.com/page'))

	hacker_news['items'].each do |json_story|
		stories << {
			title: json_story['title'],
			category: "Hacking",
			upvotes: json_story['points']

		}
	end
	stories
end

def show_all_stories(stories)

	  stories.each do |story|
			show_message "Story: #{story[:title]}, Category: #{story[:category]}, Current Upvotes: #{story[:upvotes]}"
		end
end

def show_message(message)
  puts message
end

mashable_stories = get_from_mashable

digg_stories = get_from_digg

reddit_stories = get_from_reddit

hacker_stories = get_from_hacker_news

mashable_stories.each do |story|
	calculate_upvotes(story)
end

digg_stories.each do |story|
	calculate_upvotes(story)
end

hacker_stories.each do |story|
	calculate_upvotes(story)
end

def category_array_to_string(stories)
	stories.each do |story|
		story[:category] = story[:category].join(", ")
	end
end

show_message("Welcome to Teddit! a text based news aggregator. Get today's news tomorrow!")

show_all_stories mashable_stories

category_array_to_string(digg_stories)

show_all_stories digg_stories

show_all_stories reddit_stories

show_all_stories hacker_stories
<file_sep>/ColinCahill-leroyskagnetti/lab_movie_part2/Movies/app/views/movies/show.html.erb

Movie title: <%= Movie.find(params[:id]).title %>

Movie description: <%= Movie.find(params[:id]).description %>

Year releasd: <%= Movie.find(params[:id]).year_released %>

Would you like to <%= link_to "view all movies", movies_path %> or <%= link_to "create a new entry", new_movie_path %> or <%= link_to "edit a movie", edit_movie_path %>?<file_sep>/RobFroetscher-rfroetscher/ex_secret_number_objects/lib/game.rb
require 'lib/person'
require 'lib/secret_number'

class Game
# this class will be complex
# we need to write logic to initialize a new game, and run the game loop
# we'll want to write a few separate methods for unique tasks so that our
# code is structured properly
	def initialize
		@tries = 3
		@secret_number = SecretNumber.new.secret_number
		game_loop
		lose_notifier
	end

	def guess_count_notifier(tries)
		if tries > 1
		"You have #{tries} guesses before the game is over. What's your guess?"
		else
		"You have #{tries} guess before the game is over. What's your guess?"
		end
	end

	def guess_evaluator(guess)
			if guess == @secret_number
				puts "Congratulations, you won the game!"
				true
			elsif guess > @secret_number
				puts "Your guess is too high!"
				false
			elsif guess < @secret_number
				puts "Your guess is too low!"
				false
			end
	end

	def game_loop
		while @tries > 0 do
			puts guess_count_notifier(@tries)
			@guess = gets.chomp.to_i
			if guess_evaluator(@guess) == true
				break
			end
			@tries -= 1
			puts
		end
	end

	def lose_notifier
		if @tries == 0
		puts "You lost the game! The number was #{@secret_number}."
		end
	end

end
<file_sep>/TolisonHumphrey-thump/Teddit_API Practice/mashable_api_news.rb
# We're going to add a remote data source to pull in stories from Mashable and Digg.
  # http://mashable.com/stories.json
  # http://digg.com/api/news/popular.json
# These stories will also be upvoted based on our rules. No more user input!

# Pull the json, parse it and then make a new story hash out of each story(Title, Category, Upvotes)
# Add each story to an array and display your "Front page"
require 'json'
require 'rest-client'

def mashable_json(stories)
	stories_from_mashable=RestClient.get('http://mashable.com/stories.json')
	stories_json= JSON.load stories_from_mashable
	stories_json_new = stories_json["new"]

	stories_json_new.each do |story|
		news_story={
		:title => story["title"],
		:author => story["author"],
	}

	stories << news_story

	end

	def show_new_story_notification(story)

		def show_message(message)
  			puts message
		end

  		show_message("Story: #{story[:title]}, Author: #{story[:author].split.map(&:capitalize).join(' ')}")
	end

	stories.each do |story|
		show_new_story_notification(story)
	end

end

stories =[]

mashable_json(stories)<file_sep>/jianzheng-hzzj1023/midterm/lib/teddit_search.rb
require 'pry'
require 'pry-debugger'
	class TedditSearch

		  def initialize(call, json_data)
		    @call = call
		    @json = json_data
		    @results = []
		  end

#output the search results
		def output_results
		search(@call.call_type, @call.call_content)
		puts "Here is your search result:"
		show_all_stories (@results)
		  end
#This is where the search is done, depending on the three different search types, different methods are used
		def search (search_type, search_content)

#if user search in title, check if the title contains the string user searched
		if search_type == "title"

			@json['data']['children'].each do |story|
				if story['data']['title'].include? search_content
					create_results story
				end
			end
		end

#if user search in category, check if the category matches the string user searched
		if search_type == "category"
			@json['data']['children'].each do |story|
				if story['data']['subreddit'] == search_content
					create_results story
				end
			end
		end

#if user search in upvotes, return the stories that has upvotes more than the number user entered
	if search_type == "upvotes"
			@json['data']['children'].each do |story|
				if story['data']['ups'] >= search_content
					create_results story
				end
			end
		end
	end

#construct the story hash and results array
		def create_results current_entry
					story = {title: current_entry['data']['title'], category: current_entry['data']['subreddit'], upvotes: current_entry['data']['ups']}
					@results << story
		end

#outputs the result stories
		def show_all_stories(stories)
		if stories.length > 0
		  stories.each do |story|
		    puts "Story: #{story[:title]}, Category: #{story[:category]}, Current Upvotes: #{story[:upvotes]}"
		  end
		else
			puts "There is no story matching your search"
		end

		end

	end<file_sep>/ColinCahill-leroyskagnetti/midterm/lib/twitter_auth.rb
require 'rest-client'
require 'twitter'
require 'pry'

client = Twitter::REST::Client.new do |config|
  config.consumer_key        = "1OjqzZ6XVPN6hbyWWVhR5hrNw"
  config.consumer_secret     = "<KEY>"
  config.access_token        = "<KEY>"
  config.access_token_secret = "<KEY>"
end
binding.pry #careful leaving these in your code<file_sep>/ColinCahill-leroyskagnetti/midterm/location.rb
#gem install geocoder

require 'geocoder'

class Location

		attr_accessor :geocoder, :selection, :coordinates

	def initialize
		puts "Loading Location Finder".center(100,"~")
		self.location_enter
		@coordinates = nil
	end

  	def location_search
	    self.location_enter
	    self.location_results
	    self.select_result
	end

	def location_enter
		puts "Please enter a location (cross-street, city, state, region, IP address):"
		@location = gets.chomp
		@geocoder = Geocoder.search(@location)
	end

	def location_results
		puts "The following matches have been found:\n\n"
		# binding.pry
		if @geocoder.size == 0
			puts "Sorry, but no results could be found for that search term.  Please try again."
			self.location_search
		else
			@geocoder.each_with_index do |name, index|
				# [first , middle , last ].compact.join(',')
				puts "\(#{index + 1}\)  #{name.data["formatted_address"] || name.data["city"] + name.data["region_name"] + name.data["country_name"]}"

				""
			end
		end
	end

	def select_result
		puts "Please enter the number of the closest geographical match to your search query, or \(R\)eturn to the location search."
			@selection = gets.chomp
				if @selection.downcase == "r"
					self.location_search
			elsif @selection.to_i < 1
				puts "You must enter a valid number to proceed."
				self.select_result
			else
				puts "Great.  Your selection has been recorded."
				geo_result = @geocoder[@selection.to_i-1].data
					if geo_result["geometry"].nil?
						@coordinates = "#{geo_result["latitude"]},#{geo_result["longitude"]}"
					else
						@coordinates = "#{geo_result["geometry"]["location"]["lat"]},#{geo_result["geometry"]["location"]["lng"]}"
					end

			end
	end
end
<file_sep>/RobFroetscher-rfroetscher/games/app/views/rock_paper_scissors/show.html.erb

Result:

You chose <%= @options[@player_choice][:name] %>.

The computer chose <%= @options[@computer_choice][:name] %>.

<%= render @outcome %>

<%= link_to "Try again?", new_rock_paper_scissor_path %>

<file_sep>/RobFroetscher-rfroetscher/ex_apartment_objects/lib/apartment.rb
#Apartment class.
class Apartment
	attr_accessor :name, :apt_sqft, :apt_bedrooms, :apt_bathrooms, :renter, :rent

	def initialize(name, apt_sqft, apt_bedrooms, apt_bathrooms)
		@name = name
		@apt_sqft = apt_sqft
		@apt_bedrooms = apt_bedrooms
		@apt_bathrooms = apt_bathrooms

		@renter = []
		@rent = 0
	end

	def to_s
		"Apartment #{@name} is #{@apt_sqft} sqft, has #{@apt_bedrooms} bedrooms and #{@apt_bathrooms} bathrooms"
	end

	def occupants
		@renter
	end
end
<file_sep>/ColinCahill-leroyskagnetti/secret_number.rb
###############################################################################
#
# Back-End Web Development - Homework #1
#
# Secret Number is a game you will build in two parts.
# The purpose of the game is to have players guess a secret number from 1-10.
#
# Read the instructions below.
# This exercise will test your knowledge of Variables and Conditionals.
#
###############################################################################
#
# We're ready to program! To practice our Ruby skills lets create a secret number game.
# In this game players have three tries to guess a secret number between 1 and 10.
#
# Here are some guidelines to building your game:
#
#	Intros
# 	-	Welcome the player to your game. Let them know who created the game.
#	  -	Ask for the player's name then personally greet them by printing to the screen, "Hi player_name!"
#	  -	Any good game will communicate the rules. Let the player know they must guess a number between 1 and 10
#		and that they only have 3 tries to do so.
#
#	Functionality:
#	 -	Hard code the secret number. Make it a random number between 1 and 10.
#	 - 	Ask the user for their guess.
#	 -	Verify if they were correct. If the player guesses correctly they win the game they should be congratulated and the game should end.
#	 -	If they guess incorrectly, give the player some direction. If they guess too high let them know, if they guess too low, let them know.
#	 - 	Don't forget to let your players know how many guesses they have left. Your game should say something like
#		  "You have X many guesses before the game is over enter a another number"
#	 -	If they don't guess correctly after 3 tries, print that the Player lost and the game is over. Also let them know what the `secret_number` was.
#
# Make sure to add helpful comments to your code to document what each section does.
#
# Remember to cast input from the Player into the appropriate data type.
#
###############################################################################

secret_number = 6

puts "Welcome to my game.\nThis game was created by <NAME>ahill."
puts "Player, what is your name?"
	name = gets.chomp
puts "Hi, #{name.capitalize}!"
sleep 1
puts "To play this game, you will guess a number between 1 and 10.\nYou may only take three guesses as to the correct number."

sleep 1

guess_count =0
guess = nil

while guess_count < 3 && guess != secret_number do
	puts "\nEnter your guess:"
	guess = gets.chomp.to_i

	if guess == secret_number
		puts "My stars!  You have guessed the secret number!"
		elsif ((1..10) === guess) == false
			puts "Please enter a number between 1 and 10.".center(100, "*")
		elsif guess < secret_number
			puts "Hmm, I think that is a little low..."
			guess_count = guess_count + 1
			sleep 1
			puts "You have #{3 - guess_count} guesses remaining."
		elsif guess > secret_number
			puts "Hmm, I think that is a little high..."
			guess_count = guess_count + 1
			sleep 1
			puts "You have #{3 - guess_count} guesses remaining."
	end
end

	if guess == secret_number
	exit
	else
		sleep 2
		print "I'm sorry, #{name}, you have failed to guess the secret number within 3 guesses.\n
		The actual secret number was...."
		sleep 2
		print "#{secret_number}!\n"

	end

	# while (counter <=3 || get_input !=6) do
	# 	puts "When you are ready, please submit your guess:"

	# 	guess = gets.chomp

	# 	"Hmm, #{get_input.to_s}!"

	# 		if guess = secret_number
	# 			sleep 1
	# 			puts "My stars!  That is the secret number!  Are you a psychic medium?"
	# 		elsif guess < secret_number
	# 				sleep 1
	# 				puts "I believe that may be a little low..."
	# 		elsif guess > secret_number
	# 				sleep 1
	# 				puts "I believe that may be a little high..."
	# 		end

<file_sep>/RobFroetscher-rfroetscher/ritly/app/views/urls/preview.html.erb

Link preview

Your link is <%= link_to "#{root_url}#{@url.code}", "#{root_url}#{@url.code}" %>

It will redirect to <%= link_to "#{@url.link}", @url.link %>
<file_sep>/arjun-chemparathy/movie_app/app/controllers/movies_controller.rb
class MoviesController < ApplicationController
  def index
  	@display_movies = Movie.all
  end
end<file_sep>/TolisonHumphrey-thump/Teddit_API Practice/Exercise_8a.rb
#Building and sorting an array.

monk_array=[]
word = "yo"

until word == "\n"
	puts "Type as many words as you want"
	word = gets

	monk_array.push word
	puts monk_array.sort
end

<file_sep>/EssieHamadani-ehamadani/secret_number.rb
###############################################################################
#
# Back-End Web Development - Homework #1
#
# Secret Number is a game you will build in two parts.
# The purpose of the game is to have players guess a secret number from 1-10.
#
# Read the instructions below.
# This exercise will test your knowledge of Variables and Conditionals.
#
###############################################################################
#
# We're ready to program! To practice our Ruby skills lets create a secret number game.
# In this game players have three tries to guess a secret number between 1 and 10.
#
# Here are some guidelines to building your game:
#
#	Intros
# 	-	Welcome the player to your game. Let them know who created the game.
#	  -	Ask for the player's name then personally greet them by printing to the screen, "Hi player_name!"
#	  -	Any good game will communicate the rules. Let the player know they must guess a number between 1 and 10
#		and that they only have 3 tries to do so.
#
#	Functionality:
#	 -	Hard code the secret number. Make it a random number between 1 and 10.
#	 - 	Ask the user for their guess.
#	 -	Verify if they were correct. If the player guesses correctly they win the game they should be congratulated and the game should end.
#	 -	If they guess incorrectly, give the player some direction. If they guess too high let them know, if they guess too low, let them know.
#	 - 	Don't forget to let your players know how many guesses they have left. Your game should say something like
#		  "You have X many guesses before the game is over enter a another number"
#	 -	If they don't guess correctly after 3 tries, print that the Player lost and the game is over. Also let them know what the `secret_number` was.
#
# Make sure to add helpful comments to your code to document what each section does.
#
# Remember to cast input from the Player into the appropriate data type.
#
###############################################################################

# greet player
secret_number = 10

# puts "Welcome, to the secret game."
# puts "What's your name?"
# name = gets.chomp
# puts "Nice to meet you #{name}."

def the_player
	puts "Welcome, to the secret game."
	puts "What's your name?"
	name = gets.chomp
	puts "Nice to meet you #{name}."
	puts "Please choose a number between 1 - 10. You only get three tries."
	number = gets.chomp.to_i
	the_loop(number)
	puts "this should not be printed"
end

def the_loop(number, num_tries = 3)

	num_tries.times do |i| # i = 0, 1 # 5.times { |i| puts i}
		number = gets.chomp.to_i
		# do check
		if number == secret_number
			puts "You win!"
			puts i
			# break
		elsif number < secret_number  #i  #< num_tries # you have more tries
			if i < 3
				puts "You are too low" #{i} You have this many tries"
			else number > secret_number
				puts "You are too high" # No winny game"
				puts i
			end
		end
	end
	# do X tries
	# ask for a number
	# verify that number (check if correct)
	#pulling definition also needs the parameters from that definition
end

# understand how many tries we are on
# give them another try

# def the_guess(number,num_tries = 3)
# 	secret_number = 10
# 	if number == secret_number
# 		puts "#{name} you did good. You won!"
# 	else number != secret_number
# 		puts "#{number} is wrong. You have 2 more tries!"
# 	end
# end

#

# def loop(number)
# 	count = 0
# 	while count <= 3
# 		puts "Try again"

the_player

# 	if x == "10"
# 		puts "Well done! You got the secret number!"
# 	elsif
# 		puts "Try again."

# 	end
# end

# # communicate rules

# # Get guess

# # set conditionals
# # set secret number
# # limit tries to 3
# # yes or no conditional

<file_sep>/MaxBranzburg/ex_apartment_objects/lib/building.rb
#Building Class
class Building

	attr_accessor :building_name, :building_address, :apartments

	def initialize(building_name, building_address)
	    @building_name = building_name
	    @building_address = building_address
	    @apartments = []
  	end

  	def view_apartments
  		puts "#{@building_name} @ #{@building_address} inlcudes:"
		apartments.each do |apartment|
			if apartment.rent != nil
				puts "Unit #{apartment.name}: #{apartment.apt_sqft} sqft || #{apartment.apt_bedrooms} bed | #{apartment.apt_bathrooms} bath | Rented for $#{apartment.rent}/month"
			else
				puts "Unit #{apartment.name}: #{apartment.apt_sqft} sqft || #{apartment.apt_bedrooms} bed | #{apartment.apt_bathrooms} bath | Available for rent!"
			end
  		end
  	end
end
<file_sep>/RobFroetscher-rfroetscher/rewsly/app/views/stories/new.html.erb

Create new story

<%= form_for @story do |f| %>

<%= f.label :title %>
<%= f.text_field :title %>

<%= f.label :link %>
<%= f.text_field :link %>

<%= f.label :upvotes %>
<%= f.text_field :upvotes %>

<%= f.label :category %>
<%= f.text_field :category %>

<%= f.submit %>

<% end %>
<file_sep>/ColinCahill-leroyskagnetti/games/app/views/rock_paper_scissors/_tie.html.erb

What the heck....YOU TIED??

<%= image_tag("games/tie.jpg") %>

You'd better try that again, my friend

<file_sep>/mattflannery/secret_number.rb
###############################################################################
#
# Back-End Web Development - Homework #1
#
# Secret Number is a game you will build in two parts.
# The purpose of the game is to have players guess a secret number from 1-10.
#
# Read the instructions below.
# This exercise will test your knowledge of Variables and Conditionals.
#
###############################################################################
#
# We're ready to program! To practice our Ruby skills lets create a secret number game.
# In this game players have three tries to guess a secret number between 1 and 10.
#
# Here are some guidelines to building your game:
#
#	Intros
# 	DONE -	Welcome the player to your game. Let them know who created the game.
#	  -	Ask for the player's name then personally greet them by printing to the screen, "Hi player_name!"
#	  -	Any good game will communicate the rules. Let the player know they must guess a number between 1 and 10
#		and that they only have 3 tries to do so.
#
#	Functionality:
#	 -	Hard code the secret number. Make it a random number between 1 and 10.
#	 - 	Ask the user for their guess.
#	 -	Verify if they were correct. Ifctly they win the game they should be congratulate the player guesses corred and the game should end.
#	 -	If they guess incorrectly, give the player some direction. If they guess too high let them know, if they guess too low, let them know.
#	 - 	Don't forget to let your players know how many guesses they have left. Your game should say something like
#		  "You have X many guesses before the game is over enter a another number"
#	 -	If they don't guess correctly after 3 tries, print that the Player lost and the game is over. Also let them know what the `secret_number` was.
#
# Make sure to add helpful comments to your code to document what each section does.
#
# Remember to cast input from the Player into the appropriate data type.
#
###############################################################################

secret_number = 8

puts "Welcome to this game.  <NAME> created it!"
puts "Can I have your name?"
player_name = gets
print  "Hi " + player_name
puts "Now you must guess a number between 1 and 10 and you will only have three tries!"

number_tries = 0

while true
	puts "What is your guess?"
	player_number = gets.to_i

	if !(player_number > 0 && player_number < 11)
		puts "Thats not a number between 1 and 10!"
	elsif(player_number == secret_number)
		puts "Congratulations you got it!"
		break
	else
		if player_number < secret_number
			puts "That is too low!"
		else
			puts "That is too high!"
		end
	end
	number_tries+=1
	if number_tries >=3
		puts "Sorry you lose!"
		break
	end
end

<file_sep>/ColinCahill-leroyskagnetti/leap_year.rb
# Write a program that asks for a starting year and an ending year and then puts all the leap years between them (and including them, if they are also leap years). Leap years are years divisible by 4 (like 1984 and 2004). However, years divisible by 100 are not leap years (such as 1800 and 1900) unless they are also divisible by 400 (such as 1600 and 2000, which were in fact leap years). What a mess!

puts "Beginning year?"
 x = gets.chomp
 puts "Ending year?"
 y = gets.chomp

(x..y).each do |num|
	  	if num % 4 == 0
	  		puts num
		end
	end
<file_sep>/ColinCahill-leroyskagnetti/lab_movie_part2/Movies/db/seeds.rb
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
#   cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
#   Mayor.create(name: 'Emanuel', city: cities.first)

Movie.create(title:'Pizza Man', description: 'A cheesy story of man\'s struggle to swallow some pepperoni', year_released: 1973)

Movie.create(title:'Silence of the Limbs', description: 'A mime sex worker struggles to track down a psychopathic serial killer', year_released: 1991)

Movie.create(title: 'Lost in America', description: 'Blah blah blah', year_released: 1983)
<file_sep>/MaxBranzburg/rails_games/app/views/rock_paper_scissors/new.html.erb

Welcome to Rock Paper Scissors!

To play this game, pick Rock, Paper, or Scissors. The computer will throw against you, and results are as follows:

Rock beats scissors

Scissors beats paper

Paper beats rock

Same throws tie and user plays again

Choose carefully:

			<% @throws.each_with_index do |throw, num| %>
				<%= link_to image_tag("#{throw}.jpg", :height => 100), rock_paper_scissor_path(num) %>
			<% end %>

<file_sep>/MaxBranzburg/midterm/lib/type.rb
# Class for user-generated story type

class Type
	attr_accessor :desired_type

	def initialize(desired_type)
		@desired_type = desired_type
	end
end
<file_sep>/RobFroetscher-rfroetscher/apartment.rb
class Apartment
	attr_reader :name , :sqft, :num_bedrooms, :num_bathrooms, :renters

	def initialize(name, sqft, num_bedrooms, num_bathrooms)
		@name = name
		@sqft = sqft
		@num_bathrooms = num_bathrooms
		@num_bedrooms = num_bedrooms

		@renters = []
		@rent = 5000
	end

	def occupied?
		renters.any?
	end

	def to_s
		"#{@name} has #{sqft} sqft and #{renters.count} renters."
	end

end

apartment = Apartment.new("Great Apartment!", 1200, 5, 14)
puts apartment<file_sep>/arjun-chemparathy/Secret number /secret_midterm.rb
puts "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
puts "Hello!"
puts "welcome to the Secret Number Game!"
puts "What's your name?"

puts "Rules!"
puts "-------"
puts "Guess a number between 1 and 10"
puts "You have a 3 attempts to guess it correctly"
puts "If you fail, you may play again"
puts "May the force be with you"
<file_sep>/arjun-chemparathy/midterm/midterm_test.rb
require 'json'
require 'rest-client'
require 'pry'
require 'pry-debugger'

puts "Welcome to the Reddit Headline search"
sleep 1
puts "Please enter your name"
user_name = gets.chomp.capitalize
## try using the user class you wrote.... my_user = User.new(gets.chomp.capitalize)

puts "Hello #{user_name}!"
## if you used the user class you could have written "Hello#{my_user.name}"
	sleep 1
puts "We need to verify you are human and not a bot trying to trick us. Please enter a number between 0 and 10."

number = gets.chomp.to_i ## if I enter a letter here, it will evaluate to 0 with the to_i, try taking it off.

if number >= 0 && number <= 10
	puts "Great! You are probably human but I can't be sure. We will give you the benefit of the doubt."
	sleep 1
	puts "Let's get started"
else
	puts "Nice try bot! You didn't pass the human check."
end

class Reddit_search
	def get_from_reddit

	puts "Alright, tell me what you want to look up on Reddit."
	query=gets.chomp
	url="http://www.reddit.com/search.json?q="+query

	response = JSON.load(RestClient.get(url))
	number = 0
	response["data"]["children"].each do |story|
		story_title = {title: story["data"]["title"]}
		puts number += 1
		puts story_title[:title]
		end
	end

	def continue
		puts "Do you want to continue? Y or N"
		answer = gets.chomp
		if answer = "Y"
			get_from_reddit
		else
			puts "Thanks for using my app!"
		end
	end

end

x = Reddit_search.new
x.get_from_reddit
x.continue### your program will only let me search twice no matter what... I would challenge you to introduce
          ### some logic to make sure this continue action keep getting called if the user wants to search more.

########################################################################################################
####################################Bryan's Notes ######################################################
#### Hey Arjun, this is a good start. I can see that you were able to hit the reddit API and make a call
#### to return data based on a user provided parameter.You then did the right thing and parsed the returned
#### JSON and displayed it to the user.
#### I like that you you took a stab at doing this using a class, but there is definately
#### more that you can do with them for this program. I see that you started a User class, but didn't acutally
#### use it in the code base. You were close. I added some notes above to help you include the use of the user
#### class. Another thing to think about is the flow of you program, and whether the different conditionals
#### are actually doing what you want them to. It is important that you get a better grasp of using classes
#### and general logical programatic flow before the end of the course. We really want you to get everything
#### out of the class that we promised. Please come to my office hours before the end of the course
#### and we will sit down together and make sure this program gets tighted up.

<file_sep>/johnfohr-jofo45/08_class_rails/games/app/controllers/rock_paper_scissors_controller.rb
class RockPaperScissorsController < ApplicationController
  def index
  end

  def show
     tie = false
    @throws = ["rock", "paper", "scissors"]
    user_throw = @throws[params[:id]]
    comp_throw = @throws.sample

    if user_throw = comp_throw
      tie == true
      win == false
    elsif user_throw == "paper" && comp_throw == "scissors"
      win == false
    elsif user_throw == "rock" && comp_throw == "scissors"
      win == true
  elsif user_throw == "paper" && comp_throw == "rock"
      win == true
  elsif user_throw == "rock" && comp_throw == "paper"
      win == false
  elsif user_throw == "scissors" && comp_throw == "rock"
      win == false
  else #user_throw == "scissors" && comp_throw == "paper"
      win == true
  end
  end

  def new
end
end
<file_sep>/RobFroetscher-rfroetscher/ritly/app/views/urls/new.html.erb

Welcome to Ritly!

Shorten your link by entering it below:

<%= form_for @url do |f| %>

	<%= f.label :link %>
	<%= f.text_field :link %>

	<%= f.submit %>

<% end %>
<file_sep>/RobFroetscher-rfroetscher/ex_secret_number_objects/lib/person.rb
class Person
# this class will likely be simple, and just remember its name
	attr_reader :name
	def initialize(name)
		@name = name
	end
	def to_s
		@name
	end
end
<file_sep>/RobFroetscher-rfroetscher/ritly/app/controllers/urls_controller.rb
class UrlsController < ApplicationController
  def new
  	@url = Url.new
  end

  def show
  	@url = Url.find(params[:id])
  end

  def preview
  	@url = Url.where(:code => params[:code]).first
  end

  def redirectors
  	@url = Url.where(:code => params[:code]).first
  	if @url
  		redirect_to @url.link
  	else
  		redirect_to root_path :flash => {:error => "We can't find that url"} and return
  	end
  end

  def create
  	@url = Url.new url_params
  	@url.generate_code
  	if @url.save
  		redirect_to url_path(@url.id)
  	end
  end

  private

  def url_params
  	params.require(:url).permit(:link)
  end
end
<file_sep>/ColinCahill-leroyskagnetti/Rewsly/app/views/stories/show.html.erb
<% if flash[:notice] %>
  <%= flash[:notice] %>
<%  end %>

Okay, so lemme get this straight:

You're tellin me that...

"<%= @story.title %>," or somethin' like that.

This is in the category of "<%= @story.category %>."

<%= @story.upvotes %> people have upvoted this story.

I can read the original here: <%= link_to "#{@story.link}", @story.link %>

You can <%= link_to "Edit", edit_story_path %> this story, or <%= link_to "Return to the home page", stories_path %><file_sep>/ColinCahill-leroyskagnetti/midterm/TwitterConnection.rb
require 'pry'
#please make sure these are installed before running

require 'twitter'
require 'rest-client'

#Including OpenSSL disabler to avoid conflicts on outdated OpenSSL terminals.

OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE

class TwitterConnection

 attr_accessor :client, :query

  def initialize
  # Initializes new connection to Twitter API.
  # connection info found here:  http://rdoc.info/gems/twitter

     puts "Loading New Twitter Session".center(100,"~")
     @client = Twitter::REST::Client.new do |config|
       config.consumer_key        = "1OjqzZ6XVPN6hbyWWVhR5hrNw"
       config.consumer_secret     = "<KEY>"
       config.access_token        = "<KEY>"
       config.access_token_secret = "<KEY>"
      end
  end

  def search_input

   # Gets search query from user

    puts "Please enter a search term on Twitter:"
    @query = gets.chomp
      if @query.empty?
        puts "You must enter a valid search term."
        self.search_input
      else ############# no need for this else here #################
      end
  end

  def search

    puts "Let me check on that..."
         @results = client.search(@query, :result_type => "recent", :count =>'10').take(10)
  end

  def search_result

    # Prints each tweet in the returned results

    @results.each do |tweet|
    puts "".center(100,"_")
    puts "\nUser:\t@#{tweet.user.screen_name}\nTweet Text:\t\"#{tweet.text}\"\nTweet time:\t#{tweet.created_at}\n"
    puts "".center(100,"_")
    sleep 0.5
    end
  end

  def location_search_filter

    # Optionally applies a search filter to a location-based query of tweets

      puts "Now, please enter a search term to filter results, or press enter to display all results near your location."
      @query = gets.chomp
      @search_radius = 5
  end

  def location_search(query,coordinates)
    @results = client.search(@query, :geocode =>"#{coordinates},#{@search_radius}mi", :count =>'10').take(10)
      if @results.size < 3
        puts "\nFew tweets found - increasing search radius area."
        sleep 0.5
        @search_radius =  @search_radius * 2
        self.location_search(query,coordinates)
      else############# no need for this else here #################
      end
  end

  def location_search_results
    @results.each do |tweet|
    puts "".center(100,"_")
    puts "\nUser:\t@#{tweet.attrs[:user][:name]}\nTweet Text:\t\"#{tweet.attrs[:text]}\"\nTweet time:\t#{tweet.attrs[:created_at]}\nLocation:\t#{tweet.attrs[:place].class == Hash ? tweet.attrs[:place][:full_name] : tweet.attrs[:user][:location] || "Location not found"}"
    puts "".center(100,"_")
    sleep 0.5
  end############# make sure to use the right indentation...otherwise you might lose track of your 'do' and 'end' tags#################
  end

end<file_sep>/ColinCahill-leroyskagnetti/games/app/views/rock_paper_scissors/new.html.erb

Welcome to Rock Paper Scissors!

Please select Rock, Paper, or Scissors!

<%= link_to "Rock", rock_paper_scissor_path(0) %>

<%= link_to "Paper", rock_paper_scissor_path(1) %>

<%= link_to "Scissors", rock_paper_scissor_path(2) %>

<file_sep>/arjun-chemparathy/04/ex_teddit_api_news.rb
# We're going to add a remote data source to pull in stories from Mashable and Digg.
  # http://mashable.com/stories.json
  # http://digg.com/api/news/popular.json
# These stories will also be upvoted based on our rules. No more user input!

# Pull the json, parse it and then make a new story hash out of each story(Title, Category, Upvotes)
# Add each story to an array and display your "Front page"
require 'json'
require 'rest-client'

# def show_message(message)
#   puts message
# end

# def get_input
#   gets.strip
# end

# def show_new_story_notification(story)
#   show_message("New story added! #{story[:title]}, Category: #{story[:category].capitalize}, Current Upvotes: #{story[:upvotes]}")
# end

# def calculate_upvotes(story)
#   story[:upvotes] = 1

#   if story[:title].downcase.include? 'cat'
#     story[:upvotes] *= 5
#   elsif story[:title].downcase.include? 'bacon'
#     story[:upvotes] *= 8
#   end

#   if story[:category].downcase == "food"
#     story[:upvotes] *= 3
#   end
# end

# def show_all_stories(stories)
#   stories.each do |story|
#     show_message "Story: #{story[:title]}, Category: #{story[:category]}, Current Upvotes: #{story[:upvotes]}"
#   end
# end

# show_message("Welcome to Teddit! a text based news aggregator. Get today's news tomorrow!")
# answer = "y"

# while answer == "y"
#   story = {}

#   story[:title] =

#   show_message("Please give it a category:")
#   story[:category] = get_input

#   calculate_upvotes(story)

#   stories << story
#   show_new_story_notification(story)

#   show_message("Would you like to add another story? Enter 'y' or 'n'")
#   answer = get_input.strip.downcase
# end

def reddit_json(stories)
	stories_from_reddit=RestClient.get('http://www.reddit.com/.json')
	stories_json = JSON.load stories_from_reddit

	stories_json["data"]["children"].each do |story|
		new_story={
		:title => story["data"]["title"],
		:author => story["data"] ["author"],
		:upvotes => story["data"] ["ups"]
	}
	stories << new_story

	end
def show(frontpage)
	new_story.each do
		puts title
		puts author
		puts upvotes
	end
end

	# title = stories_json["data"]["children"].first["data"]["title"]

stories =[]

reddit_json(stories)

<file_sep>/RobFroetscher-rfroetscher/rewsly/app/views/stories/index.html.erb

Welcome to Rewsly!

<%= form_tag(root_path, method: "get") do %>
<%= label_tag(:q, "Search for:") %>
  <%= text_field_tag(:q) %>
  <%= submit_tag("Search") %>
<% end %>

Here are the most recent stories:

<% @stories.each do |s| %>

<%= link_to s.title, story_path(s.id) %>

<% end %>

<%= link_to "New Story", new_story_path %>

<file_sep>/ColinCahill-leroyskagnetti/ex_secret_number_objects/lib/person.rb
class Player
		attr_accessor :name

	def initialize
		@name = "Player"
	end

	def name
		@name
	end

end
<file_sep>/TolisonHumphrey-thump/Course05_ClassObjects/ex_apartment_objects/lib/building.rb
#Building Class
class Building
	attr_accessor :building_name, :building_address

	def initialize(building_name, building_address)
		@building_name = building_name
		@building_address = building_address
	end

	def apartments
		@apartments = Array.new
	end

	def view_apartments
		@apartments.each do |apartment|
			puts "-------"
		end
	end

end
<file_sep>/MaxBranzburg/rails_games/app/controllers/rock_paper_scissors_controller.rb
class RockPaperScissorsController < ApplicationController
  def new
  	@throws = ["Rock", "Paper", "Scissors"]
  end

  def show
  	@throws = ["Rock", "Paper", "Scissors"]
  	@user_throw = @throws[params[:id].to_i]
  	@comp_throw = @throws.sample
  	@result = get_results(@user_throw, @comp_throw)
  end

  def get_results(user_throw, comp_throw)
  	if @user_throw == @comp_throw
  		'tie'
  	elsif @user_throw == "Rock" && @comp_throw == "Paper"
  		'lose'
   	elsif @user_throw == "Rock" && @comp_throw == "Scissors"
  		'win'
  	elsif @user_throw == "Paper" && @comp_throw == "Scissors"
  		'lose'
   	elsif @user_throw == "Paper" && @comp_throw == "Rock"
  		'win'
  	elsif @user_throw == "Scissors" && @comp_throw == "Rock"
  		'lose'
   	elsif @user_throw == "Scissors" && @comp_throw == "Paper"
  		'win'
  	end
  end

end
<file_sep>/mattflannery/ex_secret_number_objects/lib/secret_number.rb
class SecretNumber
# this class will generate our secret number for us

	attr_accessor :number

	def initialize ()
		number_array = Array.new(10) {|i| i+1 }
		@number = number_array.sample
	end
end <file_sep>/johnfohr-jofo45/05_class/birthday_program.rb
require 'yaml'

def yaml_load filename
	yaml_string = File.read filename
	YAML::load yaml_string
end

birthday_hash = yaml_load 'file_with_hash_info.txt'

puts birthday_hash
puts
puts birthday_hash["John"]<file_sep>/TolisonHumphrey-thump/Course05_ClassObjects/code_demo_apartment.rb
#Explaining classes, objects, attr_accessor & load paths.
#TIME: 30 min

#Need for an apartment listing

class Apartment
	attr_accessor :name, :sqft, :num_bedrooms, :num_baths)
	def initialize (name, sqft, num_bedrooms, num_baths, renters)
		@name = name
		@sqft = sqft
		@num_bedrooms = num_bedrooms
		@num_baths = num_baths
		@renters = renters

		@renters = []
		@rent = 0
	end

	def occupied?
		@renters.any?
	end
#Overriding junk to provide meaningful output- Overrides the string method
	def to_s
		"#{@name} has #{sqft} and #{@renters.count} renters."
	end
end

class ApartmentListing
	attr_accessor :apartments

	def initialize
		@apartments = []
	end

	def apartment_availability
		apartments.each do |apartment|
			if apartment.occupied?
				puts "This apartment is not for rent"
			else
				puts apartment
				puts "This aparment is for rent, ask your broker for more details."
			end
		end
	end
end

listing = Apartment.new
listing.apartments << Apartment.new ("Great Apartment!", 1200, 5, 14, [])
<file_sep>/TolisonHumphrey-thump/midterm/Swift_Foot/lib/manko_pei.rb
require_relative 'user'
require_relative 'eventbrite_api'
#require 'json'
#require 'rest-client'

class Manko_Pei
	attr_accessor :user, :step_count, :eb_url

	def initialize(user)
		@user = User.new
		@step_count = step_count
		@eb_url = eb_url
	end

	def activity_evaluation
		puts "What is your daily step count?"
		@step_count = gets.to_i

		burn_factor = 0.03
		daily_calburn = @step_count.to_f * burn_factor

		puts "You are burning #{daily_calburn} calories per day"

        #might want to make this part a private method that is called by activity_evulation to reduce the size
		if @step_count < 7499
			@user.category = 'couch_potato'
			puts "You are a Couch Potato!\n\nGet off the couch! You are living an unhealthy, sedentary lifestyle.\n\n"
		elsif @step_count == 7500 || @step_count < 12499
			puts "You are Average!\n\nYour lifestyle is somewhat active. Still room for improvement.\n\n"
			@user.category = 'average'
		elsif @step_count > 12500
			puts "You are a Juggernaut!\n\nTime to plan the next marathon!\n\n"
			@user.category = 'juggernaut'
		end

		activity = ['walk','salsa','marathon']

        #same above
	 	if @user.category == 'couch_potato'
	 		n = 0
	 	elsif @user.category == 'average'
	 		n = 1
	 	elsif @user.category == 'juggernaut'
	 		n = 2
	 	end

		activity_selection = activity[n]
		@eb_url = 'https://www.eventbriteapi.com/v3/events/search/' + '?q=' + "#{activity_selection}" + "&token=<PASSWORD>"

		activity_bank = []

		eventbrite_rec(@eb_url, activity_bank)
	end
end<file_sep>/TolisonHumphrey-thump/Secret_Number/lib/game.rb
require_relative 'player'
require_relative 'number'
require 'pry'

class Game
	attr_reader :player, :winning_number, :guess, :tries

	def initialize(player)
		@player = Player.new
		@winning_number = Number.new.winning_number
		@tries = 3
		@guess = guess
	end

	def start
		puts "#{@winning_number}"

		while (guess != @winning_number && tries != 0)
			puts "What number am I thinking of?"
			guess = gets.to_i
			@tries = @tries - 1

			if guess == @winning_number
				puts "CONGRATS YOU WIN #{winning_number} CRISPY TACOS!"
			elsif guess < @winning_number
				puts "Your number is too low! \n"
			elsif guess > @winning_number
				puts "Your number is too high! \n"
			end

			if guess != @winning_number
				puts "You have #{tries} more guess(es) before the game is terminated \n Guess another number!"
			end
		end

		if guess != @winning_number
			puts "YOU LOSE : _("
		end
	end
end<file_sep>/ColinCahill-leroyskagnetti/ritly/app/views/links/redirectors.html.erb
<% @long_url = Link.where(hash_code: :code) %>
  	<%if @long_url%>
  			<%@long_url%>
  		<%else%>
  			<%'links#index'%>
  		<%end%>
  <file_sep>/MaxBranzburg/midterm/lib/results.rb
# Accepts array of stories matching search query,
# including search term, results-list length, and
# story type (new, hot, rising), and produces the
# appropriate message depending on the number of
# results and the sorted list of results, including
# relevant meta-data (e.g., title, channel, and shares),
# sorted from most shares to least.

require_relative 'length'
require_relative 'stories'

class Results

	attr_accessor :raw_stories, :sorted_stories, :max_index, :results_language, :desired_type, :search_term

	def initialize(desired_type, search_term)
		@desired_type = desired_type
		@search_term = search_term
		@raw_stories = Stories.new(desired_type, search_term)
		@max_index = Length.new.results_length
		@results_language = results_language
		@sorted_stories = []
	end

	def results_header
		if @max_index == 0
			@results_language = "You must be feeling lucky!\nHere is the most shared story about '#{search_term}':"
		elsif @sorted_stories.count == 1
			@results_language = "There is actually only one story about '#{search_term}':"
		elsif @sorted_stories.count <= @max_index
			@results_language = "There are actually only #{@sorted_stories.count} stories about '#{search_term}'.\nThey are below (sorted by # shares):"
		else
			@results_language = "Top #{@max_index + 1} search results below (sorted by # shares):"
		end
		puts @results_language
	end

	def sort_stories
		@unsorted_stories = @raw_stories.build_stories
	    if @unsorted_stories.count == 0
	      puts
	      puts "=================================================="
	      puts "Sorry, there are no stories that match your query."
	      puts "=================================================="
	      puts
	    else
	      @sorted_stories = @unsorted_stories.sort_by{|k| k[:shares]}.reverse
	      puts
	      puts "==================================================="
	      results_header
	      puts "==================================================="
	      puts

	      @sorted_stories[0..@max_index].each do |unique_story|
	        puts "Story: #{unique_story[:title]}"
	        puts "Channel: #{unique_story[:channel]}"
	        puts "Shares: #{unique_story[:shares]}"
	        puts
	      end
    	end
 	end
end<file_sep>/mattflannery/midterm/markets.rb
class Markets

  def index
  	curr_price = Price.new
  	current_client = CoinbaseClient.new(current_user)
  	curr_price.buy_price = current_client.get_buy_price
  	curr_price.client = current_client.client_name
    curr_price.save
  	@prices = Price.all

  end

  def live
  	@prices = [] #= Price.all #uncomment this to see all of the prices instead of just the live updates
  end

  def stream
  	response.headers["Content-Type"] = "text/event-stream"
  	loop do
      price = update_price
      response.stream.write("event: price_update\n")
      response.stream.write("data: #{price.to_json}\n\n")
      #sleep 1 #Matt: 1 = one second, put any number here.
  	end

    rescue IOError
      Rails.logger.info "Stream closed"
    ensure
      response.stream.close

  end

  private

  def update_price
    curr_price = Price.new
    curr_price.buy_price = CoinbaseClient.get_buy_price
    curr_price.client = CoinbaseClient.client_name
    curr_price.save
  	curr_price
  end

end
<file_sep>/RobFroetscher-rfroetscher/movie_app/app/views/movies/index.html.erb

Welcome to Retflix!

See our collection of movies below

<% @movies.each do |movie| %>

	<%= link_to movie.title, movie_path(movie.id) %>
	<%= movie.description %>
	<%= movie.year_released %>
	<%= movie.rating %>
	<%= link_to "Edit", edit_movie_path(movie.id) %>

<% end %>

<%= link_to "Add new movie", new_movie_path %>
<file_sep>/jianzheng-hzzj1023/ex_apartment_objects/lib/building.rb
#Building Class
class Building
attr_accessor :building_name, :building_address, :apartments

	def initialize(building_name, building_address)
		@building_name = building_name
		@building_address = building_address

		@apartments = []

	end

	def view_apartments
		@apartments.each do |apartment|
			puts apartment
		end
	end
end

<file_sep>/RobFroetscher-rfroetscher/movie_app/app/views/movies/show.html.erb

<%= @movie.title %>

<%= @movie.year_released %>

<%= @movie.description %>

<% if @movie.rating? %>

Rating: <%= @movie.rating %> stars

<% end %>
<%= link_to "See all movies", root_path %><file_sep>/RobFroetscher-rfroetscher/movie_app/app/views/movies/edit.html.erb

Edit <%= @movie.title %>

<% if @movie.invalid? %>

There was a problem saving your movie:

	<% @movie.errors.full_messages.each do |error| %>

<%= error %>

	<% end %>
<% end %>
<%= render 'form' %><file_sep>/johnfohr-jofo45/midterm/main.rb
# $LOAD_PATH.unshift (File.dirname(__FILE__))
require_relative  'lib/signup'
require_relative  'lib/linked_accounts'
require_relative  'lib/reddit'
require  'date'
require 'pry'
require 'pry-debugger'

def initial_signup
	puts "\nWhat is your email?\n"
	email = gets.strip
	puts "\n\nThank you for providing me your email.  Now we can stay in touch!  To get the most out of Share Life, we need to learn a little more about you!  \n\nWhat is your name?\n"
	name = gets.strip
	@account = Signup.new(email, name)
	email = @account.email
	name = @account.name
	confirm_email_name
end

def additional_info

	puts "We need a little more information to continue."

	puts "\n\nWhat is your sex?\n(m)ale\n(f)emale\n"
	sex_response = gets.strip.downcase

	until sex_response == 'm' || sex_response == 'f'
	puts "Oh no!  I don't understand what you wrote.  What is your sex?\n(m)ale\n(f)emale\n"
	sex_response = gets.strip.downcase
	end

	case sex_response
	when "m"
		@account.sex = 'male'
	when "f"
		@account.sex = 'female'
	end

	puts "\nAlmost there!  Please tell me your date of birth."
	puts "What year were you born?"
	dob_year = gets.strip.to_i
	puts "What month were you born? (i.e. 01, 02, 03, etc)"
	dob_month = gets.strip.to_i
		until dob_month > 0 && dob_month <= 12
		puts "Sorry, I don't understand.  What month were you born? (i.e. 01, 02, 03, etc).  Please enter a month between 1-12."
		dob_month = gets.strip.to_i
		end
		case dob_month
		when 1
			dob_month_en = "January"
		when 2
			dob_month_en = "February"
		when 3
			dob_month_en = "March"
		when 4
			dob_month_en = "April"
		when 5
			dob_month_en = "May"
		when 6
			dob_month_en = "June"
		when 7
			dob_month_en = "July"
		when 8
			dob_month_en = "August"
		when 9
			dob_month_en = "September"
		when 10
			dob_month_en = "October"
		when 11
			dob_month_en = "November"
		when 11
			dob_month_en = "December"
		end

	puts "What day in  were you born?"
	dob_day = gets.strip.to_i

	puts "Rock on!  Thank you for letting us know you were born on #{dob_day} #{dob_month_en}, #{dob_year}."

	dob = Date.new(dob_year,dob_month,dob_day)
	@account.date_of_birth = dob

	# account = Signup.new(email, name)

	puts "#{@account.date_of_birth}."

	puts "\nThank you #{@account.name} for signing up for ShareLife.com! \n"

end

def confirm_email_name
	puts 'clear'
	puts "\n\nIs your name and email correct? \nName:  #{@account.name}\nEmail: #{@account.email}\n\nPlease enter (y)es or (n)o."

	@email_name_confirmation = gets.strip.downcase

	until @email_name_confirmation == 'y' || @email_name_confirmation == 'n'
	puts `clear`
	puts "Oh no!  I don't understand what you wrote. Please confirm your name and email is:  \nName: #{@account.name}\nEmail: #{@account.email}\n\nDoes your name/email look correct?  (y)es?  (n)o\n"
	@email_name_confirmation = gets.strip.downcase
	end

	if @email_name_confirmation == 'y'
		puts "Excellent!"
	elsif @email_name_confirmation == 'n'
		puts 'clear'
		puts "oh no!  No worries, we can correct that!\n"
		initial_signup
	end
end

def link_health_account_to_user
	@fit_bit = LinkedAccounts.new("Fit Bit", 1)
	@up_by_jawbone = LinkedAccounts.new("UP by Jawbone", 2)

	#how can i create this variable without having to assign a random variable to it before the "until" statement?

	@account_options = [@fit_bit, @up_by_jawbone]

	account_to_link =  10000000

	valid_options = @account_options.map { |account| account.account_code }
	#valid_options = Account.pluck(:account_code)

	until account_to_link <= @account_options.length && account_to_link > 0
	# while account_to_link.nil?
	puts `clear`
	puts "Please choose which accounts you would like to connect.  (Please enter a number.)"

	################################Bryan's Changes###################################
	puts "#{list_each_available_account}"
	### So it looks like your method 'list_each_available_account' was printing the information
	### but then was also returning the whole array. So a method will do the things you ask it to
	### but then it will also return a value. So here is was printing like you asked it to, but
	### it then returned the array it was working on. So instead if you just returned a string
	### from that method, it would not default to returning the array after it printed the strings.
	##################################################################################

	puts "\n\n\n\n\n\nINSTRUCTOR QUESTION:  How do i remove the code from displaying the entire array in this screen?"
	# account_to_link = gets.strip.to_i

	input = gets.strip.to_i

		if valid_options.include?(input)
			account_to_link = input
		end
	end

	account = @account_options.find { |account| account.account_code == account_to_link }
	# account = Account.find_by(account_code: account_to_link)

	#this adds the health account to the user account.   Is there a better way of doing this?
	# *****how can i automate this "case" so that it links the info from one key in the hash to another key value in the same hash?
	case account_to_link
		when 1
	 	  @account.accounts_linked.push(@fit_bit)
	 	  puts "\nExcellent!  You added #{@account.accounts_linked.last.account_name} to your account."
	 	when 2
	 	  @account.accounts_linked.push(@up_by_jawbone)
	 	  puts "\nExcellent!  You added #{@account.accounts_linked.last.account_name} to your account."
		else
		  puts "\nI'm sorry, there is an error.  Please close and restart."
	end
end

def list_each_available_account
	@account_options.each do |individual_account|
		 "#{individual_account.account_code}:#{individual_account.account_name}\n"
		 ######################## Bryan's Notes ####################################
		 ## I took the puts off, this method should only return a string, and the code
		 ## above handles the printing of the value that this method gives it.
	end
end

def reddit_display

	puts "Now would you like to see health stories from Reddit?\n(y)es\n(n)o\n"

	@reddit_confirmation = gets.strip.downcase

	until @reddit_confirmation == 'y' || @reddit_confirmation == 'n'
	puts `clear`
	puts "\n\nOh no!  I don't understand what you wrote. Please confirm you want to read health articles on reddit.  OK?  \n(y)es?  \n(n)o\n"
	@reddit_confirmation = gets.strip.downcase
	end

	if @reddit_confirmation == 'y'
		puts "Excellent!"
		red_instance_of_class = Reddit_info.new
		puts red_instance_of_class.reddit_api_info
		puts "\n\nThank you for using my app!"

	else @reddit_confirmation == 'n'
		puts "oh no!  You said no!   It is important that you see all of these amazing health articles on reddit.  I'll give you another opportunity to make the correct choice.\n"
		reddit_display
	end
end

# @account = Signup.new("email", "name")

# @account = Signup.new()

puts `clear`
puts "\n*********************************************\nThis is the mid-term!  I learned a lot.\n*********************************************\n"
puts "Welcome to ShareLife.com, where our users help top scientists combat the most difficult medical diseases.  ShareLife provides our users a confidential and secure means to control what health data, if any, they wish to share with scientists at the top universities, including Stanford, Harvard, and the Mayo Clinic.  Learn more about how it works.\n"

# gets email/name and then confirms email/name
initial_signup

# # starts next process where the user will connect their accounts.
link_health_account_to_user

additional_info

reddit_display

#####################################################################################
################################Bryan's Notes########################################
##  Hey John, Greate Job here. You really created a program with a complicated flow.
## I like that you really tried to used methods and some classes to divide up the
## functionality of the program. I left you some notes about halfway up the page about
## how to solve your pesky array issue. Great job on making a call to the reddit API.
## It feels like that part is not really inline with the rest of the app, but I appreciate
## you putting it in there to make sure you met the midterm requirements. Your code is
## pretty clean and well indented, that important for readability and debugging in the
## long run.
## In the future when you are writing the program, I would challenge you to try to prepare
## for whatever the user might enter. For example, I can enter what ever I want to for the
## email and name etc. You did a good job of making sure the user stays within the bound of
## the program in most places, but in general expect the user to mess up alot.
## Let me know if you would like further explanation here, but in general I can tell you
## understand everything we expected you to for this midterm.

<file_sep>/RobFroetscher-rfroetscher/ex_apartment_objects/lib/building.rb
#Building Class
class Building
	attr_accessor :building_name, :building_address, :apartments

	def initialize(building_name, building_address)
		@building_name = building_name
		@building_address = building_address

		@apartments = []
	end

	def view_apartments
		@apartments.each do |unit|
			puts unit
			puts unit.occupants
		end
	end

	def to_s
		"Building #{@building_name} has #{@apartments.count} apartments and is located at #{@building_address}"
	end
end
<file_sep>/arjun-chemparathy/ex_apartment_objects/lib/building.rb
#Building Class
class Building
	attr_accessor :building_name, :building_address, :apartments

	def initialize (building_name, building_address)
		@building_name = building_name
		@building_address = building_address

		@apt_count = 0
		@apartments = []
	end
end
<file_sep>/MaxBranzburg/ex_secret_number_objects/lib/game.rb
require 'lib/person'
require 'lib/secret_number'

class Game
# this class will be complex
# we need to write logic to initialize a new game, and run the game loop
# we'll want to write a few separate methods for unique tasks so that our
# code is structured properly

	attr_accessor :player, :sec_num, :guess, :remaining_guesses

	def initialize
		@player = Person.new("Max").name
		@sec_num = SecretNumber.new.rand_number
		@guess = guess
		@remaining_guesses = remaining_guesses
	end

	def check_num
		puts "What do you think the secret number is?"
		@remaining_guesses = 10
		while @guess != @sec_num && @remaining_guesses >= 0 do
			@guess = gets.chomp.to_i
			if @guess > @sec_num
				if @remaining_guesses > 0
					puts "Too high, you have #{remaining_guesses.to_s} guess(es) left."
					@remaining_guesses = @remaining_guesses - 1
				else
					puts "Still too high.  No more guesses left!"
					@remaining_guesses = @remaining_guesses - 1
				end
			elsif
				@guess < @sec_num
				if @remaining_guesses > 0
					puts "Too low, you have #{remaining_guesses.to_s} guess(es) left."
					@remaining_guesses = @remaining_guesses - 1
				else
					puts "Still too low.  No more guesses left!"
					@remaining_guesses = @remaining_guesses - 1
				end
			else
				puts "Correct!"
			end
		end
	end
end<file_sep>/mattflannery/midterm/coinbase_client.rb
class CoinbaseClient < Client

	@base_url = "https://coinbase.com/api/v1"

	def initialize
		@client_name = CLIENT_NAMES[0]
	end

	def get_buy_price
		r = generic_get ('https://coinbase.com/api/v1/prices/buy')
		r['amount'].to_money(r['currency'])
	end

end
<file_sep>/jianzheng-hzzj1023/ex_secret_number_objects/lib/game.rb
require 'lib/person'
require 'lib/secret_number'

class Game

	def initialize (player)

		@player = player
		@secret_number = SecretNumber.new
	end

	def greeting

		puts "\n"
		puts "Hi #{@player.name}!"
		puts "Here are the rules for the Secret Number game:"
		puts "You have three chances to guess a number between 1 and 10"
		puts "You will get hint everytime you guess a number so you can adjust your next guess"
		puts "You win the game if you guess the number right within 3 guesses and you lose if you don't"
		puts "\n"

	end

	def play
		puts "Plesae enter your first guess:"

		user_guess = gets.strip.to_i

		2.downto(0) do |i|
		if user_guess == @secret_number.value
			puts "Congratulations! You won!"
			break
		else
			if i > 0
				if user_guess > @secret_number.value
					number_difference = "high"
				else number_difference = "low"
				end
				puts "The number you guessed is too #{number_difference}. You have #{i} guesses before the game is over enter another number:"
				user_guess = gets.strip.to_i
			else
			puts "You lost! The secret_number is #{@secret_number.value}"
			end
		end
		end

	end

# this class will be complex
# we need to write logic to initialize a new game, and run the game loop
# we'll want to write a few separate methods for unique tasks so that our
# code is structured properly
end
<file_sep>/ColinCahill-leroyskagnetti/Rewsly/app/views/stories/new.html.erb
<% if @story.errors.any? %>

There were errors saving your shirt:

    <% @story.errors.full_messages.each do |msg| %>

<%= msg %>

    	<% end %>

<% end %>

Heya kid, you got a hot tip?

What's the word on the street?

<%= form_for @story do |s| %>

    <%= s.label "Story Title" %>
    <%= s.text_field :title %>

    <%= s.label :category %>
    <%= s.text_field :category %>

    <%= s.label "Number of Upvotes" %>
    <%= s.text_field :upvotes %>

    <%= s.label "External Link to Story" %>
    <%= s.text_field :link %>

<%= s.submit %>
<% end %>

<%= link_to "Return", stories_path %> to the home page.<file_sep>/ColinCahill-leroyskagnetti/ex_apartment_objects/lib/building.rb
#Building Class
class Building
	attr_accessor :building_name, :building_address, :apartments

	def initialize(building_name, building_address)
		@building_name = building_name
		@building_address = building_address
		@apartments = []
	end

	def view_apartments
		puts "******************Highrise Luxury Apartment Listing****************** \n"
		@apartments.each do |apt|
			puts apt.name
			puts "sqft: #{apt.apt_sqft}\t Bedrooms: #{apt.apt_bedrooms}\t Bathrooms: #{apt.apt_bathrooms}\n"
			if apt.renter.nil?
				puts "This apartment is vacant."
			else puts "This apartment is rented."
			end

		end
	end
end
<file_sep>/RobFroetscher-rfroetscher/games/app/views/rock_paper_scissors/new.html.erb

Welcome to Rock, Paper, Scissors

To start the game, make a choice below:

	<% @options.each do |item| %>

<%= link_to item[:name], rock_paper_scissor_path(item[:number]) %>

	<% end %>

<file_sep>/RobFroetscher-rfroetscher/rewsly/app/controllers/stories_controller.rb
class StoriesController < ApplicationController
  def index
  	if params[:q]
  	@stories = Story.where("title LIKE ? OR category LIKE ?", "%#{params[:q]}%", "%#{params[:q]}%")
  	else
  	@stories = Story.where("strftime('%Y-%m-%d', created_at) = ?", Date.today + 1)
  	end
  end

  def new
  	@story = Story.new
  end

  def show
  	@story = Story.find params[:id]
  end

  def create
  	@story = Story.new story_params
  	if @story.save
  		redirect_to root_path
  	else
  	end
  end

  private
  def story_params
  	params.require(:story).permit(:title, :link, :upvotes, :category)
  end

end
<file_sep>/johnfohr-jofo45/04class/mashable_api.rb

# mashable

require "json"
require "rest-client"

# def get_from_mashable
# 	mashable_info = RestClient.get("http://www.mashable.com/stories.json")
# 	result = JSON.load(mashable_info)
# 	#creates hash of the parameter "mashable_edit"

# 	stories = []

# 	mashable_stories_array = result['new']

# 	mashable_stories_array.each do |json_story|

# 		stories.push ({
# 			title: json_story['title'],
# 			date: json_story['post_date'],
# 			author: json_story['author']
# 		})
# 	end
# 	stories
# end

# puts get_from_mashable

# digg

# def get_from_digg
# 	digg_info = RestClient.get("http://digg.com/api/news/popular.json")
# 	result = JSON.load(digg_info)
# 	#creates hash of the parameter "mashable_edit"

# 	stories = []

# 	digg_stories_array = result['data']["feed"]

# 	digg_stories_array.each do |json_story|

# 		stories.push ({
# 			title: json_story["content"]['title'],
# 			date: json_story['date'],
# 			score: json_story['digg_score'],
# 			author: json_story['author']
# 		})
# 	end
# 	stories
# end

# puts get_from_digg

def get_from_jobs
	jobs_info = RestClient.get("http://api.usa.gov/jobs/search.json")
	result = JSON.load(jobs_info)
	#creates hash of the parameter "mashable_edit"

	stories = []

	jobs_array = result

	jobs_array.each do |json_story|

		stories.push ({
			title: json_story["position_title"],
			date: json_story['organization_name'],
			max: json_story['maximum'],
			min: json_story['minimum'],
			locations: json_story['locations']
		})
	end
	stories
end

puts get_from_jobs
<file_sep>/RobFroetscher-rfroetscher/games/app/controllers/rock_paper_scissors_controller.rb
class RockPaperScissorsController < ApplicationController
  before_action :set_options, only: [:new, :show]

  def new
  	@options = get_options
  end

  def show
  	@options = get_options
  	@computer_choice = rand(0..2)
  	@player_choice = params[:id].to_i
  	calculate_winner
  end

  private

  def calculate_winner
  	@options = get_options
  	game_result = rock_paper_scissors(@options[@player_choice][:name],@options[@computer_choice][:name])
  	if game_result == @options[@player_choice][:name]
  		@outcome = "win"
  	elsif game_result == @options[@computer_choice][:name]
  		@outcome = "lose"
  	else
  		@outcome = "tie"
  	end

  end

  def set_options
   [{name: "Rock", number: 0},{name: "Paper", number: 1}, {name: "Scissors", number: 2}]
  end

  def rock_paper_scissors(choice_1, choice_2)
  	choicearray = [choice_1, choice_2]

  	if choicearray.include?("Rock") && choicearray.include?("Paper")
  		"Paper"
  	elsif choicearray.include?("Rock") && choicearray.include?("Scissors")
  		"Rock"
  	elsif choicearray.include?("Scissors") && choicearray.include?("Paper")
  		"Scissors"
  	elsif choicearray[1] == choicearray[2]
  		nil
  	end
  end

end
<file_sep>/mattflannery/ex_secret_number_objects/lib/game.rb
require 'lib/person'
require 'lib/secret_number'

class Game

	attr_accessor :secret_number, :current_player, :secret_number

	def initialize()
		puts "Welcome to the Secret Number Game!"

		puts "...and what is your name?"
		player_name = gets

		@current_player = Person.new ( player_name )

		print  "Hi " + @current_player.name

		@secret_number = SecretNumber.new()

		play

	end

	def play

		puts "Now you must guess a number between 1 and 10 and you will only have three tries!"

		number_tries = 0

		while true
			puts "What is your guess?"
			player_number = gets.to_i

			if !(player_number > 0 && player_number < 11)
				puts "Thats not a number between 1 and 10!"
			elsif(player_number == @secret_number.number)
				puts "Congratulations you got it!"
				break
			else
				if player_number < @secret_number.number
					puts "That is too low!"
				else
					puts "That is too high!"
				end
			end

			number_tries+=1

			if number_tries >=3
				puts "Sorry you lose!"
				break
			end
		end
	end
end
<file_sep>/mattflannery/midterm/Client.rb
class Client

	require 'multi_json'
	require 'hashie'
	require 'httparty'
	require 'monetize'

	CLIENT_NAMES = %w[coinbase blockchain]

	def get_buy_price
	end

	def generic_get(url)
		uri = URI.parse(url)
		http = Net::HTTP.new(uri.host, uri.port)
		http.use_ssl = true

		request = Net::HTTP::Get.new(uri.request_uri)
		response = http.request(request)
		if response.body && response.body.length >= 2
			jsonout = JSON.parse(response.body)
		end
	end

	def generic_post(url, params)
		uri = URI.parse(url)
		response = Net::HTTP.post_form(uri, params )
	end
end  <file_sep>/ColinCahill-leroyskagnetti/Rewsly/app/views/stories/edit.html.erb
<% if @story.errors.any? %>

There were errors saving your shirt:

    <% @story.errors.full_messages.each do |msg| %>

<%= msg %>

    	<% end %>

<% end %>

What, you wanna change the facts?

You're a real journalist!

<%= form_for @story do |s| %>

Current title: <%= @story.title %>

    <%= s.label "New title" %>
    <%= s.text_field :title %>

 	Current category: <%= @story.category %>

    <%= s.label "New Category" %>
    <%= s.text_field :category %>

	Current number of upvotes: <%= @story.upvotes %>

    <%= s.label "New # of Upvotes" %>
    <%= s.text_field :upvotes %>

Current link to story: <%= link_to "#{@story.link}", @story.link %>

    <%= s.label "External Link to Story" %>
    <%= s.text_field :link %>

<%= s.submit %>
<% end %>
<file_sep>/arjun-chemparathy/Week 3/ch7hw.rb

def didnt_hear
	puts "Grandma: HUH?! SPEAK UP!"
	puts "(Try yelling (all caps). Grandma has hearing issues as you know.)"
	question
end

def heard
	puts "Grandma: NO, NOT SINCE 1938!"
	question
end

def bye_3_check
	bye = 1
	until bye == 3
			puts "(One more time in all caps. She didnt hear it)"
			bye_two = gets.chomp
			if bye_two == "BYE"
				bye = bye + 1
			else
				bye_loop
			end
	end
	puts "Grandma: Fine. Go away! I never liked you!"
end

def bye_loop
	puts "(looks like you are trying to say Bye. Try again, remember to yell)"
	bye_response = gets.chomp
	if bye_response == "bye".upcase
		bye_3_check
	else
		question
	end
end

def question
	puts "(Say something to Grandma or say bye)"
	to_grandma = gets.chomp
	if to_grandma == to_grandma.upcase && to_grandma.downcase != "bye"
		heard
	elsif to_grandma == "bye" || to_grandma == "Bye"
		bye_loop
	elsif to_grandma == "BYE"
		bye_3_check
	else didnt_hear
	end
end

question

<file_sep>/MaxBranzburg/rails_games/app/views/rock_paper_scissors/_lose.html.erb

You suck!

You threw a <%= @user_throw %>

I threw a <%= @comp_throw %>

Therefore...

You lost the game!
<file_sep>/johnfohr-jofo45/05_class/starter_code/ex_apartment_objects/lib/building.rb
#Building Class
class Building
	attr_accessor :building_name, :building_address, :apartments, :number_units

	def initialize(building_name, building_address)
			@building_name = building_name
			@building_address  = building_address

			@apartments = []
			@number_units = 0
	end

	def to_s
	end

	# def apartments unit_info
	#  apartments[unit]=unit_info
	# end

end

# puts building.building_name
# puts building.building_address
# puts building.apartments
# puts building.number_units

#puts building
<file_sep>/MaxBranzburg/ex_secret_number_objects/lib/secret_number.rb
class SecretNumber
	attr_accessor :numbers

	def initialize
		@numbers = []
	end

	def rand_number
		0.upto 100 do |rand|
			rand = 1 + rand(10)
			@numbers << rand
		end
		secret_num = @numbers[rand(100)]
	end
end<file_sep>/MaxBranzburg/rails_games/app/views/rock_paper_scissors/_win.html.erb

You're amazing!

You threw a <%= @user_throw %>

I threw a <%= @comp_throw %>

Therefore...

You won the game. You're a hero!
<file_sep>/ColinCahill-leroyskagnetti/ritly/app/controllers/links_controller.rb

class LinksController < ApplicationController
	def index
		@link = Link.new
  	end

  	def show

  	end

  	def new
  	end

  	def redirectors
  		@long_url = Link.find_by hash_code:(params[:hash_code])
  		if @long_url
  			redirect_to @long_url.link
  		else
  			'links#index'
  		end

  	def preview
  		@long_url = Link.find_by hash_code:(params[:hash_code])
  	end

  	end

  	def create
  		@link = Link.new(link_params)
  		@link.hash_code = Random.rand(100000..999999)
  		if @link.save
  			redirect_to @link, notice: "Link was shortened!"
  		else
  			render 'index'
  		end
  	end

  	def link_params
  		params.require('link').permit(:link, :hash_code)
  	end
end
<file_sep>/ColinCahill-leroyskagnetti/lab_movie_part2/Movies/app/views/movies/index.html.erb

These is the movies we got:

<%= notice %>

Search for a movie:

<%= form_tag movies_path, method: "GET" do %>
  <%= text_field_tag :q, params[:q] %>
  <%= submit_tag "Search" %>
<% end %>

Would you like to <%= link_to "create a new movie", new_movie_path %>?

<%= render 'list' %><file_sep>/RobFroetscher-rfroetscher/rewsly/app/views/stories/show.html.erb

<%= @story.title %>

Category: <%= @story.category %>

UpVotes: <%= @story.upvotes.to_s %>

Link: <%= link_to @story.link, @story.link %>

<%= link_to "Back", root_path %><file_sep>/ArelisCruz_areliscruz/in_class/apartment.rb
#Explaining classes, objects, attr_accessor & load paths.
#TIME: 30 min

class Apartment
  attr_accessor :name, :sqft, :bedrooms, :bathrooms# or attr_reader (can't change the attr)

  def initialize(name, sqft, bedrooms, bathrooms)
    @name = name
    @sqft = sqft
    @bedrooms = bedrooms
    @bathrooms = bathrooms

    @renters = []
    @rent = 0
  end

  def occupied?
    renters.any?
  end

  def  to_s
    "#{@name} has #{sqft} sqft and #{@renters.count} renters."
end

# class ApartmentListing
#   attr_accessor :apartments

#   def initialize
#     @apartments = []
#   end

#   def apartment_availability
#     apartments.each do |apartment|
#       if apartments.occupied?
#         puts "This apartment is not for rent"
#       else
#         puts apartment
#         puts "This apartment is available, contact your broker for details"
#       end
#     end
#   end
# end

# listing= Array.new
# listing.apartments << Apartment.new ("Great Apartment!", 1200, 5, 14)
# puts apartment.get_name
<file_sep>/MaxBranzburg/ex_loop.rb
# Write a program that prints 99 bottles of beer on the wall.
# The song starts with
# 99 bottles of beer on the wall
# 99 bottles of beer!
# You take one down and pass it around,
# 98 bottles of beer on the wall!
#
# And ends with
# 1 bottle of beer on the wall
# 1 bottle of beer!
# You take one down and pass it around,
# No more bottles of beer on the wall :-(

# Added functionality to start at any # of bottles of beer

def beer_song total_bottles
	total_bottles.downto 1 do |bottle_number|
		if bottle_number > 1
			puts bottle_number.to_s + " bottles of beer on the wall"
			puts bottle_number.to_s + " bottles of beer!"
			puts "You take one down and pass it around,"
			puts (bottle_number - 1).to_s + " bottles of beer on the wall!"
			puts
		else
			puts bottle_number.to_s + " bottle of beer on the wall"
			puts bottle_number.to_s + " bottle of beer!"
			puts "You take one down and pass it around,"
			puts "No more bottles of beer on the wall :-("
		end
	end
end

puts "How many bottles of beer?"
answer = gets.chomp.to_i
beer_song answer<file_sep>/TolisonHumphrey-thump/midterm/Swift_Foot/main.rb
#Commentary: Great use of multiple classes, instance_variables, APIs and an original idea!
#One suggestion: re: activity_evaluation within manko_pei. Try to refactor that so that it includes

require_relative 'lib/manko_pei'

puts 'Welcome to SwiftFoot! Where we help you select the best upcoming fitness event based on your lifestyle.'
puts 'What is your name (First & Last Name)?'
user_name = gets.chomp

puts 'What is your age?'
user_age = gets.chomp

puts 'What is your gender(M/F)?'
user_sex = gets.chomp

puts "Hi #{user_name}!"
puts "Application Instructions: Please follow along as instructed and we will help you select your next healthy activity. Lets Begin! \n \n"

SwiftFoot = Manko_Pei.new(user_name)
SwiftFoot.activity_evaluation<file_sep>/ColinCahill-leroyskagnetti/Rewsly/app/views/stories/_story_list.html.erb
<% if @stories.any? %>

		<% @stories.order(created_at: :desc, title: :asc).each do |story| %>

		    Title: <%= link_to story.title, story %>

		    Category: <%= story.category %>

		    Upvotes: <%= story.upvotes %>

		<% end %>
<% else %>

Sorry, we couldn't locate any stories with that search term.  Please try entering a new search.

<% end %><file_sep>/MaxBranzburg/ex_classes.rb
class Apartment
	attr_accessor :name, :sqft, :num_bedrooms, :num_bathrooms, :renters

	def initialize(name, sqft, num_bedrooms, num_bathrooms, renters)
		@name = name
		@sqft = sqft
		@num_bedrooms = num_bedrooms
		@num_bathrooms = num_bathrooms

		@renters = []
		@rent = 0
	end

	def occupied?
		renters.any?
	end

	def to_s
		"#{@name} has #{sqft} sqft and #{@renters.count} renters."
	end
end

class ApartmentListing
	attr_accessor :apartments

	def initialize
		@apartments = []
	end

	def available_apartments
		apartments.each do |apartment|
			if apartment.occupied?
				puts "This apartment is not for rent"
			else
				puts apartment
				puts "This apartment is for rent, ask your broker for more details."
			end
		end
	end
end

listing = ApartmentListing.new
listing.apartments << Apartment.new("Great apartment!", 1200, 5, 14, [])
listing.apartments << Apartment.new("Terrible apartment!", 100, 3, 2, [])

listing.available_apartments<file_sep>/TolisonHumphrey-thump/Course05_ClassObjects/ex_secret_number_objects/lib/game.rb
# Game
#	This class holds most of the game logic and should:
#		Welcome players and inform them of the game rules.
#		Initialize the Player class.
# 		Initialize the Secret Number class.
# 		Prompt the user to choose a number, verify if the user guessed correctly.
# 		If the user guesses incorrectly let them know if they were too high or too low.
#		Monitor how many guesses the player has before the game is over.
#
# In creating your game, make sure it has arrays, hashes and all functionality is wrapped in methods.
# Add helpful comments to your code to document what each section does.

require_relative 'person'
require_relative 'secret_number'

class Game
	attr_accessor :session, :gold_num

	def initialize(session)
		@session = Person.new
		@gold_num = SecretNumber.new(number)
	end

	puts "Hi Playa #{player_name}!"
	puts "Game Rules: You have three tries to guess a number between 1 and 10. Lets Begin! \n \n"

	tries = 3
	guess = 0

	while (guess != sheen_number && tries != 0)
		puts "What number am I thinking of? \n"
		guess = gets.to_i

		if guess == sheen_number
			puts "CONGRATS YOU WIN #{sheen_number} CRISPY TACOS!"
		elsif guess < sheen_number
			puts "Your number is too low! \n"
		elsif guess > sheen_number
			puts "Your number is too high! \n"
		end

		tries = tries-1

		if guess != sheen_number
			puts "You have #{tries} more guess(es) before the game is terminated \n Guess another number!"
		end
	end

	if guess != sheen_number
		puts "YOU LOSE : _("
	end
end
<file_sep>/ColinCahill-leroyskagnetti/my_first_bewd_class/goals.rb
# These are my goals

# 1)  If possible, I'd like to learn to love Ruby.
# 2)  More practically, I would like to become technically proficient enough to begin building my own rails apps.
# 3)  Ultimately I would like to move into a development role at my current job or in a new position.<file_sep>/johnfohr-jofo45/05_class/lab_for_05_class.rb
class Apartment
	attr_accessor :name, :sqft, :renters

	def initialize(name, sqft)
		@name
		@sqft

		@renters=[]
		@rent=0
	end

	def occupied?
		renters.any?
	end

	def to_s
		"#{@name} has #{@sqft} sqft and #{renters.count} renters."
	end
end

<file_sep>/ColinCahill-leroyskagnetti/midterm/session.rb
require_relative 'user'

#User.rb contains the User class
require_relative 'location'

#Location.rb contains the Location class

require_relative 'TwitterConnection'

#TwitterConnection contains the TwitterConnection class

class Session

	attr_accessor :client, :user, :geo_search, :twitter

	def initialize
		@twitter = TwitterConnection.new
		@user = User.new

	# initializes new Twitter connection and new user.
	# User enters name at prompt

	end

	def start
		# method to initiate presentation of game options

		self.options_present
		self.game_chooser
	end

	def options_present
		puts "\n#{@user.name}, please make a selection.  Would you like to:\n\n"
		puts "(S)earch for tweets?\n(V)iew trending tweets from your location.\n(Q)uit"
	end

	def game_chooser

	# Main logic controller for the game.  User can choose Twitter search, Location search, or to quit.

		user_choice = gets.chomp.downcase
		if user_choice == 's'
			@twitter.search_input
			@twitter.search
			@twitter.search_result
			self.start
		elsif user_choice == 'v'
			@geo_search = Location.new
			@geo_search.location_results
			@geo_search.select_result
			@twitter.location_search_filter
			@twitter.location_search(@twitter.query,@geo_search.coordinates)
			@twitter.location_search_results
			self.start
		elsif user_choice == 'q'
			puts "Thanks for playing!"
			exit
		else
			puts "Please enter \"S\", \"V\", or \"Q\" to select from the above options."
			self.game_chooser
		end
	end

end

<file_sep>/ArelisCruz_areliscruz/secret_number_arelis_CLOSE.rb
###############################################################################
#
# Back-End Web Development - Homework #1
#
# Secret Number is a game you will build in two parts.
# The purpose of the game is to have players guess a secret number from 1-10.
#
# Read the instructions below.
# This exercise will test your knowledge of Variables and Conditionals.
#
###############################################################################
#
# We're ready to program! To practice our Ruby skills lets create a secret number game.
# In this game players have three tries to guess a secret number between 1 and 10.
#
# Here are some guidelines to building your game:
#
#	Intros
# 	-	Welcome the player to your game. Let them know who created the game.
#	  -	Ask for the player's name then personally greet them by printing to the screen, "Hi player_name!"
#	  -	Any good game will communicate the rules. Let the player know they must guess a number between 1 and 10
#		and that they only have 3 tries to do so.
#
#	Functionality:
#	 -	Hard code the secret number. Make it a random number between 1 and 10.
#	 - 	Ask the user for their guess.
#	 -	Verify if they were correct. If the player guesses correctly they win the game they should be congratulated and the game should end.
#	 -	If they guess incorrectly, give the player some direction. If they guess too high let them know, if they guess too low, let them know.
#	 - 	Don't forget to let your players know how many guesses they have left. Your game should say something like
#		  "You have X many guesses before the game is over enter a another number"
#	 -	If they don't guess correctly after 3 tries, print that the Player lost and the game is over. Also let them know what the `secret_number` was.
#
# Make sure to add helpful comments to your code to document what each section does.
#
# Remember to cast input from the Player into the appropriate data type.
#
###############################################################################

def greet_player
  puts "Welcome to Secret NUMBERS! Created by Arelis"
  puts "What is your name?"
  name = gets.chomp
  puts "Welcome #{name.capitalize}"
  get_number(name)

end

def get_number(name)
  count=0
  puts "Guess a number from 1-10. You have 3 guesses before the game is over"
  puts "what is your first guess?"
  number = gets.chomp.to_i
  count+=1
  game_loop(number,name)
end

# def game_conditional(number,name)

#   if number == secret_number
#     puts "Great JOB, #{name}! The Secret Nunber is #{secret_number}"
#   else number != secret_number
#   end
#   number_tries = 0
#   number_tries = number_tries + 1
#   while number_tries <= 3
#     puts "Nope, try again!"

#     break if number_tries >= 3

#elsif number = secret_number
        #print "Great JOB, #{name}! The Secret Nunber is #{secret_number}"

#   end
# end

def game_loop(number,name, count=1)
  secret_number = 4
    if number == secret_number
      puts "Awesome JOB, correct number"
    elsif count >= 3
      puts "Sorry no more tries"
    elsif number > secret_number && count <= 3
      puts "That's too high. Guess again:"
      number = gets.to_i
      count +=1
      game_loop(number, name, count)
    else number < secret_number && count <=3
      puts "That's too low. Guess agan: "
      count +=1
      game_loop(number, name, count)
    end
 end

greet_player
#greet player

#communicate the rules

<file_sep>/RobFroetscher-rfroetscher/rails_animals/app/views/layouts/application.html.erb
<!DOCTYPE html>

  <title>RailsAnimals</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>

<%= yield %>

<file_sep>/TolisonHumphrey-thump/lab_movie_part2/Movie_App/app/views/movies/index.html.erb

Welcome to RetFlix! See our collection of movies below!

<%= form_tag movie_path, method: "GET" do %>
  <%= text_field_tag :q, params[:q] %>
  <%= submit_tag "Search" %>
<% end %>

<file_sep>/RobFroetscher-rfroetscher/rewsly/app/views/stories/create.html.erb

There was a problem saving your story

<% @story.errors.full_messages.each do |e| %>

<%= e %>

<% end %>

<%= link_to "Try again", new_story_path %><file_sep>/RobFroetscher-rfroetscher/ex_apartment_objects/lib/person.rb
#Person Class.
class Person
	attr_accessor :name, :credit_score, :gender

	def initialize(name, credit_score, gender)
		@name = name
		@credit_score = credit_score
		@gender = gender
	end

	def to_s
		"This apartment is rented to #{@name}, who has a credit score of #{@credit_score} and is #{@gender}"
	end

end
<file_sep>/ColinCahill-leroyskagnetti/Rewsly/app/models/story.rb
class Story < ActiveRecord::Base
  validates_presence_of :title, :category, :upvotes, :link
  validates :title, length: { minimum: 10, message: "Your title is too short.  Please enter a longer title message" }
  validates :upvotes, numericality: { greater_than_or_equal_to: 0, only_integer: true }

  def self.search_for(query)
    where('title LIKE :query OR category LIKE :query', :query => "%#{query}%")
  end
end

<file_sep>/ColinCahill-leroyskagnetti/ritly/app/views/links/index.html.erb
Welcome to Ritly!

Please enter the Url you would like to shorten:

<%= form_for @link do |f| %>

 	<%= f.label :link %>
 	<%= f.text_field :link %>

 	<%= f.submit %>

  <% end %><file_sep>/ColinCahill-leroyskagnetti/games/app/views/rock_paper_scissors/show.html.erb

Rock-Paper-Scissors!

 You threw <%= @throw_array[@user_throw].capitalize %>

<%= image_tag("rock_paper_scissors/#{@throw_array[@user_throw]}.jpeg") %>

	The computer threw <%= @throw_array[@computer_throw].capitalize %>

<%= image_tag("rock_paper_scissors/#{@throw_array[@computer_throw]}.jpeg") %>

<%= render @game_partial %>

<%=link_to "Try Again?", new_rock_paper_scissor_path %>

<file_sep>/arjun-chemparathy/ex_apartment_objects/lib/apartment.rb
#Apartment class.
class Apartment
  attr_accessor :name, :apt_sqft, :apt_bedrooms, :apt_bathrooms

  def initialize (name, apt_sqft, apt_bedrooms, apt_bathrooms)
  	@name = name
  	@apt_sqft = apt_sqft
  	@apt_bedrooms = apt_bedrooms
  	@apt_bathrooms = apt_bathrooms
  end
end

apartment = Apartment.new("red arrow","B","C","D")
puts apartment

# class Apartment
#   attr_accessor :name, :sqft, :num_bedrooms, :num_bathrooms, :renters

#   def initialize(name, sqft, num_bedrooms, num_bathrooms)
#     @name = name
#     @sqft = sqft
#     @num_bedrooms = num_bedrooms
#     @num_bathrooms = num_bathrooms

#     @renters = []
#     @rent = 5000
#   end

#   def occupied?
#     @renters.any?
#   end

#   def to_s
#     "#{@name} has #{sqft} sqft and #{@renters.count} renters."
#   end
# end<file_sep>/RobFroetscher-rfroetscher/midterm/lib/mailing.rb
class Mailing
	attr_accessor :sender, :recipient, :template

	def initialize
		@sender = Sender.new
		@recipient = Recipient.new
		@template = Template.new("#{@sender.template}", "#{@sender.name}", "#{@sender.message}", "#{@recipient.name}")
	end

	def send
		Mail.defaults do
		  delivery_method :smtp, { :address   => "smtp.sendgrid.net",
		                           :port      => 587,
		                           :domain    => "waterthought.org",
		                           :user_name => "robfroetscher",
		                           :password  => "<PASSWORD>", ##### checking passwords into github can be dangerous!!!
		                           :authentication => 'plain',
		                           :enable_starttls_auto => true }
		end

		message = Mail.new({:to => "#{@recipient.email}",
                    :from => "#{@sender.email}",
                    :subject => "#{@template.subject}" })

		html_part = Mail::Part.new
		html_part.content_type = "text/html; charset=UTF-8"
		html_part.body = "#{@template.body}"

		text_part = Mail::Part.new
		text_part.content_type = "text/plain; charset=UTF-8"
		text_part.body = "Text"

    	message.add_part(html_part)
    	#message.add_part(text_part) #This looks bad--going to comment it out until I can figure out how to make it only show up in the source

    	message.deliver

	end
end<file_sep>/MaxBranzburg/midterm/main.rb
# Application name: Mashable Search
# Creator: <NAME>
# Date: August 24, 2014

# Description:
# Mashable Search is a simple Mashable news search application.
# It accepts 3 inputs (type, search term, desired # results),
# makes the appropriate API call depending on story type, and
# produces a list of the stories of the given type that include
# the search term in their bodies, sorted by # of shares and
# limited by the desired # of results or # stories matching the
# search term, whichever is less.  If the desired # of results
# entered is not an integer, the application demands that the
# user enter an integer before executing the search and sort
# functions.

# =============================================================
# =============================================================

require_relative 'lib/results'

puts "\nWelcome to Mashable Story Search!"

puts "\nPlease enter your search term:"

search_term = gets.chomp

puts "\nWhat would you like to search - New ('n'), Hot ('h'), or Rising ('r') stories?"

desired_type = gets.chomp

puts "\nPlease enter your maximum desired number of results:"

results = Results.new(desired_type, search_term)
results.sort_stories

# =============================================================
# =============================================================

# Known limitations to be addressed:
# 1/ Searches for exact queries in story contents, regardless
#    of adjacent characters.  For example, a query of 'cat'
#    would return a story containing the string 'category'
#    because it includes the query.
# 2/ Does not reject invalid input for search type (e.g., not
#    type other than 'n', 'h', or 'r'). Intentionally used
#    maximum desired number results to demonstrate ability to
#    handle bad input instead.
# 3/ High latency due to broad API call for all stories of the
#    desired type prior to search and sort functions on stored
#    stories.<file_sep>/TolisonHumphrey-thump/Teddit_API Practice/TableofContents.rb
#Start program with an array holding all information for your table of contents
#Build an array within an array

chapter_uno = "Muenster...Page 1"
chapter_dos = "Cornbread...Page 3"
chapter_tre = "Juvenile...Page 5"
chapter_quatro = "Chucky T... Page 7"
tab_cont = Array.new
tab_cont.push chapter_uno
tab_cont.push chapter_dos
tab_cont.push chapter_tre
tab_cont.push chapter_quatro

puts tab_cont
<file_sep>/ArelisCruz_areliscruz/extra_work/robot.rb
require 'pry'

#State & Object Factory: factory that creates and instiantes the robots
#Behavior: Collection of class methods, instance methods, instance variable, local variables, constants etc.,

class Robot

  #getter && setter methods for each attribute
  attr_accessor  :name, :type, :origin

  #instance variables are available through the class. @name is an instance variable
  def initialize(name, type, origin)
    @name = name
    @type = type
    @origin = origin
  end

  #instance method
  def fly
    add_wings_and_take_off
  end

  def laser_master
    add_laser_training
  end

 def self.make_robots(number_of_robots)
  robots = number_of_robots.to_i
  robots.times do
    Robot.random_robot_maker
  end
end

def self.random_robot_maker
  names = ["Arelis", "Kisha","Jane", "Atiya", "Celeste", "Raissa", "Erik", "Mark", "Ramon"]
  types = ["Super Android", "Android"]
  origins =  ["Venus", "Mars"]

  name = names.sample
  type = types.sample
  origin  = origins.sample

  r = Robot.new(name,type,origin)
  puts "Created robot #{name}, of type #{type}, from #{origin}"
  return r
end

  def to_s
      "My name is #{name},  I am #{type}, I was created in #{@origin}"
  end

private

#usually used within instance && class methods.
def add_wings_and_take_off
  puts "I am badass! I am #{name}, an awesome #{type}  with flying skills"
end
def add_laser_training
  if type == "Super Android"
    puts "I am #{name}, LASER MASTER!"
  else
    puts "I wish I had Lasers :("

  end

end

end

Robot.random_robot_maker
Robot.make_robots(10)

happy_robot = Robot.random_robot_maker
happy_robot.fly
happy_robot.laser_master
<file_sep>/johnfohr-jofo45/midterm/lib/reddit.rb
require 'json'
require 'rest-client'

class Reddit_info

	def reddit_api_info
	  reddit_api_response = JSON.load(RestClient.get('http://www.reddit.com/r/Health/.json'))

		# puts reddit_api_response['data']['children']

		reddit_api_response['data']['children'].map do |entry|
	  	story = "Title:  #{entry['data']['title']}"
	  	story
	  	end

	  # response["data"]["children"].map do |entry|
	  #   story = {title: story["data"]["title"], category: story["data"]["subreddit"]}

	  #   calculate_upvotes story
	  #   show_new_story_notification story

	  #   story
	end

end<file_sep>/arjun-chemparathy/apartment.rb
class Apartment
	attr_accessor :name, :sqft, :num_bedrooms, :num_bathrooms, :renters

	def initialize(name, sqft, num_bedrooms, num_bathrooms)
		@name = name
		@sqft = sqft
		@num_bedrooms = num_bedrooms
		@num_bathrooms = num_bathrooms

		@renters = []
		@rent = 5000
	end

	def occupied?
		@renters.any?
	end

	def to_s
		"#{@name} has #{sqft} sqft and #{@renters.count} renters."
	end
end

# listing = Apar
# apartment = Apartment.new("Great Apartment")
# apartment.location = "SF"
# puts apartment.name
# puts

# other_apartment = Apartment.new("Terrible Apartment")

# puts other_apartment.name
# puts <file_sep>/MaxBranzburg/ex_teddit_api_news.rb
# We're going to add a remote data source to pull in stories from Mashable and Digg.
  # http://mashable.com/stories.json
  # http://digg.com/api/news/popular.json
# These stories will also be upvoted based on our rules. No more user input!

# Pull the json, parse it and then make a new story hash out of each story(Title, Category, Upvotes)
# Add each story to an array and display your "Front page"

# =================================================================
# Digg Stories
# =================================================================

require 'json'
require 'rest-client'

def connect_to_digg
	stories = []

	digg_json = JSON.load RestClient.get('http://digg.com/api/news/popular.json')
	digg_stories = digg_json["data"]["feed"]

	digg_stories.each do |story|
		title = story["content"]["title"]
		category = story["content"]["tags"][0]["display"]
		diggs = story["digg_score"]

		if category.downcase.include? 'cat'
			diggs = diggs * 5
		elsif category.downcase.include? 'bacon'
			diggs = diggs * 8
		elsif category.downcase.include? 'food'
			diggs = diggs * 3
		end

		stories << {
			title: title,
			category: category,
			diggs: diggs
		}

	end

	stories.each do |unique_story|
		puts "Story: #{unique_story[:title]}\nCategory: #{unique_story[:category]}\nDiggs: #{unique_story[:diggs]}"
		puts

	end

end

connect_to_digg

# =================================================================
# Mashable New Stories
# =================================================================

# require 'json'
# require 'rest-client'

# def connect_to_mashable
# 	stories = []

# 	mashable_json = JSON.load RestClient.get('http://mashable.com/stories.json')
# 	mashable_new = mashable_json["new"]

# 	mashable_new.each do |story|
# 		title = story["title"]
# 		channel = story["channel"]
# 		shares = story["shares"]["total"]

# 		stories << {
# 			title: title,
# 			channel: channel,
# 			shares: shares
# 		}

# 	end

# 	stories.each do |unique_story|
# 		puts "Story: #{unique_story[:title]}"
# 		puts "Channel: #{unique_story[:channel]}"
# 		puts "Shares: #{unique_story[:shares]}"
# 		puts

# 	end

# end

# connect_to_mashable

# =================================================================
# Reddit Stories
# =================================================================

# require 'json'
# require 'rest-client'

# def connect_to_reddit
# 	stories = []

# 	reddit_json = JSON.load RestClient.get('http://reddit.com/.json')
# 	reddit_top_level_data = reddit_json["data"]
# 	reddit_stories = reddit_json["data"]["children"]

# 	reddit_stories.each do |story|
# 		title = story["data"]["title"]
# 		category = story["data"]["subreddit"]
# 		upvotes = story["data"]["ups"]

# 		if category.downcase.include? 'cat'
# 			upvotes = upvotes * 5
# 		elsif category.downcase.include? 'bacon'
# 			upvotes = upvotes * 8
# 		elsif category.downcase.include? 'food'
# 			upvotes = upvotes * 3
# 		end

# 		stories << {
# 			title: title,
# 			category: category,
# 			upvotes: upvotes
# 		}

# 		end

# 	stories.each do |unique_story|
# 		puts "Story: #{unique_story[:title]}"
# 		puts "Category: #{unique_story[:category]}"
# 		puts "Upvotes: #{unique_story[:upvotes]}"
# 		puts
# 	end

# end

# connect_to_reddit
<file_sep>/jianzheng-hzzj1023/midterm/lib/teddit_Json.rb
#Just create a json object with the entered hyperlink

require 'json'
require 'rest-client'

	class TedditJson
		attr_accessor :data

		def initialize(json_link)
		   @data =JSON.load(RestClient.get(json_link))
		end

	end
<file_sep>/TolisonHumphrey-thump/Teddit_API Practice/ex_teddit_hashes.rb
# Step 1: Working with Arrays and Hashes

# Copy your solution from ex_teddit_conditional.rb in 02_Variables_Conditionals

def get_input
	gets.chomp
  #Get input from the user.
end

def calculate_upvotes(category)
	puts "Current number of upvotes:"
	upvotes = get_input.to_i

	if category == 'cats'
		upvotes=upvotes*5
	elsif category == 'bacon'
		upvotes=upvotes*8
	elsif category =='Food'
		upvotes=upvotes*3
	end
end

def add_story(title, category, upvotes)
	story_hash = Hash.new
	story_hash = {title: title.to_s, category: category.to_s, upvotes: upvotes.to_s}
end

story_array = Array.new
puts "Welcome to Teddit! a text based news aggregator. Get today's news tomorrow!"
answer = 'y'

until answer == 'n'
	puts "Please enter a News story:"
	title = get_input
	puts "Please give it a category:"
	category = get_input
	upvotes = calculate_upvotes(category)

	story_array << add_story(title, category, upvotes)

	puts "New story added! #{title}, Category: #{category.capitalize}, Current Upvotes: #{upvotes}"

	puts "Would you like to add another story? Enter 'y' or 'n'"
	answer = get_input.to_s
end

story_array.each do |sto|
	puts sto
end

# Create an empty stories array. This will be used to hold all stories we capture.

# Users enter the story as they do now, but it gets put in a hash instead.
# Update any reference to the story (upvotes, category and title)
# Your story hash should look like the one below:
# { title: "Monkeys thank mayor for flounder tooth necklace", category: "Teeth", upvotes: 1 }
# Add the hash to an array called stories and print "Story: Monkeys thank mayor for flounder tooth necklace, Category: (Teeth), Current Upvotes: 1"
# Using the stories array
# Test your cat, bacon, and food upvote conditional logic.
#
# Step 2: Adding Loops
# Use a loop, so that your program continues to ask a user for stories until they chose to quit. ("Would you like to add another story? Enter 'y' or 'n'")
# Once the user is finished with entering their stories, use .each to print each story in the stories array.
#
#<file_sep>/arjun-chemparathy/quiz.md
1. cd
2. git is a change management tool
3. github is a user friendly version of git which helps teams collaborate on code related projects
4. A git repository is where the master version of the code is stored (?)
5. git commit-m "push to GitHub"<file_sep>/RobFroetscher-rfroetscher/movie_app/app/models/movie.rb
class Movie < ActiveRecord::Base
	validates :title, presence: true
	validates :description, length: {minimum: 10}
	validates :year_released, numericality: {greater_than: 0}

  #Your form alows for users to rate the movies, but yours seeds did not have ratings. "allow_blank:true" will
  #allow for an attribute to be nil or a blank string.
	validates :rating, numericality: {greater_than_or_equal_to: 1, less_than_or_equal_to: 5}, allow_blank: true
end
<file_sep>/TolisonHumphrey-thump/Course05_ClassObjects/ex_apartment_objects/lib/apartment.rb
#Apartment class.
class Apartment
	attr_accessor :name, :apt_sqft, :apt_bedrooms, :apt_bathrooms

	def initialize(name, apt_sqft, apt_bedrooms, apt_bathrooms)
		@name = name
		@apt_sqft = apt_sqft
		@apt_bedrooms = apt_bedrooms
		@apt_bathrooms = apt_bathrooms
	end

end
<file_sep>/TolisonHumphrey-thump/Teddit_API Practice/ex_teddit_conditional.rb
# Teddit Contionals - Starter Code.

# Let's add a new Teddit feature. Upvotes!
# Complete the application below.
# Where you see comments (lines that begin with #) replace it with code so that the program works.

def get_input
	gets.chomp
  #Get input from the user.
end

puts "Welcome to Teddit! a text based news aggregator. Get today's news tomorrow!"
puts "Please enter a News story:"
story = get_input
puts "Please give it a category:"
category = get_input

def calculate_upvotes(category)
	puts "Current number of upvotes:"
	upvotes = get_input.to_i

	if category == 'cats'
		upvotes=upvotes*5
	elsif category == 'bacon'
		upvotes=upvotes*8
	elsif category == 'Food'
		upvotes=upvotes*3
	end
end

upvotes = calculate_upvotes(category)

puts "New story added! #{story}, Category: #{category.capitalize}, Current Upvotes: #{upvotes}"
# Write code so that:
		# If the Story is about cats multiply the upvotes by 5
		# If the Story is about bacon multiply the upvotes by 8
		# If the Story is about Food it gets 3 times the upvotes.
<file_sep>/ColinCahill-leroyskagnetti/midterm/twitter_oauth.rb
# Never did get this to work, so I abandoned it in favor of the Twitter gem.

# require 'oauth'
# require 'pry'
# # Exchange your oauth_token and oauth_token_secret for an AccessToken instance.
# def prepare_access_token(oauth_token, oauth_token_secret)
#   consumer = OAuth::Consumer.new("1OjqzZ6XVPN6hbyWWVhR5hrNw".chomp, "UvZSkz63JEJoPJ9tuTDEdTvbGAQlj46iMtDFjy33m3OGzmpZ4O".chomp,
#     { :site => "https://api.twitter.com",
#       :scheme => :header
#     })
#   # now create the access token object from passed values
#   token_hash = { :oauth_token => oauth_token,
#                  :oauth_token_secret => oauth_token_secret
#                }
#   access_token = OAuth::AccessToken.from_hash(consumer, token_hash )
#   return access_token
# end

# # Exchange our oauth_token and oauth_token secret for the AccessToken instance.
# access_token = prepare_access_token("<KEY>
# ".chomp, "<KEY>GAQlj<KEY>".chomp)
# # use the access token as an agent to get the home timeline
# response = access_token.request(:get, "https://api.twitter.com/1.1/statuses/home_timeline.json")

# binding.pry<file_sep>/mattflannery/midterm/blockchain_client.rb
class BlockChainClient < Client

	@base_url = "https://blockchain.info/ticker"

	def initialize
		@client_name = CLIENT_NAMES[0]
	end

	def get_buy_price
		r = generic_get ("https://blockchain.info/ticker")
		r['USD']['last'].to_money(r['currency'])
	end

end<file_sep>/RobFroetscher-rfroetscher/midterm/lib/participant.rb
class Participant
	def verify_email(email)
		if email.include? "@"
			true
		else
			false
		end
	end

end
class Recipient < Participant
	attr_accessor :name, :email

	def initialize
		get_details
	end

	def get_details
		puts "What's the name of the person you would like to send this email to?"
		@name = gets.chomp
		while true ###### while what is true?
			puts "Enter your recipient's email address to send."
			@email = gets.chomp
			if verify_email(@email) == true
				break
			else
				puts "That email address doesn't look right. Please enter it again."
			end
		end
	end

end

class Sender < Participant
	attr_accessor :template, :name, :message, :email

	def initialize
		get_details
		template_prefs
		get_message
	end
	def get_details
		puts "What's your name?"
		@name = gets.chomp
		while true ###### while what is true ?
			puts "What's your email address?"
			@email = gets.chomp
			if verify_email(@email) == true
				break
			else
				puts "That email address doesn't look right. Please enter it again."
			end
		end
	end

	def get_message
		puts "What personalized message would you like to include to your recipient?"
		@message = gets.chomp
	end

	def template_prefs
		puts "What kind of email would you like to send? Enter the number below: \n 1) Love email (romantic)\n 2) Congratulatory email"
		response = gets.chomp
		while true ##### while what is true?
			if response == "1" or response.downcase.include? "congratulatory"
				@template = "love"
				break
			elsif response == "2" or response.downcase.include? "love"
				@template = "congrats"
				break
			else
				puts "Please enter 1, 2, or 3"
				response = gets.chomp
			end
		end
		@template
	end
end
<file_sep>/ColinCahill-leroyskagnetti/deaf_grandma.rb
#Program to echo any input sent by the user unless it is written in upcase.

# Logic flow:

# - Grandma can't hear unless user input is entered in upcase.
# 	- If grandma can't hear, she repsonds "NO, NOT SINCE 1938!"
# 		- She should shout a random year each time between 1930 and 1950.
# 	- If she can hear, Grandma will respond with "Oh, that's nice."
# - When the user wants to leave, the user must enter "BYE" three consecutive times to end the conversation.

puts "Grandma:  Hello, Sonny.  How are you doing?"

	response = gets.chomp
	bye_counter = 0

	while bye_counter < 3 do

	   if response == "BYE"
			bye_counter = bye_counter + 1
			puts bye_counter.to_s + "first conditional"
	   elsif response == response.chomp.upcase
			puts "NO, NOT SINCE 19" + (30..50).to_a.sample.to_s + "!"
			bye_counter = 0
			puts bye_counter.to_s + "second conditional"
		else
		puts "HUH?  SPEAK UP, SONNY!"
		bye_counter = 0
		end
		response = gets.chomp
		puts bye_counter
	end

		puts "Alright, dear.  See you later."

<file_sep>/ColinCahill-leroyskagnetti/lab_movie_part2/Movies/app/views/movies/_list.html.erb
<% @movies.each do |movie| %>

      (<%= movie.year_released %>)
      <%= link_to movie.title, movie %>

    <%= movie.description %>

<% end %>

<file_sep>/MaxBranzburg/ex_apartment_objects/lib/apartment.rb
#Apartment Class
class Apartment

	attr_accessor :name, :apt_sqft, :apt_bedrooms, :apt_bathrooms, :renter, :rent

	def initialize(name, apt_sqft, apt_bedrooms, apt_bathrooms)
	    @name = name
	    @apt_sqft = apt_sqft
	    @apt_bedrooms = apt_bedrooms
	    @apt_bathrooms = apt_bathrooms
  	end

  	def to_s
		"\nUnit:\t#{@name}\nSQFT:\t#{@apt_sqft}\nBed:\t#{apt_bedrooms}\nBath:\t#{apt_bathrooms}"
	end

end<file_sep>/TolisonHumphrey-thump/Games_08/games/app/views/rock_paper_scissors/new.html.erb

Welcome to Rock Paper Scissors- The Game!

Make a selection between the following options below for the oncoming battle

<% @options.each do |item| %>

<%= link_to item[:name], rock_paper_scissor_path(item[:number]) %>

<% end %>

<file_sep>/RobFroetscher-rfroetscher/rewsly/app/models/story.rb
class Story < ActiveRecord::Base
	validates :title, presence: true
	validates :link, presence: true
	validates :upvotes, numericality: true
	validates :category, presence: true

end
<file_sep>/jianzheng-hzzj1023/midterm/lib/call.rb
# This is the class where it create a search on the Json data

	class Call
	  attr_accessor :call_content, :call_type

#Ask for the type of the search
	def ask_call_type
		puts "You can search the teddit in three ways: by title, by category or by number of upvotes"
		puts "Tell me what do you want to search: title, category or upvotes?"
		@call_type = gets.chomp
		check_call_type @call_type
	end

#Verife the search type user entered matches one the search types we support, if not
#ask for the search type again
	def check_call_type(call_type)

		while call_type != "title" && call_type != "category" && call_type != "upvotes"
		   puts "Please enter one of the three search criterias: title, category or upvotes"
		   call_type = gets.chomp
		   ##### you should use the instance variable @call_type here.#######
		end

	end

#Once we know the search type, now ask what user want to search within the search type
	def ask_call_content
		puts "Now tell me what do you want to search in #{@call_type}?"
		@call_content = gets.chomp
		check_call_content(@call_content, @call_type)
	end

#Make sure user enter a string for search in title and category and a number for search in upvotes
	def check_call_content(call_content, call_type)

		if @call_type == "category" or @call_type == "title"
			while @call_content.to_i != 0 or @call_content == "0"
			puts "Please enter a String for your search"
			@call_content = gets.chomp
		end
		end

		if @call_type == "upvotes"

			while @call_content != "0" && @call_content.to_i == 0
			puts "Please enter a number for your search"
			@call_content = gets.chomp
		end
		@call_content = @call_content.to_i

		end
	end

	end<file_sep>/RobFroetscher-rfroetscher/ex_teddit_hashes.rb
# Step 1: Working with Arrays and Hashes

# Copy your solution from ex_teddit_conditional.rb in 02_Variables_Conditionals
# Create an empty stories array. This will be used to hold all stories we capture.
# Users enter the story as they do now, but it gets put in a hash instead.
# Update any reference to the story (upvotes, category and title)
# Your story hash should look like the one below:
# { title: "Monkeys thank mayor for flounder tooth necklace", category: "Teeth", upvotes: 1 }
# Add the hash to an array called stories and print "Story: Monkeys thank mayor for flounder tooth necklace, Category: (Teeth), Current Upvotes: 1"
# Using the stories array
# Test your cat, bacon, and food upvote conditional logic.
#
# Step 2: Adding Loops
# Use a loop, so that your program continues to ask a user for stories until they chose to quit. ("Would you like to add another story? Enter 'y' or 'n'")
# Once the user is finished with entering their stories, use .each to print each story in the stories array.
#
#

stories = Array.new

def get_input
  #Get input from the user.
  input = gets.chomp
end

def calculate_upvotes(story, category)
	# Write code so that:
		# If the Story is about cats multiply the upvotes by 5
		# If the Story is about bacon multiply the upvotes by 8
		# If the Story is about Food it gets 3 times the upvotes.
		upvotes ||= 1

		if category.downcase.to_s == "cats"
			upvotes = upvotes * 5

		elsif category.downcase.to_s == "bacon"
			upvotes = upvotes * 8

		elsif category.downcase.to_s == "food"
			upvotes = upvotes * 3

		else upvotes

		end

	#For example:
	# "Cats frolic despite tuna shortage" should give you 5 times the upvotes!
end

puts "Welcome to Teddit! a text based news aggregator. Get today's news tomorrow!"

while true
	puts "Please enter a News story:"
	story = get_input
	if story.downcase.to_s == "exit"
		break
	end
	puts "Please give it a category:"
	category = get_input
	if category.downcase.to_s == "exit"
		break
	end
	upvotes = calculate_upvotes(story, category)
	headline = { titlekey: story, categorykey: category, upvoteskey: upvotes }
	stories.push headline

	puts "Next story:"
	puts %{Type "exit" if done}
end

stories.each do |printedstory|
	puts "New story added! #{printedstory[:titlekey]}, Category: #{printedstory[:categorykey]}, Current Upvotes: #{printedstory[:upvoteskey]}"
end

<file_sep>/johnfohr-jofo45/08_class_rails/games/app/views/rock_paper_scissors/new.html.erb

RockPaperScissors#new

Find me in app/views/rock_paper_scissors/new.html.erb

Choose cafefully! (R)ock, (P)aper, (S)cissors:

<file_sep>/ColinCahill-leroyskagnetti/ritly/db/seeds.rb
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
#   cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
#   Mayor.create(name: 'Emanuel', city: cities.first)

Link.create! link: "http://i.imgur.com/z2WTmmK.jpg", hash_code: 123456
Link.create! link: "http://i.imgur.com/6eXBeM2.jpg", hash_code: 123457
Link.create! link: "http://i.imgur.com/wiBqjIF.jpg", hash_code: 123458
<file_sep>/MaxBranzburg/midterm/lib/search.rb
# Class for user-generated search term

class Search
	attr_accessor :search_term

	def initialize(search_term)
		@search_term = search_term
	end
end
<file_sep>/johnfohr-jofo45/midterm/lib/Linked_Accounts.rb
class LinkedAccounts
  attr_accessor :account_name, :account_code, :user_name

  def initialize(account_name, account_code)
    @account_name = account_name
    @account_code = account_code
   end
end

<file_sep>/ColinCahill-leroyskagnetti/midterm/user.rb
class User
	attr_accessor :name

	def initialize
		puts "Please enter your name:"
		@name = gets.chomp
			# while @name =~ /!|?/ do
			# 	puts "Please enter a valid name:"
			# 	@name  = gets.chomp
			# end
	end
end<file_sep>/jianzheng-hzzj1023/secret_number.rb
###############################################################################
#
# Back-End Web Development - Homework #1
#
# Secret Number is a game you will build in two parts.
# The purpose of the game is to have players guess a secret number from 1-10.
#
# Read the instructions below.
# This exercise will test your knowledge of Variables and Conditionals.
#
###############################################################################
#
# We're ready to program! To practice our Ruby skills lets create a secret number game.
# In this game players have three tries to guess a secret number between 1 and 10.
#
# Here are some guidelines to building your game:
#
#	Intros
# 	-	Welcome the player to your game. Let them know who created the game.
#	  -	Ask for the player's name then personally greet them by printing to the screen, "Hi player_name!"
#	  -	Any good game will communicate the rules. Let the player know they must guess a number between 1 and 10
#		and that they only have 3 tries to do so.
#
#	Functionality:
#	 -	Hard code the secret number. Make it a random number between 1 and 10.
#	 - 	Ask the user for their guess.
#	 -	Verify if they were correct. If the player guesses correctly they win the game they should be congratulated and the game should end.
#	 -	If they guess incorrectly, give the player some direction. If they guess too high let them know, if they guess too low, let them know.
#	 - 	Don't forget to let your players know how many guesses they have left. Your game should say something like
#		  "You have X many guesses before the game is over enter a another number"
#	 -	If they don't guess correctly after 3 tries, print that the Player lost and the game is over. Also let them know what the `secret_number` was.
#
# Make sure to add helpful comments to your code to document what each section does.
#
# Remember to cast input from the Player into the appropriate data type.
#
###############################################################################

puts "Welcome to Secret Number, a game created by <NAME>"

puts "Please enter your name"

username = gets.strip

puts "\n"

puts "Hi #{username}!"

puts "Here are the rules for the Secret Number game:"

puts "You have three chances to guess a number between 1 and 10"

puts "You will get hint everytime you guess a number so you can adjust your next guess"

puts "You win the game if you guess the number right within 3 guesses and you lose if you don't"

puts "\n"
puts "Plesae enter your first guess:"

user_guess = gets.strip.to_i

secret_number = rand(10)+1

2.downto(0) do |i|
if user_guess == secret_number
	puts "Congratulations! You won!"
	break
else
	if i > 0
		if user_guess > secret_number
			number_difference = "high"
		else number_difference = "low"
		end
		puts "The number you guessed is too #{number_difference}. You have #{i} guesses before the game is over enter another number:"
		user_guess = gets.strip.to_i
	else
	puts "You lost! The secret_number is #{secret_number}"
	end
end
end

<file_sep>/johnfohr-jofo45/08_class_rails/games/app/views/rock_paper_scissors/show.html.erb

RockPaperScissors#show

Find me in app/views/rock_paper_scissors/show.html.erb

  	if win == true

	"Good job"

    elsif tie = true

 "yikes a tie!"

	  else  #win == false

	"You lost"

<file_sep>/arjun-chemparathy/midterm/user.rb
class User
	attr_accessor :name

	def intialize(name)
		@name = name
	end
end
<file_sep>/TolisonHumphrey-thump/Secret_Number/lib/number.rb
#Generate a secret number from plucking a random number from an array spanning 1 through 10.

class Number
	attr_accessor :winning_number

	def initialize
		@winning_number = Array.new
		@winning_number = [*1..10]
		@winning_number = @winning_number.sample
	end
end
<file_sep>/TolisonHumphrey-thump/Course05_ClassObjects/ex_secret_number_objects/lib/secret_number.rb
class SecretNumber
	attr_accessor :sheen_number

	for 1.upto(10) do |num|
		num_array = Array.new
		num_array << num
		end

	def initialize(sheen_number)

		@sheen_number = number
	end
end
<file_sep>/johnfohr-jofo45/05_class/starter_code/ex_secret_number_objects/lib/game.rb
require 'lib/person'
require 'lib/secret_number'

class Game
		attr_accessor :name

 def initialize(name)
  	@name = name
  end

  puts "Welcome #{name} to a new fun game!"

 puts "I am thinking of a number between 1 and 10.   Please tell me your guess and I'll tell you if you are correct.  (If you are wrong I'll even give you a hint."
 secret_number_guess = gets.strip.to_i
# confirms that we received an appropriate guess.

  # if unit_rented == "y"
  #   apartment.renter = create_renter
  #   puts "Renter added successfully"
 	# while secret_number_guess == false
 	# 	puts "That is not a good secret number, please tell me an integer."
 	# 	secret_number=gets.strip.to_i
 	# 	if

 	# else
 	# 	puts "Thank you for telling me that number.  It will be our secret."
 	# end

# this class will be complex
# we need to write logic to initialize a new game, and run the game loop
# we'll want to write a few separate methods for unique tasks so that our
# code is structured properly

end

#	This class holds most of the game logic and should:
#		Welcome players and inform them of the game rules.
#		Initialize the Player class.
# 		Initialize the Secret Number class.
# 		Prompt the user to choose a number, verify if the user guessed correctly.
# 		If the user guesses incorrectly let them know if they were too high or too low.
#		Monitor how many guesses the player has before the game is over.

<file_sep>/RobFroetscher-rfroetscher/ritly/app/models/url.rb
class Url < ActiveRecord::Base
	def generate_code
		self.code = SecureRandom.hex(13)
	end
end
<file_sep>/ColinCahill-leroyskagnetti/midterm/midterm.rb
![GeneralAssemb.ly](https://github.com/generalassembly/ga-ruby-on-rails-for-devs/raw/master/images/ga.png "GeneralAssemb.ly")

Back-End Web Development
--------

##MIDTERM  REQUIREMENTS

Create a command line based application that fulfills these criteria:

-  Create a directory in your personal homework folder called "midterm" and put all files there.
-  Takes user input and handles bad input (i.e. You expect numbers and they give you a letter).
-	Connects to a 3rd party api where the call varies based on what the user gives you.
-	Must be object oriented. You must instantiate classes. The only file that can run without classes is your main.rb (look at past homework for how this works; remember to use `require_relative`).
-	Push code on Github.

##GRADING
Your midterm is considered completed if it meets all requirements above. Your instructor and T.A will provide you with feedback!

API Ideas:

*	Twitter search api
* 	reddit.com
*	digg.com

advanced:

* 	soundcloud.com
*	eventbrite.com
*	any provider at https://apigee.com/providers

# result = "Geocoder.search("...")
# result.first.data["geometry"]['location'].keys

# reddit_json = JSON.load(RestClient.get('http://www.reddit.com/.json'))

# .tweet methods:

# [:favorite_count,
#  :favorite_count?,
#  :filter_level,
#  :filter_level?,
#  :in_reply_to_screen_name,
#  :in_reply_to_screen_name?,
#  :in_reply_to_attrs_id,
#  :in_reply_to_attrs_id?,
#  :in_reply_to_status_id,
#  :in_reply_to_status_id?,
#  :in_reply_to_user_id,
#  :in_reply_to_user_id?,
#  :lang,
#  :lang?,
#  :retweet_count,
#  :retweet_count?,
#  :source,
#  :source?,
#  :text,
#  :text?,
#  :favorites_count,
#  :favoriters_count,
#  :in_reply_to_tweet_id,
#  :reply?,
#  :retweeters_count,
#  :geo,
#  :geo?,
#  :metadata,
#  :metadata?,
#  :place,
#  :place?,
#  :retweeted_status,
#  :retweeted_status?,
#  :retweeted_tweet,
#  :retweet?,
#  :retweeted_tweet?,
#  :user,
#  :user?,
#  :favorited?,
#  :favorited,
#  :retweeted?,
#  :retweeted,
#  :truncated?,
#  :truncated,
#  :full_text,
#  :uri,
#  :url,
#  :entities?,
#  :hashtags,
#  :hashtags?,
#  :media,
#  :media?,
#  :symbols,
#  :symbols?,
#  :uris,
#  :urls,
#  :uris?,
#  :urls?,
#  :user_mentions,
#  :user_mentions?,
#  :created_at,
#  :created?,
#  :id,
#  :id?,
#  :eql?,
#  :==,
#  :hash,
#  :inspect,
#  :attrs,
#  :to_h,
#  :to_hash,
#  :to_hsh,
#  :[],
#  :freeze,
#  :memoize,
#  :pry,
#  :__binding__,
#  :pretty_print,
#  :pretty_print_cycle,
#  :pretty_print_instance_variables,
#  :pretty_print_inspect,
#  :to_json,
#  :nil?,
#  :===,
#  :=~,
#  :!~,
#  :<=>,
#  :class,
#  :singleton_class,
#  :clone,
#  :dup,
#  :taint,
#  :tainted?,
#  :untaint,
#  :untrust,
#  :untrusted?,
#  :trust,
#  :frozen?,
#  :to_s,
#  :methods,
#  :singleton_methods,
#  :protected_methods,
#  :private_methods,
#  :public_methods,
#  :instance_variables,
#  :instance_variable_get,
#  :instance_variable_set,
#  :instance_variable_defined?,
#  :remove_instance_variable,
#  :instance_of?,
#  :kind_of?,
#  :is_a?,
#  :tap,
#  :send,
#  :public_send,
#  :respond_to?,
#  :extend,
#  :display,
#  :method,
#  :public_method,
#  :singleton_method,
#  :define_singleton_method,
#  :object_id,
#  :to_enum,
#  :enum_for,
#  :pretty_inspect,
#  :equal?,
#  :!,
#  :!=,
#  :instance_eval,
#  :instance_exec,
#  :__send__,
#  :__id__]
<file_sep>/johnfohr-jofo45/midterm/lib/signup.rb
class Signup
  attr_accessor :email, :name, :sex, :date_of_birth, :accounts_linked

  def initialize(email, name)
    @email = email
    @name = name

    @sex = sex
    @date_of_birth = date_of_birth
    @accounts_linked = []
   end

end

# def self.initial_signup
# 	puts "\nWhat is your email?\n"
# 	email = gets.strip
# 	puts "\n\nThank you for providing me your email.  Now we can stay in touch!  To get the most out of Share Life, we need to learn a little more about you!  \n\nWhat is your name?\n"
# 	name = gets.strip
# 	@account = Signup.new(email, name)
# 	email = @account.email
# 	name = @account.name
# 	confirm_email_name
# end
<file_sep>/RobFroetscher-rfroetscher/ex_secret_number_objects/lib/secret_number.rb
class SecretNumber
# this class will generate our secret number for us
attr_accessor :secret_number
	def initialize
		@secret_number = 1 + rand(10)
	end
end
<file_sep>/TolisonHumphrey-thump/Teddit_API Practice/eventbrite_api.rb
require 'json'
require 'rest-client'

#class Eventbrite_Sesh
	#attr_accessor :search_url, :activity_bank

	#def initialize(search_url)
		#@search_url = search_url
		#@activity_bank = []
	#end

	def eventbrite_rec(activity_bank)
		healthevents_eb = RestClient.get('https://www.eventbriteapi.com/v3/events/search/q=walk&token=<KEY>')
		healthevents_json = JSON.load healthevents_eb

		health_options = healthevents_json["events"]

		health_options.each do |event|
			activity_suggestion={
				:title => event["name"]["text"],
				:description => event["description"]["text"]
				}
		activity_bank << activity_suggestion

		def show_suggestions(event)
			def show_message(message)
  				puts message
			end
  			show_message("Activity Suggestion: #{event[:title]} \n Description: #{story[:description]} \n\n")
		end

		activity_bank.each do |event|
			show_suggestions(event)
		end
	end
end

activity_bank = []

eventbrite_rec(activity_bank)<file_sep>/ColinCahill-leroyskagnetti/ex_secret_number_objects/lib/secret_number.rb
class SecretNumber
	attr_accessor :secret_number

	def initialize
		@secret_number = (1..10).to_a.sample
	end
end<file_sep>/jianzheng-hzzj1023/ex_apartment_objects/lib/apartment.rb
#Apartment class.
class Apartment
	attr_accessor :name, :sqft, :num_bedrooms, :num_bathrooms, :renter, :rent

	def initialize(name, sqft, num_bedrooms, num_bathrooms)
		@name = name
		@sqft = sqft
		@num_bedrooms = num_bedrooms
		@num_bathrooms = num_bathrooms

		@rent = 0
	end

	def to_s
			"#{@name} has #{@sqft} sqft with #{@num_bedrooms} bedrooms and #{@num_bathrooms} bathrooms"
		end

end
<file_sep>/TolisonHumphrey-thump/midterm/Swift_Foot/lib/user.rb
class User
	attr_accessor :name, :age, :gender, :category

	def initialize
		@name = name
		@age = age
		@gender = gender
		@category = category
	end
end

languages: HTML+ERB Markdown Ruby

repo_language: HTML+ERB