This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rails_helper' | |
| RSpec.describe User, type: :model do | |
| describe ".is_gmail_user?" do | |
| context "given a gmail address" do | |
| it "returns true" do | |
| user1 = User.new({email: '[email protected]'}) | |
| expect(user1.is_gmail_user?).to eql(true) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Specify the provider and access details | |
| provider "aws" { | |
| region = "ap-northeast-1" | |
| } | |
| resource "aws_instance" "web" { | |
| ami = "ami-374db956" | |
| instance_type = "t2.micro" | |
| tags { | |
| Name = "NomadAgent" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def customer_count(status, gender) | |
| Customer.where(status: status, gender: gender).size | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sklearn import datasets | |
| import csv, math, random | |
| import pandas as pd | |
| import numpy as np | |
| from collections import defaultdict | |
NewerOlder