This file contains 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
class EditImgUploadS3: | |
def __init__(self): | |
self.s3 = boto3.resource('s3') | |
self.region = os.getenv('AWS_STORAGE_REGION') | |
self.bucket = os.getenv('AWS_STORAGE_BUCKET_NAME') | |
def upload_object(self, image): | |
new_image = self.draw_rectangle(image) | |
image.seek(0) | |
client = boto3.client('s3', region_name=self.region) |
This file contains 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
n = gets.chomp | |
n = n.to_i | |
if (n%2==0) | |
case n | |
when 2 ... 6 | |
puts "Not Weird" | |
when 6 ... 21 | |
puts "Weird" | |
when 22 ... 101 | |
puts "Not Weird" |