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
import os | |
import subprocess | |
import shutil | |
POSITIONS = ['Backend', 'Frontend'] | |
ASSIGNMENT_TYPE = { | |
"Backend-Assignment": ["A", "B"], | |
"Frontend-Assignment": None, | |
} |
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
class MediaStorage(S3Boto3Storage): | |
location = settings.AWS_MEDIA_LOCATION | |
file_overwrite = False | |
def _save(self, name, content): | |
self.object_parameters.update({ | |
'ContentDisposition': f'attachments; filename="{content._name}"'}) | |
return super()._save(name, content) |
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
STATICFILES_STORAGE = 'core.storage.StrictManifestStaticFilesStorage' |
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 crop(original_file, width, height): | |
original_image = Image.open(original_file) | |
original_width, original_height = original_image.size | |
if original_width < original_height: | |
original_height = int(original_height * (width / original_width)) | |
original_image = original_image.resize((width, original_height)) | |
crop_img = original_image.crop((0, abs(original_height - height)/2, width, (original_height + height)/2)) | |
else: | |
original_width = int(original_width * (height / original_height)) |
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 python:3.7 | |
ENV PYTHONUNBUFFERED 1 | |
RUN mkdir /code | |
RUN mkdir /code/staticfiles | |
WORKDIR /code | |
RUN apt-get update | |
RUN apt-get upgrade -y |
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
@keyframes changeBgColor { | |
0% { | |
background-color: #ffffff; | |
} | |
50% { | |
background-color: aliceblue; | |
} | |
100% { | |
background-color: #ffffff; | |
} |
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
$('html, body').on('click', function (e) { | |
var tgPoint = $(e.target); | |
var obj = tgPoint.hasClass($('selector')); | |
if (!obj) { | |
$(obj).hide(); | |
} | |
}); |
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
import sys | |
import string | |
OP = ['+', '-', '*', '/'] | |
operand_num = int(input()) | |
if not 1 <= operand_num <= 26: | |
sys.exit(1) | |
math_ex = list(input()) |