From 925cb57d70d0e90442dc3c5d44876c1bc62f7d30 Mon Sep 17 00:00:00 2001 From: Shaun Setlock Date: Sat, 9 May 2020 23:07:26 -0400 Subject: [PATCH] Automatic commit performed through alias... --- problems/005_problem.py | 26 +++++- problems/005_problem_jnotebook.ipynb | 64 ++++++++++++++ requirements.txt | 119 +++++++++++---------------- 3 files changed, 132 insertions(+), 77 deletions(-) create mode 100644 problems/005_problem_jnotebook.ipynb diff --git a/problems/005_problem.py b/problems/005_problem.py index 9449d9d..61ef414 100755 --- a/problems/005_problem.py +++ b/problems/005_problem.py @@ -11,12 +11,28 @@ # numbers from 1 to 20? # -import decorators # Typically imported to compute execution duration of functions. -import time # Typically imported for sleep function, to slow down execution in terminal. + +# Standard Imports: +# ------------------- + +import time # Typically imported for sleep function, to slow down execution in terminal. import typing +import sys import pprint + +# Imports from Virtual Environment for this Project: +# --------------------------------------------------- + +sys.path.append('/home/shaun/code/github/euler_project/py_euler_project/venv') import numpy +# Imports from Modules Built for this Project: +# ----------------------------------------------- + +sys.path.append('/home/shaun/code/github/euler_project/py_euler_project/problems') +import decorators + + # Create function that finds the next # prime number when supplied with an # intitial integer. @@ -127,8 +143,10 @@ def main(): print(product) - print(set(factor_list)) + print(numpy.array(common)) + # print("The largest palindrome number which is a product of two numbers of length {} is {} ... ".format("foo_list","foo")) -main() \ No newline at end of file +main() + diff --git a/problems/005_problem_jnotebook.ipynb b/problems/005_problem_jnotebook.ipynb new file mode 100644 index 0000000..15dc51e --- /dev/null +++ b/problems/005_problem_jnotebook.ipynb @@ -0,0 +1,64 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Problem 5:\n", + "\n", + "2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.\n", + "\n", + "What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?\n" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "import pprint\n", + "import time # Typically imported for sleep function, to slow down execution in terminal.\n", + "import typing\n", + "import decorators # Typically imported to compute execution duration of functions.\n", + "import numpy" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.2" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/requirements.txt b/requirements.txt index 3a16dfe..9c89d88 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,81 +1,54 @@ -argcomplete==1.10.0 astroid==2.3.3 -blivet==3.1.7 -blivet-gui==2.1.12 -CairoSVG==1.0.20 -cffi==1.12.3 -chardet==3.0.4 -cupshelpers==1.0 -dbus-python==1.2.8 -decorator==4.4.0 -distro==1.4.0 -gpg==1.13.1 -humanize==0.5.1 -idna==2.8 -initial-setup==0.3.76 -iotop==0.6 +attrs==19.3.0 +backcall==0.1.0 +bleach==3.1.4 +decorator==4.4.2 +defusedxml==0.6.0 +entrypoints==0.3 +importlib-metadata==1.6.0 +ipykernel==5.2.1 +ipython==7.13.0 +ipython-genutils==0.2.0 +ipywidgets==7.5.1 isort==4.3.21 -langtable==0.0.51 +jedi==0.17.0 +Jinja2==2.11.2 +jsonschema==3.2.0 +jupyter==1.0.0 +jupyter-client==6.1.3 +jupyter-console==6.1.0 +jupyter-core==4.6.3 lazy-object-proxy==1.4.3 -libcomps==0.1.15 -libvirt-python==5.6.0 -lxml==4.4.0 +MarkupSafe==1.1.1 mccabe==0.6.1 -notify2==0.3.1 -ntplib==0.3.3 -olefile==0.46 -onboard==1.4.1 -ordered-set==3.1 -pexpect==4.7.0 -pid==2.2.3 -Pillow==6.2.2 -ply==3.11 -powerline-status==2.7 -productmd==1.25 -psutil==5.6.7 +mistune==0.8.4 +nbconvert==5.6.1 +nbformat==5.0.6 +notebook==6.0.3 +numpy==1.18.3 +pandocfilters==1.4.2 +parso==0.7.0 +pexpect==4.8.0 +pickleshare==0.7.5 +prometheus-client==0.7.1 +prompt-toolkit==3.0.5 ptyprocess==0.6.0 -pwquality==1.4.2 -pycairo==1.18.1 -pycparser==2.14 -pycups==1.9.74 -pycurl==7.43.0.2 -pydbus==0.6.0 -pyenchant==2.0.0 -pygit2==0.28.2 -PyGObject==3.34.0 -pyinotify==0.9.6 -pykickstart==3.21 +Pygments==2.6.1 pylint==2.4.4 -pyparted==3.11.2 -PySocks==1.7.0 -pystray==0.14.3 -python-augeas==0.5.0 -python-dateutil==2.8.0 -python-meh==0.48 -python-pam==1.8.4 -python-xapp==1.8.1 -python-xlib==0.26 -pytz==2019.2 -pyudev==0.21.0 -pyxdg==0.26 -PyYAML==5.3.1 -requests==2.22.0 -requests-file==1.4.3 -requests-ftp==0.3.1 -rpm==4.15.1 -selinux==2.9 -sepolicy==1.1 -setools==4.2.2 -setproctitle==1.1.10 -setroubleshoot==1.1 -simpleline==1.6 -six==1.12.0 -slip==0.6.4 -slip.dbus==0.6.4 -sos==3.8 -systemd-python==234 -tinycss==0.3 +pyrsistent==0.16.0 +python-dateutil==2.8.1 +pyzmq==19.0.0 +qtconsole==4.7.3 +QtPy==1.9.0 +Send2Trash==1.5.0 +six==1.14.0 +terminado==0.8.3 +testpath==0.4.4 +tornado==6.0.4 +traitlets==4.3.3 typed-ast==1.4.1 -urllib3==1.25.7 -virtualenv==16.6.2 +wcwidth==0.1.9 +webencodings==0.5.1 +widgetsnbextension==3.5.1 wrapt==1.11.2 +zipp==3.1.0