Skip to content

Instantly share code, notes, and snippets.

View cxasper's full-sized avatar
🏠
Working from home

Andersson Velasquez cxasper

🏠
Working from home
  • Perú
View GitHub Profile
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)
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"