Skip to content

Instantly share code, notes, and snippets.

View kenzotakahashi's full-sized avatar

Kenzo Takahashi kenzotakahashi

  • Tokyo, Japan
View GitHub Profile
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: 'kenzotakahashi@gmail.com'})
expect(user1.is_gmail_user?).to eql(true)
end
# 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"
def customer_count(status, gender)
Customer.where(status: status, gender: gender).size
end
from sklearn import datasets
import csv, math, random
import pandas as pd
import numpy as np
from collections import defaultdict