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
FROM ubuntu:16.04 | |
MAINTANER Your Name "[email protected]" | |
RUN apt-get update -y && \ | |
apt-get install -y python-pip python-dev | |
# We copy just the requirements.txt first to leverage Docker cache | |
COPY ./requirements.txt /app/requirements.txt |
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
#!/bin/bash | |
echo "Enter the year in YYYY format, followed by [ENTER]:" | |
read year | |
if (( ("$year" % 400) == "0" )) || (( ("$year" % 4 == "0") && ("$year" % 100 != | |
"0") )); then | |
echo "Yes, it is" | |
else |
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
Pythoncode1.py (11 lines) | |
from datetime import date | |
def diff_dates(date1, date2): | |
return abs(date2-date1).days | |
d1 = date(2013,1,1) | |
d2 = date(2013,9,13) |
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
Pythoncode1.py (11 lines) | |
from datetime import date | |
def diff_dates(date1, date2): | |
return abs(date2-date1).days | |
def main(): | |
d1 = date(2013,1,1) | |
d2 = date(2013,9,13) |
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
#Pythoncode1.py (11 lines) | |
from datetime import date | |
def diff_dates(date1, date2): | |
return abs(date2-date1).days | |
def main(): | |
d2 = date(2013,9,13) |
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
#Pythoncode1.py (11 lines) | |
from datetime import date | |
def diff_dates(date1, date2): | |
return abs(date2-date1).days | |
def main(): | |
d1 = date(2013,1,1) | |
d2 = date(2013,9,13) |
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
--- pythoncode1.py | |
+++ pythoncode2.py | |
@@ -1,5 +1,3 @@ | |
-from datetime import date | |
- |
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
import difflib | |
veggies1 = ''' | |
celery | |
spinach | |
lettuce | |
garlic | |
carrot | |
cabbage | |
potato |
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
import difflib | |
veggies1 = ''' | |
celery | |
spinach | |
lettuce | |
garlic | |
potato | |
carrot | |
cabbage |
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
import difflab | |
veggies1 = ''' | |
celery | |
spinach | |
lettuce | |
garlic | |
carrot | |
cabbage | |
potato |
NewerOlder